« Back to channel list

#ruby - 26 May 2015

« Back 1 day Forward 1 day »
[00:04:08] ZergCoder: has joined #ruby
[00:04:44] ICantCook: has left #ruby: ("Leaving")
[00:04:50] juanpaucar: has joined #ruby
[00:06:58] djbkd: has joined #ruby
[00:09:32] bogdanteleaga: has joined #ruby
[00:11:43] mrchris: has joined #ruby
[00:15:38] pwattstbd: has joined #ruby
[00:17:25] Rubie: has joined #ruby
[00:17:34] sevenseacat: has joined #ruby
[00:18:00] DoubleMalt: has joined #ruby
[00:22:09] e1nh4nd3r: has joined #ruby
[00:23:50] dseitz: has joined #ruby
[00:24:27] keen____________: has joined #ruby
[00:26:35] robustus: has joined #ruby
[00:26:48] growlove: has joined #ruby
[00:28:33] xxneolithicxx: has left #ruby: ()
[00:28:40] xxneolithicxx: has joined #ruby
[00:32:16] mrmargolis: has joined #ruby
[00:33:13] yh__: has joined #ruby
[00:34:07] [1]master: has joined #ruby
[00:34:22] thiagovsk: has joined #ruby
[00:37:39] vikaton: has joined #ruby
[00:38:58] mase-chatter: has joined #ruby
[00:39:35] uhsf: has joined #ruby
[00:39:49] fabrice31: has joined #ruby
[00:40:32] tjbiddle: has joined #ruby
[00:40:37] iwishiwerearobot: has joined #ruby
[00:42:06] ZergCoder: has joined #ruby
[00:42:54] uhsf: I'm trying to solve a problem since a few hours. cannot load such file -- bundler/setup (LoadError). Using ruby 2.2.2, passenger and nginx. Please help.
[00:44:25] Akagi201: has joined #ruby
[00:44:26] Musashi007: has joined #ruby
[00:44:26] uhsf: the error page says RUBY_VERSION = 2.2.2 and RubyGems paths = ["~/.gem/ruby/2.2.0", "/usr/lib/ruby/gems/2.2.0"]
[00:45:53] uhsf: RubyGems paths seems wrong. How to change it to ~/.gem/ruby/2.2.2?
[00:46:17] sevenseacat: its not wrong, thats the api version
[00:47:37] uhsf: sevenseacat: how to solve: cannot load such file -- bundler/setup (LoadError)?
[00:47:51] sevenseacat: install bundler?
[00:48:15] shuber_: has joined #ruby
[00:48:25] CHVNX: has joined #ruby
[00:48:44] yh__: has joined #ruby
[00:50:17] Aswebb_: has joined #ruby
[00:50:58] uhsf: sevenseacat: I have bundler installed in ~/.gem/ruby/2.2.2/gems/bundler-1.9.9 why passenger can't load it?
[00:51:25] GriffinHeart: has joined #ruby
[00:51:45] Azure: has joined #ruby
[00:52:32] Dakuan: has joined #ruby
[00:52:59] uhsf: sevenseacat: when using passenger directly in app directory it works fine.
[00:53:16] uhsf: sevenseacat: when using nginx it doesn't work
[00:53:23] master: has left #ruby: ()
[00:53:47] ddarkpassenger: has joined #ruby
[00:54:47] sevenseacat: i dont know, sorry mate.
[00:55:58] Yzguy: has joined #ruby
[00:56:16] powersurge: has joined #ruby
[00:56:22] shevy: uhsf I just installed bundler via gem
[00:56:25] shevy: in irb, I did this:
[00:56:26] shevy: require 'bundler/setup'
[00:56:28] shevy: and it works
[00:56:41] shevy: so you (a) either do not have it installed, or (b) have it installed somewhere where by default it can't be found
[00:57:03] shevy: I did not try user-install though
[00:57:05] havenwood: has joined #ruby
[00:57:08] powersurge: so in python if you have a tuple like ('foo', 'bar') you can do 'tuple unpacking' which is baz, foobar = ('foo', 'bar'). I know you can do similar in ruby with arrays but for the life of me I can't remember what ruby calls it
[00:57:13] powersurge: anyone able to jog my memory?
[00:57:19] shevy: but from my experience, user-installed gems work just as the normal system-installed gems too
[00:57:21] powersurge: not having success trying to google it
[00:57:23] BTRE: has joined #ruby
[00:57:28] Matthews_: has joined #ruby
[00:57:39] shevy: I am not sure what this is
[00:57:43] speakingcode: has joined #ruby
[00:57:44] shevy: tuple unpack?
[00:57:55] powersurge: it's a pythonism that I was using to describe the behavior that ruby does
[00:58:09] powersurge: imagine this foo, bar = ['foo', 'bar']
[00:58:18] shevy: do you mean foo, var = *bla ?
[00:58:23] powersurge: foo # 'foo' and bar # 'bar'
[00:58:33] powersurge: yea that's ultimately the same behavior shevy
[00:58:52] shevy: >> foo, bar = *['foo', 'bar']; bar
[00:58:53] ruboto: shevy # => "bar" (https://eval.in/369787)
[00:58:57] powersurge: looking for the term for it in ruby because I wnated to know a little more about it, specifically if holes are allowed
[00:59:06] shevy: yeah googling for * is hard
[00:59:18] shevy: you may have more luck via symbol-hound for such weird method names
[00:59:38] powersurge: >> foo, bar = ['foo', 'bar']; bar
[00:59:39] ruboto: powersurge # => "bar" (https://eval.in/369789)
[00:59:49] powersurge: ^ looking for more detail on that behavior rather than the splat operator
[01:00:00] shevy: parallel assignment?
[01:00:04] powersurge: there's deffo a name for it, and it's on the tip of my tongue
[01:00:19] powersurge: the term on my tongue is something like 'array decompression' or 'array deconstruction' or something...
[01:00:26] powersurge: I'll see if parallel assignment scratches my itch
[01:00:44] shevy: well, if you mean to decompose an array then the * is the way to go
[01:00:46] car: has joined #ruby
[01:01:39] shevy: >> array = [1,2,3,4]; foo, *bar = array; bar
[01:01:40] ruboto: shevy # => [2, 3, 4] (https://eval.in/369790)
[01:02:29] powersurge: the array I'll be decomposing/compressing/w/e will be known to be a pair
[01:02:39] powersurge: and if it's not a pair I don't mind the stuff after the first two elements becoming 'lost'
[01:03:00] wildroman2: has joined #ruby
[01:04:23] gambl0re: guys...how do i make a website like espn. what front/back end frameworks should i look into?
[01:04:57] gambl0re: any suggesions?
[01:05:26] powersurge: that's a pretty broad question. so broad in fact that there's not really a correct answer gambl0re
[01:05:34] powersurge: what do you know?
[01:06:05] shevy: gambl0re build with .cgi!
[01:06:25] powersurge: you've got quite a way to go, I'm afraid
[01:06:32] shevy: you can do it
[01:06:43] gambl0re: thats why im asking which technologies i need to use so i can learn it
[01:06:47] gambl0re: or a site like cnn..
[01:06:59] powersurge: imo the next steps would be to read some introductory tutorials to ruby, php, & python and then make a call on which one fits the way you think best
[01:07:14] powersurge: all of these technologies are more or less equivalent at the end of the day, and it really boils down to preference
[01:07:18] MatthewsFace: has joined #ruby
[01:07:25] _seanc_: has joined #ruby
[01:07:31] powersurge: from there you can start looking at the specific platform/framework and narrow your focus
[01:08:42] powersurge: there are more general web focused channels that can help you as you pick and learn a backend technology like #web, #webdevs & #webtech
[01:08:50] gambl0re: do you recommend bootstrap or foundation? im thinking of rails or angular for backend
[01:09:00] powersurge: for you I don't recommend anything at that level yet
[01:09:07] powersurge: it doesn't sound like you have the foundational knowledge yet
[01:09:20] ebonics: bootstrap is old
[01:09:35] powersurge: I'd recommend learning a backend technology where the technology is one of: ruby, php, or python and then learning js to complement your existing html & css
[01:09:46] gambl0re: bootstrop is not old?...new version just got released. get with the program.
[01:10:03] powersurge: html + css are both declarative programming languages and are a world apart from imperative languages
[01:10:05] ebonics: no one takes bootstrap seriously anymore
[01:10:16] ebonics: foundation replaced it
[01:10:17] gambl0re: i already did codecademy ruby already.
[01:10:36] ebonics: personally i dont bother with either of them
[01:10:39] powersurge: if you feel that you like ruby then the next step, imo would be to play with sinatra and learn ruby in a web context
[01:10:54] powersurge: sinatra does very little for you and will teach you about how http works
[01:10:54] ebonics: just slap in normalize and write your own grid with sass
[01:10:55] gambl0re: foundation is more widely used than bootstrap?
[01:11:07] ebonics: no bootstrap is because its popular among noobs
[01:11:12] powersurge: once you get a handle on that you can move up to rails which is the defacto standard in ruby
[01:11:20] ebonics: foundation is better though and more widely used among actual frontend devs
[01:11:20] powersurge: alternative full stack frameworks exist though, if you are curious
[01:11:42] powersurge: bootstrap is still crazy popular and pretty widespread
[01:11:46] powersurge: I find foundation ot be very buggy
[01:11:57] powersurge: although I prefer it for how... composable it is, I should say
[01:12:33] gambl0re: bootstrap includes responsive design.
[01:12:35] powersurge: the most useful thing in either is the grid system which you don't really need nowadays with flexbox imo
[01:12:39] gambl0re: thats why its popular..
[01:12:44] powersurge: foundation does as well
[01:12:46] ebonics: gambl0re, you'll find out soon how little that means
[01:12:52] powersurge: the biggest thing bootstrap has going for it is inertia
[01:12:56] ebonics: depending on bootstrap for responsiveness is garbo
[01:13:03] gambl0re: company's need responsive design you know.
[01:13:08] powersurge: loads of themes and blog posts and all kinds of stuff
[01:13:10] ebonics: yeah, you do that yourself
[01:13:22] ebonics: bootstrap etc limits your freedom
[01:13:48] gambl0re: yo man, it's pretty complicated to handcode a responsive site
[01:13:50] that1guy: has joined #ruby
[01:13:51] multiscan: has joined #ruby
[01:13:52] powersurge: yea, bootstrap & foundation are both starting points. the more complex and unique your design goes the more you'll drop from the toolkit
[01:13:53] gambl0re: thats why theres frameworks
[01:13:54] ebonics: no its actually not
[01:14:02] powersurge: check out flexbox and media queries gambl0re
[01:14:09] powersurge: it's much simpler than it has been
[01:14:22] powersurge: which is a big reason why you see fewer dedicated grid systems
[01:14:31] someword: has joined #ruby
[01:14:33] ebonics: using frameworks is old meta
[01:14:43] powersurge: heh 'old meta'
[01:14:46] ebonics: and the only ones sttill using them generally are people who are dependent on them
[01:14:48] powersurge: competitive gamer identified!
[01:15:15] duderonomy: why is recommended to do sinatra before rails?
[01:15:26] uhsf: has joined #ruby
[01:15:32] powersurge: rails has a load of magic and it can be frustrating without a base understanding of http imo
[01:15:56] powersurge: like driving on the highway before you drive on the street imo
[01:16:12] sevenseacat: i wouldnt say its recommended
[01:16:22] GriffinHeart: has joined #ruby
[01:16:36] powersurge: ya, it's my recommendation :>
[01:16:46] powersurge: which you can take with a grain of salt
[01:16:53] duderonomy: yeah, I spent a lot of time re-reading route tables; still don't "know it"
[01:17:23] sevenseacat: if you already have a lot of web MVC experience, I dont see the benefit in using sinatra first as a stepping-stone for rails
[01:17:45] Matthews_: has joined #ruby
[01:17:47] ebonics: how does rails compare to like laravel
[01:17:48] powersurge: but if you're starting from scratch, imo, learn ruby -> learn sinatra -> learn rails
[01:17:50] ebonics: ive never used rails
[01:17:54] uhsf: Can someone please take a look at this and tell me how to fix it?
[01:18:00] powersurge: you'll find a fair amount of familiarity
[01:18:07] powersurge: laravel borrowed a ton from rails
[01:18:24] powersurge: the routing system, similarities in the orm
[01:18:28] sevenseacat: most php frameworks borrowed a boatload from rails
[01:18:31] powersurge: resourceful routing
[01:18:43] ebonics: the ORM is based on doctrine
[01:18:47] gambl0re: i like to go 0-100 real quick...
[01:18:50] ebonics: and the routing system is based on every MVC ever
[01:18:55] gambl0re: i dont like taking baby steps.
[01:19:01] gambl0re: i like to jump right in.
[01:19:12] sevenseacat: true, most web frameworks have similar sort of routing
[01:19:14] Feyn: has joined #ruby
[01:19:22] sevenseacat: ACTION was happy to discover that when looking at phoenix framework for elixir
[01:19:24] powersurge: you'll be surprised how much is familiar as you learn, I'l bet ebonics
[01:19:33] powersurge: bah, I'm supposed to be working
[01:19:33] tubuliferous: has joined #ruby
[01:19:37] havenwood: sevenseacat: pattern matching \o/
[01:19:39] powersurge: got sucked in
[01:19:52] ebonics: im sure its similar
[01:20:22] gambl0re: the hardest part of rails is the database model....f*cking confusing when you have more than one db and they to connect with each other.
[01:20:39] ebonics: that's super easy with laravel
[01:20:51] psye: has joined #ruby
[01:20:56] gambl0re: is laravel mvc?
[01:21:01] ddarkpassenger: has joined #ruby
[01:21:06] ebonics: $db1 = $eloquent->use("db1");
[01:21:12] wildroman2: has joined #ruby
[01:21:14] ebonics: $db2 = $eloquent->use("db2");
[01:21:28] Musashi007: has joined #ruby
[01:21:35] gambl0re: but rails is the defacto........
[01:21:40] gambl0re: company's use rails..
[01:21:53] arescorpio: has joined #ruby
[01:22:00] ebonics: laravel was the most contributed to github repo in 2012 or 2013 or something
[01:22:03] ebonics: ppl use laravel m8
[01:22:26] ebonics: plus in actual EE people use java/spring, not rails lol
[01:22:28] gambl0re: are you aussie?..
[01:23:13] _seanc_: has joined #ruby
[01:23:13] ebonics: the only place in canada worth living in
[01:23:32] gambl0re: im from scarborough man..
[01:23:41] gambl0re: where you from
[01:23:51] gambl0re: which area?
[01:24:13] gambl0re: you're not from toronto..
[01:24:27] jpfuentes2: has joined #ruby
[01:25:09] gambl0re: we dont use the word m8...unless your an expat
[01:25:18] ebonics: i'm from the internet
[01:25:24] GriffinHeart: has joined #ruby
[01:25:41] ebonics: i don't conform to the hip toronto lingo
[01:25:51] rkazak: has left #ruby: ()
[01:25:56] gambl0re: whats hip toronto lingo?
[01:26:02] ebonics: you tell me
[01:26:15] ebonics: whatever you use in place of m8 since it's clear there is a regimented approach to language where youre from
[01:27:25] Hijiri: has joined #ruby
[01:30:24] pengin: has joined #ruby
[01:30:26] speakingcode: has joined #ruby
[01:31:50] GriffinHeart: has joined #ruby
[01:31:51] niftylettuce: has joined #ruby
[01:32:07] bootstrappm: yeah we use laravel alongside rails. one for consumer product, other for admin interface
[01:34:04] powersurge: rails is defacto in ruby, sure gambl0re
[01:34:10] ZergCoder: has left #ruby: ()
[01:34:12] powersurge: but every language has their preferred frameworks
[01:34:19] powersurge: python has django, php has... a few, heh
[01:34:20] saadq: has joined #ruby
[01:34:32] tkuchiki: has joined #ruby
[01:34:50] multiscan: has joined #ruby
[01:35:40] sevenseacat: has joined #ruby
[01:36:52] Hijiri: has joined #ruby
[01:37:35] mattwildig: has joined #ruby
[01:37:55] gambl0re: i want to learn frameworks that will help me get a job...
[01:38:43] bronson: has joined #ruby
[01:38:49] gambl0re: laravel is probably nice to know but i dont think company's use it as much as rails which will put me a disadvantage.
[01:39:47] kinduff: has joined #ruby
[01:39:57] kinduff: Good morning good people
[01:40:10] powersurge: laravel is the little brother of another framework called symfony2, they use a lot fo the same libs under the hood
[01:40:22] powersurge: between the two it's probably more popular overall than rails is
[01:40:51] gambl0re: symfony2 is more popular than rails?
[01:40:52] powersurge: not to talk you off of rails, of course :>
[01:40:54] pengin: has joined #ruby
[01:41:13] kinduff: gambl0re: highly doubt it
[01:41:25] Channel6: has joined #ruby
[01:41:38] powersurge: php is much more popular than ruby and symfony2 is the current darling of the php world
[01:42:09] kinduff: lets avoid talking about php again :V
[01:42:29] that1guy: has joined #ruby
[01:43:12] powersurge: tbh gambl0re it sounds like you've got a bit of tunnel vision going on. I'd encourage you to focus on what you like rather than what will get you employed immediately
[01:43:29] powersurge: jumping straight into rails without any prior web or ruby experience is a recipe for frustration
[01:44:00] kinduff: +1000 both coments from powersurge
[01:45:32] powersurge: are _ holes idiomatic in ruby? if you're unpacking an array and don't care about the first var, for example
[01:45:43] nettoweb: has joined #ruby
[01:50:06] Radar: powersurge: I think so
[01:52:00] DerisiveLogic: has joined #ruby
[01:52:47] gambl0re: ok fine...do you suggest i learn sinatra first??
[01:52:50] that1guy: has joined #ruby
[01:52:58] gambl0re: i mean lavarel?
[01:53:20] powersurge: if you stay with ruby I suggest learning sinatra and then rails
[01:53:43] juanpaucar: has joined #ruby
[01:53:45] powersurge: but my base advice is to play with the major players in the web space (ruby, python, php) and find one which fits your head the best and go from there
[01:53:47] Dakuan: has joined #ruby
[01:54:02] powersurge: the advice will be similar in any of the three languages though. learn a micro framework and then a fullstack framework
[01:54:05] sevenseacat: my advice to someone just starting web dev would probably be 'start with flat html'
[01:54:15] powersurge: he said he's got some base html/css experience
[01:54:19] nettoweb: has joined #ruby
[01:54:21] powersurge: but yes, I agree :>
[01:54:27] sevenseacat: missed that part
[01:54:27] Radar: ACTION remembers banning gambl0re 
[01:55:21] powersurge: I can't remember what the popular php micro framework is
[01:55:26] powersurge: going to drive me crazy if I don't figure it out
[01:55:27] that1guy: has joined #ruby
[01:55:29] gambl0re: im only learning ruby because everybody says ruby makes people happy or something like that...
[01:55:45] powersurge: cakephp is pretty big and bloated, deffo not micro, heh
[01:55:59] powersurge: but yea, the convo is deffo going to be off topic here
[01:56:05] sevenseacat: my advice would also be 'if you're here trying to learn just do you can get a job, leave now'
[01:56:19] powersurge: there are general web channesl like #web, #webdevs, #webtech that will help you pick a language and give advice to get better at it
[01:56:38] powersurge: well he may find out he likes it sevenseacat
[01:56:50] gambl0re: those are zombie channels. dead.
[01:56:59] powersurge: #web deffo isn't dead
[01:57:01] sevenseacat: if he liked it, he would have been interested to try it without the pressure of OMG NEED JOB
[01:57:14] powersurge: and I idle in #webtech a lot, we're mostly active during the weekdays though
[01:57:46] powersurge: #web currently has 367 users in it
[01:57:47] segfalt: has joined #ruby
[01:57:55] powersurge: not sure what you'd define as 'lively' if that's dead :>
[01:58:27] sevenseacat: but thats my opinion. i could rhapsodize for days about that kind of stuff. maybe i should write a blog post about ot.
[01:59:02] powersurge: imo I think passion being a requirement for developing is a little oversold. especially the github as a resume bit that's making the rounds
[01:59:32] powersurge: that one in particular implies that you have to work for free on your own time to get a job if your existing job isn't open source friendly
[01:59:52] sevenseacat: we're talking about web development, not sit-in-an-office-and-play-with-ten-year-old-java
[01:59:59] powersurge: but ya I do think you have to like it at least a little, heh
[02:00:10] sevenseacat: that can be done by zombies
[02:00:17] powersurge: if you just clock in for your 8hrs then ultimately you'll be left behind
[02:00:30] JoshGlzBrk: has joined #ruby
[02:00:31] powersurge: doing whatever the equivalent of COBOL is 5 yrs from now
[02:00:35] Musashi007: has joined #ruby
[02:00:45] xcesariox: has joined #ruby
[02:01:09] sevenseacat: web development is a fast moving field - if you dont have a keen interest (and sometimes even if you do) you'll be left behind
[02:03:40] that1guy: has joined #ruby
[02:04:18] nso95: has joined #ruby
[02:05:27] shevy: java zombies
[02:05:49] sevenseacat: import javax.zombie.braaaaaaains;
[02:05:50] MatthewsFace: has joined #ruby
[02:06:09] wildroman2: has joined #ruby
[02:06:18] ebonics: are you trying to say java is oldmeta
[02:06:37] sevenseacat: no idea what 'oldmeta' means so
[02:07:48] ebonics: it's a term applied to games when certain characters or strategies get phased out of the "meta" in favour of new ones
[02:08:18] sevenseacat: and what is 'the meta'?
[02:08:21] Hijiri: has joined #ruby
[02:08:39] sevenseacat: I'd consider myself a gamer and I still have no idea what you're talking about.
[02:08:41] ebonics: http://en.wikipedia.org/wiki/Metagaming
[02:08:41] powersurge: meta is a greek word. I forget exactly what it means but metagame essentially means 'the game within the game'
[02:09:03] powersurge: so, like, (opening myself up here) in competitive pokemon only the top 20-30 pokemon are *truly* viable
[02:09:10] shevy: COMPETITIVE POKEMON
[02:09:12] powersurge: that's the OU meta because you can only really play with those pokes
[02:09:18] zreisman: has joined #ruby
[02:09:26] powersurge: it's the game-within-the-game because there's a de facto restricted ruleset
[02:09:33] sevenseacat: yep now i get it
[02:09:36] shevy: yeah yeah - some things are overpowered, others underpowered
[02:09:38] sevenseacat: viable builds, etc.
[02:09:51] ebonics: you not knowing what oldmeta is is sort of old meta
[02:09:54] ebonics: #justsaying
[02:10:16] powersurge: competitive pokemon is p. boss btw
[02:10:20] powersurge: highly recommend it
[02:10:29] powersurge: come at me bro
[02:10:48] shevy: competitive
[02:10:49] powersurge: I'm actually a little rusty, I haven't adapted well to the ORAS games coming out and I've been really sucked into monster hunter lately
[02:10:53] powersurge: not sure what the off topic rules are here
[02:11:04] powersurge: you'd be surprised shevy
[02:11:17] powersurge: it's a very deep and compelling game when you get into the nitty gritty details
[02:11:17] sevenseacat: powersurge: if there's no active ruby discussion, then anything is fair game imo.
[02:11:28] shevy: powersurge can't be too off-topic, we spoke about zombies a minute before
[02:11:41] powersurge: yea, I figured late night so it'd be cool
[02:11:43] sevenseacat: as long as discussions dont stop people from discussing programming or getting help.
[02:11:44] powersurge: more relaxed late at night
[02:11:45] ebonics: anyone know shit about posix
[02:11:56] powersurge: I know... enough, I guess
[02:12:03] ebonics: liek why the usb i just formatted is read only and after i chmod it it goes back to readonly
[02:12:23] powersurge: mm, beyond me, heh
[02:12:26] shevy: posix was written by RMS and others right
[02:12:37] kobain: has joined #ruby
[02:13:40] ebonics: this is scurry
[02:13:46] miah: my guess is udev
[02:13:52] ebonics: i'm backing up stuff and this usb is trolling me
[02:14:07] shevy: ebonics I felt like that a minute ago too
[02:14:26] ebonics: i got the file on it
[02:14:28] shevy: mplayer would not play audio on the commandline; videos in firefox worked fine, audio. I suspected my old nemesis, pulseaudio & alsa
[02:14:30] ebonics: through.. methods
[02:14:38] ebonics: now when i try to eject it it says its busy
[02:14:40] ebonics: like m8 u wot
[02:15:10] ebonics: lol pulseaudio D:
[02:15:21] freerobby: has joined #ruby
[02:15:46] shevy: well I just got all fixed
[02:15:47] ebonics: it's cause i had gparted open
[02:15:52] shevy: and I kicked pulseaudio out too
[02:16:25] havenwood: has joined #ruby
[02:16:34] powersurge: shevy: competitive pokemon, yo http://replay.pokemonshowdown.com/ou-168507628
[02:16:48] ebonics: i think it's funny when people say you corrupt the filesystem on usbs permanently
[02:16:52] ebonics: if you pull them out
[02:17:01] ebonics: like they never thought to use gparted on it
[02:17:17] growlove: has joined #ruby
[02:17:26] shevy: I had some bad luck lately
[02:17:29] shevy: with USB hdds
[02:17:38] ebonics: it does feel like luck sometimes
[02:17:44] shevy: since then I try to be a well-behaving person; always properly umount before unplugging
[02:18:08] shevy: I had like 3 of my external hdds die in the last ~14 months or so :(
[02:18:41] ebonics: im actually terrified of using usbs for backups
[02:18:41] kinduff: I want to scrap out all those pokemon gifs
[02:18:45] Yzguy: has joined #ruby
[02:18:53] powersurge: they've been dumped
[02:18:56] powersurge: ...somewhere, heh
[02:18:57] ebonics: ihave to like take it out, mount it again, check its not corrupt, then keep doing it
[02:19:04] kinduff: they're pretty cool
[02:19:04] powersurge: the pokemon showdown code is open source nodejs
[02:19:05] ebonics: because each time i do it im scared i corrupted i
[02:19:12] powersurge: if nothing else I'm sure you can find them there
[02:19:14] shevy: ebonics dunno. they make weird sounds when I try to connect them, and dmesg is full of some corrupted file descriptor bla; one does not even power on at all anymore
[02:19:34] powersurge: if you think that's cool check out this graph I made in pandas kinduff http://i.imgur.com/EQY6nCQ.png
[02:19:55] ebonics: how is it legal to make pokemon games?
[02:20:05] ebonics: dont those games get taken down or anything
[02:20:11] powersurge: I took the data from veekun's open source dump of the pkmn data and graphed the type distribution of pokemon subdivided by the generation that it was introduced in
[02:20:13] powersurge: it only simulates the battles ebonics
[02:20:21] powersurge: since they don't make any money it's considered fair use
[02:20:33] ebonics: i wonder if you could just like
[02:20:39] powersurge: if they built out the whole game it'd be shutdown but as it is it's just the battle mechanics
[02:20:42] ebonics: make one that's 100% p2p
[02:20:52] powersurge: that's what pokemon showdown is, really
[02:20:54] starless: has joined #ruby
[02:21:01] powersurge: you put your pokemon in, set their ivs/evs/movesets and play online
[02:21:03] kinduff: powersurge very very nice
[02:21:06] ebonics: are there any games that do that?
[02:21:08] irobevjodu: has joined #ruby
[02:21:15] ebonics: like bitcoin protocol meets gaming
[02:21:20] ebonics: or would it be too slow
[02:21:57] kinduff: bitcoin protocol?
[02:22:02] kinduff: bitcoin://
[02:22:24] ebonics: what protocol does bitcoin use
[02:22:34] powersurge: oh, I misread what you said
[02:22:39] powersurge: you said p2p but I read pvp
[02:22:50] ebonics: http://en.wikipedia.org/wiki/Bitcoin_network
[02:22:56] ebonics: yeah nvm i knew one of us was the idiot
[02:23:00] ebonics: not me tho
[02:23:46] jpfuentes2: has joined #ruby
[02:23:57] kinduff: ebonics protocol != network
[02:24:34] ebonics: semantics and shit
[02:24:37] ebonics: http://www.michaelnielsen.org/ddi/how-the-bitcoin-protocol-actually-works/
[02:24:45] ebonics: http://enetium.com/resources/Bitcoin.pdf
[02:24:54] ebonics: http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html
[02:24:58] kinduff: r u even reading m8
[02:25:39] ebonics: kinduff, how do you think bitcoin works?
[02:25:42] ebonics: does it use smtp?
[02:25:50] ebonics: or does it use a custom protocol?
[02:26:54] xcesariox: has joined #ruby
[02:26:56] kinduff: what are you trying to archive, ebonics
[02:27:09] ebonics: just random backup stuff
[02:27:13] ebonics: im formatting in a minute
[02:27:26] shevy: countdown started
[02:27:43] ebonics: upgrading dat ubuntu
[02:27:49] ebonics: going bleeding edge m8
[02:28:23] maknz: has joined #ruby
[02:28:29] fabrice31: has joined #ruby
[02:29:22] iwishiwerearobot: has joined #ruby
[02:29:22] konsolebox: has joined #ruby
[02:29:22] havenwood: ebonics: https://www.brightbox.com/docs/ruby/ubuntu/
[02:29:53] ebonics: havenwood, i went on a rant earlier about building my own rubiess
[02:29:58] ebonics: i would be a hypocrite
[02:30:15] mrmargolis: has joined #ruby
[02:30:21] darkf: has joined #ruby
[02:30:26] havenwood: ebonics: build away!
[02:30:38] ebonics: havenwood, i have problemsss with mruby
[02:30:42] ebonics: im gonna use v8 instead
[02:30:58] havenwood: ebonics: how are those binary options?
[02:31:03] ebonics: someone should work on that damn regex library
[02:31:10] havenwood: ebonics: use stable versions
[02:31:49] ebonics: havenwood, i compiled the pcre plugin into it. it passed tests
[02:32:04] ebonics: then i run it and any ruby code that uses regex just segfault
[02:32:08] ebonics: with no error messages
[02:32:22] havenwood: ebonics: with mruby-1.1.0?
[02:32:24] ebonics: i spent like a few hours on it too, its hopeless
[02:32:28] ebonics: no the new package
[02:32:41] havenwood: ebonics: the not stable bleeding edge master?
[02:33:26] Oog: has joined #ruby
[02:33:32] ebonics: havenwood, i only tried using the nightlies because there's some issue with go-mruby with the pcre plugin. it's probably my fault but i followed the build instructions and it didnt work out of the box
[02:33:37] ebonics: so i just rm -rf'd and tried with the nightlies
[02:34:11] havenwood: ebonics: mm
[02:34:35] willharrison: has joined #ruby
[02:34:46] saadq: has joined #ruby
[02:34:47] maknz: I have a question about modules and namespacing. Consider https://gist.github.com/maknz/1d3c80d1b05b5316b075 -- where B is extending, is there a way to specify that class 'relatively' and cleaner, rather than having to repeat the parent module name? Note the 2nd level Bar module and the 3rd level Bar module under Baz, which makes Bar ambiguous
[02:36:52] willharrison: has joined #ruby
[02:37:02] ebonics: at first glance and my armchair beginner ruby opinion, that looks like bad design
[02:37:14] ebonics: but i'm actually a shitter so take it with a grain of salt
[02:37:36] iamdoo2: has joined #ruby
[02:38:07] maknz: I want to re-use the bar name, so it's something like SomeNamespace::Errors, and SomeNamespace::SomethingElse::Errors -- which is elegant I feel, but maybe it's not how ruby namespacing was intended
[02:38:30] ebonics: i was ranting about how garbo ruby namespaces are before, so yeah
[02:38:52] Joufflu: has joined #ruby
[02:39:21] Aswebb_: has joined #ruby
[02:39:30] ebonics: maknz, i feel like defining ::Errors isnt clean though
[02:39:34] ebonics: in each namespace
[02:39:40] ebonics: that's hardly code reuse
[02:39:57] bronson: has joined #ruby
[02:40:12] ebonics: SomeNamespace::SomeNamespaceError
[02:40:22] maknz: Something::Errors would be general errors across the library, Something::Bar::Errors would be specific errors for stuff inside Bar.
[02:40:28] ebonics: SomeNamespaceError < GenericError
[02:40:59] maknz: Repeats the class name though :(
[02:41:20] ebonics: like my MRuby namespace would have
[02:41:28] ebonics: MRuby::SegfaultError
[02:41:52] alvaro_o: has joined #ruby
[02:42:04] ebonics: and my PCRE namespace would have MRuby::PCRE::DoesntWorkError
[02:42:04] maknz: right sure.. keep the errors just flat like the classes
[02:42:26] maknz: I kinda liked being able to put them in a module to group them
[02:42:30] lessless: has joined #ruby
[02:42:38] ebonics: that's not modular
[02:42:47] ebonics: why couple them if you don't have to
[02:43:01] shevy: one namespace to rule them all
[02:43:02] maknz: Not sure I see the coupling?
[02:43:11] shevy: and in ebonics' cellar, bind them and spank them
[02:43:51] ebonics: maknz, it's not that they're strictly coupled through dependency
[02:43:58] ebonics: but they're coupled by having to share the same namespace
[02:44:03] shevy: is there a difference between java namespaces and ruby namespaces?
[02:44:22] ebonics: java doesn't have namespaces per se
[02:44:38] ebonics: and encapsulation/privatization is incredibly idiomatic in java
[02:44:56] ebonics: so it doesn't need them
[02:45:19] ebonics: honestly i have no idea why people hate on java, it's an awesome language
[02:45:21] ebonics: verbose, but awesome
[02:45:30] powersurge: the verbosity is the biggest reason
[02:45:35] powersurge: and the ecosystem kind of sucks imo
[02:45:37] ebonics: use scala then
[02:45:40] powersurge: although new java is better than old java
[02:45:43] powersurge: I intend to, friend :>
[02:45:48] ebonics: what ecosystem
[02:45:48] maknz: I would have thought Foo::Errors and Foo::Bar::Errors woudn't be any different than Foo::Errors and Foo::Bar::NotErrrors? I'm a bit :S on Ruby's modules though
[02:46:01] powersurge: stuff like struts and hibernate and all that crap
[02:46:11] powersurge: newere java like play and dropwizard looks much more reasonable though
[02:46:14] ebonics: that stuff is only for EE
[02:46:21] ebonics: any EE stuff is bound to be stale
[02:46:27] powersurge: I hear good things about springboot too but I haven't tried it first hand
[02:46:56] powersurge: a big problem with java is it grew up side by side with xml and there's a load of cross polination
[02:47:07] ebonics: i don't see how
[02:47:13] ebonics: unless you mean ant
[02:47:16] shevy: maknz you scope twice via :: there so they shouldn't be in the same namespace
[02:47:20] ebonics: people don't use ant anymore though
[02:47:29] powersurge: ant, the application server standard with java... the name escapes me
[02:47:32] shevy: module Foo; module Errors versus module Foo; module Bar; module Errors
[02:47:42] powersurge: the stuff that jboss & tomcat and stuff use
[02:48:01] powersurge: servlets I think
[02:48:09] powersurge: the web.xml and all that junk
[02:48:13] ebonics: are you sure it's not tomcat
[02:48:15] powersurge: and even maven has a pom.xml
[02:48:24] ebonics: people mostly use gradle now
[02:48:38] powersurge: pretty hard to say something like that in java imo
[02:48:41] powersurge: change is slow to trickle down
[02:48:46] powersurge: most *new* java uses gradle, sure
[02:48:47] maknz: but the more-deeply-nested Errors shouldn't have any relation to the higher Errors, I would have thought? Or does the fact they're named the same, regardless of nesting, relate them somehow?
[02:48:56] ebonics: even jdk uses gradle
[02:49:06] ebonics: spring uses gradle
[02:49:20] powersurge: my experience is at least a year out of date
[02:49:27] shuber_: has joined #ruby
[02:49:29] powersurge: so it's entirely possible that the java I was looking forward to then is standard now
[02:49:38] powersurge: the java ecosystem I was looking forward to*
[02:49:46] ebonics: it still has some work to go to "modernize" it, but it's sort of the nice thing about java
[02:49:56] ebonics: iin that you know you're not super far behind when you have to use it again
[02:50:03] ebonics: and all your old stuff is going to run the same
[02:50:08] powersurge: yea, that's a big selling point for java
[02:50:13] powersurge: which is why companies build so much on it
[02:50:13] ebonics: they have strict policies on backwards compatibility
[02:50:17] powersurge: btu it's a double edged sword imo
[02:50:23] powersurge: the language accumulates cruft
[02:50:32] nettoweb: has joined #ruby
[02:50:34] ebonics: i don't really agree
[02:50:58] ebonics: that's just a popular opinion that i think is baseless
[02:51:03] bronson: has joined #ruby
[02:51:33] shevy: I always have to download something from oracle
[02:51:54] powersurge: I'm obv out of my depth because it's been a while since I've done java dev for work
[02:52:03] shevy: either it is the jre or it is that jdk
[02:52:20] ebonics: you can get openjdk and openjre
[02:52:20] powersurge: but my experience in java was pretty painful due to the libs we were using
[02:52:40] powersurge: I had to use a soap client, for instance, and it required dumping a whole 50-ish megabytes of generated code
[02:52:42] ebonics: java reminds me of like, centos of programming haha
[02:52:47] ebonics: just super duper solid
[02:52:48] powersurge: which I had to modify to support credentials and junk
[02:52:48] shevy: isn't that PHP
[02:52:53] powersurge: left a horrible taste in my mouth
[02:53:09] powersurge: I'd say enterprise PHP has a lot in common with java dev, tbh
[02:53:26] ebonics: i didn't know enterprise php existed
[02:53:30] powersurge: the devs at work who do PHP every day tell me that symfony2 is pretty much a PHP port of... struts, I believe
[02:53:42] ebonics: oh right, symfony
[02:53:54] ebonics: i prefer laravel
[02:53:55] powersurge: spring I meant to say
[02:54:16] Dakuan: has joined #ruby
[02:54:17] powersurge: I don't really get enterprise php tbh
[02:54:27] powersurge: it feels a lot like java so why not just make the leap and reap the advantages of the jvm
[02:54:35] jokester: has joined #ruby
[02:54:47] ebonics: i think the benefit of php is that it's a lot easier to find developers
[02:54:53] powersurge: you're emulating everything except the static typing and the speed which are the biggest things that matter
[02:54:54] ebonics: and also it's faster to code with
[02:55:01] ebonics: but i think php in general is far inferior to java
[02:55:17] powersurge: it's easy to get scrubs & hacks in php sure
[02:55:29] powersurge: but I'm sure there are more professional java programmers than php programmers
[02:55:43] ebonics: java is highly idiomatic
[02:55:48] ebonics: java was my first language and i'm glad it was
[02:56:05] powersurge: I'm going to be revisiting java soon
[02:56:12] powersurge: planning on conquering android in the next year :>
[02:56:20] ebonics: you'd be better off with c++
[02:56:24] powersurge: I just recently switched to RoR
[02:56:32] powersurge: ndk is second class afaik
[02:56:39] ebonics: but portable
[02:56:46] ebonics: write for ndk and it ships to ios easily
[02:56:49] JoshGlzBrk: has joined #ruby
[02:56:53] powersurge: I'm not too concerned with that
[02:57:03] powersurge: I find taking shortcuts like that don't pay large enough dividends
[02:57:05] shevy: <ebonics> honestly i have no idea why people hate on java, it's an awesome language
[02:57:09] shevy: <ebonics> you'd be better off with c++
[02:57:19] shevy: ACTION ponders ...
[02:57:25] ebonics: better off with c++ for mobile dev
[02:57:38] ebonics: because it's cross platform whereas ios doesnt officially support java
[02:57:43] dopie: has joined #ruby
[02:57:56] ebonics: just apple things
[02:57:59] Akagi201_: has joined #ruby
[02:58:27] powersurge: does apple officially support c++?
[02:58:37] powersurge: and in addition to that, you'd have to rewrite all the ui layers anyhow
[02:58:44] ebonics: that isnt a valid questio
[02:58:54] ebonics: c++ compiles to machine codee
[02:59:29] powersurge: sure it's valid. you have to be able to touch the ui apis in either platform
[02:59:32] ebonics: usually how it's done is you write the entire engine in c++, as much as possible
[02:59:41] ebonics: then you write glue code for every platform you want to target
[02:59:43] powersurge: if you're writing something totally custom and forgo the ui altogether, I could see your point
[02:59:54] powersurge: but that only really seems beneficial in something like a game perhaps
[02:59:59] ebonics: the glue code being obj c for ios
[03:00:00] powersurge: not really useful in business applications, imo
[03:00:04] ebonics: and java for 4ndr01d
[03:00:15] ebonics: super useful for business applications
[03:00:29] ebonics: target all the things!
[03:00:35] ebonics: okay i need to format
[03:00:58] powersurge: I just fundamentally disagree with all that, heh
[03:02:53] shevy: ebonics already was using like 4 languages
[03:02:59] shevy: <ebonics> the glue code being obj c for ios
[03:03:04] shevy: so now he was at... java, C++ and obj c
[03:03:24] jpfuentes2: has joined #ruby
[03:03:56] jpfuentes2: has joined #ruby
[03:06:30] Akagi201: has joined #ruby
[03:08:06] nettoweb: has joined #ruby
[03:08:21] tubuliferous: has joined #ruby
[03:09:23] _seanc_: has joined #ruby
[03:10:56] braincrash: has joined #ruby
[03:11:12] bruno-: has joined #ruby
[03:14:45] crdpink: has joined #ruby
[03:18:35] polyrob: has joined #ruby
[03:18:38] polyrob: has joined #ruby
[03:20:09] pusewicz: has joined #ruby
[03:20:11] harleypig: has joined #ruby
[03:20:41] adambeynon: has joined #ruby
[03:22:34] hellschreiber: has joined #ruby
[03:24:59] michael_mbp: has joined #ruby
[03:25:41] raphagodoi: has joined #ruby
[03:30:55] dfockler: has joined #ruby
[03:32:05] lessless: has joined #ruby
[03:35:40] lidenskap: has joined #ruby
[03:38:40] towski_: has joined #ruby
[03:38:45] jarray52: has joined #ruby
[03:40:31] gmas: has joined #ruby
[03:42:43] juanpaucar: has joined #ruby
[03:47:23] Joufflu_: has joined #ruby
[03:48:20] crdpink2: has joined #ruby
[03:48:53] zreisman_: has joined #ruby
[03:50:56] shuber_: has joined #ruby
[03:51:56] bronson: has joined #ruby
[03:53:08] _seanc_: has joined #ruby
[03:54:21] scooby1961: has joined #ruby
[03:55:00] Dakuan: has joined #ruby
[03:55:43] saadq: has joined #ruby
[03:58:38] Parker0: has joined #ruby
[04:02:41] wallerdev: has joined #ruby
[04:06:47] swgillespie: has joined #ruby
[04:08:59] ebonics: has joined #ruby
[04:09:23] ebonics: i broke the shit out of unity
[04:09:27] ebonics: not even mad
[04:11:59] djbkd: has joined #ruby
[04:14:06] lidenskap: has joined #ruby
[04:15:35] Deele: has joined #ruby
[04:16:41] multiscan: has joined #ruby
[04:16:57] ebonics: has joined #ruby
[04:17:19] fabrice31: has joined #ruby
[04:17:21] ebonics: has joined #ruby
[04:17:36] krz: has joined #ruby
[04:17:47] xxneolithicxx: anyone know if any gems that install cli bin tools? i need to compare my gem to another that includes bin's to figure out why its not adding my gem's bin files into the ruby's bin dir like it does for nokogiri
[04:18:11] iwishiwerearobot: has joined #ruby
[04:20:02] charliesome: has joined #ruby
[04:21:10] mary5030: has joined #ruby
[04:22:57] A205B064: has joined #ruby
[04:23:01] baweaver: has joined #ruby
[04:23:20] mary5030: has joined #ruby
[04:24:17] freggles: has joined #ruby
[04:25:36] lidenskap: has joined #ruby
[04:26:22] Oog: has joined #ruby
[04:27:49] Aswebb_: has joined #ruby
[04:28:03] bronson: has joined #ruby
[04:30:50] MasterPiece``: has joined #ruby
[04:31:00] lidenskap: has joined #ruby
[04:36:44] ramfjord: has joined #ruby
[04:41:03] MasterPiece``: has joined #ruby
[04:43:33] jpfuentes2: has joined #ruby
[04:46:03] Vert-: has joined #ruby
[04:46:20] Joufflu: has joined #ruby
[04:46:44] sevenseacat: Vert-: we're not all guys here.
[04:46:45] Vert-: I'm having the weirdest glitch - when I cast "blablabla \n blablabla", the output literally said "blablabla \n blablabla"
[04:47:00] Vert-: IT does not interpret it and give me a newline
[04:47:13] sevenseacat: because you wrapped your string in single quotes, not double.
[04:47:20] Vert-: Nope, using double quotes
[04:48:33] Vert-: Just a sec, for some reason I can't copy it into memory
[04:49:35] codecop: has joined #ruby
[04:49:38] ndrei: has joined #ruby
[04:51:21] Vert-: http://pastebin.com/KcsbDmim
[04:51:22] ruboto: Vert-, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/319eff53f4ff9003788d
[04:51:22] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[04:51:41] Vert-: The offending line is the string being returned.
[04:51:43] sevenseacat: and what does it return?
[04:51:59] shuber_: has joined #ruby
[04:52:36] sevenseacat: and where/how does it output wrongly?
[04:52:51] Radar: steps to reproduce plzkthx
[04:53:11] Vert-: If gives me -> "found 31925 bits set to 1\nfound 31715 bits set to 0"
[04:53:20] Vert-: When I call this function
[04:53:54] sevenseacat: so you're not actually printing the string
[04:53:55] al2o3-cr: Vert-: return doesn't interpret new lines
[04:54:16] Vert-: Any other way to wedge a newline into the string without interpreting it then?
[04:54:38] Vert-: I really kinda want to put a newline in the string
[04:54:53] Vert-: Cause the method is going to paste a "nil" in the console afterwards
[04:55:10] sevenseacat: did you try putting a newline in the string, not a \n char
[04:55:14] Vert-: Instead I'd rather the output value be the.. output value
[04:55:37] Vert-: You mean like actually hitting enter in the middle of the string?
[04:55:59] Dakuan: has joined #ruby
[04:56:03] Aeyrix: sevenseacat: Would a heredoc work?
[04:56:05] Vert-: Didn't seem like the ideal solution
[04:56:12] sevenseacat: ACTION shrugs
[04:56:14] Vert-: Surely there must be a way to reference a newline character?
[04:56:19] sevenseacat: you've been given two solutions
[04:56:32] jpfuentes2: has joined #ruby
[04:56:44] Aeyrix: Wait why don't you just print it out?
[04:56:53] Aeyrix: I'd venture that's *the* solution.
[04:57:01] last_staff: has joined #ruby
[04:57:10] tubuliferous: has joined #ruby
[04:57:14] Vert-: Aeyrix, any way to avoid the return value printing nil in the console if I do that though?
[04:57:18] Ox0dea: has joined #ruby
[04:57:20] Vert-: Cause I was doing this at first
[04:57:32] Aeyrix: You could stop running it through the interactive ruby interpreter and run it as an actual script?
[04:57:46] Vert-: Not part of the parameters of this exercise
[04:57:52] Vert-: It /has/ to run through IRB
[04:57:59] Aeyrix: Absolutelydisgusting.gif
[04:58:10] Vert-: So I'm trying to get the output to match up to the request.
[04:58:16] Aeyrix: Try p then return '', perhaps.
[04:58:43] Vert-: I'm not quite following.
[04:58:54] Timba-as: has joined #ruby
[04:58:57] Vert-: You figure there might be a way to interpret the \n /before/ inserting it though?
[04:59:00] Ox0dea: Vert-: Presumably the bit twiddling you're doing is also required by the exercise?
[04:59:00] Aeyrix: Line 23, change 'return' to literal 'p'
[04:59:04] Vert-: #{"\n"} for example?
[04:59:05] _seanc_: has joined #ruby
[04:59:12] Aeyrix: Line 24, add "return ''".
[04:59:22] Aeyrix: Would theoretically remove 'nil', but I could just be making shit up.
[04:59:23] Vert-: I get you now
[04:59:32] Vert-: Let me try it out, thanks though
[05:00:16] Musashi007: has joined #ruby
[05:00:19] ndrei: has joined #ruby
[05:00:53] workmad3: has joined #ruby
[05:00:58] Vert-: Well IRB does print it properly now, but returns the following after the output | => ""
[05:01:03] Vert-: But fuck it.
[05:01:08] Vert-: They can deal with it
[05:01:08] xcesariox: has joined #ruby
[05:02:24] Vert-: I've sunk enough time into the second request to do a test for a gig I'm feeling meh about.
[05:03:18] sevenseacat: this was for a job application? cool.
[05:04:06] Vert-: Yeah, they wanted this and what amounts to a prototyped simplistic banking application
[05:04:29] Oog: has joined #ruby
[05:05:19] Vert-: I actually did this two years ago when this agent referred them to me and made them lots of crazy promises while I had zero interest.
[05:05:40] Vert-: I decided to save his ass but he turned out to be a complete idiot, go figure right?
[05:06:01] ndrei: has joined #ruby
[05:06:02] Vert-: Now it turned out 2 years later the position was still open and they were willing to concede to a freelance consultant
[05:06:44] sevenseacat: Vert-: would you like a bigger shovel?
[05:07:00] sevenseacat: to either keep shovelling shit or dig yourself a bigger hole
[05:07:24] sevenseacat: not fussed which. both are kind of entertaining.
[05:07:45] Vert-: I'm doing either one?
[05:07:53] Aeyrix: ACTION has no idea what's going on.
[05:08:53] Ox0dea: Vert-: I suspect sevenseacat finds the quality of your Ruby code at odds with your having landed a Ruby "gig".
[05:09:24] sevenseacat: I just dont think it's wise to enter a channel full of people you don't know, to start slandering a potential employer
[05:10:07] Vert-: I don't care.
[05:10:10] Aeyrix: Wouldn't it be libel, given that IRC is a textual medium?
[05:10:20] Vert-: The agent I'm referring to didn't last much longer than 6 months.
[05:10:22] sevenseacat: Aeyrix: I'm not sure.
[05:10:23] Vert-: He works in finance now
[05:11:06] Aeyrix: Vert-: To answer your question, you could patch the interpreter.
[05:11:14] Aeyrix: Best way and would probably get you marks for creativity.
[05:11:24] lkba: has joined #ruby
[05:13:01] Ox0dea: ACTION is considering submitting a patch to add Numeric#[](Range).
[05:13:34] Vert-: I gotta bail guys, thanks for the assist.
[05:13:48] sevenseacat: Vert-: good luck.
[05:14:59] rrichardsr3: has joined #ruby
[05:16:44] ndrei: has joined #ruby
[05:18:46] pontiki: time for bed
[05:19:04] baweaver: ACTION reads up
[05:19:07] baweaver: ACTION sighs
[05:19:21] baweaver: ACTION makes program into a one liner for amusement
[05:19:47] creakybones: has joined #ruby
[05:19:47] creakybones: has joined #ruby
[05:20:45] tagrudev: has joined #ruby
[05:21:02] Ox0dea: baweaver: Shall we golf?
[05:21:32] sevenseacat: i didnt actually read the code too closely.
[05:21:33] baweaver: leave it in the comments section of aforementioned gist? :D
[05:21:50] sevenseacat: I'm really confused about the first file-reading part though
[05:21:55] arietis: has joined #ruby
[05:22:06] ndrei: has joined #ruby
[05:23:25] ohaibbq: has joined #ruby
[05:23:51] Hanmac1: has joined #ruby
[05:25:52] towski_: has joined #ruby
[05:26:28] baweaver: Ox0dea: Do we want to count the string print?
[05:26:53] Ox0dea: baweaver: Nah, just return a "tuple" containing the number of zeroes and ones.
[05:28:10] aganov: has joined #ruby
[05:30:01] baweaver: working on shortening a bit more
[05:31:01] inndy: has joined #ruby
[05:31:16] inndy: has left #ruby: ()
[05:31:28] Ox0dea: baweaver: #to_s doesn't pad.
[05:31:38] juanpaucar: has joined #ruby
[05:31:55] baweaver: how much pad for a char was it again?
[05:32:02] baweaver: I think it was 16, but way rusty there
[05:33:54] jarray52: has left #ruby: ()
[05:34:29] sepp2k: has joined #ruby
[05:34:58] Ox0dea: baweaver: I got 66.
[05:35:02] Ox0dea: It's gross, though.
[05:35:08] baweaver: you'll win this one then
[05:35:13] baweaver: I can't get far below 90
[05:37:28] Ox0dea: `.join.count` feels so verbose here.
[05:38:57] Ox0dea: How'd that happen?
[05:39:01] baweaver: You've probably got this one
[05:39:19] baweaver: ACTION is also not familiar with bit mechanics
[05:39:42] Ox0dea: I've posted mine, if that helps.
[05:40:25] Ox0dea: There are any number of clever bit twiddle approaches, but I highly doubt any of them would be shorter than just using % string formatting.
[05:40:42] Ox0dea: Then again...
[05:41:26] baweaver: ACTION goes hunting for his copy of Hacker's Delight
[05:42:09] havenwood: has joined #ruby
[05:42:49] baweaver: I wonder if you can open a file as binary in ruby
[05:42:50] _seanc_: has joined #ruby
[05:43:28] Ox0dea: baweaver: Nah, there's #binread, but that's mostly for subverting the automatic CR/LF conversions.
[05:43:37] baweaver: Worth a shot
[05:44:11] hsps_: has joined #ruby
[05:44:24] simpyll: has joined #ruby
[05:44:34] baweaver: ACTION bows
[05:44:55] Ox0dea: I suppose I'll stop there.
[05:47:05] baweaver: Ox0dea: Lot of time in C, or how does one get into such bit twiddling?
[05:47:58] Ox0dea: My final approach doesn't really twiddle any bits; it does use Numeric#[] to *access* the bits, though.
[05:48:44] Ox0dea: You really can't go wrong reading Hacker's Delight to get better with bitwise arithmetic, but writing C now and again certainly doesn't hurt either.
[05:49:06] baweaver: DevOps by trade, so I rarely touch lower level
[05:49:15] baweaver: Though I do like hacking about a bit from time to time
[05:50:28] Ox0dea: To be sure, working at the higher levels is generally more enjoyable, but I can't help heeding the "call of the void" now and again.
[05:50:57] baweaver: Last time I heeded it I ended up learning Haskell
[05:51:23] Ox0dea: That is quite a ways from low-level, I should think.
[05:51:29] Ox0dea: But I believe I took your point nonetheless.
[05:51:50] baweaver: Yeah, functional programming is about as far from low level as you can get
[05:52:11] Ox0dea: And yet it's all the lambda calculus at the bottom.
[05:52:37] Ox0dea: There's a strange circularity there.
[05:52:43] baweaver: Granted, but most of the point of it was focus on the problem instead of the machine
[05:52:57] Ox0dea: Right, declarative programming, in essence.
[05:53:01] Ox0dea: "What, now how."
[05:53:21] baweaver: Logic programming is a bit of a trip too
[05:53:42] Ox0dea: I've still not been able to convince myself to take that particular plunge.
[05:54:00] baweaver: It's interesting if for no other reasons than finding a new way to think
[05:54:08] baweaver: sevenseacat knows Prolog way better than I do though
[05:54:25] sevenseacat: o.o I haven't looked at prolog in like ten years
[05:54:27] baweaver: (*read: she took a class on it and I didn't)
[05:54:35] sevenseacat: I took *one* class on it
[05:54:37] Aeyrix: Lol fucking prolog
[05:54:43] Ox0dea: sevenseacat: How about Clojure's core.logic?
[05:54:49] Aeyrix: I actually took a class in Prolog too.
[05:54:50] baweaver: ACTION ducks
[05:55:00] sevenseacat: I know nothing about clojure
[05:55:07] sevenseacat: am looking at elixir for shits and giggles
[05:55:14] Aeyrix: The class introduced itself with 2001: A Space Odyssey.
[05:55:31] baweaver: Aeyrix: How can you possibly go wrong from there?
[05:55:42] Aeyrix: baweaver: It didn't. :>
[05:56:05] baweaver: Have you seen that Georgia Tech speech yet?
[05:56:20] baweaver: https://www.youtube.com/watch?v=98nNpzE6gIs
[05:56:44] ScriptGeek1: has joined #ruby
[05:56:46] Aeyrix: @ Work. Will watch at home.
[05:56:51] Dakuan: has joined #ruby
[05:56:52] Aeyrix: Oh wait, no internet...
[05:56:52] ScriptGeek1: has left #ruby: ()
[05:56:58] Aeyrix: I uh, wow that's a bit of a bind.
[05:57:43] baweaver: Aeyrix: depends on your moral compass and if your security expertise expands to wireless
[05:57:53] Aeyrix: I have considered it.
[05:57:56] Aeyrix: And it does. ;)
[05:58:23] baweaver: I have a few 5+ mile antennas
[05:58:25] baweaver: for reasons
[05:58:39] Aeyrix: tbh if I did, you know, do that, I don't even think the people would notice.
[05:58:47] Aeyrix: I am a pretty light internet user. I don't even torrent.
[05:59:04] baweaver: Used to work at a Wireless ISP as the only programmer
[05:59:15] baweaver: got a lot of time to have fun with high powered antennas and automation
[05:59:56] swgillespie: has joined #ruby
[06:00:51] sinkensabe: has joined #ruby
[06:03:12] zotherstupidguy: ACTION morning everyone
[06:05:52] Timba-as: has joined #ruby
[06:06:55] iwishiwerearobot: has joined #ruby
[06:08:13] saadq: has joined #ruby
[06:09:21] scooby1961: has left #ruby: ()
[06:10:20] bruno-: has joined #ruby
[06:10:43] ohaibbq: has joined #ruby
[06:11:40] chinmay_dd: has joined #ruby
[06:11:42] Ox0dea: zotherstupidguy: Unlikely.
[06:13:06] konsolebox: has joined #ruby
[06:15:21] bronson: has joined #ruby
[06:16:54] Aswebb_: has joined #ruby
[06:18:19] arup_r: has joined #ruby
[06:18:35] lxsameer: has joined #ruby
[06:18:39] lxsameer: has joined #ruby
[06:18:59] lidenskap: has joined #ruby
[06:20:14] alphaatom: has joined #ruby
[06:22:31] ex0ns: Hi ! I've an issue with a Weechat script written in Ruby, nobody in #weechat was able to help me so I'll try here (I really have no idea of what it could be). I want to load the Sequel gem into my script, but when I load the script in Weechat I get the following error : "module_eval': cannot load such file -- sequel (LoadError)"
[06:22:33] riotjones: has joined #ruby
[06:22:39] alphaatom: has joined #ruby
[06:23:40] Radar: ex0ns: Try "gem install sequel" first
[06:24:16] ex0ns: Radar: I've done it and my script works when I load it in IRB
[06:24:29] Radar: ex0ns: then I don't know what could be going wrong.
[06:25:44] ex0ns: One strange point is that when I require rubygems
[06:25:49] ex0ns: I have the following error [200~ uninitialized constant Encoding::UTF_7 (NameError)
[06:26:36] Ox0dea: Which versions of Ruby and WeeChat are you using?
[06:27:06] ex0ns: ruby 2.2.0
[06:27:15] ex0ns: Weechat 1.2
[06:27:43] yardenbar: has joined #ruby
[06:27:44] unshadow: has joined #ruby
[06:28:05] Ox0dea: ex0ns: I suspect using an older version of Ruby would magically solve your problem. :/
[06:28:36] ex0ns: I read that on Stackoverflow
[06:29:02] Ox0dea: Did you try it?
[06:29:02] ex0ns: I will try but I would love to understand why
[06:29:38] Ox0dea: It's very likely to do with WeeChat's plugin system mucking about with $LOAD_PATH.
[06:30:16] ScriptGeek: has joined #ruby
[06:32:00] ex0ns: Ok i'm installing ruby 1.9 to see
[06:34:12] rht: has joined #ruby
[06:34:23] ex0ns: Ox0dea: thank you for your help
[06:34:40] ex0ns: if it works I might try to look deeper why it's not working
[06:34:40] Ox0dea: ex0ns: Did downgrading do the trick?
[06:34:55] Ox0dea: Ah, then thanks aren't in order just yet. :P
[06:35:59] arturaz: has joined #ruby
[06:36:16] rickmasta: has joined #ruby
[06:37:18] conanza: has joined #ruby
[06:45:17] fedexo: has joined #ruby
[06:45:58] tubuliferous: has joined #ruby
[06:49:45] roshanavand: has joined #ruby
[06:49:45] yardenbar: Hi, I'm new to ruby so little guidance is needed. I'm trying to use https://github.com/siebertm/parse-cron to determine next cron execution time, can someone help? the example doesn't show how to read the 'crontab -l' content
[06:52:34] Brozo: has joined #ruby
[06:53:55] shuber_: has joined #ruby
[06:55:04] fabrice31: has joined #ruby
[06:55:34] ta: has joined #ruby
[06:56:59] Muhannad: has joined #ruby
[07:00:02] surs: has joined #ruby
[07:01:41] sigurding: has joined #ruby
[07:01:44] iwishiwerearobot: has joined #ruby
[07:02:31] gauke: has joined #ruby
[07:02:32] michael_mbp: has joined #ruby
[07:02:32] surs: has joined #ruby
[07:02:33] doodleha_: has joined #ruby
[07:03:28] zacts: has joined #ruby
[07:03:30] Hounddog: has joined #ruby
[07:03:30] zacts: b haskell
[07:06:33] saadq: has joined #ruby
[07:07:14] Aeyrix: yardenbar: It says in the README that this is not a scheduler. It's not reading crontab -l.
[07:07:31] Aeyrix: It's making a fake crontab with the arguments you give, and then telling you when the next occurrence would be if that was in your crontab.
[07:07:41] yardenbar: I don't need to schedule crons
[07:07:53] yardenbar: I only need to determine the next run
[07:07:56] Aeyrix: My point was it's not reading your crontab at all.
[07:08:03] Aeyrix: It's just parsing the syntax.
[07:08:13] doodleha_: has joined #ruby
[07:08:25] yardenbar: So I'll manually parse the 'crontab -l' time config and pass it to the gem
[07:08:51] Aeyrix: If... if you want.
[07:09:00] msgodf: has joined #ruby
[07:09:06] Aeyrix: Is there any reason you're parsing crontab with Ruby and not just parsing it manually?
[07:09:11] sevenseacat: and people wonder why we drink.
[07:10:58] Ilyes512: has joined #ruby
[07:11:37] asmodlol: has joined #ruby
[07:12:04] doodleha_: has joined #ruby
[07:12:26] edwinvdgraaf: has joined #ruby
[07:12:59] arietis: has joined #ruby
[07:13:09] roshanavand: has joined #ruby
[07:14:04] doodleha_: has joined #ruby
[07:15:51] kwd: has joined #ruby
[07:17:38] dumdedum: has joined #ruby
[07:17:52] prillian5: has joined #ruby
[07:19:13] tejasmanohar: has joined #ruby
[07:19:27] tejasmanohar: im trying to setup an app that just redirects all my traffic on one domain to another
[07:19:39] tejasmanohar: like .io -> .com
[07:19:50] apeiros: use a proxy server
[07:19:51] tejasmanohar: but redirect even the query parameters, url directories, etc.
[07:19:57] tejasmanohar: hm lemme look apeiros
[07:20:00] apeiros: or do a DNS redirect
[07:20:12] ScriptGeek: has joined #ruby
[07:20:21] juanpaucar: has joined #ruby
[07:20:33] tejasmanohar: apeiros: i tried CloudFlare page rules but it seemed to not redirect my ? parameters
[07:21:01] apeiros: I don't know what cloudflare page rules are
[07:21:45] tejasmanohar: rules for URL forwarding in the CloudFlare panel
[07:22:15] sevenseacat: definitely something to do at the server config level, eg. with a server alias if using apache
[07:22:16] Aeyrix: wtf just use a CNAME record.
[07:22:23] sevenseacat: or even higher like that.
[07:23:05] sevenseacat: though having the same content available at two separate URLs is silly in terms of SEO (if you believe in that)
[07:23:10] ramfjord: has joined #ruby
[07:23:44] ta: has joined #ruby
[07:23:57] User458764: has joined #ruby
[07:24:02] MatthewsFace: has joined #ruby
[07:25:08] ScriptGeek: has left #ruby: ()
[07:26:03] stoffus: has joined #ruby
[07:27:13] tejasmanohar: sevenseacat: redirect, not mask... so "same content" won't be available at two URLs i guess
[07:27:29] doodleha_: has joined #ruby
[07:28:00] Aeyrix: tejasmanohar: nginx or?
[07:28:23] Ox0dea: has left #ruby: ("WeeChat 1.2-rc1")
[07:28:53] Aeyrix: server { server_name your.first.address; listen 80 default; rewrite 301 $scheme://your.other.address.com/$uri; }
[07:29:00] Aeyrix: newlines between semicolons though
[07:29:38] tejasmanohar: Let me look. Right now, I'm using Heroku w/ two domains pointed to the 1 app... but now that we bought .com I'm going to move .io to another app to redirect everything to the .com.
[07:29:43] lidenskap: has joined #ruby
[07:29:49] user121212: has joined #ruby
[07:30:19] Hirzu: has joined #ruby
[07:30:39] tesuji: has joined #ruby
[07:30:46] tejasmanohar: Aeyrix: about your comment earlier, i don't think CNAME can do http redirects...?
[07:30:59] tejasmanohar: were you also thinking masking, not redirection?
[07:31:28] user121212: Hello, I have image url and I want save it into the disk, Can I save the file without specifying the file name?
[07:31:33] alex88: has joined #ruby
[07:31:44] Hanmac: has joined #ruby
[07:32:44] tejasmanohar: oh looks like I can just do this instead if i dont have Nginx, Aeyrix https://github.com/kenmickles/heroku-redirect/blob/master/web.js
[07:32:59] tejasmanohar: do you see any downsides to redirection through an app like this vs nginx conf?
[07:33:07] apeiros: user121212: since files always require a filename - no. you must specify a name.
[07:33:11] doodleha_: has joined #ruby
[07:33:19] bronson: has joined #ruby
[07:33:26] Rubie: has joined #ruby
[07:33:38] multiscan: has joined #ruby
[07:34:02] yh__: has joined #ruby
[07:34:11] apeiros: web.js??? I don't even???
[07:34:14] multiscan: has joined #ruby
[07:34:17] kp666: has joined #ruby
[07:34:29] apeiros: sevenseacat: I'll take whatever you took.
[07:34:50] sevenseacat: its actually some server thing, guessing nodejs
[07:35:01] apeiros: from the code, I'd assume so too
[07:35:11] apeiros: but I'd not use node.js for this for the same reason I wouldn't use ruby either.
[07:35:25] sevenseacat: but at least it's not client-side.
[07:35:53] apeiros: yeah, before clicking I actually thought it might be one of those old window.location= thingies
[07:36:09] apeiros: those times???
[07:36:20] sevenseacat: window.location.href = window.location.href.sub('.io', '.com') >_>
[07:37:05] apeiros: replace, no?
[07:37:26] mengu: has joined #ruby
[07:37:30] Juanchito: has joined #ruby
[07:38:00] joonty: has joined #ruby
[07:38:58] doodleha_: has joined #ruby
[07:39:04] livathinos: has joined #ruby
[07:40:32] _blizzy_: has joined #ruby
[07:41:49] fabrice31: has joined #ruby
[07:42:46] doodleha_: has joined #ruby
[07:42:58] Alina-malina: has joined #ruby
[07:43:15] sevenseacat: has joined #ruby
[07:43:33] tejasmanohar: sevenseacat: yeah its node w/ express
[07:43:58] tejasmanohar: apeiros: "but I'd not use node.js for this for the same reason I wouldn't use ruby either." - what is that reason?
[07:44:22] sevenseacat: because it's a server configuration concern
[07:44:26] tejasmanohar: i guess its just overkill for something that could easily be handled withn server config
[07:44:29] sevenseacat: not an application-level concern
[07:44:48] apeiros: tejasmanohar: cannons to shoot sparrows
[07:44:53] tejasmanohar: eh heroku messes up this picture :P - i could setup something on a linux box i guess
[07:45:14] apeiros: I think the english idiom is: use a sledgehammer to crack nuts
[07:46:27] dumdedum: has joined #ruby
[07:46:30] rdark: has joined #ruby
[07:48:59] saadq: has joined #ruby
[07:50:10] anisha: has joined #ruby
[07:50:28] doodleha_: has joined #ruby
[07:51:17] Aeyrix: My sides are currently reporting from planet Venus
[07:52:52] slackbotgz: has joined #ruby
[07:53:54] bakednotfried: has joined #ruby
[07:53:57] Aeyrix: You what?
[07:54:17] doodleha_: has joined #ruby
[07:54:28] al2o3-cr: i've got to many terminals open :(
[07:54:56] al2o3-cr: and i'm skipping back and forth
[07:55:26] shuber_: has joined #ruby
[07:55:44] sevenseacat: yay I made all the code work! ...now I need tofix all the tests
[07:56:14] Aeyrix: That sounds
[07:56:17] Aeyrix: Backwards
[07:56:25] Aeyrix: Aren't you meant to do it the other way?
[07:56:30] apeiros: driven tests design
[07:56:31] tejasmanohar: bdd (but i shouldn't be talking :P )
[07:57:00] sevenseacat: (and by fix i mean delete tests as theyre no longer necessary)
[07:57:37] apeiros: sounds microsoftian
[07:57:55] apeiros: "our tests fail!" - "delete the test and specify the current behavior as intended"
[07:58:05] doodleha_: has joined #ruby
[07:58:13] dain: has joined #ruby
[07:58:37] tejasmanohar: sevenseacat: about your comment from earlier, do you think i should serve all my content on either a www subdomain or apex domain and redirect the other but not both?
[07:58:42] tejasmanohar: (from the SEO perspective)
[07:59:04] sevenseacat: pick one and redirect the other to it.
[07:59:13] Aeyrix: Don't use www
[07:59:30] sevenseacat: I'd lean that way also.
[07:59:30] bruno-: has joined #ruby
[08:00:00] apeiros: Aeyrix: but it means WORLD WIDE WEB! everybody loves the www. how'd you know the url is not about ftp!?
[08:00:12] TheHodge: has joined #ruby
[08:00:19] ta: has joined #ruby
[08:00:29] Aeyrix: I don't even use subdomains for that.
[08:00:34] sevenseacat: must be late in theday, i actually started typing a reply to that.
[08:00:39] Aeyrix: Do you ssh into ssh.domain.com?
[08:00:51] tejasmanohar: sevenseacat: yeah, i don't like the www either
[08:00:52] Aeyrix: Even my IRC network is in the top level.
[08:00:53] apeiros: telnet.domain.com
[08:00:55] apeiros: what's ssh?
[08:00:57] Aeyrix: domain.com
[08:00:58] sevenseacat: even later for Aeyrix who needed the sarcasm tags :P
[08:01:07] Aeyrix: Wait shit
[08:01:10] Aeyrix: You were being sarcadgic
[08:01:21] Aeyrix: ... Sarcastic *
[08:01:24] Aeyrix: Thanks phone.
[08:01:32] Hanmac1: ACTION votes for <sarcasm> tags in HTML6
[08:01:33] chthon: has joined #ruby
[08:01:45] adaedra: ACTION agrees with hanmac1 
[08:01:47] Aeyrix: That's <em>
[08:01:48] tejasmanohar: oh... looks like cloudflare does the trick! http://i.imgur.com/h3bfmnh.png
[08:01:58] saadq: has joined #ruby
[08:02:04] tejasmanohar: ACTION just realizes he wasted time looking at that nodejs redirect server :\
[08:02:23] sevenseacat: tejasmanohar: success.
[08:02:28] adaedra: nodejs for a redirect ?
[08:02:32] apeiros: but you know, I now wonder why the hell I have smtp./mail./pop3./imap./???
[08:02:36] adaedra: nginx does that itself
[08:02:37] Aeyrix: Cloudflare is radical.
[08:02:45] sevenseacat: adeponte: herokuz0r.
[08:02:49] apeiros: I guess I should question my setup once in a while???
[08:02:49] tejasmanohar: adaedra: heroku :\
[08:02:56] Aeyrix: Heroku is lame.
[08:03:02] adaedra: tejasmanohar: ah, ok
[08:03:03] adaedra: sevenseacat: ?
[08:03:15] sevenseacat: i was telling you it was herokuz0r.
[08:03:24] tejasmanohar: adaedra: sevenseacat tagged the wrong person earlier :P
[08:03:26] Aeyrix: Heroku as a service.
[08:03:30] sevenseacat: and i failed and got the wrong name. sorry adeponte.
[08:03:39] adaedra: what's with all the people with nicks beginning with ad
[08:04:03] Aeyrix: Ae represent.
[08:04:05] tejasmanohar: we should ban it.
[08:04:18] sevenseacat: ACTION nods.
[08:04:28] tejasmanohar: No "ae" either...
[08:04:45] tejasmanohar: ^ yeah, that's fine adaedra :P
[08:04:57] tejasmanohar: there goes everyones tab completion
[08:04:59] adaedra: too bad nick rules don't accept that
[08:05:06] tejasmanohar: well, that too :P
[08:05:12] Aeyrix: That's because irc is garbage
[08:05:22] camilasan: has joined #ruby
[08:05:35] Aswebb_: has joined #ruby
[08:05:52] apeiros: Aeyrix: don't you insult garbage. garbage is useful.
[08:06:53] sevenseacat: whats the shortcut for @foo.each { |f| something(f) } again
[08:07:05] sevenseacat: ACTION lazy
[08:07:13] apeiros: @foo.each(&method(:something)) # fugly IMO
[08:08:09] joonty: has joined #ruby
[08:08:18] andikr: has joined #ruby
[08:09:32] tejasmanohar: wheregoes.com is so useful
[08:09:35] doodleha_: has joined #ruby
[08:10:03] tejasmanohar: Aeyrix: i dont wanna turn off browser integrity checks on cloudflare :P
[08:10:21] tejasmanohar: even tho theyre stupid, anyone can get around them using like phantomjs to render js
[08:10:29] apeiros: "It's a unique utility that lets you ??? perform competitive intelligence in a way that wasn't possible before." - say what?
[08:10:48] yh__: has joined #ruby
[08:10:51] tejasmanohar: what are we referring to here?
[08:11:02] apeiros: tejasmanohar: your url, wheregoes.com
[08:11:20] Affix: has joined #ruby
[08:11:24] Aeyrix: That site
[08:11:35] tejasmanohar: apeiros: oh lol, i didn't read the description or any of the text there... i just found the tool and it served me well
[08:11:44] tejasmanohar: "It's a unique utility that lets you troubleshoot links and perform competitive intelligence in a way that wasn't possible before."
[08:11:47] tejasmanohar: competitive intelligence wtf
[08:11:48] apeiros: I guess it's the same as with lyrics
[08:12:07] apeiros: if you enjoy a song, never try to understand the lyrics
[08:12:14] tejasmanohar: "you won't be disappointed"... what is this? an ad?
[08:12:36] Aeyrix: Only $39.99 a month.
[08:12:43] adaedra: apeiros: there are song I enjoy which I also enjoy the lyrics.
[08:12:53] sevenseacat: 90% of song lyrics are just meaningless
[08:12:58] sevenseacat: i sing along to them all anyway
[08:13:05] sevenseacat: sometimes theyre even in english
[08:13:15] edwinvdgraaf: has joined #ruby
[08:13:25] doodleha_: has joined #ruby
[08:13:26] apeiros: adaedra: yeah. it happens. but I think my general experience is like 9 out of 10 songs I stop liking once I actually listen to the lyrics.
[08:13:44] sevenseacat: some songs are downright disturbing when you listen to the lyrics
[08:13:58] adaedra: Lucy in the sky with diamonds ???
[08:14:12] apeiros: yellow submarine???
[08:14:23] sevenseacat: theres one example i have on the tip of my tongue but i cant remember it
[08:15:01] einarj: has joined #ruby
[08:15:03] tejasmanohar: for detecting a mobile browser and displaying a share on email vs a share on SMS link... there's nothing better than user agents, right?
[08:15:06] Guest39165: has joined #ruby
[08:15:07] adaedra: At least you can taste it, sevenseacat
[08:15:14] sevenseacat: tastes like failure.
[08:15:31] adaedra: tejasmanohar: you can also have both links, and hide based on CSS media queries
[08:15:33] michael_mbp: has joined #ruby
[08:15:52] adaedra: but it may be less accurate
[08:15:54] tejasmanohar: adaedra: yeah but i dont like to change _functionality_ based on screen dimensions... only display
[08:16:03] Oog: has joined #ruby
[08:16:32] tejasmanohar: sorry, i'm not really talking about ruby here today am i :P ... but i guess none of us are
[08:16:54] Aeyrix: Nobody needs help right now
[08:17:16] doodleha_: has joined #ruby
[08:17:25] tejasmanohar: if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a
[08:17:26] tejasmanohar: wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1
[08:17:28] tejasmanohar: u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(
[08:17:30] tejasmanohar: g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v
[08:17:32] tejasmanohar: )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm
[08:17:34] tejasmanohar: (al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) isMobile = true;
[08:17:35] sevenseacat: !mute tejasmanohar
[08:17:35] ruboto: +q tejasmanohar!*@*
[08:17:35] ruboto: -o ruboto
[08:17:51] ytti: god hates regexp
[08:17:58] ytti: is how i picket conferences
[08:18:27] sevenseacat: !unmute tejasmanohar
[08:18:35] tejasmanohar: has joined #ruby
[08:18:39] ruboto: -q tejasmanohar!*@*
[08:18:39] ruboto: -o ruboto
[08:18:46] tejasmanohar: sorry about that.
[08:18:52] adaedra: ruboto seems to take its time sometimes.
[08:19:04] Aeyrix: Looks like tejasmanohar needs help.
[08:19:15] Aeyrix: But not of the ruby kind.
[08:19:20] adaedra: tejasmanohar: gist
[08:19:21] tejasmanohar: did __not__ mean to paste that in IRC. yeah Aeyrix different kinda help, sleep
[08:19:43] tejasmanohar: adaedra: i didn't even mean to show it to IRC in general :P - that was for the next workspace ugh
[08:20:05] adaedra: Go to sleep :)
[08:20:22] tejasmanohar: anyhow (/iPhone|iPod|iPad|Android|BlackBerry/).test(navigator.userAgent) is prob enough :P
[08:20:35] adaedra: BlackBerry still exists?
[08:20:41] tejasmanohar: yeah cut that one too
[08:20:44] Dakuan: has joined #ruby
[08:21:06] doodleha_: has joined #ruby
[08:21:48] tejasmanohar: also saw request.user_agent =~ /Mobile|webOS/ around the web but not sure how much that covers O.o
[08:22:18] adaedra: Well, then begins the loong path of finding all devices and test :/
[08:23:15] tejasmanohar: adaedra: or just going with the big regex :P
[08:23:35] adaedra: wouldn't big regex also means reduced performance?
[08:24:06] Igorshp: has joined #ruby
[08:24:16] yeticry: has joined #ruby
[08:24:57] doodleha_: has joined #ruby
[08:25:06] tejasmanohar: adaedra: yeah
[08:25:25] tejasmanohar: /iPhone|iPod|iPad|Android/ wont by a considerable amount though
[08:25:44] Aeyrix: It wouldn't by any noticeable amount
[08:25:59] adaedra: I thought there was 'iOS' in iOS Safari User-Agent
[08:26:25] tejasmanohar: idk, i gotta check on that
[08:26:57] tejasmanohar: has a _lot_ of upvotes on SO and no huge downvotes in comments so i suppose it'd work but obv i have to check
[08:27:03] Takle: has joined #ruby
[08:27:19] ljarvis: it catches Mobile.. also, you should use Mobi because that's what opera mobile uses iirc
[08:27:22] pipework: What are you trying to do, exactly?
[08:27:38] adaedra: Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4
[08:27:56] adaedra: What a mess U_U
[08:28:33] Aeyrix: User agents are moronic
[08:28:56] tejasmanohar: pipework: display a link to share via sms if its mobile, display a link to share on email if its not
[08:29:05] tejasmanohar: "mobile" to whatever extent i can get
[08:30:01] Mon_Ouie: has joined #ruby
[08:30:10] pipework: Why not just display the link always?
[08:30:19] pipework: Some computers can actually send SMS messages.
[08:30:36] lidenskap: has joined #ruby
[08:30:43] ArchRogem: has joined #ruby
[08:30:58] Rixius: has joined #ruby
[08:34:08] bronson: has joined #ruby
[08:34:33] doodleha_: has joined #ruby
[08:34:46] tubuliferous: has joined #ruby
[08:34:58] Takle: has joined #ruby
[08:35:15] selu: has joined #ruby
[08:35:36] SouL_|_: has joined #ruby
[08:36:54] Igorshp: has joined #ruby
[08:37:00] withnale_: has joined #ruby
[08:37:38] psyprus: has joined #ruby
[08:38:02] tejasmanohar: pipework: yeah, could... but i like this 3 icon layout http://i.imgur.com/kTkFeTw.png
[08:38:04] Peteykun: has joined #ruby
[08:38:16] tejasmanohar: (ik thats a terrible reason)
[08:38:23] workmad3: has joined #ruby
[08:38:37] saadq: has joined #ruby
[08:38:47] tejasmanohar: (additionally, most computers cant and i dont wanna confuse ppl or show them what they dont need most of the time)
[08:39:00] adaedra: why does facebook and twitter icons look good when e-mail icon is pixelized?
[08:39:01] pipework: Computers don't want anything.
[08:39:14] Mia: has joined #ruby
[08:39:19] pipework: tejasmanohar: Apple machines, I hear, can handle SMS, so there's that whole market.
[08:39:23] pipework: Something with their messages app.
[08:39:37] tejasmanohar: pipework: oh i guess so with the new OS... hm
[08:39:39] adaedra: As long as a iPhone is paired, I'd say
[08:39:53] pipework: I don't know, but I'd not personally bother with detecting user agents.
[08:39:54] tejasmanohar: i dont know if it handles the sms: URIs though.... anyone wanna check?
[08:40:02] troulouliou_dev: has joined #ruby
[08:40:22] pipework: Make your wobsite just work with many different sizes of viewport and then go home.
[08:40:23] fedexo: has joined #ruby
[08:40:26] tejasmanohar: SMS URI isnt even publicly supported by Apple sooo i would check their docs but no
[08:40:30] tejasmanohar: pipework: i am home
[08:40:38] adaedra: I'd have on my home computer, but I can't
[08:40:43] pipework: It's a phrase.
[08:40:45] tejasmanohar: but yeah i see where youre coming from
[08:40:48] tejasmanohar: im kidding man
[08:41:18] pipework: You might be able to query the client with JS whether there's any SMS supported protocol associations set up.
[08:41:30] pipework: I prefer detecting features over detecting clients.
[08:42:23] sevenseacat: most people do.
[08:43:12] pipework: sevenseacat: TBH, I prefer detecting dollars over most things.
[08:44:01] c0m0: has joined #ruby
[08:47:00] swerter: has joined #ruby
[08:48:19] ki0: has joined #ruby
[08:48:43] platzhirsch: has joined #ruby
[08:49:00] multiscan: has joined #ruby
[08:49:23] FernandoBasso: has joined #ruby
[08:50:51] Igorshp: has joined #ruby
[08:51:44] startupality: has joined #ruby
[08:52:30] arietis: has joined #ruby
[08:53:06] websoftwarez: has joined #ruby
[08:53:11] asmodlol: has joined #ruby
[08:53:31] arup_r: has joined #ruby
[08:53:38] websoftwarez: has joined #ruby
[08:53:51] doodleha_: has joined #ruby
[08:55:35] rippa: has joined #ruby
[08:57:38] GriffinHeart: has joined #ruby
[09:00:59] platzhirsch: has joined #ruby
[09:01:37] doodleha_: has joined #ruby
[09:03:27] Aswebb_: has joined #ruby
[09:05:38] ringarin: has joined #ruby
[09:05:59] saadq: has joined #ruby
[09:07:30] arup_r: why this regex is not working ?
[09:07:31] arup_r: http://rubular.com/r/9rxeHG4014
[09:08:26] Polysics: has joined #ruby
[09:08:49] arup_r: sorry this one -- http://rubular.com/r/TFgoxHlGAM
[09:09:17] juanpaucar: has joined #ruby
[09:09:22] jhass: arup_r: because neither /colour nor /wheels follows in your example
[09:09:28] adaedra: arup_r: https://www.debuggex.com
[09:09:39] jhass: and acutally not even the /
[09:09:53] alexherbo2: has joined #ruby
[09:10:12] rht: arup_r: wouldn't it be easier to split the string on /
[09:10:15] rht: And work from there?
[09:10:16] Polysics: I have a string like "part num 345-58 x 21" and would like to cap "3455821" in one single expression. Is that even possible?
[09:10:51] jhass: arup_r: http://rubular.com/r/F5rEJCw12d should make it a bit clearer
[09:11:14] al2o3-cr: polysics: "part num 345-58 x 21".scan(/\d+/)*''
[09:11:21] jhass: arup_r: what the actual/best solution to your problem is is impossible to tell from the examples you provided
[09:11:35] adaedra: >> "part num 345-58 x 21".scan(/\d+/).join
[09:11:35] asmodlol: has joined #ruby
[09:11:36] ruboto: adaedra # => "3455821" (https://eval.in/370061)
[09:11:36] Polysics: al2o3-cr: nice, thanks
[09:11:44] quimrstorres: has joined #ruby
[09:11:51] arup_r: jhass: its Ok.. I got the hints
[09:12:23] selu: has joined #ruby
[09:14:00] selu: has joined #ruby
[09:14:10] Igorshp: has joined #ruby
[09:14:47] timonv: has joined #ruby
[09:15:08] doodleha_: has joined #ruby
[09:17:42] rht: Does anyone know if there are (long) logs of this channel available someplace?
[09:17:55] al2o3-cr: _ht: check /topic
[09:18:23] rht: Thanks, that last bit was hidden by the GUI :-(
[09:19:01] doodleha_: has joined #ruby
[09:22:09] proxima: has joined #ruby
[09:22:20] quimrstorres: has joined #ruby
[09:24:15] proxima: I have installed shopify_api and shopify_cli too. But still on writing 'shopify' command in terminal this gives error: shopify command is no longer bundled with shopify_api. if you need these tools, install shopify_cli gem. Thanks in advance.
[09:24:39] startupality: has joined #ruby
[09:24:55] jhass: proxima: what does type -a shopify print?
[09:26:34] workmad3: has joined #ruby
[09:26:34] proxima: jhass: you mean to write "-a shopify" in command prompt? I wrote this then it gives: -a is not recognised as internal or external command, operable or batch file.
[09:26:45] doodleha_: has joined #ruby
[09:27:04] jhass: no, type is the command
[09:27:41] granthatcher: has joined #ruby
[09:29:37] albert_delta: has joined #ruby
[09:30:16] Igorshp: has joined #ruby
[09:30:47] proxima: jhass: the system cannot find the file specified. error occured while processing: -a.the system cannot find the file specified. error occured while processing: shopify
[09:30:47] arup_r: jhass: I was building something here.. http://stackoverflow.com/questions/30453324/allow-rails-route-params-to-be-disordered/30454672#30454672
[09:31:03] arup_r: But I trust there is a better regex for that
[09:31:13] arup_r: I am not good in Regex mapping
[09:31:27] jhass: proxima: that's for running: type -a shopify ? what's your shell?
[09:31:35] Igorshp: has joined #ruby
[09:32:45] Igorshp: has joined #ruby
[09:32:47] proxima: I am writing it in comand prompt. Please specify where i am supposed to write it and what line.
[09:33:09] proxima: jhass: I am new to this.
[09:33:09] bronson: has joined #ruby
[09:33:11] mengu: has joined #ruby
[09:33:31] jhass: "command prompt"? so you're on windows?
[09:33:57] proxima: jhass: yes I am on windows.
[09:34:11] Oog: has joined #ruby
[09:34:12] jhass: that would've been some important piece of information ;)
[09:35:18] proxima: jhass: ok so what should I do now to solve the issue?
[09:35:20] jhass: mh, I have no clue how to debug $PATH issues on windows
[09:35:52] jhass: does ruby -S shopify print anything different?
[09:35:53] Takle: has joined #ruby
[09:36:00] GriffinHeart: has joined #ruby
[09:36:08] adaedra: what's the issue, jhass proxima ?
[09:36:17] krz: has joined #ruby
[09:36:34] proxima: jhass: no problem. Thanks. but i tried to make the environment path to be clear in windows but still its giving error. Thanks for your help
[09:36:57] adaedra: proxima: what does `echo %PATH%` outputs?
[09:38:01] mandarinkin: has joined #ruby
[09:38:42] proxima: adaedra: It gives big list of c:Program data etc.
[09:39:40] adaedra: proxima: to copy from command prompt, click on program icon, go to Edit > Select, select the output (rectangular select), and press enter, iirc
[09:40:01] proxima: adaedra: This is the exact output C:\Users\wizrocket\Desktop\Hello_World>echo %PATH% C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\Sy stem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\I ntel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64; C:\Program Files\Java\jdk1.8.0_25\bin; C:\Program Files (x86)\Skype\Phone\; C:\ Python27\; C:\Python27\Script
[09:40:57] adaedra: mmmh, that's weird, I see no reference to Ruby at all
[09:42:22] adaedra: How did you install Ruby?
[09:42:23] proxima: adaedra: yes but that should not happen, as while installing I marked the boxes for adding the path to environment. So, what you suggest now?
[09:42:36] sevenseacat: its incomplete, thats likely why
[09:43:35] adaedra: proxima: are you sure the whole content of output was pasted, as IRC has a message length limit? Try going through gist
[09:43:42] Takle: has joined #ruby
[09:43:47] Igorshp: has joined #ruby
[09:46:17] proxima: adaedra: yeah you are right more than half part was not copied here. here is the rest part: C:\Python27\Lib;C: \Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Ruby22-x64\bin;C:\Windows\system32\Wind owsPowerShell\v1.0\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32
[09:46:31] proxima: C:\W indows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\P rogram Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\Ope nCL SDK\3.0\bin\x64; C:\Program Files\Java\jdk1.8.0_25\bin;
[09:46:36] adaedra: Looks more like it
[09:46:40] proxima: ;C:\Program Files (x 86)\Skype\Phone\;C:\Program Files\Java\jdk1.8.0_25\bin;;C:\Python27\;C:\Python27 \Scripts\
[09:48:06] proxima: adaedra: so ruby is here. Now whats the issue. Any further checking parameter?
[09:48:44] adaedra: proxima: gem env, but please, gist it this time rather than pasting it here ;)
[09:51:30] multiscan: has joined #ruby
[09:54:01] al2o3-cr: Is CGI.h same as CGI.escapeHTML ?
[09:54:26] adaedra: proxima: you alive?
[09:55:12] proxima: adaedra: If you dont mind. Can you tell how to gist instead of copy-paste. i got one method by github, but due to some network error I am not able to access it. So, tell me if any other way of gist is available.
[09:55:54] n008f4g_: has joined #ruby
[09:56:30] adaedra: there's other paste system available, I don't remember which currently :x
[09:56:46] shuber_: has joined #ruby
[09:57:16] proxima: adaedra: so I hope you do not mind if I again paste the results over here.
[09:57:34] adaedra: I'm sure lot of people will mind, see topic
[09:57:40] adaedra: try with pastie.org
[09:58:10] Ropeney: has joined #ruby
[09:58:36] adaedra: I think you can redirect output in a file like in linux (gem env > file.txt) if it's easier than copy-paste
[09:58:58] adaedra: But I'm not sure, haven't used Windows console for a while
[09:59:17] startupality: has joined #ruby
[09:59:29] proxima: adaedra: here it is: http://pastie.org/10207798
[09:59:41] joonty: has joined #ruby
[10:00:18] adaedra: thanks, let me see
[10:03:44] arup_r: has joined #ruby
[10:05:10] adaedra: proxima: does the shopify-cli command works?
[10:09:52] decoponio: has joined #ruby
[10:10:20] proxima: 'shopify_cli' is not recognized as an internal or external command, operable program or batch file.
[10:10:45] adaedra: with a dash
[10:10:55] adaedra: not an underscore
[10:11:05] mtakkman: has joined #ruby
[10:11:50] mikecmpbll: has joined #ruby
[10:12:21] proxima: http://pastie.org/10207816
[10:12:42] mengu: has joined #ruby
[10:12:43] adaedra: looks like so
[10:12:54] adaedra: isn't that what you want?
[10:12:55] alphaatom: has joined #ruby
[10:13:25] proxima: The error is this: I have installed shopify_api and shopify_cli too. But still on writing 'shopify' command in terminal this gives error: shopify command is no longer bundled with shopify_api. if you need these tools, install shopify_cli gem.
[10:13:45] idakyne: has joined #ruby
[10:13:48] adaedra: it seems that they renamed the command when moving in a separate gem
[10:13:59] adaedra: so you should use shopify-cli in place of shopify
[10:14:40] idakyne: has joined #ruby
[10:14:50] chipotle: has joined #ruby
[10:15:13] proxima: adaedra: yes, thanks a lot. :)
[10:17:02] prillian5: has joined #ruby
[10:18:59] sk321: has joined #ruby
[10:20:22] rickmasta: has joined #ruby
[10:20:37] DEA7TH: has joined #ruby
[10:20:52] quimrstorres: has joined #ruby
[10:22:12] wildroman2: has joined #ruby
[10:23:34] tubuliferous: has joined #ruby
[10:23:54] startupality: has joined #ruby
[10:24:41] vikaton: has joined #ruby
[10:25:57] saadq: has joined #ruby
[10:27:40] leafybasil: has joined #ruby
[10:28:09] anaeem1: has joined #ruby
[10:30:04] DLSteve_: has joined #ruby
[10:30:24] casadei: has joined #ruby
[10:30:27] proxima: I am getting this(http://pastie.org/10207834) error on running: shopify-cli console test-store-1017.myshopify.com. I am following this documentation https://docs.shopify.com/api/introduction/using-the-api-console
[10:31:27] jhass: sounds like you should create a file called .myshopify.com.yml and you didn't
[10:31:57] adaedra: did you do the add step and did it work without errors?
[10:32:06] proxima: jhass: It was supposed to be created in previous step automatically
[10:32:06] fabrice31: has joined #ruby
[10:32:43] proxima: yes I did the shopify-cli add without any error
[10:33:09] jhass: maybe you need to change some argument from the example?
[10:33:21] jhass: do you have any .yml file?
[10:33:29] jhass: (run dir to check)
[10:34:08] idakyne: has joined #ruby
[10:34:09] bronson: has joined #ruby
[10:34:55] idakyne: has left #ruby: ()
[10:36:15] proxima: I have the required .yml file st location C:\Users\wizrocket\.shopify\shops.
[10:37:20] jhass: what is it called?
[10:37:43] proxima: test-store-1017.yml
[10:38:15] jhass: then try shopify console using test-store-1017 without appending myshopify.com
[10:38:24] jhass: *shopify-cli
[10:39:35] proxima: (y) worked without "using"
[10:39:41] Polysics: has joined #ruby
[10:39:42] krz: has joined #ruby
[10:39:53] Oog: has joined #ruby
[10:39:59] proxima: jhass: thanks
[10:40:30] phutchins: has joined #ruby
[10:40:52] Ilyes512: has joined #ruby
[10:40:54] gauke: has joined #ruby
[10:42:43] yh__: has joined #ruby
[10:47:33] _blizzy_: has joined #ruby
[10:47:36] saadq: has joined #ruby
[10:48:06] yqt: has joined #ruby
[10:48:11] chinmay_dd: has joined #ruby
[10:48:34] banister: has joined #ruby
[10:50:01] sdothum: has joined #ruby
[10:51:43] bruno-: has joined #ruby
[10:52:29] Oka: has joined #ruby
[10:53:42] lidenskap: has joined #ruby
[10:54:32] startupality: has joined #ruby
[10:57:02] MatthewsFace: has joined #ruby
[10:58:05] shuber_: has joined #ruby
[10:58:10] juanpaucar: has joined #ruby
[10:58:25] tvw: has joined #ruby
[11:00:08] workmad3: has joined #ruby
[11:00:08] Oog: has joined #ruby
[11:00:49] phale: has joined #ruby
[11:00:57] phale: has left #ruby: ("Leaving")
[11:01:54] moeSeth_: has joined #ruby
[11:02:33] psye: has joined #ruby
[11:03:33] multiscan: has joined #ruby
[11:08:18] Polysics: has joined #ruby
[11:08:26] ringarin: has joined #ruby
[11:09:06] yh__: has joined #ruby
[11:09:38] sigurding: has joined #ruby
[11:09:52] rodfersou: has joined #ruby
[11:11:44] quimrsto_: has joined #ruby
[11:12:05] sepp2k: has joined #ruby
[11:13:29] sepp2k: has joined #ruby
[11:15:31] quimrstorres: has joined #ruby
[11:16:16] uhsf: has joined #ruby
[11:16:24] jackcom: has joined #ruby
[11:16:56] jackcom: i can do programming laguage, but i don???t know what to do?
[11:17:09] zotherstupidguy: thats nice http://ozh.org/contribution/
[11:17:27] jackcom: what is it? zotherstupidguy ?
[11:17:51] adaedra: zotherstupidguy: Mine would be rather gray :x
[11:18:27] adaedra: ah no, it's just the text that is customizable, it's not based on your contributions
[11:18:27] fabrice31: has joined #ruby
[11:18:31] adaedra: 2/10, could do better
[11:19:08] uhsf: Can someone please look at this error page and help me fix the error?
[11:19:37] but3k4: has joined #ruby
[11:19:56] adaedra: looks like it can't find bundler
[11:20:29] adaedra: did you install gem dependencies, and if you did, did you do it in the same user as the webserver runs and in the same ruby environment (i.e. rvm rbenv)
[11:21:59] uhsf: gems are installed as user, I will try to install as root
[11:22:09] ruboto: General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
[11:23:22] quimrsto_: has joined #ruby
[11:23:30] DLSteve_: sorry laged out for a sec
[11:23:53] DLSteve_: /usr/lib/ruby/site_ruby/2.2.0/ is user ruby version
[11:24:14] DLSteve_: /home/uhsf/.gem/ruby/2.2.2/ is passenger ruby version
[11:24:24] DLSteve_: so def an environment issue.
[11:25:05] adaedra: also, you changed nick without telling so, I was confused for a second here.
[11:25:32] michael_mbp: has joined #ruby
[11:25:42] DLSteve_: changed nick?
[11:25:49] uhsf: I didn't change nick.
[11:26:25] DLSteve_: I was trying to type "/home/uhsf/.gem/ruby/2.2.2/" but the / ate my input.
[11:26:34] DLSteve_: So I thought I had laged out.
[11:26:38] uhsf: the 2.2.0 and 2.2.2 thing is what I was looking to fix
[11:28:00] DLSteve_: you need to use the 2.2.2 env to install all the gems.
[11:28:32] DLSteve_: your system default is 2.2.0 so that is what is causing the issue.
[11:28:49] adaedra: sorry, thought you were the same person, misread >_<
[11:29:11] DLSteve_: adaedra, np :)
[11:29:20] uhsf: DLSteve_: ruby -v gives ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[11:29:59] uhsf: everything should be 2.2.2. I don't understand where the 2.2.0 comes from
[11:29:59] DLSteve_: uhsf, for your user. What user account is the server running?
[11:30:15] adaedra: Passenger has a setting to choose ruby version, no?
[11:30:16] awkwords: has joined #ruby
[11:30:44] uhsf: in nginx.conf I have passenger_ruby /usr/bin/ruby;
[11:31:37] DLSteve_: yah that is the 2.2.0 version
[11:33:22] uhsf: how to use the 2.2.2 version?
[11:33:50] alphaatom: has joined #ruby
[11:33:55] ldnunes: has joined #ruby
[11:34:24] mellohey: has joined #ruby
[11:34:51] DLSteve_: are you using rvm?
[11:35:00] bronson: has joined #ruby
[11:35:02] alphaatom: has joined #ruby
[11:35:18] DLSteve_: how did you install ruby?
[11:36:00] uhsf: Arch Linux: sudo pacman -S ruby
[11:36:20] adaedra: the second one
[11:36:47] uhsf: you mean 2.2.2?
[11:37:10] uhsf: pacman -Syu updates packages
[11:37:34] uhsf: I guess it leaves older versions installed
[11:38:02] senayar: has joined #ruby
[11:38:03] senayar: has joined #ruby
[11:38:29] phreakocious: has joined #ruby
[11:38:34] ex0ns: unless you installed them from AUR
[11:39:39] alphaatom: has joined #ruby
[11:40:40] DLSteve_: try adding "export GEM_HOME=$(ruby -e 'print Gem.user_dir')" to your ~/.bashrc file and redo the bundle install.
[11:40:54] DLSteve_: https://wiki.archlinux.org/index.php/Ruby#Ruby_2.2
[11:41:50] uhsf: DLSteve_: I already have export GEM_HOME="/home/uhsf/.gem/ruby/2.2.2" and PATH="${PATH}:/home/uhsf/.gem/ruby/2.2.2/bin" in my .bashrc
[11:41:58] rickmasta: has joined #ruby
[11:42:10] jmignault: has joined #ruby
[11:42:37] jaffachief: has joined #ruby
[11:43:52] DLSteve_: uhsf, Yah I'm not sure then. Something I would have to look at.
[11:46:08] adaedra: uhsf: why do you set GEM_HOME?
[11:46:14] uhsf: nginx master process runs as root and worker process runs as nobody. maybe it's the problem?
[11:46:58] DLSteve_: adaedra, to make gems local to the user. The Arch doc recommends that setting as pacman is built in ruby.
[11:47:14] uhsf: adaedra: I used GEM_HOME because I had multiple gem versions at some point but now I cleaned up and only use 2.2.2
[11:47:35] dorei: has joined #ruby
[11:49:15] kobain: has joined #ruby
[11:50:00] mengu: has joined #ruby
[11:50:33] serivich: has joined #ruby
[11:54:01] banister: has joined #ruby
[11:54:51] nhhagen: has joined #ruby
[11:56:22] Oog: has joined #ruby
[11:57:12] lolmaus: has joined #ruby
[11:57:37] davedev24_: has joined #ruby
[11:57:57] Mia: has joined #ruby
[11:58:03] serivichi: has joined #ruby
[11:58:46] multiscan: has joined #ruby
[11:58:57] shuber_: has joined #ruby
[11:59:10] bogdanteleaga: has joined #ruby
[11:59:22] fabrice31_: has joined #ruby
[12:00:10] ArchRogem: has joined #ruby
[12:01:24] adac: has joined #ruby
[12:01:58] zenguy_pc: has joined #ruby
[12:02:11] uhsf: has joined #ruby
[12:02:52] banister: has joined #ruby
[12:04:08] krz: has joined #ruby
[12:04:26] ebonics: has joined #ruby
[12:04:51] jayeshsolanki: has joined #ruby
[12:05:04] tjbiddle: has joined #ruby
[12:05:47] fgo: has joined #ruby
[12:06:17] Aswebb_: has joined #ruby
[12:08:08] shazaum: has joined #ruby
[12:08:11] y0da: has joined #ruby
[12:08:30] Mia: has joined #ruby
[12:10:08] quimrstorres: has joined #ruby
[12:10:37] joshbamboo1: has joined #ruby
[12:12:22] tubuliferous: has joined #ruby
[12:13:59] jackcom: has left #ruby: ()
[12:18:19] cirn0: has joined #ruby
[12:20:14] Takle: has joined #ruby
[12:20:15] IrishGringo: has joined #ruby
[12:24:54] crazydiamond: has joined #ruby
[12:25:01] but3k4: has joined #ruby
[12:25:07] pengin: has joined #ruby
[12:28:28] huddy: has joined #ruby
[12:28:50] c355E3B: has joined #ruby
[12:28:56] iamninja: has joined #ruby
[12:33:26] psye: has joined #ruby
[12:35:33] shevy: adaedra do you do webdev stuff in ruby?
[12:37:02] e1nh4nd3r: has joined #ruby
[12:41:48] griffindy: has joined #ruby
[12:42:25] sankaber: has joined #ruby
[12:42:36] pengin: has joined #ruby
[12:42:47] Scripore: has joined #ruby
[12:44:38] nfk: has joined #ruby
[12:45:23] adaedra: shevy: yes
[12:46:41] sankaber: has joined #ruby
[12:47:00] juanpaucar: has joined #ruby
[12:47:39] mengu: has joined #ruby
[12:50:50] yalue: has joined #ruby
[12:51:01] chinmay_dd: has joined #ruby
[12:51:04] Leef_: has joined #ruby
[12:51:08] mahtennek: has joined #ruby
[12:52:36] lb5tr: has left #ruby: ("WeeChat 0.4.2")
[12:52:47] multiscan: has joined #ruby
[12:53:45] jespada: has joined #ruby
[12:54:27] chinmay_dd: has joined #ruby
[12:54:31] paulcsmith: has joined #ruby
[12:54:41] psyprus: has joined #ruby
[12:55:03] lektrik: has joined #ruby
[12:56:52] gluten_hell: has joined #ruby
[12:57:24] anaeem1_: has joined #ruby
[12:57:32] bmurt: has joined #ruby
[12:58:27] paulcsmith: has joined #ruby
[13:01:56] Azulinho: has joined #ruby
[13:02:09] vt102: has joined #ruby
[13:03:06] bkxd: has joined #ruby
[13:04:09] pwattstbd: has joined #ruby
[13:04:15] ndrei: has joined #ruby
[13:04:32] Takle: has joined #ruby
[13:04:36] quimrstorres: has joined #ruby
[13:05:31] banister: has joined #ruby
[13:05:50] senayar: has joined #ruby
[13:06:09] Takle_: has joined #ruby
[13:07:17] Polysics_: has joined #ruby
[13:10:30] sevenseacat: has joined #ruby
[13:11:32] lektrik: has left #ruby: ("Leaving")
[13:11:34] enebo: has joined #ruby
[13:12:03] dblessing: has joined #ruby
[13:12:18] sanguisdex: has joined #ruby
[13:13:29] nettoweb: has joined #ruby
[13:13:57] thiagovsk: has joined #ruby
[13:15:39] bluOxigen: has joined #ruby
[13:17:28] mary5030: has joined #ruby
[13:18:20] sgambino: has joined #ruby
[13:19:09] mrmargolis: has joined #ruby
[13:19:57] mary5030: has joined #ruby
[13:20:34] vivekananda: has joined #ruby
[13:20:54] al2o3-cr: has joined #ruby
[13:22:52] lavros: has joined #ruby
[13:23:07] yqt: has joined #ruby
[13:23:55] bronson: has joined #ruby
[13:24:23] Scripore: has joined #ruby
[13:25:02] Xiti: has joined #ruby
[13:25:06] tvw: has joined #ruby
[13:25:31] quimrsto_: has joined #ruby
[13:27:23] startupality_: has joined #ruby
[13:27:37] nfk: has joined #ruby
[13:27:51] bluOxigen: has joined #ruby
[13:27:59] bluOxigen: has left #ruby: ()
[13:28:27] lidenskap: has joined #ruby
[13:29:54] gr33n7007h: has joined #ruby
[13:30:26] rom1504: has joined #ruby
[13:31:25] Vile`: has joined #ruby
[13:32:22] anaeem1_: has joined #ruby
[13:33:27] dstarh: has joined #ruby
[13:33:30] mrchris: has joined #ruby
[13:33:45] kies: has joined #ruby
[13:34:04] dudedudeman: ha, i see you guys summoned me while I was away, shevy
[13:34:53] Akagi201: has joined #ruby
[13:35:09] adaedra: !summon dudedudeman
[13:35:10] apeiros: summon dudedudeman
[13:35:31] apeiros: harsh. hope that doesn't result in split personality.
[13:35:44] dudedudeman: ha. i hope everyone had a good weekend
[13:35:47] jerius: has joined #ruby
[13:35:50] dudedudeman: i, made fajitas. #dealwithit
[13:36:01] al2o3-cr: has joined #ruby
[13:36:27] quimrstorres: has joined #ruby
[13:36:35] [k-: has joined #ruby
[13:38:28] anaeem1: has joined #ruby
[13:38:31] nettoweb: has joined #ruby
[13:38:36] dudedudeman: so a guy from our local ruby user group just launched a cool new site/tool
[13:38:37] dudedudeman: http://www.libgrader.com/
[13:39:03] dudedudeman: it looks like it is a searchable base of gems, and then it rates them based on how well they've been maintained and how usable they are, and if they have good docs
[13:39:07] that1guy: has joined #ruby
[13:39:08] Scripore: has joined #ruby
[13:39:44] adaedra: looks nice
[13:40:21] adaedra: would be good to have a comparaison feature
[13:40:22] dudedudeman: since i'm fairly new to the ruby community, i have a hard time trusting gems sometimes, especially if they're something that i don't know much about
[13:40:31] dudedudeman: oooo, that would be neat
[13:40:55] adaedra: a little bit like ruby-toolbox.org does, but with more complete and useful information
[13:41:11] adaedra: s/org/com/
[13:41:14] yh__: has joined #ruby
[13:42:52] dudedudeman: speaking of .org/.com, i had been building a e-commerce site for a buddy of mine, and we go to buy his domain, and come to find out his direct competitor had purchased a good while ago. .org was the only thing available. lol
[13:43:07] dudedudeman: cybersquatting is dumb
[13:43:37] daxroc: Anyone know a pure ruby library to create an ISO image (win/linux/mac) ?
[13:43:45] adaedra: domain hacks are a good thing for that
[13:43:57] dudedudeman: domain hacks?
[13:44:03] adaedra: as you remember the TLD with it
[13:44:12] adaedra: yeah, when you use the tld as part as the address
[13:44:20] adaedra: like dudedudem.an
[13:44:25] jespada: has joined #ruby
[13:44:45] rbennacer: has joined #ruby
[13:44:46] dudedudeman: ahhh, yeah i had seen a couple of those. i guess we wanted something for him that was easily just typeable
[13:45:32] adaedra: but heh, obtaining one is much harder.
[13:46:40] jhass: well, those 700 new gtlds help a bit
[13:46:58] umgrosscol: has joined #ruby
[13:47:03] rbennacer: has joined #ruby
[13:47:10] dudedudeman: hey! jhass said something and i actually understood all of those words!
[13:47:44] dudedudeman: that's not a knock btw, you're just much more robust in your knowledge of this IRC's subject matter
[13:47:45] adaedra: jhass: true, it helps a bit.
[13:47:56] adaedra: now, what kind of hack will I be able to do with .paris?
[13:48:07] dudedudeman: sleepin.paris?
[13:48:13] dudedudeman: that could be a cool hotel/travel site
[13:48:14] jhass: taken, I bet
[13:48:49] bkxd: menagein.paris
[13:49:52] anaeem1: has joined #ruby
[13:50:35] balazs: has joined #ruby
[13:51:49] horsecowdog: has joined #ruby
[13:51:50] ixti: has joined #ruby
[13:52:06] sandelius: has joined #ruby
[13:52:13] unshadow: has joined #ruby
[13:52:58] schiz: has joined #ruby
[13:54:16] fu2ristiq: has joined #ruby
[13:55:28] northfurr: has joined #ruby
[13:55:34] fu2ristiq: has left #ruby: ()
[13:56:23] that1guy: has joined #ruby
[13:58:14] jpfuentes2: has joined #ruby
[13:58:32] krz: has joined #ruby
[13:59:55] workmad3: has joined #ruby
[14:01:03] shuber_: has joined #ruby
[14:01:06] volcanix: has joined #ruby
[14:01:07] lyuben_: has joined #ruby
[14:01:10] tubuliferous: has joined #ruby
[14:01:38] Buck: has joined #ruby
[14:02:12] Buck: I'm trying to map an array to an associative array, but failing: h.each_with_index.map { |c,i| {c => i}}
[14:02:21] Buck: that will just give me an array of associative arrays with just one element
[14:02:25] Buck: how can do it correctly?
[14:02:50] jhass: it's called hash in Ruby, general name is map ;)
[14:03:07] jhass: so, what's h?
[14:03:10] apeiros: Buck: use to_h
[14:03:13] Buck: it's a string jhass
[14:03:13] ljarvis: do you actually want the index?
[14:03:17] Buck: yes ljarvis
[14:03:20] apeiros: >> [:a, :b, :c].each_with_index.to_h
[14:03:21] ruboto: apeiros # => {:a=>0, :b=>1, :c=>2} (https://eval.in/370433)
[14:03:42] nhhagen: has joined #ruby
[14:03:58] Buck: apeiros: that is what I'm looking for, but it doesn't work with strings?
[14:04:11] jhass: note that it'll overwrite duplicates with the last occurrence
[14:04:13] apeiros: >> ["a", "b", "c"].each_with_index.to_h
[14:04:13] ruboto: apeiros # => {"a"=>0, "b"=>1, "c"=>2} (https://eval.in/370434)
[14:04:18] apeiros: ^ um, yes it does?
[14:04:21] Zai00: has joined #ruby
[14:04:31] apeiros: otherwise, elaborate "doesn't work"
[14:04:31] Buck: I tried it on the wrong variable
[14:04:51] Buck: thank you!
[14:06:32] Ilyes512: has joined #ruby
[14:07:01] Kricir: has joined #ruby
[14:07:29] dopie: has joined #ruby
[14:07:38] hmnhf: has joined #ruby
[14:08:14] dopie: has joined #ruby
[14:08:24] failshell: has joined #ruby
[14:08:51] someword: has joined #ruby
[14:10:04] Ilyes512_: has joined #ruby
[14:11:50] railsraider: has joined #ruby
[14:15:09] davispuh: has joined #ruby
[14:19:53] mistermocha: has joined #ruby
[14:20:18] poguez_: has joined #ruby
[14:21:38] lxsameer: has joined #ruby
[14:22:26] IrishGringo: has joined #ruby
[14:22:57] fabrice31: has joined #ruby
[14:23:56] ascarter: has joined #ruby
[14:25:59] aryaching: has joined #ruby
[14:25:59] tjohnson: has joined #ruby
[14:26:12] asmodlol: has joined #ruby
[14:27:14] powersurge: has joined #ruby
[14:28:17] Buck: has left #ruby: ("Leaving")
[14:28:39] CustosLimen: has joined #ruby
[14:29:46] startupality: has joined #ruby
[14:31:18] CloCkWeRX: has joined #ruby
[14:31:47] jmignault: has joined #ruby
[14:31:59] casadei: has joined #ruby
[14:33:16] izzol: how to handle the STDIN in ruby?
[14:33:27] izzol: I found few examples but now sure which method is the best.
[14:33:40] izzol: One is executing code with -n.
[14:34:21] izzol: I would like to do something like: $test = join( '', <STRING>); (perl:P)
[14:34:23] Laptyp: has joined #ruby
[14:34:40] izzol: of course <STDIN>.
[14:35:03] Synthead: has joined #ruby
[14:35:21] jhass: izzol: prefer $stdin over STDIN
[14:35:42] jhass: STDIN is a backup for easier resetting of $stdin
[14:35:54] izzol: jhass: STDIN.gets ?
[14:36:07] jhass: no, $stdin.gets
[14:36:12] juanpaucar: has joined #ruby
[14:36:31] jhass: or plain gets from Kernel which delegates to ARGF.gets which delegates to $stdin.gets
[14:38:00] ebbflowgo: has joined #ruby
[14:39:02] dsathe: has joined #ruby
[14:39:13] freerobby: has joined #ruby
[14:39:27] postmodern: has joined #ruby
[14:39:46] Osz: has joined #ruby
[14:40:06] anisha: has joined #ruby
[14:40:27] iwishiwerearobot: has joined #ruby
[14:42:31] zotherstupidguy: anybody saw the hololens of microsoft, please tell me there is an opensource ver of that in the making!
[14:45:04] powersurge: I think the closest you'll get is google cardboard. which isn't open source and isn't anything like hololens
[14:45:15] someword: has joined #ruby
[14:45:22] powersurge: so not really afaik
[14:45:35] gambl0re: has joined #ruby
[14:45:41] mduk: there wasn't for kinect either until someone wrote them. give it time ;)
[14:46:12] powersurge: yea, but the current state of things the answer is no
[14:46:18] jhass: that idea is obvious, there will once the tools/materials become cheap enough
[14:46:41] mduk: that was the state of things with the kinect too until the state changed
[14:46:44] dsathe: Hello folks I have an interesting question. Suppose I have a fairly parallel application running multiple processes , each process runs a bunch of worker threads, using a shared variable (threads only read its value ) so mutex is probably not required (is this assumption valid ?). Now i would want to modify the shared variable without bringing down the process using signal.trap to do the bidding. What would be the implications of this
[14:47:03] Osz: has left #ruby: ()
[14:47:41] jhass: hat depends a lot on the shared state, how it's used and how it's modified
[14:47:48] ta: has joined #ruby
[14:47:50] dsathe: http://pastebin.com/mJyv3Ez8
[14:47:51] ruboto: dsathe, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8362270e760e28232f8e
[14:47:51] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[14:47:55] mduk: moral of the story? give it time :P
[14:48:21] dsathe: its a simple dict in the real use case
[14:48:29] dsathe: the threads lookup values from it
[14:48:31] ruboto: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[14:49:07] jhass: whether the shared state is a Fixnum or a Hash affects a real lot of my questions
[14:49:45] Goldfish: has joined #ruby
[14:49:52] dsathe: jhass: I really couldn't do that for reasons out of my hand , besides its a part of a large codebase so it would lack context , let me write the example to better illustrate the use case , gimme a bit
[14:49:58] dsathe: it is a hash
[14:50:14] kinduff: has joined #ruby
[14:50:53] kinduff: good morning
[14:51:29] nhhagen: has joined #ruby
[14:52:34] dsathe: jhass: https://gist.github.com/dhananjaysathe/967b248a29c303ba07b8
[14:52:44] tejasmanohar: has joined #ruby
[14:52:53] dsathe: this helps you better
[14:52:59] adaedra: use .rb extension in your gist, so we have color
[14:53:30] jhass: dsathe: if it really is like that, you're safe without locking
[14:54:04] Igorshp: has joined #ruby
[14:54:07] dsathe: here you go https://gist.github.com/dhananjaysathe/9250f66de01b4cacfeca
[14:54:10] jhass: in fact in MRI assigning key/values to the hash in place is safe, but not in say JRuby
[14:54:18] jhass: you can also edit gists ;)
[14:54:23] dsathe: yeah im using forking so on mri
[14:54:33] davispuhh: has joined #ruby
[14:54:52] jhass: oh, well, changing it in the parent process won't change it in the child processes
[14:55:02] dsathe: i maintian a manager process that can modify the lookup for which im guessing signals is a good approach
[14:55:31] dsathe: The key question being what happens to each thread thats already started executing
[14:55:57] dsathe: each thread takes say 1-2 sec to run, IO intensive stuff hence this apporach to begin with
[14:55:57] jhass: assigning to an instance variable is atomic
[14:56:01] dsathe: what value will it see
[14:56:12] jhass: well, that's random
[14:56:38] jhass: depends on whether your signal handler runs before or after the thread read the instance variable
[14:56:57] pdoherty: has joined #ruby
[14:56:57] dsathe: in a more complex case if the lookup were a Array type and im using some select on it , a signal shows up while the select op is runing what happens in that case ?
[14:57:02] jhass: but that'll be true with locking too
[14:57:18] jhass: well, that's the cases you want to avoid
[14:57:19] dsathe: i know its rarae but that is a race condition as i understand the Array.select is not atomic
[14:57:30] jhass: which is why I asked for your usecase
[14:57:44] snockerton: has joined #ruby
[14:57:51] jhass: if you iterate, you want to lock (perhaps a read write lock)
[14:58:34] dsathe: haha fair point let me get rid of the other code that I probabluy do not want to expose and give you something more concrete, really appreciate the patience
[14:58:48] jhass: if you do simple lookups through the instance var and just the var a new object instead of changing the existing one, you're as safe as it gets
[14:58:56] jhass: *just assign
[14:59:23] dsathe: hmm yeah that would be good so within the thread i could do foo=@lookup and iter through foo
[14:59:56] jhass: yes, that will protect against cases like if @foo.size > 0; @foo.operation
[15:00:16] jhass: (again, given there's no other thread modifying the object)
[15:00:45] commondream: has joined #ruby
[15:01:19] Channel6: has joined #ruby
[15:01:20] senayar: has joined #ruby
[15:01:20] senayar: has joined #ruby
[15:01:29] izzol: jhass: but it's realy slow :(
[15:01:39] jhass: izzol: huh?
[15:01:44] anaeem1: has joined #ruby
[15:02:02] shuber_: has joined #ruby
[15:02:38] Igorshp: has joined #ruby
[15:02:52] paulcsmith: has joined #ruby
[15:02:54] lupine: ACTION bumps up against the ruby1.8 limit on regexp sizes
[15:02:56] lupine: hilarious
[15:03:05] lupine: shame it's a production system
[15:03:33] jhass: the only shame is you using 1.8 still, no matter the circumstances :P
[15:03:41] lupine: that's not even the worst thing
[15:03:44] lupine: this is a lenny box
[15:03:48] Kruppe: has joined #ruby
[15:04:00] izzol: jhass: https://gist.github.com/wolfedale/462131686c98078500c8
[15:04:03] jhass: rm -rf / and say ups?
[15:04:10] lupine: (and yes, it is public-facing)
[15:04:20] konsolebox: has joined #ruby
[15:04:43] jhass: izzol: try with ruby --disable-gems
[15:05:01] jhass: lupine: oh, then rm -rf / and yell hacked?
[15:05:02] dsathe: vhass & other kind folks https://gist.github.com/dhananjaysathe/9250f66de01b4cacfeca this is exactly the way it is being used , sorry for the vagueness earlier I should have been a lot more clear , i understand its hard to gauge finer nuances with finer implementation details
[15:05:15] dsathe: using ruby 2.0.0
[15:05:37] izzol: jhass: better, RealMarc 0m0.021s, but still in perl it's: RealMarc 0m0.004s :(
[15:07:09] jhass: dsathe: okay, if you do the assignment in an atomic step like you've shown and really have no interdependent accesses to @lookup, like shown, then you're safe
[15:07:25] jhass: no amount of locking will make a difference
[15:08:11] jpfuentes2: has joined #ruby
[15:08:18] dsathe: jhass the parent process will just dispatch the signals each child will rebuild lookup ;) im aware changes in the parent do not show up in the child . The parent is basically just a "manager" of sorts for a bunch of forked children
[15:09:52] Igorshp: has joined #ruby
[15:11:04] izzol: So it looks like while() in perl is 2-3x faster then in ruby (somehow) :(
[15:12:51] bronson: has joined #ruby
[15:13:16] Rubie: has joined #ruby
[15:13:20] dsathe: jhass thank you :)
[15:13:59] Macaveli: has joined #ruby
[15:14:16] Hijiri: has joined #ruby
[15:15:05] anaeem1_: has joined #ruby
[15:15:17] HotCoder: has joined #ruby
[15:17:18] aryaching: has joined #ruby
[15:17:34] ziprar: has joined #ruby
[15:17:34] ziprar: has joined #ruby
[15:17:46] yfeldblum: has joined #ruby
[15:17:58] commondream: has joined #ruby
[15:18:46] startupality: has joined #ruby
[15:20:02] Papierkorb: has joined #ruby
[15:20:29] anaeem1_: has joined #ruby
[15:23:12] ItSANgo_: has joined #ruby
[15:24:27] Rollabunna: has joined #ruby
[15:26:11] davispuh: has joined #ruby
[15:26:11] woodennails: has joined #ruby
[15:26:37] jhass: izzol: mmh, in my shell that measures the time of the cat command only
[15:27:10] lolmaus_: has joined #ruby
[15:28:50] Axilla: has joined #ruby
[15:30:10] Igorshp: has joined #ruby
[15:30:54] commondream: has joined #ruby
[15:34:15] jhass: izzol: I think it's just bootup time, IO.copy_stream shows the same times
[15:35:46] jpfuentes2: has joined #ruby
[15:35:54] susmus: has joined #ruby
[15:37:40] esplainisix: has joined #ruby
[15:37:48] riotjones: has joined #ruby
[15:39:27] bronson: has joined #ruby
[15:40:01] dsathe: jhass https://gist.github.com/dhananjaysathe/5920e33dfea8ae0de381 this confirms it , even if the array changes outside the value inside the thread is unaffected still works (tested in irb)
[15:40:04] jpfuentes2: has joined #ruby
[15:40:13] mistermocha: has joined #ruby
[15:40:53] nvll: has joined #ruby
[15:41:01] dsathe: that's interesting so ruby implicitly created a copy of the object when i executed select ?
[15:41:03] st1gma: has joined #ruby
[15:41:24] jhass: well, yes, it's just a reference update, the select operates on self, not the variable
[15:42:05] mrdmi: has joined #ruby
[15:42:06] ascarter: has joined #ruby
[15:43:20] dsathe: so function here behave call by value
[15:43:40] jhass: no, it's all call by reference
[15:44:08] dsathe: out of curiosity how can i know this ?
[15:44:43] jhass: variables are just references to an object. when you do def foo(a); end; b = :bar; foo(b), you do not pass b to foo, you pass a reference to :bar
[15:45:14] dsathe: oh so the function call operated on the older reference , the new assignment just updated the ref to the variable , so technically the function still has the old ref so it *just works*
[15:45:23] jhass: so while inside foo there are two references to the object :bar, the local a of the scope of the method and the local b of the toplevel scope
[15:45:24] dsathe: is that approximately right ?
[15:45:39] dsathe: thank you so much
[15:45:54] banister: has joined #ruby
[15:48:20] imperator: has joined #ruby
[15:49:58] tubuliferous: has joined #ruby
[15:52:15] railsForDaiz: has joined #ruby
[15:53:52] baroquebobcat: has joined #ruby
[15:55:40] adaedra: Do you know a gem which could search templates, given a name, in multiple view paths, like sinatra does?
[15:56:00] MasterPiece: has joined #ruby
[15:56:24] stef204: has joined #ruby
[15:56:47] gluten_hell: has joined #ruby
[15:56:57] jhass: Dir[paths.map {|path| "#{path/#{name}.{extensions.join(",")}"}] ?
[15:57:46] jhass: messed up syntax, but eh
[15:57:59] adaedra: yeah, was looking for something not hand-made if it existed
[15:58:13] jhass: just saying that it's hardly more than a line of code
[15:58:34] iamjarvo: has joined #ruby
[15:58:55] MasterPiece: has joined #ruby
[15:59:28] _seanc_: has joined #ruby
[16:00:33] mrdmi: has joined #ruby
[16:01:26] CHVNX: has joined #ruby
[16:01:31] izzol: jhass: you right, when I checked it on some big file (10M) I have almost the same value.
[16:01:43] Spami: has joined #ruby
[16:01:50] Ilyes512: has joined #ruby
[16:01:53] Neomex_: has joined #ruby
[16:01:59] speakingcode: has joined #ruby
[16:03:09] shuber_: has joined #ruby
[16:05:04] lyuben_: has joined #ruby
[16:05:59] soulcake: has joined #ruby
[16:06:16] izzol: ehh, I'm trying to figure out how to do something like this in Ruby: $test = join('', <STDIN>);
[16:06:30] izzol: and so far no idea :(
[16:07:03] jhass: explain what it does
[16:07:07] izzol: join in perl basically separate strings of list into a single string
[16:07:09] BTRE: has joined #ruby
[16:07:22] izzol: the point is, in this example I don't need to use while()
[16:07:29] jhass: perl is so odd
[16:07:31] izzol: I can have whole file in $test.
[16:07:39] jhass: anyway, in ruby it's properly named split
[16:07:52] jhass: there's also various things to read in lines
[16:08:01] jhass: String#lines, IO#foreach, IO#readlines
[16:08:05] izzol: hmm, maybe split("\n") will work.
[16:08:11] jhass: String & IO #each_line
[16:08:14] sandelius: has joined #ruby
[16:08:22] jhass: use .lines for .split("\n")
[16:08:29] jstanton: has joined #ruby
[16:08:35] eam: <> in perl is the readline() function
[16:08:37] jhass: or for stdin foreach / readlines
[16:08:52] eam: $test = join('', <STDIN>); is the same as $test = join '', readline(STDIN)
[16:08:55] jhass: so this just reads it as a big chunk?
[16:09:02] eam: and in ruby: test = IO.readlines.join ''
[16:09:09] jhass: $stdin.read
[16:09:16] eam: jhass: yes that's even easier :)
[16:09:29] jhass: and a lot more efficient
[16:09:43] eam: yeah I'm just copying the idiom for ease of translation
[16:10:01] eam: izzol: if you're familiar with perl. IO.read is slurp-mode
[16:10:50] eam: the same as $\=undef; print readline(STDIN)
[16:10:53] jhass: did I mention that perl is really odd?
[16:11:00] eam: jhass: ruby is at least just as odd
[16:11:09] adaedra: <jhass> perl is so odd
[16:11:11] baweaver: has joined #ruby
[16:11:15] shuber_: has joined #ruby
[16:11:21] eam: fwiw everything I just mentioned about perl is also present in ruby
[16:12:15] shuber_: has joined #ruby
[16:12:33] eam: $\, $/ or the general IFS/OFS separators which are shared with bash, awk, nearly everything
[16:12:33] jhass: but not idiomatic
[16:12:43] tesuji: has joined #ruby
[16:13:05] commondream: has joined #ruby
[16:13:10] eam: ruby breaks from idiomatic unix, sure
[16:13:16] eam: it's much more uh
[16:13:21] eam: not unixy :)
[16:13:23] cirn0: has joined #ruby
[16:13:36] jhass: readable, that's the word
[16:13:40] elfuego: has joined #ruby
[16:13:49] eam: I wouldn't agree, ruby has all sorts of weird brain damage baked into the i/o layer
[16:14:01] eam: like, \n is hardcoded in a bunch of problematic places
[16:14:06] TinkerTyper: has joined #ruby
[16:14:06] jmignault: has joined #ruby
[16:14:27] eam: we used to call that "unix brain damage" because it made portability an issue
[16:14:52] eam: http://foldoc.org/Unix%20brain%20damage
[16:15:01] eam: perl handles modifying IFS/OFS quite well
[16:15:10] vt102: has joined #ruby
[16:15:24] blandflakes: has joined #ruby
[16:15:44] eam: but you know, it has dollar signs on the variables :)
[16:15:52] ljarvis: none of that refutes the claim that ruby is more readable...
[16:15:57] elfuego: I have a ruby script to generate 20 million row csv file, but I find it takes too long to generate, I am running this on a machine with intel xeon processor which stays at 26 % and 30 gb of ram and ruby only occupies 10 MB of ram. Is there a default cap on ruby memory utilization?
[16:16:22] ljarvis: elfuego: Ruby is slow
[16:16:24] canton7: writing to disk?
[16:16:34] elfuego: canton7: yes
[16:16:34] shuber_: has joined #ruby
[16:16:45] railsraider: has joined #ruby
[16:16:49] elfuego: canton7: disk isn???t maxed out either
[16:16:55] elfuego: canton7: 10 MB/s
[16:17:09] jhass: post your script, maybe there's a low hanging fruit
[16:17:10] mrdmi: has joined #ruby
[16:17:17] canton7: how many cores?
[16:17:28] lnr: has joined #ruby
[16:17:46] lnr: has joined #ruby
[16:17:56] railsraider: hi, im trying to make a logger that will automatically add the class name, module name, and method in it???s in http://pastie.org/10208255
[16:18:06] lnr: has joined #ruby
[16:18:09] railsraider: its always showing the extend method as the method name
[16:18:19] eam: ljarvis: sure it does
[16:18:21] davedev24: has joined #ruby
[16:18:24] lnr: has joined #ruby
[16:18:31] xxneolithicxx: has joined #ruby
[16:18:43] lnr: has joined #ruby
[16:18:53] ljarvis: railsraider: you'll have to parse caller. I think __method__ will always be explicit
[16:19:03] lnr: has joined #ruby
[16:19:11] apeiros: railsraider: Module.nesting always refers to the place in the code it is. like __LINE__ or __FILE__
[16:19:18] railsraider: at the moment i have to this at every method logger.progname = "#{Module.nesting.first.to_s} #{__method__}"
[16:19:22] lnr: has joined #ruby
[16:19:42] railsraider: im trying not to repeat myself
[16:20:17] _seanc_: has joined #ruby
[16:20:21] railsraider: looks to me like the callback for extend should be able to accept the method name somehow
[16:20:29] railsraider: but i can???t figure it out
[16:20:33] schiz: has left #ruby: ("WeeChat 1.2")
[16:20:54] v0n: has joined #ruby
[16:20:58] tubuliferous: has joined #ruby
[16:21:02] elfuego: jhass: https://gist.github.com/anonymous/ceca09db0937ac251968
[16:21:03] railsraider: i tried also using caller_locations(1,1)[0].label
[16:21:21] canton7: elfuego, how many cores do you have?
[16:21:23] s2013: has joined #ruby
[16:21:33] cirn0: has joined #ruby
[16:21:33] railsraider: but that doesn???t see the correct method it was trigger if the method im in is in private section
[16:21:53] elfuego: canton7: getting that info now
[16:22:28] railsraider: i would love to get any suggestions on how to make a logger that looks like this: I, [2015-05-26T18:37:17.998636 #55331] INFO -- AsCombinedMetrics::Cli::Config load_config: Loading config file (../combinedMetrics.yml)
[16:23:20] cirn0: has joined #ruby
[16:23:55] pengin: has joined #ruby
[16:24:04] ljarvis: railsraider: https://eval.in/370595
[16:24:06] PaulCapestany: has joined #ruby
[16:24:30] MasterPiece: has joined #ruby
[16:24:30] deric_skibotn: has joined #ruby
[16:24:34] _seanc_: has joined #ruby
[16:24:46] juanpaucar: has joined #ruby
[16:24:50] jhass: elfuego: that runs into the CPU cap here (fully exhausts one core)
[16:24:55] railsraider: thanks ljarvis i???ll give that a try
[16:25:29] elfuego: canton7: 4 cores
[16:25:36] ljarvis: caller_locations(0, 2) probably makes more sense
[16:25:56] ljarvis: or caller_locations(2).first
[16:25:59] canton7: elfuego, so it's maxing out a core?
[16:26:13] ljarvis: since you want the second caller location (the first is "extended")
[16:26:15] adaedra: railsraider: http://www.rubydoc.info/github/rack/rack/Rack/CommonLogger
[16:26:21] jhass: elfuego: given you generate uuids, do you have a good source for randomness? what's cat /proc/sys/kernel/random/entropy_avail while it's running?
[16:26:58] cirn0: has joined #ruby
[16:27:04] adaedra: railsraider: I had one (got the wrong thing), let me find it
[16:27:05] railsraider: thanks adaedra im trying to build a gem that will be executable
[16:27:06] elfuego: canton7 the overall cpu is 26% - its a windows server it doesn???t show usage on each core
[16:27:25] jhass: sounds like it's maxing out a core for you then too
[16:27:34] lnr: has joined #ruby
[16:27:35] railsraider: im using thor and aws-sdk for the majority of that
[16:27:53] lnr: has joined #ruby
[16:27:58] adaedra: railsraider: https://github.com/rudionrails/yell is what I used
[16:28:05] canton7: elfuego, sounds like it's maxing out a core. so you're cpu-bound
[16:28:10] lnr: has joined #ruby
[16:28:22] mello__: has joined #ruby
[16:28:44] lnr: has joined #ruby
[16:28:45] adaedra: not the exact same format, but may be setup
[16:28:45] railsraider: thanks a lot adaedra i???ll dig into the the code
[16:28:59] jhass: elfuego: how important is the order in which the generated lines end up in the CSV?
[16:29:03] vikaton: has joined #ruby
[16:29:03] lnr: has joined #ruby
[16:29:23] lnr: has joined #ruby
[16:29:43] lnr: has joined #ruby
[16:29:47] elfuego: canton7: just got to see usage on each core via resource monitor, no core is maxed out
[16:30:00] lnr: has joined #ruby
[16:30:00] elfuego: jhass: order doesn???t matter
[16:30:18] lnr: has joined #ruby
[16:30:25] MatthewsFace: has joined #ruby
[16:30:39] lnr: has joined #ruby
[16:30:59] lnr: has joined #ruby
[16:31:10] MatthewsFace: has joined #ruby
[16:31:15] lnr: has joined #ruby
[16:31:16] alexherbo2: has joined #ruby
[16:31:18] podman: has joined #ruby
[16:31:29] Oog: has joined #ruby
[16:32:03] cirn0: has joined #ruby
[16:33:17] v0n: has joined #ruby
[16:33:46] _seanc_: has joined #ruby
[16:34:22] bronson: has joined #ruby
[16:36:00] lnr: has joined #ruby
[16:36:21] lnr: has joined #ruby
[16:36:42] lnr: has joined #ruby
[16:37:03] lnr: has joined #ruby
[16:37:20] lnr: has joined #ruby
[16:37:28] neanderslob: has joined #ruby
[16:38:18] apeiros: +b lnr!*@*$#ruby-fix-your-connection
[16:38:23] apeiros: -o apeiros
[16:38:31] _seanc_: has joined #ruby
[16:38:45] izzol: ehh, I'm still getting undefined method `join' :(
[16:38:59] izzol: I think I don't understand how to use it :)
[16:39:31] eam: izzol: gist some code
[16:40:17] towski_: has joined #ruby
[16:40:51] wildroman2: has joined #ruby
[16:40:57] izzol: eam: https://gist.github.com/wolfedale/4af7bd3721a94d151357
[16:41:06] izzol: I'm trying different methods ;P
[16:41:36] eam: izzol: join is a method on an array object
[16:41:51] eam: $stdin.readlines returns an array of strings
[16:42:04] eam: $stdin.readlines.join '' returns a single string
[16:42:32] izzol: hmm, so I need to create an array, put whole file to the array and then use join() ?
[16:42:45] eam: that's how join works, right?
[16:43:36] izzol: not the one from perl :P
[16:43:44] treehug88: has joined #ruby
[16:44:17] antgel: has joined #ruby
[16:44:29] eam: izzol: yes, that is how perl's join works
[16:44:41] eam: you create an @array of strings, then you join @array, ''
[16:45:21] rbennacer: has joined #ruby
[16:45:33] eam: the only difference is in ruby, join is a method on the array object instead of a function that takes the array as a parameter
[16:45:46] eam: array.join vs join array
[16:45:59] izzol: eam: ok, I see the point
[16:46:07] Pathfinder: has joined #ruby
[16:46:22] emptyflask: has joined #ruby
[16:47:54] x1337807x: has joined #ruby
[16:48:14] nettoweb: has joined #ruby
[16:48:41] quimrsto_: has joined #ruby
[16:49:06] x1337807x: has joined #ruby
[16:49:11] fabrice31: has joined #ruby
[16:49:58] DexterLB: has joined #ruby
[16:50:30] jpfuentes2: has joined #ruby
[16:53:18] northfurr: has joined #ruby
[16:53:30] simpyll: has joined #ruby
[16:53:52] izzol: ok now it works
[16:54:04] izzol: but of course I have another problem, as always...
[16:54:26] tyfighter: has joined #ruby
[16:55:09] Spami: has joined #ruby
[16:55:57] izzol: I'm using 'mail' gem and my plan was to put to the Mail.read(my_stdin).
[16:56:06] djbkd: has joined #ruby
[16:56:08] izzol: But now I see it can read only strings/files.
[16:56:30] izzol: So I guess I need to have my stdin somewhere before I will read it by Mail.read :(
[16:56:35] izzol: but it's going to be slow again.
[16:56:52] Synthead: what type of comparison does ruby do in "case" clauses? case Server; when Server; puts "foo"; end doesn't seem to match
[16:57:01] towski_: has joined #ruby
[16:57:09] izzol: ok, tomorrow.
[16:57:46] Mon_Ouie: Synthead: It uses the '===' method
[16:57:48] Aswebb_: has joined #ruby
[16:58:20] Mon_Ouie: Class#=== checks if the rhs is an instance of the lhs (or one of its subclasses)
[16:58:33] DexterLB: has joined #ruby
[16:59:56] Synthead: Mon_Ouie: hmmm, ok. I'll get this to work. Thanks!
[17:01:28] troyready: has joined #ruby
[17:02:35] Akagi201: has joined #ruby
[17:02:40] _seanc_: has joined #ruby
[17:02:42] sigurding: has joined #ruby
[17:03:03] catcher: has joined #ruby
[17:03:51] catcher: What's the best way to test if a hash has a particular list of keys?
[17:04:46] shuber_: has joined #ruby
[17:04:47] towski_: has joined #ruby
[17:05:19] Scripore: has joined #ruby
[17:06:04] simpyll: has joined #ruby
[17:06:46] jhass: keys.all? {|key| hash.has_key? key }
[17:07:33] Palmer11: has joined #ruby
[17:08:42] antgel: has joined #ruby
[17:10:19] _seanc_: has joined #ruby
[17:10:30] wallerdev: has joined #ruby
[17:12:39] _seanc_: has joined #ruby
[17:12:52] that1guy: has joined #ruby
[17:14:35] pdoherty: has joined #ruby
[17:18:02] arietis: has joined #ruby
[17:18:43] Eiam: has joined #ruby
[17:18:47] codeFiend: has joined #ruby
[17:19:10] cirn0: has joined #ruby
[17:19:24] powersurge: has joined #ruby
[17:19:35] belak: has left #ruby: ("WeeChat 1.2")
[17:19:52] Rubie: has joined #ruby
[17:21:32] blogjy: has joined #ruby
[17:21:46] blogjy: how can I downgrade rails on windows?
[17:23:27] shevy: just like any other software?
[17:23:39] shevy: uninstall the current rails through the software center thingy
[17:23:49] shevy: ah you mean through gems?
[17:24:21] shevy: something like
[17:24:32] shevy: gem install rails --version=2.0.3
[17:24:50] xxneolithicxx: are there any tools for converting man pages to RDOC
[17:25:37] sandelius: has joined #ruby
[17:25:46] jerius: has joined #ruby
[17:26:54] simpyll: has joined #ruby
[17:28:13] that1guy: has joined #ruby
[17:28:50] arietis: has joined #ruby
[17:29:34] zapho54: has joined #ruby
[17:30:00] zapho54: Anyone here use Ruby in an exclusively functional style?
[17:30:32] hololeap: has joined #ruby
[17:30:42] mrsolo: has joined #ruby
[17:31:04] kobain: has joined #ruby
[17:33:15] ki0_: has joined #ruby
[17:34:27] cirn0: has joined #ruby
[17:35:32] hmnhf: has joined #ruby
[17:36:02] jpfuentes2: has joined #ruby
[17:36:03] Pathfinder: has joined #ruby
[17:36:48] rookie_eecs: has joined #ruby
[17:36:50] pengin: has joined #ruby
[17:37:16] thebastl: has joined #ruby
[17:38:09] ndrei: has joined #ruby
[17:38:21] cirn0_: has joined #ruby
[17:38:46] zapho54: has left #ruby: ()
[17:39:13] that1guy: has joined #ruby
[17:39:14] shadoi: has joined #ruby
[17:39:57] kaleido: has joined #ruby
[17:41:48] yqt: has joined #ruby
[17:42:40] bricker: has joined #ruby
[17:44:05] nfk: has joined #ruby
[17:44:34] hsps__: has joined #ruby
[17:45:03] railsraider: has joined #ruby
[17:47:07] wildroman2: has joined #ruby
[17:47:38] st1gma: got a question... does anybody know what compression is being used for a .gem? I got a gem that I need to modify so I have to "unbundle" it.
[17:47:41] ChoiKyuSang: has joined #ruby
[17:47:47] spiderbyte: has joined #ruby
[17:48:49] mikecmpbll: has joined #ruby
[17:48:51] cirn0: has joined #ruby
[17:49:25] rindolf: has joined #ruby
[17:49:48] havenwood: St1gma: gem unpack gem-name-here
[17:49:55] jhass: St1gma: pretty sure it's standard zip
[17:49:58] psye: has joined #ruby
[17:50:01] havenwood: rindolf: hi
[17:50:17] st1gma: learn something new everyday. I didn't know about gem unpack
[17:50:22] st1gma: thanks havenwood and jhass
[17:50:47] shevy: lib/rubygems/package.rb:require 'zlib'
[17:50:55] Igorshp: has joined #ruby
[17:51:09] shevy: "Builds a .gem file given a Gem::Specification. A .gem file is a tarball which contains a data.tar.gz and metadata.gz, and possibly signatures."
[17:51:13] Parker0: has joined #ruby
[17:51:27] shevy: def gzip_to io # :yields: gz_io
[17:51:33] shevy: gz_io = Zlib::GzipWriter.new io, Zlib::BEST_COMPRESSION
[17:52:02] shevy: how common is that idiom?
[17:52:03] shevy: when 'metadata.gz' then
[17:52:08] shevy: that you use an inlined "then"
[17:52:29] st1gma: it's just a tar
[17:52:32] jhass: not too common luckily
[17:52:32] shevy: https://gist.github.com/shevegen/abba51a70a558bd9528c
[17:52:44] commondream: has joined #ruby
[17:52:44] shevy: it confuses me because after the "then" is a newline
[17:52:48] st1gma: then a gz inside
[17:52:59] spider-mario: has joined #ruby
[17:53:01] shevy: I think apeiros liked those "then" constructs too
[17:53:05] commondream: has joined #ruby
[17:53:05] jhass: shevy: make a PR that removes then :P
[17:53:13] anaeem1: has joined #ruby
[17:53:16] jhass: I'll +1 it
[17:53:35] shevy: well it's ok for one-liners, if you really wanna write terse code perhaps
[17:53:37] portiad: has joined #ruby
[17:53:40] shevy: but multilines... now that is just weird
[17:53:52] rindolf: havenwood: hi. :-)
[17:54:22] shevy: require 'rubygems/package/tar_header'
[17:54:31] shevy: St1gma guess there is lots of goodies in there!
[17:55:06] shevy: that one is actually interesting, let me gist it
[17:55:18] shevy: https://gist.github.com/shevegen/d88195ef0db6b6f3627d
[17:55:24] shevy: ruby over a C struct :)
[17:55:37] jstanton: has joined #ruby
[17:55:52] shevy: new :name => fields.shift,
[17:55:58] shevy: never seen a standalone "new" yet
[17:56:14] shevy: I am beginning to understand how havenwood got all his secret extra knowledge
[17:56:24] imperator: shevy, i use then on multi-line if statements
[17:56:31] mtakkman: has joined #ruby
[17:56:32] yh__: has joined #ruby
[17:59:34] gusrub: has joined #ruby
[17:59:49] x1337807x: has joined #ruby
[18:00:01] dseitz: has joined #ruby
[18:00:07] redbullion: has joined #ruby
[18:01:12] djbkd: has joined #ruby
[18:01:21] dfockler: has joined #ruby
[18:01:41] commondream: has joined #ruby
[18:01:42] crazymykl: has joined #ruby
[18:01:46] djbkd: has joined #ruby
[18:02:52] phreakocious: has joined #ruby
[18:03:25] irobevjodu: has joined #ruby
[18:03:47] Akagi201: has joined #ruby
[18:04:18] mello: has joined #ruby
[18:04:19] scottstamp: has joined #ruby
[18:04:20] cirn0: has joined #ruby
[18:04:35] HotCoder: has joined #ruby
[18:04:52] sevvie: has joined #ruby
[18:05:36] sandelius: has joined #ruby
[18:06:03] baweaver: has joined #ruby
[18:06:18] miah: i've used 'rubygems/package/tar_header' a ton; i wish ruby had a real native tar library that wasn't awful.
[18:06:38] miah: you still have to do some fudging to detect long paths etc
[18:06:53] miah: minitar has the same problem
[18:06:53] idafyaid: has joined #ruby
[18:06:55] miah: last i checked
[18:07:01] riotjones: has joined #ruby
[18:08:51] Scripore: has joined #ruby
[18:09:12] ndrei: has joined #ruby
[18:09:35] Parker0: has joined #ruby
[18:09:45] sinkensabe: has joined #ruby
[18:10:34] qwertme: has joined #ruby
[18:10:41] lordkryss: has joined #ruby
[18:12:47] baweaver: has joined #ruby
[18:13:48] juanpaucar: has joined #ruby
[18:14:00] shevy: hmm how to grab 10 random elements of an Array? Should I use .sample 10 times or is there a better way?
[18:14:04] cirn0_: has joined #ruby
[18:15:08] imperator2: has joined #ruby
[18:15:43] xxneolithicxx: ACTION Universal consensus on optional keywords: I dont always use optional keywords, but when I do, I use them in a way that suits my style (screw yours :-) )
[18:16:24] baweaver: has joined #ruby
[18:16:33] Oog: has joined #ruby
[18:18:33] ravenreborn_: has joined #ruby
[18:19:04] andikr: has joined #ruby
[18:20:47] cirn0: has joined #ruby
[18:20:57] s2013: has joined #ruby
[18:23:24] jpfuentes2: has joined #ruby
[18:24:46] ndrei: has joined #ruby
[18:24:57] djbkd: has joined #ruby
[18:25:27] codeFiend: has joined #ruby
[18:26:27] baroquebobcat: has joined #ruby
[18:27:25] gusto: has joined #ruby
[18:28:45] rindolf: shevy: hi.
[18:28:51] rindolf: shevy: can the elements repeat?
[18:29:56] jhass: shevy: .sample(10) for 10 unique, Array.new(10) { .sample } for 10 with repetition
[18:30:32] shevy: .sample allows arguments - I don't think I used it with the argument-variant yet :)
[18:33:21] MeStesso: has joined #ruby
[18:33:32] MeStesso: hi. quick question. anyone knows of a pre-made url shortener server made in Ruby? something that just works out of the box. I found good ones just in PHP (YOURLS), and nothing in other languages. It will be used for internal purposes (same way Microsoft uses aka.ms, for example)
[18:35:04] duderonomy: has joined #ruby
[18:35:08] orionstein: has joined #ruby
[18:35:09] MeStesso: hi. quick question. anyone knows of a pre-made url shortener server made in Ruby? something that just works out of the box. I found good ones just in PHP (YOURLS), and nothing in other languages (PHP doesn't fit our stack). It will be used for internal purposes (same way Microsoft uses aka.ms, for example)
[18:35:25] ndrei: has joined #ruby
[18:35:36] MeStesso: (sorry wasn???t sure the message was sent)
[18:35:40] shevy: I like how the question becomes bigger and bigger at every iteration :)
[18:35:45] wjimenez5271: has joined #ruby
[18:36:03] MeStesso: shevy: sorry
[18:36:08] shevy: I don't know of an URL shortener in ruby myself though possibly the rails guys know such things?
[18:36:25] MeStesso: shevy: ok i???ll see there. thanks
[18:36:26] shevy: in that case you could always try to ask on #rubyonrails - do tell them that you have asked here too though
[18:36:35] bronson: has joined #ruby
[18:36:36] shevy: otherwise jhass here may be angry :P
[18:36:43] jhass: MeStesso: url shorter is like 50 loc
[18:36:52] MeStesso: jhass: something like YOURLS isn't
[18:37:01] jhass: table, feed id through base36, done
[18:37:13] jhass: >> 12344.to_s(36)
[18:37:14] ruboto: jhass # => "9iw" (https://eval.in/370605)
[18:37:20] MeStesso: but that???s written in PHP and uses MySQL. and i???m not going to add an entire LAMP stack in production just for that
[18:37:28] jhass: >> "9iw".to_i(36)
[18:37:29] ruboto: jhass # => 12344 (https://eval.in/370606)
[18:38:25] fabrice31: has joined #ruby
[18:39:02] shevy: in ruby stdlib, class CGI, I see this:
[18:39:03] shevy: CGI.autoload(:HtmlExtension, 'cgi/html')
[18:39:07] shevy: what exactly is it doing?
[18:39:27] yqt: has joined #ruby
[18:39:34] speakingcode: has joined #ruby
[18:39:44] jhass: using autoload
[18:40:10] jhass: module CGI; autoload :HtmlExtension, "cgi/html"
[18:41:35] jhass: hooks const_missing to load the file
[18:41:40] ndrei: has joined #ruby
[18:41:43] bootstrappm: has joined #ruby
[18:42:16] Hijiri: has joined #ruby
[18:42:46] commondream: has joined #ruby
[18:42:47] blogjy: When I try gem install rails --version=2.0.0 I get ERROR: Could not find a valid gem 'activeresource' (= 2.0.0) in any repository
[18:43:16] jhass: why that beyond ancient version?
[18:43:44] blogjy: installing rails on windows gave me some error and one answer on stackoverflow said that version is ok as is 2.1.5
[18:43:54] jhass: 2.0.0 - December 6, 2007 (179 KB)
[18:44:04] jhass: I mean... 8 years
[18:44:17] jhass: uh, do you confuse Ruby and Rails?
[18:44:26] commondream: has joined #ruby
[18:44:32] shuber_: has joined #ruby
[18:44:34] blogjy: http://stackoverflow.com/questions/28934078/stuck-installing-rails-rails-s-and-bundle-exec-rails-server-error
[18:44:44] railsraider: has joined #ruby
[18:45:00] shevy: 'Yeah, so I rolled back to 2.0.0. and it worked. You get "DL is deprecated, please use Fiddle" which I found here, Ruby 2.0.0p0 IRB warning: "DL is deprecated, please use Fiddle", is just a warning'
[18:45:02] jhass: yeah, they mean Ruby 2.0
[18:45:09] jhass: not Rails 2.0
[18:45:14] blogjy: so much for stackoverflow expertise!
[18:45:27] shevy: attention to detail blogjy :)
[18:45:29] jhass: well, it doesn't have an upvote!
[18:45:50] commondream: has joined #ruby
[18:45:54] shevy: I should pity-upvote it
[18:46:03] d10n-work: has joined #ruby
[18:46:05] jhass: ACTION prepares to down vote
[18:46:13] blogjy: actually the answer didn't give that gem install line
[18:46:35] wildroman2: has joined #ruby
[18:46:36] blogjy: i guess the answer is saying that if rails gives an error like that then the answer is to downgrade ruby to be 2.0.0?
[18:47:25] n008f4g_: has joined #ruby
[18:47:48] jhass: when did nokogiri become a rails dep anyway?
[18:48:03] havenwood: blogjy: Having trouble installing Nokogiri with 2.2 on Win?
[18:48:05] shevy: blogjy well, ideally you could try to use the most recent versions
[18:48:07] jhass: but given there's no newer nokogiri version than
[18:48:36] jhass: btw does anybody have a table with all ruby releases and their release dates?
[18:48:40] shevy: you can see the most recent nokogiri version here blogjy: https://rubygems.org/gems/nokogiri
[18:48:55] shevy: Last version release was - January 23, 2015 java (2.38 MB)
[18:48:58] blogjy: i'm totally new to this. i'm just trying to get the line 'rails s' to work.
[18:49:13] shevy: for me on linux it worked when I did "gem install rails"
[18:49:24] havenwood: blogjy: What version of Ruby are you using?
[18:49:31] shevy: I actually think it works on my windows machine downstairs too
[18:49:46] blogjy: C:\Ruby22-x64\bin\code>ruby -v
[18:49:46] blogjy: ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]
[18:49:46] blogjy: C:\Ruby22-x64\bin\code>rails -v
[18:49:46] blogjy: Rails 4.2.1
[18:49:49] shevy: but I am not entirely sure. windows is very confusing
[18:50:07] blogjy: that's how new i am to ruby, just put it on their yesterday
[18:50:12] shevy: it already works
[18:50:20] shevy: you left 80% of the newcomers on windows in the dust
[18:50:26] blogjy: i'll find the line that fails..
[18:52:16] shevy: "autoload works in a similar way to require, but it only loads the file specified when a constant of your choosing is accessed/used for the first time."
[18:52:26] shevy: when exactly do I need autoload or rather why
[18:52:30] shevy: or can I just require + include manually?
[18:52:40] jhass: it's not include
[18:52:47] jhass: it's just require
[18:53:02] edwinvdgraaf: has joined #ruby
[18:53:09] jhass: and yeah, never really got the point of autoload, faster load times I guess
[18:53:15] cirn0: has joined #ruby
[18:53:29] havenwood: blogjy: Do you have DevKit installed? Guessing that'll be the error. If you haven't already, install the DEVELOPMENT KIT from: http://rubyinstaller.org/downloads/
[18:53:34] shevy: well there is this old blog http://www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html
[18:53:41] shevy: but that actually scares me :\
[18:53:52] shevy: "Because require works straight away, the puts method gets executed immediately."
[18:54:15] shevy: so I guess, require() is simpler than autoload()
[18:54:25] jhass: it's not equivalent though
[18:54:54] graft: has joined #ruby
[18:55:11] kirun: has joined #ruby
[18:55:19] chinmay_dd: has joined #ruby
[18:55:41] graft: is there some sort of gem cache or something that i might need to flush out?
[18:55:59] shuber_: has joined #ruby
[18:56:02] graft: my rails console doesn't seem to be able to find a method on a class in a gem
[18:56:05] blogjy: so i do rails new rtgsf, that works. cd rtgsf. bundle install. that works. then rails s, gives this error http://pastebin.com/raw.php?i=Bhmswt9W "C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-
[18:56:05] blogjy: :in `require': cannot load such file -- nokogiri/nokogiri (LoadError)..." I do have the development kit installed to c:\dkt and c:\dkt\bin is in the path
[18:56:06] ruboto: blogjy, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[18:57:12] blogjy: alternative to pastebin link https://gist.github.com/anonymous/34ea4e8512f2705e7320
[18:57:32] graft: like a bundler cache?
[18:57:37] havenwood: blogjy: Check the link I pasted above for getting DevKit.
[18:58:40] Scripore: has joined #ruby
[18:59:10] pdoherty: has joined #ruby
[18:59:11] havenwood: blogjy: Installing DevKit helps you build C/C++ extensions on Windows for gems that have them like Nokogiri.
[18:59:15] jhass: graft: try bundle exec rails console
[18:59:34] blogjy: I already installed the devkit I already ran this file and extracted it http://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
[18:59:45] blogjy: which comes from that link you mentioned havenwood
[19:00:16] havenwood: blogjy: Did you run hte installation scripts?
[19:00:27] blogjy: i ran some command like ruby init dk.rb
[19:01:00] havenwood: blogjy: and also something like?: ruby dk.rb install
[19:01:08] turtil: has joined #ruby
[19:01:10] jerius: has joined #ruby
[19:01:10] blogjy: yeah that too, neither gave an error
[19:01:23] blogjy: C:\dkt>ruby dk.rb init and C:\dkt>ruby dk.rb install
[19:01:35] graft: jhass: tried it, no good. if i do my_instance.method(:some_other_method).source_location, it points to a file in my gem tree which clearly contains the method i want, but my_instance.method(:my_method) produces method not defined
[19:01:38] havenwood: blogjy: try?: gem install json --platform=ruby
[19:01:40] Scripore: has joined #ruby
[19:01:53] bb010g: has joined #ruby
[19:01:53] blogjy: tried that too no error
[19:01:58] mello: has joined #ruby
[19:01:59] havenwood: blogjy: gem install nokogiri
[19:02:06] imperator2: blogjy, ok, hang on - you're using 64-bit ruby, right?
[19:02:14] jhass: graft: uh, odd
[19:02:14] imperator2: blogjy, did you install devkit64?
[19:02:26] blogjy: the 64 bit dev kit
[19:02:30] blogjy: not sure about ruby i guess 64 bit
[19:02:33] graft: jhass: yeah, really have no idea what's going on.
[19:02:36] jhass: graft: how sure are you added it to the right class inside the file?
[19:02:48] blogjy: yeah ruby's 64 bit too
[19:03:02] blogjy: C:\Ruby22-x64\
[19:03:06] dopie: has joined #ruby
[19:03:09] graft: jhass: it's like two lines above the def some_other_method
[19:03:27] imperator2: blogjy, and what happened when you did gem install nokogiri?
[19:03:29] havenwood: blogjy: And does Nokogiri build successfully now?
[19:03:31] jhass: well, if one of those lines is class or module Something ... :P
[19:03:39] graft: jhass: definitely in the same class
[19:03:41] spiderbyte: has joined #ruby
[19:04:03] graft: there's not even a public/private distinction, they're both just ordinary public methods. one is defined, the other is not.
[19:04:09] graft: both are in the same source_location file
[19:04:25] blogjy: gem install nokogiri gave no error
[19:04:29] blogjy: but rails s still gives that error
[19:04:30] jhass: I'll stress it a bit more... did you save the file? (you don't want to know how often that happened to me...)
[19:04:34] cirn0_: has joined #ruby
[19:04:55] havenwood: blogjy: What error does `rails s` give you?
[19:04:58] shevy: jhass reveals the dark secrets
[19:05:00] graft: i'm looking at the file in my .rbenv/versions/2.2.0/lib/gems/blah/blah, i.e., the actual installed gem
[19:05:05] blogjy: https://gist.github.com/anonymous/206dafbd7985f6c56535
[19:05:29] havenwood: blogjy: bundle exec rails s
[19:06:24] blogjy: https://gist.github.com/anonymous/8d15fb463e56ef0b5fca
[19:06:52] blogjy: same error "C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-
[19:06:53] blogjy: :in `require': cannot load such file -- nokogiri/nokogiri (LoadError)"
[19:06:58] havenwood: blogjy: Run: bundle install
[19:07:00] mello_: has joined #ruby
[19:07:12] blogjy: i definitely did that one and i recall it worked but i'll do it again
[19:07:20] jhass: graft: doubt anybody will be able to do anything about it without hands on :/
[19:07:30] graft: works fine in irb, just not in rails console
[19:07:35] arup_r: has joined #ruby
[19:07:39] blogjy: Bundle complete! 12 Gemfile dependencies, 54 gems now installed.
[19:07:39] blogjy: Use `bundle show [gemname]` to see where a bundled gem is installed.
[19:07:40] graft: there's gotta be some stupid bundler thing going on
[19:07:42] blogjy: bundle install always worked
[19:07:53] blogjy: the error is with rails s
[19:07:55] havenwood: blogjy: Just to sanity check, retry: bundle exec rails s
[19:08:02] imperator2: blogjy, but you can require nokogiri in irb?
[19:08:25] jhass: graft: did you actually check the source_location of the working method in the bundle exec'd console?
[19:08:28] blogjy: bundle exec rails s, gives "C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-
[19:08:28] blogjy: :in `require': cannot load such file -- nokogiri/nokogiri (LoadError)"
[19:08:37] finisherr: has joined #ruby
[19:08:45] arup_r: Say I have a method `foo`.. i am calling it inside the method bar lile def bar; foo; end.. Is this called an indirect method access ?
[19:08:47] havenwood: blogjy: Error running?: ruby -rnokogiri -e "Nokogiri"
[19:08:49] blogjy: imperator: I don't know the answer to that question, I only installed ruby yesterday
[19:09:03] imperator2: blogjy, type "irb" in your console
[19:09:04] jhass: arup_r: never heard that term
[19:09:05] havenwood: blogjy: You could find out by typing `irb` then `require 'nokogiri'`.
[19:09:10] jhass: arup_r: where did you get it from?
[19:09:25] arup_r: jhass: http://ruby-doc.org/core-2.2.0/doc/syntax/refinements_rdoc.html#label-Indirect+Method+Calls
[19:09:35] arup_r: I am also confused
[19:09:45] imperator2: blogjy, then type: require 'nokogiri'
[19:09:50] blogjy: ruby -rnokogiri -e "Nokogiri" <-- gives, C:/Ruby22-64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
[19:09:52] jhass: arup_r: well, that very clearly defines what it means with that
[19:10:18] arup_r: Yes.. except those 3 ... what I said is called indirect method access also ?
[19:10:22] jhass: arup_r: using methods such as .send, .public_send, .method, .instance_method, .respond_to? to list a few more
[19:10:27] arup_r: I am jjust confused
[19:10:32] jhass: why would it?
[19:10:33] blogjy: C:\Ruby22-x64\bin\code\rtgsf>irb<ENTER>
[19:10:33] blogjy: irb(main):001:0> require 'nokogiri' LoadError: cannot load such file -- nokogiri/nokogiri from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `r
[19:10:41] bogdanteleaga: has joined #ruby
[19:10:56] leafybasil: has joined #ruby
[19:12:04] imperator2: blogjy, oh, wait a minute...i think nokogiri provides precompiled binaries
[19:12:14] imperator2: but it doesn't have one for ruby 2.2 yet
[19:13:22] imperator2: you can build from source but it requires having libxml & libxslt on your system
[19:13:46] workmad3: has joined #ruby
[19:13:53] blogjy: i'm a newb, is that a huge process?
[19:14:09] codelurker: has joined #ruby
[19:14:11] jhass: about as huge as downgrading to 2.1 I guess
[19:14:19] imperator2: easier to downgrade to ruby 2.1 :)
[19:14:42] graft: probably even easier just to run an ubuntu vm
[19:14:54] cirn0: has joined #ruby
[19:14:56] jhass: don't make it too easy, where's the fun!
[19:15:05] apeiros: imperator2: same as imperator?
[19:15:22] imperator2: apeiros, yep, got 2 machines going
[19:15:25] jhass: another person in need of a bnc :P
[19:15:35] iamjarvo: has joined #ruby
[19:15:41] blogjy: what's the easy way to downgrade to ruby 2.1?
[19:15:50] havenwood: blogjy: Uninstall Ruby 2.2 and install Ruby 2.1.
[19:16:03] davedev24_: has joined #ruby
[19:16:05] blogjy: any command to do it? or do i have to go through add/remove programs?
[19:16:16] imperator2: or just download and install the 2.1 installer and set your PATH
[19:16:29] imperator2: i think it comes with an uninstall option on the start menu
[19:16:43] blogjy: ok i'll look at the gui
[19:16:46] platzhirsch: has joined #ruby
[19:17:09] tejasmanohar: has joined #ruby
[19:17:20] tejasmanohar: i have a URL and i want to find a bunch of places around the web that this URL was linked
[19:17:36] tejasmanohar: like http://autolotto.io?ref=01794e9d1e for example
[19:17:50] tejasmanohar: but without excluding results that use http://autolotto.io/?ref (notice the "/" before the "?")
[19:18:06] tejasmanohar: if i just google the URL, it pulls up the exact link... 1 result - not results that include the link.
[19:18:11] tejasmanohar: anyone know ideas for this?
[19:18:33] _blizzy_: has joined #ruby
[19:19:08] jhass: ACTION searches the Ruby in the question :P
[19:19:11] kaleido: a hadoop cluster thats constantly crunching the contents of every website on the planet?
[19:19:16] kaleido: best of luck with that
[19:19:22] jhass: GA/piwik based referrer analysis might be your best bet I fear
[19:19:59] tejasmanohar: basically backlinks. hm ok jhass youre probably right
[19:20:36] baroquebobcat: has joined #ruby
[19:20:37] PaulCapestany: has joined #ruby
[19:20:38] blogjy: judging by the description here http://rubyinstaller.org/downloads/ I should use a 2.1.x 32bit if starting off. As otherwise i have to deal with compatibility problems as 64bit ruby is very new in windows and 2.1.x is stable one they recommend
[19:20:49] tejasmanohar: jhass and yeah theres no ruby in the question, sorry :P - i've just found that sometimes the people can shine some insight into other questions too
[19:20:56] tejasmanohar: (guessing they've faced similar things etc)
[19:21:02] creakybones: has joined #ruby
[19:21:05] imperator: blogjy, i'd go with that for simplicity, yes
[19:21:25] havenwood: blogjy: and then the corresponding 32-bit DevKit then
[19:22:37] cirn0_: has joined #ruby
[19:22:45] blogjy: what should i do to get rid of the rails installation i have?
[19:22:51] blogjy: i've got rid of the ruby one i have
[19:23:27] dudedudeman: This stack overflow does a good job of walking through it
[19:23:31] jhass: I don't know the windows paths, but I'd say good chances that got rid of the rails one too
[19:25:26] imperator2: blogjy, how did you install rails?
[19:25:27] sigurding: has joined #ruby
[19:25:33] moretti: has joined #ruby
[19:25:45] blogjy: i don't remember exactly i guess i double clicked an exe!
[19:26:01] blogjy: i think that removed it though, removing ruby
[19:26:19] davedev24: has joined #ruby
[19:26:22] imperator2: ok, you can install rails from the command line
[19:26:32] arietis: has joined #ruby
[19:27:21] Jackneill: has joined #ruby
[19:27:21] Zai00: has joined #ruby
[19:27:49] jefus: has joined #ruby
[19:29:16] edwinvdgraaf: has joined #ruby
[19:29:58] jerius: has joined #ruby
[19:30:21] davedev24_: has joined #ruby
[19:30:44] thebastl: has joined #ruby
[19:33:09] luckyme: has joined #ruby
[19:34:29] Akagi201: has joined #ruby
[19:36:30] jhass: did make fun of PHP already today? I don't think. So http://www.commitstrip.com/en/2015/05/26/php-7-twice-faster-than-php-5/
[19:36:53] tjbiddle: has joined #ruby
[19:37:11] sparr: has joined #ruby
[19:39:38] robertodecurnex: has joined #ruby
[19:41:11] tejasmanohar: do a lot of people here use activerecord or better to keep all activerecord questions to #ror
[19:41:38] jenrzzz: has joined #ruby
[19:41:39] jhass: I'd say both
[19:41:41] bootstrappm: I can only speak for myself but yes, I use it
[19:42:10] balazs: with Rufus::Scheduler it is not safe to update a hash in different threads, right ?
[19:42:19] tejasmanohar: User.where.not(:referrer_id => nil).group_by_day(:created_at).sum(:referrals_count) is my current query for finding 2nd round referrals. :referrer_id is the user id of the person who referred them
[19:42:21] Hijiri: has joined #ruby
[19:42:28] tejasmanohar: since user belongs_to :referrer, :class_name => "User", :foreign_key => "referrer_id" has_many :referrals, :class_name => "User", :foreign_key => "referrer_id"
[19:42:41] tejasmanohar: now , im trying to find 3rd round referrals so .where.not(:referrer_id => nil WHERE the referred of THIS referred is also NOT nil
[19:42:53] tejasmanohar: not really sure if this can be done in an activerecord query... any thoughts? do i just need to loop through all the users in a rake task and do some # crunching
[19:42:58] mpistone: has joined #ruby
[19:43:04] bootstrappm: alright .... for stuff like that I drop down into SQL
[19:43:08] bootstrappm: love me some postgres
[19:43:12] tejasmanohar: and, yeah let me know if that doesn't make much sense- it's kinda a hard question to ask
[19:43:29] tejasmanohar: bootstrappm: and is that possible in 1 SQL joined query or do i need to loop through a bunch of data?
[19:43:50] tejasmanohar: bleh i havent done raw SQL in forever, we'll see how this goes :P bootstrappm
[19:44:06] bootstrappm: hahah I'll re-read your question slower tejasmanohar and see if I can help, one sec
[19:44:41] woodennails: has joined #ruby
[19:45:09] jhass: ?crosspost tejasmanohar
[19:45:10] ruboto: tejasmanohar, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[19:45:14] tejasmanohar: quick description is i have a query to find referred users who referred other users (2nd round referrals) but now i need to find referred users who referred other users who referred other users --> counts of these kinda referrals
[19:45:25] tejasmanohar: jhass: i did, i cancelled my post there- you see?
[19:45:31] jhass: oh nvm, that question just looked the same :P
[19:45:40] tejasmanohar: 14:41:48 tejasmanohar | moving this to #ruby
[19:45:45] tyfighter: has joined #ruby
[19:45:45] cirn0: has joined #ruby
[19:46:05] tejasmanohar: jhass: np, ive done it before as you know and am trying to avoid that now ;)
[19:46:57] banister: has joined #ruby
[19:46:58] danman: has joined #ruby
[19:48:00] tejasmanohar: bootstrappm: btw im also looking here https://github.com/rails/arel
[19:48:15] shazaum: has joined #ruby
[19:48:22] ndrei: has joined #ruby
[19:49:48] djbkd: has joined #ruby
[19:50:08] blogjy: i installed ruby 2.1.6 32bit then did gem install rails, and I got rails 4.2.1 is that compatible?
[19:50:21] moted: has joined #ruby
[19:50:21] cirn0: has joined #ruby
[19:50:33] havenwood: blogjy: yup
[19:51:28] finisherr: has joined #ruby
[19:53:50] ndrei: has joined #ruby
[19:54:23] jerius: has joined #ruby
[19:55:09] arup_r: why the shit is happening.. always empty array ? https://gist.github.com/aruprakshit/d85f336e35ab563121ff
[19:55:31] vdamewood: has joined #ruby
[19:56:06] Deele: has joined #ruby
[19:57:57] emptyflask: has joined #ruby
[19:58:15] thebastl: has joined #ruby
[19:59:47] jpfuentes2: has joined #ruby
[20:01:12] gluten_hell: has joined #ruby
[20:01:29] cirn0_: has joined #ruby
[20:01:41] codecop: has joined #ruby
[20:02:40] juanpaucar: has joined #ruby
[20:03:22] blogjy: C:\rubyblah\a>gem install json --platform=ruby <ENTER> gives error https://gist.github.com/anonymous/25f347e83d1398e12ed4 "ERROR: Error installing json:ERROR: Failed to build gem native extension...."
[20:03:36] al2o3-cr: arup_r: try: table = CSV.read("#{__dir__}/test.txt", headers: true)
[20:03:57] bronson: has joined #ruby
[20:04:32] arup_r: al2o3-cr: Ok.. but why mine one is not working ?
[20:04:38] bootstrappm: hey tejasmanohar what does referrals_count mean semantically?
[20:04:48] havenwood: arup_r: Because #new doesn't take a path as the first argument like #read.
[20:04:49] bootstrappm: like, what information does it give you?
[20:04:49] pragmatism: has joined #ruby
[20:04:54] tejasmanohar: bootstrappm: # of referrals uses counter cache
[20:05:13] bootstrappm: and could you put the relationships you pasted in one line into a gist and share it? kind of confusing seeing it in one line
[20:05:20] paulcsmith: has joined #ruby
[20:05:27] havenwood: blogjy: Forget the json gem. Was just what Nokogiri docs suggest to test but it should be updated to something you'd actually install. Does Nokogiri build?
[20:05:31] bootstrappm: as far as I can tell you CAN get the information you're looking for using AR if you do the join right
[20:05:34] byprdct: has joined #ruby
[20:05:36] blogjy: even bundle install, in the project directory, doesn't work
[20:05:41] havenwood: blogjy: Error?
[20:05:43] tejasmanohar: yes bootstrappm
[20:05:43] bootstrappm: its not going to read pretty and I'd prefer to do it in SQL but yes, its possible
[20:05:54] Palmer11: has joined #ruby
[20:06:01] blogjy: actually bundle install might work..
[20:06:19] havenwood: arup_r: #new's first arg is data not the path to the file containing the data
[20:06:28] arup_r: humm "This constructor will wrap either a String or IO object passed in data for reading and/or writing.
[20:06:31] arup_r: misread it
[20:06:34] havenwood: arup_r: sees you want #read, so use #read
[20:06:57] blogjy: nope bundle install doesn't work, tells me about installing jeson.. https://gist.github.com/anonymous/0828c53e490787fc2b98
[20:07:21] blogjy: says "An error occurred while installing json (1.8.2), and Bundler cannot continue.
[20:07:21] blogjy: Make sure that `gem install json -v '1.8.2'` succeeds before bundling."
[20:07:29] tejasmanohar: https://gist.github.com/tejasmanohar/0b0e01af6ce0ac865c5b bootstrappm
[20:08:49] blogjy: output of gem install json -v '1.8.2' https://gist.github.com/anonymous/43c47230e824751e421a
[20:09:05] bootstrappm: thanks tejasmanohar
[20:09:23] ndrei: has joined #ruby
[20:09:23] havenwood: blogjy: Seems you may have the wrong version of DevKit installed for your Ruby?
[20:09:34] tejasmanohar: bootstrappm: but yeah you get my question right? 3rd level referrals
[20:09:34] freerobby: has joined #ruby
[20:09:38] havenwood: blogjy: ruby dk.rb init --force
[20:09:51] havenwood: blogjy: then reinstall
[20:10:05] bootstrappm: yeah, I'd phrase it more as "people who have been referred by other people who have been referred" tejasmanohar, makes imagining the logic a bit easier
[20:10:06] havenwood: blogjy: I think you're using your previous DevKit install.
[20:10:20] blogjy: havenwood: oh i think you're right re previous devkit install
[20:10:27] blogjy: i'll remove that devkit
[20:10:28] tejasmanohar: well i already have that
[20:10:42] tejasmanohar: or wait yeah youre right bootstrappm
[20:10:52] blogjy: i'll rmdir that devkit.. i think that is how to uninstall that one
[20:11:01] blogjy: as i installed it via extraction i think
[20:11:03] Takle: has joined #ruby
[20:11:30] jpfuentes2: has joined #ruby
[20:12:17] swgillespie: has joined #ruby
[20:12:31] bootstrappm: what DB you using tejasmanohar?
[20:12:37] iamjarvo: has joined #ruby
[20:12:52] mrmargolis: has joined #ruby
[20:13:16] edwinvdgraaf: has joined #ruby
[20:14:35] codecop_: has joined #ruby
[20:14:36] Deele: has joined #ruby
[20:14:46] tejasmanohar: bootstrappm: i have "# of referrals by people who were referred" and am trying to get "# of referrals by people who were referred by people who were referred"
[20:14:49] tejasmanohar: postgresql bootstrappm
[20:15:16] x1337807x: has joined #ruby
[20:15:25] bootstrappm: cool tejasmanohar, gonna give you some SQL to try first on the console just to make sure we're getting the data we want
[20:15:53] baweaver: has joined #ruby
[20:16:31] Igorshp: has joined #ruby
[20:17:05] ndrei: has joined #ruby
[20:17:07] tejasmanohar: bootstrappm: ok, hm User.where.not(:referrer_id => nil).group_by_day(:created_at).sum(:referrals_count) is my current query in AR
[20:17:21] tejasmanohar: if its possible in SQL is it possible in AR or is that not always true bootstrappm ?
[20:17:24] ernham: has joined #ruby
[20:17:45] tejasmanohar: ^^ and that query (my current one) is "# of referrals by people who were referred" but im trying to go a level deeper in the where: so i can get "# of referrals by people who were referred by people who were referred"
[20:17:53] bootstrappm: yep, completely understand you
[20:18:04] bootstrappm: its usuuually possible in AR, this one definitely is
[20:18:55] blogjy: rails s now works
[20:19:00] havenwood: blogjy: \o/
[20:19:05] bootstrappm: when its not you can drop down into AR's query builder, which is that Arel thing you were looking at
[20:19:24] bootstrappm: and when even that proves difficult there's a method or two to execute raw SQL
[20:20:52] tejasmanohar: im looking too, its the embedded "where" thats throwing me off
[20:21:23] jhass: you'll need a self join for starters
[20:21:50] wildroman2: has joined #ruby
[20:22:17] jpfuente_: has joined #ruby
[20:22:22] Kricir: has joined #ruby
[20:22:28] cirn0: has joined #ruby
[20:22:37] bootstrappm: ^ which means you'll need to alias users as two different 'tables' and use fully qualified identifiers in your where
[20:23:49] vikaton: has joined #ruby
[20:23:50] tejasmanohar: oh bootstrappm hm
[20:24:08] tejasmanohar: bootstrappm: is it better to loop through and do number crunching or is that harder?
[20:24:30] bootstrappm: that'd prob be easier but more inefficient
[20:24:36] bootstrappm: let the database do the work for you though, one sec
[20:24:37] sandelius: has joined #ruby
[20:24:53] tejasmanohar: looking at docs on this hm
[20:25:12] tejasmanohar: i mean i am using a self-joining association
[20:25:51] sandelius: I've read that alot of people think that ActionController::Base(Metal) should be a module. I don't get that, a controller is a controller and without ActionController::Base it's not one. What do you think?
[20:25:59] MrBeardy: has joined #ruby
[20:26:07] sandelius: ApplicationController should be a module
[20:26:37] bootstrappm: tejasmanohar try this in your psql console: SELECT goal.referrals_count, goal.referrer_id, close_referrers.id, close_referrers.referrer_id FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
[20:26:44] bootstrappm: sorry in advance for syntax errors etc.
[20:27:01] fabrice31: has joined #ruby
[20:27:18] bootstrappm: throw a limit in there if you have a lot of data and you don't want to wait a wihle
[20:27:34] tejasmanohar: bootstrappm: how does the goal stuff work?
[20:27:51] bootstrappm: goal is just a name I gave the table of the people you actually want
[20:27:58] bootstrappm: hence, its the 'goal' of this query
[20:28:09] bootstrappm: that's not like 'a thing', I just called it goal in this specific case
[20:28:16] tejasmanohar: do i need to generate that table or is that done by the query?
[20:28:19] jerius: has joined #ruby
[20:28:23] bootstrappm: done by the query
[20:28:29] cirn0_: has joined #ruby
[20:28:47] bootstrappm: "users AS goal" just means call this table goal
[20:29:00] Takle: has joined #ruby
[20:29:05] bootstrappm: I do it because in the join I also use users and call it `close_referrers`
[20:29:07] jhass: User.joins("JOIN users AS referred ON referred.referrer_id = users.id").joins("JOIN users AS second_referred ON second_referred.referrer_id = referred.id").group_by("second_referred.id").count something like that? I'm not good with this
[20:29:23] Bermulium: has joined #ruby
[20:29:43] Bermulium: So, str = "Some string"; n = str #this will not copy str into n
[20:29:51] jhass: Bermulium: right!
[20:29:52] Bermulium: but rather make it point in the same memory address
[20:29:56] Bermulium: jhass, Damn :p
[20:30:14] tejasmanohar: SELECT goal.referrals_count, goal.referrer_id, close_referrers.id, close_referrers.referrer_id FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
[20:30:16] tejasmanohar: ok ill give it a shot
[20:31:04] bootstrappm: I just tested it on my end tejasmanohar, that works
[20:31:05] Bermulium: jhass, str = "Some string"; n = str; str = str.upcase #this will not affect n, how come?
[20:31:13] bootstrappm: let me know if the data you're seeing makes sense and we'll make it ActiveRecord-y
[20:31:18] tejasmanohar: bootstrappm: can i manually run the SQL raw in activerecord?
[20:31:31] jhass: Bermulium: because .upcase returns a copy, it doesn't modify the receiver
[20:31:35] bootstrappm: you can but that kind of defeats the purpose of using ActiveRecord haha
[20:31:45] havenwood: Bermulium: compare with #upcase!
[20:31:50] tejasmanohar: bootstrappm: oh so `rails dbconsole` ?
[20:31:50] jhass: Bermulium: if you were to leave of the str =, it wouldn't affect str either
[20:32:00] tejasmanohar: bootstrappm: because ... im using heroku thats where mmost of the good data is ;)
[20:32:16] Takle: has joined #ruby
[20:32:22] kriskropd: has joined #ruby
[20:32:22] tejasmanohar: bootstrappm: and i cant run `heroku run rails dbconsole` since there's no psql client on heroku's machine installed
[20:32:47] bootstrappm: if you don't mind having non-portable stuff in your app, AKA if you're not planning on changing RDBMS then just encapsulate that sql in a method and go for it
[20:33:00] bootstrappm: wait tejasmanohar there's something cool i remember about connecting to a heroku DB
[20:33:06] Bermulium: Oh okey. So after the = ..., str now points to a different block in memory and all changed made to it won't affect n?
[20:33:15] tejasmanohar: bootstrappm: https://gist.github.com/tejasmanohar/5448485bbab7fae8c803
[20:33:22] tejasmanohar: oh maybe in heroku's management console
[20:33:48] mrmargolis: has joined #ruby
[20:33:52] blogjy: out of interest, since i've forgotten.. can you install rails prior to installing the devkit?
[20:34:01] tejasmanohar: oh i got it bootstrappm it has a uri for me in management console
[20:34:03] bootstrappm: from the folder where you have the app that has the associated DB do this: `heroku pg:psql` tejasmanohar
[20:34:18] bootstrappm: that's not supposed to be a tongue-face, its a : P
[20:34:36] jpfuentes2: has joined #ruby
[20:34:51] tejasmanohar: wow https://gist.github.com/tejasmanohar/0a1ebbe5ae6e4d6ba8bc
[20:34:57] ndrei: has joined #ruby
[20:35:05] tejasmanohar: so referrals_count is the # of 3rd level referrals ? bootstrappm
[20:35:07] tejasmanohar: doesnt seem right for my data
[20:35:36] paulcsmith: has joined #ruby
[20:35:36] bootstrappm: add a goal.id as the first column in that select
[20:35:41] bootstrappm: just to make sure yo're not getting duplicate data for some reason
[20:36:26] tejasmanohar: im not https://gist.github.com/tejasmanohar/0a1ebbe5ae6e4d6ba8bc bootstrappm
[20:36:27] bootstrappm: or just do SELECT DISTINCT
[20:36:49] tejasmanohar: bootstrappm: whats all the referrals_count => 0 about?
[20:37:07] bootstrappm: tejasmanohar that means your 3rd degree referral isn't referring manyo ther people
[20:37:31] tejasmanohar: but the id's list my 3rd degree referrals, right?
[20:37:34] bootstrappm: or simply enough time hasn't passed for your viral loop to get that far
[20:37:36] tejasmanohar: that seems right
[20:38:05] tejasmanohar: so this chart is of my third degree referrals, and the id's are the id's of them
[20:38:14] tejasmanohar: and then there's some data about them in the following columns, right bootstrappm ?
[20:38:24] tejasmanohar: ah i get the query now i think
[20:38:45] ndrei: has joined #ruby
[20:38:58] tejasmanohar: or am i mistaken? bootstrappm
[20:39:36] dopie: has joined #ruby
[20:39:41] bootstrappm: correct though in the following columns there's also some info about the person that referred them
[20:39:48] bootstrappm: one sec, i'm making it a bit clearer
[20:40:08] tjbiddle: has joined #ruby
[20:40:41] tejasmanohar: im just really trying to get the COUNT of the # of third degree referrals bootstrappm
[20:40:53] bootstrappm: SELECT goal.id AS "id of this 3rd degree referrak", goal.referrals_count AS "# of people this person referred", close_referrers.id AS "id of person that referred this person", close_referrers.referrer_id AS "id of 1st person in chain" FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
[20:40:57] bootstrappm: that should make it clearer
[20:41:19] edwinvdgraaf: has joined #ruby
[20:41:52] bootstrappm: then just throw a count in there: SELECT COUNT(goal.id) FROM users AS goal JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id WHERE close_referrers.referrer_id IS NOT NULL;
[20:42:08] edwinvdgraaf: has joined #ruby
[20:42:12] n_blownapart: has joined #ruby
[20:43:09] tejasmanohar: https://gist.github.com/tejasmanohar/00730fc469c7000d1e50 so this means 638 total 3rd deg referrals bootstrappm
[20:43:09] jhass: NOT NULL?
[20:43:39] anaeem1: has joined #ruby
[20:43:49] tejasmanohar: i think that may be unecessary ? jhass
[20:44:00] bootstrappm: that's right tejasmanohar. Yes jhass he's looking for people where the person that referred them was also referred by somebody. Hence the person that referred them's referrer_id is not null
[20:44:05] bootstrappm: not unecessary I swear hahah
[20:44:14] Igorshp: has joined #ruby
[20:44:46] tejasmanohar: since there are ruby "nil" when i did my AR queries earlier
[20:45:31] tejasmanohar: bootstrappm: so this can be done in AR?
[20:45:37] leafybasil: has joined #ruby
[20:45:38] bootstrappm: yep, working on that part now
[20:45:48] tejasmanohar: but why not just embed raw SQL in AR? bootstrappm
[20:45:56] tejasmanohar: and then get the value in ruby var and show it
[20:46:02] jhass: but wouldn't that include any level?
[20:46:16] tejasmanohar: or actually nvm its better with AR since i do things like group gem etc
[20:46:23] aryaching: has joined #ruby
[20:46:27] bootstrappm: oh jhass is right tejasmanohar, this includes 3rd level and above
[20:46:42] jhass: say you have a chain of null -> a -> b -> c -> d, it'll include a -> b, b -> c and c -> d, no?
[20:46:44] bootstrappm: need another join to get 3rd level exclusive
[20:46:46] tejasmanohar: 3rd level and above meaning 3+ (so 4, 5 , 6 etc)
[20:46:53] tejasmanohar: thats fine actually
[20:47:07] bootstrappm: and the reason to not get embed SQL in AR is portability and purism
[20:47:19] tejasmanohar: i was just trying to get the picture i can add in exclusions etc later myself once i see the picture
[20:47:27] tejasmanohar: and i think that data is beneficial to me though im no data scientist and i dont know one
[20:47:35] bootstrappm: if you're more comfortable with AR, plan to switch database type, or just generally like ruby over SQL then you shouldn't embed the sql ... if none of those are true go ahead and do it
[20:47:53] jhass: .joins("SQL fragment").where("SQL fragment").count("SQL fragment") will be as good as you get here I think
[20:49:28] adamholt: has joined #ruby
[20:50:06] bootstrappm: yeah, I agree. If you use the AR associations (@user.referrers or User.all.collect {|u| u.referrers }) your app is gonna be doing more work
[20:50:07] wildroman2: has joined #ruby
[20:50:13] bootstrappm: If your DB isn't huge it doesn't matter much, but just an FYI
[20:50:22] zagaza: has joined #ruby
[20:50:28] zagaza: hi guys, where is the gemfile located in windows 8?
[20:50:37] tejasmanohar: bootstrappm: doesnt matter as much
[20:50:44] tejasmanohar: i think AR helps me a lot since i use some ar gems
[20:51:29] bootstrappm: zagaza Gemfile exists per repo / app ... not system-wide
[20:51:54] gambl0re: has joined #ruby
[20:52:06] last_staff: has joined #ruby
[20:52:23] tejasmanohar: bootstrappm: when i join the sql fragments is it like
[20:53:08] tjbiddle: has joined #ruby
[20:53:14] bruno-: has joined #ruby
[20:53:19] zagaza: bootstrappm oh ok, so for jekyll, I guess jekyll.rb ?
[20:53:23] bootstrappm: tejasmanohar its basically what jhass said: http://guides.rubyonrails.org/active_record_querying.html#joining-tables
[20:54:09] bootstrappm: zagaza jekyll installs as a system-wide binary. do `jekyll new whatever`
[20:54:14] tejasmanohar: User.joins("SELECT COUNT(goal.id) FROM users AS goal").joins("users AS close_referrers ON goal.referrer_id = close_referrers.id").where("close_referrers.referrer_id IS NOT NULL;")
[20:54:15] bootstrappm: then in the whatever folder should be your gemfile
[20:54:48] tejasmanohar: bootstrappm: what is the method if i just wanna run the SQL query raw?
[20:54:58] tejasmanohar: and get the # in ruby var
[20:55:10] tejasmanohar: or sry nvm i cant do that i forgot since im using groupdate ruby gem
[20:55:24] zagaza: bootstrappm: do you mean the _config.yml?
[20:55:39] tejasmanohar: zagaza: no, he doesn't :)
[20:55:48] willharrison: has joined #ruby
[20:55:51] bootstrappm: zagaza I've never used jekyll, if in that folder there is no Gemfile ... you might not need a Gemfile?
[20:56:00] tejasmanohar: i've used jekyll
[20:56:02] x1337807x: has joined #ruby
[20:56:04] zagaza: I need to add this to my gemfile: gem 'wdm', '~> 0.1.0' if Gem.win_platform?
[20:56:07] tejasmanohar: config yml is for jekyll settings
[20:56:20] tejasmanohar: i wrote a jekyll site before zagaza https://github.com/LanceMatch/LanceMatch
[20:56:22] tejasmanohar: i used Gemfile
[20:56:27] tejasmanohar: its not 100% necessary
[20:56:35] wjimenez5271: has joined #ruby
[20:56:38] tejasmanohar: not required by jekyll, many sites dont use external gems
[20:56:44] zagaza: ah cool, so I can just add it there ?
[20:56:48] tejasmanohar: yeah of course
[20:56:55] x1337807x: has joined #ruby
[20:56:57] zagaza: what's the gemfile.lock?
[20:56:59] tejasmanohar: you can add a gemfile anywhere you want
[20:57:03] tejasmanohar: its generated with all the deps etc
[20:57:11] tejasmanohar: take a peek, pretty self explanatory
[20:57:18] tejasmanohar: specific versioning etc
[20:57:36] tejasmanohar: bootstrappm: do i have the right idea for that active record statement?
[20:57:38] Hijiri: has joined #ruby
[20:57:51] tejasmanohar: User.joins("SELECT COUNT(goal.id) FROM users AS goal").joins("users AS close_referrers ON goal.referrer_id = close_referrers.id").where("close_referrers.referrer_id IS NOT NULL;")
[20:58:31] banister: has joined #ruby
[20:58:38] bootstrappm: tejasmanohar its closer to something like this: User.joins('users AS close_referrers ON referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
[20:58:43] multi_io: has joined #ruby
[20:58:47] ndrei: has joined #ruby
[20:58:51] goodcodeguy: has joined #ruby
[20:58:54] DerisiveLogic: has joined #ruby
[20:59:17] zagaza: hmm tejasmanohar, I added gemfile but still getting that error with jekyll: "Please add the following to your Gemfile to avoid polling for changes:
[20:59:17] zagaza: gem 'wdm', '>= 0.1.0' if Gem.win_platform?"
[20:59:38] tejasmanohar: gist your gemfile
[20:59:52] tejasmanohar: and the error and what command ur running to bring up the err
[21:01:01] tejasmanohar: bootstrappm: is "AS" allowed? rails doesnt seem to like that
[21:01:09] bootstrappm: might not be :/
[21:01:11] zagaza: tejasmanohar: https://gist.github.com/danneniko/e99419e006ec25863876
[21:01:12] phutchins: has joined #ruby
[21:01:31] bootstrappm: let me check the AR syntax real quick
[21:01:31] tejasmanohar: PSQL doesnt seem to like it i think
[21:01:37] tejasmanohar: im looking one sec
[21:02:59] tejasmanohar: https://gist.github.com/tejasmanohar/33b0324a47b096aa39ef
[21:03:07] tejasmanohar: looking zagaza
[21:03:43] tejasmanohar: never used if Gem.win_platform? zagaza but seems logical. have you run `bundle`
[21:03:46] visof: has joined #ruby
[21:03:58] GPrime: has joined #ruby
[21:04:03] bootstrappm: my mistake tejasmanohar, include keyword "JOIN" at the beginning of the joins clause
[21:04:11] jhass: zagaza: try gem install wdm instead
[21:04:32] zagaza: I tried gem install wdm, but got a bunch of errors
[21:04:32] tejasmanohar: bootstrappm: hm like this ? User.joins('JOIN users AS close_referrers ON referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
[21:04:53] bootstrappm: alternatively you can try the association syntax tejasmanohar: User.joins(:referrer).where.not(referrer: {referrer_id: nil}) tejasmanohar
[21:05:00] jpfuentes2: has joined #ruby
[21:05:02] tak1n: has joined #ruby
[21:05:07] zagaza: jhass: https://gist.github.com/danneniko/bc1f704a369bea690d2f
[21:05:14] zagaza: tejasmanohar: bundle install?
[21:05:16] tesuji: has joined #ruby
[21:05:45] tejasmanohar: irb(main):001:0> User.joins('JOIN users AS close_referrers ON referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
[21:05:46] zagaza: ah ok nvm I needed bundler first
[21:05:47] tejasmanohar: PG::AmbiguousColumn: ERROR: column reference "referrer_id" is ambiguous
[21:06:03] tejasmanohar: hm but im running it on User.
[21:06:04] idafyaid: has joined #ruby
[21:06:46] tejasmanohar: oh this looks a lot more AR-y, irb(main):003:0> User.joins(:referrer).where.not(referrer: {referrer_id: nil}) PG::UndefinedTable: ERROR: missing FROM-clause entry for table "referrer"
[21:06:50] casadei: has joined #ruby
[21:07:05] jhass: zagaza: sounds like wdm is incompatible to Ruby 2.2
[21:07:11] GPrime: has joined #ruby
[21:07:52] tejasmanohar: oh i think i understand the 2nd err
[21:07:56] Igorshp: has joined #ruby
[21:08:10] zagaza: jhass ah I see
[21:08:17] zagaza: should I install an older ruby?
[21:08:27] tejasmanohar: User.joins(:referrer).where.not(referrer_id: {referrer_id: nil})
[21:08:35] jhass: zagaza: might be the simplest solution, try 2.1
[21:08:36] tejasmanohar: wait nvm that still fails, its a JOIN hmm
[21:08:48] tejasmanohar: bootstrappm: do you follow this error? kinda weird
[21:08:55] zagaza: how do I uninstall the old? just plain uninstall?
[21:09:15] tejasmanohar: zagaza: consider a version manager like rvm or rbenv
[21:09:20] jhass: ACTION not a windows user, *shrug*
[21:09:34] jhass: but I guess so
[21:09:35] tejasmanohar: consider not using windows too lolol
[21:09:49] zagaza: I'll try uninstalling :)=
[21:10:17] tejasmanohar: i thought rubyinstaller on windows could do multiple versions
[21:10:49] dru`: has joined #ruby
[21:11:04] bootstrappm: tejasmanohar one sec
[21:12:06] bootstrappm: tejasmanohar the first error is right, referrer_id there is ambiguous because both users and referrers have it
[21:12:08] bootstrappm: going to need to alias it using .from
[21:12:12] bootstrappm: the second error ...
[21:12:16] asmodlol: has joined #ruby
[21:12:28] zagaza: ok so I installed ruby 2.1
[21:12:34] zagaza: and when I do ruby dk.rb init
[21:12:50] zagaza: I get sh.exe": /c/Ruby22-x64/bin/ruby: No such file or directory
[21:12:56] bootstrappm: is odd, I would assume it'd be able to infer the table name from the class_name you declared in the association
[21:12:57] zagaza: but my ruby folder changed to Ruby21-x64
[21:13:18] einarj: has joined #ruby
[21:14:01] zagaza: so the question is, how do I change that folder in the init to Ruby21-x64? i am completely new to ruby
[21:14:10] startupality: has joined #ruby
[21:16:12] bootstrappm: tejasmanohar try: User.from('users AS goal').joins('JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').count
[21:16:14] zagaza: nvm fixed it
[21:17:08] einarj: has joined #ruby
[21:19:47] zagaza: jhass: gem install wdm worked with 2.1, thanks
[21:20:31] hololeap: has joined #ruby
[21:23:13] last_staff: has joined #ruby
[21:23:15] Akagi201: has joined #ruby
[21:24:30] FernandoBasso: has joined #ruby
[21:25:01] vickleton: has joined #ruby
[21:25:56] iamjarvo: has joined #ruby
[21:26:58] djbkd: has joined #ruby
[21:28:01] Takle: has joined #ruby
[21:28:40] mrmargol_: has joined #ruby
[21:29:10] mrsolo: has joined #ruby
[21:30:17] turtil: has joined #ruby
[21:30:18] dopie: has joined #ruby
[21:34:38] tejasmanohar: bootstrappm: oh had irc notificatoins off, still playing around with this
[21:34:40] tejasmanohar: lemme try that
[21:35:23] tejasmanohar: bootstrappm: is there a difference b/w this query and the one directly in PSQL earlier?
[21:35:24] bkxd: has joined #ruby
[21:35:27] tejasmanohar: because this returns 640
[21:35:43] tejasmanohar: ah i think this one is just 3rd level and the other is 3rd +? is that correct bootstrappm ?
[21:36:01] baweaver: has joined #ruby
[21:37:22] valeriansaliou: has joined #ruby
[21:38:33] workmad3: has joined #ruby
[21:38:52] gambl0re: does anybody here know javascript??
[21:38:59] bootstrappm: no it should return the same tejasmanohar, no difference
[21:39:06] bootstrappm: i do gambl0re but why not ask in ##javascript?
[21:39:51] gambl0re: cause they're fckuing igoring me for some reason..
[21:40:02] gambl0re: my question is probably too basic for them experts..
[21:40:10] jhass: how long did you wait?
[21:40:18] tejasmanohar: ask there now, i joined the channel
[21:40:23] gambl0re: http://jsbin.com/yojatawume/1/edit?js,console ....why isn't it returning 64?
[21:40:50] jhass: ^ nobody answers this
[21:40:53] tejasmanohar: gambl0re: why dont you drop some console.logs in between
[21:40:57] startupality: has joined #ruby
[21:41:01] jhass: gambl0re: how long did you wait?
[21:41:08] tyfighter: has joined #ruby
[21:41:14] asmodlol: has joined #ruby
[21:41:23] Notte: has joined #ruby
[21:41:59] graydot: has joined #ruby
[21:42:10] gambl0re: long enough...
[21:42:26] gambl0re: theres plenty of activity in there for people to see my message.
[21:43:06] ForkingPaths: has joined #ruby
[21:43:09] tejasmanohar: gambl0re: how long?
[21:43:09] bootstrappm: then you've prob offended them somehow hahha
[21:43:20] bootstrappm: first things first gambl0re your indentation is fucked, fix it
[21:43:36] ForkingPaths: has joined #ruby
[21:43:45] jhass: please take it to ##javascript, this is #ruby after all
[21:43:45] gambl0re: code is too small to really care about indentation.
[21:44:00] tejasmanohar: bootstrappm: this is where im at rn https://gist.github.com/tejasmanohar/b032f0973312aa3ada13. i could group by day earlier with my old query User.where.not(:referrer_id => nil).group_by_day(:created_at).count
[21:44:01] DoubleMalt: has joined #ruby
[21:44:10] tejasmanohar: gambl0re, your attitude prob pissed them off
[21:44:18] tejasmanohar: i wish ##javascript had logs so i could check how long you waited :P
[21:44:24] tejasmanohar: (but only ##node.js does)
[21:44:33] ForkingPaths: has joined #ruby
[21:44:59] graydot: has joined #ruby
[21:45:10] jhass: that's why I don't find any? :(
[21:45:12] edwinvdgraaf: has joined #ruby
[21:45:20] bootstrappm: gambl0re if you don't care about your indentation i don't care about helping you
[21:45:38] jpfuentes2: has joined #ruby
[21:45:42] tejasmanohar: bootstrappm: do you know how i can debug this one? id love to p some stuff, but not seeming to do the trick. running this in rails c btw
[21:45:54] tejasmanohar: questioning why the group by date works after the where earlier and not now
[21:46:00] paulcsmith: has joined #ruby
[21:46:00] bootstrappm: tejasmanohar since created_at can be in goal or in close_referrers you have to specify which one you're referring to
[21:46:01] tejasmanohar: is it not returning activerecord objects or something?
[21:46:08] bootstrappm: replace created_at with goal.created_at
[21:46:12] DoubleMalt: hey people, is there a rails channel on freenode?
[21:46:16] gambl0re: damn...its like 10 lines of code. i'm asking those who want to help to help. if you dont want to help then fine.
[21:46:24] tejasmanohar: DoubleMalt: /join #RubyOnRails
[21:46:25] bootstrappm: DoubleMalt its #ror i believe
[21:46:31] tejasmanohar: *that redirects, yeah
[21:46:42] c355E3B: gambl0re: check your return
[21:46:57] tejasmanohar: bootstrappm: but goal is not an available variable at that point in the query is it ?
[21:47:03] tejasmanohar: group_by_day(goal.created_at)
[21:47:05] bootstrappm: gambl0re: it matters because my your indentation it looks like you believe var result = 1 only executes in the case of the if, which isn't the case
[21:47:09] jhass: I'm serious, take it to ##javascript
[21:47:11] bootstrappm: tejasmanohar: make it a string
[21:47:22] tejasmanohar: ahh ok that makes sense
[21:47:31] tejasmanohar: gambl0re: just use a freaking js beautifier
[21:47:33] edwinvdgraaf: has joined #ruby
[21:47:45] jhass: do I have to start kicking people?
[21:47:46] tejasmanohar: and ask in ##javascript and wait lol, its such an active channel
[21:49:48] swgillespie: has joined #ruby
[21:50:39] Vitor: has joined #ruby
[21:51:15] tejasmanohar: how could <%= line_chart
[21:51:17] tejasmanohar: User.from('users AS goal').joins('JOIN users AS close_referrers ON goal.referrer_id = close_referrers.id').where('close_referrers.referrer_id IS NOT NULL').group_by_day('goal.created_at').count %> be
[21:51:19] tejasmanohar: be considered 1..2 arguments?
[21:51:26] juanpaucar: has joined #ruby
[21:51:36] tejasmanohar: oh wait nvm i had a linebreak oops editor
[21:52:29] bootstrappm: also don't use queries in your views, bad form. put it in a helper method or something
[21:53:34] bootstrappm: figured out the association syntax tejasmanohar: User.joins(:referrer).where.not(referrers_users: {referrer_id: nil})
[21:54:11] rodfersou: has joined #ruby
[21:54:13] bootstrappm: don't ask why the table name AR gives the association is 'referrers_users' because I don't know ... but it does work
[21:54:32] workmad3: bootstrappm: habtm join table
[21:54:51] workmad3: bootstrappm: which has the convention of using both table names in lexical order
[21:57:27] jpfuentes2: has joined #ruby
[21:58:11] shevy: we need to make ruby more kickass
[21:59:57] bootstrappm: shevy how do we do that_
[21:59:58] nettoweb: has joined #ruby
[22:00:23] jhass: yeah, ruboto is already written in ruby, and it does most definitely kick asses
[22:00:29] shevy: we need to improve the quality of the gems
[22:00:50] shevy: old and abandoned projects should be picked up by people - see when _why left and others took over shoes
[22:01:09] bootstrappm: yeah, I remember that ... were all his projects picked up?
[22:01:16] shevy: not sure actually
[22:01:35] shevy: I think it was somewhere collected in some umbrella project
[22:01:41] wallerdev: has joined #ruby
[22:01:58] shevy: aha http://whymirror.github.io/
[22:02:03] bootstrappm: I'm down to help, I've been devoting a lot of my free time to developing publicly as I'll be leaving my company soon, been wanting to get my public presence up
[22:02:11] bootstrappm: any gems in particular yo have in mind shevy?
[22:02:25] shevy: quite amazing how many of his projects have been taken over :)
[22:02:29] shevy: bootstrappm well
[22:02:35] shevy: I am looking at an old project here
[22:02:48] shevy: http://www.erikveen.dds.nl/rubywebdialogs/
[22:02:49] marr: has joined #ruby
[22:02:59] shevy: dunno how useful it is... from 2005 or 2006 is the last changelog entry
[22:03:05] shevy: but it's just an example, I am sure there are many others like that
[22:03:42] shevy: ok so ... _why's projects seem to be covered hehe... I think only one has not found a new maintainer
[22:03:52] Hijiri: has joined #ruby
[22:04:06] shevy: what is this:
[22:04:08] shevy: https://github.com/whymirror/yown/blob/master/samples/simple.io
[22:04:23] shevy: I can't tell whether he was joking or serious
[22:04:40] bootstrappm: looks like a web page tester
[22:04:57] shevy: this one was cool: https://github.com/Sophrinix/sandbox
[22:05:08] platzhirsch: has joined #ruby
[22:05:17] shevy: do we have a sandbox for ruby?
[22:05:42] bootstrappm: that .io stuff is not ruby ... though I'm sure you caught that hahah
[22:05:47] bootstrappm: whats a sandbox shevy?
[22:05:53] bootstrappm: ah just saw the link
[22:05:54] elfuego: has joined #ruby
[22:06:04] shevy: I remember I once asked _why for the source to it :)
[22:06:11] serivichi: has joined #ruby
[22:06:13] shevy: I think he did the initial variant of tryRuby with it
[22:06:16] shevy: irb on the web
[22:08:03] iamjarvo: has joined #ruby
[22:08:29] momomomomo: has joined #ruby
[22:09:06] bootstrappm: whoa, what his become of his old domain!? http://whytheluckystiff.net/about/
[22:09:12] bootstrappm: one of the great internet tragedies
[22:09:48] freerobby: has joined #ruby
[22:10:45] mary5030: has joined #ruby
[22:11:20] baweaver: has joined #ruby
[22:13:18] shevy: some mysteries in life can never be figured out
[22:15:51] fabrice31: has joined #ruby
[22:16:13] einarj: has joined #ruby
[22:16:42] bootstrappm: hello there xxneolithicxx
[22:16:57] xxneolithicxx: hideho rubyist!
[22:17:30] bootstrappm: you got me curious shevy, started googling how people decide which projects to contribute too
[22:17:53] jhass: the answer "looks fun, lacks this thing I can do"
[22:18:04] xxneolithicxx: anything that makes me better at my job or I find interesting and know how to solve problems for
[22:18:40] casadei: has joined #ruby
[22:19:24] willharrison: has joined #ruby
[22:20:28] startupality: has joined #ruby
[22:20:41] shevy: bootstrappm I guess one way is for projects that are popular
[22:21:20] bootstrappm: I think there's different kinds. There are people that run into a bug and pull request / fix it and then there are people that are involved with the other committers and follow the progress of a project ... and one doesn't necessarily lead into the other
[22:22:34] Aeyrix: Morning y'all
[22:23:17] bootstrappm: there's this: https://www.openhub.net/ but most of the projects on the homepage need some lower level knowledge
[22:23:38] bootstrappm: there's this: http://www.codetriage.com/ ... I see a lot of Python
[22:23:41] bootstrappm: morning Aeyrix
[22:23:44] momomomomo: has joined #ruby
[22:25:12] swgillespie: has joined #ruby
[22:25:18] Coraline: Also CodeMontage (OSS projects for social good)
[22:25:21] Coraline: And openhatch
[22:25:58] xxneolithicxx: I was looking at the metrics on that openhub yesterday, was quite interesting and wonder how accurate it is
[22:25:59] mary5030: has joined #ruby
[22:26:18] xxneolithicxx: the trending data seems to show people dropping/moving away from C/C++ for Python
[22:26:24] concave: has joined #ruby
[22:26:44] arietis: has joined #ruby
[22:27:24] eam: xxneolithicxx: I think most of the C/C++ is toward java
[22:27:45] rodfersou: has joined #ruby
[22:27:47] eam: python serves a fairly different problem space
[22:27:52] eam: (as does ruby)
[22:27:54] xxneolithicxx: shoot me pls, ill take C++ over Java any day
[22:28:35] eam: well, yes
[22:29:31] xxneolithicxx: it does but i think Python's rise is probably more due to lower barrier to entry than most the others and increased use in OS (Linux) space
[22:30:00] shevy: people combine a high level language with a low level language
[22:30:23] xxneolithicxx: like that hot mess of embedding python in java that i seen somewhere the other day
[22:30:26] shevy: look at the old days of the C hackers using perl
[22:30:42] jhass: well, pretty sure java is considered a high level language
[22:30:43] shevy: well that's an improvement still xxneolithicxx
[22:30:44] eam: keep in mind, everything is growing in absolute terms
[22:30:45] shevy: more python, less java
[22:30:53] eam: it's not like C++ use is shrinking
[22:31:24] eam: heck, there's probably more FORTRAN written today than at any point in history
[22:31:39] xxneolithicxx: I know, i really think if C++ was backed with community repos for deploying libs like ruby/python/perl it would bring more people back to it
[22:31:47] bootstrappm: I really hope that's not true O_O, what industry uses FORTRAN a lot?
[22:31:48] shevy: people still use FORTRAN?
[22:31:50] eam: xxneolithicxx: what do you think distros are? :)
[22:32:01] eam: shevy: yeah, it still dominates for fast math
[22:32:12] eam: xxneolithicxx: seriously though, that's what rpm is
[22:32:54] xxneolithicxx: but its OS independent is what i mean in the same way that gem/pip are
[22:33:02] eam: no it's not?
[22:33:10] eam: you can run rpm on windows, freebsd, osx
[22:33:24] eam: there are deb distros for all those platforms as well
[22:33:25] xxneolithicxx: rpm on Windows?
[22:33:36] eam: http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-other-os.html
[22:33:49] eam: rpm and deb run on more platforms than gem does
[22:33:49] al2o3-cr: has joined #ruby
[22:33:50] Aeyrix: Is it as garbage as C++ itself?
[22:34:08] xxneolithicxx: that doesnt count as windows support
[22:34:18] eam: xxneolithicxx: you can build it native
[22:34:37] eam: rpm is a very generic spec
[22:34:38] xxneolithicxx: but who the hell will...
[22:34:59] eam: well, sure, but who the hell runs ruby on windows (and the answer to both: a few crazy folks)
[22:34:59] xxneolithicxx: just because u can doesnt mean its actually useful
[22:35:20] Aeyrix: I have a pretty good set-up on Windows
[22:35:33] xxneolithicxx: i stopped trying to develop on Windows when I got on Linux and noticed how easy it was to set stuff up
[22:35:47] Aeyrix: Works with everything, strips windows newlines for my unix stuff.
[22:35:55] Aeyrix: Never had an issue
[22:36:00] nettoweb: has joined #ruby
[22:36:48] Aeyrix: The potential frustration in it though is probably why ruby isn't taught at universities versus python
[22:37:02] Aeyrix: Python has that stupid ide
[22:37:06] willharrison: has joined #ruby
[22:37:32] xxneolithicxx: I think natural readability for a new coder is much better with Python as well
[22:37:46] eam: there's also more industry support behind python
[22:38:18] Aeyrix: No end statements for blocks passes pisses me off
[22:38:22] Aeyrix: Fuck this phone
[22:38:26] eam: python and ruby both target the jvm though, so really there's no issue of platform support
[22:38:29] Aeyrix: I'm never buying a HTC again.
[22:38:56] eam: (and I do say that tongue in cheek)
[22:39:15] shevy: Aeyrix what ide?
[22:39:22] Aeyrix: I forget what it's called.
[22:39:41] xxneolithicxx: that is not an IDE lol
[22:39:49] shevy: http://en.wikipedia.org/wiki/IDLE_%28Python%29
[22:39:58] shevy: "IDLE (Integrated DeveLopment Environment) is an integrated development environment for Python"
[22:40:07] shevy: I want squeak for ruby
[22:40:07] Aeyrix: Yeah that's an idea of
[22:40:13] Radar: Aeyrix: I think Ruby isn't taught at universities because it is not an academic language like Python is.
[22:40:19] Aeyrix: That's an ide *
[22:40:24] Radar: We don't have a NumPy or SciPi equivalent.
[22:40:27] shevy: Aeyrix keep that phone, it's making you funnier
[22:40:38] Aeyrix: I'm buying a fucking iPhone
[22:40:45] Aeyrix: Goddamn I hate htc
[22:41:08] Radar: Aeyrix: Are you done?
[22:41:11] xxneolithicxx: its the barest IDE if you want to call it that, its just a freakin REPL
[22:41:15] shevy: I thought some sciruby folks wanted to remedy this
[22:41:16] jhass: isn't there sciruby actually?
[22:41:23] Radar: ACTION hands Aeyrix a chill pill
[22:41:28] Aeyrix: Yeah but it's not as fully featured.
[22:41:39] eam: fortran integration lacking
[22:41:44] Aeyrix: 12C today Radar, don't need.
[22:41:47] goodcodeguy: has joined #ruby
[22:41:53] Radar: When I inevitably teach Ruby at a university, I will be getting the students to setup an Ubuntu VM and installing Ruby on that as lesson 1.
[22:42:01] jhass: Aeyrix: doesn't sound like you don't need it...
[22:42:07] kinduff: has joined #ruby
[22:42:08] Aeyrix: Go away jhass
[22:42:15] Aeyrix: You're like a troll but you have op
[22:42:22] Aeyrix: Radar: Which uni?
[22:42:32] Radar: Aeyrix: *shrug* one of the many out there
[22:42:50] Aeyrix: Ah, no short term plans for that?
[22:43:10] Radar: Why would I make short term plans?
[22:43:23] shevy: Ubuntu VM
[22:43:25] jhass: you could make a short term plan to make a long term plan
[22:43:26] Aeyrix: I make plans for getting out of the bathroom in case the building sets on fire.
[22:43:30] shevy: how will they install ruby Radar? :)
[22:43:34] Aeyrix: I have no idea why you wouldn't make a short term plan.
[22:43:34] eam: teaching interns within the industry is pretty fun
[22:43:47] Radar: shevy: chruby + ruby-install of course.
[22:43:56] eam: huge bonus: no dealing with university bureaucracy
[22:44:00] xxneolithicxx: i think we just found our local dooms day prepper
[22:44:10] xxneolithicxx: ACTION looks at Aeyrix
[22:44:12] Radar: eam: Sure, if you can find a company who's willing to hire interns.
[22:44:16] Aeyrix: xxneolithicxx: Haha it's kind of a subconscious thing.
[22:44:20] eam: Radar: are you kidding?
[22:44:20] Radar: eam: imo that's pretty pie in the sky thinking.
[22:44:25] shevy: jhass! looook!!!! http://www.benfrederickson.com/unicode-insanity/
[22:44:26] Aeyrix: Or unconscious, I don't do it deliberately.
[22:44:30] eam: Radar: what country are you located in?
[22:44:36] edwinvdg_: has joined #ruby
[22:44:39] Radar: eam: No company I've worked for has been willing to hire interns with the purpose of training them up.
[22:44:40] Aeyrix: shevy: That article is balderdash.
[22:44:41] Radar: eam: Australia.
[22:44:54] eam: Radar: ah, maybe different over there but in silicon valley intern season is HUGE
[22:45:02] shevy: Aeyrix it is all the things!!!!!!!
[22:45:06] Radar: eam: Are the SV interns paid?
[22:45:09] shevy: imagine a huge thread of code
[22:45:09] eam: yes very well
[22:45:14] Radar: eam: Good :)
[22:45:14] shevy: containing ALL code that has ever been written
[22:45:15] eam: Radar: ~70-90k?
[22:45:17] shevy: and ever will be written
[22:45:26] Radar: eam: I would love it if we could do the same here. I think it'd be beneficial to the commuity.
[22:45:38] kinduff: has joined #ruby
[22:45:44] eam: I've even seen discussions about how we can create a lower position because the hiring bar for interns has gotten so high
[22:46:05] eam: like "ok how about internship apprentices"
[22:46:13] xxneolithicxx: 70-90k for SV? are you joking, have you seen their living expenses?
[22:46:13] Radar: eam: The fear that I've heard is that we'll train up the intern and then they'll leave and go somewhere else.
[22:46:29] eam: xxneolithicxx: not joking
[22:46:31] Radar: 70-90k is good pay for AU :)
[22:46:32] weemsledeux: has joined #ruby
[22:46:44] xxneolithicxx: i wouldnt step foot in SV for anything less that 100-120k
[22:46:46] starless: has joined #ruby
[22:46:47] shevy: Aeyrix haha the guy from that webpage asks what this yields in python: print unichr(0x61b) + " what does this print out ?!?" and it yields me a "SyntaxError: invalid syntax"
[22:46:50] eam: xxneolithicxx: as a summer intern?
[22:46:55] mary5030: has joined #ruby
[22:47:02] helpa: http://i.imgur.com/tyViD.gif
[22:47:10] xxneolithicxx: im well past interning age lol
[22:47:11] eam: well as a senior guy I agree
[22:47:15] Radar: fwiw I agree with xxneolithicxx
[22:47:18] eam: I'd demand twice that minimum ;)
[22:47:25] eam: but as an intern, 90k oughta be doable
[22:47:42] xxneolithicxx: sure, doable in half a garage lol
[22:47:49] Radar: Living the live
[22:47:52] Radar: living the life*
[22:47:53] eam: xxneolithicxx: it's not even close to that bad
[22:47:54] shevy: bill gates slept in a garage!!!
[22:48:06] Radar: shevy: Yeah but he wasn't exploited as cheap labour :P
[22:48:11] xxneolithicxx: eam: have you not read the stories of 1k rent for garages?
[22:48:16] eam: xxneolithicxx: I just got back this morning from preping a rental for sale, 3bd home in sunnyvale I've been renting for 2k/mo
[22:48:26] eam: I'm pretty up to speed on the market
[22:48:27] shevy: xxneolithicxx garages are that pricey??
[22:48:34] Radar: eam is old
[22:48:36] xxneolithicxx: shevy: hell yes
[22:48:39] eam: xxneolithicxx: most of what you see are for the extremely fashionable neighborhoods in SF
[22:48:40] shevy: good old eam
[22:48:42] shevy: perl guru
[22:48:49] shevy: fossil unix hacker
[22:48:59] eam: and asshole silicon valley slumlord
[22:49:16] eam: seriously though it's not so expensive
[22:49:23] shevy: actually, California would be my favourite area in the USA
[22:49:33] eam: live in san leandro, interns don't have kids
[22:49:36] xxneolithicxx: i dunno man, ill take my 90 and work from home
[22:49:42] eam: I think they can tolerate 20 minutes on the train
[22:49:50] cirn0: has joined #ruby
[22:49:56] jenrzzz: has joined #ruby
[22:49:59] Radar: I tolerate 20 minutes on the train :)
[22:50:06] eam: Radar: I tolerate 60
[22:50:10] shevy: "At least half of the fruit produced in the United States is now grown in California, and the state also leads in the production of vegetables."
[22:50:11] Radar: eam: hardcore
[22:50:14] Radar: eam: I bet you get a seat?
[22:50:21] eam: Radar: indeed I'm at the very end of one line
[22:50:28] eam: schools out that far are great
[22:50:32] shevy: 60 minutes standing
[22:50:41] eam: shevy: sitting, with a mifi
[22:50:45] eam: it's not bad
[22:51:03] eam: 2 hours a day to write code without coworkers bothering me
[22:51:04] jhass: shevy: let me quote from your link: "In fact, if your code isn't using Unicode to represent strings right now, you're almost certainly doing it wrong."
[22:51:10] xxneolithicxx: when i was in Atlanta as an intern i took two buses and a train to go to work with a 1-2hr commute each way
[22:51:25] shevy: jhass I have lost faith in that guy, his python example does not even work
[22:53:01] momomomomo_: has joined #ruby
[22:53:13] mistergibson: has joined #ruby
[22:53:56] eam: btw, san leandro: http://sfbay.craigslist.org/eby/apa/5043938227.html 2bd for $1k
[22:54:26] xxneolithicxx: carpet? never lol
[22:54:30] eam: now, in palo alto, that 2bd is going to be 3.5-4k
[22:54:49] jhass: shevy: probably stuck on python 2
[22:54:58] xxneolithicxx: well i guess i know who to ask if i ever decide to go work in CA
[22:55:04] shevy: eam is that cheap? that seems quite pricey
[22:55:13] njs126: has joined #ruby
[22:55:19] eam: shevy: it's one of the cheaper areas in the bay area (excluding dangerous)
[22:55:30] shevy: guess that was it for my plans to go there
[22:55:47] xxneolithicxx: shevy wouldve had enough to land a shed lol
[22:55:56] eam: shevy: well, you'll make 7-9x that as an intern and 15-25x that as a grown up
[22:56:01] finisherr: has joined #ruby
[22:56:31] xxneolithicxx: no but it is seriously bad in some areas for low income people
[22:56:43] eam: xxneolithicxx: it totally is. A 50k salary isn't affordable
[22:57:04] eam: (which is median, non-tech)
[22:57:29] eam: xxneolithicxx: quite a bit of non-tech commutes in from the exurbs though
[22:57:45] eam: eg tracy, vallejo, gilroy
[22:58:37] MrBeardy: has joined #ruby
[22:59:30] eam: median family income in sunnyvale, CA (which is a fairly representative mix of nice/run down areas) is 105k
[23:00:21] djbkd: oakland is in a bit of a rebirth. not sure i'd raise a family there, though, tbh.
[23:00:29] commondream: has joined #ruby
[23:00:57] bootstrappm: uff all this talk of prices, cities, states makes me miss NYC
[23:00:58] eam: djbkd: yeah, piedmont is nice, but the prices climb sharply
[23:01:13] djbkd: temescal is gentrifying rapidly if you can believe it
[23:01:16] bootstrappm: been in guatemala for a little over 2 yrs now ... might be heading back stateside by years end
[23:01:25] bootstrappm: think Boston though, had enough of NYC
[23:01:25] eam: djbkd: I can, I have a cousin in that area
[23:01:27] eam: it's lovely
[23:01:55] paulcsmith: has joined #ruby
[23:02:04] RegulationD: has joined #ruby
[23:02:36] baweaver: has joined #ruby
[23:02:54] djbkd: if i was raising a family, i'd probably stay in Alameda.
[23:03:06] Hijiri: has joined #ruby
[23:03:09] xxneolithicxx: the ugliest city one can lay eyes
[23:03:10] vikaton: has joined #ruby
[23:03:19] danman: has joined #ruby
[23:03:34] djbkd: heh you've never been to baltimore city
[23:03:56] xxneolithicxx: they have modern architecture next to old medieval that looks absolutely hideous and make no attempt to make them flow
[23:04:20] xxneolithicxx: so drastic and dramatic its absolutely ugly
[23:04:52] xxneolithicxx: that and Boston culture is pretty ugly too
[23:04:52] bootstrappm: I'm a huge fan :P
[23:05:05] bootstrappm: but I really mean greater boston
[23:05:21] bootstrappm: Boston proper is small
[23:05:24] Mekkis: has joined #ruby
[23:05:47] jbomo: has joined #ruby
[23:05:52] xxneolithicxx: yea i get that, most people who say Boston mean X miles around Boston
[23:06:14] xxneolithicxx: otherwise no one will understand where the hell it is lol
[23:06:29] xxneolithicxx: all of this < ------------------------------------- > is Boston
[23:06:38] bootstrappm: haha basically
[23:07:25] eam: "everything the light touches is our kingdom"
[23:08:29] baweaver: So people in Boston are just as snooty about the 'proper' as SF eh?
[23:08:34] xxneolithicxx: ok i gotta format my laptop and prep it for returning to my job... dban here i come
[23:09:00] Akagi201: has joined #ruby
[23:09:21] xxneolithicxx: <---- I snickered when they said put the PW on a post it note. No sir you get your laptop back blank
[23:13:08] Ropeney: has joined #ruby
[23:15:18] shuber_: has joined #ruby
[23:18:36] saadq: has joined #ruby
[23:22:32] edwinvdgraaf: has joined #ruby
[23:23:10] shevy: how to pass a block to different methods? I must use the &foo syntax?
[23:23:12] hostess: has joined #ruby
[23:23:29] shevy: like in a waterfall... every method bounces the block to another method, until it ends to the main method
[23:24:36] bootstrappm: sounds like you have the answer, no shevy?
[23:25:36] baweaver: has joined #ruby
[23:25:39] commondream: has joined #ruby
[23:25:46] kith_: has joined #ruby
[23:25:47] centrx: has joined #ruby
[23:26:10] bricker: has joined #ruby
[23:27:26] shuber_: has joined #ruby
[23:27:40] dfockler: has joined #ruby
[23:28:24] shevy: it feels kind of weird
[23:28:28] shevy: in one method I use yield
[23:28:33] shevy: in others I'd use & ?
[23:28:46] ebonics: it would be cool if you could pass blocks with state :D
[23:29:36] mahmoudmahfouz: has joined #ruby
[23:29:47] Hobogrammer: has joined #ruby
[23:32:03] edwinvdg_: has joined #ruby
[23:33:47] finisherr: has left #ruby: ()
[23:35:17] kinduff: shevy: have you read about state_machine?
[23:35:42] shevy: is that where the machine stores its internal state?
[23:36:25] baweaver: ebonics: Can't you just screw with the bindings?
[23:36:41] ebonics: baweaver, what do you mean
[23:37:02] baweaver: You can capture state with a closure in Ruby, or rebind it to different states
[23:37:06] rickmasta: has joined #ruby
[23:37:11] emptyflask: has joined #ruby
[23:37:22] kinduff: shevy: kinduff, helps out with that waterfall scenario you're talking about
[23:37:29] ebonics: you mean store the state somewhere then call for it after you pass it?
[23:37:58] shevy: I think I solved it
[23:38:03] kinduff: shevy: try avoiding to call a method inside a method as a waterfall, if something in the middle fails, you're going to have a bad time
[23:38:06] shevy: I simply invoke the methods via { yield if block_given? }
[23:38:19] baweaver: >> def div_by(n) ->x{x%n==0} end; (1..10).select(&div_by(4))
[23:38:20] ruboto: baweaver # => [4, 8] (https://eval.in/370826)
[23:38:22] shevy: nothing fails :)
[23:38:28] baweaver: Like that, you can store state
[23:38:39] baweaver: the lambda returned there remembers that n is 4
[23:38:46] shevy: My ruby code is like the last man standing, a zombie. It always tries to come back.
[23:38:47] ebonics: that's just streaming
[23:39:03] shevy: but the & syntax just trips me up
[23:39:21] kinduff: know the feel, just try to be as expressive as you must have
[23:39:22] ebonics: i'm talking about if you have a block in an object, you pass it to one method, then pass it to another method while keeping some state from the first
[23:39:34] ebonics: not inlining it though, i mean as part of the block itself
[23:39:53] baweaver: Functions can return functions to capture more state
[23:40:29] juanpaucar: has joined #ruby
[23:40:40] baweaver: You can simulate objects using lambdas if you're really driven
[23:40:48] baweaver: and numbers (church numerals)
[23:41:02] baweaver: and basically any other data structure
[23:41:34] baweaver: See partial application and currying
[23:41:52] zenspider: tom stewart has a really fantastic blog post doing just that
[23:42:15] zenspider: implements fizzbuzz entirely out of lambdas, including numbers / strings
[23:42:34] baweaver: zenspider: Have you seen Jim's talk on the Y Combinator?
[23:42:50] zenspider: yeah. I was there
[23:42:56] baweaver: https://www.youtube.com/watch?v=FITJMJjASUs - For others
[23:43:05] baweaver: Great watch. RIP Jim
[23:43:10] bootstrappm: alright, found something that def needs work shevy - the mongodb ruby driver documentation -_-
[23:43:15] bootstrappm: oooo when did rubygems get a redesign
[23:43:23] hsps__: has joined #ruby
[23:43:24] baweaver: Within a few months
[23:43:30] kinduff: looks pretty good
[23:43:32] zenspider: it was one of the better ones I've seen... but I have yet to see a GOOD explanation of the ycombinator that doesn't rely on a huge leap in the middle
[23:43:32] ebonics: people still use mongodb :o
[23:43:32] shevy: yeah a while ago
[23:43:39] ebonics: i thought that was just a fad
[23:43:40] shevy: the bright orange is a bit eye-scratching
[23:44:05] baweaver: zenspider: You should try Monads some time then ;)
[23:44:44] zenspider: gah. yeah. that orange... my eyes bleed
[23:44:47] baweaver: I've yet to see someone give a good explanation without an entire book leading up to it.
[23:44:54] zenspider: baweaver: not a big fan
[23:45:23] zenspider: Tom's talk on monads was great tho
[23:45:54] baweaver: The second someone says endofunctors you know stuff is about to get real
[23:46:48] zenspider: real mentabatory :P
[23:47:31] baweaver: Though contracts for Ruby are an interesting idea in some cases
[23:47:37] rkazak: has joined #ruby
[23:56:44] mikecmpb_: has joined #ruby
[23:57:30] mary5030: has joined #ruby
[23:58:09] Coldblackice: has joined #ruby
[23:58:30] sevenseacat: has joined #ruby