« Back to channel list

#ruby - 05 January 2016

« Back 1 day Forward 1 day »
[00:00:13] azzgil: u need learn rust
[00:00:25] shevy: just ignore him ;)
[00:00:54] domgetter: shellie_: Learning a new language usually makes you a better programmer overall. The exception would be if you already know like 20 languages really well, but that's very very few people.
[00:01:12] nanoz: has joined #ruby
[00:01:33] domgetter: And it helps gives perspective of a lot of the design decisions in your first language and you can code better in it cause you have a bigger picture
[00:02:36] CloCkWeRX: has joined #ruby
[00:02:38] huddy: has joined #ruby
[00:03:32] weemsledeux: has joined #ruby
[00:04:03] al2o3-cr: list comps are so the power
[00:04:40] Icey: has joined #ruby
[00:04:43] kies^: has joined #ruby
[00:04:52] shevy: al2o3-cr you are an oldschool lisper? :)
[00:06:11] al2o3-cr: one thing that i wish ruby added is list comps
[00:06:40] praveen: has joined #ruby
[00:06:53] bkxd: has joined #ruby
[00:07:03] shellie_: not enough syntactic sugar? :)
[00:07:04] mistermocha: has joined #ruby
[00:08:53] mistermocha: has joined #ruby
[00:09:13] al2o3-cr: Radar: [ math.sin(x) for x in [1,2,3] ] vs [1,2,3].map { |n| Math.sin(n) }
[00:09:42] Radar: I think the latter is more readable.
[00:10:02] Radar: "perform this function for each element in this list" vs "take this list and perform this function on it"
[00:10:37] al2o3-cr: Radar: personal opinion lv ruby me
[00:10:45] shellie_: I think the former is more readable, but I'm biased
[00:11:28] al2o3-cr: but i love ruby
[00:12:27] ruid: has joined #ruby
[00:13:19] mic_e: has joined #ruby
[00:13:32] al2o3-cr: one thing i would like Ruby to inherit from Python is list comps
[00:13:51] mistermocha: has joined #ruby
[00:14:12] al2o3-cr: python inherited from other langs
[00:14:13] hxegon: al2o3-cr that would be nice. I find HOF replaces a lot of the uses I would get, but not 100%
[00:15:19] al2o3-cr: just tried to drown myself
[00:15:36] hxegon: al2o3-cr D:
[00:16:07] al2o3-cr: another thing control flow from within print
[00:16:51] ByronJoh1son: has joined #ruby
[00:19:15] domgetter: part of the definition of a "list comprehension" is that it is syntactic sugar for set building notation
[00:19:57] domgetter: so if you have a mathematical background, list comps look preeeeeeetty nice
[00:20:18] woodruffw: has joined #ruby
[00:20:25] shevy: my brain also works how Radar described above :D
[00:21:12] shevy: maths people to haskell!
[00:21:39] rkazak_: has joined #ruby
[00:22:03] al2o3-cr: haskell is || 77
[00:22:35] domgetter: al2o3-cr: or 77?
[00:23:00] al2o3-cr: 77 IS FOR GIDDY UP
[00:23:13] domgetter: I don't understand what that means.
[00:23:48] al2o3-cr: domgetter: no one does
[00:23:49] shevy: it's like 42 apparently
[00:24:02] volty: list comprehensions look nice, but pity when it comes to the rest you get comprehended in void
[00:24:23] guacamole: has joined #ruby
[00:25:32] zeroDivisible: has joined #ruby
[00:25:39] al2o3-cr: Why does no one on here speak a fucking sense on common
[00:25:42] volty: just cute, there's a nice interview of one of the creators of haskell on youtube ??? ??Haskell is useless?? (more or less, search on yt)
[00:26:15] volty: on common what?
[00:26:26] Radar: al2o3-cr: Ironic that you didn't make sense.
[00:26:32] al2o3-cr: grounds, anyting
[00:26:32] shevy: volty I heard that before but usually in another context - "having a barrier is good"
[00:26:40] nfk|laptop: i'm looking at something along the lines of jira and ideally with time tracking features, any recommendations? right now i'm considering taiga.io
[00:26:51] al2o3-cr: Radar: really?
[00:26:55] shevy: 1482 people on #haskell so I assume it works for them
[00:27:02] Papierkorb: nfk|laptop: afaik Redmine has time tracking stuff too
[00:27:11] nfk|laptop: wow, didn't know that
[00:27:13] Radar: "speak a fucking sense on common" is not any phrase that I know
[00:27:15] jamw: has joined #ruby
[00:27:29] domgetter: execute order 77
[00:27:30] Radar: Redmine still isn't dead? Jeez.
[00:27:39] al2o3-cr: Radar: common fucking sense
[00:27:41] volty: no grounds there, you can play with haskell just for fun (funny comprehension), but when it comes to product it's useless (as his author rightly states)
[00:27:47] nfk|laptop: shevy, i considered haskel for my next project, looking at the source for about 10 minutes was enough to make me reconsider ruby
[00:27:51] Radar: al2o3-cr: right
[00:27:51] Papierkorb: Radar: we're using it at work. it's still better than gerrit ....
[00:27:55] shevy: it is not! it's even growing! yesterday I had to register for a redmine account at... let me try to remember the name of the project...
[00:28:02] pawnbox: has joined #ruby
[00:28:15] Radar: I've got my time tracking separate from my projects because the company I'm currently working for doesn't care about time tracking.
[00:28:28] Radar: nfk|laptop: How often does the time something take matter in your company?
[00:28:41] shevy: ah yes, it was audacious, they use redmine too, I had to use it because audacious-plugins has no way to find audacious in non-standard locations
[00:28:55] nfk|laptop: not a company and i'm pretty sure the powers beyond will want to see the timesheets
[00:29:24] Radar: nfk|laptop: If it's just the timesheets they want to see, then I reckon using Toggl and its reporting feature will do.
[00:29:26] nfk|laptop: i'd love to just code and maybe do a conference once in a while but life isn't that sweet
[00:29:37] volty: shevy: just nerds. they master comprehensions, and pose as experts, but they are stuck there
[00:29:39] zeroDivisible: has joined #ruby
[00:29:41] Radar: nfk|laptop: As for the project management stuff itself, maybe sprint.ly, Pivotal Tracker or even GitHub's issues.
[00:30:12] nfk|laptop: i can't use github as powers beyond were not quite happy with the public nature
[00:30:20] mary5030: has joined #ruby
[00:30:31] nfk|laptop: even though it's sort of internal academic project so there's no direct danger
[00:30:31] volty: you should ALL advice people to stay away from Haskell (except for just surfacing it)
[00:30:44] Papierkorb: GH Enterprice :P
[00:31:13] Radar: nfk|laptop: Get a private repo
[00:31:17] nfk|laptop: volty, i have no idea why you'd say that, haskell is fine if you can get your mind around it
[00:31:22] nfk|laptop: though i don't think many can
[00:31:49] Papierkorb: nfk|laptop: one (or the?) of the designers of haskell did a interesting video on it
[00:32:13] nfk|laptop: Radar, i'm currently considering if i should spend something like 14 euros on new winter gloves, you think i can afford a monthly subscription?
[00:32:52] Papierkorb: nfk|laptop: lowtech? Excel spreadsheet .. in GDrive? .. with a stop watch desktop widget?
[00:33:18] Radar: nfk|laptop: I see.
[00:33:26] Radar: Toggl is free btw.
[00:33:29] volty: nfk|laptop: it's a crap phrase ??? very like the one (attributed to Einstein) that say our brain works only at 10 % ??? the answer is very simple, our brain evolved to work this way, no miracles there . The fact is that you cannot get your mind around it. You can only get around mastering structures and comprensions, but you just cannot decompose the big projects / problems
[00:33:34] nfk|laptop: and sadly that consideration is kinda lost as my current ones gave me a freeze burn today and i was just out for like 2x15 minutes to the local bistro
[00:33:56] nfk|laptop: Papierkorb, that's i guess not that bad though i'd like for something a bit more modern
[00:33:58] ruboto: al2o3-cr # => /tmp/execpad-bef34210a45e/source-bef34210a45e:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/497353)
[00:34:16] al2o3-cr: its gone >.?/'
[00:35:07] al2o3-cr: thee bot is wank
[00:35:18] Papierkorb: nfk|laptop: a ruby script which .. autoupdates the spreadsheet! .. Not trying to troll you, if I were in such a position I'd do something similar. Heck, make the ruby script write a CSV file which you import into excel and you're done. ??? IF for some reason one of the other free solutions just don't cut it for you
[00:35:18] nfk|laptop: volty, i mean, python and ruby require you to get used to them
[00:35:43] Melpaws: has joined #ruby
[00:35:56] nfk|laptop: i have also done some FORTH and even brainfuck and dipped the top of my pinky into clojure but haskell is a bit too much
[00:36:52] nfk|laptop: Papierkorb, now that i think about it, i'll just have a local file and sync it via git
[00:37:03] volty: nfk|laptop: it's not that. in langs like ruby & python it's much easier to decompose a problem, to test it, to debug it. In haskell it's much more difficult to decompose. It's all flow, no break, no pause, no rest.
[00:37:07] nfk|laptop: the main issue is actually the time counting itself
[00:37:24] nfk|laptop: volty, it's the syntax i object to
[00:37:28] mistermo_: has joined #ruby
[00:37:30] nfk|laptop: or rather, the way stuff is done
[00:37:34] nfk|laptop: it's just too alien
[00:37:48] Papierkorb: nfk|laptop: have a script which takes start|stop as argument. on start, it writes a YAML file with the current time stamp. on stop, it reads it back and updates the CSV or whatever.
[00:38:24] ta: has joined #ruby
[00:38:26] Melpaws1: has joined #ruby
[00:38:28] nfk|laptop: Papierkorb, yeah, i have such software already, it's just local to the machine and i'm working on two different linux boxes
[00:38:38] nfk|laptop: having them share the data would be best
[00:38:44] Papierkorb: nfk|laptop: That thing is so dumb that not only you could technically do it with a bash script, no, everything that can fork() to processes can intergrate it (e.g. your favorite text editor)
[00:39:02] volty: it is too alien for human brains ??? we, humans, spent thousands of years to get where we are. at the same time we have some experts, confined to their list comprehensions (and nothing else, almost) that try too cheat us with ??you should adjust your mind .... ??
[00:39:03] nfk|laptop: but alas ktimetracker hasn't been ported to plasma 5 and hamster is just shit, good looking but shit
[00:39:20] volty: s/too/to/
[00:39:20] Papierkorb: nfk|laptop: I feel your KDE related pain :(
[00:39:23] shevy: i like them
[00:39:34] al2o3-cr: not known lately
[00:39:49] shevy: alien hamsters learning haskell
[00:40:04] nfk|laptop: or whatever they have for mascot
[00:40:17] Papierkorb: wasn't that some kind of rat?
[00:40:19] shevy: yeah a gopher or whatever the name is for that obese rat-like thing... but it's actually cute
[00:40:34] nfk|laptop: Papierkorb, i don't think anyone has moomins for logo
[00:40:39] al2o3-cr: haskell is good (for it is useless)
[00:40:56] nfk|laptop: shevy, so it's a programmer?
[00:41:09] volty: i gave up as soon as I saw there was no inheritance, when I saw the libraries for xml parsing ??? a nightmare masked by overuse of operators
[00:42:38] Melpaws: has joined #ruby
[00:43:51] vegan: has joined #ruby
[00:44:03] al2o3-cr: m4p r3v3rs3 [elkjfkkskjfkljfkldkljf]
[00:44:25] Radar: al2o3-cr: really
[00:45:59] Radar: al2o3-cr: y u spam
[00:46:17] duckpuppy: has joined #ruby
[00:46:59] hxegon_: has joined #ruby
[00:47:03] volty: anyone experience with ruby extensions? what tools can you suggest?
[00:47:12] al2o3-cr: hhooww''dd yyoouu mmeeaann RRaaddaarr??
[00:47:29] ruboto: +q al2o3-cr!*@*
[00:47:29] ruboto: -o ruboto
[00:47:38] Radar: Time out for 15 min
[00:49:23] shevy: nfk|laptop yes!
[00:49:57] shevy: the gopher is a gogrammer and a brogrammer
[00:51:01] nfk|laptop: also gopher sounds like gopher
[00:51:10] nfk|laptop: i mean, why not stig then?
[00:51:39] nfk|laptop: bnagy, #ruby, bringing you terrible jokes since.. i'm here
[00:55:04] Ox0dea: al2o3-cr: Do you like Haskell's list comprehensions?
[00:55:07] Ox0dea: https://eval.in/497355
[00:56:44] shevy: I approve of the disclaimer
[00:56:46] shevy: "Please do not actually use this."
[00:56:56] hxegon_: Ox0dea deja vu
[00:56:58] Ox0dea: It's cool that it can be done, though.
[00:57:08] DrShoggoth: has joined #ruby
[00:57:23] Ox0dea: hxegon_: I don't remember whether I've shown al2o3-cr, and he's into list comprehensions.
[00:58:31] ruboto: -q al2o3-cr!*@*
[00:58:31] ruboto: -o ruboto
[00:59:09] nwhirschfeld: has joined #ruby
[00:59:15] al2o3-cr: Ox0dea: you didn't write surely haha
[00:59:27] Ox0dea: al2o3-cr: What didn't I write?
[00:59:49] auzty: has joined #ruby
[00:59:56] al2o3-cr: your fingers
[01:00:07] shevy: no, he used his toes and nose
[01:00:15] Ox0dea: My toeses and noses.
[01:01:27] nfk|laptop: okay, i'm trying to figure out a good name for the project
[01:01:39] nfk|laptop: i think i'm about to source on kanjis
[01:01:40] shevy: that is one of the biggest problems out there
[01:01:47] nfk|laptop: it always is
[01:01:49] shevy: finding a good name
[01:02:00] shevy: how about:
[01:02:04] shevy: - kanji-ninjas
[01:02:17] nfk|laptop: it's not about kanjis or anything nippon related
[01:02:23] Ox0dea: The hardest problems in programming: naming things, cache invalidation, naming things, and cache invalidation.
[01:02:27] nfk|laptop: also you can't beat kanji damage
[01:03:15] nfk|laptop: An official KanjiDamage deck is now available for Anki , a popular flashcard program. Many thanks to miwuc, KD user and great coder! This KanjiDamage deck contains all of KD's kanji plus stroke order diagrams. Please check it out here!
[01:03:22] nfk|laptop: okay, now i have a raging...
[01:03:49] shevy: Ox0dea don't forget this: http://pastie.org/pastes/10670288/text
[01:04:01] Azure: has joined #ruby
[01:04:30] nfk|laptop: also, if someone doesn't know the great website: http://www.kanjidamage.com/kanji/8
[01:04:50] nfk|laptop: and i just realised ruby comes from japan so i really should not be surprised if there are people who know japanese here
[01:04:57] Ox0dea: shevy: That was in Dodecember?
[01:05:00] Denommus`: has left #ruby: ("ERC Version 5.3 (IRC client for Emacs)")
[01:05:10] shevy: I don't remember when it happened
[01:05:25] Ox0dea: It says Dodecember the 12th.
[01:05:34] shevy: I don't trust these time stamps
[01:05:55] Ox0dea: I trust neither time nor stamps, but timestamps are usually pretty upstanding citizens.
[01:06:07] shevy: I like them alot
[01:06:18] nfk|laptop: shevy, don't make me link you that one
[01:06:24] gambl0re: has joined #ruby
[01:06:43] shevy: I still think kanji-ninjas is a good name
[01:06:46] Ox0dea: This alot is my favorite.
[01:06:53] shevy: I am disappointed that you won't go with that name
[01:07:02] shevy: but I am curious what name you'll pick nfk|laptop :)
[01:07:16] nfk|laptop: probably not alot
[01:07:33] nfk|laptop: in the rare case someone is going "but alot is a fine word": http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html
[01:07:38] shevy: <3 http://3.bp.blogspot.com/_D_Z-D2tzi14/S8TTPQCPA6I/AAAAAAAACwA/ZHZH-Bi8OmI/s400/ALOT2.png
[01:08:03] shevy: it's prettier than go's gopher
[01:08:10] Ox0dea: nfk|laptop: And yet here you are using "rare" where you meant "unlikely".
[01:08:16] Ox0dea: Grammar is balls-to-the-wall or fuck off.
[01:08:16] guacamole: has joined #ruby
[01:08:54] shevy: nfk|laptop so what is the project all about actually? perhaps we can find a really good name
[01:09:05] Ox0dea: It's for practicing the kanji, I'd imagine.
[01:09:20] shevy: kanji-trainer
[01:09:33] shevy: I guess the - should be a _
[01:09:36] Papierkorb: SenpaiNoticeMe
[01:10:18] nfk|laptop: Ox0dea, well, excu~~~~~~se me
[01:10:33] nfk|laptop: also, is there any awful meme we'll not cover tonight?
[01:10:40] Ox0dea: nfk|laptop: I forgive you.
[01:10:43] Ox0dea: Princess.
[01:10:55] nfk|laptop: wouldn't that be you there?
[01:10:56] al2o3-cr: Is there a difference between `extend self` and module_function?
[01:11:06] Ox0dea: nfk|laptop: It was a meme reference, silly.
[01:11:14] Ox0dea: I thought we were on teams.
[01:11:19] duncannz: has joined #ruby
[01:11:24] nfk|laptop: i'm not actually a channer
[01:11:48] Ox0dea: nfk|laptop: In that case, this might be new for you: https://youtu.be/FPxY8lpYAUM
[01:12:00] nfk|laptop: i have just consumed unhealthy amount of the bit of youtube where children shouldn't be allowed in
[01:12:08] nfk|laptop: (but are anyway)
[01:12:15] guacamole: has joined #ruby
[01:13:00] shevy: al2o3-cr hmm... module_function works on a per-method basis or? and extend self for all? or can you use module_function similar to private
[01:13:00] nfk|laptop: Ox0dea, i do know about that one, avgn had something like half an episode dedicated to it
[01:13:36] shevy: al2o3-cr I think there was one difference between def self.foo and module_function :foo, something in regards to private versus public
[01:13:54] Ox0dea: nfk|laptop: It's pronounced "kanji ?????????", right?
[01:14:00] Ox0dea: Not like the English "damage"?
[01:14:03] nfk|laptop: and as i typed it out i had it ringing in my mental ears
[01:14:11] paradisaeidae: has joined #ruby
[01:14:24] al2o3-cr: shevy: thank you
[01:14:36] Ox0dea: nfk|laptop: "da", "ma", and "ge" are all Japanese syllables.
[01:14:43] Brackson: has joined #ruby
[01:15:00] nfk|laptop: yes, i can read hiragana with relative ease
[01:15:04] shevy: al2o3-cr by the way :-) http://stackoverflow.com/questions/2353498/is-extend-self-the-same-as-module-function
[01:15:27] Ox0dea: nfk|laptop: What does "da-ma-ge" mean?
[01:15:41] nfk|laptop: i have no idea
[01:15:47] shevy: nfk|laptop ohhh do you also speak japanese?
[01:15:48] praveen: has joined #ruby
[01:15:51] Brackson: how can I do something like "until random(proxies) is connectable?, proxy = the random proxy"
[01:16:01] roshanavand: has joined #ruby
[01:16:01] Ox0dea: brackson: Looks about right.
[01:16:15] nfk|laptop: shevy, speak would be a bit much, i have never practised anything but reading and listening
[01:16:40] Ox0dea: brackson: while proxy = proxies.sample; break if proxy.connectable?; end
[01:16:51] nfk|laptop: and very awful calligraphy with both pen and an incorrectly shaped felt tip calligraphy pen
[01:16:53] Papierkorb: brackson: proxy = proxies.sample until proxy.connectable?
[01:17:04] Brackson: Ox0dea: thanks!!
[01:17:10] Ox0dea: Papierkorb: No `nil` trouble there?
[01:17:16] Ox0dea: brackson: Happy to help.
[01:17:56] zacts: is http://shoesrb.com/ worthwhile?
[01:18:00] zacts: (for simple apps)
[01:18:06] zacts: I'm not doing iOS or Android
[01:18:33] zacts: craysiii: why not? and what would you recommend instead?
[01:18:41] Papierkorb: >> h = 1 until h == 1; h
[01:18:43] ruboto: Papierkorb # => 1 (https://eval.in/497356)
[01:18:48] shevy: zacts dunno, it sorta changed when _why was no longer in charge, in principle shoes is a good idea; one variant requires java/jruby though
[01:18:53] Ox0dea: Papierkorb: You didn't invoke a method.
[01:19:12] Papierkorb: and you're just bitching around.
[01:19:23] craysiii: documentation is lacking and the newer version requires jruby as its been said
[01:19:41] craysiii: i would personally use C#/Mono for GUI but thats me.
[01:19:52] shevy: it would be nice if we could have a shoes-like API for all the ruby-GUI bindings on top of their regular way to use them
[01:19:58] Ox0dea: >> foo = [1,2,3].sample until foo.nonzero? # Papierkorb
[01:19:59] ruboto: Ox0dea # => undefined method `nonzero?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/497357)
[01:20:17] Ox0dea: Papierkorb: I am genuinely interested in your answer: what the fuck is the point of providing incorrect "advice"?
[01:20:18] weemsledeux: has joined #ruby
[01:20:19] nfk|laptop: craysiii, there's also qml
[01:20:38] Ox0dea: Papierkorb: Who benefits?
[01:20:55] Papierkorb: Ox0dea: you've been asking me stuff every time I said something since last week or so. It's becoming obvious.
[01:21:04] nfk|laptop: and can you even use Mono for GUI? last time i checked they only had explicit GTK bindings not WPF or winforms emulation
[01:21:06] Dimik: has joined #ruby
[01:21:16] zacts: shevy: so perhaps a QT gem might work for me?
[01:21:24] zacts: I want to support only Linux / BSD / OSX
[01:21:30] zacts: I don't even care about Windows
[01:21:40] nfk|laptop: the dirty little secret of .NET is that winforms and probably also WPF are part of windows and .NET is just binding to it
[01:21:46] shevy: zacts I dunno... Papierkorb tried the ruby-qt bindings some time ago, I am more into ruby-gnome. all of them could require a LOT of improvements
[01:22:00] zacts: so does ruby-gnome work for OSX too?
[01:22:03] Dimik: has joined #ruby
[01:22:04] zacts: if so, I don't mind using that
[01:22:09] nfk|laptop: hence Mono has to provide bindings to something else and it's not even trying to act like what you have on windows
[01:22:16] shevy: zacts when I tried them when qt4 / kde 4 came out, qtruby was nice though but that was when rdale was still around. I dunno who took over, it's on some github mirror nowadays
[01:22:20] zacts: (it's for a simple app)
[01:22:29] craysiii: i dont see how that matters when they only want to support linux
[01:22:45] ur5us_: has joined #ruby
[01:22:49] shevy: I know that ruby-gnome works on windows, not sure about OSX but I assume it will work if gtk2/gtk3 works on OSX (does it?)
[01:23:06] freerobby: has joined #ruby
[01:23:10] zacts: no idea re: gtk2/gtk3 on OSX, although GIMP works on OSX, and it uses gtk
[01:23:25] volty: qtbindings are fine
[01:23:39] zacts: volty: which gem do you use for this?
[01:23:53] volty: I just missed (these days) the phonon framework but I've done it just now
[01:24:01] nfk|laptop: shevy, there is a gem
[01:24:44] volty: zacts: qtbindings (
[01:25:02] jbrhbr1: has joined #ruby
[01:25:13] volty: pay ATTN, you have to have ruby compiled with shared libraries enabled
[01:25:40] nfk|laptop: there's qt5 binding, people, qml only
[01:25:54] nfk|laptop: it's either gem install qt or gem install qml
[01:26:04] janebootydoe: has joined #ruby
[01:26:09] Papierkorb: QML already uses JS, what's the point of integrating that?
[01:26:11] volty: I hope the classical qtbindings will live on
[01:26:29] nfk|laptop: Papierkorb, so that you can write the logic in Ruby and integrate with your ruby code
[01:26:50] nfk|laptop: also you'll be displeased if you knew how shitty qml is
[01:26:59] Papierkorb: Last time (~1.3 years ago?) QML just didn't cut it on the desktop for UI
[01:27:07] craysiii: writing gui is ruby is just a pita it seems.
[01:27:08] nfk|laptop: with my python project i literally did everything from python if it couldn't be done in pure qml
[01:27:24] nfk|laptop: any kind of interaction from qml to python was fucking pain
[01:27:35] volty: I gave it a look (at qml) long time ago and I didn't like it
[01:27:39] nfk|laptop: or rather, fucking impossible without doing crazy stuff
[01:27:51] shevy: you people make me sad :(
[01:27:55] Papierkorb: Looks like qtbindings is not compatible with Ruby 2.3. it installed fine with 2.2.4
[01:28:06] dextertzu: has joined #ruby
[01:28:08] Darmani: shevy: don't be sad.
[01:28:15] nfk|laptop: i did install qt gem on 2.3 already
[01:28:20] luckyme: has joined #ruby
[01:28:32] Papierkorb: nfk|laptop: "qtbindings" ?
[01:28:38] volty: Papierkorb: and how that incompatibility manifests ?
[01:28:48] nfk|laptop: gem install qt would be my first guess
[01:29:04] nfk|laptop: Papierkorb, note that it's qml 2 only
[01:29:13] nfk|laptop: but on the upside it's very fast to build
[01:29:27] nfk|laptop: pyqt5 takes about as long to build as most qt modules
[01:29:36] craysiii: what about https://github.com/seanchas116/ruby-qml
[01:29:41] jdawgaz: has joined #ruby
[01:29:45] Papierkorb: volty: g++ blurts out errors while compiling it from inside ruby/ruby.h from qtbindings' 'marshaller' component
[01:29:48] nfk|laptop: except qtwebkit, that's one fat bastard (as expected of webkit)
[01:30:12] nfk|laptop: craysiii, i believe that's the one i mentioned
[01:30:24] radgeRayden: has joined #ruby
[01:30:26] zacts: volty: cool, thanks
[01:30:39] craysiii: oh missed it, sorry
[01:30:47] nfk|laptop: craysiii, anyway, as far as i'm aware pyqt5 is the only full Qt5 binding other than the native C++
[01:31:03] nfk|laptop: everything else is qml-only
[01:31:07] craysiii: cough C#/Mono/Gtk cough
[01:31:25] nfk|laptop: craysiii, GTK has nothing to do with Qt or Gimp for that matter
[01:31:33] craysiii: i never said it does
[01:31:41] nfk|laptop: it's quite funny when The Gimp Toolkit is not used by The Gimp
[01:31:57] nfk|laptop: oh sorry, no The there
[01:31:59] nfk|laptop: ACTION yawns
[01:32:06] kp666: has joined #ruby
[01:32:20] shevy: nfk|laptop I remember the controversy about the name "gimp"
[01:32:31] volty: qtbindings for ruby - I see there are only 4 maintainers, of which 2-3 experts. really pity. qt is very nice
[01:32:44] shevy: yeah volty it's all a state of sadness :(
[01:32:52] shevy: html5 is the bulldozer
[01:33:16] luckyme: has joined #ruby
[01:33:18] nfk|laptop: shevy, were you usenetting between running away from pterodactyls?
[01:33:30] nfk|laptop: and sorry in advance for that, gramps
[01:34:21] craysiii: using IPoAC i assume
[01:35:44] shevy: nfk|laptop haha
[01:35:48] SenpaiSilver: has joined #ruby
[01:35:49] shevy: I think I never used usenet
[01:36:07] shevy: I also can't handle mailing lists well, the traffic is killing me :(
[01:36:18] Salve: has joined #ruby
[01:37:03] nfk|laptop: shevy, how would kamitei sound like?
[01:37:27] nfk|laptop: yeah, i tried them once, some gnu/neckbeard stuff
[01:38:05] shevy: sounds very exotic as a name
[01:38:07] nfk|laptop: shevy, i guess you could try brady haran or cgp gray ml's then, i think brady is very cautions with mailing people
[01:38:10] SenpaiSilver: has joined #ruby
[01:38:20] nfk|laptop: shevy, it is
[01:38:52] nfk|laptop: and if you don't know who they are, you really should try hellointernet
[01:40:51] nfk|laptop: https://www.youtube.com/watch?v=-6gKdbFhla4&index=6&list=PLe_b-HAZD1pXvb7Y7U2SlP7vM0XG4aA55
[01:41:06] nfk|laptop: i had that in my bookmarks so presumably that one was fun
[01:42:38] mistermocha: has joined #ruby
[01:43:47] duckpuppy: has joined #ruby
[01:44:47] hahuang65: has joined #ruby
[01:45:09] dfockler: has joined #ruby
[01:46:09] guacamole: has joined #ruby
[01:47:08] ElFerna: has joined #ruby
[01:48:28] guacamole: has joined #ruby
[01:50:01] jamw: has joined #ruby
[01:50:03] Scripore: has joined #ruby
[01:51:13] crystalmaiden: has joined #ruby
[01:52:44] lacuna: has joined #ruby
[01:52:44] lacuna: has joined #ruby
[01:53:47] mary5030: has joined #ruby
[01:54:21] baweaver: has joined #ruby
[01:59:36] Graphettion: has joined #ruby
[02:01:10] hahuang65: has joined #ruby
[02:03:23] Bloomer: has joined #ruby
[02:06:19] smactive_: has joined #ruby
[02:07:45] bkxd: has joined #ruby
[02:08:38] pawnbox: has joined #ruby
[02:12:46] luckyme: has joined #ruby
[02:17:15] ledestin: has joined #ruby
[02:20:06] hxegon: has joined #ruby
[02:20:15] RegulationD: has joined #ruby
[02:21:14] mary5030: has joined #ruby
[02:24:08] ur5us: has joined #ruby
[02:24:40] weemsledeux: has joined #ruby
[02:26:08] magaudet: has left #ruby: ("undefined")
[02:29:06] weemsledeux: has joined #ruby
[02:29:54] nofxx: has joined #ruby
[02:29:55] nofxx: has joined #ruby
[02:35:09] arescorpio: has joined #ruby
[02:37:56] krobzaur: has joined #ruby
[02:38:59] sgp667: has joined #ruby
[02:39:03] haraigo: has joined #ruby
[02:41:09] sgp667: Hey guys I am struggling with something very basic but it just makes so sense to me.
[02:41:14] cdg: has joined #ruby
[02:41:20] sgp667: Why is following line returning error:
[02:41:22] sgp667: file = File.new "test.txt"
[02:41:40] sgp667: Errno::ENOENT: No such file or directory @ dir_initialize - test
[02:45:09] eam: sgp667: your current directory has been removed
[02:45:28] NoTroutAboutIt: has joined #ruby
[02:46:19] sgp667: found it on stackoverflow.com I need "w" parameter
[02:46:38] eam: oh hah, I didn't even look to see if it was w
[02:46:41] sgp667: thanks for the tip `eam`
[02:47:47] sgp667: yeah I feel like this wasn't always the case maybe as of 2.0 File assumes "r" by default
[02:48:17] ur5us: has joined #ruby
[02:48:31] Prominent: has joined #ruby
[02:51:06] yeticry: has joined #ruby
[02:51:22] domgetter: has joined #ruby
[02:52:30] eam: File.new always assumed "r" by default afaik
[02:53:22] eam: sgp667: "w" creates a new file if one didn't exist
[02:53:56] Channel6: has joined #ruby
[02:55:21] NoTroutAboutIt_: has joined #ruby
[02:55:37] hangtime21: has joined #ruby
[02:57:01] smactive: has joined #ruby
[02:58:16] pawnbox: has joined #ruby
[03:05:27] ur5us: has joined #ruby
[03:06:20] lacuna: has joined #ruby
[03:06:20] lacuna: has joined #ruby
[03:07:14] lyoshajapan: has joined #ruby
[03:10:56] renderful: has joined #ruby
[03:11:15] uris: has joined #ruby
[03:11:43] symm-: has joined #ruby
[03:13:53] Melpaws: has joined #ruby
[03:17:04] penne12: has joined #ruby
[03:18:45] psye: has joined #ruby
[03:18:53] ElFerna: has joined #ruby
[03:21:40] agent_white: has joined #ruby
[03:22:13] jamw: has joined #ruby
[03:22:50] smactive: has joined #ruby
[03:23:20] agent_white: Ox0dea: How goes it?
[03:23:31] Ox0dea: agent_white: 1 second per second.
[03:25:25] agent_white: Ox0dea: Steady as she goes.
[03:30:39] nerium: has joined #ruby
[03:31:02] roshanavand: has joined #ruby
[03:34:07] CorySimmons: has joined #ruby
[03:34:53] freerobby: has joined #ruby
[03:37:51] UtkarshRay: has joined #ruby
[03:38:45] chipotle: has joined #ruby
[03:39:17] lacuna: has joined #ruby
[03:41:17] hxegon: has joined #ruby
[03:42:20] TomPeed: has joined #ruby
[03:46:58] mary5030: has joined #ruby
[03:48:24] ur5us: has joined #ruby
[03:53:25] lyoshajapan: has joined #ruby
[03:57:13] sankaber: has joined #ruby
[03:59:26] ta: has joined #ruby
[04:00:45] Yzguy: has joined #ruby
[04:01:44] Yzguy: anyone have experience with ldapsearch filters? working with ruby ldap thing but i cant get what i want
[04:02:21] Yzguy: (&(objectclass=person)(uniquememberof=cn=Admins,ou=Groups,dc=example,dc=com))
[04:03:01] Yzguy: I just want the filter to return only users that are members of that group
[04:04:13] devbug: has joined #ruby
[04:05:32] symm-: has joined #ruby
[04:06:09] arup_r: has joined #ruby
[04:07:14] janebootydoe: has joined #ruby
[04:09:16] Gmi: has joined #ruby
[04:10:13] lyoshajapan: has joined #ruby
[04:11:17] rkazak_: has joined #ruby
[04:11:46] adgtl: has joined #ruby
[04:11:48] zast: has joined #ruby
[04:12:18] pawnbox: has joined #ruby
[04:12:23] hxegon: has joined #ruby
[04:12:24] speaking1ode: has joined #ruby
[04:14:58] bluOxigen: has joined #ruby
[04:18:23] UtkarshRay: has joined #ruby
[04:21:05] ElFerna: has joined #ruby
[04:21:21] radgeRayden: has joined #ruby
[04:22:35] iateadonut: has joined #ruby
[04:22:57] pwnd_nsfw: has joined #ruby
[04:23:42] d0nn1e: has joined #ruby
[04:24:30] Melpaws: has left #ruby: ()
[04:31:09] lyoshajapan: has joined #ruby
[04:31:28] cpup: has joined #ruby
[04:33:52] jdawgaz: has joined #ruby
[04:34:57] cdg: has joined #ruby
[04:35:12] jud: has joined #ruby
[04:35:29] adgtl_: has joined #ruby
[04:35:59] pawnbox: has joined #ruby
[04:39:34] Haris: has joined #ruby
[04:39:35] Haris: has joined #ruby
[04:40:46] Haris: has left #ruby: ()
[04:41:19] JamieD: has joined #ruby
[04:42:22] mistermocha: has joined #ruby
[04:42:32] nerium: has joined #ruby
[04:42:47] erichmenge: has joined #ruby
[04:45:43] lacuna: has joined #ruby
[04:47:58] atmosx: has joined #ruby
[04:48:11] atmosx: has left #ruby: ()
[04:49:14] tkiel: has joined #ruby
[04:50:16] mistermo_: has joined #ruby
[04:50:46] praveen: has joined #ruby
[04:50:52] pawnbox: has joined #ruby
[04:52:15] praveen: has joined #ruby
[04:53:12] djbkd: has joined #ruby
[04:54:32] Tref: has joined #ruby
[04:54:49] praveen: has joined #ruby
[04:56:54] wolffles: has joined #ruby
[05:01:08] wolffles: how many ways could i make a search on an array case insensitive? ???.map{|i| i.downcase}.count(word)???
[05:01:36] pawnbox: has joined #ruby
[05:01:46] wolffles: or i guess other ways to do it
[05:01:52] ta: has joined #ruby
[05:02:59] djbkd: has joined #ruby
[05:03:15] msankhala: has joined #ruby
[05:03:17] haraigo: has joined #ruby
[05:03:18] shevy: wolffles perhaps via regex /foo/i
[05:03:33] shevy: .find and .select are also available
[05:03:55] shevy: the above looks like a use case for .detect actually
[05:05:28] Ox0dea: wolffles: shevy meant #grep.
[05:05:32] MattV: has joined #ruby
[05:05:55] Ox0dea: >> %w[foo bar Foo Bar FOO BAR].grep /foo/i
[05:05:56] ruboto: Ox0dea # => ["foo", "Foo", "FOO"] (https://eval.in/497400)
[05:07:01] baweaver: has joined #ruby
[05:09:07] bkxd: has joined #ruby
[05:09:21] wolffles: thanks guys i didnt know about regex or .grep
[05:10:21] n00bDev: has joined #ruby
[05:10:42] shevy: Ox0dea could you please stop using words such as "meant"?
[05:10:54] Ox0dea: Of course not.
[05:11:15] ruboto: I don't know anything about meant
[05:11:18] shevy: Ox0dea it is the same problem that Papierkorb mentioned. Stop harassing people.
[05:12:01] Ox0dea: You're so small.
[05:12:36] Ox0dea: I mean, like, petty.
[05:12:38] shevy: Ox0dea This is a matter of netiquette. If you have a proper solution, it's perfectly fine to present it without attempting to lower other people you dislike. It's similar problems in the past such as your ad hominem attack against me.
[05:13:53] agent_white: has joined #ruby
[05:14:00] pawnbox: has joined #ruby
[05:14:01] wolffles: *grabs the popcorn*
[05:14:21] Ox0dea: wolffles: Incoming.
[05:14:53] agent_white: Do... we start yelling now?
[05:14:55] thezanke: has joined #ruby
[05:15:12] Ox0dea: shevy: Is this harassment? http://i.imgur.com/JiMvrsV.png
[05:15:18] shevy: Ox0dea Stop it.
[05:15:21] shevy: Can the ops please intervene?
[05:15:27] Ox0dea: Is this a joke?
[05:15:37] shevy: Will you stop?
[05:15:51] wolffles: okay yall he asked nicely
[05:16:01] wolffles: lets be nice now
[05:16:06] shevy: Stop PRIVMSG.
[05:16:37] tokik: has joined #ruby
[05:16:52] Ox0dea: shevy: What is the purpose of this channel?
[05:16:57] jackjackdripper: has joined #ruby
[05:17:08] shevy: Ox0dea For you to stop highlighting me with unimportant boring trivia.
[05:17:15] kknight: has joined #ruby
[05:17:29] Ox0dea: I hope things get better.
[05:17:32] renderful: has joined #ruby
[05:17:48] shevy: I sure hope so as well.
[05:18:17] Ox0dea: shevy: How many times do you reckon I've helped somebody in this channel? Two, three tops?
[05:18:28] shevy: Ox0dea I don't care. Stop highlighting me if you help someone else.
[05:18:35] Ox0dea: You look stupid.
[05:18:39] shevy: Ox0dea And if you don't, it is harassment. Plain and simple.
[05:19:01] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[05:19:36] agent_white: HUMANS... stop it?
[05:20:28] wolffles: girls dont mind being called guys ruboto
[05:21:06] Darmani: ACTION enters the room
[05:21:08] agent_white: wolffles: Yeah I got banned for saying that a bit ago. So be careful.
[05:21:26] Darmani: Are we fighting?
[05:21:28] pontiki: has left #ruby: (""Poets have been mysteriously silent on the subject of cheese" -- G.K.Chesterson")
[05:21:38] agent_white: Yes. So be careful.
[05:21:43] shevy: Darmani nah, I think it's over already
[05:21:48] wolffles: thats a bit harsh i feel
[05:21:57] Darmani: Usually I'm the one who says something controversial.
[05:21:59] Darmani: Well not really.
[05:22:03] ElFerna: has joined #ruby
[05:22:07] Darmani: But usually someone gets offended by something I say.
[05:22:08] lyoshajapan: has joined #ruby
[05:22:28] shevy: Any more programming you did as of late Darmani?
[05:22:34] sneakerhax: has joined #ruby
[05:22:36] Darmani: That's why I'm here.
[05:23:06] Darmani: http://ideone.com/HuFf8n
[05:23:19] agent_white: Darmani: Sorry I didn't respond to you earlier today. I accidentally a 7beers or so last night and was unresponsive to IRC this morning.
[05:23:21] Darmani: I made dis
[05:23:35] Darmani: I don't even remember what I said earlier today
[05:23:37] Darmani: Don't worry about it.
[05:23:47] shevy: looks ok, consistent indent
[05:23:49] bluOxigen: has joined #ruby
[05:23:50] agent_white: You were ticked about Rubykoans.
[05:24:03] Darmani: That sounds about right
[05:24:30] Darmani: Anyway the challenge was to create a program that does bubble sorting
[05:24:35] Darmani: but not to use the sort method
[05:24:36] shevy: yeah, I don't remember it exactly but you said they are useless or something along those lines
[05:24:48] Darmani: shevy: They are useless
[05:25:10] shevy: I can't really judge, I never actually tried them
[05:25:31] Darmani: You're not missing anything
[05:25:36] Ox0dea: > a 7beers
[05:25:38] Ox0dea: I love it.
[05:25:52] Darmani: Ox0dea: Are you causing trouble again?
[05:25:57] Ox0dea: Apparently.
[05:26:00] Darmani: Do I have to put you in a corner?
[05:26:11] Ox0dea: Darmani: You're coming with me for that explicit for loop.
[05:26:14] Ox0dea: This is #ruby.
[05:26:21] wolffles: this is better than the movie im playing in the backround
[05:26:26] Darmani: Hey come on. You're not proud of me?? Q.Q
[05:26:31] Ox0dea: am such prowd
[05:26:31] Darmani: Notice me senpai
[05:27:06] Darmani: You know what I realized too
[05:27:19] Ox0dea: The LHS of that assignment could be `numbers[i - 1, 2]`, but it's elseways solid.
[05:27:19] Darmani: I don't know how to do OOP
[05:27:22] shevy: wolffles lol
[05:27:23] Darmani: I mean I kinda do
[05:27:26] Darmani: I get the basic's of it
[05:27:31] Darmani: But I've never actually done it.
[05:28:16] Darmani: Well I'm glad your all proud of me
[05:28:25] Darmani: I'm going through this website called "The Odin Project"
[05:28:31] Darmani: It seems pretty solid
[05:28:38] Darmani: They give you challenges n shit
[05:28:47] Darmani: I've been able to pass them so far..
[05:29:13] agent_white: We're only furious about your indentation.
[05:29:31] Darmani: Is it that bad? o.o
[05:29:43] Ox0dea: 2 spaces or GTFO.
[05:29:59] Darmani: the text editor does that for me...
[05:30:05] Darmani: I just hit the enter button lol
[05:30:22] Ox0dea: Tell your editor to check its privilege.
[05:31:03] agent_white: check check one two buckle my shoe
[05:31:04] djbkd: has joined #ruby
[05:31:39] Darmani: Well unless someone has an amusing anecdote
[05:31:42] lyoshajapan: has joined #ruby
[05:31:45] Darmani: I'm going back to it.
[05:31:53] agent_white: Darmani: Keep going with Odin if it's something you found and enjoy. :)
[05:32:27] Darmani: I mean... I don't enjoy any of this.
[05:32:40] Darmani: Struggling to program like a fish flopping out of water
[05:32:52] Darmani: I wish I just understood it T.T
[05:32:54] agent_white: What kind of fish?
[05:32:58] Darmani: a flounder
[05:33:04] Ox0dea: Darmani: Destination > journey, you say?
[05:33:21] Darmani: Ox0dea: Whoever said that is a bitch ass nigga son
[05:33:34] Darmani: He took the gravy train towards his destination
[05:33:55] yes`r: has joined #ruby
[05:33:55] Ox0dea: Real talk.
[05:34:13] Darmani: I read that backwards
[05:34:21] Darmani: Destination < Journey
[05:34:36] jamw: has joined #ruby
[05:34:44] Darmani: Ox0dea: I can't even read anymore lol
[05:35:33] lyoshaja_: has joined #ruby
[05:37:14] yfeldblum: has joined #ruby
[05:38:26] Ox0dea: > I wish I just understood it T.T
[05:38:30] Ox0dea: Darmani: I was referring to that.
[05:38:52] Darmani: Ox0dea: Ah.
[05:38:57] Darmani: That makes sense.
[05:41:43] Radar: !kick Darmani This is for the n word.
[05:41:44] ruboto: ruboto kicked Darmani: is for the n word.
[05:41:44] ruboto: -o ruboto
[05:42:07] jackjackdripper: has joined #ruby
[05:42:15] Darmani: has joined #ruby
[05:42:17] darkf: has joined #ruby
[05:42:49] jamw: has joined #ruby
[05:42:56] Darmani: Hi darkf ^^
[05:43:05] domgetter: has joined #ruby
[05:43:10] Radar: wb Darmani
[05:43:14] adgtl: has joined #ruby
[05:43:15] Radar: Please follow the rules.
[05:43:19] agent_white: Darmani: Don't talk to my boo.
[05:43:27] agent_white: darkf: hay :)
[05:43:28] Darmani: Yes sir captain sir @Radar
[05:43:29] Ox0dea: Radar: http://logs.ryanbigg.com/ruby-offtopic?date=2016-01-04#4888956
[05:43:48] Ox0dea: Just something to be aware of, I guess.
[05:44:28] agent_white: Oh boy. The 7beer chat.
[05:44:51] Darmani: I suppose I learned my lesson.
[05:45:12] Ox0dea: Darmani: Be ops; don't be not ops.
[05:45:19] sigurding: has joined #ruby
[05:45:31] Darmani: Ox0dea: The fuck does that mean?
[05:45:32] JamieD: has joined #ruby
[05:45:57] Ox0dea: Darmani: Step 1: Be attractive. Step 2: Don't be unattractive.
[05:46:06] Ox0dea: It was a meme, bro! Do you even Internet?
[05:46:09] Darmani: Step3: Profit????
[05:46:34] Darmani: I didn't recognize that one.
[05:47:26] wolffles: Ox0dea: your a monster tonight, or ive just never noticed it
[05:47:31] tokik: has joined #ruby
[05:47:43] wolffles: :D not jugding just saying
[05:47:44] adgtl_: has joined #ruby
[05:47:55] Ox0dea: wolffles: How do you mean?
[05:48:04] Darmani: wolffles: How so?
[05:48:08] jamw: has joined #ruby
[05:48:10] Ox0dea: wolffles: Please clarify.
[05:48:22] Darmani: wolffles: Please.
[05:48:28] wolffles: with the witty comments
[05:48:42] wolffles: you must be a hit at partys :P
[05:48:50] Darmani: Nah he just took his medication today.
[05:49:32] Ox0dea: wolffles: I don't get it?
[05:49:36] Ox0dea: Wit is monstrous now?
[05:50:02] agent_white: Nah only indirect object... nevermind.
[05:50:29] Darmani: Ox0dea: Well I for one appreciate your wit.
[05:50:33] wolffles: Ox0dea: what dont you get
[05:50:40] wolffles: Ox0dea: please clarify
[05:51:00] Ox0dea: Are you... trolling?
[05:51:06] agent_white: Do... we move this to offtopic?
[05:51:34] kith: has joined #ruby
[05:51:57] wolffles: nah im walffing
[05:52:25] Darmani: ACTION presents wolffles with the trophy for Master Troller
[05:54:01] lolktnxbye: has joined #ruby
[05:54:49] lolktnxbye: newb question. why does the nil? method return false on an empty array? thanks!
[05:55:08] domgetter: lolktnxbye: only nil is nil
[05:55:29] Ox0dea: That said, any object can lie.
[05:55:38] domgetter: an empty array is still a thing. it's an empty bucket. buckets aren't nothing. for example, you can ask a bucket how many things it contains
[05:55:41] domgetter: >> [].length
[05:55:43] ruboto: domgetter # => 0 (https://eval.in/497404)
[05:55:50] domgetter: you cannot ask nil how much is in it
[05:55:53] domgetter: >> nil.length
[05:55:55] ruboto: domgetter # => undefined method `length' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/497405)
[05:56:08] Ox0dea: >> nil.to_i # inserting confusion
[05:56:09] ruboto: Ox0dea # => 0 (https://eval.in/497406)
[05:56:10] agent_white: Not even the NilClass is nil!
[05:56:42] domgetter: well, no blueprint is a house
[05:56:46] kireevco: has joined #ruby
[05:56:46] lolktnxbye: I see. Thanks! Got to take note of that.
[05:56:57] lolktnxbye: domgetter: That makes sense a lot.
[05:57:11] darkf: hello, Darmani, agent_white, what's going on?
[05:57:11] domgetter: lolktnxbye: no problem. glad you learned something :)
[05:57:25] agent_white: darkf: Recovering. You?
[05:57:41] Darmani: Not much man, how are you?
[05:58:24] agent_white: Darmani: You're not a lp'er? How do you know darkf? /confuzzed
[05:58:48] speakingcode: has joined #ruby
[05:58:55] kireevco: is there any standard way to parse out date of that shape: 320/051559, so, sequential day and time
[05:59:07] Darmani: agent_white: I met him in another channel. He helps me when I have questions from time to time.
[05:59:11] Ox0dea: kireevco: Yep.
[05:59:22] domgetter: kireevco: what date is that supposed to be?
[05:59:24] agent_white: Darmani: Nice :)
[05:59:45] Darmani: agent_white: What's an lp'er? o.o
[05:59:49] kireevco: domgetter: 2015-11-17T05:15:59
[05:59:54] agent_white: Darmani: #learnprogramming
[06:00:43] Radar: TIL #learnprogramming is a thing
[06:00:49] Darmani: agent_white: That's where I came from. I've spoken to you there on multiple occasions -___-
[06:01:12] darkf: Darmani: why aren't you there now then? :P
[06:01:14] Ox0dea: kireevco: You want Date.strptime with "%j/%H%M%S" as the format string.
[06:01:20] agent_white: Oh. Well... my memory is transient.
[06:01:23] Darmani: darkf: Lol.....
[06:01:27] Darmani: There are more people here...
[06:01:27] kireevco: alright, thanks everyone
[06:01:36] Darmani: And since I write in Ruby code I figured it would be more helpful.
[06:01:46] kireevco: ~1000ppl here, very nice
[06:02:03] govg: has joined #ruby
[06:02:09] tokik: has joined #ruby
[06:02:39] ta: has joined #ruby
[06:02:44] lacuna: has joined #ruby
[06:02:46] agent_white: Radar: github.com/learnprogramming -- as well. Learntris is a solid guide to refer folks to for learning a new language.
[06:03:39] agent_white: s/guide/challenge/
[06:05:11] shevy: kireevco we briefly were slightly above 1000 some months ago, if I remember correctly \o/
[06:05:54] agent_white: Radar: I believe you've spoken to tangentstorm before in #elixir... he's one of the community founder dudes.
[06:06:01] agent_white: And darkf who's here.
[06:06:02] Radar: agent_white: yup
[06:06:36] Darmani: tangentstorm is???
[06:06:38] Darmani: I had no idea.
[06:09:15] smactive: has joined #ruby
[06:11:06] DavidDudson: has joined #ruby
[06:13:52] astrobun_: has joined #ruby
[06:14:23] weemsledeux: has joined #ruby
[06:15:09] charliesome: has joined #ruby
[06:18:02] bluOxigen: has left #ruby: ()
[06:18:33] wolffles: has joined #ruby
[06:19:13] cdg: has joined #ruby
[06:20:17] dwfait: has joined #ruby
[06:22:49] ElFerna: has joined #ruby
[06:25:59] tkiel: has joined #ruby
[06:26:19] renderful: has joined #ruby
[06:31:20] techsethi: has joined #ruby
[06:31:50] chouhoul_: has joined #ruby
[06:31:52] shevy: something I have not yet seen in ruby code, assumingly this is something from rails: alias Kaderi.{Forum, Topic} https://goo.gl/MIJusY
[06:32:06] shevy: one can redefine or change the behaviour of alias? or is this something that was always possible and I just did not realize
[06:35:03] lxsameer: has joined #ruby
[06:35:38] adgtl: has joined #ruby
[06:36:06] zast: has joined #ruby
[06:36:19] domgetter: shevy: Rails is Ruby and you can change (almost) anything you want.
[06:36:29] bithon: has joined #ruby
[06:36:36] ziyadb: has joined #ruby
[06:36:53] domgetter: >> class Array; def length; 3; end; end; [1,2,3,4].length
[06:36:54] ruboto: domgetter # => 3 (https://eval.in/497408)
[06:37:31] aganov: has joined #ruby
[06:38:34] domgetter: oh wait, you're asking about alias specifically. I should really read before I respond
[06:39:11] tokik: has joined #ruby
[06:39:53] domgetter: shevy that's Elixer code
[06:40:21] skcin7: has joined #ruby
[06:40:58] DonOtreply: has joined #ruby
[06:41:21] bluOxigen_: has joined #ruby
[06:42:58] DarkElement: has joined #ruby
[06:43:25] krz: has joined #ruby
[06:43:26] DarkElement: I need to do a .sub on the last 5 characters of a string. How can I do this? Sorry if it's a stupid question i'm pretty tired
[06:43:59] domgetter: DarkElement: you can do this a couple different ways
[06:44:10] domgetter: >> "hello world"[-5..-1]
[06:44:11] ruboto: domgetter # => "world" (https://eval.in/497411)
[06:44:22] DarkElement: Yea, I did that already
[06:44:30] skcin7: has joined #ruby
[06:44:30] DarkElement: Alllow me to elaborate.
[06:44:33] domgetter: >> "hello world".chars.last(5).join
[06:44:34] ruboto: domgetter # => "world" (https://eval.in/497412)
[06:44:48] sigurding: has joined #ruby
[06:44:58] Ox0dea: >> 'foobarbaz'.sub /.{5}$/, &:upcase # domgetter
[06:44:59] ruboto: Ox0dea # => "foobARBAZ" (https://eval.in/497413)
[06:45:01] Ox0dea: DarkElement: ^
[06:45:15] ta: has joined #ruby
[06:46:09] DarkElement: Like if I have a string "This is a random stringasdjk", I want to be able to do $new_str = $str[-5...-1].sub("asdfj", "")
[06:46:23] Ox0dea: DarkElement: So by "sub" you mean "remove"?
[06:46:42] DarkElement: However when I tried that it just yields the result of the sub, and I need to only execute the sub on the last 5 and not assign the string it's last 5 chars
[06:46:50] DarkElement: Is there a way to do that with sub, perhaps?
[06:47:24] radgeRayden: has joined #ruby
[06:47:34] DarkElement: Sorry Ox0dea, un-ignored. You were saying?
[06:48:07] skcin7: has joined #ruby
[06:48:17] mistermocha: has joined #ruby
[06:48:49] ur5us_: has joined #ruby
[06:49:20] DarkElement: Never mind I cam eup with my own solution
[06:49:23] dionysus69: has joined #ruby
[06:50:16] rkazak_: has joined #ruby
[06:52:48] praveen: has joined #ruby
[06:59:00] claw: has joined #ruby
[06:59:07] yardenbar: has joined #ruby
[07:02:51] haraigo: has joined #ruby
[07:03:29] colegatron: has joined #ruby
[07:03:49] anisha: has joined #ruby
[07:04:16] pawnbox: has joined #ruby
[07:06:29] arup_r: has joined #ruby
[07:08:04] d0nn1e: has joined #ruby
[07:08:30] SOLDIERz: has joined #ruby
[07:10:08] bkxd: has joined #ruby
[07:10:38] UtkarshRay: has joined #ruby
[07:14:50] solars: has joined #ruby
[07:17:34] d0nn1e: has joined #ruby
[07:18:41] blackgoat: has joined #ruby
[07:20:44] lacuna: has joined #ruby
[07:22:35] rippa: has joined #ruby
[07:23:35] ElFerna: has joined #ruby
[07:24:44] devbug: has joined #ruby
[07:25:37] wolffles: has joined #ruby
[07:28:14] user083: has joined #ruby
[07:29:56] bigkevmcd: has joined #ruby
[07:30:05] Anderson69s: has joined #ruby
[07:30:42] ur5us: has joined #ruby
[07:31:49] jbrhbr: has joined #ruby
[07:32:33] gagrio: has joined #ruby
[07:33:16] mdw: has joined #ruby
[07:33:19] anisha: has joined #ruby
[07:35:22] shevy: domgetter ohh I am dumb, ok
[07:35:55] domgetter: lol yea I saw "defmodule" and thought "wait a minute..."
[07:35:57] shevy: I got all excited for a moment to fancy-play with alias in new ways!
[07:36:10] shevy: hehe I thought it was some custom extension by rails... but rails is absolutely innocent there
[07:36:29] shevy: quite interesting to see more ruby-syntax-like languages... elixir... crystal...
[07:37:20] agent_white: Poking through the ruby source...
[07:37:23] agent_white: http://explodingdog.com/title/ialreadyknewdragonswerereal.html
[07:39:02] shevy: that's really in the ruby source?
[07:39:31] anisha_: has joined #ruby
[07:39:42] cornerma1: has joined #ruby
[07:40:41] Ox0dea: http://explodingdog.com/title/youhavenoidea.html
[07:42:49] mdw: has joined #ruby
[07:44:39] jackjackdripper: has joined #ruby
[07:45:29] adgtl: has joined #ruby
[07:46:20] anisha: has joined #ruby
[07:47:31] adgtl_: has joined #ruby
[07:48:57] karapetyan: has joined #ruby
[07:49:47] finisherr: has joined #ruby
[07:50:40] solocshaw: has joined #ruby
[07:52:28] codecop: has joined #ruby
[07:56:29] agent_white: has joined #ruby
[08:00:42] sandstrom: has joined #ruby
[08:02:10] krz: has joined #ruby
[08:02:44] dwfait: has joined #ruby
[08:03:14] firstdayonthejob: has joined #ruby
[08:04:36] TomyWork: has joined #ruby
[08:04:57] norc: has joined #ruby
[08:05:14] norc: Good morning. Im getting a bizarre build error for my ruby-oci8 gem: https://gist.github.com/anonymous/a456813d1f5147aae68f
[08:05:26] djbkd: has joined #ruby
[08:05:36] norc: This happened as I switched from my old rbenv 2.2.3 installation to a ruby-install provided ruby 2.3 with chruby.
[08:05:59] norc: The thing that is confusing me is the build options, passing my OSX Ruby in configure flags.
[08:07:05] apeiros: hi norc, sufferer in kind :D (is there a proper english idiom for this?)
[08:07:41] Zamerick: has joined #ruby
[08:07:45] norc: Well there is "partners in crime". But I'm afraid that is not even close to being what you mean. :-)
[08:08:05] norc: Oh heck I remember.
[08:08:07] apeiros: since we're the victims???
[08:08:12] Ox0dea: apeiros: http://www.dictionaryofobscuresorrows.com/
[08:08:17] norc: apeiros: Can you pass me the link to your reported bug again?
[08:08:18] Ox0dea: Should be something in there like that.
[08:08:20] agent_white: apeiros: Slang term is "I feel you"... meaning 'I understand your feelings'
[08:08:34] Ox0dea: apeiros: "Commiseration" is a thing.
[08:08:52] Ox0dea: I feel you.
[08:09:10] pawnbox: has joined #ruby
[08:09:16] Ox0dea: ACTION retracts feelers
[08:09:31] agent_white: http://explodingdog.com/title/dontworrywellfigureitout.html
[08:09:40] apeiros: norc: mine was different. compiling worked fine. but sure, gimme a sec.
[08:10:00] Ox0dea: agent_white: *single tear*
[08:10:00] norc: Ox0dea: Congratulations. I now picture you as an andorian.
[08:10:15] apeiros: norc: https://github.com/kubo/ruby-oci8/issues/111
[08:10:24] agent_white: Ox0dea: -of bravery!
[08:10:39] bkxd: has joined #ruby
[08:10:45] SCHAAP137: has joined #ruby
[08:11:20] pawnbox_: has joined #ruby
[08:11:30] apeiros: agent_white: lol @ we'll figure it out - humanity in a nutshell.
[08:11:33] Ox0dea: norc: It is impossible to say "acceptable" in a French accent on the IRC, but I tried.
[08:11:49] agent_white: apeiros: My programming experience thus far, as well. :)
[08:12:05] apeiros: sun = deadline or something?
[08:12:14] norc: apeiros: Yeah that is a different thing. Im still amazed by error message here. "Could not compile with Oracle instant client".
[08:12:18] arup_r: has joined #ruby
[08:12:28] norc: That is just stating the obvious.
[08:12:31] Ox0dea: apeiros: I think those are flames?
[08:12:39] agent_white: apeiros: The unknown! When deadlines are unmet... http://explodingdog.com/title/thatsnothowitgoes.html
[08:12:49] apeiros: norc: I'd probably locate all oci.h's, delete all instant clients and reinstall
[08:12:59] norc: apeiros: This looks more rubygems related.
[08:13:03] apeiros: and after that - file an issue there. they're pretty good. but sometimes it takes a couple of days.
[08:13:21] norc: apeiros: I mean it looks like it's trying to use my Ruby 2.0 from OSX for no apparent reason.
[08:13:38] pawnbox_: has joined #ruby
[08:13:44] apeiros: you mean because of `/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb`?
[08:14:05] norc: apeiros: Or the explicit --ruby flag being passed.
[08:14:15] norc: I mean Im not sure whether that is the actual cause here, but its unsettling still.
[08:14:18] howdoi: has joined #ruby
[08:14:23] apeiros: indeed, looks weird
[08:14:34] apeiros: if I wasn't so afraid of breaking something, I'd try with my work laptop
[08:16:40] agent_white: apeiros: http://gfycat.com/DeadSorrowfulFennecfox
[08:16:48] agent_white: erm... http://explodingdog.com/title/trustme2010.html
[08:17:45] norc: apeiros: Alright this is even more bizarre now. Apparently I still had a left over jruby in my PATH at the _end_... removing it magically fixed it.
[08:17:54] norc: ACTION scratches his head
[08:18:14] norc: Im not sure how a jruby at the end of my path causes chruby to use my OSX Ruby, but fine.
[08:18:16] apeiros: bizarre seems to capture that pretty well
[08:18:19] norc: Im just happy it works. :-)
[08:19:38] duncannz: has joined #ruby
[08:20:23] duncannz: has joined #ruby
[08:21:03] norc: At least now I can &. all around in my Ruby. That should be fun.
[08:21:12] terlar: has joined #ruby
[08:22:22] praveen: has joined #ruby
[08:24:30] El3ktra: has joined #ruby
[08:24:36] ElFerna: has joined #ruby
[08:24:41] Ox0dea: norc: &.!=, even.
[08:24:42] El3ktra: has left #ruby: ()
[08:24:51] Ox0dea: http://aaronlasseigne.com/2016/01/04/rubys-new-safe-navigation-not-equal-operator/
[08:24:57] aufi: has joined #ruby
[08:25:04] craysiii: has joined #ruby
[08:25:41] roshanavand: has joined #ruby
[08:28:26] craysiii: has joined #ruby
[08:31:51] tulak: has joined #ruby
[08:32:55] pawnbox: has joined #ruby
[08:34:33] charliesome: has joined #ruby
[08:34:37] praveen: has joined #ruby
[08:35:43] einarj: has joined #ruby
[08:36:07] krz: has joined #ruby
[08:36:39] DEA7TH: has joined #ruby
[08:37:14] steffkes: has joined #ruby
[08:37:15] steffkes: has joined #ruby
[08:37:58] Ox0dea: >> 3.cheers_for(apeiros) if RUBY_VERSION == '2.3.0'
[08:37:59] ruboto: Ox0dea # => nil (https://eval.in/497444)
[08:38:01] charliesome: has joined #ruby
[08:39:36] roshanav_: has joined #ruby
[08:39:57] apeiros: I hope ruby's &. does not become the equivalent of php's @
[08:40:12] apeiros: (but they're structurally quite different, so chances are it won't)
[08:40:15] Ox0dea: @ is the nuclear option.
[08:40:25] andikr: has joined #ruby
[08:40:29] mdw: has joined #ruby
[08:41:00] raz: has joined #ruby
[08:41:16] norc: Considering how Ruby seems to behave, auto vivifying ivars, I can see that coming.
[08:41:29] tokik: has joined #ruby
[08:41:44] DEA7TH: In irb, how can I declare global variables which can be accessed inside global functions? This works in Python, I thought it worked in irb too.
[08:41:48] norc: Until yesterday I never gave much thought to this particular behavior...
[08:41:55] Ox0dea: The PHP community never really took to giving their operators cute names, but I think @ would've been called the "Nike operator".
[08:41:59] apeiros: non-raising constant reassignment and auto-vivifying ivars are some of my ruby pet peeves
[08:42:12] raz: hmm.. i'm feeling stupid.. why does this expression give a syntax error? puts (n * (n + 1) / 2) ??? ((a - 1) * a / 2)
[08:42:15] apeiros: DEA7TH: $vars are global
[08:42:15] norc: DEA7TH: If you want to have state, chances are you want a module or a class.
[08:42:20] apeiros: DEA7TH: but generally you don't want that
[08:42:30] DEA7TH: I know it's just a small script with 1 global in total
[08:42:40] norc: DEA7TH: Put it inside a module then.
[08:43:10] apeiros: Ox0dea: not the "shut the f up" operator?
[08:43:12] DEA7TH: Ruby had a dollar operator and I didn't even know about it? Heh. It works anyway.
[08:43:21] norc: DEA7TH: Don't use it. Use a module, really.
[08:43:21] apeiros: DEA7TH: it's not an operator
[08:43:33] mark2: has joined #ruby
[08:43:41] norc: Some things really don't belong into Ruby. Custom globals are one of them. :-
[08:43:41] apeiros: and +1 to norc - better learn how to properly do it.
[08:43:45] karapetyan: has joined #ruby
[08:43:46] Ox0dea: apeiros: "Just Do It".
[08:43:47] futilegames: has joined #ruby
[08:43:48] krzkrz: has joined #ruby
[08:43:51] DEA7TH: norc: It's throwaway code for a signle task, 5-15 lines in total. Globals are made for this use case.
[08:44:02] Ox0dea: raz: That's really weird.
[08:44:12] apeiros: Ox0dea: got that, but it's a misnomer since it won't make it do it any more than without :)
[08:44:33] Ox0dea: apeiros: The focus is on the absence of complaint.
[08:44:38] raz: Ox0dea: tell me more! :D i tried a few things, but it just leaves me baffled (e.g. if you split at the - into two expressions, they both run fine)
[08:44:44] norc: DEA7TH: I think globals just exist for historical reasons.
[08:45:01] apeiros: raz: it's a bad idea to have a method call with a paren a space away
[08:45:08] Ox0dea: raz: I... it might be a bug? I don't see why the parser should have trouble disambiguating.
[08:45:23] raz: apeiros: well it's a simple formula... i don't know why the parser has trouble with it?
[08:45:24] Ox0dea: >> (n * (n + 1) / 2) ??? ((a - 1) * a / 2) # apeiros
[08:45:24] ruboto: Ox0dea # => /tmp/execpad-972909647755/source-972909647755:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/497445)
[08:45:38] norc: Can ruboto execute with -y ?
[08:45:51] Ox0dea: It looks like a parser bug.
[08:46:44] apeiros: ok, seems indeed unrelated to having issues with args vs. other parens
[08:46:48] antgel: has joined #ruby
[08:47:03] norc: Ox0dea: Does it?
[08:47:05] apeiros: and it's not confused about // being a regex either
[08:47:10] norc: What is this character: ???
[08:47:27] apeiros: yeah, ??? vs -
[08:47:31] apeiros: well spotted norc :)
[08:47:32] raz: ohhhhhhhhhhhh
[08:47:46] raz: that's what you get for copy pasting from websites
[08:47:57] norc: apeiros: The advantage of getting familiar with ruby -y :-)
[08:48:10] apeiros: note that it's still a bad idea to put a space between parenthesized args and method name ;-)
[08:48:21] raz: thanks guys... lol.. sorry about this
[08:48:37] apeiros: norc: interesting flag. gotta take a look at it.
[08:48:58] apeiros: related to your question of understanding ruby parsing process?
[08:49:07] raz: apeiros: well in principle you are right. but i don't see why i should format math formulas weirdly just to please ruby ;)
[08:49:34] apeiros: raz: you don't have to. just either put a proper arg paren around the whole or don't have a paren at all.
[08:49:37] norc: raz: It's to please people who read your code (which might be yourself)
[08:49:59] apeiros: and yes, yes, you will have to please syntax rules of whichever language you're writing in.
[08:50:08] norc: raz: The only few times when you have to please the parser is when you try to leave too many fcall parens away. The Ruby parser quickly chokes on that.
[08:50:08] apeiros: unless of course you don't care about the outcome.
[08:50:12] raz: apeiros: hm, bit confused right now, how exactly would you rewrite it? (n * (n + 1) / 2) ??? ((a - 1) * a / 2)
[08:50:23] norc: raz: Again. ??? is not -
[08:50:29] apeiros: raz: `puts (` <- bad
[08:50:32] norc: - is an operator, ??? is an identifier.
[08:50:34] apeiros: raz: `puts(` <- correct
[08:50:49] apeiros: ruby will (sadly) try to figure out what you meant, but it won't always get it right.
[08:51:03] Anderson69s_Deb: has joined #ruby
[08:51:11] raz: norc: sorry, still had the bad version in the clipboard
[08:51:25] apeiros: norc: they referred to my "space before paren" thingy
[08:51:47] TheHodge: has joined #ruby
[08:52:00] raz: apeiros: ah, gotcha.. well.. yea bad habit maybe. i just never use parents for puts.
[08:52:07] raz: jesus, today is not my irc day ;)
[08:52:14] norc: >> (a) b
[08:52:15] ruboto: norc # => /tmp/execpad-14860bfa19ea/source-14860bfa19ea:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/497452)
[08:52:15] apeiros: so the way I'd write it is: `puts((n * (n + 1) / 2) - ((a - 1) * a / 2))`
[08:52:23] norc: This is basically what that original parser error boiled down to by the way.
[08:52:59] raz: well, whoever puts code or formulas on their website and lets a "beautifier" mangle them should be tarred and feathered anyway
[08:53:45] Ox0dea: Seconded.
[08:54:30] raz: has bitte me often enough that i 'm just tempted to write a keyboard maestro "clipboard unmangler" or such
[08:54:39] raz: well, bucket list 2016...
[08:56:11] dfdfdf: has joined #ruby
[08:56:21] Sembei: has joined #ruby
[09:00:28] apeiros: raz: beautifier is ok, as long as there's a "raw" button which has it in plaintext
[09:00:54] apeiros: or better yet, a copy button. less annoying anyways. sad thing is just that that won't work without flash across browsers :(
[09:01:13] raz: well.. guess so.. but i never want to look at "beautified code" anyway
[09:01:23] raz: beautifier is fine for blog text.. but code is code
[09:01:35] apeiros: replacing a - with a ??? is just wrong, though :)
[09:02:31] norc: Ox0dea: Don't second it. Here we should advocate mindless use of rubocop. Let beautifies and code static code analyzers improve code styles. Who are we to meddle with the machines of today.
[09:02:52] Ox0dea: Somebody wants `rubyfmt`.
[09:02:57] Ox0dea: It isn't me.
[09:03:49] raz: yeh i'm a bit wary about that new magical comments stuff
[09:03:50] Ox0dea: That's not to say we shouldn't give the machines their due, mind.
[09:05:06] ur5us: has joined #ruby
[09:05:31] raz: ACTION wonders if 2016 will be the year when 'gem install' won't take minutes anymore...
[09:06:22] norc: raz: It shouldn't take more than a few seconds for most gems. What are you trying to install?
[09:06:32] norc: raz: Also, skip rdoc/ri if you want to seriously speed things up.
[09:07:02] norc: Aside from gems building native extensions, that is how gem spends most of its time.
[09:07:07] DoubleMalt: has joined #ruby
[09:07:21] raz: norc: doesn't matter what. yes i know about nordoc/nori. rubygems is just slow far beyond the point of ridiculousness.
[09:07:56] Ox0dea: Could be network or potato issues.
[09:07:57] raz: our Rails Gemfile takes upwards of 5min to install..
[09:08:09] raz: not the network. fastly is fast
[09:08:14] norc: raz: I cannot share that opinion. It took me a fair 45s to install my entire gem dependencies for one of our larger Rails applications. Half of that was spent in the compiler.
[09:08:26] ddv: raz: so?
[09:08:33] norc: And that was a total of maybe 200 gems?
[09:08:39] norc: Which is pretty fast.
[09:09:02] raz: norc: seems unlikely tbh, then again, npm would've probably done it in 5s ;)
[09:09:45] Ox0dea: raz: Y U DO DIS? Our granary is so far away.
[09:09:54] Ox0dea: I didn't realize we were running so low.
[09:09:57] chthon: has joined #ruby
[09:10:03] raz: oh just to rub it, i launched a random gem install
[09:10:09] raz: i'll let you know when it finishes :P
[09:10:18] raz: $ time gem install --no-rdoc --no-ri activerecord
[09:10:23] raz: real 0m22.872s
[09:10:30] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[09:10:48] raz: so yea, maybe it can do 200 gems in 45s, too.. for me it takes 23 for one :P
[09:11:08] norc: raz: Maybe you should replace your acoustic coupler with a post-soviet CPE device. :-)
[09:11:36] raz: norc: i'm on a latest gen macbook and 100MBit/s DSL in germany, thank you :P
[09:11:56] norc: That is mighty slow.
[09:12:20] raz: curious now, what timing do you get for the above command?
[09:12:23] Ox0dea: raz: You don't strike me as the kinda feller what seeds back to >=2x, but maybe that's the problem?
[09:13:09] norc: raz: Albeit I didn't include rails components in my measurement, since they are installed by default, I install that package in: real 0m3.059s
[09:13:17] dwfait: gem install --no-rdoc --no-ri activerecord 0.81s user 0.20s system 23% cpu 4.386 total
[09:13:32] raz: you guys already had the deps installed didn't you
[09:13:57] raz: ACTION should have picked a more obscure gem
[09:14:07] Ox0dea: These guys and their real-world scenarios, amirite?
[09:14:47] startupality: has joined #ruby
[09:14:53] norc: raz: Go pick obscure gems. We like those more anyway.
[09:14:57] raz: heh, you say that as if 3s was an acceptable latency to install 3kb of code ;)
[09:15:09] sandstrom: has joined #ruby
[09:15:18] norc: raz: If it uses Fiddle and ObjectSpace, you might even peek Ox0dea's curiosity. and mine.
[09:15:41] Ox0dea: norc: *pique
[09:15:44] Ox0dea: It's a good word.
[09:16:07] norc: Oh. I typed without looking. :-)
[09:16:23] raz: well, i rest my case for now :P
[09:16:54] Ox0dea: People "rest their cases" when they've constructed a solid foundation on which to do so.
[09:17:14] raz: it was argued that 3s is an acceptable latency to install a gem. can't argue with denial ;)
[09:17:37] norc: raz: Honestly, I used Gentoo for a while. After 3s for a package is lightning fast.
[09:17:45] norc: *After that.
[09:17:50] Ox0dea: Can't argue with masochism.
[09:17:53] raz: can argue with gentoo even less!
[09:18:02] norc: Just did.
[09:19:06] Ox0dea: raz: https://youtu.be/_HozBKiWGsQ
[09:19:34] norc: I honestly had that situation where a buddy wanted to come over to watch a movie, and I had to tell him "Next week. Next couple days my computer is busy compiling X11 and Firefox".
[09:19:51] blackgoat: has joined #ruby
[09:19:57] norc: At the time I didn't even consider that it was pretty retarded...
[09:20:08] Ox0dea: I bet you did, though.
[09:20:20] ta: has joined #ruby
[09:20:28] raz: so for fun, activerecord-4.2.5.gem is 325kb. it takes 0m0.006s to unzip here. so, i'd say 0.006s + 0.1s network latency = 0.106s would be an acceptable latency for a gem install.
[09:20:49] raz: and i'm being generous with the network here :P
[09:21:03] norc: Well. You are right, I did. And I concluded that it was worth it, since you got an optimized build... but I was just a kid back then and felt pretty cool about my monitor showing compiler output all day long.
[09:21:28] techsethi: has joined #ruby
[09:22:02] norc: raz: Rubygems does more than just fetch and unzip. But just a bit. ;-)
[09:22:18] raz: norc: yes, and very, very poorly :/
[09:22:43] norc: raz: I couldn't tell, since I don't know what that exactly is, and why that would be considered poor.
[09:22:58] raz: i'll just stop ranting already. be glad you don't. :)
[09:23:31] norc: raz: Feel free to enlighten me then.
[09:23:31] Ox0dea: >> "#{%w[good great awesome best perfect].sample} idea"
[09:23:32] ruboto: Ox0dea # => "great idea" (https://eval.in/497482)
[09:23:55] drptbl: has joined #ruby
[09:24:05] Ox0dea: I forgot to put a bullet in the chamber.
[09:25:10] norc: So I have this rather expensive piece of proprietary software here. The developers thought it would look cool and modern to store the session id in HTML5 local storage. Can someone here think of an elegant way to tell them about their stupidity?
[09:25:37] ElFerna: has joined #ruby
[09:26:20] shevy: raz I always wanted a variant of gentoo but with ruby rather than portage
[09:26:22] raz: that's probably not the kind of persistence they were looking for... :P
[09:26:31] norc: The issue is not the persistence...
[09:26:44] Guest88361: has joined #ruby
[09:26:52] shevy: gem installation can be quite slow, especially when you also include documentation, but you can keep local copies, and then install from there
[09:26:54] domgetter: norc: explain that what they've done is the equivalent of a bank giving the other key to the lockbox to the customer for safe keeping
[09:27:58] roshanavand: has joined #ruby
[09:28:13] norc: Wait correction. I meant to write session storage there.
[09:28:20] raz: shevy: yea it's just a ball on a chain. npm, go etc. just install in split seconds. and then its ruby's turn and you go make a coffee...
[09:28:45] waka: has joined #ruby
[09:28:56] domgetter: norc: oh then tell them theyve locked the key in the lockbox
[09:29:08] dn`: has joined #ruby
[09:29:11] Ox0dea: norc: When you came pulling in here, did you notice the sign out in front of my house that said "HTML5 localStorage"?
[09:29:19] mdw: has joined #ruby
[09:29:29] norc: Sweet. That works.
[09:31:29] norc: domgetter: The iceberg went a lot bigger when they reimplemented SHA with their own modifications for HMAC that is used in various places. That was quite amusing to look at last week.
[09:31:46] Xentil: has joined #ruby
[09:32:09] domgetter: norc: I'll bet there's a Mr. Bean sketch of a very similar problem
[09:32:40] domgetter: he often did the "saw off the branch you're sitting on" kind of humor
[09:33:18] raz: reimplemented SHA...
[09:33:37] raz: that's right from the book of great ideas
[09:33:47] huyderman: has joined #ruby
[09:34:11] raz: wouldn't trust an existing impl with my precious HMACs either
[09:35:11] domgetter: They'd better build their own cpu, just in case
[09:35:28] yfeldblum: has joined #ruby
[09:37:21] norc: raz: The reason security related companies do this is often: "It is more likely that someone will break the well known encryption, than someone to scrape off the top of a chip, delete fuse bits with uv light, and reverse engineer your custom implementation on your chip"
[09:37:46] raz: norc: um.
[09:37:59] norc: They usually rely on keeping that modification secret.
[09:38:15] norc: Which is a bit silly, because reverse engineering your implementation is usually much easier. :-)
[09:38:23] raz: ACTION tries to decide how many levels of wrong that idea stacks
[09:38:51] waka: has joined #ruby
[09:39:36] norc: raz: Just consider how Enigma was rendered useless by politicians who didn't know anything about encryption or mathematics. It's the same story probably, people with power but no knowledge trying to influence things.
[09:39:42] norc: On encryption that tends to end badly.
[09:40:17] Ox0dea: Some worlds just want to watch the people burn.
[09:40:20] raz: there's a fairly simple rule about crypto code. don't write it.
[09:40:39] raz: if you were one of the few people who are qualified to write it, you'd know.
[09:40:48] MahaDev: has joined #ruby
[09:41:29] raz: and if you think mucking with SHA is a sensible thing to do, well. refer to the one rule. :P
[09:42:26] Ox0dea: Are we talking about SHA-1, then?
[09:42:42] antgel: has joined #ruby
[09:44:12] raz: don't see why you would patch any of them
[09:44:23] karapetyan: has joined #ruby
[09:44:51] domgetter: they wanted to make it a little more random
[09:45:50] startupality: has joined #ruby
[09:46:12] pawnbox: has joined #ruby
[09:46:12] Ox0dea: Cryptographic security peaked with memfrob(3), imo.
[09:48:16] pawnbox: has joined #ruby
[09:50:12] futilegames: has joined #ruby
[09:50:24] abkabkabk: has joined #ruby
[09:51:49] abkabkabk: can someone tell me what this recursion is doing? paste: https://jsfiddle.net/xf4ugc6p/
[09:52:12] apeiros: jsfiddle for ruby?
[09:53:06] apeiros: it seems to be a reinvention of rails' Hash#symbolize_keys
[09:53:08] abkabkabk: idk where to paste ;x
[09:53:31] apeiros: always a good idea when joining a channel :-p
[09:54:02] domgetter: abkabkabk: it seems to take a nested hash and convert all its keys, including the nested ones, to symbols
[09:54:27] domgetter: hence "optimizing" it
[09:54:31] adgtl: has joined #ruby
[09:54:51] agent_white: has joined #ruby
[09:54:56] abkabkabk: whats a symbol
[09:54:59] abkabkabk: sry n00b questions
[09:55:06] apeiros: >> :this.class
[09:55:07] ruboto: apeiros # => Symbol (https://eval.in/497504)
[09:55:15] apeiros: >> "not this".class
[09:55:17] ruboto: apeiros # => String (https://eval.in/497505)
[09:55:24] domgetter: {"name" => {"first" => "Jim", "last" => "Smith"}} --> {name: {first: "Jim", last: "Smith"}}
[09:55:50] domgetter: abkabkabk: a symbol is kinda like a string but more efficient
[09:55:51] apeiros: symbols are used internally by ruby to identify all things with a name (methods, ivars, lvars etc.)
[09:56:08] livcd: I am going to build a cli todo tool. What would be the "best" approach to take. Obviously there are dozens of such tools on github but I'd like to ask here first
[09:56:13] apeiros: and hence they're built to be fast for all identification purposes.
[09:56:31] shevy: livcd as awful as it is, I'd recommend to start with optionparser until you want to take an alternative lateron
[09:56:36] apeiros: livcd: the old "how do I write a game" question. this is out of scope of this channel.
[09:56:40] domgetter: (and super-duper internally, symbols are integers, so they're super fast n stuff)
[09:56:52] apeiros: livcd: break your question down into answerable questions please.
[09:56:59] livcd: apeiros: ok
[09:57:22] shevy: livcd afterwards just add on elements that you feel have to be included into a todo script; I assume being able to designate different files, toggle behaviour, autogenerate some code based on that etc...
[09:57:33] marr: has joined #ruby
[09:57:55] livcd: shevy: so why is optionparser awful and what is the alternative you would recommend ?
[09:57:57] shevy: I mostly just use local textfiles in a single directory called todo/ :)
[09:58:02] domgetter: livcd: the "thor" gem can be used to make a cli tool. of course, there might be others
[09:58:12] livcd: ah yeah i have heard about thor gem
[09:58:49] shevy: livcd I dunno, I just can't stand the API really, others have less of a problem here http://docs.ruby-lang.org/en/2.2.0/OptionParser.html - there is a reason why you have alternatives such as slop or thor though
[09:58:54] livcd: i mean i could perhaps glue it together that would not be a problem. I think i'd like some key/value store maybe some sqlite
[09:59:48] Anderson69s_Deb: has joined #ruby
[09:59:57] shevy: sounds trivial
[10:00:09] shevy: perhaps you can even use sequel
[10:00:29] lkba_: has joined #ruby
[10:01:18] Ishido: has joined #ruby
[10:01:39] waka: has joined #ruby
[10:02:06] karapetyan: has joined #ruby
[10:02:18] trautwein: has joined #ruby
[10:02:35] livcd: shevy: well i hope it's trivial :-))
[10:03:27] anisha: has joined #ruby
[10:03:44] livcd: I am concerned about how do I compose things..If I'll have a single class with many methods or a module with dozens of classes. I'd like to keep it small but be able to add "bloat" incrementally
[10:03:53] roshanavand: has joined #ruby
[10:04:14] livcd: maybe i should read about some design patterns or finally JDI
[10:05:11] rdark: has joined #ruby
[10:05:29] matp: has joined #ruby
[10:05:58] rodfersou: has joined #ruby
[10:05:59] shevy: start with a single class anyway
[10:11:02] DEA7TH: Ruby has no sum method? I have to do [1,2,3].reduce(:+) ?
[10:11:28] bkxd: has joined #ruby
[10:11:33] karapetyan: has joined #ruby
[10:11:47] tvw: has joined #ruby
[10:12:59] radgeRayden: has joined #ruby
[10:13:04] vikas027: has joined #ruby
[10:13:17] cmolenda: has joined #ruby
[10:13:26] Ox0dea: >> [].reduce(:+) # DEA7TH
[10:13:27] ruboto: Ox0dea # => nil (https://eval.in/497513)
[10:13:34] Ox0dea: Something to keep in mind, probably.
[10:14:02] domgetter: gotta pass that default
[10:14:34] shevy: DEA7TH you could of course add a sum() method to do this
[10:14:40] DEA7TH: yeah my bad, I meant [1,2,3].reduce(0, :+)
[10:15:19] Ox0dea: I have a face! http://i.imgur.com/YJcU5t5.jpg
[10:16:08] Ox0dea: Google Images thinks I'm Greek.
[10:16:25] Zarthus: It made that association because you look like a god.
[10:18:28] domgetter: can you make a variadic lambda to pass to reduce?
[10:18:43] domgetter: or do you have to use a default in the parameter listing?
[10:18:50] domgetter: (other than writing my own reduce)
[10:18:53] blackgoat: has joined #ruby
[10:19:11] tvw: has joined #ruby
[10:19:17] adgtl_: has joined #ruby
[10:19:43] antgel: has joined #ruby
[10:20:44] shevy: hmm what is a variadic lambda
[10:21:10] shevy: you can pass it via &foo probably and then use .call
[10:21:46] Ox0dea: domgetter: It's difficult to think of a valid use case.
[10:22:27] Ox0dea: Often with #reduce, you need to do some explicit grouping anyway (`|a, (b, c)|`), for which the &:foo sugar isn't sufficient.
[10:22:33] domgetter: Ox0dea: so that I don't have to pass a default value to reduce, and I can keep that information in the reduction function
[10:22:45] pawnbox: has joined #ruby
[10:22:58] Ox0dea: domgetter: It's not a default, it's an initializer.
[10:23:00] tuor: has left #ruby: ("WeeChat 1.3")
[10:23:07] domgetter: [].reduce(&sum) doesn't even try to call sum, so it returns nil
[10:23:15] Ox0dea: >> [1,2,3].reduce(6, :+) # domgetter
[10:23:16] ruboto: Ox0dea # => 12 (https://eval.in/497519)
[10:23:24] domgetter: seed, default, initializer, whatever you want to call it
[10:23:47] roshanav_: has joined #ruby
[10:23:48] Ox0dea: Ah, I see what you're going for.
[10:23:57] domgetter: consider [].reduce("", &concat)
[10:24:06] pawnbox: has joined #ruby
[10:24:13] domgetter: it'd be nice if concat had the info that nothing passed in returns an empty string
[10:24:22] Ox0dea: That works, though?
[10:24:27] domgetter: 6 of one, half dozen of the other I suppose
[10:24:46] domgetter: I meant that I would like to write [].reduce(&concat) and get "" back
[10:25:33] pawnbox: has joined #ruby
[10:26:38] ElFerna: has joined #ruby
[10:26:44] arup_r: has joined #ruby
[10:27:12] Ox0dea: You would indeed have to write your own. :/
[10:27:15] blackmesa: has joined #ruby
[10:27:30] domgetter: >> [].reduce(&->acc,e{raise "boom"})
[10:27:31] ruboto: domgetter # => nil (https://eval.in/497551)
[10:27:35] domgetter: >> [0].reduce(&->acc,e{raise "boom"})
[10:27:36] ruboto: domgetter # => 0 (https://eval.in/497552)
[10:27:47] Ox0dea: It's an optimization. :)
[10:28:20] Ox0dea: https://github.com/ruby/ruby/blob/trunk/enum.c#L31-L32
[10:29:47] mdw: has joined #ruby
[10:31:33] domgetter: It's all Matz's fault! https://github.com/ruby/ruby/commit/54cf2fca17f6252b7144ed9ed0118fae95d8bafa
[10:31:47] ur5us: has joined #ruby
[10:38:00] tulak: has joined #ruby
[10:38:02] FernandoBasso: has joined #ruby
[10:38:08] devbug: has joined #ruby
[10:39:35] techsethi: has joined #ruby
[10:41:36] antgel: has joined #ruby
[10:43:16] aef: has joined #ruby
[10:43:47] DEA7TH: 1550 lines of code in a single file - shouldn't that be split in multiple files (unless most of them are comments)?
[10:44:02] DEA7TH: I find it hard to scroll through >1000 lines of code, even maybe >600-700
[10:44:14] dwfait: Oh boy, nobody show him gc.c
[10:44:29] tulak: has joined #ruby
[10:45:07] Ox0dea: 11578 parse.y
[10:45:10] dwfait: only by a couple of thousand
[10:45:18] dwfait: and that's mostly BNF definitions
[10:45:42] Ox0dea: May he rest.
[10:46:27] Ox0dea: dwfait: There's... quite a bit of actual code in the parser.
[10:47:04] araujo: has joined #ruby
[10:47:05] araujo: has joined #ruby
[10:47:10] dwfait: yeah, just looking through now. I overestimated the bison defs
[10:47:18] Ox0dea: It's also double the size it "needs" to be on account of Ripper.
[10:47:57] dwfait: is ripper that useful to have to maintain two parsing code bases essentially?
[10:48:25] araujo: has joined #ruby
[10:48:34] Ox0dea: Considering them two separate entities would be unkind.
[10:48:43] Ox0dea: It's a bodge, but it works.
[10:49:00] yorickpeterse: dwfait: you forget the part where there's a ton of Symbol code in parse.y
[10:49:00] DEA7TH: yeah, >10k lines of code. I remember that the Ruby build Bash script was like 30k loc. Shouldn't it be split into multiple files?
[10:49:08] Ishido: has joined #ruby
[10:49:36] dwfait: if you're talking about configure, that's an auto-generated file
[10:49:36] Ox0dea: DEA7TH: nobu and Koichi seem to manage?
[10:49:46] Ox0dea: (Ignore the bus factor of <10.)
[10:50:09] DEA7TH: Ox0dea: maybe that way they will... manage better?
[10:50:27] DEA7TH: I'm testing my conceptions of what constitutes good code, I thought this was a correct assumption
[10:50:40] DEA7TH: would be useful to know if I'm wrong
[10:50:46] araujo: has joined #ruby
[10:50:55] Ox0dea: DEA7TH: Ruby is old.
[10:51:18] dwfait: Take a look at the Git sourcecode if you want a trip
[10:51:35] startupality: has joined #ruby
[10:51:46] dwfait: It's a different world really
[10:52:09] dwfait: with a different toolbag for creating abstractions
[10:52:11] mistermocha: has joined #ruby
[10:52:16] Ox0dea: DEA7TH: It's true enough that string.c could be split out into its own directory, but to what gain? at what cost?
[10:52:44] DEA7TH: Ox0dea: easier to find what you're looking for?
[10:52:49] Ox0dea: DEA7TH: ctags + a decent editor
[10:52:51] araujo: has joined #ruby
[10:53:26] DEA7TH: therefore my belief might be wrong.
[10:54:18] trautwein: has joined #ruby
[10:55:18] dwfait: ctags sometimes fails in some places, for example idSize, which is generated at compile time from the makefiles
[10:55:40] dwfait: (though there really isn't a solution for that I guess)
[10:55:46] roshanavand: has joined #ruby
[10:56:15] roshanavand: has joined #ruby
[10:56:38] snowy: has joined #ruby
[10:58:07] dwfait: though TIL that ctags matches cucumber step definitions fairly well, which is pretty nice
[11:00:39] praveen: has joined #ruby
[11:01:08] pawnbox: has joined #ruby
[11:03:01] karapety_: has joined #ruby
[11:03:40] skade: has joined #ruby
[11:06:09] Mon_Ouie: has joined #ruby
[11:08:46] pawnbox: has joined #ruby
[11:09:36] prestorium: has joined #ruby
[11:10:32] ddv: why even using cucumber
[11:12:45] yorickpeterse: because it lets non developers write tests!
[11:15:40] anisha: has joined #ruby
[11:15:49] dlitvak: has joined #ruby
[11:17:00] domgetter: use it as a shiny distraction for those micromanagers
[11:18:53] Ropeney_: has joined #ruby
[11:19:09] anisha: has joined #ruby
[11:20:39] rickmasta: has joined #ruby
[11:21:38] shevy: cucumber also has a tasty sound
[11:21:49] araujo: has joined #ruby
[11:21:49] araujo: has joined #ruby
[11:22:03] platzhirsch: has joined #ruby
[11:22:41] dwfait: I've inherited a project, I wouldn't normally use it.
[11:23:19] ljarvis: fuck cucumber
[11:27:09] Ishido: has joined #ruby
[11:27:22] ElFerna: has joined #ruby
[11:27:42] shevy: I really like the idea of https://github.com/nvbn/thefuck, do we have something similar in ruby?
[11:29:00] dlitvak: has joined #ruby
[11:29:20] UtkarshRay: has joined #ruby
[11:32:23] ibouvousaime: has joined #ruby
[11:34:20] apeiros: IMO cucumber is not well suited for anything below large enterprise. and even there I'm not sure it's a fit. you still need to understand too much about how programming works. otherwise programmers will have to rewrite your stories.
[11:34:26] nertzy: has joined #ruby
[11:35:14] f3ttX]: has joined #ruby
[11:36:05] roshanavand: has joined #ruby
[11:37:06] agent_white: If the shoe fits. Use it.
[11:37:45] cmolenda: has joined #ruby
[11:41:28] Xeago: has joined #ruby
[11:41:50] jackcom: has joined #ruby
[11:42:01] pontiki: has joined #ruby
[11:42:42] blackmesa: has joined #ruby
[11:42:43] themsay: has joined #ruby
[11:47:43] charliesome: has joined #ruby
[11:48:13] mdw: has joined #ruby
[11:50:43] sgambino: has joined #ruby
[11:56:47] roshanavand: has joined #ruby
[11:58:11] asmodlol: has joined #ruby
[11:58:19] themsay: has joined #ruby
[12:00:55] ratsss: has joined #ruby
[12:01:02] ratsss: Help, my system ruby is broken entirely.
[12:01:05] ruid: has joined #ruby
[12:01:05] ruid: has joined #ruby
[12:01:20] ratsss: http://dpaste.com/2RH553K
[12:01:52] Eising: ratsss: how did you install it?
[12:01:56] ratsss: but I can't update rubygems to the right version becasue this requires ruby
[12:02:02] ratsss: its the OSX default install I think
[12:02:17] Eising: how did it end up being so broken then?
[12:02:21] ratsss: I don't know.
[12:02:28] ratsss: I just ran brew one day and it didn't work.
[12:02:33] ratsss: I never touch ruby
[12:02:38] Eising: oh, so it's a ruby from homebrew perhaps?
[12:02:51] ratsss: I'm not sure, does the error make sense?
[12:03:05] ratsss: which ruby == /usr/bin/ruby
[12:04:31] Eising: I've never seen such an error before, but then again, somebody else might
[12:04:41] Eising: and I'm hardly an expert
[12:04:57] Eising: https://github.com/Homebrew/homebrew/issues/31220
[12:05:00] Eising: this seem relevant
[12:05:02] ratsss: Hmm, so I tried just editing that line out.
[12:05:06] ratsss: then reinstlaling rubygems
[12:05:09] ratsss: and that seems to have done it
[12:05:24] apeiros: ratsss: you generally shouldn't touch system ruby
[12:05:37] Eising: apeiros: it seems that homebrew is to blame
[12:05:38] apeiros: install and maintain your own ruby. much less problematic.
[12:05:54] Eising: but yes, that advise I can back
[12:05:56] apeiros: Eising: the paths in their paste are all from system ruby
[12:06:29] apeiros: if homebrew is to blame (which is entirely possible, as it does a couple of things in the most crappy way possible), then it's quite bad (yet again), as it'd mean that it touches system ruby.
[12:06:38] pdoherty: has joined #ruby
[12:07:54] tulak: has joined #ruby
[12:08:57] cmolenda: ratsss: Just curious, what does "which gem" get you?
[12:09:09] shevy: great evil!
[12:10:02] ratsss: oh wait no it isn't fixed at all
[12:10:09] ratsss: if I rm that line, ruby now works if I run it as root
[12:10:19] ratsss: and root can install gems
[12:10:22] gregf: has joined #ruby
[12:10:31] ratsss: but then once root installs gems, it's broken for my user again :O
[12:10:54] cmolenda: as your user, what does running "which gem" give you?
[12:11:07] ratsss: http://dpaste.com/3S1CD06 INTERESTING
[12:11:17] ratsss: but I've done rvm use system
[12:11:41] ratsss: and my rvm ruby works fine
[12:11:42] apeiros: rvm implode
[12:11:45] apeiros: and start over ;-)
[12:11:54] cmolenda: implode and start over with rbenv :p
[12:11:59] apeiros: or `rvm get stable` first
[12:12:13] bkxd: has joined #ruby
[12:12:22] roshanavand: has joined #ruby
[12:12:28] ratsss: ok I've killed rvm entirely
[12:12:47] asmodlol: has joined #ruby
[12:13:29] ratsss: http://dpaste.com/0KFQM39 ok this looks healthier, but ruby still only works if I manually remove that thing from rubygems.rb
[12:13:33] cmolenda: just a heads up, rvm does a bunch of strange things, such as changing the native change directory "cd" command of your system
[12:13:34] apeiros: ok, I'd have tried cleanup, repair and fix-permissions first
[12:13:44] duckpuppy: has joined #ruby
[12:13:57] apeiros: but nuking might be a good idea if you have an ancient rvm.
[12:14:06] ratsss: so I nuked rvm
[12:14:09] ratsss: now using system ruby
[12:14:12] ratsss: which i'm fine with
[12:14:19] apeiros: cmolenda: do you happen to know how e.g. direnv does its job?
[12:14:21] ratsss: but want rubygems to not break at first thing
[12:14:37] ratsss: gem --version === 2.4.8
[12:14:52] ratsss: perhaps system gems needs more updated system ruby??
[12:14:55] cmolenda: apeiros: Nope, not familiar, sorry.
[12:15:46] shevy: ratsss what ruby version? 2.3.0 has a more recent gem version
[12:16:23] joonty: has joined #ruby
[12:16:43] ratsss: I don't know if you can upgrade system version on OSX
[12:16:47] cmolenda: apeiros: is that an example of something that changes system functionality for good reason?
[12:16:48] ratsss: unless I can and should
[12:17:13] ratsss: I think that was the rationale behind getting rvm in the first place
[12:17:30] apeiros: cmolenda: no, I just wonder how many people use direnv, which probably changes cd too (can't imagine how it'd work otherwise), but shame rvm for changing cd
[12:17:58] pontiki: ruby-install + chruby
[12:18:08] ratsss: So I'm wondering if I've updated the system gems to a version not supported by ruby 2.0.0
[12:18:29] sigurding: has joined #ruby
[12:18:33] ratsss: can anyone else do /usr/bin/gem --version on OSX?
[12:18:34] apeiros: ratsss: as said, you shouldn't touch system ruby
[12:18:50] apeiros: and the developer of anything which touches system ruby should be flogged publicly :)
[12:18:50] ratsss: apeiros: ikr, apparently I didn't understand this when I got the laptop
[12:19:14] cmolenda: apeiros: That's an interesting tool, either way. Yeah, I mean, I figure if something like a system command is going to be changed it should be done carefully and since rbenv gives just as good, if not better (as far as I've experienced) functionality without the system changes.
[12:19:31] pontiki: i get 2.0.14, ratsss
[12:19:36] ratsss: interesting
[12:19:40] ratsss: I'm going to downgrade in that case
[12:20:04] apeiros: cmolenda: never used rbenv - how does rbenv juggle the rubies?
[12:20:09] techsethi: has joined #ruby
[12:20:34] felixal: has joined #ruby
[12:21:18] Anderson69s: has joined #ruby
[12:21:26] ratsss: that seems to have sorted it entirely
[12:21:39] apeiros: ratsss: "that"? imploding and reinstalling rvm?
[12:21:50] cmolenda: apeiros: it creates shims that it references for whichever ruby you want it to point to. Then, based on the folder you're in, it looks for a hidden file (.rbenvrc i think?) that specifies which ruby should be used and it loads up the appropriate shim.
[12:21:52] apeiros: or updating/reinstalling rubygems?
[12:22:05] ratsss: apeiros: downgrading system rubygems
[12:22:10] ratsss: i dont think rvm was the issue
[12:22:13] pontiki: rbenv also supports the .ruby-version file
[12:22:23] ratsss: I think I'd updated system rubygems to a version that is unsupported by 2.0.0
[12:22:25] cmolenda: ah, yeah, .ruby-version
[12:22:26] cmolenda: that's what I meant
[12:22:37] apeiros: cmolenda: so the ruby in PATH must be a shim itself which contains the switching logic?
[12:22:38] pontiki: i think you're also correct, cmolenda
[12:22:45] MahaDev: Hi I am getting this error with rake http://fpaste.org/307219/19869291/raw/
[12:22:51] MahaDev: Please help
[12:23:10] apeiros: ?rails MahaDev
[12:23:10] ruboto: MahaDev, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[12:23:18] apeiros: MahaDev: also install bundler: gem install bundler
[12:23:36] apeiros: but since bundler is a dependency of rails, probably just install rails properly.
[12:23:47] cmolenda: yep apeiros
[12:24:00] apeiros: cmolenda: ok. sounds a lot more sane than modifying cd.
[12:24:07] cmolenda: Chads-MacBook-Pro:echo-nest-prototype cmolenda$ echo $PATH
[12:24:15] cmolenda: ... /Users/cmolenda/.rbenv/shims:/Users/cmolenda/.rbenv/bin: ...
[12:24:17] skade: has joined #ruby
[12:24:22] apeiros: cmolenda: your name is chad?
[12:24:29] decoponio: has joined #ruby
[12:27:03] apeiros: I might make a mess, but isn't rbenv rather unsupported/maintained? at least I seem to remember that almost always when somebody had a problem here with it, nobody was able to help.
[12:27:20] apeiros: not sure which one people recommended more in here, but iirc it was chruby?
[12:27:27] apeiros: (and I don't know how that one works either)
[12:27:50] cmolenda: https://github.com/rbenv/rbenv last commit was 19 hours ago
[12:27:58] cmolenda: but also, i've never had a problem with it
[12:28:06] dlitvak_: has joined #ruby
[12:28:07] snowy: has joined #ruby
[12:28:18] cmolenda: so i've not had to deal with the support community (knock on wood) and can't speak to that
[12:28:19] ruid: has joined #ruby
[12:28:19] ruid: has joined #ruby
[12:28:23] apeiros: I *really* hate how `man <some builtin>` does NOT bring up proper man for that built-in but instead bash's help.
[12:28:32] ElFerna: has joined #ruby
[12:28:32] apeiros: I really really hate that. soooo f*cking useless.
[12:28:50] apeiros: cmolenda: I see. similar to my rvm experience then :D
[12:28:56] apeiros: (main reason I'm still on it)
[12:29:18] cmolenda: yeah, honestly, use whatever works. Place I recently worked at has been using it in production for a very long time without issue.
[12:29:24] shevy: bash, aren't you on OSX? do they use bash too?
[12:29:36] cmolenda: But since ratsss was having an issue with one, i figured i'd suggest my preference
[12:29:36] ddv: apeiros: dash is pretty usefull too search manual pages
[12:29:49] ddv: apeiros: dash app
[12:29:52] apeiros: ddv: don't want to pay for that
[12:30:20] ddv: apeiros: ask your employer :p
[12:30:23] ddv: besides you make plenty of cash
[12:30:41] ddv: like seriously
[12:30:43] apeiros: ddv: I've got principles
[12:30:50] apeiros: I know, hard to believe, but I really do :)
[12:31:00] apeiros: and yeah, at work I think we even have licenses.
[12:31:23] ddv: you're stubborn apeiros
[12:31:27] apeiros: but internets to the rescue. apparently you have to use `help` instead of `man` for builtins.
[12:31:30] apeiros: ddv: that too.
[12:31:38] apeiros: ddv: aaand stubborn about my principles :D
[12:32:03] charliesome: has joined #ruby
[12:33:47] tvw: has joined #ruby
[12:36:09] kam270: has joined #ruby
[12:36:52] Anderson69s_Deb: has joined #ruby
[12:37:03] d0nn1e: has joined #ruby
[12:37:03] radgeRayden_: has joined #ruby
[12:38:18] apeiros: re rvm - should rvm2 have been ready ~1y ago?
[12:38:44] bkxd: has joined #ruby
[12:39:38] speakingcode: has joined #ruby
[12:41:28] apeiros: shevy: could be one of mine or your projects, eh? :D
[12:42:27] agent_white: apeiros: Where are you from?
[12:42:58] shredding: has joined #ruby
[12:43:23] agent_white: apeiros: Sorry, offtopic -- just rememberd you asking how to say something in english a few hours ago.
[12:43:28] mdw: has joined #ruby
[12:43:38] kam270: has joined #ruby
[12:43:55] adgtl: has joined #ruby
[12:44:04] apeiros: agent_white: CH
[12:44:17] colegatron: has joined #ruby
[12:44:18] agent_white: And odd I never noticed you weren't native until today. Your english is kickass.
[12:44:29] apeiros: agent_white: thanks :D
[12:45:07] platzhirsch: has left #ruby: ()
[12:45:13] domgetter: wings of a feather?
[12:45:26] shevy: apeiros yeah! I think most of these projects follow a similar pattern e. g. install into the home directory and make things work right from there
[12:45:29] agent_white: Haha of course. You've 'fooled' me for two years or more, so that says something.
[12:45:46] ddv: gangsta
[12:45:51] shevy: but your comment about rvm2 I found funny because it was along the lines of "we should have had the future already in the past!" :D
[12:47:45] krz: has joined #ruby
[12:49:06] Hounddog: has joined #ruby
[12:50:09] penne12: has joined #ruby
[12:50:38] apeiros: domgetter: wings/birds of a feather, feeling with you etc. all don't really have the intended ring IMO :-/
[12:50:55] domgetter: commiserator?
[12:51:07] domgetter: (though that's borderline made-up)
[12:51:43] blackmesa: has joined #ruby
[12:52:07] apeiros: german is just so much better at self-pitying idioms ;-)
[12:52:07] domgetter: that is, while it's not in the dictionary, anyone who knew what commiserate meant would know what you mean
[12:53:36] agent_white: commiserate - "express or feel sympathy or pity"
[12:54:10] agent_white: I had to google it. Hope to have saved another a trip.
[12:54:22] apeiros: ACTION wields the power of latin
[12:54:24] domgetter: I just remember it as co-misery
[12:54:31] domgetter: to be miserable with
[12:54:52] agent_white: I just remember... I should google it. :D
[12:55:05] apeiros: latin + german helps to get around understanding an awful lot of west-european languages
[12:55:30] Icey: has joined #ruby
[12:56:05] domgetter: I guess it's a blessing and a curse that English is best understood through French
[12:56:27] mistermocha: has joined #ruby
[12:56:33] domgetter: of course, thank you for the word "twelve"
[12:56:55] apeiros: like??? so french? :)
[12:57:26] domgetter: I was thanking you specifically. though the context was ambiguous
[12:57:27] sandstrom: has joined #ruby
[12:57:48] agent_white: It's a curse that folks here in the US aren't taught languages fully like in the EU... normally we only have a requirement to pick one of 3-4 languages and take it for a year.
[12:57:59] apeiros: ah, yes, you set up the context as if you were thanking the french for twelve :)
[12:57:59] livcd: anyone built a mariadb on alpine container ?
[12:58:07] apeiros: I don't like our numbering system tbh
[12:58:10] karapetyan: has joined #ruby
[12:58:23] apeiros: but??? we're quite ot actually :D
[12:58:36] apeiros: livcd: no, anyone uses postgres
[12:58:43] livcd: apeiros: doh wrong channel
[12:58:47] domgetter: In California we have a choice between a foreign language and an art like choir or something. so you don't even need to touch a language to graduate high school
[12:58:48] apeiros: livcd: you might ask someone, though, I think someone used mariadb
[12:59:03] dlitvak: has joined #ruby
[12:59:17] apeiros: domgetter: I think that's pretty sad
[12:59:23] livcd: uhm why would you guys want to force people in the US to learn another lang ?
[12:59:25] agent_white: domgetter: Ah no shit?! Required just 2 semesters/one year of a foreign language here in Colorado.
[12:59:32] apeiros: learning another language is IMO pivotal for perspective in thinking.
[12:59:42] livcd: apeiros: why would that be ?
[12:59:51] agent_white: livcd: Force? No. The question is, why would you be opposed to it?>
[12:59:52] domgetter: its okay, I did both. 4 years of choir, and zwei und ein halb jahren of Deutsch
[13:00:06] apeiros: livcd: because language informs thinking
[13:00:31] apeiros: livcd: research it a bit. it's astounding how much of our thinking critically depends on how we express ourselves through language
[13:00:49] Drakx: has joined #ruby
[13:01:19] apeiros: it's not much different from how you solve the same problem differently depending on which programming language you use.
[13:01:24] snowy: has joined #ruby
[13:01:27] livcd: a lot of asians are forced to learn english yet there is still too few of them that are able to express themselves freely
[13:01:45] agent_white: livcd: Programming as a whole is in english. It's weird to try to imagine if it weren't... at least I can't.
[13:01:55] agent_white: s/is in/is largely in/
[13:01:57] apeiros: livcd: not quite sure what you want to say with that
[13:02:07] apeiros: livcd: can you express yourself freely in an asian language?
[13:02:29] livcd: apeiros: kind of
[13:03:32] norc: Okay... I just learned about the existence of $_ in Ruby, and that it does not behave nicely....
[13:04:18] pawnbox: has joined #ruby
[13:04:20] bhaak: livcd: think about how reading stuff from only one author would be limiting. the same with languages. also, you get a change of indulging into a culture different from your own.
[13:04:57] livcd: bhaak: one should be able to choose what language (and if any) he wants to study
[13:05:25] apeiros: livcd: (re why learn another language) also it might be a good way to learn a bit of humility
[13:05:40] norc: Honest question, what exactly is $_ - it does not seem to behave exactly like a variable but I cannot figure out what it is.
[13:05:47] apeiros: livcd: I've met so many americans who were like "yeah, why doesn't everybody just learn english, it's so easy you know"
[13:06:16] apeiros: livcd: and they were completely oblivious as to how much effort it is to actually master a foreign language, themselves only knowing english???
[13:06:41] ddv: yeah try learning Dutch
[13:06:43] ddv: or Chinese
[13:06:47] pawnbox: has joined #ruby
[13:06:47] norc: >> p $___
[13:06:49] livcd: apeiros: i agree and understand that but i think that the main purpose of a language is to pass information as easily as possible
[13:06:49] ruboto: norc # => nil ...check link for more (https://eval.in/497618)
[13:07:06] apeiros: livcd: yes. hence also the stuff I mentioned first.
[13:07:07] bhaak: livcd: we're talking about kids here. would you also say "one should be able to choose what part of mathematic (and if any) they want to study"?
[13:07:25] arup_r: has joined #ruby
[13:07:55] livcd: bhaak: so you would give kids (or their parents) a list of languages and force them to choose one as a secondary lang ?
[13:08:16] roshanavand: has joined #ruby
[13:08:20] bhaak: livcd: I don't have to. our schools already do that :-]
[13:08:21] kobain: has joined #ruby
[13:08:58] bhaak: although the "choose from" part is not as conditional as it could be
[13:09:22] livcd: apeiros: well my comment about asians was that they are "forced" to learn english but they are so disconnected from the english speaking world that it has a minimal impact on the people
[13:09:25] norc: livcd: The whole idea of mandatory school revolves around the assumptions that children don't know what they will probably need to be able to do most things later on.
[13:09:37] norc: livcd: Having a mandatory language is not that much different.
[13:10:03] norc: Anyway, back to my Ruby question:
[13:10:09] bhaak: livcd: I learnt Latin at school. how more disconnected can you be from a language and culture than a language and culture that has been dead for more than 1000 years?
[13:10:16] norc: What the heck is $_
[13:10:24] livcd: norc: well the generation of my parents have been given an opportunity (lol not really) to learn russian and nowdays it's very much useless for them
[13:10:40] Mon_Ouie: The last line that has been read using gets
[13:10:42] bhaak: livcd: despite that, it had quite an impat on my personal development. it depends on how you learn a language and what goes with it.
[13:11:01] Mon_Ouie: I've only ever used it with ruby -pe '???'
[13:11:17] norc: Mon_Ouie: Then why does something like: puts -e "puts $_.class" just throw weird exceptions?
[13:11:29] norc: errr: ruby -e "puts $_.class"
[13:11:47] Mon_Ouie: $_ is being replaced by your shell if you use double quotes
[13:11:58] jmonreal: has joined #ruby
[13:12:02] Mon_Ouie: ruby e 'puts $_.class' prints NilClass
[13:12:07] arup_r: has joined #ruby
[13:12:54] norc: Mon_Ouie: Oh well. Thank you for solving my weirdest headache in a while.
[13:13:05] norc: Completely ignored bash itself.
[13:13:21] Xeago: has joined #ruby
[13:15:26] techsethi: has joined #ruby
[13:17:59] dlitvak_: has joined #ruby
[13:18:21] Anderson69s: has joined #ruby
[13:18:38] msankhala: has joined #ruby
[13:20:49] mary5030: has joined #ruby
[13:20:54] dorei: has joined #ruby
[13:21:12] rickmasta: has joined #ruby
[13:23:00] Bloomer: has joined #ruby
[13:23:59] roshanav_: has joined #ruby
[13:25:24] Yiota: has joined #ruby
[13:25:50] Anderson69s: has joined #ruby
[13:27:35] anisha: has joined #ruby
[13:28:45] al2o3-cr: has joined #ruby
[13:28:58] sgambino: has joined #ruby
[13:29:24] ElFerna: has joined #ruby
[13:29:57] atomical: has joined #ruby
[13:30:13] Icey: has joined #ruby
[13:30:38] anisha: has joined #ruby
[13:31:27] rickmasta: has joined #ruby
[13:36:16] aryaching: has joined #ruby
[13:37:53] bensarz: has joined #ruby
[13:40:16] dwfait: has joined #ruby
[13:41:44] symbole: has joined #ruby
[13:42:08] Frem: has joined #ruby
[13:43:21] ramortegui: has joined #ruby
[13:45:29] Icey: has joined #ruby
[13:45:44] Marsupermammal: has joined #ruby
[13:46:21] praveen: has joined #ruby
[13:46:34] aufi: has joined #ruby
[13:46:43] Chau: has joined #ruby
[13:48:10] mdw: has joined #ruby
[13:48:17] Anderson69s_Deb: has joined #ruby
[13:48:30] ElFerna: has joined #ruby
[13:48:39] Icey: has joined #ruby
[13:48:39] dstarh: has joined #ruby
[13:49:45] bigkevmcd: has joined #ruby
[13:51:56] jmonreal: has anyone used logger.rb? I am trying to make it rotate a file after a few bytes but it does not work
[13:52:05] jmonreal: http://pastebin.com/ac6z04F4 here's the code
[13:52:05] ruboto: jmonreal, as I told you already, please use https://gist.github.com
[13:53:56] roshanavand: has joined #ruby
[13:54:13] jmonreal: https://gist.github.com/jimonreal/ae17928995c8c62cec41
[13:54:15] sankaber: has joined #ruby
[13:55:01] praveen: has joined #ruby
[13:56:06] Ishido: has joined #ruby
[13:56:43] thezanke: has joined #ruby
[13:57:20] sivam: has joined #ruby
[13:58:14] Dreamer3: has joined #ruby
[13:58:17] sivam: Hi, I am new to Ruby. I find some methods like chomp and gsub have ! with them. what is the significance? for eg: x.gsub!(/a/,"x")
[13:59:32] RaceCondition: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[14:00:00] araujo: has joined #ruby
[14:00:01] araujo: has joined #ruby
[14:00:37] sankaber: has joined #ruby
[14:02:36] Mon_Ouie: It's part of the method name, gsub and gsub! are two different methods
[14:03:20] Mon_Ouie: The bang variant usually implies that it's a more "dangerous" form of the regular method. In the cases you mention, it means that the method modifies the receiver (x) instead of returning a new string.
[14:06:05] blackmesa: has joined #ruby
[14:06:16] Couch: has joined #ruby
[14:07:02] pl1ght: has joined #ruby
[14:07:57] sivam: Mon_Ouie: Thanks for clear explanation. got it. so gsub doesn't modifies the argument and gsub! modifies the arg
[14:08:40] Mon_Ouie: Not the argument, the object on which you call the method
[14:10:02] sagui: has joined #ruby
[14:11:16] jdawgaz: has joined #ruby
[14:13:41] jmonreal: anyone on how to rotate properly log files?
[14:13:41] jmonreal: created with logger.rb lib
[14:14:06] Anderson69s_Deb: has joined #ruby
[14:14:27] dionysus69: has joined #ruby
[14:15:27] krz: has joined #ruby
[14:15:59] ibouvousaime: has joined #ruby
[14:18:00] Xeago: has joined #ruby
[14:20:23] ta0: has joined #ruby
[14:23:33] penne12: has joined #ruby
[14:23:50] TomPeed: has joined #ruby
[14:24:35] genpaku: has joined #ruby
[14:24:45] cmolenda: has joined #ruby
[14:25:32] genpaku: has joined #ruby
[14:27:13] krobzaur: has joined #ruby
[14:29:26] dlitvak: has joined #ruby
[14:29:27] davedev24: has joined #ruby
[14:31:57] jmignault: has joined #ruby
[14:32:38] blackmesa: has joined #ruby
[14:33:04] Anderson69s_Deb: has joined #ruby
[14:33:14] FooMunki: has joined #ruby
[14:33:46] jmonreal: has joined #ruby
[14:35:21] rippa: has joined #ruby
[14:36:11] praveen: has joined #ruby
[14:39:40] Kendos-Kenlen: has joined #ruby
[14:39:41] ElFerna: has joined #ruby
[14:40:08] nertzy: has joined #ruby
[14:40:15] hxegon: has joined #ruby
[14:40:57] praveen: has joined #ruby
[14:41:09] havenwood: jmonreal: hi
[14:42:31] anisha: has joined #ruby
[14:43:14] jas02: has joined #ruby
[14:44:22] Anderson69s_Deb: has joined #ruby
[14:44:58] Wompy: has joined #ruby
[14:46:14] malconis: has joined #ruby
[14:46:18] gusTester: has joined #ruby
[14:47:01] vondruch: has joined #ruby
[14:48:23] hxegon: has joined #ruby
[14:48:59] mdw: has joined #ruby
[14:49:58] praveen: has joined #ruby
[14:51:10] babblebre: has joined #ruby
[14:51:12] jdawgaz: has joined #ruby
[14:51:31] atmosx: has joined #ruby
[14:51:43] atmosx: is there any tool to sanitize JSON?
[14:51:58] atmosx: I found this http://wonko.com/post/sanitize for HTML
[14:52:05] zapata: has joined #ruby
[14:52:58] Emplitz: has joined #ruby
[14:54:17] jmonreal: havenwood: how is it going?
[14:54:20] uris: has joined #ruby
[14:54:35] jmonreal: do you have experience using the ruby logger lib?
[14:54:40] havenwood: jmonreal: almost awake
[14:54:52] havenwood: jmonreal: Just a bit of logging with it.
[14:54:59] peeja: has joined #ruby
[14:55:11] Papierkorb: atmosx: sanitize JSON for what?
[14:55:48] stannard: has joined #ruby
[14:55:57] whippythellama: has joined #ruby
[14:56:05] havenwood: jmonreal: logrotate to rotate em, etc
[14:57:30] jmonreal: havenwood: I have the following code, I was trying to use logger ability to rotate
[14:57:40] jmonreal: https://gist.github.com/jimonreal/ae17928995c8c62cec41
[14:57:57] freerobby: has joined #ruby
[14:58:05] jmonreal: the size I changed it for testing, because it was not rotating after the size
[14:59:35] dlitvak_: has joined #ruby
[14:59:59] platzhirsch: has joined #ruby
[15:00:07] voker57: has joined #ruby
[15:00:07] voker57: has joined #ruby
[15:02:20] charliesome: has joined #ruby
[15:04:02] skade: has joined #ruby
[15:04:46] anisha: has joined #ruby
[15:05:01] shlomo: has joined #ruby
[15:05:41] malconis: has joined #ruby
[15:05:46] speaking1ode: has joined #ruby
[15:06:02] mary5030: has joined #ruby
[15:06:47] jmonreal: havenwood: I got the error, instead of using file I just passed the filename and now it works!
[15:06:50] jmonreal: like a charm
[15:07:32] PedramT: has joined #ruby
[15:07:33] RaceCondition: has joined #ruby
[15:07:57] atmosx: Papierkorb: for parsing I guess.
[15:08:33] atmosx: Papierkorb: I have a 'string' (file) which has data formatted in JSON. However, I parse the file with ruby or python comes up with JSON:ERROR which means that it's not valid.
[15:08:45] blackmesa: has joined #ruby
[15:08:59] atmosx: the strange thing I noticed is that if it's 1 line, it parses nicely, if I add a second line it doesn't.
[15:09:08] atmosx: I wanna know where's the error
[15:09:30] Papierkorb: ask the parser for the error position?
[15:09:36] dhollinger: has joined #ruby
[15:10:25] atmosx: how do I do that? https://gist.github.com/atmosx/7a6736dda3ea67684167 here's the code I used to iterate through.
[15:12:02] ljarvis: atmosx: what's the question exactly? Your JSON isn't valid if the parser chokes
[15:12:08] ljarvis: it's not ambiguous
[15:12:09] atmosx: I'm getting a "json/common.rb:155:in `parse': 757: unexpected token at <really_long_string"
[15:12:16] ja: Hi people! When???s that new `.?` (or `.&` or what it was) operator coming to Ruby? (I???m unable to find the issue where it was discussed.)
[15:12:22] atmosx: ljarvis: I know, but which data/part of the json is not valid? is there any way to find out?
[15:12:27] Papierkorb: atmosx: you didn't put a newline into a string?
[15:12:27] renderful: has joined #ruby
[15:12:30] ljarvis: ja: Ruby 2.3, it's called "the lonely operator"
[15:12:57] ljarvis: atmosx: your long string maybe contains an unescaped quote?
[15:13:37] ljarvis: >> RUBY_VERSION
[15:13:39] ruboto: ljarvis # => "2.2.0" (https://eval.in/497676)
[15:13:53] hobodave: has joined #ruby
[15:14:04] ljarvis: 23>> RUBY_VERSION
[15:14:12] ljarvis: apeiros: :(
[15:15:00] mrfoto: has joined #ruby
[15:15:38] ja: ljarvis: haha, what a name! nice!
[15:15:59] ljarvis: ja: yeah, because &. looks like a lonely person sat down staring at a dot, as Matz says
[15:16:08] ja: it???s &., really? that a lot better than .?, I must say??? (wasn???t it originally proposed as `.?`?)
[15:16:21] ljarvis: yes it was, and yep it's much better
[15:16:22] ja: ljarvis: lol!
[15:16:57] speakingcode: has joined #ruby
[15:17:42] Xeago: has joined #ruby
[15:18:15] atmosx: ljarvis Papierkorb these are my lines: https://gist.github.com/atmosx/f96e576258245868ebe4 - if it's 1 line it's okay, if two (same or other) it's invalid json
[15:18:19] ja: but 2.3?! so I???ve been able to use it since December 25 without realizing? O_O Thanks, ljarvis & shlomo! I???ve got tons of find/replace work to do now, hehe; brb
[15:19:03] ljarvis: atmosx: 8}, "@timestamp": "2016-01-05T12:14:33.529669Z", "@source_host": "49ac72d5e474", "@message": ""}
[15:19:54] ljarvis: generally when you see a parse error like that, it's worth combing the line number with your eyes a couple of times. Chances are something will pop out
[15:20:03] ljarvis: and when it doesn't, there's always other peoples eyes :)
[15:20:29] atmosx: no that's not it, removing hits again with an error.
[15:20:32] atmosx: ljarvis: thanks :-)
[15:20:37] ljarvis: also *technically* the document isn't valid JSON at all
[15:20:44] ljarvis: it's JSON delimited by newlines
[15:20:56] atmosx: ljarvis: so json doesn't have new lines?
[15:21:08] ljarvis: which most parsers wont handle. You'll want to use YAYL
[15:21:33] ljarvis: it'll parse those, but really you should prefer valid JSON for the entire document
[15:21:49] Chau_: has joined #ruby
[15:21:54] ljarvis: atmosx: I mean there's no surrounding object, it's just JSON objects delimited by newlines
[15:22:06] ljarvis: if you added [ and ] it would be valid
[15:22:14] ljarvis: (and commas separating the objects)
[15:22:28] ljarvis: this method is usually used for JSON http streaming
[15:22:47] ljarvis: (since there might technically *never* be a document end
[15:22:58] ljarvis: meta sentence there
[15:23:04] lkba: has joined #ruby
[15:23:22] mary5030: has joined #ruby
[15:23:48] atomical_: has joined #ruby
[15:24:08] ljarvis: also the rogue } I thought of was because I missed the starting { :) see, always worth scanning it by eye a few times
[15:24:11] sandstrom: has joined #ruby
[15:24:48] atmosx: jlyndon: indeed, if I add square brackets and commas works!
[15:25:12] ljarvis: yep, now you have an array of objects (in javascript speak)
[15:27:03] aadam21: has joined #ruby
[15:27:43] jobewan: has joined #ruby
[15:30:01] Bloomer: has joined #ruby
[15:30:33] Anderson69s: has joined #ruby
[15:31:21] roshanavand: has joined #ruby
[15:32:03] mrtomme: has joined #ruby
[15:32:46] vondruch: has joined #ruby
[15:33:39] f3ttX]: has joined #ruby
[15:33:40] crystalmaiden: has joined #ruby
[15:34:38] crystalmaiden: has joined #ruby
[15:35:03] BiHi: has joined #ruby
[15:35:33] crystalmaiden: has joined #ruby
[15:36:03] atomical: has joined #ruby
[15:36:36] crystalmaiden: has joined #ruby
[15:36:44] stannard_: has joined #ruby
[15:37:15] ljarvis: class A; def b?; false; end; end; class B < A; def b?; true; end; end vs class A; def b?; is_a?(B); end; which and why?
[15:37:30] hxegon: has joined #ruby
[15:37:44] crystalmaiden: has joined #ruby
[15:37:49] araujo: has joined #ruby
[15:37:49] araujo: has joined #ruby
[15:38:45] crystalmaiden: has joined #ruby
[15:38:58] apeiros: ljarvis: former. doesn't require knowledge about B in A.
[15:39:11] abq: has joined #ruby
[15:39:29] ljarvis: that was my thinking too, don't have anything better than that, but that probably doesn't matter
[15:39:52] crystalmaiden: has joined #ruby
[15:40:50] crystalmaiden: has joined #ruby
[15:42:06] crystalmaiden: has joined #ruby
[15:42:49] s00pcan: has joined #ruby
[15:43:22] crystalmaiden: has joined #ruby
[15:43:31] govg: has joined #ruby
[15:44:28] crystalmaiden: has joined #ruby
[15:45:46] crystalmaiden: has joined #ruby
[15:46:36] jackjackdripper: has joined #ruby
[15:46:47] robbyoconnor: has joined #ruby
[15:46:50] crystalmaiden: has joined #ruby
[15:46:56] robbyoconnor: has joined #ruby
[15:47:57] crystalmaiden: has joined #ruby
[15:48:54] [spoiler]: gosh inline code gives me such a headache lmao
[15:49:06] crystalmaiden: has joined #ruby
[15:49:25] al2o3-cr: has joined #ruby
[15:50:03] sivam: has joined #ruby
[15:50:07] crystalmaiden: has joined #ruby
[15:50:26] rkazak: has joined #ruby
[15:51:18] psye: has joined #ruby
[15:52:19] ljarvis: heh my brain removes the semi-colons and formats it in a relatively timely manner so it's not too offensive
[15:52:34] arup_r: has joined #ruby
[15:52:41] canton7: I didn't spot the 'vs' in the middle until I tried to actually run it :P
[15:52:51] ljarvis: I could have done a better job of formatting it though
[15:52:55] ljarvis: hah yeah good point, canton7
[15:53:05] renderful: has joined #ruby
[15:53:19] rdavila: has joined #ruby
[15:53:30] FernandoBasso: has joined #ruby
[15:54:48] snowy: has joined #ruby
[15:55:26] centrx: has joined #ruby
[15:55:28] Jackneill: has joined #ruby
[15:56:11] solenoids: has joined #ruby
[15:58:11] prestorium: has joined #ruby
[15:58:43] gusTester: has joined #ruby
[15:59:21] gregf_: has joined #ruby
[15:59:32] malconis_: has joined #ruby
[15:59:41] atomical_: has joined #ruby
[16:00:59] YP-QMUL-W: has joined #ruby
[16:01:19] tvw: has joined #ruby
[16:04:04] cschneid_: has joined #ruby
[16:05:36] RegulationD: has joined #ruby
[16:07:31] cdg: has joined #ruby
[16:08:11] aegis3121: has joined #ruby
[16:08:53] ljarvis: ->{{}&.dig(%%%,??)}&.===
[16:09:10] Kaboom: has joined #ruby
[16:10:39] jackjackdripper: has joined #ruby
[16:13:09] nofxx: has joined #ruby
[16:13:09] nofxx: has joined #ruby
[16:14:15] arup_r: has joined #ruby
[16:14:37] mdw: has joined #ruby
[16:14:41] karapetyan: has joined #ruby
[16:15:01] malconis: has joined #ruby
[16:15:30] YP-QMUL-W: has joined #ruby
[16:17:16] Wompy: has joined #ruby
[16:17:49] momomomomo: has joined #ruby
[16:18:47] chipotle: has joined #ruby
[16:20:30] build22: has joined #ruby
[16:20:43] dopie: has joined #ruby
[16:20:47] build22: has left #ruby: ()
[16:24:00] howdoi: has joined #ruby
[16:25:41] PsionTheory: has joined #ruby
[16:27:16] araujo: has joined #ruby
[16:27:17] araujo: has joined #ruby
[16:28:21] solenoids: has joined #ruby
[16:28:33] skade: has joined #ruby
[16:28:36] karapetyan: has joined #ruby
[16:28:41] momomomomo_: has joined #ruby
[16:28:57] mistermocha: has joined #ruby
[16:29:51] wolffles: has joined #ruby
[16:32:58] mistermo_: has joined #ruby
[16:33:13] dvxam: has joined #ruby
[16:33:19] dvxam: hello here
[16:33:41] yes`r: has joined #ruby
[16:33:44] huyderman: has joined #ruby
[16:34:28] dvxam: Does anyone knows if regex are "classic" object in ruby? I'm concerns about how it's memory are allocated/free
[16:34:37] abyss: has joined #ruby
[16:34:45] havenwood: >> //.is_a? Object
[16:34:47] ruboto: havenwood # => true (https://eval.in/497712)
[16:34:51] centrx: dvxam, What's a "classic object"?
[16:34:51] wolffles: has joined #ruby
[16:35:50] themsay2: has joined #ruby
[16:37:28] synthroid: has joined #ruby
[16:37:36] freerobby: has joined #ruby
[16:38:36] stannard: has joined #ruby
[16:41:06] kalopsian: has joined #ruby
[16:45:15] radgeRayden: has joined #ruby
[16:45:35] The_Phoenix: has joined #ruby
[16:47:15] aryaching: has joined #ruby
[16:47:49] rdark: has joined #ruby
[16:48:18] themsay: has joined #ruby
[16:51:00] hxegon: has joined #ruby
[16:52:03] celly: has joined #ruby
[16:54:32] celly: has joined #ruby
[16:54:43] jhass: one with class!
[16:54:51] jhass: >> //.class.nil?
[16:54:52] ruboto: jhass # => false (https://eval.in/497741)
[16:55:16] jhass: that was quite some time ago
[16:55:26] Ebok: I was listening still
[16:55:31] jhass: <3 smart filter
[16:56:05] jbrhbr: has joined #ruby
[16:58:29] cpup: has joined #ruby
[16:58:44] luckyme: has joined #ruby
[16:58:59] smactive: has joined #ruby
[16:59:38] yardenbar: has joined #ruby
[16:59:49] felixal: has joined #ruby
[17:02:24] bkxd: has joined #ruby
[17:04:05] Scripore: has joined #ruby
[17:04:38] Jamo_: has joined #ruby
[17:04:47] p|p: has joined #ruby
[17:05:50] karapetyan: has joined #ruby
[17:05:59] minimalism: has joined #ruby
[17:07:44] polishdub_: has joined #ruby
[17:11:14] ElFerna: has joined #ruby
[17:11:33] trautwein: has joined #ruby
[17:11:43] wolffles: has joined #ruby
[17:12:01] Mon_Ouie: has joined #ruby
[17:12:11] lacuna: has joined #ruby
[17:12:28] bmurt: has joined #ruby
[17:12:32] momomomomo: has joined #ruby
[17:12:39] renderful: has joined #ruby
[17:13:14] build22: has joined #ruby
[17:13:28] amclain: has joined #ruby
[17:13:50] polishdub: has joined #ruby
[17:15:08] sivam: has joined #ruby
[17:15:42] nertzy: has joined #ruby
[17:15:51] symm-: has joined #ruby
[17:16:44] ascarter: has joined #ruby
[17:16:48] dfockler: has joined #ruby
[17:19:00] mistermocha: has joined #ruby
[17:19:26] volty: has joined #ruby
[17:21:08] jfo: has joined #ruby
[17:22:07] El3ktra: has joined #ruby
[17:22:08] El3ktra: has joined #ruby
[17:22:25] mdw: has joined #ruby
[17:23:29] loren: has joined #ruby
[17:23:33] zast: has joined #ruby
[17:24:24] karapetyan: has joined #ruby
[17:24:59] jph98: has joined #ruby
[17:25:18] jph98: has left #ruby: ()
[17:26:20] polishdub_: has joined #ruby
[17:28:26] Xeago: has joined #ruby
[17:28:28] weemsledeux: has joined #ruby
[17:28:32] mic_e: has joined #ruby
[17:28:51] lacuna: has joined #ruby
[17:28:54] peeja: has joined #ruby
[17:29:38] sol: has joined #ruby
[17:29:43] patchedmonkey: has joined #ruby
[17:29:50] yardenbar: has joined #ruby
[17:30:22] patchedmonkey: has joined #ruby
[17:31:09] themsay: has joined #ruby
[17:31:13] mary5030: has joined #ruby
[17:31:14] volty: can I make a gem install verbose ?
[17:31:14] peeja: has joined #ruby
[17:31:59] patchedmonkey: has joined #ruby
[17:32:14] shevy: volty you mean a compiled gem?
[17:32:31] davedev24: has joined #ruby
[17:32:51] volty: hi shevy, i am reinstalling qtbindings and would like to see what's going on
[17:33:07] shevy: yeah hmmm
[17:33:48] anisha: has joined #ruby
[17:34:05] shevy: gem list has --details but I suppose this is available only to that subcommand
[17:34:42] luckyme: has joined #ruby
[17:34:42] freerobby: has joined #ruby
[17:35:06] volty: Yes. Should I try to run its extconf in a separate dir ?
[17:35:53] shevy: if you run extconf.rb manually, you should get the full output directly... but I think there is a way to do this with gem too, I don't have it noted down but I vaguely remember that this was possible
[17:36:09] ellisTAA: has joined #ruby
[17:36:59] ellisTAA: is an object an abstract data type?
[17:37:00] joonty: has joined #ruby
[17:37:17] volty: if I run it manually, into another, separate directory, extconf is going to copy ?
[17:37:17] shevy: it is not very abstract, you have methods to query or manipulate the data
[17:37:45] momomomomo: has joined #ruby
[17:38:08] jhass: ellistaa: I guess people argue so
[17:38:22] shevy: volty I don't know if it works in a separate directory, but if I run extconf.rb manually or copy setup.rb, I can get things to compile or at least see the root cause of the problem on the terminal; I do this when I install the rubygnome bindings for instance, an alias called "trainst" for "traverse_install" to enter every directory and run setup.rb or extconf.rb there (I don't remember which one it was offha
[17:38:40] wolffles: has joined #ruby
[17:38:54] volty: ellistaa: it all depends on what you have to do, for example its 'to_s' is abstract since you don't get a meaningful result (for your context). It's not abstract as in C++
[17:39:22] volty: ok shevy, thx
[17:40:55] Anderson69s: has joined #ruby
[17:41:17] krobzaur: has joined #ruby
[17:41:25] snockerton: has joined #ruby
[17:41:52] ta0: has joined #ruby
[17:43:23] amoeba_: has joined #ruby
[17:43:29] trautwein: has joined #ruby
[17:43:31] daivyk: has joined #ruby
[17:43:32] gatman: has joined #ruby
[17:46:59] treehug88: has joined #ruby
[17:47:09] stannard: has joined #ruby
[17:47:14] Anderson69s_Deb: has joined #ruby
[17:48:12] sigurding: has joined #ruby
[17:48:33] chipotle: has joined #ruby
[17:50:50] radgeRayden_: has joined #ruby
[17:51:02] jaxxstorm: has joined #ruby
[17:51:14] SCHAAP137: has joined #ruby
[17:51:21] djbkd: has joined #ruby
[17:53:16] Rutix: has joined #ruby
[17:53:16] Rutix: has joined #ruby
[17:53:43] build22: has joined #ruby
[17:53:59] devbug: has joined #ruby
[17:55:13] TomyLobo: has joined #ruby
[17:59:13] last_staff: has joined #ruby
[17:59:16] shadoi: has joined #ruby
[18:00:00] hxegon: has joined #ruby
[18:01:08] dlitvak: has joined #ruby
[18:01:33] rdark: has joined #ruby
[18:03:09] lacuna: has joined #ruby
[18:03:09] lacuna: has joined #ruby
[18:03:10] zacts: hey rubyists
[18:03:14] aegis3121: has joined #ruby
[18:03:30] Darmani: has joined #ruby
[18:03:39] Darmani: It is raining so hard over here..
[18:03:49] Darmani: How am I supposed to write code with all this rain?!
[18:04:18] lucasb: has joined #ruby
[18:05:13] roshanavand: has joined #ruby
[18:05:31] psye: has joined #ruby
[18:06:17] celly: has joined #ruby
[18:06:18] Anderson69s_Deb: has joined #ruby
[18:06:36] lucasb: hi! If I type ARGV.class I get a class named ARGF.class? ARGF.class.to_s returns "ARGF.class". Is this expected?
[18:07:31] centrx: You mean ARGF.class
[18:07:41] jbrhbr: has joined #ruby
[18:07:44] lucasb: yes, sorry, I mean ARGF
[18:08:08] centrx: I get the same thing. Weird though
[18:08:21] karapetyan: has joined #ruby
[18:08:35] aadam21: has joined #ruby
[18:08:40] centrx: http://stackoverflow.com/questions/12274652/what-is-argf-class-in-ruby-1-9
[18:09:17] Ox0dea: centrx: What do you suppose `ARGF.class` should be?
[18:09:18] apeiros: that's because it's a bit special.
[18:09:20] firstdayonthejob: has joined #ruby
[18:09:35] mic_e: has joined #ruby
[18:09:36] Ox0dea: It's way special.
[18:09:38] apeiros: some other root classes are too. not quite sure why.
[18:09:41] eam: Ox0dea: I'd suppose it should be a normal class like anything else
[18:09:44] Ox0dea: apeiros: No?
[18:09:48] apeiros: I mean, not sure why they expose it on that level.
[18:09:56] eam: there's no reason for it to be odd
[18:10:00] finisherr: has joined #ruby
[18:10:04] apeiros: similar with ENV
[18:10:05] Ox0dea: eam: ARGF isn't instantiable.
[18:10:13] lucasb: centrx: I'm reading that SO page, thanks
[18:10:16] apeiros: neither is NilClass
[18:10:20] apeiros: which is way special too
[18:10:27] Ox0dea: So many way specials.
[18:10:31] eam: "it's a singleton" doesn't explain why it's an oddball
[18:10:34] apeiros: yet it doesn't expose that kind of weird behavior
[18:10:49] apeiros: I think somebody was lazy and nobody was willing to fix :)
[18:11:03] Ox0dea: But what *should* it report?
[18:11:19] eam: ARGFClass
[18:11:25] apeiros: or not lazy - just that it stems from a time when it wasn't clear or any convention existed
[18:11:33] Ox0dea: eam: A fake constant?
[18:11:41] pipework: Where did whitequark go? :(
[18:11:44] apeiros: it could just report Class
[18:11:45] eam: Ox0dea: why would it be fake?
[18:11:53] Ox0dea: eam: Why should it be real?
[18:12:03] eam: consistency
[18:12:08] apeiros: >> [nil, nil.class, nil.class.class]
[18:12:09] ruboto: apeiros # => [nil, NilClass, Class] (https://eval.in/497799)
[18:12:23] Ox0dea: Consistency with... the likes of NilClass?
[18:12:29] apeiros: or Module even
[18:12:38] eam: or the naming conventions of class names
[18:12:39] apeiros: no, revoke that
[18:12:44] apeiros: would cause troubles with include etc.
[18:13:08] eam: what if I build a system in a database to store class names of objects, maybe I'm doing some kind of GC profiler
[18:13:10] chouhoulis: has joined #ruby
[18:13:24] eam: and I put a reasonable constraint on the class name table based on ruby's class name restrictions (no dot)
[18:13:31] eam: ARGF blows up my database
[18:13:39] apeiros: Ox0dea: the likes of NilClass - there's 3 of those - true/false/nil all follow the same pattern. but IMO it doesn't need 2 levels. ARGF can just be an instance of Object.
[18:13:51] gatman: has joined #ruby
[18:13:58] Ishido: has joined #ruby
[18:14:03] apeiros: so, revoke my ARGF.class # => Class and Module, replace it with ARGF.class # => Object
[18:14:18] pryster: has joined #ruby
[18:14:18] apeiros: define all its behavior in ARGF.singleton_class
[18:14:30] pryster: >> foo&.[0]
[18:14:31] ruboto: pryster # => /tmp/execpad-ecb102cf818e/source-ecb102cf818e:2: syntax error, unexpected '.' ...check link for more (https://eval.in/497800)
[18:14:31] brendan-: has joined #ruby
[18:14:39] pryster: Why does Ruby 2.3 choke on this? :(
[18:14:42] apeiros: pryster: &.[](0)
[18:14:48] pryster: apeiros: Oh lord...
[18:14:51] apeiros: pryster: because &: does not work with syntax sugar
[18:15:00] apeiros: pryster: same for +, - etc.
[18:15:09] apeiros: and != apparently (re blog post)
[18:15:12] Ox0dea: pryster: You can't say `foo.[0]` either, so you shouldn't be surprised.
[18:15:28] pryster: Ox0dea: Maybe I should take a look at how this was implemented...
[18:15:33] Ox0dea: pryster: Why?
[18:15:42] apeiros: pryster: no, just understand that the method name is []
[18:15:52] apeiros: and that calling it via [arg1, ???] is syntax sugar
[18:16:40] Ox0dea: >> class C; def [] a, b; a + b end end; C.new[17, 25] # pryster
[18:16:42] ruboto: Ox0dea # => 42 (https://eval.in/497801)
[18:17:27] Ox0dea: We need more sugar!
[18:17:34] Ox0dea: I half-wanted to say `def [a, b]` there.
[18:17:37] adaedra: ACTION sugars Ox0dea 
[18:17:51] Ox0dea: ACTION desugars adaedra
[18:18:16] adaedra: /nick adaedra_light
[18:18:18] Ox0dea: I shoulda salted ya.
[18:18:56] Ox0dea: I prefer you sugared. :<
[18:19:31] Ox0dea: pryster: So... was that some small revelation back there?
[18:19:52] pryster: Ox0dea: Nope, give me a moment here!
[18:19:58] Ox0dea: Virtually all of Ruby's operators are method calls.
[18:20:12] Ox0dea: >> 17.+(25)
[18:20:13] ruboto: Ox0dea # => 42 (https://eval.in/497806)
[18:20:16] ellisTAA: has joined #ruby
[18:21:42] eam: how do I overload the subtraction operator in the expression 5e-10 + 1
[18:21:57] eam: er, the unary minus operator I mean
[18:21:58] Ox0dea: There is no subtraction operator there.
[18:22:02] Ox0dea: Nor that.
[18:22:07] chadhs: has joined #ruby
[18:22:23] eam: I mean, mathmatically there is
[18:22:23] guacamole: has joined #ruby
[18:22:26] Darmani: Ox0dea: Good morning sweetheart<33
[18:22:36] Ox0dea: Ohai, Darmani!
[18:22:46] Ox0dea: Did you eat a well-balanced breakfast?
[18:22:55] ascarter: has joined #ruby
[18:22:58] Darmani: I went to a diner.
[18:23:02] Darmani: does that count? lol
[18:23:12] Ox0dea: Did you eat the seating arrangements?
[18:23:28] Darmani: the seating arrangements??
[18:24:19] Ox0dea: You ever put chicken in an omelette?
[18:24:23] chadhs: are many of your managing ruby processes with supervisor?
[18:24:33] renderful: has joined #ruby
[18:24:55] chadhs: having a heck of a time getting something like this `cd /home/app && sudo -u appuser bundle exec /home/app/ruby_daemon -d` to work in supervisor
[18:25:13] Darmani: Ox0dea: Chicken?
[18:25:24] Darmani: In an omelette?
[18:25:31] Darmani: Why would you ruin a perfectly good omelette?
[18:25:33] jbrhbr: chadhs: supervisor lets you specify a user and a directory, i don't see why that would be in your command
[18:25:44] Ox0dea: Darmani: Pfft. It's delicious.
[18:26:02] norc: Oh. Somehow it kept the nick weird.
[18:26:03] jbrhbr: (maybe irrelevant but that's all i see)
[18:26:05] chadhs: jbrhbr: it's not, i've tried that, but that command works in a simple shell script
[18:26:05] Ox0dea: But wrapping something in its own liquefied babies and cooking it is the most disrespectful thing ever.
[18:26:20] Darmani: Ox0dea: Lmao the eggs have feelings now do they?
[18:26:23] adaedra: Off-topic? In my #ruby? More likely than you think!
[18:26:28] Darmani: god the lives I've taken over the years....
[18:26:38] Ox0dea: Darmani: You kill your food?
[18:26:38] chadhs: i'm probably missing something that sudo -u appuser is giving me ENV wise
[18:26:52] Darmani: Ox0dea: If it's not dead already then yeah
[18:26:56] jbrhbr: chadhs: all i can suggest is to try to use the proper supervisor settings for this. `sudo` and `cd` shouldnt' be in there
[18:26:58] Darmani: Someone has to.
[18:27:02] Ox0dea: What is dead may never die.
[18:27:03] rrichardsr3: has joined #ruby
[18:27:09] chadhs: Ox0dea: technically those are unfertilized eggs ????
[18:27:16] Ox0dea: chadhs: You're not wrong.
[18:27:19] Darmani: Ox0dea: valar morghulis
[18:27:31] chadhs: Hen periods
[18:27:35] Ox0dea: Darmani: Jon Starkgaryen = Azor Ahai?
[18:27:42] norc: Ox0dea: It is all clear now, I understand how foo[] is parsed now - and why a&.[0] cannot be simply patched in.
[18:27:49] Ox0dea: norc: Via -y?
[18:27:51] Darmani: lmao idk who Azoe Ahai is :3
[18:28:19] chadhs: jbrhbr: correct, i'll keep playing around with it and hit up the supervisor irc as well thnx
[18:28:21] norc: Ox0dea: With the help of and just figuring out some other parts of the syntax.
[18:28:35] MattV: has joined #ruby
[18:28:38] norc: The implementation of &. is surprisingly simple.
[18:28:51] Ox0dea: I looked at it when it was .?, but not deeply.
[18:29:01] PedramT: has joined #ruby
[18:29:03] ta0_: has joined #ruby
[18:29:04] aryaching: has joined #ruby
[18:29:30] Ox0dea: Does & (the #to_proc operator) throw any spanners into the works?
[18:30:19] Encapsulation: has joined #ruby
[18:31:42] haraigo: has joined #ruby
[18:32:07] MattV: I'm trying to optimize an Ansible playbook and at this point the Ruby install is the longest running step (typically 7+ minutes). Any tips for speeding up "rbenv install 2.1.2"?
[18:32:19] RegulationD: has joined #ruby
[18:33:20] wolffles: has joined #ruby
[18:36:19] agent_white: has joined #ruby
[18:36:37] Darmani: So guys. I'm kinda stuck.
[18:37:00] lucasb: So I understood ARGF.class is just a minor internal detail, harmless. I'll not get surprised next time I see it. Thanks everybody for answering.
[18:37:00] Darmani: I'm supposed to create methods like .each, and .eachwithindex etc. But I'm not sure how to do that.
[18:37:17] jhass: Darmani: with def
[18:37:19] Darmani: I know I need to use yield in some way... but idk how to do it Q.Q
[18:37:33] jhass: which tutorial are you following?
[18:37:53] Channel6: has joined #ruby
[18:37:53] platzhirsch: has left #ruby: ()
[18:37:56] Darmani: Well the website is called "The Odin Project" but it's not a tutorial
[18:38:01] Darmani: It's my next challenge I suppose.
[18:38:21] baweaver: has joined #ruby
[18:38:50] jhass: if you're unable to look up "ruby yield" or "how is each implemented in ruby" another way to learn ruby might be better for you
[18:38:57] lemur: has joined #ruby
[18:39:03] norc: Ox0dea: Most of the work on that big advertised feature was just the discussions about whether it should look like &., .? or `}~
[18:39:28] Darmani: jhass: Lol wow.
[18:39:41] juddey: has joined #ruby
[18:39:59] Darmani: jhass: What's the point of this chatroom then? If you can look up everything then why is anyone even here?
[18:40:00] lemur: has joined #ruby
[18:40:35] norc: Darmani: If you want us to write code for you? Hire us. If you want us to be a fully fledged teacher? Hire us. If you have a specific question that you have exhausted your own options? Ask us.
[18:40:38] norc: It is that simple.
[18:40:45] jhass: Darmani: see the channel rules, 2.2 and 2.3 in particular
[18:41:08] Darmani: norc: Hmm. That's a good point.
[18:41:14] Darmani: norc: Well said. I rest my case.
[18:41:34] Ox0dea: Darmani: On the flip side, what's the point of Google if nobody uses it?
[18:41:48] Darmani: Ox0dea: No one asked for your opinion xP
[18:41:55] Ox0dea: And yet I kindly supplied it.
[18:41:59] Ox0dea: See how much I love you?
[18:42:07] Darmani: lmao is that love?
[18:42:10] Darmani: I don't want it.
[18:42:11] norc: Isn't Ox0dea gracious.
[18:42:12] FooMunki: has joined #ruby
[18:42:28] Darmani: norc: Like a god come down to grace me with his presence.
[18:42:38] Macaveli: has joined #ruby
[18:42:51] Gmi: has joined #ruby
[18:42:59] norc: Darmani: Respecting the hierarchy is a good start.
[18:43:03] jhass: can we skip the noise please? thanks
[18:43:18] norc: Ox0dea: Back to topic. What did you mean with regards to to_proc?
[18:43:22] colegatron: has joined #ruby
[18:43:28] Darmani: norc: Will do captain.
[18:43:38] Ox0dea: norc: `foo&:bar` parses.
[18:44:06] Ox0dea: >> [1,2,3].map&:succ
[18:44:07] ruboto: Ox0dea # => undefined method `&' for #<Enumerator: [1, 2, 3]:map> (NoMethodError) ...check link for more (https://eval.in/497813)
[18:44:20] Ox0dea: Er... it parses, but it doesn't do the right thing. :P
[18:44:35] mary5030: has joined #ruby
[18:44:42] norc: Yeah I can see that.
[18:44:54] jbrhbr: has joined #ruby
[18:44:59] Ox0dea: I thought it might've been something that needed taken into consideration for `&.`.
[18:45:17] Darmani: norc: I'm curious. How much would it cost to hire you for a tutoring sort of position?
[18:45:45] norc: Darmani: You would have to ask my employer.
[18:46:01] eam: Darmani: I'll tutor you for free, if you ask directed and specific questions
[18:46:14] sivam: has left #ruby: ()
[18:46:26] Darmani: eam: umm. What's your favorite color?
[18:46:37] eam: Darmani: questions related to your ruby issue
[18:46:48] Darmani: eam: I know I'm kidding =P
[18:46:59] Darmani: eam: Thanks though I'll pm you if that's cool(:
[18:47:08] eam: well, I'd rather do it in the channel so everyone can learn too
[18:47:28] Darmani: But they don't want me to ask questions if I don't google the shit out of them first lol
[18:47:34] eam: what would help is to phrase stuff like "I tried X in implementing each() but I'm stuck on Y"
[18:47:41] norc: Ox0dea: Checking now, I have absolutely no clue how &:sym is implemented.
[18:47:55] eam: you don't need to google -- but being more specific about what you've tried and where you're confused is pretty important
[18:48:08] jhass: ?answers Darmani
[18:48:08] ruboto: Darmani, How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
[18:48:18] Darmani: eam: Ah. Okay will do.
[18:48:36] eam: see also http://www.catb.org/esr/faqs/smart-questions.html
[18:48:42] Darmani: jhass: Thanks you sir. I'll read that ^^
[18:48:47] Ox0dea: Darmani: How might you iterate over a collection without #each?
[18:48:56] jhass: ?guys Darmani
[18:48:57] ruboto: Darmani, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[18:49:25] Darmani: Ox0dea: For i in ___?
[18:49:29] eam: he didn't even say guys
[18:49:31] Darmani: I would assume.
[18:49:34] Ox0dea: Darmani: That's one way to do it, sure.
[18:49:35] baweaver: Python yeah
[18:49:41] jhass: eam: actually they did
[18:49:44] baweaver: Does Ruby have for in? Can't remember
[18:49:48] baweaver: never used it
[18:49:56] Ox0dea: It does, but it literally gets turned into a call to #each.
[18:50:01] momomomomo: has joined #ruby
[18:50:18] baweaver: I just never use it so I never remember :P
[18:50:19] Mon_Ouie: Also the iterator variable has a different reach than when you use #each
[18:50:23] Darmani: Ox0dea: hang on
[18:50:27] Ox0dea: >> class C; def each; 42 end end; for _ in C.new; end
[18:50:28] ruboto: Ox0dea # => 42 (https://eval.in/497814)
[18:50:31] norc: Darmani: But if you are curious, when we hire trainers for things, we usually expect to pay something around 4 figures a day.
[18:50:49] tubbo: jhass: [jhass] (jhass@aeshna.de): Jonne Ha??
[18:50:55] tubbo: jhass: so he knew you were a guy if he had WHOIS'ed you
[18:51:12] Darmani: norc: That's great. I'm swimming in money over here so let me just get my trust fund on it.
[18:51:21] eam: tubbo: look at you with your gender normative name bias
[18:51:24] pipework: jhass: Your website even has an email saying 'he' for your pronoun.
[18:51:28] norc: Darmani: Im not kidding.
[18:51:28] pipework: https://jhass.eu/aboutme.html
[18:51:30] craysiii: has joined #ruby
[18:51:40] Darmani: norc: Okay well I am lol
[18:51:46] pipework: I'd assume you'd fix that if a male pronoun wasn't preferable to you.
[18:51:53] jhass: you all, scroll up
[18:51:54] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[18:52:17] build22: has joined #ruby
[18:52:23] Darmani: Ox0dea: http://ideone.com/fZiqk0
[18:52:27] Darmani: It can't be that simple.
[18:52:34] tubbo: haha u right jhass
[18:52:35] pipework: Ha, found it!
[18:52:42] spider-mario: has joined #ruby
[18:52:44] Ox0dea: Darmani: And yet it is.
[18:52:50] Ox0dea: Elegance is bliss.
[18:53:12] Ox0dea: `yield` is a keyword, though; don't make it look like a method call.
[18:53:41] baweaver: plane time!
[18:53:49] Darmani: What does that mean.
[18:53:55] Darmani: Explain it to me like I'm 5 years old.
[18:54:10] jhass: it's just Ox0dea's OCD
[18:54:18] baweaver: has joined #ruby
[18:54:24] pipework: Ox0dea: Yeah, what's wrong with that?
[18:54:43] jhass: not that I don't share it ...
[18:54:44] pipework: The yield as a method part.
[18:55:02] ruboto: norc # => undefined local variable or method `q' for main:Object (NameError) ...check link for more (https://eval.in/497817)
[18:55:07] Ox0dea: pipework: Do you use parentheses with `return`?
[18:55:11] norc: Okay nevermind. This makes sense.
[18:55:20] Darmani: Well it doesn't matter anyway it's not like it works -__- http://ideone.com/fZiqk0
[18:55:21] pipework: Ox0dea: Oh! I thought you meant something else entirely.
[18:55:23] pipework: Not the parent.
[18:55:25] Mon_Ouie: Then again, in C, do you write sizeof(something) or sizeof something?
[18:55:26] norc: Or no this does not make any sense. What the heck
[18:55:36] Ox0dea: Mon_Ouie: I'll get my flamethrower.
[18:55:39] norc: Ox0dea: I cannot figure out in the slightest why this even compiles.
[18:55:50] pipework: I thought it was a technical design critique not a style one.
[18:55:51] norc: Parses even.
[18:55:51] Ox0dea: norc: s/compile/parse/?
[18:55:57] guacamole: has joined #ruby
[18:56:30] Ox0dea: norc: It's invoking #& with a Symbol argument.
[18:56:42] norc: Ox0dea: Ah no nevermind its clear.
[18:57:05] emilford: has joined #ruby
[18:57:06] gatman: has joined #ruby
[18:57:08] norc: Ox0dea: Its just some poor grammar rule naming there.
[18:57:21] Darmani: eam: So... Why doesn't this work? http://ideone.com/fZiqk0
[18:57:23] blackmesa: has joined #ruby
[18:57:25] Darmani: What am I not getting.
[18:57:45] jhass: Darmani: how do you define a constant?
[18:57:59] jhass: did you read the error output? "prog.rb:1: class/module name must be CONSTANT"
[18:58:06] Darmani: I did read that.
[18:58:15] jhass: did you spent thought on it?
[18:58:18] Darmani: okay I fixed it.
[18:58:21] Darmani: still doesn't work.
[18:58:25] jhass: I take that as a no then
[18:58:54] jhass: rinse and repeat
[18:59:04] jhass: read the error message, think about it
[18:59:19] Darmani: ACTION sigh
[18:59:20] tubbo: also look up how Ruby defineds what constants are
[18:59:32] drbrain: reload, Darmani is past the capitalization thing
[18:59:42] drbrain: now it is a scoping issue
[18:59:53] tubbo: oh cool it changes :D
[18:59:55] Darmani: drbrain: thank you.
[19:00:04] Darmani: drbrain: You're an angel sent from heaven.
[19:00:18] tubbo: Enumerable.module_eval bruh ;)
[19:00:23] tubbo: (don't do this)
[19:00:35] weemsledeux: has joined #ruby
[19:00:45] jhass: Darmani: do you know what the class of (1..5) is?
[19:00:58] Darmani: It's a range.
[19:01:17] jhass: what's the constant named?
[19:01:28] Darmani: Enumerables.
[19:01:48] Darmani: I don't know then.
[19:01:53] drbrain: the class name for a range
[19:01:55] jhass: I mean of the range class
[19:02:16] Darmani: Now I really don't know.
[19:02:30] Darmani: That makes sense.
[19:02:42] Darmani: I didn't know that was it's own class actually.
[19:02:49] jhass: do you know about classes and including modules in them?
[19:02:57] Ox0dea: >> (1..5).class # Check your priv^Wassumptions.
[19:02:58] ruboto: Ox0dea # => Range (https://eval.in/497818)
[19:03:08] bkxd: has joined #ruby
[19:03:13] Ox0dea: jhass: Definitely not yet.
[19:03:13] Darmani: jhass: sort of. You mean like Mixins?
[19:03:22] Ox0dea: (Sorry. <3)
[19:03:26] jhass: yes, that's another term used
[19:03:27] Darmani: Ox0dea: HA
[19:04:03] Darmani: So... Mixins.
[19:04:20] mic_e: has joined #ruby
[19:04:21] jhass: so, keeping that in mind, what does the error tell you, what might be a way to fix it?
[19:04:44] jhass: answer the first part separately first
[19:04:51] Darmani: Well there's something wrong with my method obviously.
[19:04:52] jhass: don't think about the second while answering it just yet
[19:05:04] Darmani: Do I have to include my Module before I define it???
[19:05:12] jhass: you're making wild assumptions, you're not trying to understand the error message
[19:05:13] jackjackdripper1: has joined #ruby
[19:05:31] Darmani: ACTION sighs
[19:05:37] Darmani: I'm just trying to understand.
[19:05:48] Ox0dea: Not hard enough, by our reckoning.
[19:06:00] jhass: or the wrong thing rather
[19:06:04] norc: Ox0dea: Figured it out. There is no interaction possible between the two.
[19:06:11] Darmani: Ox0dea: Have I told you what a wonderful human being you are?
[19:06:13] norc: A big hooray for the lookahead parser we have. :-)
[19:06:16] eam: it's hard for people who've trained very long and hard to frame questions productively to deal with someone without said training
[19:06:17] Ox0dea: Darmani: More than twice now.
[19:06:18] Darmani: I keep forgetting to tell you.
[19:06:25] Darmani: okay cool.
[19:06:37] norc: Ox0dea: If we keep this up, I might actually be good at Ruby some day. :o)
[19:06:45] Darmani: hey me too.
[19:07:04] jbrhbr: eam: indeed
[19:07:06] Ox0dea: norc: You know more about KRI's parser than, like, everybody here. :P
[19:07:28] Dimik: has joined #ruby
[19:07:31] Ox0dea: It's more Koichi's than anybody else's at this point.
[19:07:32] Darmani: okay so forget the stupid module -__-
[19:07:33] Darmani: http://ideone.com/fZiqk0
[19:07:34] jhass: Darmani: well, since you want to ignore my question, yes, an include is missing and the error message is throwing you a very big hint at that
[19:07:37] dmcp: has joined #ruby
[19:07:51] Darmani: jhass: Oh my bad, I forgot you asked me something.
[19:07:58] tvw: has joined #ruby
[19:08:04] jhass: within a minute already?
[19:08:05] agentmeerkat: has joined #ruby
[19:08:13] jhass: I think you need to train your focus
[19:08:21] Ox0dea: Focus your train!
[19:08:32] Darmani: Okay my train is focused.
[19:08:54] norc: Ox0dea: There is a lot of scary shit in the parser though, enough to think that there are some really bizarre syntax things possible.
[19:08:55] nertzy: has joined #ruby
[19:09:08] Ox0dea: norc: I can attest to that.
[19:09:38] Ox0dea: whitequark/parser contains (or did) some samples it had to bail on.
[19:10:10] Darmani: Wait but...
[19:10:12] jbrhbr: the obfuscated ruby contest thing is enough proof of that for me
[19:10:12] Darmani: Why did that work...
[19:10:25] Darmani: http://ideone.com/fZiqk0
[19:10:27] Darmani: I don't get it.
[19:10:28] Ox0dea: jbrhbr: TRIC?
[19:10:50] jbrhbr: https://github.com/tric/trick2015
[19:10:55] jhass: Darmani: you should discard it and try to find another solution
[19:11:01] norc: Ox0dea: Well, if the whole parser got rewritten as a recursive descent parser - it would probably eliminate most of it and allow for new things.
[19:11:07] jhass: explaining it requires understanding the other solution(s) first
[19:11:13] Darmani: jhass: I should? why???
[19:11:18] jhass: see above
[19:11:20] norc: Ox0dea: There is a lot of it to make a non LALR syntax work somehow.
[19:11:28] Darmani: What other solutions....?
[19:11:36] jhass: the less improper ones
[19:11:40] zotherstupidguy: has joined #ruby
[19:11:54] Darmani: ACTION sighs
[19:12:06] Ox0dea: norc: I like this one: https://eval.in/497819
[19:12:26] Ox0dea: It's dumb and not at all actually stressing the parser, but I think it's cute.
[19:12:36] zotherstupidguy: is there a #channel for middleman?
[19:13:11] psye: has joined #ruby
[19:13:12] Darmani: jhass: Okay so why does the error message say undefined error
[19:13:15] jhass: zotherstupidguy: /msg alis help
[19:13:15] Darmani: It's clearly defined.
[19:13:23] jhass: Darmani: you tell me!
[19:13:29] Darmani: I DONT KNOW
[19:13:46] Darmani: I have no idea.
[19:13:48] nunchuck: has joined #ruby
[19:13:54] jhass: if you know about mixins you do
[19:14:10] Ox0dea: >> # 0xaedi # Darmani: I found an idea.
[19:14:11] ruboto: Ox0dea # => nil (https://eval.in/497821)
[19:14:15] Darmani: But.... you said.....
[19:14:19] norc: Ox0dea: Oh yeah. Easy one to spot however. But it looks surprising at first.
[19:14:20] Ox0dea: >> 0xaedi
[19:14:21] ruboto: Ox0dea # => (0+2797i) (https://eval.in/497822)
[19:14:24] jhass: and given the frequency with which you write I don't believe you that you spent serious thought on it
[19:14:33] Ox0dea: And it's prime!
[19:15:02] pawnbox: has joined #ruby
[19:15:04] zotherstupidguy: Darmani whats the q?
[19:15:39] asmodlol: has joined #ruby
[19:15:40] Darmani: zotherstupidguy: Meh it's nothing. I have like 6 people helping me.
[19:15:43] Darmani: I'll figure it out.
[19:15:47] Darmani: Thank you though.
[19:15:49] radgeRayden: has joined #ruby
[19:16:16] Xeago: has joined #ruby
[19:16:20] codecop: has joined #ruby
[19:16:28] s00pcan: has joined #ruby
[19:16:33] Darmani: jhass: Well if the answer has to do with Mixins. I obviously don't understand them as well as I should.
[19:16:42] Darmani: I thought I just needed to require the module I made.
[19:16:43] Darmani: But that's not it.
[19:16:59] ta: has joined #ruby
[19:17:09] Ishido: has joined #ruby
[19:17:17] jhass: do you know the difference between a method and a function?
[19:17:40] pawnbox: has joined #ruby
[19:17:43] norc: Ox0dea: Though I think the issue here is just rather simplistic syntax highlighting on eval.in side.
[19:17:53] norc: It should be able to highlight the actual string.
[19:18:22] jhass: Darmani: look it up then ;)
[19:18:56] Ox0dea: norc: Aye, Vim handles it just fine.
[19:19:18] Ox0dea: I was pleased to see eval.in doesn't. :)
[19:19:32] jhass: and if you workshop or whatever throws you into all this claiming it's okay for complete beginners, it's bullshit, should be distrusted and replaced ;)
[19:19:39] norc: Ox0dea: Im pleased to see eval.in has Ruby 2.3 already. :)
[19:19:55] norc: Though the whole thing feels completely lack luster already.
[19:20:06] chipotle: has joined #ruby
[19:20:18] solars: has joined #ruby
[19:20:56] Ox0dea: I do think `%d[1 2 3]` and `[1, 2r, 3.14].all?(Numeric)` would've been shiny.
[19:21:02] norc: Here we go again....
[19:21:08] Ox0dea: I'll stop, then.
[19:21:16] norc: No it is fine, I thought about it a good while and you are absolutely right.
[19:21:50] norc: The second I would see actual use in a lot of places.
[19:21:57] norc: The first is just, well - it should have been there already.
[19:22:20] Icey: has joined #ruby
[19:22:22] Respek: has joined #ruby
[19:22:51] norc: >> puts(1 if 1)
[19:22:52] ruboto: norc # => /tmp/execpad-a03929076af6/source-a03929076af6:2: syntax error, unexpected modifier_if, expecting ')' ...check link for more (https://eval.in/497826)
[19:23:08] norc: This one is still bugging me. :S
[19:23:28] cmolenda: has joined #ruby
[19:23:31] jbrhbr: norc: you mean it's bugging you because you're reading through the parser code to try and understand why?
[19:23:45] norc: jbrhbr: I think I understand why at this point.
[19:24:10] guacamole: has joined #ruby
[19:24:19] norc: Im just a bit scared to actually try and patch it.
[19:24:39] stannard: has joined #ruby
[19:24:54] cmolenda_: has joined #ruby
[19:25:12] stannard: has joined #ruby
[19:26:21] weemsledeux: has joined #ruby
[19:26:59] skade: has joined #ruby
[19:27:20] norc: I mean it would actually be sweet, since it would make things like: method(arg, {opt: 1} if setting.true?) a bit more readable than wrapping it inside parens.
[19:27:55] norc: Not that a setting.true? would by itself help with readability, but anyway...
[19:27:59] Darmani: http://stackoverflow.com/questions/155609/difference-between-a-method-and-a-function
[19:28:15] Darmani: Still confused.
[19:28:18] Darmani: ACTION sigh
[19:28:35] jbrhbr: norc: would the oddities around the english logical operators also be fixed by your change?
[19:28:52] infinitone: has joined #ruby
[19:28:57] norc: jbrhbr: I would just ninja remove them. Along with keyword_super.
[19:29:09] norc: And hope the japanese folks wont notice.
[19:29:09] jbrhbr: that's one way to do it hehe
[19:29:38] Xeago: has joined #ruby
[19:29:39] arup_r: has joined #ruby
[19:29:46] norc: Darmani: Feel free to just ignore the difference, and consider them the same thing for now.
[19:30:17] tubbo: Darmani: what are you confused about?
[19:30:47] Darmani: http://ideone.com/fZiqk0
[19:30:50] Darmani: Why this isn't working.
[19:31:02] Xeago: has joined #ruby
[19:31:04] Ox0dea: jbrhbr: They're not odd if you use them appropriately. :)
[19:31:17] tubbo: Darmani: no i meant with the SO article
[19:31:21] chouhoul_: has joined #ruby
[19:31:29] tubbo: explains the diff between a method and a function pretty clearly imho
[19:31:33] jbrhbr: heh, happy new year Ox!
[19:31:35] Ox0dea: Darmani: Name your module Enumerable. :P
[19:31:59] norc: Ox0dea: They are just odd in that too many people abuse them, and sooner or later you will work on a project that is just riddled with a mixture of both, filled with parens to "fix" the wrong precedence order...
[19:32:03] norc: Which is annoying.
[19:32:07] Ox0dea: >> 'Happy New Year, #rudy! <3'.bytes.reduce :+
[19:32:08] ruboto: Ox0dea # => 2016 (https://eval.in/497827)
[19:32:09] Darmani: tubbo: I guess I'm not sure how that helps me.
[19:32:17] Darmani: Ox0dea: And I did. Now what. Lol
[19:32:20] tubbo: Darmani: have you done any ruby tutorials or anything to try and learn more about how the language works and its syntax?
[19:32:21] Ox0dea: Darmani: You win.
[19:32:39] chouhoul_: has joined #ruby
[19:32:46] Darmani: tubbo: I have. Obviously not well enough though.
[19:32:48] norc: Darmani: Congratulations. You just monkey patched a stdlib module. Now don't do it again!
[19:33:00] centrx: bad monkey
[19:33:08] Darmani: a stdlib what now??
[19:33:12] Darmani: What does that even mean Norc
[19:33:13] norc: standard library
[19:33:24] norc: Its the thing Ruby comes out with out of the box.
[19:33:29] tubbo: Darmani: stdlib, module, etc...these are like basic programming terms that are generic and used throughout the industry
[19:33:30] Darmani: I understand.
[19:33:36] Darmani: yeah yeah I get it.
[19:33:48] yes`r: has joined #ruby
[19:33:51] tubbo: although a ruby module is of course different than other modules, like in JS
[19:33:58] yqt: has joined #ruby
[19:34:18] norc: tubbo: Yup. Like JS has absolutely no notion of modules.
[19:34:23] norc: You mean that difference?
[19:34:48] p|p: has joined #ruby
[19:35:34] jackjackdripper: has joined #ruby
[19:35:34] tubbo: norc: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Using
[19:35:38] tubbo: "module" => 1 of 70
[19:36:06] tubbo: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
[19:36:16] tubbo: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export
[19:36:18] rwy: has joined #ruby
[19:36:48] norc: tubbo: Oh oh. Is that from ECMA6 and I missed it completely?
[19:37:22] norc: tubbo: I kinda like how that feature is not implemented on any browser yet. :-)
[19:37:36] nickjj: has joined #ruby
[19:37:54] cpup: has joined #ruby
[19:38:55] skade: has joined #ruby
[19:39:06] norc: tubbo: Anyhow. I stand corrected.
[19:39:40] joonty: has joined #ruby
[19:39:57] zeroDivisible: has joined #ruby
[19:40:00] tubbo: norc: yup :)
[19:40:24] tubbo: i'm surprised that any of the ES6 features are implemented in any browser
[19:40:45] norc: Well, Promises are about the most exciting thing in my opinion.
[19:40:52] ta: has joined #ruby
[19:41:34] Xeago: has joined #ruby
[19:42:51] ta: has joined #ruby
[19:42:58] tubbo: i like the class syntax
[19:43:03] norc: Well its just syntactic sugar.
[19:43:04] tubbo: but modules are probably the most important thing
[19:43:20] norc: And the issue with that is is that people will step away from looking at JS as a prototype based language.
[19:43:32] tubbo: that's my fear as well
[19:43:59] chipotle: has joined #ruby
[19:44:39] mary5030: has joined #ruby
[19:44:44] norc: Well, Promises by themselves greatly reduce the need to load jQuery, promisejs or your own implementation in half the implementations - just because you want that pattern.
[19:44:58] tubbo: norc: did that happen with coffeescript? did people use CS as a classically-inherited language?
[19:45:01] karapetyan: has joined #ruby
[19:45:05] norc: I absolutely avoided it like the pest.
[19:45:46] norc: The syntax is fine and has no issues, and I hate the python flavor it has.
[19:46:23] tubbo: norc: i had to debug coffeescript that was written without the prototypal mindset, it was not fun
[19:46:28] pawnbox_: has joined #ruby
[19:46:32] tubbo: just wondering if most people did that or if this was just one shitty programmer
[19:46:34] tubbo: (he was pretty shitty)
[19:46:40] norc: tubbo: I even regret starting out with jQuery, since it completely hides away how events work for example.
[19:46:50] DonOtreply: has joined #ruby
[19:46:55] tubbo: norc: how does it hide away how events work?
[19:47:04] norc: Or how you just use $('#id') all around, ignoring that JS has getElementById out of the box.
[19:47:13] norc: tubbo: Things like delegated events for example.
[19:47:33] frog0909: has joined #ruby
[19:47:35] bensarz: has joined #ruby
[19:47:42] malconis: has joined #ruby
[19:47:43] norc: tubbo: You dont even have to know how or why $('#parent').on('click', '.some-thing', func) works.
[19:47:57] kirun: has joined #ruby
[19:47:59] norc: tubbo: Or the iterator methods allow you to ignore how objects and attributes work in JS
[19:48:01] tubbo: norc: ahhh right, yeah that's a little confusing. i definitely don't use that very much.
[19:48:04] norc: Which ends up in you making mistakes later on.
[19:48:33] tubbo: norc: iterator methods *might* go away :) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
[19:48:36] norc: I mean in the end jQuery provides a lot of utility, but you should learn the language first to understand why it is useful.
[19:49:00] norc: tubbo: Oh yes. Seeing as I come from C++ I would very much welcome that.
[19:49:02] avenj: has joined #ruby
[19:49:12] tubbo: it's a little ugly but really neat
[19:49:18] tubbo: gonna probably use it for https://github.com/tubbo/nquery
[19:49:31] norc: Well, iterators are absolutely ugly to use in C++ too, but they are useful there too.
[19:50:23] tubbo: i just wish it was like Ruby wherein all you have to do is mix in a module and define each()
[19:50:31] norc: tubbo: Also all the magic things like $ itself give you the impression that jQuery modifies the language.
[19:50:34] minimalism: has joined #ruby
[19:50:50] norc: But if you understand that $ is just a function object that just acts differently depending on what it gets passed, things are a lot more obvious
[19:50:58] skcin7: has joined #ruby
[19:51:12] norc: Starting developers completely dont understand it and often end up in ##jquery asking all kinds of weird questions.
[19:51:13] tubbo: i dunno, i never got that impression
[19:51:25] tubbo: but i can see why one might
[19:52:19] Darin_: has joined #ruby
[19:52:45] norc: tubbo: Or another common problem is cloning an object.
[19:52:59] ur5us: has joined #ruby
[19:53:06] Darin_: Hey, if I want to call a function in another function as a result of a if/else statement do I just say if x (name of method) else (name of other method)?
[19:53:22] ur5us: has joined #ruby
[19:53:23] norc: darin_: Try it out and see what happens.
[19:53:30] tubbo: norc: compared to the DOM, jQuery is the greatest API ever made.
[19:53:49] norc: tubbo: Absolutely. A lot of it has become obsolete due to new features in ECMAScript however.
[19:54:00] Darin_: I did, but I suck at coding and Im not sure what my problem is. Either way, it's not getting the result I want.
[19:54:02] norc: But the sheer power of selectors alone just makes me keep it.
[19:54:14] norc: darin_: Then share us your code and the error message you are getting
[19:54:17] Darmani: Ox0dea: Brehhh
[19:54:19] norc: Darmani: https://gist.github.com
[19:54:20] norc: Use this.
[19:54:22] Darmani: I've done it.
[19:54:27] Ox0dea: All hail.
[19:54:29] norc: darin_: ^- sorry wrong name.
[19:54:35] tubbo: norc: that's kinda why i made nQuery. it's a light wrapper around document.querySelectorAll and element.addEventListener.
[19:54:36] Darin_: I'm not getting an error message, Im not getting anything.
[19:54:37] tAn: has joined #ruby
[19:54:45] Darmani: http://ideone.com/fZiqk0
[19:54:47] norc: tubbo: Can we hold this discussion off while we have ruby questions?
[19:54:54] Darmani: I believe I've earned a cookie.
[19:54:58] jackjackdripper1: has joined #ruby
[19:55:01] Ox0dea: ?cookie Darmani
[19:55:01] ruboto: Darmani, here's your cookie: ????
[19:55:10] Darin_: I don't mind... if I am only speaking for myself.
[19:55:15] Darmani: ACTION eats cookie
[19:55:24] tubbo: darin_: ?gist the code you're working with
[19:55:26] matp: has joined #ruby
[19:55:26] Darin_: Im on duty out in the gulf streaming wifi from my phone. I've got all the time in the world.
[19:55:31] Ox0dea: Darmani: Wait! Give that back.
[19:55:36] Darin_: Persian gulf that is.
[19:55:40] tubbo: yeah we figured
[19:55:49] tubbo: like why would you be in the gulf of mexico ;)
[19:55:58] Darmani: I'm just going to point out how stupid that is that I have to "include" my module when it's in the exact same place as the rest of my code.
[19:56:03] tubbo: unless cuba has nukes pointed at us again
[19:56:03] Darin_: haha. I don't know maybe I worked on a oil rig?
[19:56:11] Darmani: If it was in another file, I'd get it.
[19:56:15] norc: darin_: Its just something that a lot of people here try to do. So please, share your gist with us so we can help you with your problem.
[19:56:29] tubbo: Darmani: not to be a dick but you really have no room to be complaining about a language you don't even know yet. :P
[19:56:38] Ox0dea: Darmani: You misunderstand the point of `include`.
[19:56:50] Ox0dea: Also this: https://eval.in/497830
[19:57:09] Darmani: Ox0dea: Lol
[19:57:16] norc: Darmani: Ruby include is not like Pythons import. It is completely different.
[19:57:33] karapetyan: has joined #ruby
[19:57:38] Darmani: Well I'm just glad I figured it out.
[19:57:51] norc: Darmani: The closest thing to what you thought it was is "require".
[19:58:04] Darmani: I knew I was in the right ballpark.
[19:58:17] Ox0dea: In any case, g2g bbl ily
[19:58:20] Darmani: I just didn't know you had to do that if your module was in the same file as the rest of your code.
[19:58:25] norc: Ox0dea: See you around.
[19:58:29] Ox0dea: Au revoir.
[19:58:31] Darmani: Ox0dea: bb baby<3
[19:58:45] norc: Darmani: You still misunderstand completely/
[19:59:14] Darmani: norc: It wasn't within the same scope as the rest of the code.
[19:59:26] Darmani: meh. whatever.
[19:59:28] Darmani: never mind.
[19:59:28] DoubleMalt: has joined #ruby
[19:59:30] speakingcode: has joined #ruby
[19:59:32] norc: Darmani: Let me explain.
[20:00:06] Darin_: https://gist.github.com/darinthompson/e687427b5a19f811be11 Here you are. Sorry it took so long
[20:00:22] build22: has joined #ruby
[20:00:26] build22: has left #ruby: ()
[20:00:59] momomomomo: has joined #ruby
[20:01:10] MattV: I'm trying to optimize an Ansible playbook where the Ruby install is the longest running step (typically 7+ minutes). Any tips for speeding up "rbenv install 2.1.2"?
[20:01:33] eam: MattV: try profiling it. Is it installing a precompiled ruby?
[20:01:45] norc: Darmani:
[20:01:45] norc: https://eval.in/497833
[20:01:58] norc: That code reflects what a Module is and how it should be used.
[20:02:40] karapetyan: has joined #ruby
[20:02:44] eam: MattV: likely the time is either spent in downloading the stuff to install (in which case, caching the objects will be a big win) or in compiling a custom ruby (is a native prebuilt ruby available for your platform/version target?)
[20:02:45] Darin_: And when I actually give some arguments, the numbers are way off.
[20:02:53] MattV: eam: I'm not familiar with profiling Ruby. Any resources you'd point me to? I do know that it's fetching https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2
[20:03:07] Darmani: norc: So you can use the same word in different instances?
[20:03:10] Darmani: That's what it's for?
[20:03:20] Diranged: has joined #ruby
[20:03:24] norc: Darmani: Think of it the other way around. It is for mixing common functionality into seperate things
[20:03:26] eam: MattV: you can do some simple profiling by just watching the output and seeing what happens when, since rvm prints out what it's doing
[20:03:28] norc: Darmani: Let me modify and show you
[20:03:59] Diranged: Hey on an older Ubuntu 12 system, we're installing the ruby-rest-client package which istalls the gem into //usr/lib/ruby/vendor_ruby/restclient .. but we're finding that it doesnt show up in gem list, so anything that depends on it tries to install the latest rest-client package.
[20:04:12] Diranged: On ubunt 14 (with rubygems-integration instead of rubygems), works fine..
[20:04:28] Diranged: I know it sucks to support Ubuntu 12, but we hae to right now.. is there a hack to make gem properly see gems in /usr/lib/ruby/vendor_ruby/restclient?
[20:04:32] Diranged: er .. in vendor_ruby
[20:04:36] MattV: eam: As far as I can tell, it shouldn't be the download that's taking so long. When I try downloading the https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2 file manually, it typically downloads in less than 30 seconds.
[20:04:49] brendan-: Diranged: can you add that path to the GEM_PATH?
[20:05:00] brendan-: (i'm shooting in the dark)
[20:05:55] norc: Darmani: https://eval.in/497836
[20:05:57] fourq: has joined #ruby
[20:06:06] eam: MattV: sorry I just noticed you said rbenv not rvm - does it have a verbose mode where it prints out what it's doing?
[20:06:09] ta: has joined #ruby
[20:06:20] bmalum: has joined #ruby
[20:06:24] norc: MattV: You could look into skipping the dev documentations, the whole ri generation thing makes up for considerable time.
[20:06:31] eam: if so, try piping it through something to attach a timestamp to each line, so you can see where it's spending time. Something like |ruby -ne'puts Time.now.to_s + " " + $_'
[20:06:59] Diranged: brendan-: trid that, no change?
[20:07:02] norc: MattV: For me a fresh build on trunk usually takes around 2 1/2 minutes on my old macbook air.
[20:07:24] MattV: eam: From what I could tell in the documentation, it doesn't have a ???verbose flag.
[20:07:43] norc: Diranged: It is best to not install Ruby things through your package manager at all.
[20:08:00] Darmani: norc: Okay.
[20:08:02] Darmani: I think I get it.
[20:08:12] Diranged: norc: thats not an option for me in this case..
[20:08:21] Diranged: http://pastie.org/10672003 < here's the gem path as ruby sees it..
[20:09:02] [Butch]: has joined #ruby
[20:09:37] Mon_Ouie: You can't rely on printing $: to know from which paths Ruby will fetch gems though
[20:09:44] norc: Darmani: In other words, include takes a module and adds the instance methods to your classes instance methods.
[20:09:57] Mon_Ouie: Rubygems works by adding elements to $: when the regular require fails
[20:09:58] norc: Darmani: Just ignore that you can call include outside a class since that will just confuse things.
[20:10:15] Mon_Ouie: (also you need to require rubygems in 1.8)
[20:10:32] Darmani: norc: Okay. Will do.
[20:10:44] MattV: norc: Thanks for the reference point. I thought 7+ minutes seemed too long.
[20:10:49] Darin_: Figured it out!
[20:11:44] norc: darin_: Those problems are the best. :)
[20:11:58] Scripore: has joined #ruby
[20:12:36] Darin_: I had added a then statement to my if statement that didn't need to be there.
[20:12:38] norc: MattV: Are there any NFS mounts involved in the entire process? Maybe some tmp directory?
[20:12:45] sandstrom: has joined #ruby
[20:12:54] asmodlol: has joined #ruby
[20:13:13] norc: darin_: Evidently it needed to be there.
[20:13:20] mistermocha: has joined #ruby
[20:13:51] Darin_: I was asking it to do something else, before I told it what to do "if" something even finished.
[20:13:53] pawnbox: has joined #ruby
[20:15:17] norc: darin_: Indeed. Note that the same thing applies to unless (which just inverts the condition)
[20:15:33] cmolenda: has joined #ruby
[20:16:08] synthroid: has joined #ruby
[20:16:08] Darin_: True, OK so now I have another question
[20:16:20] Darin_: let me update my gist real quick first
[20:18:07] Darin_: https://gist.github.com/darinthompson/e687427b5a19f811be11 if I don't give it any arguments, it works just fine. But If I try to give it some arguments to start out it will run but not print anything to the console
[20:18:21] MattV: norc: There are NFS mounts on the VM where Ruby is being installed, but I don't think Ruby is installing to one of the NFS mounts. I will double check though. Thanks!
[20:18:25] tomchapin: has joined #ruby
[20:19:37] tAn: has joined #ruby
[20:19:42] lxsameer: has joined #ruby
[20:19:43] lxsameer: has joined #ruby
[20:20:04] apeiros: darin_: you know, if you call the gist .rb, it will properly highlight the code
[20:20:16] skcin7: has joined #ruby
[20:20:19] eam: norc: your macbook air would probably thrash most spinny-disk based servers on compilation time
[20:20:26] celly: has joined #ruby
[20:20:36] eam: 7 minutes on a hard disk vs 2 minutes on an SSD sounds about right
[20:20:44] Darin_: ??? Not sure I know what you mean.
[20:20:56] norc: eam: spinny what?
[20:21:08] eam: indeed -- but MattV may have a disk :)
[20:21:18] Darin_: Oh, never mind. I see now.thanks I'll fix that.
[20:21:33] norc: eam: Sorry, Ive been using ssds for such a long time now, I have kind of forgotten why I did the change in the first place.
[20:21:35] norc: You are absolutely right.
[20:21:36] apeiros: darin_: search for "gistfile1.txt"
[20:21:40] apeiros: darin_: ah ok
[20:21:46] Darin_: https://gist.github.com/darinthompson/e687427b5a19f811be11
[20:21:52] apeiros: darin_: and the reason nothing is printed - because you don't call any method which prints anything
[20:22:23] eam: we no longer run any of our datastore systems on spinning rust, it's just way too slow
[20:22:26] apeiros: (well, you do: get_temparature, but that only prints if no temperature was given in the args)
[20:22:28] MattV: eam: I do have an SSD in my host OS (OS X). The Ruby install is happening in an Ubuntu guest. I'm not sure how much overhead VirtualBox adds though.
[20:22:42] eam: MattV: oh, VM can add a great deal of latency
[20:22:55] apeiros: eam: aren't you the one working in a shop with >10k servers?
[20:22:55] norc: eam: Honestly the fix for databases is not SSDs. It is just throwing so much RAM at it that it can hold the entire database in memory.
[20:23:11] norc: Which granted is more expensive, but *that* provides for real speed,.
[20:23:17] eam: apeiros: these days I'm working in a much smaller scale operation, but in the past, yes, >100k
[20:23:24] Darin_: I see that. I am learning that ugly code usually doesn't run right, and if it doesn't "feel" right, it probably isn't. And I added some trash to an if/then nested in the if/then statement and it just messed up.
[20:23:33] apeiros: oh, even 3 orders of magnitudes more :D
[20:23:59] eam: norc: except for write heavy loads
[20:24:04] chouhoulis: has joined #ruby
[20:24:07] eam: agreed re: caching however
[20:24:28] norc: eam: Yeah I suppose. Im just a bit biased since most my work was read focused.
[20:24:48] eam: yeah, I've done read heavy in the past (ad serving, search) and it's entirely as you describe
[20:24:48] norc: The work related to databases anyway.
[20:24:57] eam: now I do a lot of transactional stuff
[20:25:19] yes`r: has joined #ruby
[20:25:36] eam: a server grade ssd is stupid fast compared to the stuff in a laptop as well
[20:25:57] Channel6: has joined #ruby
[20:26:09] hobodave_: has joined #ruby
[20:26:14] Diranged: has left #ruby: ()
[20:26:54] eam: it's also very nice not having to constantly swap disks out of a huge array
[20:27:06] norc: eam: Though since I switched things have become much more relaxed. All our databases are stored on a clustered NFS solution for maximum availability (which has still fairly decent throughput, but horrid seek times for obvious reasons).
[20:27:19] norc: But they can still be held in memory.
[20:27:30] eam: yeah, it's always seeks and latency that are the killer
[20:28:28] niemcu: has joined #ruby
[20:28:40] norc: I think for us this NFS cluster is actually ideal, since it is a transparent solution to replication which adds 0 maintenance or setup work for us.
[20:28:42] asmodlol: has joined #ruby
[20:29:20] eam: well, what do you use to actually replicate the data? A filer or some kind of block level replication?
[20:29:34] norc: NetApp Filer
[20:29:51] eam: standard and solid, if expensive :)
[20:30:42] mistermo_: has joined #ruby
[20:30:50] norc: Yeah. It also serves the VMware images, so it simultaneously provides automatic recovery on everything.
[20:31:35] norc: eam: I must say though, they are worth their money.
[20:31:44] eam: works great provided your scale is within the i/o performance of a single filer
[20:31:52] eam: which many, many tasks are
[20:32:05] chipotle: has joined #ruby
[20:32:09] yfeldblum: has joined #ruby
[20:32:18] eam: yeah, outsourcing that kind of complexity is generally worth the cost
[20:32:31] norc: Yeah. Even things like disk replacement happens completely automatically.
[20:32:39] sandstrom: has joined #ruby
[20:32:47] norc: (And we have them on-site)
[20:32:49] roshanavand: has joined #ruby
[20:32:57] norc: I was really amazed by their service.
[20:33:33] FernandoBasso: has joined #ruby
[20:33:41] norc: eam: How do you have replication set up for your databases?
[20:33:46] Macaveli: has joined #ruby
[20:34:11] apeiros: eam: ssd stupid fast compared to laptops - even last gen laptops? iirc apple uses ssds which provide >1GB/s of throughput?
[20:35:42] apeiros: (I have zero knowledge about server ssds - so honest question :D)
[20:36:13] eam: norc: database level replication, delayed replication slaves, multi-site
[20:36:15] freerobby: has joined #ruby
[20:36:21] snockerton: has joined #ruby
[20:36:24] eam: varies by application
[20:36:38] eam: apeiros: I'm less familiar with desktop products but I believe so
[20:36:42] [dmp]: has joined #ruby
[20:36:49] polishdub: has joined #ruby
[20:37:06] curses: has joined #ruby
[20:37:47] Coldblackice: has joined #ruby
[20:37:53] eam: the thing about consumer grade ssd is they can't take enough writes to serve a production database
[20:38:09] eam: unless you have a mostly r/o dataset
[20:38:11] snowy: has joined #ruby
[20:38:28] mary5030: has joined #ruby
[20:39:03] apeiros: ah, since consumer grade ssd is probably optimized for read as that's what consumers do most?
[20:39:30] eam: it's primarily a matter of how the error correction works, and how much unused capacity the device has to remap failing cells
[20:39:45] [dmp]: has joined #ruby
[20:40:03] eam: ssd is essentially a game of "how much extra room did we give you to compensate for the periodic and inevitable wear failures"
[20:40:37] eam: hard drives do the same thing with remapping failing sectors (the g-list), but not on the same scale
[20:41:13] eam: if you get a refurb hard disk don't be surprised if the i/o performance is degraded due to extra seeks from the remapped areas :)
[20:41:53] eam: no seeks on an ssd so the degredation doesn't tend to degrade performance -- it's just that you eventually run out of cells
[20:42:50] chouhoulis: has joined #ruby
[20:43:52] pawnbox: has joined #ruby
[20:44:22] A124: has joined #ruby
[20:44:32] eam: looks like apple ssd claims around 40k iops (vs hundreds for disks) -- and I think the high end fusionios claim 1M
[20:44:57] apeiros: heh, a slight difference :D
[20:45:08] eam: that may mostly be due to PCIe though, and maybe apple's using that now
[20:45:21] chipotle: has joined #ruby
[20:45:34] bmalum: has joined #ruby
[20:45:34] eam: going via a drive bus is the bottleneck (which is fantastic, and nuts)
[20:45:59] apeiros: afaik apple does use PCIe by now, yes
[20:46:10] eam: maybe they have similar performance now
[20:47:28] apeiros: they claim "up to 2.0GBps"
[20:47:37] apeiros: and if they use the right acronym, that's GBytes, not Gbits :)
[20:48:23] apeiros: I assume a single (or a combination of) IOP reads/writes a chunk of data, so that can't be directly translated
[20:48:45] norc: apeiros: I got a question. Do you have to use a HTTP proxy for your macbook at work?
[20:48:49] bkxd: has joined #ruby
[20:48:57] apeiros: norc: sadly, yes
[20:49:02] eam: ah yeah, they switched to pcie cards in 2015
[20:49:15] norc: apeiros: And do have multiple network locations, some with HTTP proxy and some without?
[20:49:27] eam: apeiros: that's not far off the PCIe bus limits depending on the configuration. Crazy fast
[20:49:55] norc: And this surely must be annoying with your bash environment variables
[20:49:59] eam: Apple's Samsung-made PCIe 3.0 flash card in the 2015 MacBook Pro, which comes with 128GB, 256GB and 512GB and 1TB capacities, went from a PCIe 2.0 x2 (or two I/O lanes) in the previous model to a PCIe 3.0 x4 (four I/O lanes).
[20:50:32] apeiros: norc: I think I've 4 set up regarding proxies
[20:50:41] apeiros: http_proxy, https_proxy, ftp_proxy and no_proxy
[20:50:55] apeiros: (with no_proxy of course not mentioning the protocol, because fuck what)
[20:50:56] norc: apeiros: I just figured out that bash can simply set up a signal handler for USR1. I also found out that fswatch can watch file changes. I also found out which core modules changes when a network location changes. I also found out how to dynamically probe for the highest priority network services proxy..
[20:51:02] norc: apeiros: Want me to go on? :-)
[20:51:19] apeiros: ah, you mean that way "multiple network locations"
[20:51:36] apeiros: well, in bash I have a script which pings the proxy and turns on/off the env vars :)
[20:51:43] apeiros: and which I can trigger manually
[20:51:46] norc: I just got sick of doing this manually.
[20:51:53] norc: I figured out how to do this dynamically. Completely. :D
[20:52:13] norc: For all active interactive and non interactive bash shells
[20:52:17] apeiros: mine's too, but probably less elegant than yours, so - gladly will take a look at your solution :D
[20:52:33] apeiros: ah well, yeah, you have to start a new shell for it to take effect
[20:52:35] bmalum: has joined #ruby
[20:52:39] apeiros: (with mine)
[20:52:58] apeiros: I rarely need it though, since I rarely ever take my work laptop outside work
[20:53:04] eam: if you're trying to do complex stuff with proxy configuration -- have you looked into writing a proxy.pac?
[20:53:04] ellisTAA: has joined #ruby
[20:53:27] norc: eam: Nope what is that?
[20:53:28] apeiros: eam: that's what we use on the OS level, but that doesn't affect bash, or can it too?
[20:53:32] eam: https://en.wikipedia.org/wiki/Proxy_auto-config
[20:53:42] eam: oh, only good for browsers afaik
[20:53:44] karapetyan: has joined #ruby
[20:53:45] norc: eam: My main issue is just the env variables for bash. Especially current interactive shells.
[20:54:00] apeiros: eam: na, it's good for everything which uses the OS settings
[20:54:07] apeiros: but sadly Terminal.app isn't one of them :(
[20:54:09] norc: (well and some files for git and curl)
[20:54:16] norc: apeiros: *bash
[20:54:19] eam: ah interesting (I haven't done much with it myself, but I've seen others do complex things)
[20:54:36] apeiros: norc: Terminal.app would be what has to interact with the OS and "update" the running bash process
[20:54:43] norc: apeiros: Nope.
[20:54:50] apeiros: at least I don't see a patch to bash specifically for OSX :D
[20:55:05] apeiros: I mean: yes, you could do it. but that'd be ugly, no?
[20:55:15] eam: I actually have some code floating around to change env vars in existing bash processes ...
[20:55:21] apeiros: I'm curious to see your solution, though
[20:55:31] norc: apeiros: I dont use Terminal.app anyway.
[20:55:34] norc: iTerm all the way.
[20:55:45] norc: It is by far the best terminal emulator I have seen on any operating system.
[20:55:45] apeiros: norc: not using it. had issues with swiss german keyboard layout
[20:55:52] apeiros: and with problems I mean it crapped its pants
[20:56:02] norc: That sounds weird.
[20:56:05] apeiros: might be solved by now, it's been a while
[20:56:09] eam: I had to patch iterm2 to remove a bunch of bad behavior with ansi escape sequences
[20:56:20] eam: but it's pretty good otherwise
[20:56:31] norc: apeiros: I shall wrap it up tomorrow at work then. :)
[20:57:01] apeiros: norc: ????????
[20:57:13] apeiros: I think some of my coworkers will be even more happy about this than me :D
[20:57:27] apeiros: (they take their laptops home more often than I)
[20:57:27] norc: apeiros: My most important application is cntlm though.
[20:57:35] norc: (Since we are forced behind an NTLM proxy)
[20:57:43] slash_nick: I thought you were talking about BMC's Control-M
[20:58:00] apeiros: ah, no ntlm for us I believe
[20:58:19] Channel6: has joined #ruby
[20:58:29] norc: All the unixoid things just dont work with NTLM.
[20:58:47] djbkd: has joined #ruby
[20:58:58] norc: Also there is a serious bug with the OSX keychain that messes when you use Safari and Firefox at the same time.
[20:59:09] norc: So by using CNTLM you avoid all these headaches.
[20:59:33] ur5us: has joined #ruby
[20:59:35] karapetyan: has joined #ruby
[21:00:04] mistermocha: has joined #ruby
[21:01:13] apeiros: the bug in safari and firefox is only related to ntlm?
[21:01:42] ta0: will there ever come a day when ruby eliminates tail calls by default? why is that not a thing? recursion seems so natural sometimes
[21:02:16] norc: apeiros: As far as I know yes.
[21:02:24] norc: apeiros: And it has interactions with network mounts
[21:02:54] ta0: also if I create a nested hash with a block that uses &default_proc to nest, the depth to which I can index that hash is dependent on how far the stack will go, right? since it's calling that proc every time?
[21:02:57] norc: (i.e. if you have smb shares authenticating with the same credentials, things just break all the time and you cannot authenticate)
[21:05:38] eam: norc: you use iterm2 yeah? Try running this: echo -e '\033[;i'
[21:06:14] apeiros: eam: hacking foreign computers is illegal!!!!!1!!1!elf!
[21:06:40] norc: eam: wtf.
[21:06:47] norc: Like really. Wtf.
[21:06:53] aegis3121: has joined #ruby
[21:07:08] eam: so once I had a server which happened to be spitting that byte sequence to its console (and thus into my terminal) and I couldn't work on it cuz ... yeah
[21:07:12] apeiros: eam: is that an empty escape sequence?
[21:07:30] eam: https://github.com/eam/iTerm2/commit/68c5c51afdba876fcf3e698a8fcff177ac29bb18
[21:07:32] apeiros: oh wait, no, the ones I know end with m, not ;
[21:07:45] eam: https://www.iterm2.com/documentation-escape-codes.html
[21:08:13] norc: More wtf.
[21:08:20] adaedra: There's an option to disable that iirc.
[21:08:32] eam: some can be disabled, some can't (the print dialog can be)
[21:08:57] FooMunki: has joined #ruby
[21:09:03] eam: iterm2 added some custom sequences too, identified by the number 1337 ...
[21:09:27] norc: eam: I looked at it 3 times again, and then looked up and read "iTerm 2 [...] does amazing things".
[21:09:47] norc: It suddenly became quite comical.
[21:09:52] eam: it does indeed
[21:10:23] eam: anyway, some random server somewhere, for some stupid reason, sent that sequence while doing a POST -- which is how I discovered it
[21:10:56] eam: big WTF day for me that day, let me tell you
[21:11:17] norc: I can only imagine.
[21:11:19] eam: but yeah if you want to change someone's iterm theme because they catted your textfile -- that's how to do it
[21:11:34] Prominent: has joined #ruby
[21:12:02] drys: has joined #ruby
[21:12:18] adaedra: it's not an iterm-only feature.
[21:13:53] pawnbox: has joined #ruby
[21:14:49] blackgoat: has joined #ruby
[21:15:19] eam: the 1337 codes are
[21:16:53] solars: has joined #ruby
[21:17:04] mistermocha: has joined #ruby
[21:17:10] snowy: has joined #ruby
[21:17:10] ur5us: has joined #ruby
[21:20:26] jobewan: has joined #ruby
[21:20:43] drys: please guys how do i solve this problem. since there is no single video format supported by the web browsers, developing a video streaming site would mean i would encode and upload the same video with three different format..this would consume server space, i have over a 1000 video and each is as large as 1.5gb
[21:21:55] Radar: drys: Upload to Vimeo and embed the Vimeo player on your site?
[21:22:22] eam: 1.5T of space isn't a lot
[21:22:51] eam: obtaining that kind of storage is substantially cheaper than trying to address the browser codec issue
[21:24:06] norc: People need to stop worrying about such things themselves. ;-)
[21:24:37] atmosx: eam: that sequence prints a document with some gibberish on it?!
[21:24:56] eam: atmosx: yeah it's the ansi sequence to print the contents of the terminal
[21:25:24] drys: @Rader, Thanks for the reply. these are actually my dvd movies collection, do you think uploading it to vimeo wont send me to jail
[21:25:40] icarus: has joined #ruby
[21:25:45] Radar: drys: lol
[21:26:02] norc: drys: You will have to ask a lawyer if you want a good answer for this.
[21:26:09] atmosx: drys: hahahaha
[21:26:24] mistermocha: has joined #ruby
[21:26:30] Jardayn: has joined #ruby
[21:26:49] norc: drys: But anyway, people usually place such things into CDNs (like Amazon CloudFlare for example).
[21:27:03] eam: 1.5G for a movie rip, kids these days and their fancy high bitrate encodings
[21:27:06] norc: It solves issues with availability, storage and performance.
[21:27:16] norc: And it just works.
[21:27:23] hobodave: has joined #ruby
[21:28:31] Rutix: has joined #ruby
[21:28:32] Rutix: has joined #ruby
[21:29:03] norc: *Amazon CloudFront.
[21:29:22] atmosx: I love how amazon changes the names for everything
[21:29:27] _Darin: has joined #ruby
[21:30:03] drys: okay then i will make them all available with the common video format ogg, mp4, webm
[21:30:29] _Darin: Sorry, to those who I was chatting with earlier... my phone quit working and then I got relieved for the night. So, now I can get back to coding.
[21:30:52] ur5us: has joined #ruby
[21:30:57] norc: drys: Remember that container is not codec though.
[21:31:46] norc: _Darin: We can do your chastization now if you have time for it.
[21:32:00] _Darin: I definitely have time. It's only 1230 am
[21:32:05] patchedmonkey: has joined #ruby
[21:32:15] _Darin: haha. The NAVY has my sleep schedule all messed up.
[21:32:56] drys: everything work already with just a single format, now that i will be making the video available in 3 format how do i adjust my database table for the 3 format. do i create column on the movie table for each format?
[21:33:12] _Darin: https://gist.github.com/darinthompson/e687427b5a19f811be11 So, I updated my gist, and you can probably tell where I "think" I am calling the method if I supply the arguments.
[21:33:21] drys: @norc i will
[21:33:30] mdw: has joined #ruby
[21:33:32] patchedmonkey: has joined #ruby
[21:34:20] aegis3121: has joined #ruby
[21:35:53] mdw: has joined #ruby
[21:36:12] abq: has left #ruby: ()
[21:36:44] Darmani: I don't get this
[21:36:46] Darmani: http://ideone.com/Wcowl8
[21:36:49] Darmani: Why doesn't this work T.T
[21:37:44] sandstrom: has joined #ruby
[21:37:57] eam: Darmani: send it in a gist and I'll take a look (see topic)
[21:38:26] axl_: has joined #ruby
[21:39:14] Austneal: has joined #ruby
[21:39:17] Darmani: You can't just follow the link I sent you? lol
[21:39:33] Austneal: Hello people
[21:39:44] Darmani: Austneal: How's it going?(:
[21:39:48] aegis3121: Darmani: pretty sure it tells you the error
[21:40:13] eam: Darmani: I don't usually click on non-gist links
[21:40:15] Xeago: has joined #ruby
[21:40:19] Darmani: aegis3121: Yeah it does I don't understand why it's giving me that error though.
[21:40:21] _Darin: norc: Did you see the updated gist?
[21:40:26] Austneal: Darmani: I'm trying to decide whether I want to be an ASP.Net MVC or Ruby on Rails developer :P
[21:40:44] aegis3121: Because in the context of whatever code you're running, that method isn't defined on the Array class.
[21:40:52] Radar: Austneal: Do you want to wear a suit and tie to work?
[21:40:56] Darmani: Austneal: Well you came to Ruby so people will probably encourage Rails more lol
[21:41:14] Radar: Austneal: Do you want to work for large corporations or smaller companies?
[21:41:17] Austneal: I'm also in the ASP.net channel lol
[21:41:23] Austneal: Radar: I work for myself
[21:41:25] Darmani: aegis3121: Oh, really?
[21:41:32] Radar: Austneal: But who will be your clients?
[21:41:33] Austneal: And I have experience with C#
[21:41:38] Austneal: Smaller clients, Radar
[21:42:07] Radar: Austneal: Great, so do Ruby.
[21:42:15] ShakAiolia: has joined #ruby
[21:42:19] Austneal: Radar: Any specific reason?
[21:42:24] Radar: ASP.net is boring af
[21:42:37] Radar: and the Ruby world is more of a friendlier community
[21:42:42] Darmani: Radar: god I wish I could say something like that.
[21:42:43] Radar: Source: friends who have moved from ASP.net to Ruby.
[21:42:57] drys: @Darmani i went through the code, just like the error stated, there is no method my_each declared anywhere on your code
[21:43:46] pawnbox: has joined #ruby
[21:43:49] Darmani: drys: oh my bad I'm an idiot... I didn't paste all of the code.
[21:43:55] drys: @Darmani you need to open the array class and define the my_each ,ethod
[21:44:10] Darmani: http://ideone.com/Wcowl8
[21:44:13] Darmani: There's the rest of it.
[21:44:26] Austneal: Maybe I just need to look at some Ruby / Rails code....
[21:44:43] Austneal: I've barely even looked at it. Started a CodeAcademy thing, but that's about it
[21:45:53] build22: has joined #ruby
[21:46:05] karapetyan: has joined #ruby
[21:46:10] Darmani: drys: Any ideas?
[21:46:18] ruboto: A test driven walk through Ruby, http://rubykoans.com/
[21:46:21] Radar: Austneal: ^
[21:46:29] Radar: Go through them. That's a nice gentle introduction to Ruby code.
[21:46:39] Radar: Darmani: Is that defined in a class or just in that file?
[21:46:41] tockitj: has joined #ruby
[21:46:52] Darmani: Just in that file.
[21:47:19] Darmani: The challenge is to recreate methods like "each", "all", "select" etc.
[21:47:29] Darmani: I got stuck on select lol
[21:47:38] ShakAiolia: has left #ruby: ()
[21:48:03] Austneal: Radar: Thanks! I'll take a look at it
[21:49:20] skcin7_: has joined #ruby
[21:49:21] synthroid: has joined #ruby
[21:51:18] firstdayonthejob: has joined #ruby
[21:51:56] spooq: has joined #ruby
[21:52:06] drys: @Darmani you code actually works
[21:52:18] drys: i just make a few adjustment
[21:52:48] Austneal: Radar: Now... what about Visual Studio? Is there a RoR equivalent?
[21:52:57] Radar: Austneal: I just use Sublime Text 3 and manage just fine.
[21:53:14] Radar: Austneal: There isn't really a decent code-autocompleter like you'd find in a compiled lang
[21:53:32] apeiros: *statically typed
[21:53:39] apeiros: compiled is not too relevant
[21:53:46] jbrhbr: has joined #ruby
[21:53:47] rrichardsr3: has joined #ruby
[21:53:53] apeiros: beware: pedant at work
[21:53:56] apeiros: or at large
[21:54:05] build22: has left #ruby: ()
[21:54:08] Radar: pedant detected, dispersing cups of calm the fuck down
[21:54:14] Radar: ^ what helpa would say if I did !pedant
[21:54:34] apeiros: good thing we shut the smart ass up!
[21:54:57] drys: insert the whole inside an array class like class Array "your code" end save the file as .r b. then require the file in pry or irb or any .rb file.
[21:54:58] apeiros: but it should dispense calm pies instead :-(
[21:55:21] apeiros: calm pie girl genius
[21:55:27] apeiros: fucking safari
[21:55:35] apeiros: copying the search term instead of the url
[21:55:44] apeiros: http://girlgenius.wikia.com/wiki/Calming_Pie
[21:56:49] jackjackdripper: has joined #ruby
[21:57:53] einarj: has joined #ruby
[21:58:16] rrichard_: has joined #ruby
[21:59:48] mdw: has joined #ruby
[21:59:56] rrichardsr3: has joined #ruby
[22:00:29] smactive: has joined #ruby
[22:01:03] peeja: has joined #ruby
[22:01:30] aadam21: has joined #ruby
[22:01:31] celly: has joined #ruby
[22:01:34] rrichardsr3: has joined #ruby
[22:01:43] gatman_: has joined #ruby
[22:02:03] snowy: has joined #ruby
[22:02:47] _Darin: Would I be interrupting if I asked a question?
[22:03:56] drys: @ Darin created a gist https://gist.github.com/anonymous/2129eb4f3af54a3617e2
[22:04:00] guacamole: has joined #ruby
[22:04:13] finisherr: has joined #ruby
[22:05:41] charliesome: has joined #ruby
[22:05:52] apeiros: what? of course they would!
[22:07:35] apeiros: drys: that my_each is cheating IMO. for/in uses each, and I think the idea is to not use each, no?
[22:09:19] _Darin: Sorry, got distracted for a bit. I am trying to get this working. And it works if I don't call any arguments but when I do supply arguments it doesn't call the methods.
[22:09:23] _Darin: https://gist.github.com/darinthompson/e687427b5a19f811be11
[22:10:00] apeiros: _Darin: obvious solution - call methods.
[22:10:11] Ox0dea: has joined #ruby
[22:10:22] Ox0dea: apeiros: `yield shift until empty?`, amirite?
[22:10:37] _Darin: That is obvious. but where and how. It's still based on a condition.
[22:10:43] apeiros: Ox0dea: modifying the receiver is bad, mkay?
[22:10:48] Ox0dea: apeiros: Fine.
[22:11:04] Ox0dea: "Iterating once should be enough for anybody."
[22:11:15] apeiros: _Darin: where do you currently call the methods which print?
[22:11:29] apeiros: _Darin: as in line X to Y in the gist
[22:11:49] dlitvak: has joined #ruby
[22:12:06] _Darin: if scale == "f" to_celsius
[22:12:14] apeiros: actually, this looks different from last time
[22:12:23] apeiros: ok, yes, 16-20. where else?
[22:13:00] _Darin: It does, I've been hacking away at it.
[22:13:08] poguez_: has joined #ruby
[22:13:14] Darmani: Ox0dea: wb ^^
[22:13:38] jackjackdripper: has joined #ruby
[22:13:50] apeiros: _Darin: ok. now why do 16-20 look different than 22-26?
[22:14:14] drys: @apeiros thats true, there was no need of defining the my_seclect
[22:14:15] jackjackdripper: has joined #ruby
[22:14:17] Ox0dea: Darmani: How goes it?
[22:14:39] Darmani: Not bad so far.
[22:14:51] Darmani: It's amazing how taking a break refreshes the mind.
[22:14:59] Ox0dea: It's called hammock time.
[22:15:00] _Darin: Because I got frustrated and started hacking.
[22:15:09] Ebok: Is that conditional on line 22 actually saying if foo else foo?
[22:15:13] apeiros: _Darin: that's not an explanation.
[22:15:16] Ox0dea: Ebok: It is. :P
[22:15:26] apeiros: _Darin: should they look differently?
[22:15:28] Ebok: Okay, I was just wondering if I was going insane
[22:15:32] Ox0dea: _Darin: This code works.
[22:15:33] Darmani: Ox0dea: Hammock time o.o
[22:15:43] apeiros: Ox0dea: for a limited definition of "works"
[22:15:58] Ox0dea: It's redundant all over the place, but it seems to be doing the right thing?
[22:15:58] apeiros: (check line 23 and 25)
[22:16:01] bkxd: has joined #ruby
[22:16:10] Ebok: Who is writing it?
[22:16:15] gregf: has joined #ruby
[22:16:16] snowy: has joined #ruby
[22:16:17] _Darin: No idea. When I run it with them the same, it only does the celsius conversion.
[22:16:25] Ox0dea: Oh, I see.
[22:16:37] lucasb: has joined #ruby
[22:17:01] apeiros: _Darin: ok, I can't work with that attitude. I suggest you read your own code closely. specifically line 23 and 25. there's more to say about your code, but like that, I'm not willing to invest any time.
[22:17:16] pdoherty: has joined #ruby
[22:18:07] _Darin: Ok, I don't mean to offend. Do you mind pointing out where I came across has having a bad attitude? Seriously not knowing.
[22:18:41] Ox0dea: I didn't see it either.
[22:18:56] apeiros: _Darin: you don't leave the impression of even trying to put any effort in it. you come across as having to do some homework assignment and being pissed about it and preferably just getting a solution handed on a silver platter.
[22:19:01] _Darin: And if I did, it's because I have been awake for a LONG time.
[22:19:08] Ox0dea: _Darin: Count the number of occurrences of "fahrenheit" in your program, then do the same for "celsius".
[22:19:13] roshanavand: has joined #ruby
[22:19:23] _Darin: I've been working for about 3 hours.
[22:19:49] Ox0dea: Darmani: https://www.youtube.com/watch?v=f84n5oFoZBc
[22:19:59] Ebok: You know that they're literally telling you what lines to look at Darin
[22:20:12] Ebok: At least, as a start
[22:20:19] Darmani: Ox0dea: lmao
[22:20:26] apeiros: it's your code, you should know whether line 16-20 should look the same as line 22-26 (and yes, they totally should look the same, and they don't, and the bug is related to that)
[22:20:47] Ox0dea: Darmani: The transcript, in case video's not your bag: http://git.io/vu0dX
[22:20:47] _Darin: I've fixed it since then.
[22:20:48] Darmani: That's a 40 minute video about the benefits of taking a break?
[22:20:48] aadam21: has joined #ruby
[22:20:53] apeiros: ok, maybe the vibe I get is from you being tired. but then do everybody a favor and get rest. ask again when you're fresh.
[22:20:54] Ebok: I remember this video!
[22:20:54] _Darin: I just forgot to update the gist
[22:21:13] Ox0dea: Darmani: Taking a break to think deeply.
[22:21:18] lucasb: Hello again. I really like the shortcut [...].map(&:foo). Anyone knows if there's a shortcut for [...].map {|x| foo(x) } ? ie. calling foo as a "function" and passing the element as argument
[22:21:30] Darmani: Ox0dea: Hm. Okay.
[22:21:46] apeiros: lucasb: there's gems trying to provide it, but with ruby itself, only in a limited and ugly fashion.
[22:22:29] apeiros: lucasb: e.g. .each { |x| puts(x) } -> .each(&method(:puts))
[22:22:35] Ox0dea: lucasb: There is.
[22:22:46] _Darin: https://gist.github.com/darinthompson/e687427b5a19f811be11
[22:22:47] apeiros: lucasb: and generically for .each { |x| x.foo(x) } -> .each(&xmethod(:foo))
[22:23:02] Ox0dea: >> [1,2,3].map(&Math.method(:sin)) # lucasb
[22:23:03] ruboto: Ox0dea # => [0.8414709848078965, 0.9092974268256817, 0.1411200080598672] (https://eval.in/497875)
[22:23:03] lucasb: apeiros: oh, cool, not so ugly after all :) really thanks!
[22:23:07] ss_much: has joined #ruby
[22:23:08] _Darin: This the updated gist
[22:23:19] apeiros: lucasb: lol, k, you and me, we've got a different opinion on ugly then ;-)
[22:23:30] apeiros: _Darin: that program works
[22:23:31] lucasb: Ox0dea: thanks!
[22:23:34] DonOtreply: has joined #ruby
[22:23:36] Ox0dea: lucasb: Happy to help.
[22:23:39] dlitvak: has joined #ruby
[22:24:00] bkxd: has joined #ruby
[22:24:10] pawnbox: has joined #ruby
[22:24:15] _Darin: Maybe I am trying to get it to do something it can't do then.
[22:24:39] apeiros: hm, wait???
[22:24:41] Ebok: How about you tell me what your goal is out fo get temperature
[22:25:07] _Darin: I have it working so that when I keep the arguments nil it will function properly. But if I supply arguments, it only runs the to_celsius conversion.
[22:25:20] atomical: has joined #ruby
[22:25:45] _Darin: no matter if I supply a "f" or a "c" as a scale argument
[22:26:08] Darmani: Ox0dea: http://ideone.com/Wcowl8
[22:26:10] Ebok: scale is nil isnt it?
[22:26:17] Darmani: The logic required for this method hurts my brain lol
[22:26:48] _Darin: I bet. I am struggling as well
[22:26:50] Ox0dea: Darmani: How come?
[22:26:55] drys: just got back, what is the problem with the code
[22:27:03] Darmani: Because... It's like backwards lol
[22:27:14] Ox0dea: Darmani: *inverted
[22:27:17] Ebok: Its trying to do many thing at the same time
[22:27:38] Ebok: So its intent is murky, and its bugs are submerged
[22:27:54] _Darin: in english I want it to say. If they are nil get the temp and scale if they are supplied then run to_celsius if the scale argument is c and to_far if the scale argument is f
[22:28:32] Ox0dea: Darmani: In that particular case, `false if` is a lot clearer than `true unless`.
[22:28:32] _Darin: Does that make sense?
[22:28:46] apeiros: _Darin: use @scale
[22:28:50] apeiros: _Darin: or self.scale
[22:28:53] dstarh: has joined #ruby
[22:29:01] _Darin: haha... ok.
[22:29:02] Ebok: Wow, I wasnt even looking there
[22:29:09] Darmani: Ox0dea: That's hard to picture...
[22:29:14] Darmani: I think I know what you're saying though lol
[22:29:31] Ox0dea: Darmani: `unless foo` is literally just `if !foo`.
[22:29:32] janebootydoe: has joined #ruby
[22:29:33] apeiros: _Darin: oddity in the parser. your scale= assignment on line 15 means the whole function has scale as local variable
[22:29:41] apeiros: (not really an oddity, though)
[22:30:02] Darmani: Ox0dea: Alright, thanks.
[22:30:02] apeiros: i.e. scale in line 22 is reading an unset lvar, which means it has the value nil
[22:30:37] chipotle: has joined #ruby
[22:30:38] Ox0dea: Darmani: In your defense, that use of `unless` was totally uncalled for.
[22:31:08] Darmani: Ox0dea: If that's a joke I don't get it. Lol
[22:31:14] Ox0dea: It wasn't.
[22:31:14] kadoppe: has joined #ruby
[22:31:23] Ox0dea: `unless` can be murky, as was the case there.
[22:31:43] DEA7TH: has joined #ruby
[22:31:58] Ox0dea: Also, Line 3 is wrong. :P
[22:32:06] _Darin: So they should all be @scale?
[22:32:41] Ebok: Do you know what @scale means as opposed to scale?
[22:32:50] apeiros: _Darin: all except line 6 on the right side of the =, yes
[22:33:08] nertzy: has joined #ruby
[22:33:17] _Darin: @scale is the instance variable and scale would be a local variable to the method that I am working on.
[22:33:34] Darmani: Ox0dea: How is that wrong? lol
[22:33:34] apeiros: _Darin: the next step would then be to have line 16-20 not be repeated. if you call code in both the `if` and the only `else` at the end, it probably doesn't belong in there.
[22:33:42] Ox0dea: Darmani: What does #none? do?
[22:33:51] Darmani: It returns a boolean.
[22:33:57] Ox0dea: How does it go about that?
[22:34:07] Darmani: With the block given to it.
[22:34:13] apeiros: _Darin: and the step after that would be to only ask for @scale when it's set to nil. not when @temperature is set to nil (which is unrelated to @scale)
[22:34:50] mistermo_: has joined #ruby
[22:35:05] _Darin: So, what I thought was a simple project is ballooning quite rapidly. haha.
[22:35:05] Ox0dea: Darmani: English, please.
[22:35:09] aadam21_: has joined #ruby
[22:35:21] Darmani: Ox0dea: that's not English? Lol
[22:35:32] Ox0dea: Darmani: What does #none? tell you?
[22:35:45] apeiros: _Darin: it can be written in much less code
[22:35:50] Darmani: That... None of the elements pass for true with the block given to it.
[22:35:54] Ox0dea: Darmani: Precisely.
[22:36:15] _Darin: There is some sort of code already written for temperature conversion I think right?
[22:36:18] Ox0dea: _Darin: So why're you having trouble seeing why Line 3 is wrong?
[22:36:20] Ox0dea: Darmani: ^
[22:36:36] Ox0dea: _Darin: Yes, it's called arithmetic.
[22:36:45] Darmani: Obviously the opposite "false" must appear if the elements do appear in the block.
[22:36:54] Ox0dea: Darmani: Huh?
[22:37:00] _Darin: line 3 is blank.
[22:37:07] snowy: has joined #ruby
[22:37:09] _Darin: And the math is correct.
[22:37:28] Darmani: http://ideone.com/Wcowl8
[22:37:31] yfeldblum: has joined #ruby
[22:37:53] apeiros: _Darin: I think they meant Darmani
[22:38:03] _Darin: I see that now. haha
[22:38:11] Darmani: Oh he was talking about something else.
[22:38:46] FernandoBasso: has joined #ruby
[22:39:11] Scripore: has joined #ruby
[22:40:32] asmodlol: has joined #ruby
[22:41:06] Ox0dea: Darmani: This should help. https://eval.in/497880
[22:41:27] Ox0dea: It's so much clearer what's happening when you don't invert the condition for lulz.
[22:41:50] Radar: Ox0dea: Did you mean my_none?
[22:41:55] sdothum: has joined #ruby
[22:41:57] Ox0dea: I sure did.
[22:41:59] Ox0dea: Same result.
[22:42:01] Darmani: How can you use "each" like that without calling it on an object??
[22:42:18] Ebok: self.each is implied
[22:42:22] Ox0dea: Darmani: `self` is the implicit receiver.
[22:42:23] Radar: Darmani: methods called like that are called on self
[22:42:41] Darmani: damn thats cool.
[22:42:43] Ox0dea: Isn't it great?
[22:42:47] Radar: You can leave the "self." off for methods, as long as those methods _aren't_ setter methods
[22:42:58] Radar: because there's a difference between "thing = 1" and "self.thing = 1"
[22:43:00] Scripore: has joined #ruby
[22:43:14] Ox0dea: Now let's talk about the default definee.
[22:43:22] Radar: One sets the local variable "thing" and one calls the "thing=" method and passes the value 1
[22:43:39] Radar: Ox0dea: Are you pulling a http://abstrusegoose.com/474
[22:43:47] Darmani: Ox0dea: Okay so in plain English.. You're saying that if the element appears in your block... then you return false... right?
[22:44:09] einarj: has joined #ruby
[22:44:11] zenlot1: has joined #ruby
[22:44:12] Ox0dea: Darmani: Yeah, since in that case #none? doesn't hold.
[22:44:23] Ox0dea: At least one element fails to fail to satisfy the predicate. :P
[22:44:42] blacknicker: has joined #ruby
[22:44:44] Darmani: yeah. That makes more sense than what I wrote.
[22:45:18] blacknicker: what is the difference between a hash and an object?
[22:45:32] Darmani: blacknicker lmaooo
[22:45:35] Darmani: that's great.
[22:45:43] _Darin: Man, this is really kicking my butt. I now have it to ask specific questions based on which argument is missing. But everytime as soon as they are both given it shoots straight for only the celsius conversion.
[22:46:23] jackjackdripper: has joined #ruby
[22:46:33] shevy: blacknicker hmmm weird nick you have there
[22:46:46] apeiros: _Darin: https://gist.github.com/apeiros/fde50c8dca5e6629b911 is along the lines I'd write this
[22:46:52] Darmani: ACTION waves at shevy
[22:46:55] apeiros: whoops, and buggy???
[22:46:59] shevy: hey Darmani
[22:47:06] blacknicker: umm the text is black and nicker is my nickname I had since I was a kid
[22:47:10] apeiros: should have tested that
[22:47:18] jackjackdripper: has joined #ruby
[22:47:23] shevy: blacknicker ;)
[22:47:27] rrichardsr3: has joined #ruby
[22:47:28] apeiros: blacknicker: that's about as bad as your KKK explanation. but lets see how long your interest in ruby lasts.
[22:47:55] blacknicker: what is the difference between a hash and an object srs
[22:48:12] apeiros: a hash is an object, an object is not a hash
[22:48:20] Ox0dea: >> Object.hash
[22:48:21] ruboto: Ox0dea # => 852187929 (https://eval.in/497883)
[22:48:28] jhass: has != is
[22:48:30] apeiros: Ox0dea: that's "an object *has* a hash"
[22:48:35] Ox0dea: Prove it.
[22:48:43] guacamole: has joined #ruby
[22:48:46] Ox0dea: (I'll stop.)
[22:49:00] apeiros: ACTION smacks Ox0dea around a bit with a large proof
[22:49:01] rdavila: has joined #ruby
[22:50:37] rrichardsr3: has joined #ruby
[22:50:59] ledestin: has joined #ruby
[22:51:41] guacamole: has joined #ruby
[22:52:10] Darmani: http://ideone.com/Wcowl8 Ox0dea
[22:52:16] Darmani: This one isn't very clean...
[22:52:17] _Darin: apeiros: thanks for all the help. Im taking your advice and getting some rest. 2am it's time to go.
[22:52:19] Darmani: How would you do it?
[22:52:51] asmodlol: has joined #ruby
[22:53:08] Ox0dea: Darmani: Er, like that...
[22:53:30] Ox0dea: Well, no, I'd use #my_reduce.
[22:53:35] Ox0dea: Is that a thing yet?
[22:53:40] Scripore: has joined #ruby
[22:53:51] Darmani: my_map is next.
[22:54:09] Ox0dea: Refactor #my_count when you've got #my_reduce, then.
[22:54:55] Darmani: Ox0dea: I'll probably need help with that one.
[22:55:28] blacknicker: i just hate the Ruby community
[22:55:39] joonty: has joined #ruby
[22:55:55] apeiros: blacknicker: then stay out of it?
[22:56:00] Darmani: blacknicker: That's nice.
[22:56:08] Ox0dea: Why is it still here?
[22:56:39] Ox0dea: Doesn't N1993R get kicked ASAP? What's the difference?
[22:56:46] Ebok: Why is what still where?
[22:56:51] Ox0dea: That troll.
[22:57:03] Ox0dea: In #ruby.
[22:57:06] Ebok: trolls dont exist. psh
[22:57:10] Darmani: yeah. He's not even a troll with character.
[22:57:14] Darmani: I'm a troll with character
[22:57:17] Darmani: That's why I get to stay xP
[22:57:22] Ebok: Abide by that logic and you wont have any issues. :)
[22:57:25] baweaver: has joined #ruby
[22:58:22] apeiros: Ox0dea: the troll evolved to have a nickname which does not the bannable limit.
[22:58:36] apeiros: Ox0dea: now lets see whether they can evolve character above bannable limit.
[22:58:51] moei: has joined #ruby
[22:59:08] atomical: has joined #ruby
[23:00:02] lemur: has joined #ruby
[23:00:47] jackjackdripper: has joined #ruby
[23:01:56] Darmani: http://ideone.com/Wcowl8 Ox0dea
[23:02:00] Darmani: I'm not sure how to do my_map...
[23:02:07] Darmani: my_each doesn't work as a way to solve it =/
[23:02:26] Ox0dea: Darmani: Why is there a conditional?
[23:02:27] shevy: oh my_god
[23:02:37] crdpink2: Name Location Location description Base ID
[23:02:38] crdpink2: Strength bobblehead Mass Fusion building On the metal wall sculpture high above the lobby desk. 00178b63
[23:02:47] gix: has joined #ruby
[23:02:47] Darmani: ...well...
[23:02:50] Darmani: Shouldn't there be?
[23:02:51] Ox0dea: Darmani: #map is an unconditional transformation.
[23:03:09] Ox0dea: 1-to-1, like.
[23:03:18] Ox0dea: Do you even bijection?
[23:03:23] guacamole: has joined #ruby
[23:03:25] hxegon: has joined #ruby
[23:03:45] Ox0dea: You were close.
[23:03:54] Ox0dea: But it kinda shows that you've gotten outta the hammock. :/
[23:03:58] Darmani: That seems very similar to my_select.
[23:04:15] Ox0dea: Not really, #select is for filtering, not transforming.
[23:04:34] Ox0dea: In fact, you should just rename this method #my_select. :P
[23:04:54] Darmani: Let me show you what I'm talking about.
[23:05:44] Darmani: http://ideone.com/Wcowl8 Ox0dea
[23:05:52] Darmani: They look SO similar.
[23:05:54] guacamole: has joined #ruby
[23:06:05] Darmani: it's just that one has a conditional
[23:06:14] janebootydoe2: has joined #ruby
[23:06:25] Ox0dea: And the other isn't doing a transformation.
[23:06:34] Ox0dea: This is what happens when you've found the right abstraction.
[23:07:09] ta: has joined #ruby
[23:09:36] lemur: gist works better.
[23:09:41] dlitvak: has joined #ruby
[23:09:57] pontiki: hey lemur :)
[23:10:04] baweaver: anyways, you can make a select map using reduce
[23:10:39] shevy: the shapechanging lemur is in da house again
[23:11:09] BSaboia: has joined #ruby
[23:11:35] baweaver: def select_map(&b) data.each_with_object([]) {|i,a|v=yield i;a<<v if v} end
[23:11:38] baweaver: something like that
[23:11:46] baweaver: I'm on a plane
[23:11:47] DonOtreply: has joined #ruby
[23:12:03] Darmani: oh god. my_inject is next
[23:12:09] Darmani: I barely know what that is.
[23:12:09] Ox0dea: baweaver: New Lonely Island song?
[23:12:29] Darmani: screw it I'm taking a break.
[23:12:32] baweaver: more like lamest mile high club ever
[23:13:05] baweaver: though I did just deploy an application server to production on a plane
[23:13:10] baweaver: that's still pretty badass
[23:13:21] pontiki: props, lemur, props
[23:13:30] pontiki: that's like clear and present danger
[23:13:55] baweaver: I got permission to just to say we'd done it.
[23:14:28] Radar: Truly badass
[23:14:39] Radar: Or is that BaDASS?
[23:14:54] baweaver: methinks both.
[23:15:12] pontiki: https://xkcd.com/705/
[23:15:59] _Tariq: has joined #ruby
[23:16:01] karapetyan: has joined #ruby
[23:16:16] _Tariq: How many people here know the ruby-parse-client gem?
[23:16:36] ruboto: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[23:17:14] _Tariq: Ah, thanks ruboto.
[23:17:16] _Tariq: I apperciate it.
[23:17:31] _Tariq: Though I wonder why do you always need a human to prompt you first before you can give advice.
[23:17:42] baweaver: pontiki: ...is it bad I've done something similar to that? Someone cut one of our ethernet lines while screwing with the ceiling and I did in fact say something about uptime.
[23:18:19] djbkd: has joined #ruby
[23:18:43] Radar: _Tariq: If we let the robots think for themselves then we have lost.
[23:19:58] Ox0dea: Sorry, Dave.
[23:20:46] eam: Radar: but we are all meat robots
[23:21:58] jgpawletko: has joined #ruby
[23:22:08] minimalism: has joined #ruby
[23:23:14] baweaver: HK47 would be proud
[23:24:52] bkxd: has joined #ruby
[23:24:57] webhat: has joined #ruby
[23:25:48] malconis: has joined #ruby
[23:26:16] Dbugger: has joined #ruby
[23:26:31] Dbugger: Hello guys. Can someone tell me, with Nokogiri, how can I select <img> here? http://laravel.io/bin/aNxVB
[23:26:34] Yzguy: has joined #ruby
[23:26:35] jackjackdripper: has joined #ruby
[23:29:29] apeiros: dbugger: what have you tried?
[23:29:43] Dbugger: apeiros, .css("img")
[23:29:58] Radar: dbugger: Show us the full code of what you've tried please.
[23:29:59] apeiros: and your problem with that approach?
[23:30:14] Dbugger: Well, it gives me .length == 0
[23:30:20] Dbugger: Basically, it does not find it
[23:30:29] apeiros: dbugger: then you're leaving something out.
[23:30:42] dlitvak: has joined #ruby
[23:31:12] apeiros: ah, no, you don't
[23:31:18] apeiros: I didn't see the nested xmlns
[23:31:24] apeiros: you have to specify the namespace.
[23:31:25] dlitvak: has joined #ruby
[23:31:32] Dbugger: That is the problem. Im not that familiar with XML, more with HTML
[23:31:35] Dbugger: how do I do that?
[23:31:57] apeiros: dom.css('x|img', x: "http://www.w3.org/1999/xhtml")
[23:32:03] zotherstupidguy: i dont know the diff between a method and a func in ruby!! internet say fun belong to object and method not, but isnt things written out of classes belong to main object?
[23:32:37] Dbugger: I see... lets try..
[23:32:55] Radar: zotherstupidguy: how do you define a function in Ruby?
[23:33:13] zotherstupidguy: i do def Somthin
[23:33:14] apeiros: zotherstupidguy: the only true "functions" in ruby are procs/lambdas
[23:33:21] apeiros: toplevel methods are pseudo-functions
[23:33:29] Dbugger: LOVELY! Thanks guys!
[23:33:34] apeiros: ?guys dbugger
[23:33:35] ruboto: dbugger, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[23:36:47] apeiros: implicit xmlns should be forbidden. so easy to miss :(
[23:37:02] apeiros: (not being serious there)
[23:38:05] niotoan: has joined #ruby
[23:38:24] zenspider: has joined #ruby
[23:39:25] KnownSyntax: has joined #ruby
[23:39:49] KnownSyntax: has joined #ruby
[23:41:52] _Tariq: has joined #ruby
[23:43:13] _Tariq: How do you delete a user in Parse-Ruby-Client? When I call parse_delete on the user, I get the "Parse::UserCannotBeAlteredWithoutSessionError" error
[23:45:39] Radar: _Tariq: Looks like you'll need to create a session first.
[23:45:56] _Tariq: ...yeah, I'll see if I need to do that
[23:46:05] _Tariq: But since you are already authenicated
[23:46:21] _Tariq: not authenicated as that specific user
[23:48:11] guacamole: has joined #ruby
[23:48:46] domgetter: has joined #ruby
[23:50:07] karapetyan: has joined #ruby
[23:51:06] wolffles: has joined #ruby
[23:51:48] apeiros: awesome games done quick
[23:52:55] dlitvak: has joined #ruby
[23:55:02] guacamole: has joined #ruby
[23:56:12] guacamole: has joined #ruby
[23:56:45] wolffles: how come( 2.times do array[rand(array.length)] end ) doesnt work?
[23:57:11] apeiros: it does work
[23:57:15] apeiros: what should it do?
[23:57:44] wolffles: return 2 random values from an array = [1.. 5]
[23:58:01] apeiros: that it won't. because 2.times always returns 2
[23:58:24] apeiros: that's the definition of Integer#times (return the receiver)
[23:58:52] apeiros: Array.new(2) { ??? }
[23:59:00] Radar: wolffles: are you try to be intentionally obfuscating that code?
[23:59:03] apeiros: or better yet: array.sample
[23:59:12] Radar: >> [1,2,3,4,5].sample(2)
[23:59:14] ruboto: Radar # => [1, 3] (https://eval.in/497889)
[23:59:29] wolffles: i cant use sample in my solution
[23:59:42] apeiros: any other arbitrary restrictions?
[23:59:51] wolffles: that was the only one
[23:59:57] apeiros: pro tip: mention arbitrary restrictions beforehand