« Back to channel list

#ruby - 05 April 2016

« Back 1 day Forward 1 day »
[00:00:00] ascarter: has joined #ruby
[00:01:28] rmulliga`: has joined #ruby
[00:02:00] helpa: has joined #ruby
[00:03:50] ascarter: has joined #ruby
[00:06:29] mr_oh: has joined #ruby
[00:06:44] sudoubuntu: has joined #ruby
[00:07:25] mr_oh: group_by and flat_map saved my butt
[00:07:34] stantona: has joined #ruby
[00:09:15] karioleez: has joined #ruby
[00:09:47] ur5us: has joined #ruby
[00:10:31] mr_oh: I looked at some code today that was supposed to be Ruby, but it looked nothing like it. I mean, I know it is Ruby but I wonder what other language they are forcing it to look like....
[00:10:40] Ox0dea: Let's see it.
[00:10:51] mr_oh: Is that common?
[00:11:02] baweaver: it's called a Java developer
[00:12:27] duckpuppy: has joined #ruby
[00:12:36] mr_oh: Trying to find it again
[00:13:37] goglosh: Fortran in any language, I tell ya
[00:14:05] goglosh: so, uh, is there a module or library for ratio types?
[00:14:22] goglosh: like > 10 / 8 => 5/4
[00:15:01] baweaver: &ri Rational
[00:15:02] `derpy: http://ruby-doc.org/core-2.3.0/Rational.html
[00:16:10] baweaver: not sure how to simplify with it though
[00:16:14] baweaver: never had a need
[00:16:24] Polysics: has joined #ruby
[00:16:32] ruby[bot]: Ox0dea: # => (5/4) (https://eval.in/547616)
[00:16:35] Ox0dea: Ruby loves you.
[00:16:40] goglosh: doesn't it do it automatically?
[00:16:50] baweaver: ACTION never uses rational
[00:16:51] goglosh: Ox0dea: ooooh
[00:16:56] goglosh: are you a wizard?
[00:16:59] baweaver: Ox0dea: you scared them off :(
[00:17:31] mr_oh: has joined #ruby
[00:17:40] mr_oh: https://gist.github.com/anonymous/da3b0863b2f0c8650f6befea27cf1593
[00:21:53] mr_oh_: has joined #ruby
[00:22:58] yqt: has joined #ruby
[00:24:42] shmuli: has joined #ruby
[00:25:15] mr_oh_: How much of github is just junk ?
[00:27:17] karioleez: has joined #ruby
[00:27:41] parduse: has joined #ruby
[00:30:59] shmuli: has joined #ruby
[00:31:11] youch: has joined #ruby
[00:31:53] goglosh: classes are built on top of objects?
[00:32:45] shevy: you instantiate your object from a class
[00:33:02] goglosh: b-but the infrastructure...
[00:33:16] Ox0dea: >> [Class.is_a?(Module), Class.is_a?(Object), Module.is_a?(Class), Module.is_a?(Object), Object.is_a?(Class), Object.is_a?(Module)].all? # goglosh
[00:33:17] ruby[bot]: Ox0dea: # => true (https://eval.in/547618)
[00:34:28] goglosh: now I'm confus
[00:34:36] Ox0dea: It's all rather circular, but it makes sense if you squint.
[00:34:59] Ox0dea: Or take the time to figure out why it makes sense and is a Good Thing.
[00:35:50] goglosh: ruby's gonna swap my brain hemispheres
[00:37:06] baweaver: turn that frown upside down :D
[00:38:22] BtcBen: has joined #ruby
[00:43:08] shevy: goglosh you write your class: class Foo; end now you create a new object from that class: foo = Foo.new
[00:44:30] Ox0dea: >> (c = Class.new).new.class == c
[00:44:31] ruby[bot]: Ox0dea: # => true (https://eval.in/547619)
[00:44:38] Ox0dea: It's all very symmetrical and reasonable.
[00:45:28] karioleez: has joined #ruby
[00:48:25] r0bby_: has joined #ruby
[00:48:45] arescorpio: has joined #ruby
[00:49:35] smckee: has joined #ruby
[00:50:02] PlasmaStar: has joined #ruby
[00:50:10] smckee: Hi everyone, I'm doing a study at Oregon State University trying to determine what is difficult about merge conflicts and how developers solve their conflicts. We're looking for professional developers with 3+ years of experience. Would anybody here be interested in participating in a ~20 minute interview? We will, of course, compensate you for your time :)
[00:51:38] smckee: If anybody is interested and sees this later, you can get ahold of me at mckeesh@oregonstate.edu
[00:55:19] hightower2: has joined #ruby
[00:55:24] baweaver: has joined #ruby
[00:56:32] mistermocha: has joined #ruby
[00:56:43] Musashi007: has joined #ruby
[00:57:06] dstarh: has joined #ruby
[00:59:38] toretore: has joined #ruby
[01:02:11] diegoviola: has joined #ruby
[01:02:55] Arcaire: I just delete the repo and pull a fresh copy down.
[01:03:40] mozzarella: what about your changes
[01:03:49] karioleez: has joined #ruby
[01:03:57] mozzarella: what if they are local branches
[01:04:45] Arcaire: i put them on my desktop temporarily
[01:04:58] PlasmaStar: has joined #ruby
[01:05:37] vdamewood: has joined #ruby
[01:05:52] sgambino: has joined #ruby
[01:06:11] rkazak: has joined #ruby
[01:06:14] pawnbox: has joined #ruby
[01:06:17] parduse: has joined #ruby
[01:07:50] noService: has joined #ruby
[01:09:23] goglosh: Ox0dea: so what if you change something in the internal structure/behaviour of either Class or Object?
[01:09:40] Ox0dea: goglosh: It will affect the system quite globally.
[01:09:44] baweaver: Matz pops out of the compiler and slaps you
[01:09:51] Ox0dea: >> class Class; def foo; 42; end; end; String.foo
[01:09:52] ruby[bot]: Ox0dea: # => 42 (https://eval.in/547621)
[01:10:06] baweaver: potentially dangerous things
[01:10:07] doug-: has joined #ruby
[01:10:20] Ox0dea: >> !!:dangerous
[01:10:22] ruby[bot]: Ox0dea: # => true (https://eval.in/547622)
[01:10:32] auzty: has joined #ruby
[01:10:37] baweaver: >> not :dangerous?
[01:10:38] ruby[bot]: baweaver: # => false (https://eval.in/547623)
[01:10:57] baweaver: bot has spoken
[01:11:03] goglosh: what does !! stand for there?
[01:11:16] goglosh: you guys are wizards
[01:11:21] Ox0dea: The "boolificator".
[01:11:22] dc4: has joined #ruby
[01:11:39] baweaver: boolifornication?
[01:11:48] baweaver: ACTION starts tapping out RHCPs
[01:12:09] Ox0dea: Looks like I'm listening to Stadium Arcadium.
[01:18:04] Polysics: has joined #ruby
[01:19:23] jenrzzz: has joined #ruby
[01:20:57] cdg: has joined #ruby
[01:21:48] karioleez: has joined #ruby
[01:22:19] dc4: has joined #ruby
[01:22:22] moeabdol1: has joined #ruby
[01:24:45] TheNet: has joined #ruby
[01:26:59] B1n4r10: has joined #ruby
[01:31:28] goglosh: thanks for the insightful responses
[01:31:35] goglosh: I'm off now
[01:31:43] rake_db_migrate: has joined #ruby
[01:33:11] dc4: has joined #ruby
[01:33:22] doug-: has joined #ruby
[01:35:40] h99h9h88: has joined #ruby
[01:39:40] babblebre: has joined #ruby
[01:40:09] karioleez: has joined #ruby
[01:40:50] cpup: has joined #ruby
[01:41:09] r0b3rt: has joined #ruby
[01:45:09] jenrzzz: has joined #ruby
[01:45:19] shmuli: has joined #ruby
[01:45:27] karmatr0n: has joined #ruby
[01:45:45] mistermocha: has joined #ruby
[01:47:37] doug-: has joined #ruby
[01:52:13] nodejunkie: has joined #ruby
[01:53:03] vdamewood: has joined #ruby
[01:58:12] karioleez: has joined #ruby
[02:00:18] NinjaPanzer: has joined #ruby
[02:05:36] freerobby: has joined #ruby
[02:05:50] Cohedrin_: has joined #ruby
[02:08:20] bry4n: has joined #ruby
[02:10:42] fumihiro: has joined #ruby
[02:10:52] ILikeBears: has joined #ruby
[02:11:03] ILikeBears: at least one of you knows how to get this horrid language to work
[02:11:10] ILikeBears: "Error running 'requirements_debian_update_system ruby-2.1.5',
[02:11:11] ILikeBears: showing last 15 lines of /usr/local/rvm/log/1459822209_ruby-2.1.5/update_system.log
[02:11:21] ILikeBears: doing " rvm install 2.1.5"
[02:12:36] ILikeBears: Any of you know how to get this horrid language's interpreter working?
[02:13:12] duckpuppy: has joined #ruby
[02:13:14] toretore: not with that attitude
[02:13:34] ILikeBears: toretore, can you give an answer yes or no?
[02:13:44] smckee_: has joined #ruby
[02:13:45] ILikeBears: The attitude is because a tool like rvm shouldn't need to exist.
[02:14:50] ILikeBears: I shouldn't have to jump through hoops to get ruby 2.1.5 when I can go apt-get install OpenJDK-1.7 or 1.6 or select a version of python.
[02:15:19] ILikeBears: I have ruby2.0 installed but because they don't register themselves with alternatives I can't force 2.0, I have to use RVM instead
[02:16:22] karioleez: has joined #ruby
[02:17:53] ILikeBears: torandu, so are you going to help or did you reply just to stick your 2cents in?
[02:18:34] ILikeBears: This will be the third day in a row I've rought with RVM. Last time I had to manually force ruby2.0 as my default with a symlink and then tins didn't want to install
[02:18:42] ILikeBears: tins demanded 2.0 and I had 2.0
[02:18:58] ILikeBears: So I have a good reason to have an attitude and not like Ruby right now.
[02:19:26] jinette: has joined #ruby
[02:19:53] toretore: and i have good reason to ignore you, which i will be doing from now on
[02:20:00] ILikeBears: torandu, Cool
[02:20:07] ILikeBears: Go be a pretentius hipster somewhere else
[02:20:07] jinette: hello everyone, can you help me fix this problem please; http://paste.ubuntu.com/15623258/ ?
[02:20:19] ILikeBears: while you're at it shove your two cents up your ass and learn a real language.
[02:20:54] karmatr0n: has joined #ruby
[02:21:03] ILikeBears: I don't appreciate assholes that are too good for others sticking their two cents in on things just to bitch rather than help. So take it the nice way from me. Go fuck yourself.
[02:21:28] ILikeBears: Keep your bitching to yourself when someone spends three days fighting a piece of software has a problem
[02:21:36] ILikeBears: And like I've said, go fuck yourself with those two cents.
[02:21:43] ILikeBears: (Ruby makes me salty)
[02:22:10] NinjaPanzer: We all have our triggers i guess
[02:22:28] ILikeBears: NinjaPanzer, if he didn't like my attitude he could've kept his two cents to himself.
[02:22:54] ruby[bot]: toretore: I don't see no ^, whom should I tell about ops?
[02:22:59] toretore: ?ops ILikeBears
[02:22:59] ruby[bot]: ILikeBears: to call for ops use the !ops command. You can find a list of channel staff on http://ruby-community.com/pages/irc_staff
[02:23:07] ruby[bot]: to call for ops use the !ops command. You can find a list of channel staff on http://ruby-community.com/pages/irc_staff
[02:23:07] NinjaPanzer: Well you did pop into a Ruby channel and po on the subject matter
[02:23:19] ILikeBears: ?ops toretore
[02:23:53] andywojo: has joined #ruby
[02:23:57] NinjaPanzer: We should adapt our troll tracker from hipchat to irc maybe :P
[02:24:01] ILikeBears: toretore, Go back to your safeplace and learn to talk to others without immediately being a condescending asshole.
[02:24:28] ILikeBears: You're not the only one with the solution to the problem. Others have it.
[02:24:53] shevy: pls permaban ILikeBears
[02:25:25] ILikeBears: shevy, that has no impact on me.
[02:25:35] shevy: nah just be patient
[02:25:43] karioleez: has joined #ruby
[02:25:49] ILikeBears: oh no I'll be banned from #ruby!1
[02:26:34] NinjaPanzer: jinette are you sure you wanna do foreman run and not bundle exec?
[02:26:35] ruby[bot]: toretore: ops currently in #ruby: adaedra, aredridel, havenwood, Radar, apeiros, drbrain, jhass, ljarvis, miah, ruby[bot] and zenspider
[02:26:59] jinette: NinjaPanzer, there is foreman in the setup instructions
[02:27:09] ILikeBears: toretore, You're the one who started this being condecending like I should bend over and kiss your ass.
[02:27:16] ILikeBears: ><toretore> not with that attitude
[02:27:56] ILikeBears: If you didn't act like you're the only one with the answer / will control the entire outcome I wouldn't have retaliated.
[02:28:06] NinjaPanzer: jinette I am not saying you are specifically doing something wrong I just never have run db:create like that
[02:29:53] jinette: NinjaPanzer, when I run "rake db:migrate" or 'bundle exec rake db:migrate', I get this: 'Your Ruby version is 2.1.5, but your Gemfile specified 1.9.3'..
[02:30:36] ILikeBears: jinette, Would you happen to know?
[02:30:48] MrSamuel: has joined #ruby
[02:30:53] NinjaPanzer: jinette are you using rvm if so `rvm install ruby-1.9.3`
[02:31:40] Mon_Ouie: has joined #ruby
[02:31:49] ILikeBears: NinjaPanzer, I'm asking nicely.
[02:31:54] ILikeBears: Why does RVM exist?
[02:32:08] skweek: has joined #ruby
[02:32:26] jinette: NinjaPanzer, I used rvm on another install, and have had to wrestle with the same problem there. it was as if no matter what I did, including complete removal, the version 2.1.5 was referred with above error.
[02:32:40] ILikeBears: jinette, does ruby not install into it's own directory for each revision?
[02:32:49] ILikeBears: So 2.2, 2.3 in seperate directories with seperate gems etc
[02:33:17] NinjaPanzer: jinette once you use rvm to install a new version you might have to `rvm use 1.9.3` to make sure that is currently selected
[02:33:49] ILikeBears: NinjaPanzer, jinette I'm presuming you're ignoring me or /ignored me because I insulted toretore ?
[02:34:03] adymitruk: has joined #ruby
[02:34:06] jinette: NinjaPanzer, yes, I remember having done that, too..but I will go about it again now
[02:34:16] NinjaPanzer: jinette then you will have to bundle install again to populate the new version of ruby's gems
[02:34:44] jinette: NinjaPanzer, I'll do so..very much hope to get a different outcome this time
[02:35:22] NinjaPanzer: jinette one thing that poped into my head are you trying to do a heroku deploy is that where foreman is coming in or is this just local development?
[02:35:52] djbkd: has joined #ruby
[02:39:13] NinjaPanzer: jinette one thing I always do is make a .ruby-version at the root of my project. Inside you can put a string with the ruby version and gemset like this `ruby-1.9.3@my_gemset` and rvm will respect that and autoswitch when you enter the directory
[02:39:15] jinette: NinjaPanzer, precisely done both. I gave up Heroku one because I needed a cloud subscription which I didnt need for now. and now I'm trying the local one. had problem with foreman in both
[02:40:27] Ebok: has joined #ruby
[02:40:30] Moblin: has joined #ruby
[02:40:54] _blizzy_: has joined #ruby
[02:40:59] Ebok: has joined #ruby
[02:41:49] PedramT: has joined #ruby
[02:42:13] NinjaPanzer: jinette foreman is a runner with a side effect of loading the a local .env file or spinning up some other processes before it runs your command. You should look in the Procfile and see if it gives you any insight as to why foreman is needed
[02:42:54] benlieb: has joined #ruby
[02:42:56] Eiam_: has joined #ruby
[02:43:42] jinette: NinjaPanzer, does it matter in which folder I run the rvm install?
[02:43:56] karioleez: has joined #ruby
[02:44:20] BtcBen: has joined #ruby
[02:44:26] NinjaPanzer: jinettte no as long as rvm is available. rvm installs rubies in your home directory or root if you are logged in as root
[02:44:43] jinette: ah, thank you
[02:44:44] ILikeBears: jinette, NinjaPanzer are the same person
[02:45:17] statelesscode: has joined #ruby
[02:50:12] pawnbox: has joined #ruby
[02:50:40] tsou: has joined #ruby
[02:52:04] chagel: has joined #ruby
[02:54:14] jinette: NinjaPanzer, I saw that rvm version was already installed, and reverted to that. there was no gemfile version problem this time, but, speaking of 'foreman run rake db:create', it gave the error that database could not be created. when run with sudo, this time it returned the same error as in my above link.
[02:54:30] Mon_Ouie: has joined #ruby
[02:55:01] NinjaPanzer: jinette I am not sure you would want to run it sudo anyways. What reason did it tell you the database could not be created
[02:57:32] jinette: NinjaPanzer, I had a long struggle with postgres to solve its issues, but it was horribly impenetrable; I've been digging through stackoverflow, but all solutions ended up with outputs like fatal, failed, doesnt exist..
[02:57:49] jinette: so the database is not created, it says
[02:58:53] Suntzu: has joined #ruby
[02:58:55] jinette: the user could not be created
[02:59:08] NinjaPanzer: right so postgres needs a table and user with access. It uses that to make a schema which we usually refer to as to the db from a rails perspective. The default is it will try and login as your local user and look for a db of the same name.
[02:59:58] jinette: NinjaPanzer, I got stuck here with postgres: 'sudo -u postgres createuser --superuser $USER'
[03:00:11] Cohedrin: has joined #ruby
[03:00:47] NinjaPanzer: I just did this lemme look through my history
[03:00:56] blackmesa: has joined #ruby
[03:01:58] karioleez: has joined #ruby
[03:02:05] NinjaPanzer: I used this as my reference http://www.tunnelsup.com/setting-up-postgres-on-mac-osx
[03:02:23] NinjaPanzer: starting at the section "Additional Postgres Commands"
[03:03:28] benlieb: has joined #ruby
[03:04:03] NinjaPanzer: you should reference the .env file and the config/database.yml (assuming rails here) to see if there are any expectations on the database name
[03:04:38] NinjaPanzer: when it says `createuser --pwprompt tunnelsup` i would replace tunnelsup with a username you like or your loginuser account for simplicity
[03:05:04] NinjaPanzer: same thing with the `createdb -Otunnelsup -Eutf8 mysite_development` command
[03:06:36] Inside: has joined #ruby
[03:10:00] shmuli: has joined #ruby
[03:10:38] jinette: NinjaPanzer, I have brew installed on Linux, though haven't tried pg with it yet
[03:11:38] jtoy: has joined #ruby
[03:11:41] mistermocha: has joined #ruby
[03:11:43] NinjaPanzer: Hah I didn't even know they made a linux homebrew
[03:11:55] karioleez: has joined #ruby
[03:12:03] NinjaPanzer: you shouldn't need it as long as you have postgres installed via apg-get
[03:12:27] devbug: has joined #ruby
[03:13:41] fumihiro: has joined #ruby
[03:14:57] braincras: has joined #ruby
[03:15:34] htmldrum: has joined #ruby
[03:15:54] tmtwd: has joined #ruby
[03:16:20] bears: has joined #ruby
[03:19:04] karmatr0n: has joined #ruby
[03:19:25] Polysics: has joined #ruby
[03:19:27] paradisaeidae_: has joined #ruby
[03:19:35] InfinityBear: new name. now registered
[03:20:22] karioleez: has joined #ruby
[03:21:04] IrishGringo: has joined #ruby
[03:23:10] dc4: has joined #ruby
[03:26:21] xsdfdfsa: has joined #ruby
[03:28:36] duckpuppy: has joined #ruby
[03:29:43] karioleez: has joined #ruby
[03:31:35] baweaver: has joined #ruby
[03:32:01] r0b3rt: has joined #ruby
[03:33:04] Radar: I'm back from lunch. Did anything interesting happen?
[03:33:14] jinette: NinjaPanzer, I think I magically managed to create a user. at least I can enter psql command line now
[03:33:41] gix: has joined #ruby
[03:34:03] NinjaPanzer: Programming -> The endless search for a new error :P
[03:34:31] NinjaPanzer: There was a little drama Radar but it settled down
[03:34:33] smckee: has joined #ruby
[03:34:39] Radar: I am sad that I missed the drama.
[03:34:59] InfinityBear: Radar, I got into an argument with another guy
[03:35:06] InfinityBear: told him to learn a real language, he called ops on me.
[03:35:09] InfinityBear: nothing happened.
[03:35:40] Radar: Is the sooky attitude gone or does someone need a time out?
[03:36:14] InfinityBear: Radar, fuck RVM.
[03:36:19] InfinityBear: Fuck it and a half.
[03:36:22] jinette: the db error is not coming anymore, but the other error is.
[03:36:36] InfinityBear: I'm porting parts of BeEF to Java.
[03:37:04] Radar: InfinityBear: I agree with the "fuck RVM"
[03:37:09] Radar: InfinityBear: Have you tried chruby+ruby-install?
[03:37:25] InfinityBear: never heard of it.
[03:38:02] Radar: They're two separate things. I use them to install and switch between Rubies on all my machines. Works seamlessly.
[03:38:10] Radar: RVM does not.
[03:38:35] NinjaPanzer: jinette what happens if we leave out the foreman run portions?
[03:38:54] djbkd: has joined #ruby
[03:39:59] benlieb: has joined #ruby
[03:40:10] jinette: NinjaPanzer, if you mean running only 'rake db:migrate' or 'bundle exec rake db:migrate', I still get the ruby version problem with Gemfile.
[03:40:54] NinjaPanzer: this stuff up on github somewhere?
[03:41:59] jinette: NinjaPanzer, yes, here: http://is.gd/oKXp7m for localhost, and here for Heroku: http://is.gd/NjsLnP
[03:42:20] Chagel_: has joined #ruby
[03:42:25] Radar: ACTION hisses at another RVM mention
[03:42:45] Radar: Well, there's your problem
[03:43:32] PedramT: has joined #ruby
[03:44:39] NinjaPanzer: so it looks like foreman is here to setup the .env before the command runs. Have you gone through that part of the setup already jinette
[03:44:58] jpfuentes2: has joined #ruby
[03:47:06] NinjaPanzer: also can you post the full stacktrace becuase i bet the line right after your error will help direct us a little further
[03:47:17] fedexo: has joined #ruby
[03:47:18] jinette: NinjaPanzer, as I was trying the Heroku one, yes, I went through that, too, referring to the 'foreman run rake secret' part
[03:47:18] chagel: has joined #ruby
[03:48:09] karioleez: has joined #ruby
[03:48:22] jinette: in the localhost one I guess it doesnt have a similar role
[03:48:42] shayan: has joined #ruby
[03:49:33] NinjaPanzer: I was referring to "Your .env file should look something like this:" .... part
[03:51:25] jenrzzz: has joined #ruby
[03:51:25] jenrzzz: has joined #ruby
[03:51:31] jinette: yes, I mean there, too..the foreman command generated the secret tokens, as far as I remember
[03:52:18] chagel: has joined #ruby
[03:53:06] duncannz: has joined #ruby
[03:53:59] jino: has joined #ruby
[03:58:13] B1n4r10: has joined #ruby
[03:59:32] jinette: something unearthly passed through
[04:02:34] jinette: NinjaPanzer, I will leave foreman and all the foremen to their fate for today. I must give up for now..thank you very much for helping me all the while!
[04:02:35] blackmesa: has joined #ruby
[04:06:19] karioleez: has joined #ruby
[04:06:50] jinette: ciao, till later!
[04:08:18] NinjaPanzer: has joined #ruby
[04:14:33] d0nn1e: has joined #ruby
[04:15:29] karioleez: has joined #ruby
[04:15:39] mistermocha: has joined #ruby
[04:17:06] nofxx: has joined #ruby
[04:17:41] lxsameer: has joined #ruby
[04:19:13] hk238: has joined #ruby
[04:19:36] ramfjord: has joined #ruby
[04:25:20] G: has joined #ruby
[04:27:14] moeabdol1: has joined #ruby
[04:30:33] karioleez: has joined #ruby
[04:32:04] holmser: has joined #ruby
[04:35:36] devbug: has joined #ruby
[04:35:38] matp: has joined #ruby
[04:38:11] karmatr0n: has joined #ruby
[04:38:19] chagel: has joined #ruby
[04:40:35] krz: has joined #ruby
[04:40:36] rippa: has joined #ruby
[04:42:07] smckee: has joined #ruby
[04:43:37] chagel: has joined #ruby
[04:47:00] jenrzzz: has joined #ruby
[04:47:00] jenrzzz: has joined #ruby
[04:49:34] rmulligan: has joined #ruby
[04:50:04] youch: has joined #ruby
[04:51:09] jokester: has joined #ruby
[04:52:07] A5101: has joined #ruby
[04:55:24] elifoster: has joined #ruby
[05:03:24] PedramT: has joined #ruby
[05:04:36] blackmesa: has joined #ruby
[05:06:08] baweaver: Ox0dea: working on that Reducible post
[05:06:23] Ox0dea: baweaver: W00t!
[05:06:25] baweaver: it even comes with *tests* :O
[05:06:40] baweaver: I'll release it as a gem too because why not.
[05:06:48] Ox0dea: baweaver: A bad wheel to reinvent, I should think.
[05:07:04] krz: has joined #ruby
[05:07:13] baweaver: Maybe, but the point is to show how to think in those terms
[05:07:14] PedramT_: has joined #ruby
[05:07:27] Ox0dea: Oh, I meant for the tests.
[05:07:29] baweaver: which inadvertantly makes you think very close to what Haskell or Scala would look like
[05:07:35] Ox0dea: That was a genuine "W00t!" back there.
[05:07:38] baweaver: just to prove that it works as intended
[05:07:44] Ox0dea: $ ruby -r ./reducible trunk/test/runner.rb trunk/test/ruby/test_enum.rb
[05:08:06] baweaver: it lets me cheat
[05:08:08] Ox0dea: I'm just grabbing hold of Enumerable's #reduce before reassigning it to Reducible.
[05:08:25] Ox0dea: Heaps of explosions!
[05:08:58] rake_db_migrate: has joined #ruby
[05:09:02] baweaver: joking aside, the point is to say you can effectively do it. I won't be pedantic about absolute correctness
[05:09:11] baweaver: this is a toy implementation in the end
[05:09:32] baweaver: and its better that it doesn't 100% work to dissuade people from actually using it.
[05:09:37] Ox0dea: I'd like to see your #zip when you get to the bottom of the list. :)
[05:10:01] baweaver: I'd like to see it too
[05:10:31] Ox0dea: `reduce([]) { |a, e| a << [e, *others.map(&:shift)] }` is terrible.
[05:10:40] PedramT: has joined #ruby
[05:11:07] baweaver: I'll go for readability over performance.
[05:11:19] baweaver: Going to put a long list of disclaimers in the header for pedants
[05:11:22] Ox0dea: I more meant that it's stateful.
[05:11:36] Ox0dea: Carrying around the accumulator and an index is suck.
[05:13:04] baweaver: itunes keeps opening asking me for credentials
[05:13:43] baweaver: fine, take your dang credentials and go away
[05:13:51] Devalo: has joined #ruby
[05:15:01] lele: has joined #ruby
[05:16:40] B1n4r10: has joined #ruby
[05:19:03] PedramT: has joined #ruby
[05:19:11] jtoy: has joined #ruby
[05:20:36] PedramT: has joined #ruby
[05:22:26] Polysics: has joined #ruby
[05:25:33] lkba: has joined #ruby
[05:25:42] rmulligan: has joined #ruby
[05:26:35] chagel: has joined #ruby
[05:29:12] GitGud: has joined #ruby
[05:29:12] BtcBen: has joined #ruby
[05:29:21] duckpuppy: has joined #ruby
[05:31:16] neo_: has joined #ruby
[05:31:32] chagel: has joined #ruby
[05:33:50] baweaver: Neo_: Follow the white rabbit
[05:33:58] baweaver: ah wait, wrong movie
[05:34:47] bluOxigen: has joined #ruby
[05:34:50] _blizzy_: has joined #ruby
[05:34:51] baweaver: or red pill?
[05:35:40] neo_: baweaver; I didnt get u
[05:35:53] sauvin: has joined #ruby
[05:35:58] baweaver: http://www.imdb.com/title/tt0133093/
[05:36:26] baweaver: With Keaunu Reeves as Neo
[05:36:32] chagel: has joined #ruby
[05:36:32] baweaver: anyways, joke is a miss.
[05:37:17] neo_: so you been programming since?
[05:37:55] PedramT: has joined #ruby
[05:38:52] baweaver: I lose track.
[05:39:40] baweaver: Somewhere north of 12 though including non-professional
[05:39:54] neo_: anyways you know how to stay connected to this irc through android?
[05:40:03] neo_: any app?
[05:40:32] rake_db__: has joined #ruby
[05:40:33] karmatr0n: has joined #ruby
[05:40:46] Ox0dea: Neo_: JuiceSSH.
[05:41:01] PedramT: has joined #ruby
[05:41:11] neo_: I'll check that
[05:41:52] dc4: has joined #ruby
[05:42:44] neo_: 12 years is a lot of experience! @baweaver
[05:42:44] hahuang65: has joined #ruby
[05:43:28] vondruch: has joined #ruby
[05:44:20] codecop: has joined #ruby
[05:44:51] rake_db_migrate: has joined #ruby
[05:45:22] htmldrum: has joined #ruby
[05:47:02] chagel: has joined #ruby
[05:47:35] mistermocha: has joined #ruby
[05:48:46] skweek: has joined #ruby
[05:48:47] rake_db__: has joined #ruby
[05:50:00] jorum: has joined #ruby
[05:51:01] Ox0dea: baweaver: https://git.io/vVzUa :P
[05:52:18] baweaver: I ignore anything that tells me to use single letters when explaining anything
[05:53:30] noService: has joined #ruby
[05:53:31] baweaver: half of style is knowing when it's appropriate to ignore it
[05:53:36] baweaver: that, and we're not Python :P
[05:53:50] jenrzzz: has joined #ruby
[05:53:50] jenrzzz: has joined #ruby
[05:54:35] scepticulous: has joined #ruby
[05:54:53] neo_: so I downloaded Juice SSH
[05:54:59] neo_: JuiceSSH
[05:55:10] neo_: what do I do next?
[05:55:33] Es0teric: has joined #ruby
[05:55:50] Ox0dea: ♫ It’s so much better when everyone is in. Are you in? ♫
[05:56:03] Ox0dea: baweaver: Convention uber alles.
[05:56:23] aganov: has joined #ruby
[05:56:47] rake_db_migrate: has joined #ruby
[05:57:30] Ox0dea: Neo_: JuiceSSH is for connecting to an SSH server; I was mostly being facetious.
[05:58:09] Ox0dea: The folks who join here from their phones tend to be using AndroIRC; maybe give that one a go.
[05:58:29] Ox0dea: Sure thing.
[05:58:50] Musashi007: has joined #ruby
[05:58:50] neo_: you can see I am complete newbie!
[05:59:14] neo_: in both .. all those network connections and ruby
[06:01:08] Ox0dea: Whatcha using to learn Ruby?
[06:02:38] neo_: a book and irbmain
[06:02:50] neo_: ruby interpreter
[06:04:32] ericlee: has joined #ruby
[06:04:35] karioleez: has joined #ruby
[06:04:45] neo_: book name:- Beginning Ruby From Novice To Professional
[06:04:55] neo_: what do you suggest?
[06:05:31] noobplayer97: has joined #ruby
[06:07:30] Ox0dea: Neo_: https://www.manning.com/books/the-well-grounded-rubyist-second-edition
[06:07:36] blackmesa: has joined #ruby
[06:08:08] karioleez: has joined #ruby
[06:08:27] gusrub: has joined #ruby
[06:08:51] Ox0dea: The one you're reading is by the fellow who made this, though: https://www.youtube.com/watch?v=VBC-G6hahWA
[06:09:03] Ox0dea: So it's probably fine to stick with it to the end. :)
[06:10:34] baweaver: Ox0dea: I think cycle is out of range too
[06:10:42] baweaver: each_cons is going to be a pain
[06:10:43] neo_: .. yah I do have tht book in my lib too
[06:11:11] mistermocha: has joined #ruby
[06:13:07] biberu: has joined #ruby
[06:13:51] crameth: has joined #ruby
[06:15:04] Ox0dea: baweaver: Hm... I guess all the ones that return Enumerators are excessively painful.
[06:15:16] baweaver: pretty much
[06:15:20] Ox0dea: #each_cons is pretty easy if you're okay with mutable state, though.
[06:15:35] baweaver: I _could_ do them but that's beside the point of this one.
[06:16:17] baweaver: I'll do enumerators in another tutorial
[06:16:50] neo_: tutorial?
[06:17:01] neo_: baweaver is a tutor?
[06:17:27] Musashi007: has joined #ruby
[06:17:39] Ox0dea: baweaver: Blech. https://eval.in/547664
[06:17:43] baweaver: In a manner of speaking
[06:18:15] testee: has joined #ruby
[06:18:17] htmldrum: has joined #ruby
[06:18:30] baweaver: I'll give you a hint there
[06:18:41] e4xit: has joined #ruby
[06:18:41] baweaver: remember that project euler solution from yesterday?
[06:19:26] baweaver: >> first, *rest = [1,2,3]; rest
[06:19:27] ruby[bot]: baweaver: # => [2, 3] (https://eval.in/547665)
[06:20:10] baweaver: keep a state reference to the current stack, whenever it hits 3, push one to the result
[06:20:13] testee: why this is wrong ? ruby -wne'BEGIN{h={}};h[gets]++;puts h.inspect'
[06:20:31] testee: it points to semicolon before puts
[06:20:58] Ox0dea: baweaver: It only "hits" 3 the once?
[06:20:59] baweaver: why the begin?
[06:21:19] Ox0dea: For initialization purposes.
[06:21:43] baweaver: ignoring that BEGIN doesn't mean anything there and probably causes an error unless Ruby inherited some screwed up AWK syntax somewhere.
[06:21:59] dikaio: has joined #ruby
[06:22:03] Ox0dea: testee: Ruby doesn't have `++`.
[06:22:10] testee: thank you
[06:22:18] Ox0dea: >> h = Hash.new(0); h[:foo] += 1; h # testee
[06:22:19] ruby[bot]: Ox0dea: # => {:foo=>1} (https://eval.in/547667)
[06:22:24] Polysics: has joined #ruby
[06:22:40] baweaver: are you trying to get a word count or something?
[06:22:47] ruby[bot]: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[06:22:54] Suntzu: has joined #ruby
[06:23:05] SenpaiSilver_: has joined #ruby
[06:23:30] baweaver: Ox0dea: where's the notes on that? Never seen it before
[06:23:34] sandstrom: has joined #ruby
[06:23:34] Ox0dea: baweaver: The -n flag runs the -e for each line of input; BEGIN is for avoiding your state getting reset for each line.
[06:23:38] baweaver: and admittedly never want to see again :P
[06:23:57] shmuli: has joined #ruby
[06:24:07] Ox0dea: It's the opposite of END, which is essentially synonymous with #at_exit.
[06:24:25] baweaver: feels dirty though, there's not a better way just to get stdin?
[06:24:31] gusrub: has joined #ruby
[06:24:48] Macaveli: has joined #ruby
[06:24:55] Ox0dea: I mean, you could read it all at once? The -n and -p flags are for using Ruby like a stream editor.
[06:25:22] baweaver: I very very rarely use ruby inline in bash
[06:25:29] baweaver: by that point I just switch straight to ruby
[06:25:29] testee: sometimes you feel need to write shortest one-liner possible
[06:25:42] last_staff: has joined #ruby
[06:25:46] benlieb: has joined #ruby
[06:25:46] baweaver: sometimes people like that should be thrown out a window
[06:25:48] davee_: has joined #ruby
[06:25:59] Ox0dea: ACTION is at risk of being defenestrated.
[06:26:18] baweaver: focus on clarity rather than length
[06:26:31] Ox0dea: Bonus points if you manage to do both.
[06:26:59] testee: one-liner doesn't need clarity
[06:28:14] neo_: k.. I'll stay connected with..
[06:28:15] Ox0dea: testee: Golf is recreational.
[06:28:20] jas02: has joined #ruby
[06:28:30] JohnBat26: has joined #ruby
[06:30:35] testee: 0x0dea: if i need a sect to teach my how to live, i'd consider isis and not irc channel
[06:30:56] baweaver: !kick testee
[06:30:57] ruby[bot]: +bbb $a:testee$#ruby-banned testee!*@*$#ruby-banned *!*@188.65.67.173$#ruby-banned
[06:30:57] ruby[bot]: ruby[bot] kicked testee: offense, see http://ruby-community.com/pages/user_rules
[06:31:11] Ox0dea: Good call.
[06:31:13] baweaver: they can come back in a minute
[06:31:23] Ox0dea: Fingers crossed.
[06:31:57] ruby[bot]: -bbb $a:testee$#ruby-banned testee!*@*$#ruby-banned *!*@188.65.67.173$#ruby-banned
[06:32:53] baweaver: Enumerator could effectively be simulated with closures if you try hard enough
[06:33:37] baweaver: though I'd _really_ have to think about that one
[06:33:38] zenspider: has joined #ruby
[06:33:49] baweaver: zenspider: shiny
[06:34:23] firstdayonthejob: has joined #ruby
[06:35:11] skweek: has joined #ruby
[06:35:43] zenspider: now I'm all... official n' sh...tuff, right?
[06:35:54] baweaver: something like that
[06:39:29] lxsameer: _ko1: is there any plan to implement the bye code caching on cruby ?
[06:40:07] zenspider: I need a better pruney algorithm/script
[06:40:36] zenspider: lxsameer: timezones are probably not your friend
[06:41:29] lxsameer: zenspider: it seems so :P, assuming koichi lives in Japan, we would have about 5 hourse time difference
[06:42:49] zenspider: that also depends on whether he's a morning person or a nocturne. I think he's a morning person iirc
[06:43:03] duncannz: has joined #ruby
[06:43:05] Ox0dea: lxsameer: https://github.com/ko1/ruby/blob/iseq_p1/sample/iseq_loader.rb
[06:44:57] andikr: has joined #ruby
[06:45:05] lxsameer: Ox0dea: thanks
[06:45:14] Ox0dea: lxsameer: Sure thing. See also: https://bugs.ruby-lang.org/issues/11788
[06:45:37] roelof: has joined #ruby
[06:46:30] lxsameer: Ox0dea: cool , to be honest I really like to work on this field but I don't have any idea about core team plans and stuff
[06:46:40] hahuang65: has joined #ruby
[06:46:53] tAn: has joined #ruby
[06:47:17] patrick-sartent: has joined #ruby
[06:47:21] tAn: has joined #ruby
[06:47:22] havenwood: really enjoyed rewatching Y Not Adventures in Functional Programming <3 <3 <3
[06:47:27] roelof: someone who can help me solve this one : https://gist.github.com/rwobben/a8a06da3b0a511cccdcb3ac201c283b4
[06:47:37] roelof: I cannot make the inject work
[06:47:45] havenwood: my not-so-pure notes from this watch: https://gist.github.com/havenwood/fd96e63ec60c15e07af85fc2f76f8ed7
[06:49:34] kits: has joined #ruby
[06:49:38] mark2: has joined #ruby
[06:49:50] havenwood: 'tis the fibonacci hour
[06:50:25] baweaver: roelof: spec file?
[06:50:34] baweaver: also, do you know how inject works?
[06:50:47] roelof: baweaver: I cannot give you. It's a exercise from ruby monk
[06:50:59] jgt1: has joined #ruby
[06:51:15] baweaver: what was the problem?
[06:51:27] baweaver: *exercise description
[06:51:35] webus: has joined #ruby
[06:52:02] roelof: baweaver: I thought I knew how inject works , [ 1, 2,3].inject { |item,sum| sum += item } schould give 6
[06:52:27] roelof: baweaver: this page : https://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/44-collections/lessons/95-building-collections
[06:52:28] baweaver: It does, though += isn't needed there
[06:52:30] roelof: at the bottom
[06:52:51] sinanislekdemir: has joined #ruby
[06:53:14] roelof: baweaver: oke, how could I write the inject then better ?
[06:53:24] pandaant: has joined #ruby
[06:53:43] baweaver: did you read the description?
[06:53:58] Ox0dea: roelof: You're not being asked to implement #inject, for what that's worth.
[06:54:06] PedramT: has joined #ruby
[06:54:08] baweaver: read again, slowly
[06:54:12] Mon_Ouie: Also the names you're giving to item and sum suggest you got the arguments backwards
[06:54:16] jaruga__: has joined #ruby
[06:54:25] baweaver: Mon_Ouie: good catch
[06:54:45] jgrevich: has joined #ruby
[06:54:46] Ox0dea: havenwood: That's nifty! Good on you for giving it its proper name. :)
[06:54:49] jaruga__: has joined #ruby
[06:54:54] roelof: o, I thought I need it because of this hint : The tests are using the map and inject methods. These are available in the Enumerable module. Mix the module in and define the each method for your class.
[06:55:40] djbkd: has joined #ruby
[06:55:59] speaking1ode: has joined #ruby
[06:56:02] roelof: beagles: oke, I will begin again. Then I see this message : the `each` method should be defined
[06:56:22] roelof: so I make a each method , correct baweaver
[06:57:03] roelof: baweaver: then I see this one : Enumerable's inject method should work
[06:57:32] cdg: has joined #ruby
[06:57:40] roelof: how do I make it then work, baweaver ?
[06:57:45] Ox0dea: roelof: Read again.
[06:59:11] hxegon: has joined #ruby
[06:59:16] roelof: Ox0dea: which part. I see this rspec message : Enumerable's inject method should work and then undefined method `inject' for #FibonacciNumbers:0x000000031339d8
[06:59:37] baweaver: Read that last box, word for word
[06:59:51] baweaver: you're going to need to find this one yourself
[07:00:01] zenspider: roelof: you need to read and think BEFORE you write in this window. on EACH error.
[07:00:05] roelof: you mean this one : the Enumerable module should be mixed in
[07:00:36] zenspider: slow down. read. think. you got this
[07:01:51] vondruch: has joined #ruby
[07:02:47] ur5us: has joined #ruby
[07:03:06] baweaver: Ox0dea: https://gist.github.com/baweaver/3552a966ab32670543a0c020a294d4e9 - chunk in that style
[07:03:11] roelof: found it, The answer is in the second part of the explanation
[07:03:25] baweaver: not a fan of it, need to simplify more later.
[07:04:33] lsmola: has joined #ruby
[07:04:42] Stan: has joined #ruby
[07:05:11] jorum: has joined #ruby
[07:05:14] SCHAAP137: has joined #ruby
[07:05:51] agent_white: has joined #ruby
[07:07:10] mistermocha: has joined #ruby
[07:07:15] baweaver: chunk_while is easier.
[07:07:18] jtoy: has joined #ruby
[07:07:41] PedramT: has joined #ruby
[07:08:04] zenspider: baweaver: baby steps
[07:08:13] pawnbox: has joined #ruby
[07:08:22] baweaver: ah, in my context
[07:08:40] baweaver: reimplementing all of Enumerable (minus Lazy/Enumerator) using Reduce
[07:08:46] smckee: has joined #ruby
[07:08:54] galeido: has joined #ruby
[07:08:55] galeido: has joined #ruby
[07:08:57] baweaver: mostly for fun / thought exercise.
[07:09:33] baweaver: also works as a great intro to recursion using inner functions and TCO without realizing that's effectively what you're doing.
[07:10:38] blackmesa: has joined #ruby
[07:10:54] pandaant: has joined #ruby
[07:12:09] baweaver: writing a tutorial over all of it, comments / notes included. At the end I drop the bombshell that they've just realized how to implement a good portion of FP basics that translate almost 1:1 to Scala/F#
[07:13:56] mhoungbo: has joined #ruby
[07:15:23] agit0: has joined #ruby
[07:15:48] CausaMortis: has joined #ruby
[07:16:47] ur5us: has joined #ruby
[07:19:10] aufi: has joined #ruby
[07:19:20] devbug: has joined #ruby
[07:20:31] karioleez: how can someone talk to kernel devices with Ruby ? Do I need any C libraries ?
[07:21:58] sandstrom: has joined #ruby
[07:22:58] AndroUser: has joined #ruby
[07:23:09] AndroUser: has left #ruby: ()
[07:23:20] djellemah: karioleez: http://ruby-doc.org/stdlib-2.3.0/libdoc/fiddle/rdoc/Fiddle.html is a good place to start
[07:23:31] terlar: has joined #ruby
[07:23:52] AndroUser: has joined #ruby
[07:24:03] PedramT: has joined #ruby
[07:24:56] jtoy: has joined #ruby
[07:25:05] karioleez: djellemah: so it will always be a call to a C library ?
[07:26:38] djellemah: dunno. Depends on the device, I think. If the device has /dev entries, you might be able to use those. I've talked to a serial port before using /dev/ttyS0
[07:26:51] PedramT_: has joined #ruby
[07:29:42] fumihiro: has joined #ruby
[07:30:05] duckpuppy: has joined #ruby
[07:30:08] karioleez: djellemah: talking to serial devices is pretty easy
[07:30:40] karioleez: I posted a question also in SO: https://stackoverflow.com/questions/36419824/how-to-talk-to-kernel-devices-with-ruby-in-linux ?
[07:32:11] alexherbo2: has joined #ruby
[07:32:55] tmtwd: has joined #ruby
[07:32:55] Ox0dea: &ri ioctl karioleez
[07:32:55] `derpy: karioleez: http://ruby-doc.org/core-2.3.0/IO.html#method-i-ioctl
[07:34:11] karioleez: `derpy: I believe this is only for read requests
[07:34:38] jorum: has joined #ruby
[07:34:41] Ox0dea: karioleez: IO#ioctl can do anything ioctl(2) can, I'd imagine.
[07:34:57] Ox0dea: It's effectively a wrapper.
[07:35:04] Madplatypus: has joined #ruby
[07:35:13] shmuli: has joined #ruby
[07:35:41] dn`: has joined #ruby
[07:35:41] Silox|: has joined #ruby
[07:35:58] karioleez: Ox0dea: interesting
[07:36:05] karioleez: Ox0dea: have you ever used this ?
[07:36:10] Ox0dea: I've not.
[07:36:19] Ox0dea: Too low-level for my blood.
[07:38:30] karioleez: but this is awesome
[07:38:34] antgel: has joined #ruby
[07:38:59] Ox0dea: Ruby loves you and wants you to be happy. :)
[07:39:04] solars: has joined #ruby
[07:39:17] rmulligan: has joined #ruby
[07:39:17] karioleez: lol thanks for the hint
[07:39:33] chagel: has joined #ruby
[07:39:46] Ox0dea: No worries.
[07:40:26] terlar: has joined #ruby
[07:40:49] dikaio: has joined #ruby
[07:41:37] shmuli: has joined #ruby
[07:42:05] merida: has joined #ruby
[07:42:08] karmatr0n: has joined #ruby
[07:46:49] Ishido: has joined #ruby
[07:47:20] SHyx0rmZ: has joined #ruby
[07:48:52] hahuang65: has joined #ruby
[07:54:01] rmulligan: has joined #ruby
[07:56:49] skade: has joined #ruby
[07:56:50] pawnbox: has joined #ruby
[07:57:30] the_drow: has joined #ruby
[07:59:59] mikecmpbll: has joined #ruby
[08:01:03] vondruch: has joined #ruby
[08:01:35] stannard: has joined #ruby
[08:02:44] mdw: has joined #ruby
[08:03:49] neanderslob_: has joined #ruby
[08:03:53] ruby-lang624: has joined #ruby
[08:04:34] sandstrom: has left #ruby: ("OS X IRC Client (www.textualapp.com)")
[08:05:59] smckee: has joined #ruby
[08:06:23] tildes: has joined #ruby
[08:07:00] mistermocha: has joined #ruby
[08:08:20] edwinvdgraaf: has joined #ruby
[08:12:25] blackmesa: has joined #ruby
[08:13:57] ruby[bot]: -b *!*@gateway/web/freenode/ip.128.199.83.245$#ruby-banned
[08:14:55] Couch: has joined #ruby
[08:15:36] pawnbox: has joined #ruby
[08:17:06] Polysics: has joined #ruby
[08:21:06] marr: has joined #ruby
[08:22:13] snowy: has joined #ruby
[08:23:19] yfeldblum: has joined #ruby
[08:24:24] rmulligan: has joined #ruby
[08:26:06] colegatron: has joined #ruby
[08:26:06] existensil: has joined #ruby
[08:26:20] mistermocha: has joined #ruby
[08:26:32] colegatron: has left #ruby: ()
[08:26:39] karioleez: has joined #ruby
[08:27:17] sepp2k: has joined #ruby
[08:27:34] mrgrieves: has joined #ruby
[08:28:38] anisha: has joined #ruby
[08:29:10] snowy: has joined #ruby
[08:30:10] senayar: has joined #ruby
[08:30:10] senayar: has joined #ruby
[08:30:11] ruby[bot]: +b senayar!*@*$#ruby-fix-your-connection
[08:30:11] ruby[bot]: ruby[bot] kicked senayar: banned before
[08:30:29] chridal: I'm very interested in understanding and measuring performance of a Rack app and in general
[08:30:31] chridal: Where should I be looking resources-wise?
[08:30:49] chridal: I'd love to read some good text on performance and benchmarking and in general but also Ruby-specific
[08:31:34] baweaver: has joined #ruby
[08:31:59] beast: has joined #ruby
[08:36:00] antgel: has joined #ruby
[08:36:56] shmuli_: has joined #ruby
[08:38:43] weckl: has joined #ruby
[08:41:04] chagel: has joined #ruby
[08:42:52] weckl: has joined #ruby
[08:43:08] glcx: has joined #ruby
[08:43:08] glcx: has joined #ruby
[08:43:27] weckl: has joined #ruby
[08:48:57] mistermocha: has joined #ruby
[08:49:40] hahuang65: has joined #ruby
[08:51:06] Polysics_: has joined #ruby
[08:51:22] skade: has joined #ruby
[08:53:13] vale_tudo: has joined #ruby
[08:53:38] ferr: has joined #ruby
[08:53:54] Radar: chridal: considered using a service like new relic or skylight for that?
[08:54:27] chridal: Radar: What I mean is I'd like to understand actually how different things affect performance
[08:54:34] chridal: such as the real cost of spinning of a thread
[08:55:46] rodfersou: has joined #ruby
[08:56:47] skade: has joined #ruby
[08:57:44] bluOxigen: has joined #ruby
[08:59:43] kam270: has joined #ruby
[09:00:29] hahuang65: has joined #ruby
[09:01:53] shmuli: has joined #ruby
[09:06:35] madgen: has joined #ruby
[09:07:10] chagel: has joined #ruby
[09:07:41] n008f4g_: has joined #ruby
[09:08:35] Tempesta: has joined #ruby
[09:09:35] blackgoat: has joined #ruby
[09:10:07] skislak: has joined #ruby
[09:10:12] adaedra: !unban senayar
[09:10:12] ruby[bot]: -b senayar!*@*$#ruby-fix-your-connection
[09:10:13] Adam_FrVancouver: ok.. I need to install ruby 1.9.2 (preferrably 1.9.2-p180).. don't ask why
[09:10:26] Adam_FrVancouver: how can I get that old version?
[09:10:35] Radar: Adam_FrVancouver: ruby-install ruby 1.9.2-p180
[09:10:48] Adam_FrVancouver: ruby-install will do it?
[09:11:19] Radar: You have to install ruby-install first.
[09:11:47] Adam_FrVancouver: ok.. thanks. was thinking I would need to trick rvm or something...
[09:13:16] Adam_FrVancouver: no specific ppa needed for ruby-install?
[09:13:38] tjvc: has joined #ruby
[09:13:41] tjvc: has joined #ruby
[09:14:06] adaedra: rvm should be able to do it too, no?
[09:14:13] sathish: has joined #ruby
[09:14:13] blackmesa: has joined #ruby
[09:14:38] Adam_FrVancouver: adaedra: I don't think it supports crappy versions like this one
[09:14:45] Adam_FrVancouver: it's full of security holes
[09:14:56] Adam_FrVancouver: but i'm not sure
[09:15:21] antgel: has joined #ruby
[09:16:41] sathish: Hey I'm currently using middleman for a project, Now I want to collect payments from the website, I want to make API calls and send API tokens, How can i go about doing that in middleman
[09:16:44] shmuli: has joined #ruby
[09:17:24] adaedra: Adam_FrVancouver: well did you at least try?
[09:18:04] chagel: has joined #ruby
[09:19:22] benlieb: has joined #ruby
[09:20:57] the_drow: has joined #ruby
[09:22:15] blackgoat: has joined #ruby
[09:23:03] chagel: has joined #ruby
[09:23:55] Kedare: has joined #ruby
[09:24:39] evidex: has joined #ruby
[09:24:56] nodejunkie: has joined #ruby
[09:26:55] tvw: has joined #ruby
[09:30:27] fumihiro: has joined #ruby
[09:30:27] chagel: has joined #ruby
[09:31:37] platzhirsch: has joined #ruby
[09:32:16] duckpuppy: has joined #ruby
[09:33:46] minimalism: has joined #ruby
[09:37:12] PedramT: has joined #ruby
[09:37:14] workmad3: has joined #ruby
[09:39:21] PedramT_: has joined #ruby
[09:41:53] PedramT__: has joined #ruby
[09:42:22] merida: has joined #ruby
[09:42:23] jorum: has joined #ruby
[09:44:07] karmatr0n: has joined #ruby
[09:45:21] acosonic: has joined #ruby
[09:45:25] codenea: has joined #ruby
[09:45:47] platzhirsch: has left #ruby: ()
[09:45:51] acosonic: hi all whats the difference between something["something"] and something.something ?
[09:46:09] adaedra: it's not the same at all.
[09:46:24] Adam_FrVancouver: it is in JavaScript
[09:46:30] DoubleMalt: has joined #ruby
[09:46:36] acosonic: can I just use something.something without previously declaring it?
[09:46:36] adaedra: Yeah, but here it's #ruby :)
[09:46:46] acosonic: I want to pass some data structure to a function
[09:46:55] adaedra: acosonic: use a hash?
[09:47:15] acosonic: hash? Can you point me to some tutorial?
[09:48:08] forcer: acosonic: foo["something"] calls the [] method on the food object with one argument, the string "something". foo.something calls the method named "something" on the foo object with no arguments. You could use some tricks to handle unknown messages, but remember that most objects implement a lot of methods you would miss, then.
[09:48:36] acosonic: forcer: thanks, that was the answer I was looking for....
[09:48:54] forcer: I said "food" instead of "foo" there. I need to get some lunch I think.
[09:51:30] yorickpeterse: forcer: what kind of foo are you going to have for lunch?
[09:51:55] ruby[bot]: Badum-Tshh! https://www.youtube.com/watch?v=oShTJ90fC34
[09:51:59] antgel: has joined #ruby
[09:52:03] merida_: has joined #ruby
[09:52:17] forcer: yorickpeterse: You don't have bar for foo, you have foo at a bar.
[09:52:40] forcer: adaedra: ♥
[09:53:59] forcer: Also, pizza. We should use "pizza" as a metasyntactic variable anyhow. It's a great word, and with most people it evokes warm and happy feelings.
[09:54:13] ruby[bot]: here's your pizza: 🍕
[09:55:36] blackmesa: has joined #ruby
[09:58:41] jorum: has joined #ruby
[10:00:19] chagel: has joined #ruby
[10:03:16] hahuang65: has joined #ruby
[10:03:54] Musashi007: has joined #ruby
[10:05:02] smckee: has joined #ruby
[10:06:13] yfeldblum: has joined #ruby
[10:06:25] the_drow: has joined #ruby
[10:08:10] antgel: has joined #ruby
[10:11:34] nobitanobi: has joined #ruby
[10:13:24] shmuli: has joined #ruby
[10:13:40] blaxter: has joined #ruby
[10:13:52] bry4n: has joined #ruby
[10:13:55] nobitanobi: has joined #ruby
[10:15:20] Blaze_Boy: has joined #ruby
[10:19:44] chagel: has joined #ruby
[10:20:12] rmulligan: has joined #ruby
[10:20:33] last_staff: has joined #ruby
[10:21:08] chridal: I have this regex:
[10:21:10] chridal: The Algorithm Design manual
[10:21:15] chridal: Wait what.
[10:21:37] chridal: mentions = message.body.scan(/@(\w+)/i).flatten
[10:21:57] chridal: So what I want is to capture all usernames that come after an @ so that we can send them a notification that they have been mentioned
[10:22:12] chridal: There is however the issue when someone is writing something like: "Great job @steven!"
[10:22:53] chridal: So is there a way that I can transform my regex to only capture the first alphanumeric string (like \w) that precludes whichever special character that comes after
[10:23:14] chridal: so that "Hey there @steven!how are you doing?" would only yield `steven`?
[10:23:23] workmad3: chridal: that regexp already does that...
[10:23:43] chridal: What.. ok, so the bug is elsewhere then
[10:23:47] DefV: idd, \w doesn't capture !
[10:24:04] workmad3: chridal: http://rubular.com/
[10:24:09] chridal: but it will still capture @christian! and return christian?
[10:24:11] workmad3: oops: http://rubular.com/r/J71gSBlHHR
[10:24:32] chridal: Thanks. We have a bug somewhere else then. Thanks.
[10:24:53] izi: has joined #ruby
[10:25:53] djellemah: chridal: https://github.com/JuanitoFatas/fast-ruby might be good for performance
[10:26:39] chridal: djellemah: Thanks! Will have a look at that.
[10:28:45] chridal: Btw, also; we'd like to add statistics to our application. We'd for instance like to know what users are viewing which content etc
[10:29:31] chridal: What would be the best way to record these metrics? I mean it 'sounds bad' adding an INSERT-query to every single GET
[10:29:45] chridal: or hitting something like Redis with the network overhead associated with that
[10:30:09] chridal: Spinning off a new thread to avoid incurring the network overhead also sounds bad to me
[10:30:26] blackgoat: has joined #ruby
[10:30:37] Hanmac: chridal: a better regexp might be this:
[10:30:37] Hanmac: >> "Hey there @steven!how are you doing?".scan(/(?<=@)\w+/i)
[10:30:38] chridal: Have any one of you done anything like this with some sort of pre-forking like thing? That you have a pipe open to another process on the system that handles something like that?
[10:30:38] ruby[bot]: hanmac: # => ["steven"] (https://eval.in/547832)
[10:31:23] shmuli: has joined #ruby
[10:31:31] chridal: hanmac: Why is it better? What does the ?<=@ do?
[10:31:56] Hanmac: chridal: http://ruby-doc.org/core-2.3.0/Regexp.html Positive lookbehind assertion: ensures that the preceding characters match pat, but doesn't include those characters in the matched text
[10:32:21] fumihiro: has joined #ruby
[10:32:46] baweaver: has joined #ruby
[10:33:38] chridal: Aha. Yes, that would be better. Cheers!
[10:36:07] shmuli: has joined #ruby
[10:37:55] m8: has joined #ruby
[10:39:09] k13nox: has joined #ruby
[10:39:51] Begi: has joined #ruby
[10:40:06] Begi: has left #ruby: ()
[10:40:27] gregf: has joined #ruby
[10:43:22] n008f4g_: has joined #ruby
[10:43:52] the_drow: has joined #ruby
[10:45:00] karmatr0n: has joined #ruby
[10:45:24] Caerus: chridal, read up on Rails actioncable, I thinks that's the only way you're gonna get rid of a redis aproach to achieve something stateful
[10:46:56] chridal: Caerus: I thought ActionCable uses Redis?
[10:47:34] chridal: also, I'm unsure if I see how actioncable would solve this
[10:47:45] chridal: I don't really need the client to tell me whether he has viewed a resource since that GET really is enough
[10:47:50] merida: has joined #ruby
[10:48:00] chridal: Come to think about it I could probably do this with NGINX as well
[10:48:16] chridal: Too bad KONG uses Cassandra or I'd pull that right in.
[10:48:44] Caerus: i don't know. haven't really used it. just echoing what i've read lately, whenever stateful features show up, lots of people point to actiocable
[10:50:09] jgt1: has joined #ruby
[10:50:31] Caerus: oh i think i misunderstood. you wrote about saving statistics (doh). don't know where i got stateful from
[10:50:45] Caerus: ACTION yawns
[10:50:46] platzhirsch: has joined #ruby
[10:51:04] Caerus: i guess it's really late :P
[10:52:22] PedramT: has joined #ruby
[10:54:03] PedramT: has joined #ruby
[10:54:24] anisha: has joined #ruby
[10:55:13] Musashi007: has joined #ruby
[10:57:25] rmulligan: has joined #ruby
[10:57:27] evie_hammond: has joined #ruby
[10:58:22] dvinciguerra_: has joined #ruby
[10:59:55] andywojo: has joined #ruby
[11:04:14] hahuang65: has joined #ruby
[11:06:45] smckee: has joined #ruby
[11:07:56] nhhc: has joined #ruby
[11:08:47] davedev24: has joined #ruby
[11:08:58] the_drow: has joined #ruby
[11:12:33] FooMunki: has joined #ruby
[11:12:36] vale_tudo: has joined #ruby
[11:13:28] sandelius: has joined #ruby
[11:14:49] mistermocha: has joined #ruby
[11:17:40] DoubleMalt: has joined #ruby
[11:17:49] bkxd: has joined #ruby
[11:18:45] tvw: has joined #ruby
[11:19:05] tvw: has joined #ruby
[11:20:23] GodFather: has joined #ruby
[11:20:37] jgt1: has joined #ruby
[11:21:13] k13nox_: has joined #ruby
[11:22:19] trinaldi: has joined #ruby
[11:24:52] FooMunki: has joined #ruby
[11:25:18] sdothum: has joined #ruby
[11:26:20] Polysics: has joined #ruby
[11:26:47] RegulationD: has joined #ruby
[11:28:07] ldnunes: has joined #ruby
[11:31:28] dionysus69: has joined #ruby
[11:32:39] Blaze_Boy: has joined #ruby
[11:32:51] duckpuppy: has joined #ruby
[11:32:53] mikecmpbll: has joined #ruby
[11:33:47] jmorgado: has joined #ruby
[11:34:48] senayar: has joined #ruby
[11:35:20] Ishido: has joined #ruby
[11:36:46] Suntzu: has joined #ruby
[11:36:49] rahc: *paths["app/assets"].existent_directories
[11:36:59] rahc: what does the "*" at the start of that line do?
[11:37:28] skade: has joined #ruby
[11:39:17] rahc: fully, it's:
[11:39:18] rahc: app.config.assets.paths.unshift(*paths["app/assets"].existent_directories)
[11:39:36] adaedra: it's a splat
[11:39:48] the_drow: has joined #ruby
[11:39:49] rahc: err.. a what? :-)
[11:40:54] senayar: has joined #ruby
[11:41:06] y0da: has joined #ruby
[11:41:11] Musashi007: has joined #ruby
[11:41:39] htmldrum: has joined #ruby
[11:43:41] adaedra: it expand the parameters
[11:44:08] adaedra: >> def add(a, b); a + b; end; input = [2, 3]; add *input
[11:44:09] ruby[bot]: adaedra: # => 5 (https://eval.in/547901)
[11:44:25] adaedra: ^ here, it took the array input and passed contents as separate parameters
[11:47:30] sandelius: has joined #ruby
[11:48:35] stannard: has joined #ruby
[11:49:43] freerobby: has joined #ruby
[11:50:01] rodferso1: has joined #ruby
[11:53:03] Macaveli: has joined #ruby
[11:53:10] blackmesa: has joined #ruby
[11:55:38] rodfersou: has joined #ruby
[11:58:34] Ishido: has joined #ruby
[12:00:41] binaryplease1: has joined #ruby
[12:03:11] PedramT: has joined #ruby
[12:03:28] rahc: is there a language reference for ruby?
[12:03:49] k13nox: has joined #ruby
[12:05:03] adaedra: There's http://www.zenspider.com/Languages/Ruby/QuickRef.html
[12:05:12] rahc: I've done the "Try Ruby!" tutorial, and all the Ruby Koans but there seems to be lots of things about the language that keep coming up which I don't understand
[12:06:22] rahc: paths.add "config/database", with: "config/database.yml"
[12:06:35] snowy: has joined #ruby
[12:06:39] Pupeno: has joined #ruby
[12:06:39] Pupeno: has joined #ruby
[12:07:04] rahc: I can't seem to find any language reference document for the language
[12:07:07] rahc: does one exist?
[12:09:13] adaedra: not officially
[12:09:25] adaedra: all officially provided documents are here: http://ruby-doc.org/
[12:10:30] rahc: that seems like quite a huge oversight
[12:12:44] rmulligan: has joined #ruby
[12:14:11] StyXman: has left #ruby: ()
[12:14:39] bry4n: has joined #ruby
[12:15:24] apeiros: rahc: http://ruby-doc.org/core-2.3.0/_lib/racc/rdoc/grammar_en_rdoc.html
[12:15:42] Hanmac: has joined #ruby
[12:16:00] apeiros: and/or http://ruby-doc.org/core-2.3.0/doc/syntax_rdoc.html
[12:16:17] apeiros: generally take a look at the section "files" on the left
[12:16:26] NinjaPanzer: has joined #ruby
[12:17:05] apeiros: hm, but something looks off wrt those files. they seem truncated.
[12:17:34] barajasfab: has joined #ruby
[12:17:40] jorum: has joined #ruby
[12:18:02] apeiros: ah, it misses the nested files.
[12:18:08] apeiros: https://github.com/ruby/ruby/tree/trunk/doc
[12:18:46] bkxd: has joined #ruby
[12:18:50] apeiros: the splat operator would be explained here: https://github.com/ruby/ruby/blob/trunk/doc/syntax/calling_methods.rdoc
[12:19:02] adaedra: Ah, I missed these ones
[12:19:42] rickmasta: has joined #ruby
[12:22:16] kentnl: has joined #ruby
[12:22:16] kentnl: has joined #ruby
[12:22:36] Ishido: has joined #ruby
[12:23:07] FooMunki: has joined #ruby
[12:26:47] solars: has joined #ruby
[12:27:39] IrishGringo: has joined #ruby
[12:28:47] aupadhye: has joined #ruby
[12:31:40] pawnbox: has joined #ruby
[12:32:52] pawnbox: has joined #ruby
[12:33:06] chagel: has joined #ruby
[12:33:10] sudoubuntu: has joined #ruby
[12:33:23] baweaver: has joined #ruby
[12:37:40] but3k4: has joined #ruby
[12:40:03] stevednd: has joined #ruby
[12:41:42] pawnbox: has joined #ruby
[12:41:58] dstarh: has joined #ruby
[12:42:24] rake_db_migrate: has joined #ruby
[12:43:26] skade: has joined #ruby
[12:48:01] rake_db_migrate: has joined #ruby
[12:48:03] joaumg: has joined #ruby
[12:48:21] pawnbox: has joined #ruby
[12:49:03] Paradox: has joined #ruby
[12:49:07] Denart_: has joined #ruby
[12:49:54] CloCkWeRX: has joined #ruby
[12:50:03] roelof: has joined #ruby
[12:51:08] PedramT: has joined #ruby
[12:51:42] r4z3r: has joined #ruby
[12:51:42] roelof: who can help me to get the @normal and @subject to the self.can_drive function ? code so far : https://gist.github.com/rwobben/704fa2e9c9e09f3f71196b84dbd0d1d0
[12:52:07] cdg: has joined #ruby
[12:52:39] bluOxigen: has joined #ruby
[12:53:19] pawnbox: has joined #ruby
[12:54:23] hosttor: has joined #ruby
[12:54:26] _stu_: has joined #ruby
[12:54:41] r4z3r: has joined #ruby
[12:54:43] johnmilton: has joined #ruby
[12:55:28] callen92: has joined #ruby
[12:57:16] roelof: this is a ruby monk exercise which can be found here : https://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/50-debugging/lessons/119-the-debugging-primaries
[12:57:46] pifon: has joined #ruby
[12:58:16] bluOxigen: has joined #ruby
[12:58:23] fumihiro: has joined #ruby
[12:58:25] despai: has joined #ruby
[12:59:39] freerobby: has joined #ruby
[13:00:26] Mon_Ouie: Why are you defining 'can_drive?' as a class method?
[13:01:29] stannard: has joined #ruby
[13:02:18] roelof: Mon_Ouie: it's defined in the class VisualAcuity (10 and later) . but I have to use it in the DrivingLicenseAuthority class
[13:02:31] nobitanobi: has joined #ruby
[13:02:42] ChiefAlexander: has joined #ruby
[13:02:51] nerium: has joined #ruby
[13:02:57] Mon_Ouie: Why does that mean it should be a class method?
[13:03:41] roelof: because its a method which lifes in a class
[13:03:56] krz: has joined #ruby
[13:04:02] Mon_Ouie: All methods live inside classes.
[13:04:07] roelof: sorry, im a beginner which try to learn ruby by using ruby monk
[13:04:17] Mon_Ouie: For example, look at '@age >= 18'
[13:04:38] Mon_Ouie: This is how you are calling the Integer#>= method, even though you are not inside the Integer class
[13:04:59] roelof: yes, its defined in the same class as it's being used
[13:05:39] hahuang65: has joined #ruby
[13:05:41] roelof: normal and subject are part of another class
[13:05:49] jorum: has joined #ruby
[13:06:32] Mon_Ouie: No, valid_for_license? is used in the class where it is defined, but Integer#>= most certainly is not
[13:08:05] rmulligan: has joined #ruby
[13:08:19] Mon_Ouie: To call a method on an object, you'd use the_object.method_name (with arguments if needed)
[13:09:01] smckee: has joined #ruby
[13:09:32] diegoaguilar: has joined #ruby
[13:10:27] roelof: Mon_Ouie: normal and subject need to be floats otherwise I cannot divide it and check if the outcome is bigger then 0.5
[13:10:46] lapisangularis: has joined #ruby
[13:11:04] Mon_Ouie: What difference does that make?
[13:11:11] madgen: has joined #ruby
[13:11:30] Mon_Ouie: I was just talking about @age, which is an Integer (I assume; it doesn't really matter either)
[13:11:42] lapisangularis: hello, i've got a problem with curses gem in ruby 2.3.0
[13:12:33] tao_: has joined #ruby
[13:12:50] the_drow_: has joined #ruby
[13:12:52] lapisangularis: I'm requiring the gem, but then, I want to include module, and it seems ruby can't find it
[13:12:59] _SenpaiSilver_: has joined #ruby
[13:13:01] moeabdol2: has joined #ruby
[13:13:07] Denart__: has joined #ruby
[13:13:24] ocbtec: has joined #ruby
[13:13:38] lapisangularis: also, curses methods are not working
[13:13:43] AccordsLTN: has joined #ruby
[13:13:49] rmosolgo: has joined #ruby
[13:14:26] e4xit_: has joined #ruby
[13:14:29] Mendenhall_: has joined #ruby
[13:14:32] xaxisx: has joined #ruby
[13:14:35] optimaleatscout_: has joined #ruby
[13:14:39] pfg__: has joined #ruby
[13:14:40] troter_________: has joined #ruby
[13:14:52] glacius_: has joined #ruby
[13:14:52] bestie_: has joined #ruby
[13:15:06] antgel: has joined #ruby
[13:15:11] jgt2: has joined #ruby
[13:15:20] pmarreck_: has joined #ruby
[13:15:26] bb010g_: has joined #ruby
[13:15:34] jhill_: has joined #ruby
[13:15:44] akitada_: has joined #ruby
[13:15:53] dstarh: has joined #ruby
[13:16:01] neanderslob__: has joined #ruby
[13:16:15] Ikzi: has joined #ruby
[13:16:15] madgen_: has joined #ruby
[13:17:00] speaking2ode: has joined #ruby
[13:17:08] jmignault: has joined #ruby
[13:17:18] chihhsin_: has joined #ruby
[13:17:19] xsdg_: has joined #ruby
[13:17:21] gigetoo_: has joined #ruby
[13:18:52] pawnbox_: has joined #ruby
[13:19:02] _aeris_: has left #ruby: ("Konversation terminated!")
[13:20:21] spk_: has joined #ruby
[13:20:24] cschneid: has joined #ruby
[13:20:25] Phanes-: has joined #ruby
[13:20:31] bihi_: has joined #ruby
[13:21:02] Pupeno: has joined #ruby
[13:21:24] FastJack_: has joined #ruby
[13:21:51] Donkoko: has joined #ruby
[13:22:25] russt: has joined #ruby
[13:22:31] Miron_: has joined #ruby
[13:22:35] tomaw: has joined #ruby
[13:22:45] lapisangularis: has left #ruby: ("WeeChat 1.4")
[13:22:49] QualityAddict: has joined #ruby
[13:23:55] braderhart: has joined #ruby
[13:24:07] iooner: has joined #ruby
[13:24:07] teotwaki_: has joined #ruby
[13:24:07] bgresham: has joined #ruby
[13:24:07] DanKnox_: has joined #ruby
[13:24:07] IrishGringo_: has joined #ruby
[13:24:07] shiver_: has joined #ruby
[13:24:07] tinnvec_: has joined #ruby
[13:24:07] crdpink2: has joined #ruby
[13:24:07] c355E3B_: has joined #ruby
[13:24:07] HashNuke_: has joined #ruby
[13:24:07] pwnd_nsfw`: has joined #ruby
[13:24:07] nobitanobi: has joined #ruby
[13:24:07] Polysics: has joined #ruby
[13:24:08] sepp2k: has joined #ruby
[13:24:08] patrick-sartent: has joined #ruby
[13:24:08] ericlee: has joined #ruby
[13:24:08] gix: has joined #ruby
[13:24:08] znz_jp: has joined #ruby
[13:24:08] ujjain: has joined #ruby
[13:24:08] jsaak: has joined #ruby
[13:24:08] MuffinPimp: has joined #ruby
[13:24:08] n1colas: has joined #ruby
[13:24:08] nano-: has joined #ruby
[13:24:08] rehat: has joined #ruby
[13:24:08] Billias: has joined #ruby
[13:24:08] aibot: has joined #ruby
[13:24:08] nyandoge: has joined #ruby
[13:24:08] Caerus: has joined #ruby
[13:24:08] Veejay: has joined #ruby
[13:24:08] JStoker: has joined #ruby
[13:24:08] EvilJStoker: has joined #ruby
[13:24:08] Cork: has joined #ruby
[13:24:08] djcp: has joined #ruby
[13:24:08] mikeiniowa: has joined #ruby
[13:24:08] charles81: has joined #ruby
[13:24:08] incomprehensibly: has joined #ruby
[13:24:08] JoL1hAHN: has joined #ruby
[13:24:08] Diabolik: has joined #ruby
[13:24:09] Eleeleth: has joined #ruby
[13:24:09] shelling__: has joined #ruby
[13:24:09] kireevco: has joined #ruby
[13:24:09] j2k_: has joined #ruby
[13:24:09] tekacs: has joined #ruby
[13:24:09] Mr_Pancake: has joined #ruby
[13:24:09] ledestin: has joined #ruby
[13:24:09] DarkBushido: has joined #ruby
[13:24:09] hostess: has joined #ruby
[13:24:09] kloeri: has joined #ruby
[13:24:09] codepete: has joined #ruby
[13:24:09] edev: has joined #ruby
[13:24:09] shadoi1: has joined #ruby
[13:24:09] oz: has joined #ruby
[13:24:09] Olipro: has joined #ruby
[13:24:09] CustosLimen: has joined #ruby
[13:24:09] dede: has joined #ruby
[13:24:09] jcp: has joined #ruby
[13:24:09] cardoni: has joined #ruby
[13:24:09] rflot: has joined #ruby
[13:24:09] catbusters: has joined #ruby
[13:24:09] ddfreyne_: has joined #ruby
[13:24:09] ELCALOR: has joined #ruby
[13:24:09] epochwolf: has joined #ruby
[13:24:09] BackEndCoder: has joined #ruby
[13:24:09] mozzarella: has joined #ruby
[13:24:09] pocketprotector: has joined #ruby
[13:24:09] zzak___: has joined #ruby
[13:24:09] DanielJack: has joined #ruby
[13:24:09] Meeh: has joined #ruby
[13:24:10] jokke: has joined #ruby
[13:24:10] jlyndon: has joined #ruby
[13:24:10] ijij: has joined #ruby
[13:24:10] JRod: has joined #ruby
[13:24:11] voidDotClass: has joined #ruby
[13:24:11] saneax: has joined #ruby
[13:24:13] voidDotClass: If I need to get a date object for 1st Jan 2016, how to do that?
[13:24:17] c355E3B_: has joined #ruby
[13:24:17] HashNuke_: has joined #ruby
[13:24:18] saneax: has joined #ruby
[13:24:19] caw: has joined #ruby
[13:24:28] caw: has joined #ruby
[13:24:28] tylersmith: has joined #ruby
[13:24:40] shellie_: has joined #ruby
[13:24:52] Olipro: has joined #ruby
[13:25:18] PlasmaStar: has joined #ruby
[13:25:40] mburns: has joined #ruby
[13:26:07] DoubleMalt: has joined #ruby
[13:26:54] jero_: has joined #ruby
[13:27:08] swills: has joined #ruby
[13:27:18] Mon_Ouie: >> Date.new(2016)
[13:27:20] ruby[bot]: Mon_Ouie: # => uninitialized constant Date ...check link for more (https://eval.in/547958)
[13:27:27] mhoungbo: has joined #ruby
[13:27:28] Mon_Ouie: >> require 'date'; Date.new(2016)
[13:27:29] ruby[bot]: Mon_Ouie: # => #<Date: 2016-01-01 ((2457389j,0s,0n),+0s,2299161j)> (https://eval.in/547959)
[13:27:31] whiteline: has joined #ruby
[13:27:40] jwang: has joined #ruby
[13:27:42] dede: has joined #ruby
[13:28:05] howdoi: has joined #ruby
[13:28:06] hk238: has joined #ruby
[13:28:18] hightower2: has joined #ruby
[13:28:22] ELCALOR: has joined #ruby
[13:28:31] hk238: has joined #ruby
[13:28:40] jcp: has joined #ruby
[13:28:40] nyandoge: has joined #ruby
[13:29:01] jokester: has joined #ruby
[13:29:31] melter: has joined #ruby
[13:29:35] drptbl: has joined #ruby
[13:30:03] rbennacer: has joined #ruby
[13:31:04] sgambino: has joined #ruby
[13:31:09] GodFather: has joined #ruby
[13:32:26] mistermocha: has joined #ruby
[13:33:09] haylon: has joined #ruby
[13:33:36] duckpuppy: has joined #ruby
[13:35:47] Aviio: has joined #ruby
[13:35:49] IrishGringo: has joined #ruby
[13:37:12] jlyndon: has joined #ruby
[13:38:47] chouhoulis: has joined #ruby
[13:40:26] platzhirsch1: has joined #ruby
[13:41:04] Kharma: has joined #ruby
[13:41:49] AlexRussia: has joined #ruby
[13:43:05] Ropeney: has joined #ruby
[13:43:12] malconis: has joined #ruby
[13:44:26] BSaboia: has joined #ruby
[13:44:44] ChiefAlexander: has joined #ruby
[13:45:01] Zai00: has joined #ruby
[13:45:30] bry4n: has joined #ruby
[13:46:41] griffindy: has joined #ruby
[13:47:52] karmatr0n: has joined #ruby
[13:48:35] ggherdov: has joined #ruby
[13:49:12] bkxd: has joined #ruby
[13:49:13] solars: has joined #ruby
[13:49:21] ddv: has joined #ruby
[13:51:30] ctrlrsf: has joined #ruby
[13:52:19] malconis: has joined #ruby
[13:58:32] smckee: has joined #ruby
[13:59:34] yqt: has joined #ruby
[13:59:38] PedramT: has joined #ruby
[13:59:53] Zai00: has joined #ruby
[14:00:54] bry4n: has joined #ruby
[14:01:38] sseewwee: has joined #ruby
[14:02:07] platzhirsch: has joined #ruby
[14:03:48] whippythellama: has joined #ruby
[14:04:18] malconis: has joined #ruby
[14:04:50] hightower2: has joined #ruby
[14:05:00] idle_task: has joined #ruby
[14:05:37] grill: has joined #ruby
[14:06:31] hahuang65: has joined #ruby
[14:07:14] Zai00: has joined #ruby
[14:07:33] chagel: has joined #ruby
[14:07:41] davedev24: has joined #ruby
[14:09:52] diegoaguilar: has joined #ruby
[14:11:56] PedramT: has joined #ruby
[14:13:25] bkxd: has joined #ruby
[14:14:23] dfinninger: has joined #ruby
[14:15:40] cpruitt: has joined #ruby
[14:15:44] mistermocha: has joined #ruby
[14:16:41] mistermo_: has joined #ruby
[14:17:29] nobitanobi: has joined #ruby
[14:18:02] aegis3121: has joined #ruby
[14:18:09] Ropeney_: has joined #ruby
[14:19:58] CloCkWeRX: has joined #ruby
[14:22:25] PedramT: has joined #ruby
[14:22:31] dhollinger: has joined #ruby
[14:22:34] smckee: has joined #ruby
[14:24:05] PedramT: has joined #ruby
[14:26:15] bry4n: has joined #ruby
[14:27:16] sseewwee: has joined #ruby
[14:29:09] xaxisx: has joined #ruby
[14:30:07] aufi: has joined #ruby
[14:30:20] pawnbox__: has joined #ruby
[14:30:38] tmtwd: has joined #ruby
[14:31:40] karmatr0n: has joined #ruby
[14:33:48] stantona: has joined #ruby
[14:34:33] ChiefAlexander: has joined #ruby
[14:36:45] constantinexvi: has joined #ruby
[14:42:17] Gasher: has joined #ruby
[14:42:47] Blaze_Boy: has joined #ruby
[14:44:14] c355E3B: has joined #ruby
[14:44:25] blackmesa: has joined #ruby
[14:44:29] freerobby: has joined #ruby
[14:45:11] rake_db_migrate: has joined #ruby
[14:45:53] rmosolgo: has joined #ruby
[14:46:17] PedramT: has joined #ruby
[14:47:02] banister: has joined #ruby
[14:47:14] a1fa: I have epoch time, and need to strftime it to another timezone. In rails i used in_time_zone(), but that does not appear to be available in Ruby 1.9.3
[14:47:14] hxegon: has joined #ruby
[14:47:45] a1fa: Time.at("1459866601").in_time_zone("London").strftime("%Y%m%dT%H%M00000")
[14:47:53] deuterium: has joined #ruby
[14:48:56] mistermocha: has joined #ruby
[14:49:10] wilbert: has joined #ruby
[14:50:20] PedramT: has joined #ruby
[14:51:20] PedramT: has joined #ruby
[14:52:39] platzhirsch: has joined #ruby
[14:52:43] a1fa: http://ruby-doc.org/core-1.9.3/Time.html < nothing is sticking out
[14:53:15] dionysus69: has joined #ruby
[14:53:27] ddv: a1fa: 1.9.3 is EOL
[14:53:42] deuterium: hi, i get "*** ERROR: You are not authorized to query the status for this Phusion Passenger instance. Please try again with 'rvmsudo'." all of a sudden when executing 'cap production deploy tenant=mytenanttodeploy'. any idea what's causing this and how to prevent this error? stack-trace: https://gist.github.com/anonymous/b6f76ea9f4a36bf2484f8b9d4f73f0df
[14:54:50] deuterium: it could be related to a recent security upgrade of linux-libc-dev (debian package, i.e. a minor security upgrade done via apt-get upgrade)
[14:55:06] chris2: >> Time.at(1459866601).localtime("+05:00")
[14:55:07] ruby[bot]: chris2: # => 2016-04-05 19:30:01 +0500 (https://eval.in/548013)
[14:55:09] smathy: has joined #ruby
[14:55:32] deuterium: passenger has been installed as a gem like: $ gem install passenger
[14:55:32] a1fa: chris2: but that would be a static offset
[14:55:59] chris2: for real time zones, you need some lib i guess
[14:56:04] deuterium: the passenger apache module has been installed by executing $ passenger-install-apache2-module
[14:56:09] a1fa: chris2: would that not cause issues with DST?
[14:56:37] a1fa: i had it as .gmt. before, and that caused issue because London moved to summer time
[14:57:05] rmulligan: has joined #ruby
[14:57:12] Zai00: has joined #ruby
[14:57:19] deuterium: do i have to reinstall the passenger gem after a (minor) security upgrade of linux-libc-dev? or do i have to re-run passenger-install-apache2-module?
[14:58:04] chris2: as a hack, and probably only on glibc, you can do
[14:58:06] chris2: >> ENV["TZ"]="Chile/Continental"; Time.at(1459866601)
[14:58:07] ruby[bot]: chris2: # => 2016-04-05 11:30:01 -0300 (https://eval.in/548015)
[14:58:25] chris2: dont forget to restore $TZ after :P
[14:58:37] a1fa: roger that
[14:58:46] a1fa: i was actually thinking that, but it was ugly as sin
[14:59:12] chris2: or use some time zone gem
[14:59:25] PedramT: has joined #ruby
[15:00:37] polishdub: has joined #ruby
[15:00:45] chris2: actually its safe, ruby ensures tzset is run
[15:00:55] chris2: still not threadsafe etc
[15:02:57] abyx: has joined #ruby
[15:07:01] diegoaguilar: has joined #ruby
[15:07:15] troulouliou_div2: has joined #ruby
[15:07:32] hahuang65: has joined #ruby
[15:08:55] ItSANgo: has joined #ruby
[15:09:34] mistermocha: has joined #ruby
[15:10:37] rickmasta: has joined #ruby
[15:10:39] nemesit|znc: has joined #ruby
[15:10:47] Zai00: has joined #ruby
[15:11:02] PedramT: has joined #ruby
[15:11:39] forcer: has joined #ruby
[15:11:56] codecop: has joined #ruby
[15:12:02] PedramT: has joined #ruby
[15:13:16] avenj: has joined #ruby
[15:13:16] avenj: has joined #ruby
[15:14:12] dfinninger: has joined #ruby
[15:14:34] phpwebdev: has joined #ruby
[15:14:36] smckee: has joined #ruby
[15:15:10] parduse: has joined #ruby
[15:15:18] xaxisx: has joined #ruby
[15:15:27] jottr: has joined #ruby
[15:16:10] hxegon: has joined #ruby
[15:16:15] Mia: has joined #ruby
[15:16:15] Mia: has joined #ruby
[15:18:57] Phage: has joined #ruby
[15:19:23] Phage: How can I check whether a json field is empty or not? I've tried if parsed_source['link'] == [] but that doesn't seem tok work.
[15:19:56] greenbigfrog: has joined #ruby
[15:20:00] greenbigfrog: has left #ruby: ()
[15:20:00] Donkoko: if its a string you can use .blank?
[15:20:39] mistermo_: has joined #ruby
[15:21:02] rmosolgo: >> parsed_source = {"key" => 1}; [parsed_source.key?("link"), parsed_source["link"].nil?]
[15:21:03] Donkoko: so parsed_source['link'].blank?
[15:21:03] ruby[bot]: rmosolgo: # => [false, true] (https://eval.in/548026)
[15:21:26] mistermocha: has joined #ruby
[15:21:26] rmosolgo: key?("key_name") will check if the key is present at all
[15:21:53] rmosolgo: parsed_source["key_name"].nil? # will be true if 1) key is not present; OR 2) key is present and value is `nil`
[15:22:29] Phage: rmosolgo: thank you very much!
[15:22:39] sgambino: has joined #ruby
[15:23:14] Blaze_Boy: has joined #ruby
[15:23:26] merida: has joined #ruby
[15:23:58] mostlybadfly: has joined #ruby
[15:24:13] dfinninger: has joined #ruby
[15:24:58] rmosolgo: (`.blank?` is good too, but it's from ActiveSupport, right? `.blank?` is true for: `nil`, `""` (empty string), `[]` (empty array), `{}`, (empty hash))
[15:25:10] dfinninger: has joined #ruby
[15:25:16] Phage: rmosolgo: it always returns false
[15:25:20] Phage: even though it's empty
[15:25:33] Donkoko: oooh i didnt realize we are not in rails :)
[15:25:42] moeabdol3: has joined #ruby
[15:25:43] Phage: We're not
[15:25:50] Donkoko: yeah, in that case .nil? should do the work
[15:25:53] Mon_Ouie: you can use #empty?
[15:25:55] Phage: {"month": "1", "num": 1, "link": "", "year": "2006" }
[15:26:02] rmosolgo: oh, it's an empty string?
[15:26:04] smathy: a1fa, http://devdocs.io/rails~4.2/time#method-c-use_zone is nice, not pure ruby though obviously.
[15:27:11] rmosolgo: >> parsed_source = {"link" => ""}; parsed_source.key?("link") && parsed_source["link"].empty?
[15:27:12] ruby[bot]: rmosolgo: # => true (https://eval.in/548028)
[15:27:15] a1fa: smathy: i was using in_time_zone in rails, and that worked great
[15:27:16] rmosolgo: http://ruby-doc.org/core-2.1.0/String.html#method-i-empty-3F
[15:27:30] ruby-lang391: has joined #ruby
[15:27:32] a1fa: ended up using chris2 solution for the ruby1.9.3 code via ENV[TZ]
[15:28:34] deuterium: what exactly does this warning mean? "Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run: export rvmsudo_secure_path=1"
[15:28:39] a1fa: ruby-lang391: obviously not
[15:28:43] a1fa: just us chickens
[15:29:09] deuterium: does that mean rvm has lacking permission to read /etc/sudoers or what?
[15:29:56] fedexo: has joined #ruby
[15:30:08] Phage: rmosolgo: thanks! works now :)
[15:30:42] solars: has joined #ruby
[15:31:31] VeryBewitching: has joined #ruby
[15:32:31] Guest38_: has joined #ruby
[15:32:35] dfinning_: has joined #ruby
[15:33:07] shmuli: has joined #ruby
[15:33:46] elifoster: has joined #ruby
[15:34:00] dikaio: has joined #ruby
[15:34:22] duckpuppy: has joined #ruby
[15:36:06] smathy: deuterium, you might find a more knowledgable audience in #rvm
[15:36:21] deuterium: smathy: thanks for the hint
[15:36:25] B1n4r10: has joined #ruby
[15:38:56] braincrash: has joined #ruby
[15:39:39] kellabyte: has left #ruby: ()
[15:40:05] abyx: has joined #ruby
[15:42:02] Blaze_Boy: has joined #ruby
[15:42:27] x77686d: has joined #ruby
[15:43:55] hxegon: has joined #ruby
[15:44:04] sseewwee: has joined #ruby
[15:44:11] miqlas: has joined #ruby
[15:44:58] WhoLettem: has joined #ruby
[15:45:31] WhoLettem: /msg NickServ help
[15:46:52] rikkipitt: has joined #ruby
[15:47:24] Blaze_Boy: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[15:49:49] WhoLettem: has joined #ruby
[15:50:00] kies: has joined #ruby
[15:50:04] WhoLettem: Can anyone help me with tech?
[15:50:19] WhoLettem: The channel is empty and I canot seem to find help
[15:50:31] darkxploit: has joined #ruby
[15:50:48] smathy: WhoLettem, this is #ruby, the rules are in the /topic
[15:51:02] WhoLettem: Yea I realize
[15:51:08] WhoLettem: Is there any channel for tech help?
[15:52:02] [Butch]: has joined #ruby
[15:52:03] shevy: WhoLettem try to ask on #freenode, they know their channels
[15:52:15] WhoLettem: Ok Thank you
[15:52:20] smathy: WhoLettem, freenode is all about tech help, but it's in specific categories.
[15:52:31] rmulligan: has joined #ruby
[15:54:12] chris2: do you mean TeX?
[15:54:28] The_Phoenix: has joined #ruby
[15:54:50] anon7766: has joined #ruby
[15:55:37] thegunbuster: has joined #ruby
[15:56:07] amclain: has joined #ruby
[15:56:19] havenwood: WhoLettem: Now that you're here you have to learn Ruby. We can't bend the rules.
[15:56:41] havenwood: WhoLettem: http://ruby-community.com/pages/links
[15:56:42] WhoLettem: havenwood: I already know Ruby. Haha
[15:56:51] havenwood: WhoLettem: Then you may pass.
[15:57:28] ChiefAlexander: has joined #ruby
[15:58:42] anon7766: has left #ruby: ()
[16:00:38] rbraaf: has joined #ruby
[16:00:57] nfk|laptop: has joined #ruby
[16:01:52] benlieb: has joined #ruby
[16:02:24] PlasmaStar: has joined #ruby
[16:02:36] sseewwee: has joined #ruby
[16:03:06] noService: has joined #ruby
[16:03:46] Devalo: has joined #ruby
[16:04:50] dfinninger: has joined #ruby
[16:05:51] dfinninger: has joined #ruby
[16:06:07] smckee: has joined #ruby
[16:09:01] merida_: has joined #ruby
[16:10:39] sudoubuntu: has joined #ruby
[16:10:45] symm-: has joined #ruby
[16:11:07] Zai00: has joined #ruby
[16:12:07] GitGud: has joined #ruby
[16:12:55] ljames: has joined #ruby
[16:13:26] madgen: has joined #ruby
[16:15:42] smckee: has joined #ruby
[16:16:07] Macaveli: has joined #ruby
[16:16:35] stantona: has joined #ruby
[16:17:28] baweaver: has joined #ruby
[16:19:07] Zai00: has joined #ruby
[16:19:24] Balzrael: has joined #ruby
[16:19:46] marxarelli: has joined #ruby
[16:20:43] sseewwee: has joined #ruby
[16:21:28] n008f4g_: has joined #ruby
[16:22:34] sandelius: has joined #ruby
[16:22:52] bkxd: has joined #ruby
[16:25:00] SenpaiSilver: has joined #ruby
[16:26:02] ramfjord: has joined #ruby
[16:26:05] pleiosaur: has joined #ruby
[16:26:31] Pathfinder_: has joined #ruby
[16:26:51] genpaku: has joined #ruby
[16:29:36] Alayde: has joined #ruby
[16:32:19] Pritchard: has joined #ruby
[16:32:22] moeabdol4: has joined #ruby
[16:33:04] j0bk: has joined #ruby
[16:34:30] SCHAAP137: has joined #ruby
[16:34:34] rbennacer: has joined #ruby
[16:36:39] sandelius: has joined #ruby
[16:36:58] pawnbox: has joined #ruby
[16:37:09] Zai00: has joined #ruby
[16:37:23] hightower3: has joined #ruby
[16:38:11] SenpaiSilver: has joined #ruby
[16:38:45] NinjaPanzer: has joined #ruby
[16:39:02] The_Phoenix: has joined #ruby
[16:39:06] mikecmpb_: has joined #ruby
[16:39:09] sseewwee: has joined #ruby
[16:41:13] smckee_: has joined #ruby
[16:41:30] hahuang65: has joined #ruby
[16:41:58] SenpaiSilver: has joined #ruby
[16:42:29] senayar: has joined #ruby
[16:43:15] tvw: has joined #ruby
[16:44:58] hxegon: has joined #ruby
[16:45:53] noobplayer97: has joined #ruby
[16:47:17] rmulligan: has joined #ruby
[16:47:27] nobitanobi: has joined #ruby
[16:47:43] ShellFu: has joined #ruby
[16:47:44] baweaver: has joined #ruby
[16:48:40] banister: has joined #ruby
[16:48:43] Xiti: has joined #ruby
[16:48:52] malconis: has joined #ruby
[16:49:15] codecop: has joined #ruby
[16:49:19] codecop_: has joined #ruby
[16:50:00] riddley: has joined #ruby
[16:50:57] riddley: is there a more Ruby-ish way to remove a leading/trailing character from a String (if it exists) than str.gsub(/\A:(.*)\/\Z/,'\1') ?
[16:51:20] Don_John: has joined #ruby
[16:53:15] Zai00: has joined #ruby
[16:54:10] smckee: has joined #ruby
[16:54:11] sgambino: has joined #ruby
[16:55:40] zast: has joined #ruby
[16:55:46] aegis3121: has joined #ruby
[16:56:41] MacCracken: has joined #ruby
[16:57:08] MacCracken: Hey everyone...
[16:57:14] sseewwee: has joined #ruby
[16:57:18] eam: riddley: how about just str.sub /^:/, ''
[16:57:31] rmulligan: has joined #ruby
[16:57:42] smathy: eam, you forgot the trailing part.
[16:57:52] ruby-lang435: has joined #ruby
[16:57:52] riddley: eam, I only want the leading and trailing ones, but it's cool, my regex works :) I thought ruby might have something fancy
[16:58:06] shevy: there is .chop!
[16:58:31] riddley: I don't know that the string has those chars though
[16:58:40] riddley: and was trying to avoid conditionals
[17:00:15] tjvc: has joined #ruby
[17:00:15] tjvc: has joined #ruby
[17:00:33] smckee: has joined #ruby
[17:00:39] deeqoo: has joined #ruby
[17:00:50] smathy: riddley, you know that your code will only remove either if BOTH are there right?
[17:01:06] riddley: smathy, I didn't
[17:01:16] riddley: smathy, I should run two .sub then?
[17:01:18] shinnya: has joined #ruby
[17:01:19] smathy: riddley, it's also quicker to do each separately.
[17:01:24] riddley: gtk! thanks
[17:01:29] smathy: ...captures are expensive.
[17:02:59] rmulligan: has joined #ruby
[17:04:07] KingOfNoobs: has joined #ruby
[17:05:26] KingOfNoobs: Guys can you help me with source code files examples.. ? I am new at ruby!
[17:05:59] apeiros: hi KingOfNoobs
[17:06:01] apeiros: maybe. we shall see once you asked your question :)
[17:06:55] ChiefAlexander: has joined #ruby
[17:06:56] KingOfNoobs: I mean its a good practice of reading codes right?
[17:07:02] dfinninger: has joined #ruby
[17:07:19] Zai00: has joined #ruby
[17:07:19] KingOfNoobs: When you are not writing
[17:08:00] KingOfNoobs: I need files to read!
[17:08:10] miah: go to github, and look at all ruby code then
[17:08:20] apeiros: oh, so you're asking for source code to study
[17:08:29] miah: but if you're looking to do a specific thing, let us know and we can point you towards code that may be more appropriate to your study
[17:08:31] smathy: KingOfNoobs, lots of great stuff here: https://www.ruby-lang.org/en/documentation/
[17:09:10] KingOfNoobs: I'll check github then
[17:09:14] miah: https://github.com/trending?l=Ruby
[17:09:14] chocoelho: has joined #ruby
[17:09:19] KingOfNoobs: I'll have to register right?
[17:09:23] miah: not to view code no
[17:09:31] miah: to submit changes or host your code yes
[17:10:04] KingOfNoobs: And any android app to see codes?
[17:10:22] KingOfNoobs: Github has its app?
[17:10:22] devbug: has joined #ruby
[17:10:51] miah: yes, go to the play store and type github
[17:10:57] mdw: has joined #ruby
[17:11:12] KingOfNoobs: Wew no official app
[17:11:43] miah: its there, just buried in bs.
[17:11:44] miah: https://github.com/blog/1187-github-android-app-released
[17:12:27] noobplayer97: has joined #ruby
[17:12:44] noobplayer97: No official app for github?
[17:13:03] shevy: NoobPlayer97 there is #github
[17:13:07] miah: https://github.com/blog/1187-github-android-app-released
[17:13:07] rcvalle: has joined #ruby
[17:13:12] mylord: has joined #ruby
[17:13:19] riddley: has left #ruby: ("Ex-Chat")
[17:13:31] rake_db_migrate: has joined #ruby
[17:13:43] noobplayer97: Maybe not tht famous
[17:13:50] miah: some questions are easily answered by google too
[17:14:14] noobplayer97: Will ask on google first
[17:14:32] Zai00: has joined #ruby
[17:15:13] sseewwee: has joined #ruby
[17:15:32] Spami: has joined #ruby
[17:16:22] MacCracken: was attempting send(var) in which the var is a method object within a string, I can't remember how to get it not to be a string
[17:16:57] ramfjord: has joined #ruby
[17:17:41] dfinninger: has joined #ruby
[17:17:48] apeiros: MacCracken: do you really mean a Method object, or do you mean a method name?
[17:18:37] MacCracken: its ultimately a page object name so I would think so...
[17:18:41] dfinninger: has joined #ruby
[17:18:55] mojca: has joined #ruby
[17:19:55] apeiros: your statements are confusing. please be precise.
[17:19:57] shevy: MacCracken do you mean http://docs.ruby-lang.org/en/2.3.0/UnboundMethod.html ?
[17:20:06] apeiros: what's var.class now?
[17:22:14] mojca: I have problems with "gem install nokogiri" because "gem env" grabs SHELL PATH that I explicitly don't want (a path where my package manager lives) and libxml2 finds dependencies that shoudn't be discoverable. Is there any way to remove a particular path from gem env? I wasn't able to find the answer via google and I'm not sure how gem works. The "gem" command comes from rbenv's ruby. rbenv was installed by a package manager, but is not in PA
[17:22:17] eam: smathy: oh, missed that. then add a .sub /\/$/, ''
[17:22:32] ivanskie_work: has joined #ruby
[17:22:39] pawnbox: has joined #ruby
[17:22:51] djbkd: has joined #ruby
[17:23:00] pawnbox: has joined #ruby
[17:23:29] shevy: mojca have you tried to output and modify ENV['PATH'] yet? though I am not sure if that would help, some directories may be always checked
[17:24:35] mojca: shevy: where/how do I do that? I would imagine that ENV['PATH'] would be ruby code; I'm working in shell at the moment, so I'm not sure which file to change
[17:24:58] gizmore: has joined #ruby
[17:25:17] lomex: has joined #ruby
[17:26:03] last_staff: has joined #ruby
[17:26:04] shevy: as far as I know ENV['PATH'] is just a 1:1 copy of what your shell would have in $PATH
[17:26:45] diegoaguilar: has joined #ruby
[17:27:50] Cohedrin: has joined #ruby
[17:28:17] sandelius: has joined #ruby
[17:28:27] yfeldblum: has joined #ruby
[17:28:45] sgambino: has joined #ruby
[17:28:52] RegulationD: has joined #ruby
[17:31:51] tomchapin: has joined #ruby
[17:33:16] Zai00: has joined #ruby
[17:33:18] sseewwee: has joined #ruby
[17:34:27] ssiris: has joined #ruby
[17:34:35] ruby-lang384: has joined #ruby
[17:35:31] rake_db_migrate: has joined #ruby
[17:38:42] Cohedrin: has joined #ruby
[17:40:10] hxegon: has joined #ruby
[17:44:10] Zai00: has joined #ruby
[17:44:30] tjohnson: has joined #ruby
[17:45:54] mikecmpbll: has joined #ruby
[17:46:31] rmosolgo: has joined #ruby
[17:47:29] B1n4r10: has joined #ruby
[17:47:55] jottr: has joined #ruby
[17:48:21] mojca: shevy: I'm still not sure to which ruby file to put ENV['PATH'] because I'm not even trying to use ruby yet
[17:48:25] mojca: but I found "export RBENV_DEBUG=1"
[17:48:43] rwy0717: has joined #ruby
[17:48:46] mojca: and the relevant line seems to be [rbenv:76] export PATH=/opt/local/bin:/Users/me/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
[17:48:58] mojca: I don't know where this comes from
[17:48:58] nofxx: has joined #ruby
[17:48:58] nofxx: has joined #ruby
[17:49:38] mojca: or actually, I do, line 76 of "rbenv" calls export PATH="${bin_path}:${PATH}"
[17:49:41] mojca: I don't want that
[17:50:13] dc4: has joined #ruby
[17:51:04] Dimik: has joined #ruby
[17:51:18] xaxisx: has joined #ruby
[17:51:28] sseewwee: has joined #ruby
[17:51:43] baweaver: has joined #ruby
[17:52:08] mojca: the problem is that if I remove it, rbenv-exec isn't found
[17:52:12] jtoy: has joined #ruby
[17:52:24] spider-mario: has joined #ruby
[17:52:45] rbennacer: has joined #ruby
[17:53:12] scepticulous: has joined #ruby
[17:56:25] tvon: has joined #ruby
[17:58:42] hahuang65: has joined #ruby
[17:59:00] NinjaPanzer: has joined #ruby
[18:00:03] shevy: it is just the $PATH variable
[18:01:22] dasher00: has joined #ruby
[18:02:35] sseewwee_: has joined #ruby
[18:03:10] KensoDev: has joined #ruby
[18:04:37] aegis3121: has joined #ruby
[18:05:28] sandelius: has joined #ruby
[18:05:43] PaulCapestany: has joined #ruby
[18:05:47] agit0: has joined #ruby
[18:05:57] Rubie: has joined #ruby
[18:06:16] devbug: has joined #ruby
[18:06:45] elifoster: has joined #ruby
[18:06:56] norc: has joined #ruby
[18:07:23] solars: has joined #ruby
[18:09:01] plonk_: has joined #ruby
[18:09:02] plonk_: has joined #ruby
[18:10:32] aegis3121: has joined #ruby
[18:11:14] freerobby: has joined #ruby
[18:11:40] sseewwee: has joined #ruby
[18:13:11] swills: has joined #ruby
[18:14:06] chouhoulis: has joined #ruby
[18:15:14] ivanskie_work_: has joined #ruby
[18:15:15] scepticulous: has joined #ruby
[18:15:48] cwenner: has joined #ruby
[18:16:28] baweaver: has joined #ruby
[18:17:35] tildes: has joined #ruby
[18:18:07] shadoi: has joined #ruby
[18:18:44] mojca: has joined #ruby
[18:18:51] tAn: has joined #ruby
[18:20:22] Cohedrin: has joined #ruby
[18:20:31] sandelius: hey, anyone worked with celluloid/reel ?
[18:20:49] tAn: has joined #ruby
[18:20:59] sseewwee: has joined #ruby
[18:21:19] rikkipitt: has joined #ruby
[18:22:22] goglosh: has joined #ruby
[18:24:07] rmosolgo: has joined #ruby
[18:24:11] x77686d: has joined #ruby
[18:25:35] Musashi007: has joined #ruby
[18:26:28] gregf: has joined #ruby
[18:27:18] patrick-sartent: has joined #ruby
[18:29:52] benzrf: sandelius: i've touched celluloid
[18:29:55] benzrf: hardly an expert
[18:30:10] benzrf: there IS a #celluloid although it's not super actie
[18:30:26] sandelius: benzrf yeah I tryied but they're not very active
[18:30:32] sandelius: benzrf I'm trying to grasp " Like EventMachine or Node.js, but uses Fibers in place of callbacks, and can communicate seamlessly with other Celluloid actors"
[18:30:48] sandelius: benzrf is a request serve isolated from another like on the erlang vm? or do we need no-blocking io adpaters for e.g postgres
[18:30:50] benzrf: sandelius: whats confusing you about it
[18:31:26] benzrf: based on a moments thought, my inference (which COULD be wrong) would be
[18:32:01] benzrf: you get an actor, and that actor handles requests, and the actor does node.js-style async I/O with the requestor by means of fibers
[18:33:07] benzrf: it's not clear to me from that whether a new actor is spawned for each request, but if i had to guess, i'd say no
[18:34:27] ruby766: has joined #ruby
[18:35:36] shiver: has joined #ruby
[18:37:00] rmulligan: has joined #ruby
[18:37:24] scepticulous: has joined #ruby
[18:38:53] davee_: has joined #ruby
[18:39:01] sseewwee: has joined #ruby
[18:39:09] ivanskie_work_: has joined #ruby
[18:39:41] smckee: has joined #ruby
[18:40:03] blackmesa: has joined #ruby
[18:40:41] rmulligan: has joined #ruby
[18:41:09] swills: has joined #ruby
[18:43:10] benlieb: has joined #ruby
[18:48:16] fartface: has joined #ruby
[18:48:29] symm-: has joined #ruby
[18:49:19] mistermo_: has joined #ruby
[18:51:14] ferr: has joined #ruby
[18:51:37] hahuang65: has joined #ruby
[18:53:10] tercenya: has joined #ruby
[18:55:53] davedev24: has joined #ruby
[18:55:55] tildes: has joined #ruby
[18:56:42] sandelius: has joined #ruby
[18:56:46] skweek: has joined #ruby
[18:56:57] ruby-lang101: has joined #ruby
[18:57:04] JohnBat26: has joined #ruby
[18:57:12] sseewwee: has joined #ruby
[18:57:37] rikkipitt: has joined #ruby
[18:58:13] zenspider: has joined #ruby
[18:58:26] mikecmpbll: has joined #ruby
[18:59:04] jackjackdripper: has joined #ruby
[19:00:07] sseewwee_: has joined #ruby
[19:00:19] ruby-lang725: has joined #ruby
[19:01:01] mistermocha: has joined #ruby
[19:01:04] d0nn1e: has joined #ruby
[19:01:11] yfeldblum: has joined #ruby
[19:01:47] ruby-lang725: building ruby 2.3.0 from source, error is ext/fiddle/extconf.rb:31: unknown type of %string (SyntaxError) libffi = Struct.new(*%I[dir srcdir builddir include l... libffi is installed, anyone have ideas?
[19:02:37] tvw: has joined #ruby
[19:04:36] zotherstupidguy: has joined #ruby
[19:04:45] rickmasta: has joined #ruby
[19:05:20] jackjackdripper: has joined #ruby
[19:05:22] zeroDivisible: has joined #ruby
[19:06:44] Musashi007: has joined #ruby
[19:07:14] nobitanobi: has joined #ruby
[19:07:33] chouhoulis: has joined #ruby
[19:07:41] patrick-sartent: has joined #ruby
[19:08:31] dfinninger: has joined #ruby
[19:09:23] dfinninger: has joined #ruby
[19:09:31] vdamewood: has joined #ruby
[19:12:20] wldcordeiro: has joined #ruby
[19:12:44] shevy: ruby-lang725 not a lot of information that you provide
[19:13:58] yqt: has joined #ruby
[19:18:04] izi: has left #ruby: ("Leaving")
[19:18:40] ruby-lang725: shevy: thank you, have a look here http://pastebin.com/4d1A66DA
[19:18:41] ruby[bot]: ruby-lang725: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/64de0f4582de6aace2d1f680656d4e74
[19:18:43] ruby[bot]: ruby-lang725: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[19:18:53] shmuli: has joined #ruby
[19:19:02] magikid: has joined #ruby
[19:19:16] shevy: "Error, this is a private paste. If this is your private paste, please login to Pastebin first."
[19:19:21] djellemah: 19>> %I[dir srcdir builddir include] # ruby-lang725
[19:19:22] ruby[bot]: djellemah: # => /tmp/execpad-d964123453e6/source-d964123453e6:2: unknown type of %string ...check link for more (https://eval.in/548120)
[19:19:42] moeabdol4: has joined #ruby
[19:20:02] djellemah: ruby-lang725: in other words, your currently installed version of ruby is too old.
[19:20:41] ixti: has joined #ruby
[19:22:45] ruby-lang725: djellemah: thank you, ruby 1.9.3p484 (2013-11-22 revision 43786)
[19:23:02] eam: what's the preferred way to construct a regex with binary encoding?
[19:23:23] karioleez: has joined #ruby
[19:23:29] eam: pass a properly encoded string to Regexp.new? Or is there a nicer way to indicate to // that I wish to have Encoding:US-ASCII?
[19:23:39] ramfjord: has joined #ruby
[19:25:03] smathy: RegExp.new "...".encode(...)
[19:26:01] eam: yeah that's what I'm doing now -- just wondering if there's a shorter form usable with /fo\x00o/ or somesuch
[19:26:29] nobitanobi: has joined #ruby
[19:26:58] shevy: does that work?
[19:27:41] plonk: has joined #ruby
[19:27:42] plonk: has joined #ruby
[19:27:47] PedramT: has joined #ruby
[19:27:56] eam: shevy: ah sorry, bad example. Consider something with a high bit set like /fo\x80o/
[19:28:11] plonk: has joined #ruby
[19:28:11] plonk: has joined #ruby
[19:28:40] freerobby: has joined #ruby
[19:28:45] plonk: has joined #ruby
[19:28:45] plonk: has joined #ruby
[19:29:06] ramfjord: has joined #ruby
[19:29:28] plonk: has joined #ruby
[19:29:28] plonk: has joined #ruby
[19:30:17] jenrzzz: has joined #ruby
[19:30:17] jenrzzz: has joined #ruby
[19:31:04] mdw7: has joined #ruby
[19:32:02] plonk_: has joined #ruby
[19:32:02] plonk_: has joined #ruby
[19:32:23] symm-: has joined #ruby
[19:32:34] pawnbox: has joined #ruby
[19:34:01] goglosh: >> c = "reverse!"; c.send(c)
[19:34:02] ruby[bot]: goglosh: # => "!esrever" (https://eval.in/548126)
[19:34:11] plonk: has joined #ruby
[19:34:11] plonk: has joined #ruby
[19:34:59] jenrzzz: has joined #ruby
[19:36:21] duckpuppy: has joined #ruby
[19:36:25] rake_db_migrate: has joined #ruby
[19:36:49] shevy: yeah I wonder because I remember that I had difficulties aligning regexes with the same encoding and gave up
[19:37:44] goglosh: if I do x.send(m), I am sending x a message to send m to itself?
[19:37:49] goglosh: am I getting this right?
[19:38:58] shevy: goglosh you ask the object a question here; m should be the specific method that the object can respond to
[19:39:18] diegoaguilar: has joined #ruby
[19:40:02] hxegon: has joined #ruby
[19:41:27] goglosh: ssso.. send() is a misnomer? is it actually a request to perform a method rather than send [itself] a message?
[19:41:51] matp: has joined #ruby
[19:41:56] goglosh: heh I know it's a weird question :9
[19:42:16] a1fa: is it possible to have begin/rescue that would queue up exceptions, versus failing on the first exception it hits?
[19:42:25] agit0: has joined #ruby
[19:42:26] smckee: has joined #ruby
[19:42:50] a1fa: I'm doing a CSV import via active recrod, and the first exception it runs into, it stops processing the rest of the file
[19:43:34] a1fa: it would be nice to have a way of queueing up exceptions, and then throwing an exception at the end
[19:43:47] djbkd: has joined #ruby
[19:44:05] Papierkorb: a1fa: Build it yourself?
[19:45:42] a1fa: basically begin, and rescue, and do some kind of array thing in the rescue, then check for array, and raise array at the end?
[19:45:46] a1fa: anything more elegant?
[19:46:20] Papierkorb: Why's that not "elegant"?
[19:47:21] a1fa: < self doubts
[19:48:49] cdg: has joined #ruby
[19:49:11] baweaver: has joined #ruby
[19:49:23] jottr: has joined #ruby
[19:49:34] cdg: has joined #ruby
[19:50:39] djellemah: goglosh: I've always thought that send is a bit of a misnomer when it comes to most OO implementations. sending implies that the message itself is an object. Which isn't really the case in ruby. You can kinda get the relevant pieces from caller, __method__ and method(...) But mostly send(m) just calls the method named m.
[19:52:50] lemur: has joined #ruby
[19:54:48] mistermocha: has joined #ruby
[19:57:04] mr_oh: has joined #ruby
[19:57:43] LW_Luna: has joined #ruby
[19:58:28] smathy: goglosh, you're not "sending x a message to send m to itself", you're just sending x a message named m.
[19:58:51] rikkipitt: has joined #ruby
[19:59:02] goglosh: djellemah: so sending a message is actually an abstract.. something?
[19:59:11] goglosh: handled internally but not really *there*?
[19:59:56] baweaver: has joined #ruby
[20:01:08] rake_db_migrate: has joined #ruby
[20:01:19] mr_oh: Looking for small answers on the net is like rummaging through a closet...
[20:01:33] mr_oh: https://gist.github.com/c0ldT/cd5e335b1d53d66715905d00e283807b
[20:02:05] smathy: goglosh, the distinction between languages where you "call a method" and languages where you "send a message" is more to do with what choices the object has. In a language (like Ruby) you don't actually know if foo.bar is calling a method on foo, or being handled in a method_missing, or aliased to another method. Ie. you don't know if `bar` is a method, all you're doing is sending that message into `foo` and foo is then handling that in any number of
[20:02:06] smathy: ways, including having a method `bar` defined.
[20:02:59] goglosh: I think I get it
[20:03:17] baweaver: smathy: I think he gets the message
[20:03:31] baweaver: ACTION bows
[20:03:34] rbennacer: has joined #ruby
[20:03:37] mr_oh: pretty good message. Good explanation
[20:03:56] dfinninger: has joined #ruby
[20:04:13] Luna_Moonfang: has joined #ruby
[20:05:07] jottr: has joined #ruby
[20:05:22] goglosh: so in any case foo.send(bar) is actually a message for foo to receive :bar?
[20:05:37] whippythellama: has joined #ruby
[20:05:40] goglosh: then it should be called receive, and the whole world breaks down
[20:05:41] smathy: "a message" is ambiguous there.
[20:05:41] Devalo: has joined #ruby
[20:05:48] smathy: The args of `send` *IS* the message.
[20:06:16] goglosh: isn't send a message in itself?
[20:06:28] nerium: has joined #ruby
[20:06:37] smathy: goglosh, and you're right, you're not really telling foo to send anything.
[20:06:48] Eiam_: has joined #ruby
[20:06:54] smathy: goglosh, a more correct syntax might be: self.send :foo, :bar
[20:07:11] hightower3: has joined #ruby
[20:07:16] goglosh: ACTION is dizzy now
[20:07:29] smathy: or send foo, :bar really.
[20:07:29] GodFather: has joined #ruby
[20:07:57] mr_oh: new gist: https://gist.github.com/c0ldT/fa78dcc650be6a3b177f18eabafefff2
[20:08:35] mr_oh: Is it normal to know a fair amount of concepts, but trip repeatedly over the details of how to do something?
[20:10:28] smathy: goglosh, and yes, `send` is a message itself, there's a lot of mind bending recursion up in this part of Ruby - some of it is just pragmatic.
[20:11:22] goglosh: smathy: yeah I can tell, I just take relief in knowing that everything's somehow handled internally by the interpreter
[20:11:29] pifon: has joined #ruby
[20:11:43] hahuang65: has joined #ruby
[20:11:48] smathy: mr_oh, you mean like how to use gist?
[20:11:52] Olipro_: has joined #ruby
[20:11:53] ramfjord: has joined #ruby
[20:11:58] ruby[bot]: -bb $a:KayKayKay$#ruby-banned KayKayKay!*@*$#ruby-banned
[20:12:17] blackgoat: has joined #ruby
[20:12:43] mr_oh: smathy: everything... tons of details to pick up
[20:13:04] shmuli: has joined #ruby
[20:13:50] Ox0dea: has joined #ruby
[20:14:16] mr_oh: my gist is for looking at, not running
[20:14:17] smathy: mr_oh, in gists, if you name the file with the correct extension it will use proper syntax coloring, and down the bottom of the new/edit gist page is an Add File button for adding more than one file.
[20:14:48] shevy: goglosh yeah, but it is easier to think in terms of methods. this is the mother of objects in ruby, BasicObject http://ruby-doc.org/core-2.3.0/BasicObject.html - you can see that it has methods such as #__send__
[20:15:26] shevy: goglosh if you redefine it, ruby issues a warning: "warning: redefining `__send__' may cause serious problems"
[20:15:42] StevenNunez: has joined #ruby
[20:15:56] mr_oh: https://gist.github.com/c0ldT/e8a8593c1a4371e493e2891ac6a6ead6
[20:16:18] StevenNunez: I'm having an issue when entering text into `gets`. When I backspace I get ^H instead. Any ideas?
[20:16:29] haylon: has joined #ruby
[20:16:29] Ox0dea: goglosh: `foo.bar` is syntax; it gets parsed into a method call node which, when interpreted, looks up `bar` in `foo`'s "method table" and executes the code it finds there. When `bar` is `send`, something special happens: the same process occurs, only the method to look up is dynamic, namely whatever you pass to #send.
[20:16:40] bronson: has joined #ruby
[20:16:53] Ox0dea: In short, you'd be hard-pressed to re-implement #send in pure Ruby, since, well, you'd have to implement it in terms of #send, wouldn't you?
[20:17:11] antoinfive: has joined #ruby
[20:17:12] baweaver: Ox0dea: eval :D
[20:17:17] Ox0dea: What's that?
[20:17:36] bronson: has joined #ruby
[20:17:39] madgen: has joined #ruby
[20:17:39] baweaver: StevenNunez: ruby has no ++
[20:17:46] Ox0dea: Nor eval.
[20:17:56] mr_oh: it has eval
[20:18:09] mr_oh: it did back in 2004
[20:18:16] Papierkorb: <Evil> I've been waiting for you, Mr Bond *strokes cat*
[20:18:25] baweaver: just like there's only one Matrix movie
[20:18:59] mr_oh: https://rubymonk.com/learning/books/5-metaprogramming-ruby-ascent/chapters/24-eval/lessons/63-eval
[20:19:03] Ox0dea: mr_oh pls
[20:19:33] ekinmur: has joined #ruby
[20:21:45] StevenNunez: Any idea why a ruby script would interpret a backspace as ^H?
[20:22:07] Papierkorb: why is there a backspace in the file in the first place?
[20:22:47] Infra-Red: has joined #ruby
[20:23:36] Ox0dea: >> "\C-H" == "\b"
[20:23:37] ruby[bot]: Ox0dea: # => true (https://eval.in/548142)
[20:23:40] codecop: has joined #ruby
[20:23:49] Ox0dea: But I think StevenNunez is having a readline issue.
[20:24:00] StevenNunez: @Papierkorb @Ox0dea I think it's a readline thing
[20:24:07] Ox0dea: StevenNunez: It's a readline thing.
[20:24:17] jason^: has left #ruby: ("WeeChat 1.4")
[20:24:41] baweaver: mr_oh: yes, it has eval. No, you should not use it.
[20:25:05] smathy: eval all the things
[20:25:15] mr_oh: I didn't catch the tone
[20:25:48] PMunch: has joined #ruby
[20:25:55] StevenNunez: It is a busted ruby install?
[20:26:11] PMunch: Hi, I'm having some trouble with Apricot and Rubinius would this be the right place to ask?
[20:26:33] Ox0dea: StevenNunez: Did you compile your Ruby yourself?
[20:26:46] Ox0dea: ACTION runs.
[20:27:13] StevenNunez: ACTION chases Ox0dea
[20:28:48] smathy: PMunch, you _can_ ask here, although you'll find a more captive audience over in #rubinius
[20:29:15] chrisseaton: smathy PMunch I think they're on Gitter now
[20:31:19] wilbert: has joined #ruby
[20:31:40] blandflakes: has joined #ruby
[20:31:55] spider-mario: has joined #ruby
[20:32:56] chrisseaton: Ox0dea: you could implement #send in Ruby - #method, and then #call
[20:33:14] scepticulous: has joined #ruby
[20:33:48] Ox0dea: chrisseaton: Fair enough. Is there something heavier than "re-implement" that better conveys "do it from scratch"?
[20:34:11] troulouliou_dev: has joined #ruby
[20:34:24] chrisseaton: 'from first principles'
[20:34:39] Ox0dea: I suppose that'd be the one.
[20:35:41] Trynemjoel: has joined #ruby
[20:35:47] karioleez: has joined #ruby
[20:36:17] machinewar: has joined #ruby
[20:36:30] machinewar: anyone know of solid excel -> csv gem?
[20:36:54] Papierkorb: Excel itself?
[20:36:55] djbkd: has joined #ruby
[20:37:39] PMunch: smathy, I found one guy over there at least. Thanks for the help
[20:38:37] baweaver: machinewar: what have you looked up?
[20:39:04] baweaver: because there are search results on the first page of google that cover this
[20:39:07] machinewar: Papierkorb: without opening it
[20:39:10] Ox0dea: machinewar: http://spreadsheet.rubyforge.org/files/GUIDE_txt.html
[20:39:12] machinewar: baweaver: i understand
[20:39:14] machinewar: theres a lot
[20:39:16] machinewar: was curious of opinons
[20:39:29] Ox0dea: The spreadsheet gem is the best offering, I think.
[20:40:04] dfockler: has joined #ruby
[20:40:39] machinewar: Ox0dea: thank you
[20:40:49] Ox0dea: machinewar: Sure thing. Maybe also give roo a look: http://roo.rubyforge.org/
[20:41:18] baweaver: rubyforge still lives?
[20:41:46] Ox0dea: https://www.ruby-lang.org/en/news/2013/08/08/rip-raa/
[20:41:56] Ox0dea: I wonder whether you've accidentally conflated it with that?
[20:42:17] gregf1: has joined #ruby
[20:42:50] Ox0dea: It'll be the subconscious association with SourceForge, then.
[20:43:03] baweaver: just that most content is 2008ish
[20:43:22] smathy: PMunch, np.
[20:43:26] baweaver: and has migrated to git
[20:43:34] Ox0dea: Ah, well, it "lives". :P
[20:43:40] baweaver: SourceForge is a dirge on open source
[20:43:43] baweaver: that should be dead
[20:44:09] lomex: has joined #ruby
[20:44:10] jaequery: has joined #ruby
[20:45:11] Ox0dea: Well, they got bought and were pivoting into something less evil last I checked.
[20:45:18] jaequery: has joined #ruby
[20:45:18] dling: has joined #ruby
[20:45:54] Ox0dea: They stopped shoving adware into their downloads, at any rate.
[20:45:55] baweaver: dirge on open source
[20:46:02] baweaver: suuuuure they did
[20:46:05] karmatr0n: has joined #ruby
[20:46:08] Papierkorb: Their UI still sucks though. Way too complicated to even quickly download some binary.
[20:46:57] jaequery: has joined #ruby
[20:47:10] baweaver: Time for another rousing game of "Which is the actual download button"
[20:47:28] Papierkorb: baweaver: Adblock all the way
[20:47:44] x77686d: has joined #ruby
[20:47:46] CausaMortis: has joined #ruby
[20:47:56] dunpeal: has joined #ruby
[20:47:57] baweaver: Then it's "Hello, we noticed you're using adblock. Please turn it off for an 'ad lite' experience"
[20:48:07] johnmilton: has joined #ruby
[20:48:13] jaequery: has joined #ruby
[20:48:35] baweaver: nope, just means I never go to that site again. (Wired, Forbes)
[20:49:10] goglosh: man I was away, didn't read your answers. Thanks
[20:49:14] goglosh: shevy Ox0dea
[20:49:23] jaequery: has joined #ruby
[20:49:32] Papierkorb: baweaver: Oh just install the Anti-Anti-Adblock lists. It's somewhat hilarious that you now have to do that. OR just not use those webpages. Most of them aren't worth of ones time anyway
[20:49:53] shmuli: has joined #ruby
[20:50:46] dfinninger: has joined #ruby
[20:50:58] jaequery: has joined #ruby
[20:51:33] Hanmac: Papierkorb: just use lynx as browser, they do not support Anti-Adblock stuff xD
[20:51:51] postmodern: has joined #ruby
[20:52:12] dunpeal: Hi. I have an rspec test foo.rb that's not ready for production. How do I make sure it doesn't run with my full test run, but does run when I explicitly 'rspec foo.rb'
[20:52:37] jaequery: has joined #ruby
[20:52:44] baweaver: don't launch things that aren't ready for production
[20:52:47] baweaver: including specs
[20:54:11] dunpeal: baweaver: OK. but the test is currently under specs/, so the continuous integration server is running it.
[20:54:24] baweaver: why can't it work on prod?
[20:54:39] baweaver: it's the same to me as committing commented out code to prod
[20:54:57] baweaver: it's either there or it's not, half states make a mess.
[20:55:26] dunpeal: baweaver: because it's a Capybara test and while I'm developing it, I'm running it on Selenium, which is not headless.
[20:55:53] baweaver: there's a way to do it, but you should have that in your CI pipeline
[20:56:01] Begi1: has joined #ruby
[20:56:32] baweaver: you can tag specs
[20:56:32] Papierkorb: dunpeal: separate feature tests from unit tests and then only run the unit tests
[20:56:43] baweaver: that as well
[20:56:46] djellemah: dunpeal: https://relishapp.com/rspec/rspec-core/v/2-0/docs/pending/pending-examples see xit, and tagging
[20:57:08] skade: has joined #ruby
[20:57:21] Papierkorb: dunpeal: like spec/lib for library unit tests and spec/features for feature tests. Then do $ rspec spec/lib # to just run the unit tests
[20:57:23] baweaver: https://engineering.sharethrough.com/blog/2013/08/10/greater-test-control-with-rspecs-tag-filters/
[20:58:12] Ox0dea: it('might not work in prod') { skip unless dev?; ... }
[20:58:32] Ox0dea: It's Just Ruby.™
[20:58:54] dunpeal: Papierkorb: but I do run many feature tests
[20:58:55] baweaver: Just tag them as integration or separate them out into a separate folders.
[21:00:45] baweaver: the simple thing is to switch it out with PhantomJS
[21:00:54] baweaver: which is headless
[21:01:38] ur5us: has joined #ruby
[21:01:43] dunpeal: baweaver: except I do want a headfull setup as I'm developing the tests...
[21:02:27] Rubie: has joined #ruby
[21:03:53] jenrzzz: has joined #ruby
[21:03:59] dunpeal: anyway, I'll just put it in a wip directory, and make sure the CI doesn't run the rspecs from that directory.
[21:05:21] klagid: has joined #ruby
[21:07:42] jgt3: has joined #ruby
[21:08:48] crdpink: has joined #ruby
[21:11:11] BSaboia: has joined #ruby
[21:12:01] Ormm: has joined #ruby
[21:15:03] stunder: has joined #ruby
[21:16:25] andywojo: has joined #ruby
[21:16:47] Guest38_: has joined #ruby
[21:18:26] FooMunki: has joined #ruby
[21:19:44] aeterne: has joined #ruby
[21:20:47] Devalo: has joined #ruby
[21:21:58] daxroc: has joined #ruby
[21:22:16] optimaleatscout_: has joined #ruby
[21:23:10] twodayslate: has joined #ruby
[21:23:11] jimeh: has joined #ruby
[21:23:26] djellemah: If you're still interested in message passing, search for "messenger structure" in http://worrydream.com/EarlyHistoryOfSmalltalk/ Also "To eval a program list" :-p
[21:24:36] yo61: has joined #ruby
[21:25:01] tvon: has joined #ruby
[21:25:14] machty: has joined #ruby
[21:25:48] swills: has joined #ruby
[21:26:04] yfeldblum: has joined #ruby
[21:26:11] dunpeal: has joined #ruby
[21:26:58] goglosh: tfw no smalltalk machine
[21:29:59] PedramT: has joined #ruby
[21:30:23] karioleez: has joined #ruby
[21:30:49] goglosh: why did the processor research got stuck at register machine Von Neumann architectures?
[21:32:34] stunder: has joined #ruby
[21:33:36] Musashi007: has joined #ruby
[21:34:18] jenrzzz_: has joined #ruby
[21:35:30] abyx: has joined #ruby
[21:35:38] mostlybadfly: has joined #ruby
[21:37:19] duckpuppy: has joined #ruby
[21:37:29] andywojo: has joined #ruby
[21:39:47] chipotle: has joined #ruby
[21:42:51] hxegon: has joined #ruby
[21:43:12] BtcBen: has joined #ruby
[21:43:24] LastWhisper____: has joined #ruby
[21:44:44] axisys: has left #ruby: ()
[21:45:47] ItSANgo_: has joined #ruby
[21:46:09] shevy: they all do their thesis papers - and then do something else!
[21:47:21] forcer: has joined #ruby
[21:49:03] gagrio: has joined #ruby
[21:49:38] skade: has joined #ruby
[21:49:43] ramfjord: has joined #ruby
[21:50:23] edwardly: has joined #ruby
[21:50:23] edwardly: has joined #ruby
[21:50:27] sgambino: has joined #ruby
[21:50:42] vith: has joined #ruby
[21:50:48] lkba: has joined #ruby
[21:50:53] baweaver: has joined #ruby
[21:51:33] jaruga__: has joined #ruby
[21:51:59] goglosh: hmmm. Any modern system could be thought as 'object oriented' in a way wouldn't it?
[21:52:15] goglosh: where objects = { processes, files }
[21:53:09] QualityAddict: has joined #ruby
[21:53:37] lemur: has joined #ruby
[21:54:38] goglosh: and message passing is pipelining/socket handling
[21:55:14] troulouliou_dev: has joined #ruby
[21:56:16] ozzloy: has joined #ruby
[21:56:16] ozzloy: has joined #ruby
[21:56:41] troulouliou_dev: has joined #ruby
[21:56:58] ruby[bot]: -bb $a:DikshitNijjer$#ruby-banned DikshitNijjer!*@*$#ruby-banned
[21:57:04] Ox0dea: Processes don't inherit behavior, only state.
[21:57:12] slappy16: has joined #ruby
[21:57:42] Ox0dea: You can charitably skew many terms to apply where they needn't, but at what cost and to whose benefit?
[21:58:07] goglosh: you're right
[21:58:27] voidDotClass: has joined #ruby
[22:00:22] G: has joined #ruby
[22:00:55] SCHAAP137: has joined #ruby
[22:00:57] BTRE: has joined #ruby
[22:01:07] smckee: has joined #ruby
[22:01:15] stunder: has joined #ruby
[22:03:33] babblebre: has joined #ruby
[22:03:40] dvinciguerra__: has joined #ruby
[22:03:56] shevy: goglosh well if we would have object-centric behaviour on linux
[22:04:09] shevy: it is semi-similar; in ruby everything is an object; in linux, everything is a ... well, file
[22:04:38] shevy: unix pipes are like messages / filtering but for data from files mostly, not really objects
[22:05:02] shevy: and let us not forget streem from matz https://github.com/matz/streem - last commit 3 hours ago \o/
[22:05:39] karioleez: has joined #ruby
[22:07:23] Rasi: has joined #ruby
[22:07:33] devbug: has joined #ruby
[22:08:14] Gasher: hi, where can I find formatting functions in Ruby? things like setw in C++
[22:08:46] tAn: has joined #ruby
[22:09:01] shevy: we have sprintf, %, .ljust, .rjust, .center ... I also think there was some gem specifically for that, a copy from perl ... hmm but most should suffice for the above
[22:09:22] Ox0dea: &ri String#% Gasher
[22:09:22] `derpy: Gasher: http://ruby-doc.org/core-2.3.0/String.html#method-i-25
[22:10:05] Gasher: ah, thanks
[22:10:22] Gasher: is it regex there?
[22:11:44] dc4: has joined #ruby
[22:11:44] Ox0dea: No, more like C's printf().
[22:12:30] shevy: Gasher here for sprintf() http://ruby-doc.org/core-2.3.0/Kernel.html#method-i-sprintf
[22:12:51] jero_: has joined #ruby
[22:12:52] shevy: the examples below the explanation are best, if you already know C or C++
[22:12:58] Gasher: ahh, alright, thanks
[22:13:16] Gasher: actually, I've mostly done Ruby, but just didn't play with strings too much
[22:13:59] Gasher: learning C++ right now and saw that function
[22:15:20] shevy: good old C++
[22:15:27] eam: is there an easy way to get the byte offset of a match in a scan()?
[22:16:05] eam: I guess I should use index() instead of scan?
[22:16:19] eam: and then manage my own stepping through offsets?
[22:17:37] stantona: has joined #ruby
[22:18:00] baweaver: has joined #ruby
[22:18:46] eam: hmm, but this doesn't give me the *length* of the match ...
[22:20:54] eam: I guess I need to use $~ together with index()? Is there a cleaner way I'm just not recognizing?
[22:21:14] Ox0dea: eam: Nothing springs to mind. :/
[22:22:24] Xiti: has joined #ruby
[22:22:27] jpfuentes2: has joined #ruby
[22:23:05] jenrzzz: has joined #ruby
[22:23:05] jenrzzz: has joined #ruby
[22:23:53] karioleez: has joined #ruby
[22:25:02] hightower2: has joined #ruby
[22:25:24] shadoi: huh… you could do that in 1.9.3 with StringScanner#pos but I can't find an equiv in 2.x
[22:27:03] smckee: has joined #ruby
[22:27:29] baweaver: has joined #ruby
[22:27:36] eam: did StringScanner go away?
[22:28:01] spintronic: has joined #ruby
[22:28:32] Ox0dea: >> require 'strscan'; StringScanner
[22:28:34] ruby[bot]: Ox0dea: # => StringScanner (https://eval.in/548177)
[22:28:50] eam: aha perfect
[22:29:11] TakG: has joined #ruby
[22:29:20] aibot: has joined #ruby
[22:29:28] Ox0dea: I assumed you were searching the same pattern each time.
[22:29:45] Ox0dea: Then that seems heavy-handed.
[22:29:59] aibot: has joined #ruby
[22:30:05] _stu_: has joined #ruby
[22:30:56] ruby[bot]: spintronic: # => 4 (https://eval.in/548178)
[22:31:10] eam: here's my exact use case: scan(/ab(..)cd../) and $1.unpack "n" and extract the following bytes of that length
[22:31:28] Zai00: has joined #ruby
[22:31:44] eam: so start of the match + 8 to start of the match + 8 + $1 as a length
[22:31:45] aibot: has joined #ruby
[22:32:55] Ox0dea: You could do some monstrous #gsub to convert the input to a suitable #unpack template.
[22:33:21] eam: also this is a binary file
[22:33:22] x77686d: has joined #ruby
[22:33:36] eam: ab and cd aren't ascii
[22:33:44] skade: has joined #ruby
[22:33:51] Ox0dea: #unpack has binary directives.
[22:34:14] eam: yeah and I'm usin' em but the rest of the file can be arbitrary .. oh I see what you're saying, *reduce* the string to that
[22:34:54] workmad3: has joined #ruby
[22:35:42] jaruga__: has joined #ruby
[22:37:02] wldcordeiro: has joined #ruby
[22:37:53] PedramT: has joined #ruby
[22:37:53] Ox0dea: Well, yeah, #gsub can be used "iteratively", but it's nasty.
[22:38:01] Azure: has joined #ruby
[22:38:28] zenlot6: has joined #ruby
[22:41:11] Maletor: has joined #ruby
[22:42:14] jaruga__: has joined #ruby
[22:42:15] karioleez: has joined #ruby
[22:42:29] htmldrum: has joined #ruby
[22:42:48] Rubie: has joined #ruby
[22:43:36] PedramT: has joined #ruby
[22:43:42] mwlang: has joined #ruby
[22:44:26] shmuli: has joined #ruby
[22:46:05] x0F: has joined #ruby
[22:46:17] aibot: has joined #ruby
[22:46:32] hahuang65: has joined #ruby
[22:50:31] goglosh: can anyone point me to a good resource on why OOP is so unpopular?
[22:50:38] goglosh: some essay or something
[22:50:56] shadoi: goglosh: why do you say it's unpopular?
[22:51:06] goglosh: lot of people seem to not like it
[22:51:10] shadoi: Java is the most widely used language by far and it's OOP.
[22:51:15] goglosh: Edgar Djikstra for example
[22:51:21] havenwood: goglosh: Can you describe these people in terms of Objects?
[22:51:26] goglosh: uh... that's not what I meant
[22:51:36] havenwood: goglosh: Who do they inherit from?
[22:51:41] goglosh: unpopular amongst people who know what they're doing
[22:52:05] goglosh: heavenwood whaat?
[22:52:34] havenwood: goglosh: Are these people objects or functions? Let's get down to brass tacks!
[22:52:35] goglosh: anyway, Djikstra is one instance of a great mathematician who has strong opinions on it
[22:52:37] RickHull: goglosh: lots of stuff here: http://c2.com/cgi/wiki/FrontPage
[22:52:38] goglosh: also leo brodie
[22:53:13] aibot: has joined #ruby
[22:53:14] smckee: has joined #ruby
[22:53:17] goglosh: RickHull: oh yeah I've still to get comfortable browsing that site
[22:53:17] havenwood: goglosh: Communicating with nouns considered harmful by verb speakers.
[22:53:25] shadoi: goglosh: there will always be philosophical arguments about programming. Inescapable.
[22:53:27] aibot: has joined #ruby
[22:53:32] RickHull: goglosh: i would say that inheritance has turned out to be very brittle and unpleasant for code sharing
[22:53:38] goglosh: havenwood: you're making my head spin
[22:53:46] RickHull: and many OOP camps recommend composition-over-inheritance now
[22:53:49] havenwood: goglosh: Is it a single instance of your head?
[22:53:55] havenwood: goglosh: Is it mutable?
[22:54:20] goglosh: What I mean to know is what are the theoretical aspects of the debate
[22:54:29] RickHull: also, people mean different things by OOP. Alan Kay has one view
[22:54:30] goglosh: I mean I know java has disgraced OOP by large
[22:54:46] RickHull: for example, communicate by message passing, not manipulating memory
[22:55:22] shadoi: RickHull: of course YOU would show up for this argument. ;)
[22:55:40] RickHull: java misses on a lot of important OOP concepts. it has primitives which aren't objects. it loves shared state and memory manipulation
[22:55:58] goglosh: RickHull: didn't smalltalk too have non-object primitives?
[22:56:29] RickHull: i would say that you can make nice interfaces by being able to instantiate a class and encapsulate private state
[22:56:39] RickHull: to me, that's the best contribution of OOP
[22:56:49] goglosh: some people say you can do that with
[22:56:50] RickHull: and i prefer everything-is-an-X where X can be object
[22:57:08] goglosh: and that's the usual argument that seems to have a meaning
[22:57:23] RickHull: OOP was supposed to be the holy grail for maximizing cohesion and minimizing coupling
[22:57:28] elifoster: has joined #ruby
[22:57:34] RickHull: and i think if you're careful, it can do very well at that
[22:57:59] RickHull: unsurprisingly, i find Ruby to be the best OOP language
[22:58:02] Ox0dea: goglosh: CLOS exists, and Slava put an object system in Factor.
[22:58:21] RickHull: but I rarely use class based inheritance these days
[22:58:35] RickHull: and i prefer "static" methods at the class layer for most complicated logic
[22:58:37] goglosh: ^ I've heard that causes more trouble than it solves
[22:58:40] RickHull: drifting towards a functional style
[22:58:46] RickHull: and I <3 Elixir
[22:58:54] goglosh: but again, I rarey find actual technical discussion
[22:59:01] havenwood: goglosh: Folk have varied preferences. There's something lovely about functional. There is more than one way to do it. Either can be convoluted.
[22:59:02] goglosh: just a bunch of biases
[22:59:43] Ox0dea: goglosh: They're all effectively equivalent at the bottom; any paradigm can produce an acceptable facsimile of any other.
[23:00:21] chipotle: has joined #ruby
[23:00:22] Ox0dea: "Functional OOP" (read: the Ruby way) is a pretty solid middle ground.
[23:00:35] hahuang65: has joined #ruby
[23:00:40] karioleez: has joined #ruby
[23:00:55] rake_db_migrate: has joined #ruby
[23:00:55] havenwood: goglosh: Ruby is from a place of experienced OO lessons with functional envy. :)
[23:01:28] goglosh: ACTION wonders what that meant
[23:01:29] tAn: has joined #ruby
[23:01:57] havenwood: goglosh: Give Elixir a spin if you haven't already.
[23:02:30] goglosh: "The next big language for the web"
[23:02:56] shevy: everything is next and big!
[23:04:58] goglosh: I'd like to see The Former Small Language For []
[23:05:11] dfockler: has joined #ruby
[23:05:45] mr_oh: has joined #ruby
[23:05:46] aibot: has joined #ruby
[23:06:00] RickHull: that would be forth, i suppose
[23:06:34] mr_oh: Can padding be done within #{ } ?
[23:07:03] fumihiro: has joined #ruby
[23:07:08] Devalo: has joined #ruby
[23:07:24] RickHull: any ruby expression can go in there. e.g. #{'hello'.rjust(5, ' ')}
[23:07:34] Ox0dea: RickHull: Not `BEGIN`. :P
[23:08:05] ramfjord: has joined #ruby
[23:08:31] Ox0dea: I think that's the only thing that can't be interpolated, though.
[23:08:34] chouhoulis: has joined #ruby
[23:08:51] RickHull: >> ">#{'hello'.rjust(20, ' ')}"
[23:08:52] ruby[bot]: RickHull: # => "> hello" (https://eval.in/548181)
[23:09:15] Ox0dea: >> "#{'%10s' % 'foo'}"
[23:09:16] ruby[bot]: Ox0dea: # => " foo" (https://eval.in/548182)
[23:09:23] darkf: has joined #ruby
[23:09:34] RickHull: we need a left-pad module so there is just one blessed way to do this
[23:10:14] pikajude: has joined #ruby
[23:10:14] pikajude: has joined #ruby
[23:12:02] mr_oh: what about: "#{thing} Word: #{other_thing}" ? Can I push or pad 'Word:' around ?
[23:13:07] duckpuppy: has joined #ruby
[23:13:08] rake_db_migrate: has joined #ruby
[23:15:40] RickHull: mr_oh: you'll have to construct the final string somewhat differently, but sure
[23:15:44] eam: ok so guess what? StringScanner doesn't work properly with binary encoding
[23:15:47] mr_oh: what happens if someone requires a file that just has Object.freeze in it ?
[23:16:22] RickHull: mr_oh: best bet is to try it and see
[23:16:31] mr_oh: I tried in irb
[23:16:32] Ropeney: has joined #ruby
[23:16:40] mr_oh: prvents any classes from being made
[23:17:16] mr_oh: also prevents any methods from being made
[23:17:28] Ox0dea: mr_oh: Just thaw it.
[23:17:51] eam: >> require 'strscan'; s = StringScanner.new "\x80\x82\x80".force_encoding("ASCII-8BIT"); s.scan Regexp.new(0x82.chr)
[23:17:52] ruby[bot]: eam: # => nil (https://eval.in/548183)
[23:18:02] eam: >> "\x80\x82\x80".force_encoding("ASCII-8BIT") =~ Regexp.new(0x82.chr)
[23:18:03] ruby[bot]: eam: # => 1 (https://eval.in/548184)
[23:18:03] RickHull: what happens when your Objects melt?
[23:18:05] eam: sigh :(
[23:18:09] Ox0dea: That sucks. :/
[23:18:49] karioleez: has joined #ruby
[23:19:33] Inside: has joined #ruby
[23:19:33] Inside: has joined #ruby
[23:19:54] sudoubuntu: has joined #ruby
[23:20:38] baweaver: has joined #ruby
[23:21:23] mr_oh: cant thaw it
[23:21:32] Ox0dea: Sure can.
[23:22:07] Ox0dea: mr_oh: https://eval.in/548185
[23:22:59] elifoster: has joined #ruby
[23:23:49] mr_oh: witchcraft
[23:24:17] mr_oh: the lonely teen beginner won't know about fiddle :-(...
[23:24:23] eam: ACTION collects bonfire wood
[23:24:34] Ox0dea: mr_oh: Said lonely teen shouldn't be freezing Object.
[23:24:37] Ox0dea: You asked for this.
[23:25:02] Ox0dea: I still think we should get a pyre set up.
[23:25:21] mr_oh: No, but they could send their friends .rb files and urge them to require them
[23:25:40] mr_oh: Just thinking about weird scenarios
[23:25:58] eam: a pyre of tire
[23:26:09] Ox0dea: Necklacing. :<
[23:26:25] eam: oh, here I was just going for a good old tire fire :(
[23:26:38] eam: but you are correct, that is a thing people do
[23:27:58] eam: I can't immediately see what StringScanner is doing to break binary matching
[23:28:20] bry4n: has joined #ruby
[23:28:30] johnmilton: has joined #ruby
[23:28:38] Inside_: has joined #ruby
[23:29:13] Spami_: has joined #ruby
[23:29:22] Ox0dea: eam: Oh, it's just that you have to consume all of the input explicitly.
[23:30:05] Ox0dea: >> require 'strscan'; StringScanner.new('abc').scan(/b/)
[23:30:06] ruby[bot]: Ox0dea: # => nil (https://eval.in/548186)
[23:30:17] eam: oh crap, seriously?
[23:30:24] eam: <-- did not rtfm
[23:30:38] JesseH: has joined #ruby
[23:30:49] eam: well that's not what I want at all
[23:31:56] Ox0dea: It'd be nice if String#scan returned MatchDatas, but maintaining an index isn't awful.
[23:33:50] Inside: has joined #ruby
[23:35:13] Vile`: has joined #ruby
[23:35:35] plonk: has joined #ruby
[23:35:35] plonk: has joined #ruby
[23:36:16] plonk: has joined #ruby
[23:36:17] plonk: has joined #ruby
[23:36:55] RickHull: has left #ruby: ()
[23:36:55] Spami: has joined #ruby
[23:36:56] eam: threw all this out and went with blob.scan pattern { matchdata = $~[0]; start, end = *$~.offset 0; ... }
[23:37:06] karioleez: has joined #ruby
[23:37:34] eam: cuz there *is* a way to get at the MatchData ...
[23:37:53] nerium: has joined #ruby
[23:39:15] goglosh: eam: that's an interesting ruby operator >:|
[23:40:53] s2013: has joined #ruby
[23:40:59] plonk: has joined #ruby
[23:40:59] plonk: has joined #ruby
[23:41:02] pu: has joined #ruby
[23:41:46] baweaver: has joined #ruby
[23:41:47] stantona: has joined #ruby
[23:42:01] plonk: has joined #ruby
[23:42:01] plonk: has joined #ruby
[23:42:39] plonk: has joined #ruby
[23:42:39] plonk: has joined #ruby
[23:43:27] Ox0dea: >> :~ >:|
[23:43:28] ruby[bot]: Ox0dea: # => true (https://eval.in/548187)
[23:44:39] eam: >> :< >:|
[23:44:39] Musashi007: has joined #ruby
[23:44:40] ruby[bot]: eam: # => false (https://eval.in/548188)
[23:45:03] plonk: has joined #ruby
[23:45:04] plonk: has joined #ruby
[23:45:47] plonk: has joined #ruby
[23:45:47] plonk: has joined #ruby
[23:46:19] ruby[bot]: Ox0dea: # => true (https://eval.in/548189)
[23:48:26] DLSteve: has joined #ruby
[23:48:31] stannard: has joined #ruby
[23:48:32] Ox0dea: It's a guy with a guy with a chevron for a forehead for a forehead.
[23:48:56] eam: it's super weird that :> is legit but :3 isn't
[23:48:57] existensil: has joined #ruby
[23:50:07] Ox0dea: define_method('3') {}; send :3
[23:50:11] r4z3r: has joined #ruby
[23:50:16] RegulationD: has joined #ruby
[23:50:21] BtcBen: has joined #ruby
[23:51:06] eam: Ox0dea: can't do
[23:51:14] Ox0dea: eam: Not with that attitude.
[23:51:20] eam: gotta define_method('3') {}; send ?3
[23:51:34] eam: so strange
[23:51:35] Ox0dea: This is a bug.
[23:51:42] eam: I think so too
[23:52:01] eam: the quoting semantics of : are super odd, like :> is legit, but :>o isn't
[23:52:10] eam: and why shouldn't it be?
[23:52:36] Ox0dea: Well, but, that would mean that #>o should be a valid method name, and that would get hairy.
[23:53:22] Ox0dea: It's only the Symbols that're valid identifiers that don't have to be quoted.
[23:53:56] eam: but that is a valid method name
[23:54:11] BSaboia: has joined #ruby
[23:54:22] lemur: has joined #ruby
[23:54:38] Ox0dea: >> def >o; end
[23:54:39] ruby[bot]: Ox0dea: # => :> (https://eval.in/548190)
[23:54:41] Ox0dea: That didn't go so well.
[23:54:46] eam: >> define_method('>o') {">:|"}; send '>o'
[23:54:47] ruby[bot]: eam: # => ">:|" (https://eval.in/548191)
[23:54:58] eam: all strings are valid method names afaik, including the empty string
[23:55:09] Ox0dea: I was sure we meant syntactically.
[23:55:09] karioleez: has joined #ruby
[23:55:19] eam: oh well then
[23:55:43] eam: I still think the rules around : are weird
[23:56:42] Ox0dea: >> %i[+@ -@ !@ ~@] # For your amusement.
[23:56:43] ruby[bot]: Ox0dea: # => [:+@, :-@, :"!@", :"~@"] (https://eval.in/548192)
[23:57:09] Ox0dea: And/or righteous indignation.
[23:59:06] mr_oh: has joined #ruby