« Back to channel list

#ruby - 26 October 2017

« Back 1 day Forward 1 day »
[00:00:39] jrabe: has joined #ruby
[00:02:40] oetjenj: has joined #ruby
[00:03:12] vtx: has joined #ruby
[00:04:00] guacamole: has joined #ruby
[00:04:32] fclausen: has joined #ruby
[00:05:01] QualityAddict: has joined #ruby
[00:05:49] nopolitica: has joined #ruby
[00:08:17] darix: zanoni: just open the file and then write out the content as response
[00:08:24] darix: is the most stupid way
[00:08:43] darix: but i am sure sinatra has a way for you to set the http headers and then the file as response body
[00:11:11] workmad3: has joined #ruby
[00:16:59] agent_white: has joined #ruby
[00:19:11] zanoni: I'm going to look into nginx
[00:21:13] zanoni: this app is not going to be a real production site anyway, it's for personal at home usage. Mostly using Sinatra because I wanted a nice front end.
[00:22:34] dviola: has joined #ruby
[00:24:57] banisterfiend: has joined #ruby
[00:25:22] banisterfiend: anyone know if there exists a helper for rake that logs out each shell command execute and then runs it?
[00:25:58] banisterfiend: something like: magic_execute("cd ..\nls"). and it'll log out "cd.." and then perform it, etc
[00:26:32] guacamole: has joined #ruby
[00:27:22] oetjenj: has joined #ruby
[00:29:01] elomatreb: banisterfiend: sh "command" outputs the command before running it
[00:30:37] theory4000: has joined #ruby
[00:30:52] banisterfiend: elomatreb it doesn't appear to do that for me, it just runs it (i'm on osx)
[00:31:30] jphase: has joined #ruby
[00:31:33] oetjenj_: has joined #ruby
[00:31:43] havenwood: it prints the command for me (macos too)
[00:31:56] elomatreb: Looking at the source it checks for verbose mode before outputting it
[00:32:00] banisterfiend: havenwood it does print it for you?
[00:32:04] havenwood: banisterfiend: yup
[00:32:21] banisterfiend: weird not here
[00:32:30] zanoni: darix: why do you say is the most stupid way, would that be slow?
[00:33:08] havenwood: banisterfiend: ruby -rrake -e 'sh "echo 1"'
[00:33:23] havenwood: #=> echo 1; 1
[00:33:47] banisterfiend: perfect how did you find that?
[00:34:53] havenwood: just wrote it to check if i see the command output
[00:36:46] darix: zanoni: http://www.sinatrarb.com/intro.html -> "Sending files"
[00:36:58] darix: zanoni: it is right there
[00:47:32] jxv: has joined #ruby
[00:48:53] guacamole: has joined #ruby
[00:48:59] Devalo: has joined #ruby
[00:50:58] RickHull: banisterfiend: you could always def my_sh(cmd) in your Rakefile. but rake's inbuild `sh` does this, per havenwood
[00:53:22] zanoni: I see Roda has a Sinatra plugin for send_file as well
[01:00:02] selim: has joined #ruby
[01:00:10] pilne: has joined #ruby
[01:01:04] cdg: has joined #ruby
[01:03:45] guacamole: has joined #ruby
[01:03:58] Asher: has joined #ruby
[01:08:19] van7hu: has joined #ruby
[01:08:41] van7hu: Hi, how to get #target_host , http://www.rubydoc.info/github/rapid7/metasploit-framework/Msf/Sessions/Meterpreter_x64_Win
[01:08:42] van7hu: I use s.target_host but get empty one :(
[01:14:22] RickHull: van7hu: you might try using pry to help debug
[01:14:37] RickHull: you can use pry like irb -- have you used irb before?
[01:15:00] coderphive: has joined #ruby
[01:15:56] vikaton: has joined #ruby
[01:17:31] milardovich: has joined #ruby
[01:17:45] yaewa: has joined #ruby
[01:18:30] guacamole: has joined #ruby
[01:22:17] van7hu: RickHull, it's inside metasploti, though.
[01:23:01] RickHull: fire up pry, do something like: require 'metasploit-framework/stuff'; s = Blah::Session.new
[01:24:25] RickHull: otherwise, check the class of s; something like: $stderr.puts "s is a #{s.class}" or Log.warn "s is a #{s.class}"
[01:25:09] RickHull: does s.target_host return an empty string?
[01:26:33] zanoni: send_file works! , all I was missing was a / in front of the path. And that might be related to Chrome.
[01:27:42] d^sh: has joined #ruby
[01:30:58] jordanm: has joined #ruby
[01:34:47] Technodrome: has joined #ruby
[01:35:45] hutch34: has joined #ruby
[01:36:14] uZiel: has joined #ruby
[01:39:00] cdg: has joined #ruby
[01:41:10] lacour: has joined #ruby
[01:45:44] Asher: has joined #ruby
[01:49:46] gizmore|2: has joined #ruby
[01:49:49] tastytf: has joined #ruby
[01:51:00] prob_dist: has joined #ruby
[01:53:54] prob_dist: I have an app I'm making with rails, this is an app to make exams from a question bank, when a new exam is created I wanna choose the questions from the bank randomly, but weighting more towards the questions that have been used the least
[01:54:11] prob_dist: oh man, thats a long line
[01:54:23] jokester: has joined #ruby
[01:55:10] prob_dist: I'm thinking of doing it with a probability distribution but don't know if that's the best bet
[01:55:20] prob_dist: anyone can help me with that?
[01:55:34] coderphive: has joined #ruby
[01:55:55] astrobunny: has joined #ruby
[01:56:57] prob_dist: well this seems kinda dead
[01:58:42] RickHull: used less frequently, or longer since last used?
[01:58:51] alnewkirk: has joined #ruby
[01:59:55] RickHull: there is such a thing as a LRU cache -- least recently used -- but this wouldn't give you a slight bias from uniform random selection
[02:06:24] banisterfiend: anyone know how to force ruby to compile as 32bit on a 64bit box?
[02:07:00] RickHull: you're getting into cross compilation there, right? and then selecting the right C stuff to link against?
[02:07:14] guacamole: has joined #ruby
[02:07:29] banisterfiend: i was hoping it's just a matter of passing the correct flat to ./configure :D
[02:07:47] RickHull: setting up for non-native compilation is trickier, i believe
[02:08:21] RickHull: https://en.wikipedia.org/wiki/Cross_compiler
[02:09:26] prob_dist: @RickHull used less frequently, I have a field in the db that says how many times certain question has been used
[02:09:33] mitt3ns: has joined #ruby
[02:10:17] RickHull: prob_dist: how biased toward less frequent questions should the selection be?
[02:10:37] RickHull: strict adherence? sounds like a priority queue / heap
[02:11:37] prob_dist: I would say that a question that has been used 1 times has double the chance to be chosen than one that has been used 2 times
[02:12:01] workmad3: has joined #ruby
[02:12:47] RickHull: yeah, i'd be tempted to put a bunch of balls in a jar and pick one
[02:13:22] coderphive: has joined #ruby
[02:13:28] agent_white: has joined #ruby
[02:13:28] |ifei5good: has joined #ruby
[02:13:53] prob_dist: didn't get ya
[02:14:09] RickHull: i.e. sample from a probability distribution as you said
[02:14:26] bmurt: has joined #ruby
[02:15:00] RickHull: you can segment a range of integers and sample with Kernel.rand rangemax
[02:15:42] prob_dist: okok sounds good, will look into that
[02:16:02] |ifei5g0_: has joined #ruby
[02:16:09] alfiemax: has joined #ruby
[02:23:04] jphase: has joined #ruby
[02:23:39] prob_dist: thanks @RickHull
[02:27:55] Azure: has joined #ruby
[02:27:57] cpallares: has joined #ruby
[02:29:20] nertzy: has joined #ruby
[02:29:54] orbyt_: has joined #ruby
[02:30:41] porfa: has joined #ruby
[02:32:19] Technodrome: has joined #ruby
[02:33:23] jxv: has joined #ruby
[02:34:14] __Yiota: has joined #ruby
[02:40:19] hinbody: has joined #ruby
[02:42:31] ogres: has joined #ruby
[02:42:34] juanca_: has joined #ruby
[02:44:15] jxv: For a new project, should I use rbenv or rvm?
[02:44:34] ap4y: has joined #ruby
[02:44:52] RickHull: I like chruby myself
[02:45:31] jxv: player 3 has entered
[02:45:43] RickHull: i don't use it to enforce things at the project level -- just to have different rubies easily available on my dev box
[02:45:48] cdg: has joined #ruby
[02:46:01] porfa: has joined #ruby
[02:46:03] latemus: has joined #ruby
[02:47:09] RickHull: i generally run 2.4 with chruby and expect to have a few gems installed. I use ruby-install to make more rubies available, with a clean slate as far as installed gems
[02:48:38] RickHull: I don't generally mess with metadata like Gemfiles or gemsets, but those might work better for more rails type dev, not sure
[02:50:10] weaksauce: has joined #ruby
[02:51:39] jxv: I'm a newbie with ruby, so all the ecosystem stuff is always a hill to climb. Also, this isn't a rails project and trying not to make it complicated.
[02:52:05] RickHull: i like chruby because it is very simple, conceptually and how it is implemented
[02:52:36] RickHull: the trickiest part is getting your login files updated and making sure they are loaded
[02:52:44] jxv: is it the preference for example projects, if that is even a valid question?
[02:52:46] RickHull: i.e. to activate chruby
[02:53:06] jxv: sounds similar to virtualenv with python
[02:53:30] RickHull: rvm, rbenv, chruby, others -- they are all widely used
[02:53:39] RickHull: and widely unused
[02:54:10] RickHull: it's just a way of specifying the ruby version and environment that executes your code
[02:54:38] RickHull: you can just use your system ruby -- on osx or linux?
[02:55:45] RickHull: do you use homebrew?
[02:55:55] RickHull: or whatever the latest package manager thingie is?
[02:55:57] jxv: yes, I installed chruby with brew
[02:56:13] RickHull: check out ruby-install too
[02:56:21] jxv: I use linux too, what would be the use there?
[02:56:33] jxv: ruby-install as well?
[02:56:57] RickHull: yes, should not be much different
[02:57:06] RickHull: i am more familiar with the linux side
[02:57:34] RickHull: for ruby-install -- you will need a build environment -- compiler, etc
[02:57:42] RickHull: not sure if Xcode will want to get involved, ugh
[02:57:55] RickHull: probably gcc/clang/llvm will suffice with brew
[02:58:03] ozcanesen: has joined #ruby
[02:59:47] thomasv314: has joined #ruby
[03:00:12] cadillac_: has joined #ruby
[03:00:47] moei: has joined #ruby
[03:03:12] kapil___: has joined #ruby
[03:11:06] enmchs: has joined #ruby
[03:14:22] bmurt: has joined #ruby
[03:20:21] zautomata3: has joined #ruby
[03:20:25] alfiemax_: has joined #ruby
[03:20:45] uZiel: has joined #ruby
[03:22:32] gix: has joined #ruby
[03:24:06] alfiemax_: has joined #ruby
[03:30:10] _whitelogger: has joined #ruby
[03:32:00] jphase: has joined #ruby
[03:33:39] ap4y: has joined #ruby
[03:39:28] thomasv314: has joined #ruby
[03:44:43] tastygradient: has joined #ruby
[03:52:30] cdg: has joined #ruby
[03:55:26] LocaMocha: has joined #ruby
[03:55:52] meadmoon: has joined #ruby
[03:57:37] Guest18932: can i use a class method within the class
[03:57:49] Guest18932: if so how do i call it
[03:58:12] Technodrome: has joined #ruby
[03:59:07] alnewkirk: has joined #ruby
[03:59:24] guardianx: has joined #ruby
[04:02:07] __Yiota: has joined #ruby
[04:08:04] enterprisey: has joined #ruby
[04:08:12] RickHull: nakedly or self.meth_name
[04:08:48] RickHull: >> class Example; def self.foo; :called_foo; end; def self.bar; foo; end; end; Example.bar
[04:08:49] ruby[bot]: RickHull: # => :called_foo (https://eval.in/887171)
[04:09:09] __Yiota: has joined #ruby
[04:09:33] RickHull: at the instance layer, call self.class.foo or Example.foo
[04:09:49] raatiniemi: has joined #ruby
[04:10:06] elomatreb: The latter is bad if you plan on inheriting from the class at some point
[04:11:10] govg: has joined #ruby
[04:12:40] RickHull: just released a new gem, looking for feedback: https://github.com/rickhull/compsci
[04:12:55] workmad3: has joined #ruby
[04:14:27] RickHull: my Tree bogs down around 2000 items I think. I maintain both parent and children references. I am hoping/pretty sure that my Tree::Node references aren't copying data
[04:16:48] Guest18932: hm. i'm defining a Class which is a Rack app. when i use self.method_name to define a method within the Class, calling it nakedly later on in the class does nothing, and calling it with self.method_name gets me a 500 error
[04:17:11] RickHull: Guest18932: paste it -- gist.github.com or similar
[04:17:15] RickHull: redact or omit sensitive info
[04:17:22] Guest18932: RickHull: okay one sec
[04:20:38] Guest18932: RickHull: http://termbin.com/0puz
[04:21:24] RickHull: inside def call, you are at the instance layer
[04:22:08] RickHull: ok, I see, your def self.reject
[04:22:25] RickHull: you shouldn't be nesting your method definitions here
[04:22:38] RickHull: define self.reject outside of or above def call
[04:23:36] Guest18932: ok RickHull i'll try that, one sec
[04:23:43] RickHull: within def call, you can then do self.class.reject(the_code)
[04:24:08] RickHull: (if that is indeed the thing to do)
[04:26:07] hutch34: has joined #ruby
[04:28:32] cdg: has joined #ruby
[04:29:01] rgr_: has joined #ruby
[04:45:43] Guest18932: RickHull: i'm still having the same problem; the reject method does nothing
[04:45:44] Guest18932: http://termbin.com/zmw2a
[04:48:02] elomatreb: Those assignments in the reject methods are parsed as local variables, which have no effect afterwards
[04:48:22] elomatreb: If those are supposed to be accessor calls, try self.result = ''
[04:48:38] Guest18932: thanks elomatreb i'll try that.
[04:48:47] RickHull: no, they are locals in the call method
[04:49:08] RickHull: you shouldn't use another method to manipulate local variables
[04:49:53] RickHull: i think rack comes with an error handler already, that will short circuit normal successful response building
[04:50:26] elomatreb: Setting the variables in the method will not affect the variables in the calling scope
[04:50:31] Guest18932: RickHull: okay. you're probably right, i'll look into that. thank you guys
[04:50:41] RickHull: so check the whitelist for verb, and then call something in the Rack API to respond with 405
[04:50:55] RickHull: you might be trying to do this validation at the "wrong" layer, as well
[04:51:44] Guest18932: the whitelist checking you mean?
[04:52:15] RickHull: yeah, nevermind about that -- play around with it and see what works
[04:52:38] Guest18932: cool. thanks for your help
[04:56:57] pwnd_nsfw`: has joined #ruby
[04:57:09] EXCHGR: has joined #ruby
[04:57:58] Guest18932: elomatreb: yes, i think they're supposed to be accessor calls. i forgot about those for a moment
[04:58:12] k3rn31_: has joined #ruby
[05:01:12] conta: has joined #ruby
[05:01:44] agent_white: has joined #ruby
[05:02:00] banisterfiend: can anyone explain this? https://gist.github.com/banister/e182b75f6084c0a93b031153c07cdfb0
[05:03:16] RickHull: isn't that how a rake file task works? i don't use them often
[05:03:51] banisterfiend: RickHull how so? if the file already exists it's not supposed to run the block, right?
[05:04:15] RickHull: oh, duh, hm
[05:05:00] RickHull: what about the dependency, RUBY_REPO ?
[05:05:02] cdg: has joined #ruby
[05:05:08] RickHull: i forget how file tasks work :/
[05:06:17] RickHull: > Rake determines that a file task needs to be run if the file doesn’t exist or if any of the prerequisite file tasks are newer.
[05:06:38] banisterfiend: RickHull RUBY_REPO is def. older too
[05:06:39] RickHull: timestamp on RUBY_REPO vs RUBY_INSTALL_FOLDER
[05:06:51] banisterfiend: i'm running a fresh thing though just to make sure
[05:10:12] RickHull: banisterfiend: check out my tree node impl: https://github.com/rickhull/compsci/blob/master/lib/compsci/tree.rb#L54 -- behind the scenes, this is all by reference, right?
[05:10:31] RickHull: if i set node.parent = other_node
[05:12:37] jxv: has joined #ruby
[05:14:14] nicesignal: has joined #ruby
[05:15:51] theory4000: has joined #ruby
[05:16:01] guacamole: has joined #ruby
[05:25:22] jenrzzz: has joined #ruby
[05:25:23] jenrzzz: has joined #ruby
[05:25:53] hutch34: has joined #ruby
[05:26:36] jxv: has joined #ruby
[05:30:48] AndBobsYourUncle: has joined #ruby
[05:39:18] aupadhye: has joined #ruby
[05:39:45] jenrzzz: has joined #ruby
[05:39:46] jenrzzz: has joined #ruby
[05:41:47] apeiros: has joined #ruby
[05:43:10] milardovich: has joined #ruby
[05:47:20] Devalo: has joined #ruby
[05:47:51] ramfjord: has joined #ruby
[05:55:26] jxv: has joined #ruby
[05:55:27] Silthias1: has joined #ruby
[05:55:35] aupadhye: has joined #ruby
[05:59:20] alnewkirk: has joined #ruby
[06:00:39] Devalo: has joined #ruby
[06:05:52] ldepandis: has joined #ruby
[06:07:21] arquebus: has joined #ruby
[06:08:24] alex``: has joined #ruby
[06:11:06] snickers: has joined #ruby
[06:13:45] workmad3: has joined #ruby
[06:27:03] cdg: has joined #ruby
[06:27:42] dionysus69: has joined #ruby
[06:29:21] fclausen_: has joined #ruby
[06:29:51] conta: has joined #ruby
[06:30:32] rabajaj: has joined #ruby
[06:33:41] Guest25611: has joined #ruby
[06:36:54] mim1k_: has joined #ruby
[06:37:02] Hexafox[I]: has joined #ruby
[06:42:10] Hexafox[I]: has joined #ruby
[06:47:22] Guest96661: has joined #ruby
[06:47:33] Hexafox[I]: has joined #ruby
[06:50:51] ta: has joined #ruby
[06:51:50] oetjenj: has joined #ruby
[06:52:40] Hexafox[I]: has joined #ruby
[06:52:45] andikr: has joined #ruby
[06:53:09] johno84: has joined #ruby
[06:57:16] Guest18932: is there a way to unset, or set to nil, Rack::Response.write
[06:57:47] Guest18932: or cause the body to be empty upon any status code except for 200
[07:04:28] jxv: has joined #ruby
[07:06:26] hs366: has joined #ruby
[07:07:40] universa1: has joined #ruby
[07:17:22] aufi: has joined #ruby
[07:19:48] mjolnird: has joined #ruby
[07:21:05] jenrzzz: has joined #ruby
[07:21:05] jenrzzz: has joined #ruby
[07:21:30] biberu: has joined #ruby
[07:23:19] claudiuinberlin: has joined #ruby
[07:24:47] snickers: has joined #ruby
[07:25:24] enterprisey: has joined #ruby
[07:28:12] jxv: has joined #ruby
[07:33:47] banisterfiend: ["a", "b", "c"].grep /a/. how do i write NOT a
[07:34:23] mark_66: has joined #ruby
[07:36:01] Megamos: has joined #ruby
[07:36:37] cdg: has joined #ruby
[07:38:29] claudiuinberlin: has joined #ruby
[07:38:31] Aloy: banisterfiend: you can do /[^a]/ but that'll filter anything that starts with an a, ie, doing ["a", "b", "c", "aa", "ba"].grep /[^a]/ will return ["b", "c", "ba"]
[07:38:50] fullstack: has joined #ruby
[07:49:36] burgestrand: banisterfiend so much ambiguity, so many options :D
[07:49:42] burgestrand: >> %w[a b c].grep_v /a/
[07:49:44] ruby[bot]: Burgestrand: # => ["b", "c"] (https://eval.in/887276)
[07:49:55] banisterfiend: Burgestrand wow grep_v
[07:49:57] banisterfiend: that's what i wanted awesome
[07:50:09] burgestrand: banisterfiend haha, first guess is best guess :p
[07:50:18] FastJack: has joined #ruby
[07:50:30] burgestrand: banisterfiend it's rather new if I recall correctly, so don't go putting it in ruby 2.0.0
[07:50:54] banisterfiend: thanks homie i'm on 2.4.2 so no worries
[07:52:55] claudiuinberlin: has joined #ruby
[07:57:32] zautomata: has joined #ruby
[07:59:15] marr: has joined #ruby
[07:59:27] Illianthe: has joined #ruby
[08:00:04] cdg: has joined #ruby
[08:02:46] TomyWork: has joined #ruby
[08:08:04] milardovich: has joined #ruby
[08:13:15] snickers: has joined #ruby
[08:14:28] claudiuinberlin: has joined #ruby
[08:14:32] workmad3: has joined #ruby
[08:14:53] oetjenj: has joined #ruby
[08:15:06] anisha: has joined #ruby
[08:15:15] mikecmpbll: has joined #ruby
[08:19:28] cdg: has joined #ruby
[08:25:05] apeiros: banisterfiend: before grep_v I had Regexp#~
[08:25:16] apeiros: so: %w[a b c].grep(~/a/)
[08:25:32] apeiros: (all it did was invert ===, =~ and !~)
[08:25:54] banisterfiend: how did it work? a monkey patch?
[08:27:05] apeiros: class NegatedRegexp < Regexp; def =~(*); !super; end; …all other methods…; end; class Regexp; def ~; return NegatedRegexp.new(…<forgot the precise passing of params>…); end; end
[08:27:19] apeiros: not the exact impl. obviously, but should give you the general idea
[08:27:36] apeiros: worked pretty well. of course =~ would no longer return a position, only true/false.
[08:28:01] apeiros: I still like it more than grep_v, it's more versatile. can be used in case/when too e.g.
[08:28:11] apeiros: case foo; when ~/bar/; …
[08:30:28] Stan: has joined #ruby
[08:31:12] huyderman: has joined #ruby
[08:34:43] blackmesa: has joined #ruby
[08:37:56] guille-moe: has joined #ruby
[08:38:38] oetjenj: has joined #ruby
[08:39:50] dxlr8r: has joined #ruby
[08:41:52] ams__: has joined #ruby
[08:42:49] lxsameer: has joined #ruby
[08:44:09] dxlr8r: have some issues with JSON.parse, I've dummed down the JSON so it should be easy to read :) https://gist.github.com/anonymous/f2c53d0832d910e16584570d11db531b
[08:45:47] elomatreb: dxlr8r: You need to double-escape, you have a literal " in your JSON
[08:47:08] gloscombe: has joined #ruby
[08:47:17] TomyWork: has joined #ruby
[08:47:43] dxlr8r: elomatreb: I don't control the json elomatreb. never any issues with any other parser
[08:47:56] elomatreb: Not an issue with the JSON, but with how Ruby string literals work
[08:48:25] elomatreb: Print the JSON, you'll see it does not contain the backslash you need
[08:49:32] elomatreb: Illustration: https://eval.in/887292
[08:49:48] banisterfiend: Burgestrand do you have much experience compiling ruby?
[08:50:06] banisterfiend: Burgestrand i want to build a version of 2.4.2 binaries that can run on multiple versions of osx, you have any experience with this?
[08:50:20] burgestrand: banisterfiend not really :o
[08:51:09] Beams: has joined #ruby
[08:52:09] dxlr8r: elomatreb: so the solution is to replace all single escape with a triple escape?
[08:52:32] burgestrand: banisterfiend https://github.com/phusion/traveling-ruby ?
[08:52:32] elomatreb: Simpler solution would probably be to use single-quoted (') strings
[08:52:40] banisterfiend: Burgestrand nah
[08:52:41] burgestrand: banisterfiend maybe their build system for osx could help you
[08:52:49] burgestrand: banisterfiend as in, how they do it
[08:53:21] dxlr8r: elomatreb: the data is out of my control
[08:53:39] elomatreb: puts '" no escape necessary'
[08:53:43] elomatreb: >> puts '" no escape necessary'
[08:53:45] ruby[bot]: elomatreb: # => " no escape necessary ...check link for more (https://eval.in/887294)
[08:55:12] burgestrand: dxlr8r use `<<'JSON'` to avoid escapes
[08:55:57] dxlr8r: nice Burgestrand , thx
[08:59:56] Serpent7776: has joined #ruby
[09:00:26] oetjenj: has joined #ruby
[09:08:59] charliesome: has joined #ruby
[09:22:02] cdg: has joined #ruby
[09:25:10] quobo: has joined #ruby
[09:28:56] porfa: has joined #ruby
[09:29:12] jottr: has joined #ruby
[09:31:26] oetjenj: has joined #ruby
[09:32:57] workmad3: has joined #ruby
[09:35:50] Hexafox[I]: has joined #ruby
[09:36:14] milardovich: has joined #ruby
[09:36:25] FahmeF_: has joined #ruby
[09:39:02] milardovich: has joined #ruby
[09:39:36] erlend: has joined #ruby
[09:42:22] FahmeF: has joined #ruby
[09:43:56] InfinityFye: has joined #ruby
[09:44:05] ajaysingh: has joined #ruby
[09:45:10] oetjenj: has joined #ruby
[09:45:11] FahmeF_: has joined #ruby
[09:45:56] alnewkirk: has joined #ruby
[09:46:49] tvw: has joined #ruby
[09:48:19] Hexafox[I]: has joined #ruby
[09:50:29] FahmeF: has joined #ruby
[09:52:27] FahmeF: has joined #ruby
[09:53:17] marr: has joined #ruby
[09:53:35] Hexafox[I]: has joined #ruby
[09:55:30] zanoni: has joined #ruby
[09:59:26] uZiel: has joined #ruby
[09:59:46] camilasan: has joined #ruby
[10:03:26] FastJack: has joined #ruby
[10:06:03] cadillac_: has joined #ruby
[10:06:19] banisterfiend: has joined #ruby
[10:07:29] mim1k: has joined #ruby
[10:09:39] FahmeF_: has joined #ruby
[10:09:44] markzen: has joined #ruby
[10:10:14] markzen: has left #ruby: ("WeeChat 1.9.1")
[10:10:21] ek926m: has joined #ruby
[10:23:07] mtkd: has joined #ruby
[10:25:25] fullstack: has joined #ruby
[10:27:35] ldnunes: has joined #ruby
[10:32:34] jottr: has joined #ruby
[10:38:51] fclausen: has joined #ruby
[10:41:14] Psybur: has joined #ruby
[10:43:38] ta: has joined #ruby
[10:49:54] jphase: has joined #ruby
[10:50:45] Exagone313: has joined #ruby
[10:52:32] alnewkirk: has joined #ruby
[10:56:40] jaruga: has joined #ruby
[10:57:33] alnewkirk: has joined #ruby
[11:01:18] alfiemax: has joined #ruby
[11:03:02] blackmesa: has joined #ruby
[11:03:18] porfa: has joined #ruby
[11:05:25] rabajaj: has joined #ruby
[11:11:41] alnewkirk: has joined #ruby
[11:15:39] fclausen: has joined #ruby
[11:17:55] claudiuinberlin: has joined #ruby
[11:21:11] oetjenj: has joined #ruby
[11:27:18] latemus: has joined #ruby
[11:27:50] latemus: what is the StringIO bytes used by .from_bson(string_io)
[11:28:22] latemus: the bson tutorial is very terse and they do not explain what it is
[11:28:35] latemus: anyone happen to know?
[11:30:00] sepp2k: has joined #ruby
[11:30:24] frmendes: has joined #ruby
[11:34:34] alfiemax_: has joined #ruby
[11:36:29] zautomata: has joined #ruby
[11:41:03] Samaritano: has joined #ruby
[11:43:18] Samaritano: has left #ruby: ()
[11:48:10] vtx: has joined #ruby
[11:57:45] mim1k_: has joined #ruby
[12:02:28] Lyubo1: has joined #ruby
[12:06:00] _aeris_: has joined #ruby
[12:07:26] oetjenj: has joined #ruby
[12:07:44] synthroid: has joined #ruby
[12:09:59] jottr: has joined #ruby
[12:10:04] frmendes: has joined #ruby
[12:10:42] Lyubo1: has joined #ruby
[12:10:43] uZiel: has joined #ruby
[12:13:01] duckpuppy: has joined #ruby
[12:13:04] __Yiota: has joined #ruby
[12:13:22] vtx: has joined #ruby
[12:14:27] Defenestrate: has joined #ruby
[12:14:28] Defenestrate: has joined #ruby
[12:19:16] Siyfion: has joined #ruby
[12:29:31] jaruga: has joined #ruby
[12:30:10] jaruga: has joined #ruby
[12:31:26] jaruga: has joined #ruby
[12:35:03] burgestrand: has joined #ruby
[12:35:55] oetjenj: has joined #ruby
[12:37:20] Psybur: has joined #ruby
[12:38:33] goyox86_: has joined #ruby
[12:41:51] bmurt: has joined #ruby
[12:42:22] jphase: has joined #ruby
[12:43:02] claudiuinberlin: has joined #ruby
[12:47:44] mim1k: has joined #ruby
[12:47:45] Neptu_: has joined #ruby
[12:47:57] goyox86__: has joined #ruby
[12:48:46] alfiemax: has joined #ruby
[12:49:40] stoopidmunkey: has joined #ruby
[12:56:30] jrafanie: has joined #ruby
[12:57:52] shinnya: has joined #ruby
[12:59:08] gr33n7007h: has joined #ruby
[13:01:24] Devalo: has joined #ruby
[13:03:33] apparition: has joined #ruby
[13:04:23] charliesome: has joined #ruby
[13:07:04] cdg: has joined #ruby
[13:09:52] bmurt: has joined #ruby
[13:12:55] charliesome_: has joined #ruby
[13:14:04] goyox86: has joined #ruby
[13:14:10] tsglove: has joined #ruby
[13:15:30] cdg_: has joined #ruby
[13:16:37] goyox86_: has joined #ruby
[13:17:06] ShekharReddy: has joined #ruby
[13:18:19] |ifei5g00d: has joined #ruby
[13:20:11] fullstack: has joined #ruby
[13:20:25] quobo: has joined #ruby
[13:20:54] Megamosaren: has joined #ruby
[13:21:52] dar123: has joined #ruby
[13:22:51] alnewkirk: has joined #ruby
[13:24:54] |ifei5good: has joined #ruby
[13:25:51] charliesome: has joined #ruby
[13:26:00] alan_w: has left #ruby: ("WeeChat 1.9.1")
[13:27:48] Hexafox[I]: If you send a block to a function does that block replace yield in the function?
[13:30:59] tobiasvl: Hexafox[I]: it calls the block, yes
[13:31:26] tobiasvl: it doesn't "replace" it any more than a method definition replaces a method call
[13:31:55] alnewkirk: has joined #ruby
[13:32:14] claudiuinberlin: has joined #ruby
[13:34:53] charliesome_: has joined #ruby
[13:35:35] Hexafox[I]: Would taking a block as a parameter make the function a higher order function?
[13:35:38] GodFather: has joined #ruby
[13:35:52] DLSteve_: has joined #ruby
[13:36:49] fclausen: has joined #ruby
[13:37:01] basket: Hexafox[I]: Yes
[13:40:59] alnewkirk: has joined #ruby
[13:41:29] charliesome: has joined #ruby
[13:41:52] blackmesa: has joined #ruby
[13:43:56] mson: has joined #ruby
[13:44:06] claudiuinberlin: has joined #ruby
[13:50:03] alnewkirk: has joined #ruby
[13:54:20] charliesome_: has joined #ruby
[13:58:57] mim1k: has joined #ruby
[13:59:07] alnewkirk: has joined #ruby
[14:00:25] __Yiota: has joined #ruby
[14:01:51] cdg: has joined #ruby
[14:02:10] cdg: has joined #ruby
[14:02:11] selim: has joined #ruby
[14:05:06] hutch34: has joined #ruby
[14:05:09] apeiros: has joined #ruby
[14:08:58] charliesome: has joined #ruby
[14:12:20] robnester: has joined #ruby
[14:12:58] Technodrome: has joined #ruby
[14:13:40] chouhoulis: has joined #ruby
[14:17:11] bmurt: has joined #ruby
[14:19:51] oleo: has joined #ruby
[14:19:54] charliesome_: has joined #ruby
[14:21:04] Rapture: has joined #ruby
[14:28:18] jphase: has joined #ruby
[14:28:34] charliesome: has joined #ruby
[14:29:59] anisha_: has joined #ruby
[14:30:56] fullstack: has joined #ruby
[14:32:02] ResidentBiscuit: has joined #ruby
[14:33:11] lele: has joined #ruby
[14:33:44] snickers: has joined #ruby
[14:34:54] cschneid_: has joined #ruby
[14:37:19] charliesome_: has joined #ruby
[14:39:21] bmurt: has joined #ruby
[14:44:14] charliesome: has joined #ruby
[14:46:31] Immune: has joined #ruby
[14:50:19] Technodrome: has joined #ruby
[14:51:23] goyox86: has joined #ruby
[14:54:48] brendan-: has joined #ruby
[14:55:06] goyox86__: has joined #ruby
[14:55:55] tcopeland1: has joined #ruby
[14:58:01] kculpis: has joined #ruby
[14:59:56] goyox86_: has joined #ruby
[15:00:01] Bish: has joined #ruby
[15:03:54] jrafanie: has joined #ruby
[15:07:30] ahrs: has joined #ruby
[15:08:48] cdg: has joined #ruby
[15:09:12] guacamole: has joined #ruby
[15:09:33] cschneid_: has joined #ruby
[15:11:18] mim1k: has joined #ruby
[15:14:20] ltem: has joined #ruby
[15:15:08] Devalo: has joined #ruby
[15:15:10] goyox86: has joined #ruby
[15:16:35] dkam: has joined #ruby
[15:16:38] cdg: has joined #ruby
[15:17:49] alfiemax: has joined #ruby
[15:18:27] nogic: has joined #ruby
[15:19:22] goyox86_: has joined #ruby
[15:21:04] leah2: there is no "semantic date range" in the stdlib, is there? e.g. to specify "7 days later"
[15:21:04] thomasv314: has joined #ruby
[15:21:08] polishdub: has joined #ruby
[15:21:47] ozcanesen: has joined #ruby
[15:21:58] orbyt_: has joined #ruby
[15:27:23] 7JTACQWSD: has joined #ruby
[15:28:12] rippa: has joined #ruby
[15:28:45] uZiel: has joined #ruby
[15:31:35] blackmesa1: has joined #ruby
[15:32:43] synthroid: has joined #ruby
[15:34:11] synthroid: has joined #ruby
[15:35:08] Sambsquanch: has joined #ruby
[15:35:09] charliesome_: has joined #ruby
[15:35:40] JoshL: has joined #ruby
[15:36:27] mim1k: has joined #ruby
[15:37:25] johno84: has joined #ruby
[15:37:28] fclausen: has joined #ruby
[15:38:16] mtkd: has joined #ruby
[15:39:30] goyox86_: has joined #ruby
[15:39:57] dinfuehr: has joined #ruby
[15:42:07] charliesome: has joined #ruby
[15:45:10] goyox86: has joined #ruby
[15:49:04] charliesome_: has joined #ruby
[15:50:13] kies: has joined #ruby
[15:50:25] tyil: has left #ruby: ("WeeChat 1.8")
[15:50:39] alfiemax: has joined #ruby
[15:53:40] uZiel: has joined #ruby
[15:53:40] pmunt__: has joined #ruby
[15:53:49] fullstack: has joined #ruby
[15:56:18] havenwood: leah2: nope
[15:56:35] zehbax: has joined #ruby
[15:57:20] havenwood: https://github.com/janko-m/as-duration
[15:57:29] havenwood: https://github.com/zverok/time_math2
[15:57:40] troys: has joined #ruby
[16:01:00] charliesome: has joined #ruby
[16:03:27] bmurt: has joined #ruby
[16:07:29] charliesome_: has joined #ruby
[16:09:01] DrCode: has joined #ruby
[16:12:36] chouhoulis: has joined #ruby
[16:14:25] chouhoul_: has joined #ruby
[16:14:44] tcopeland: has joined #ruby
[16:15:00] theory4000: has joined #ruby
[16:16:00] code_zombie: has joined #ruby
[16:17:44] dviola: has joined #ruby
[16:18:55] vtx: has joined #ruby
[16:20:44] alfiemax: has joined #ruby
[16:23:14] leah2: yeah, solved it with a trivial implementation of iso8601 durations
[16:23:31] Dimik: has joined #ruby
[16:24:10] charliesome: has joined #ruby
[16:24:35] orbyt_: has joined #ruby
[16:25:19] jenrzzz: has joined #ruby
[16:25:53] dionysus69: has joined #ruby
[16:26:19] conta: has joined #ruby
[16:29:13] jphase: has joined #ruby
[16:29:56] alfiemax: has joined #ruby
[16:31:39] gusrub: has joined #ruby
[16:33:35] ozcanesen: has joined #ruby
[16:35:00] charliesome_: has joined #ruby
[16:46:26] conta2: has joined #ruby
[16:49:48] 17SAAX3PR: has joined #ruby
[16:51:16] uZiel: has joined #ruby
[16:52:20] RickHull: has joined #ruby
[16:53:45] RickHull: anyone want to discuss tree data structures implementations? I have a generic tree which has a reference to the root node and can be walked from there
[16:54:06] mim1k: has joined #ruby
[16:54:37] RickHull: i find that when trying to add a new node, I want to keep the tree balanced / complete, and it's O(n) (I think) to do a breadth first search to find an open parent
[16:55:08] RickHull: each node has references to its children and its parent, so walking the tree can go both up and down
[16:55:27] RickHull: should the tree maybe maintain references to each leaf node somehow?
[16:55:41] RickHull: should I give up in bidirectional links for a generic tree?
[16:56:22] teatime: has left #ruby: ()
[16:56:26] goyox86: has joined #ruby
[16:56:50] jenrzzz: has joined #ruby
[16:56:51] jenrzzz: has joined #ruby
[16:56:53] RickHull: i find there is no easy way to go from a parent which had its last available child, to the next candidate open parent laterally to the right
[16:57:25] snickers: has joined #ruby
[16:57:48] RickHull: I haven't even gotten to the tree maintaining some property and swapping nodes to achieve it. just building it by adding new nodes without consideration to node values
[16:58:29] RickHull: I did implement a CompleteBinaryTree with an array, using index math to maintain parent child relationships
[16:58:57] RickHull: and this is very fast to insert and maintain a certain property, namely that of a heap
[16:59:08] chouhoulis: has joined #ruby
[17:00:09] goyox86: has joined #ruby
[17:04:47] apeiros: has joined #ruby
[17:04:51] ledestin: has joined #ruby
[17:04:53] goyox86: has joined #ruby
[17:06:13] shinnya: has joined #ruby
[17:11:46] jenrzzz: has joined #ruby
[17:14:59] DrCode: has joined #ruby
[17:16:03] goyox86_: has joined #ruby
[17:17:12] SeepingN: has joined #ruby
[17:19:45] alfiemax: has joined #ruby
[17:19:50] kapil___: has joined #ruby
[17:22:40] Technodrome: has joined #ruby
[17:26:16] mn3m: has joined #ruby
[17:26:39] TViernion: has joined #ruby
[17:27:47] TViernion: afternoon everyone. I'm trying to install gem rmagick and it fails with "Can't find MagickWand.h.
[17:28:08] RickHull: sounds like a broken gem
[17:28:16] RickHull: maybe try a prior version
[17:28:30] TViernion: The install did say it detect a partiol ImageMagick installation ... version 6.7.8
[17:28:32] RickHull: gem install -v 1.2.3 rmagick # something like that
[17:29:08] kies: has joined #ruby
[17:29:51] RickHull: consider pasting the output of the install, particularly if there are warnings, issues, or concerns like partial install
[17:30:02] baweaver: TViernion: OS?
[17:30:09] Devalo: has joined #ruby
[17:30:16] baweaver: ImageMagick is a particularly annoying gem
[17:30:32] baweaver: One sec, see if I can find that again
[17:30:39] porfa: has joined #ruby
[17:30:41] baweaver: short version is you need its binary files too
[17:31:02] baweaver: http://www.webhostingtalk.com/showthread.php?t=1528610
[17:31:06] RickHull: can you use https://github.com/seattlerb/image_science ?
[17:31:09] baweaver: Pretty much that, then try again
[17:31:24] baweaver: zenspider came up with that name didn't he?
[17:31:49] RickHull: ha, yup, it's like a decade old IIRC
[17:32:14] RickHull: confirmed, 2006
[17:32:19] eckhardt: has joined #ruby
[17:32:59] goyox86_: has joined #ruby
[17:32:59] TViernion: i though i followed these: for the binarys https://github.com/SocialReal/SocialReal_old/wiki/How-to-install-gem-rmagick---Fedora---CentOS
[17:33:38] baweaver: Yeah, gist the errors you're getting
[17:35:38] TViernion: https://pastebin.com/nsvXphUS here is the error log
[17:35:40] ruby[bot]: TViernion: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/2a75880a1428a679893d5ecd52f8f85e
[17:35:40] ruby[bot]: TViernion: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[17:35:58] TViernion: didn't know about gist... appologies
[17:36:01] marxarelli: has joined #ruby
[17:36:24] baweaver: Eh, don't worry about it too much
[17:36:29] baweaver: the bot is a bit happy with that.
[17:36:47] baweaver: https://gist.github.com/anonymous/2a75880a1428a679893d5ecd52f8f85e#file-ruby-rb-L10
[17:36:50] baweaver: That's interesting
[17:36:56] guacamole: has joined #ruby
[17:37:23] TViernion: yeah.. i am trying to get redmine going ... and this is the first time i've eveery played with ror
[17:38:05] baweaver: Yeah, gems like ImageMagick are a special brand of hell for the uninitiated
[17:38:09] fclausen: has joined #ruby
[17:41:24] TViernion: yeah.. this morning has definitely been a FML kinda day.
[17:41:57] goyox86: has joined #ruby
[17:42:58] baweaver: I'd probably purge your install of it and see if you can get the latest source.
[17:43:46] TViernion: i have the source for Imagemagick-7.0.7-8
[17:44:04] claudiuinberlin: has joined #ruby
[17:44:16] alfiemax: has joined #ruby
[17:44:27] TViernion: so I just did a yum remove ImageMagick and wiped it.. maybe tri the gem install again now?
[17:45:21] Guest8380: has joined #ruby
[17:45:25] imode: has joined #ruby
[17:45:51] TViernion: now it's detecting the 7.0.7 but it's still saying magicwand.h not found.
[17:47:14] TViernion: RickHull, now i did just try image_science and it seems ti have installed 3 gems
[17:47:20] TViernion: what would be the best way to verify that it did install it?
[17:47:33] alnewkirk: has joined #ruby
[17:48:04] RickHull: first make sure image_science does what you need it to. it's much more limited in scope than imagemagick
[17:55:38] marxarelli: has joined #ruby
[17:55:58] mn3m: has joined #ruby
[17:56:38] TViernion: anyone know the current mysql gem? i'm getting an error with 2.9.1 "undefined reference to 'rb_thread_start_timer'
[17:57:01] darix: TViernion: mysql2
[17:57:52] jrafanie: has joined #ruby
[17:58:21] orbyt_: has joined #ruby
[18:04:23] alfiemax_: has joined #ruby
[18:04:25] TViernion: https://gist.github.com/jasonmacer/007c4a95e14370e89d99953f69867cc5
[18:04:30] TViernion: heres the error that i'm getting
[18:05:57] mson: has joined #ruby
[18:06:25] TViernion: i'm running gem 2.6.14
[18:06:27] remo: has joined #ruby
[18:06:38] chouhoul_: has joined #ruby
[18:07:45] chouhoul_: has joined #ruby
[18:09:01] Technodrome: has joined #ruby
[18:09:35] brw: has joined #ruby
[18:09:57] TViernion: heres a question ... do i need the mysql and mysql2 gems both?
[18:10:18] eroux: has joined #ruby
[18:10:54] TViernion: also RickHull image_science doesn't build ... fuuuun
[18:11:29] RickHull: i haven't messed with it in a long time. what's the issue?
[18:11:56] code_zombie_: has joined #ruby
[18:12:16] TViernion: https://gist.github.com/jasonmacer/45ada2b653b5d07c37f3067d88b21942
[18:13:07] claudiuinberlin: has joined #ruby
[18:15:29] __Yiota: has joined #ruby
[18:16:26] hurricanehrndz: has joined #ruby
[18:19:35] mn3m: has joined #ruby
[18:19:41] mn3m: has joined #ruby
[18:20:17] blackmesa1: has joined #ruby
[18:21:36] reaVer: has joined #ruby
[18:21:53] jenrzzz_: has joined #ruby
[18:23:03] zer0python: has joined #ruby
[18:23:39] zer0python: question, what is a good gem for reading & writing xlsx spreadsheets? (Featureful, pivot table, charts, etc)
[18:23:46] orbyt_: has joined #ruby
[18:23:50] zer0python: RubyXL seems buggy and uses way too much memory
[18:24:34] zer0python: I can't get roo to write anything. (but apparently it doesn't support writing)
[18:24:41] zer0python: and axlsx doesn't seem to support reading
[18:27:05] SeepingN: read with rubyxl, write with axlsx?
[18:27:23] SeepingN: 20 gigs of ram later, you have a product!
[18:28:09] SeepingN: I love ruby as a language but damn, it needs a diet or something
[18:30:39] imode: has joined #ruby
[18:31:37] cdg_: has joined #ruby
[18:31:54] jorb: has joined #ruby
[18:32:20] apeiros: SeepingN: for the type of language it is, it's actually doing quite well. but it's very very easy to write memory (and CPU) inefficient code :-/
[18:32:28] k3rn31: has joined #ruby
[18:33:30] blackmesa1: has joined #ruby
[18:34:11] SeepingN: also my view is tainted. What I thought was a slowness in loading ruby just to run a 600 line script, turns out mostly to be due to a scan I do near the start. Looking in a directory with 274000 entires for a matching serial number...! Woopsies
[18:34:48] apeiros: yeah, benchmarking can help figure out what's slow
[18:35:27] SeepingN: I had forgotten it may be becoming an issue. Then I went to manually look for something int hat directoy and an "ls" took minutes
[18:35:30] apeiros: other funny things to do: big_ary.any? { |e| other_big_ary.include?(e) } # looks like a single loop, but whoopsie O(n^2), or rather O(n*m)
[18:35:32] cdg: has joined #ruby
[18:35:44] SeepingN: oddly, once in a while it would return an ls within seconds.
[18:35:52] apeiros: caching maybe
[18:36:15] reaVer: has joined #ruby
[18:36:17] SeepingN: yeah. apparnetly we're using XFS so seems possible
[18:36:35] SeepingN: and with more an dmore things writing to that directly, it has less time to cache and use said cache
[18:36:52] apeiros: I got super mario odyssey, why am I not playing? o0
[18:37:11] apeiros: ACTION will ponder for another few minutes and then vanish to go play :D
[18:37:44] Cerbb: has joined #ruby
[18:38:00] jorb: so like, i am running `bundle exec` on something, and it has zero verbose logging to help debug even with the -V, is this a typical issue?
[18:38:49] dionysus69: has joined #ruby
[18:38:56] apeiros: jorb: that would depend a lot on what you execute.
[18:39:14] lanc: has joined #ruby
[18:39:25] alfiemax: has joined #ruby
[18:39:37] lanc: has joined #ruby
[18:39:44] Cerbb: hi...i have silly question...i installed ruby from the repo of debian jessie, then i found out that i was supposed to use rvm to install it. is it correct? in my installation, bundle seems to require sudo access, and I read that it could be because of the way i install it. so the question: is it ok if i remove ruby with 'remove' then install rvm and reinstall ruby with rvm?
[18:39:55] Cerbb: does any of what i said make sense?
[18:40:11] apeiros: Cerbb: you're not supposed to use rvm.
[18:40:15] lanc: has left #ruby: ()
[18:40:16] apeiros: but rvm is a good option
[18:40:21] havenwood: Cerbb: It's fine to use the package manager or an installer like RVM, ruby-build or ruby-install
[18:40:36] apeiros: if you install it via rvm, install it as a user, not via root. bundler shouldn't need sudo then either.
[18:40:56] Cerbb: the point is that at the moment bundle says:
[18:40:58] Cerbb: Your user account isn't allowed to install to the system RubyGems.
[18:40:58] Cerbb: You can cancel this installation and run:
[18:40:58] Cerbb: bundle install --path vendor/bundle
[18:41:03] Cerbb: ops..sorry
[18:41:24] apeiros: yes, so you use bundler with a different user than what you used to install ruby I'd say
[18:41:31] apeiros: (or you have a very funny installation)
[18:41:42] apeiros: also make sure you actually use the bundler for your rvm ruby
[18:41:53] Cerbb: i do not have rvm at the moment
[18:41:57] apeiros: rvm ruby can coexist with system ruby, and if you don't select rvm ruby, you'll run system ruby.
[18:42:06] Cerbb: i was wondering if there is a good way to change the permission without reinstalling it
[18:42:23] havenwood: Cerbb: Yes, you can have your system Ruby install gems to your $HOME directory.
[18:42:53] havenwood: Cerbb: Some package managers do that by default.
[18:43:09] havenwood: Cerbb: RubyGems has a --user-install flag that will: Install in user's home directory instead of GEM_HOME.
[18:43:32] Cerbb: so i have to activate this flag
[18:43:32] TViernion: RickHull, i don't know what happened.. but i did a yum install Imagemagick-devel and imageMagick and it freakin worked.. lol
[18:43:47] havenwood: Cerbb: You can create a ~/.gemrc file to remember that flag: gem: "--user-install"
[18:44:01] RickHull: TViernion: ah right, when it complains about missing .h files, you need the -dev packages
[18:44:23] TViernion: now onward and upwards
[18:44:41] Cerbb: so essentially every time i run some ruby-thing it is the same as running with the flag
[18:44:49] Cerbb: i think i understand
[18:44:51] Cerbb: i will try
[18:45:03] vipaca: has joined #ruby
[18:49:01] apeiros: .gemrc is specifically for rubygems
[18:49:06] apeiros: hence the name ;-)
[18:49:15] TViernion: Rickhull well shiiit... now i'm getting a failed to load command rake .. Name Error: uninitialized constant rake... and it's asking "did you mean? RBConfig" where would i change that
[18:49:33] Cerbb: havenwood: i created this .gemrc file with just one line that says ' gem: "--user-install" '. is this what you meant? and now i reinstall bundle with gem install bundler so that it gets installed in the home directory?
[18:50:07] havenwood: Cerbb: then check: gem which bundler
[18:50:12] RickHull: TViernion: "rake" is the executable, on the filesystem
[18:50:25] RickHull: not a proper name in ruby code (i.e. in an .rb file)
[18:50:47] RickHull: i think the module/class is Rake
[18:50:52] havenwood: Cerbb: and check: command -v bundler
[18:51:23] havenwood: Cerbb: err, I mean: command -v bundle
[18:51:32] TViernion: rickhull https://gist.github.com/jasonmacer/f3156ae70dfdb69bbfc43530ec093076
[18:51:49] havenwood: I guess they install a bundler bin too, but that's confusing.
[18:52:04] RickHull: oh, rake was removed from stdlib and is now (2.4.x ?) a gem
[18:52:12] RickHull: but included by default? not sure
[18:52:41] Cerbb: mmm command -v bundle gives the same thing as before which is /usr/local/bin/bundle
[18:52:54] RickHull: TViernion: NameError: uninitialized constant Rake::AltSystem::Config
[18:53:06] TViernion: shouldn't it be RbConfig?
[18:53:10] TViernion: well that'as what it's saying
[18:53:35] RickHull: what is Rake::AltSystem::Config?
[18:53:40] Cerbb: and indeed it still asks for sudo permission
[18:53:44] RickHull: some gem or something provides that
[18:53:52] RickHull: and you don't have it installed / activated
[18:54:48] directhex: has joined #ruby
[18:54:55] TViernion: http://www.redmine.org/projects/redmine/wiki/How_to_Install_Redmine_on_CentOS_(Detailed)#Add-the-Bundler-Boot-and-preinitializer-code i've followed these instructions (i'm down to "Generate the Session Store"
[18:55:11] directhex: has left #ruby: ()
[18:55:17] blackmesa1: has joined #ruby
[18:55:27] TViernion: the only portion that i thinki missed now that i think about it is "add the bundler Boot and preinitialiizer code" i need to go back and figure that out.
[18:56:12] bruno-: has joined #ruby
[18:56:24] Cerbb: havenwood: i think i did something wrong. it still asks for sudo permission
[18:56:49] Cerbb: gem: "--user-install" <- is it like this? quotes are supposed to be there, right?
[18:56:53] havenwood: Cerbb: your new bundle bin probably isn't in your path
[18:56:57] havenwood: Cerbb: what is: gem which bundler
[18:57:03] havenwood: Cerbb: command -v bundle
[18:57:17] havenwood: Cerbb: Does one point to the new path and the other the old?
[18:57:35] Technodrome: has joined #ruby
[18:57:51] jenrzzz: has joined #ruby
[18:57:51] jenrzzz: has joined #ruby
[18:57:59] Cerbb: gem which bundler says: /home/fulges/.gem/ruby/2.1.0/gems/bundler-1.15.4/lib/bundler.rb
[18:58:06] Cerbb: which is in my user directory
[18:58:08] havenwood: okay, that's right
[18:58:17] havenwood: so far so good
[18:58:30] Cerbb: command -v bundle says /usr/local/bin/bundle
[18:58:31] havenwood: likely the bin/ folder isn't in your PATH
[18:58:34] Cerbb: which is up there
[18:58:43] Cerbb: where you need sudo
[18:58:52] havenwood: yeah, so that's pointing at the bundler which is in your PATH, the system one
[18:58:52] jrafanie: has joined #ruby
[18:59:11] Cerbb: so I have to add the other path in the bashrc file?
[18:59:18] havenwood: Cerbb: export PATH="/home/fulges/.gem/ruby/2.1.0/bin:$PATH"
[18:59:47] havenwood: Cerbb: then recheck: command -v bundle
[18:59:53] havenwood: all should be well
[19:00:39] Cerbb: now it is /home/fulges/.gem/ruby/2.1.0/bin/bundle
[19:00:53] havenwood: you should be good to go
[19:01:07] Cerbb: should I copy export PATH="/home/fulges/.gem/ruby/2.1.0/bin:$PATH" somewhere so that it does that by itself every time?
[19:01:35] havenwood: Cerbb: you said bash? so your .bashrc file
[19:02:06] Cerbb: there i have other export path commands...i append this one
[19:02:17] havenwood: https://github.com/rbenv/rbenv/wiki/Unix-shell-initialization#bash
[19:02:53] havenwood: Cerbb: Yeah, prepend the RubyGems bin/ to your PATH.
[19:03:22] thomasv314: has joined #ruby
[19:03:51] Cerbb: perfect...new terminal and still the right command -v bundle
[19:04:00] Cerbb: now we try to see if it works xD
[19:05:19] DLSteve_: has joined #ruby
[19:05:19] blackmesa: has joined #ruby
[19:05:34] anisha_: has joined #ruby
[19:06:10] Press10_: has joined #ruby
[19:06:40] Cerbb: havenwood: still asks for sudo access :(
[19:06:54] havenwood: Cerbb: try setting: export GEM_HOME="/home/fulges/.gem/ruby/2.1.0"
[19:07:22] Press10_: Hey all. Reading a blog post on 2.5 and trying to understand the difference between yield_self and instance_eval? It seems like the implementation is a little different, but is there any reason to choose one over the other?
[19:08:01] havenwood: Cerbb: And: export GEM_PATH="/home/fulges/.gem/ruby/2.1.0:$GEM_PATH"
[19:08:57] havenwood: Cerbb: Putting RubyGems bin/ in PATH, setting GEM_HOME and GEM_PATH, etc is what the chruby Ruby version switcher does: https://github.com/postmodern/chruby
[19:09:38] havenwood: https://github.com/postmodern/chruby/blob/master/share/chruby/chruby.sh#L55-L57
[19:09:55] Cerbb: now i get a dependency error. but it is fine i guess
[19:10:01] Cerbb: i have to solve that one xD
[19:10:29] Kasavage: has joined #ruby
[19:10:40] Cerbb: i put the updated GEM_HOME and GEM_PATH also in bashrc?
[19:11:31] Kasavage: Anyone know if there is a way to swap out a certain number of spaces for a character? For example if there is 10 spaces replaces those 10 spaces with a comma?
[19:11:43] Cerbb: ok thanks
[19:12:02] havenwood: Kasavage: if you want to do it once, look at #sub, or multiple times look at #gsub
[19:12:33] npgm: has joined #ruby
[19:12:37] Press10_: Ooo. yield_self is twice as fast in a basic test.
[19:13:00] goyox86: has joined #ruby
[19:13:05] Kasavage: I am currently using gsub with /\s+/ etc but how can I define say /\s+10/ for 10 spaces and so forth?
[19:13:06] havenwood: >> ' Kasavage !'.sub /\s{10}/, ','
[19:13:07] ruby[bot]: havenwood: # => " Kasavage, !" (https://eval.in/887922)
[19:13:18] Kasavage: Answers my question, thank you!
[19:13:39] havenwood: Kasavage: `{10,}` is ten or more
[19:14:04] Kasavage: Thanks for the fast answers as always guys.
[19:14:04] havenwood: Kasavage: `{10,12}` is 10-12
[19:14:16] havenwood: Kasavage: any time!
[19:17:43] Cerbb: yay..it worked \o/
[19:18:21] mtkd: has joined #ruby
[19:19:48] enterprisey: has joined #ruby
[19:20:04] alnewkirk: has joined #ruby
[19:22:14] jrafanie: has joined #ruby
[19:22:23] imode: has joined #ruby
[19:24:13] Technodrome: has joined #ruby
[19:25:26] ta: has joined #ruby
[19:25:57] nofxx: has joined #ruby
[19:26:15] postmodern: has joined #ruby
[19:30:10] ta: has joined #ruby
[19:30:48] claudiuinberlin: has joined #ruby
[19:31:12] mn3m: has joined #ruby
[19:31:48] blackmesa1: has joined #ruby
[19:35:59] tvw: has joined #ruby
[19:36:20] raynold: has joined #ruby
[19:36:27] nadir: has joined #ruby
[19:39:01] fclausen: has joined #ruby
[19:40:19] jenrzzz: has joined #ruby
[19:41:38] mtkd: has joined #ruby
[19:41:44] oncall-pokemon: has joined #ruby
[19:55:37] thomasv314: has joined #ruby
[20:01:23] drbroiler: has joined #ruby
[20:02:10] mn3m: has joined #ruby
[20:03:59] Rapture: has joined #ruby
[20:04:09] troulouliou_div2: has joined #ruby
[20:05:39] Rapture: has joined #ruby
[20:05:48] orbyt_: has joined #ruby
[20:05:51] eckhardt: has joined #ruby
[20:12:03] ta: has joined #ruby
[20:14:33] jorb: so this bundle exec is running sequel and then getting this fun "key too long" error and there doesn't seem to be a way to get it to kick out what create statement is making that happen
[20:15:02] jorb: any advice?
[20:16:13] enterprisey: has joined #ruby
[20:17:27] dionysus69: has joined #ruby
[20:18:14] Flabbergazta: has joined #ruby
[20:21:26] RickHull: paste the command and output
[20:21:37] RickHull: omit or redact any sensitive info
[20:21:52] mostlybadfly: has joined #ruby
[20:22:43] zautomata: has joined #ruby
[20:23:14] cdg: has joined #ruby
[20:28:46] jorb: RickHull: the trick appears to be the -E flag to sequel, asking in #sequel helped..
[20:28:55] jorb: that will make it spit out all the things that it is doing
[20:31:12] Technodrome: has joined #ruby
[20:31:42] cdg: has joined #ruby
[20:32:30] rt: has joined #ruby
[20:39:44] shinnya: has joined #ruby
[20:47:56] charliesome: has joined #ruby
[20:50:50] charliesome_: has joined #ruby
[20:56:15] hutch34: has joined #ruby
[21:02:10] mn3m: has joined #ruby
[21:03:09] thomasv314: has joined #ruby
[21:06:20] abi-hto: has joined #ruby
[21:09:10] jenrzzz: has joined #ruby
[21:09:11] jenrzzz: has joined #ruby
[21:09:58] imode: has joined #ruby
[21:12:32] agent_white: has joined #ruby
[21:13:47] ta: has joined #ruby
[21:17:32] marens: has joined #ruby
[21:17:32] marens: has joined #ruby
[21:22:28] banisterfiend: has joined #ruby
[21:22:59] mtkd: has joined #ruby
[21:23:32] banisterfiend: has joined #ruby
[21:26:36] sagax: has joined #ruby
[21:33:11] nowhereman: has joined #ruby
[21:38:18] abi-hto: has joined #ruby
[21:39:43] fclausen: has joined #ruby
[21:44:27] kies: has joined #ruby
[21:48:54] nowhereman: has joined #ruby
[21:51:10] _whitelogger: has joined #ruby
[21:52:50] PaulCapestany: has joined #ruby
[21:55:41] orbyt_: has joined #ruby
[21:59:20] cdg: has joined #ruby
[21:59:31] dminuoso: havenwood: This is so ridiculous, I dont even know how to solve problems without function composition anymore. :(
[21:59:53] dminuoso: Just started poking at Elixir, and suddenly thing have gotten really cumbersome...
[22:00:32] ruby[bot]: has joined #ruby
[22:00:32] ChanServ: +o ruby[bot]
[22:01:40] RickHull: dminuoso: got any enhancement ideas for https://github.com/rickhull/compsci ?
[22:03:05] nogic: has joined #ruby
[22:03:26] dminuoso: RickHull: Actually, yes.
[22:03:48] jphase: has joined #ruby
[22:04:51] fclausen: has joined #ruby
[22:08:05] drbroiler: has joined #ruby
[22:08:13] cadillac_: has joined #ruby
[22:09:24] RickHull: banisterfiend: rake's sh outputs the command on $stderr, looks like
[22:10:03] dminuoso: RickHull: Personally I find returns from blocks disgusting.
[22:10:41] Azure: has joined #ruby
[22:11:46] RickHull: so break and then return?
[22:11:49] havenwood: RickHull: I think it's worth having paths match namespaces, name-wise.
[22:11:52] ap4y: has joined #ruby
[22:12:20] RickHull: you mean fib.rb?
[22:12:25] RickHull: tree.rb has a bunch of names
[22:12:39] dminuoso: RickHull: I use lambdas exclusively nowadays for various reasons.
[22:12:53] dminuoso: But that quickly goes into "personal preferences territory"
[22:12:56] RickHull: dminuoso: ooh, can you give an example?
[22:13:16] Heph_: has joined #ruby
[22:13:33] havenwood: RickHull: Yeah, I was looking at fib.
[22:13:40] havenwood: RickHull: You should add a matrix fib!
[22:13:55] havenwood: RickHull: https://gist.github.com/havenwood/02cf291b809327d96a3f
[22:15:08] Heph_: has left #ruby: ()
[22:15:08] __Yiota: has joined #ruby
[22:15:11] dminuoso: RickHull: This was some random junk code I wrote to process a file the other day: https://gist.github.com/dminuoso/b9b48f79999292947787b66cea3d4cf3
[22:15:11] RickHull: ACTION strokes chin
[22:15:40] eckhardt: has joined #ruby
[22:16:33] jphase: has joined #ruby
[22:16:35] RickHull: great example, will get to it in depth shortly :)
[22:16:48] ap4y1: has joined #ruby
[22:17:10] dminuoso: havenwood: You know what we need?
[22:17:12] eckhardt: has joined #ruby
[22:17:22] dminuoso: SKI combinators in ruby.
[22:18:33] dminuoso: There's some really lovely things out there
[22:18:38] dminuoso: -> (f) { -> (x) { x[x] }[-> (x) { f[ -> (y) { x[x][y] }] }] }
[22:23:43] MyMind: has joined #ruby
[22:25:49] fullstack: has joined #ruby
[22:27:45] vipaca: has joined #ruby
[22:28:05] ycyclist: has joined #ruby
[22:28:18] ycyclist: has left #ruby: ()
[22:28:26] ycyclist: has joined #ruby
[22:31:52] RickHull: havenwood: https://github.com/rickhull/compsci/blob/master/lib/compsci/fibonacci.rb#L26
[22:32:10] blackmesa1: has joined #ruby
[22:32:59] alnewkirk: has joined #ruby
[22:33:59] mn3m: has joined #ruby
[22:34:13] nowhereman: has joined #ruby
[22:36:06] hotpancakes: has joined #ruby
[22:36:38] havenwood: RickHull: Nice! As N gets larger, the matrix version pulls ahead. With `N == 1000` for example:
[22:36:39] havenwood: matrix: 12047.1 i/s
[22:36:39] havenwood: cache_iterative: 3964.4 i/s - 3.04x slower
[22:36:39] havenwood: dynamic: 3784.9 i/s - 3.18x slower
[22:37:45] RickHull: i'm fixing a bug for dynamic(0)
[22:37:49] RickHull: it will get a little slower
[22:38:24] havenwood: With N of 10,000:
[22:38:25] havenwood: matrix: 3919.9 i/s
[22:38:25] havenwood: dynamic: 232.0 i/s - 16.90x slower
[22:38:25] havenwood: cache_iterative: 222.8 i/s - 17.59x slower
[22:38:52] porfa: has joined #ruby
[22:39:58] havenwood: At 100k it's 50-100x faster.
[22:40:56] fullstack: has joined #ruby
[22:42:00] conta2: has joined #ruby
[22:43:20] mikecmpbll: has joined #ruby
[22:45:29] RickHull: dynamic(25) got 1.03x slower
[22:45:46] veeti: has joined #ruby
[22:45:52] jrm2: has joined #ruby
[22:46:14] RickHull: havenwood: very interesting :)
[22:46:35] alnewkirk: has joined #ruby
[22:47:26] zanoni: last night i asked about options for getting static files outside public folder in a Sinatra app, got some good help, went with send_file, but not happy with it. Now I'm working on getting rack::reverseproxy , and not sure if my config file is correct, I"m slightly confused about the paths, so in case someone want to look https://gist.github.com/stuartambient/2d757461471db6a1f95e4d1e95931b55
[22:51:06] jenrzzz: has joined #ruby
[22:51:07] jenrzzz: has joined #ruby
[22:53:12] mson: has joined #ruby
[22:55:03] havenwood: zanoni: Just to rule out some options, what are the files for? Stylesheets and such or other things?
[22:55:39] alnewkirk: has joined #ruby
[22:57:10] havenwood: zanoni: Just to confirm, you've ruled out using Nginx or Apache as your reverse proxy for static files?
[22:57:23] havenwood: What Rack webserver are you using?
[22:57:30] zanoni: they are audio files , mp3, flac, etc. for previewing
[22:57:43] Sembei: has joined #ruby
[22:57:46] zanoni: I'm lettting it use Puma at this point
[22:58:09] zanoni: I ruled out Nginx for the time being yes
[22:59:17] jorb: has left #ruby: ()
[22:59:54] havenwood: zanoni: Then doing it at the middleware level seems like the right path. I don't know what's going on with your path issue. How does the problem present itself?
[23:00:31] havenwood: does something start smoking? 404?
[23:01:11] zanoni: no, it goes on to the view , shows me the name of the file which i put in there,
[23:01:15] hfp_work: has joined #ruby
[23:01:34] zanoni: the error though is error handling request
[23:02:03] RickHull: i believe the status code for smoking all day error day is 420
[23:02:38] havenwood: Enhance Your Calm
[23:03:13] zanoni: maybe that is why it isn't working, i'm just wondering with a route like /files/* and then the actual files, deep in the path if that isn't the problem
[23:04:07] vtx: has joined #ruby
[23:04:46] alnewkirk: has joined #ruby
[23:05:28] thinkpad: has joined #ruby
[23:06:27] zanoni: at the start of the errors in the console is something about 'can't activate activesupport, already activated', not sure why that is in there
[23:07:44] zanoni: skip my last message, i got rid of that one ;)
[23:08:15] hotpancakes: has joined #ruby
[23:08:21] RickHull: havenwood: matrix beats dynamic under N=500
[23:08:21] veeti: has joined #ruby
[23:08:56] vtx: has joined #ruby
[23:09:26] cschneid_: has joined #ruby
[23:11:16] jphase: has joined #ruby
[23:11:27] SeepingN: has joined #ruby
[23:12:27] zanoni: well my errors are decreasing so i must be on the right track
[23:13:31] QualityAddict: has joined #ruby
[23:14:01] Psybur: has joined #ruby
[23:14:13] gusrub: has joined #ruby
[23:14:29] jphase: has joined #ruby
[23:18:21] alnewkirk: has joined #ruby
[23:20:23] goyox86: has joined #ruby
[23:20:30] ycyclist: Anyone know if there is a ruby gem repository for fluentd gems?
[23:20:35] TViernion: guys.. i've installed redmin and i think it should work, plus i ahve all the right ports assigned, and i've run "rails s -p 8080" from within the directory where redmine is located... where could i possibly be going wrong?
[23:20:44] TViernion: this is rails 4.2.4 nd ruby 2.2.2
[23:21:28] ycyclist: I was gonna ask on #fluentd, but nobody seems to be there.
[23:25:18] RickHull: TViernion: check #rubyonrails
[23:25:29] TViernion: Ahhh... thanks Rickhull
[23:27:37] RickHull: dminuoso: what is nthL from your gist?
[23:28:38] RickHull: some user arg?
[23:31:24] enterprisey: has joined #ruby
[23:31:55] alnewkirk: has joined #ruby
[23:34:15] mtkd: has joined #ruby
[23:36:27] cschneid_: has joined #ruby
[23:39:01] jenrzzz: has joined #ruby
[23:39:02] jenrzzz: has joined #ruby
[23:41:01] alnewkirk: has joined #ruby
[23:41:08] RickHull: from a travis worker: Load: 169.31 181.22 178.13 139/2375 2351
[23:44:52] jphase: has joined #ruby
[23:48:03] blackmesa1: has joined #ruby
[23:50:03] alnewkirk: has joined #ruby
[23:50:18] oetjenj: has joined #ruby
[23:54:41] bmurt: has joined #ruby
[23:55:54] blackmesa: has joined #ruby
[23:57:36] Megamosaren: has joined #ruby
[23:59:07] alnewkirk: has joined #ruby
[23:59:35] orbyt_: has joined #ruby
[23:59:53] axisys: has joined #ruby