« Back to channel list

#ruby - 23 January 2016

« Back 1 day Forward 1 day »
[00:00:12] ZerGabriel: has joined #ruby
[00:00:29] frewtc4ke: has left #ruby: ()
[00:02:25] guacamole: has joined #ruby
[00:03:02] dlitvak: has joined #ruby
[00:03:09] blackmesa: has joined #ruby
[00:04:43] GraemeLion: has joined #ruby
[00:09:18] moeabdol: has joined #ruby
[00:09:55] wilbert: has joined #ruby
[00:11:44] jamw: has joined #ruby
[00:13:55] blackmes1: has joined #ruby
[00:14:26] toretore: has joined #ruby
[00:14:28] wilbert: has joined #ruby
[00:16:28] SCHAAP137: has joined #ruby
[00:17:03] Sperant: has joined #ruby
[00:18:21] nertzy2: has joined #ruby
[00:20:38] KnownSyntax: has joined #ruby
[00:20:41] KnownSyntax: has joined #ruby
[00:22:19] Fire-Dragon-DoL: having problems finding the following out: does ruby ssl_version uses :auto as default value? If yes I suppose it can decide which ssl version can use. And second part of the question: does ruby 2.1.2 support tls v1.2+?
[00:22:27] Clutch: has joined #ruby
[00:23:25] ascarter: has joined #ruby
[00:23:52] oivoodoo: has joined #ruby
[00:24:20] Clutch: hello everyone, I am trying to install a ruby application, and getting this error, can you help me know how to fix it please? http://paste.ubuntu.com/14602796/
[00:24:54] havenwood: Clutch: Prepending `bundle exec` to your command may solve this.
[00:25:06] ascarter: has joined #ruby
[00:25:14] havenwood: Clutch: Did you already try that ^ or not yet?
[00:25:31] Musashi007: has joined #ruby
[00:26:36] Clutch: havenwood, yes, I did
[00:27:02] Clutch: pasting in a min
[00:27:13] jgt: has joined #ruby
[00:28:03] Clutch: havenwood, it gave this: http://paste.ubuntu.com/14602883/
[00:28:53] adgtl: has joined #ruby
[00:29:18] havenwood: Clutch: sudo apt-get install -y nodejs
[00:29:30] bb010g: has joined #ruby
[00:29:55] Ox0dea: havenwood: Tried Hanami yet? :P
[00:30:16] Clutch: havenwood, installed
[00:30:35] havenwood: Ox0dea: Only by its previous namesake.
[00:32:57] Clutch: now I tried again and it seems to have worked, though I got some warnings..should I undertake anything for them?
[00:32:59] Clutch: http://paste.ubuntu.com/14602923/
[00:34:05] kies^: has joined #ruby
[00:34:37] ascarter: has joined #ruby
[00:34:38] hannelita: has joined #ruby
[00:37:14] ur5us: has joined #ruby
[00:37:22] Sperant: has joined #ruby
[00:37:45] skade: has joined #ruby
[00:38:03] skcin7: has joined #ruby
[00:38:35] havenwood: Clutch: If you're maintaining the app you'll probably want to update away from deprecated features as the warning warn. Otherwise, success!
[00:43:27] ZerGabriel: has joined #ruby
[00:45:38] Clutch: havenwood, just made the updates manually
[00:47:19] jbrhbr: >> def square(x); x*x; end; (0..10).map(&:square)
[00:47:20] ruby[bot]: jbrhbr: # => private method `square' called for 0:Fixnum (NoMethodError) ...check link for more (https://eval.in/506618)
[00:47:24] jbrhbr: is there any way to get that to work?
[00:48:01] jbrhbr: it just occurred to me that it would be nicer in this unary function case than having to use the block style
[00:48:34] jbrhbr: i guess it's doing a send on the integer object
[00:48:40] jbrhbr: i'd have to define Integer::square perhaps
[00:49:20] dlitvak: has joined #ruby
[00:50:30] slacko153411: has joined #ruby
[00:50:41] disconnekted: has joined #ruby
[00:50:58] slacko153411: has left #ruby: ()
[00:52:46] Ox0dea: jbrhbr: Methods defined at the top level becoming private instance methods on Object.
[00:52:55] Ox0dea: >> def foo; end; 42.method(:foo).owner
[00:52:57] ruby[bot]: Ox0dea: # => Object (https://eval.in/506625)
[00:53:05] Ox0dea: s/becoming/become/
[00:53:15] jbrhbr: yea, so the send fails
[00:53:33] Ox0dea: Well, the #public_send, if you wanna look at it that way, but yeah.
[00:53:38] jbrhbr: i'm just trying to send a custom predicate to the short form of select/reject but i guess i'm stuck with having to use a block
[00:53:45] Ox0dea: jbrhbr: You're not. :)
[00:53:57] Ox0dea: >> def square x; x * x end; (1..5).map &method(:square)
[00:53:58] ruby[bot]: Ox0dea: # => [1, 4, 9, 16, 25] (https://eval.in/506626)
[00:54:05] domgetter: jbrhbr one solution is to use a lambda
[00:54:26] domgetter: >> square = -> x {x*x}; (0..10).map(&square)
[00:54:27] Ox0dea: jbrhbr: That's invoking #method on the implicit receiver, which in this case is Object.
[00:54:27] ruby[bot]: domgetter: # => [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] (https://eval.in/506627)
[00:54:29] jbrhbr: Ox0dea: i hadn't seen that form before
[00:55:00] Ox0dea: jbrhbr: Do you know how & interacts with #to_proc?
[00:55:07] jbrhbr: thanks guys, i'll see which of those two makes the most sense for me
[00:55:22] jbrhbr: i read through the code for it once but i'm hardly an expert
[00:55:35] jbrhbr: i just remember some check with responds_to? and send
[00:55:47] domgetter: using Ox0dea's version is more object oriented; using my version is more functional
[00:56:40] Ox0dea: jbrhbr: That's the general idea, yeah; the takeaway is that any object can define #to_proc and be used in block context.
[00:56:52] Ox0dea: It just so happens that Method#to_proc does The Right Thing.
[00:58:04] jbrhbr: i guess i should't be too surprised, &:square would have failed in other cases too where method(:square) would have worked
[00:58:30] Channel6: has joined #ruby
[00:58:32] sandstrom: has joined #ruby
[00:58:45] Ox0dea: map(&:foo) : map { |x| x.foo } :: map(&method(:foo)) : map { |x| foo x }
[00:59:47] jbrhbr: took me a sec to parse out the "is as is to" stuff there ;)
[00:59:53] jbrhbr: thanks again
[00:59:56] Ox0dea: Sure thing.
[01:00:03] Ox0dea: One more to drive it home.
[01:00:05] Ox0dea: >> def (Doubler = Object.new).to_proc; -> x { x * 2 } end; [1,2,3].map &Doubler
[01:00:06] ruby[bot]: Ox0dea: # => [2, 4, 6] (https://eval.in/506629)
[01:00:15] Ox0dea: *Any* object can participate as a block.
[01:00:22] Ox0dea: Little scary, mostly awesome.
[01:00:30] jbrhbr: except we can refer to it directly here because it's already a proc
[01:00:42] Ox0dea: No, #map doesn't take a Proc.
[01:01:03] Ox0dea: >> [].method(:map).arity
[01:01:04] ruby[bot]: Ox0dea: # => 0 (https://eval.in/506630)
[01:01:13] jbrhbr: just a default block then?
[01:01:29] Ox0dea: Every method receives an implicit block.
[01:01:33] jbrhbr: it's hard for me to understand why all of these mechanisms are needed in one language.. :)
[01:01:48] jbrhbr: yeah, i'm familiar with that much at least
[01:02:10] Ox0dea: There's really only one mechanism being represented here.
[01:02:26] Ox0dea: The & unary operator tries to invoke the receiver's #to_proc method and use the result as a block.
[01:02:28] jbrhbr: i mean proc vs block vs lambda
[01:02:49] Ox0dea: They're all subtly different things, and the language would be worse in any one's absence.
[01:03:27] atomical: has joined #ruby
[01:03:57] rkazak: has joined #ruby
[01:04:03] skade: has joined #ruby
[01:04:57] altair118: has joined #ruby
[01:05:25] jbrhbr: so far i've only had done direct transparent usage of lambdas and blocks. outside of understanding how stuff works like in this conversation, whatever differentiates the proc concept is still a bit unclear to me, but there are lots of articles/blogs about this
[01:06:20] altair118: has joined #ruby
[01:06:43] jbrhbr: like you need to know blocks at least for API design, and lambdas sometimes for DRY
[01:07:33] chouhoulis: has joined #ruby
[01:08:40] jgpawletko: has joined #ruby
[01:09:23] Ox0dea: Blocks as the go-to from an API standpoint is sound, and Procs are essentially just a means by which to pass blocks around.
[01:09:58] _djbkd: has joined #ruby
[01:10:13] jottr: has joined #ruby
[01:12:21] Ox0dea: jbrhbr: Here's the difference between proc and lambda: https://eval.in/506631
[01:12:36] Ox0dea: `return` in a Proc exits the surrounding method instead of just the block.
[01:12:50] Ox0dea: Also, lambda is strict about its arguments whereas Proc is willy-nilly.
[01:12:52] skcin7: has joined #ruby
[01:13:07] Ox0dea: You almost always want a lambda, and thankfully that's what the stabby syntax gives us.
[01:15:00] jbrhbr: stabs and rockets
[01:15:08] emilford: has joined #ruby
[01:16:47] Clutch: hello again, I've got this error noq: http://paste.ubuntu.com/14603473/
[01:16:48] Ox0dea: jbrhbr: http://ruby-operators.herokuapp.com/
[01:17:30] Clutch: can you please help me know how I can fix this one?
[01:17:38] jbrhbr: i didn't know there were so many names but i appreciate this
[01:17:54] jbrhbr: i've just sort of waved my hands around in the air before when trying to describe the 'shovel'
[01:18:06] wilbert: has joined #ruby
[01:18:47] zambini: There's a disappointing lack of reference to `spermy operator`
[01:19:08] UtkarshRay: has joined #ruby
[01:19:56] jbrhbr: which one is that? :p
[01:20:37] Ox0dea: zambini: And the bangarang: !~
[01:21:03] zambini: jbrhbr: ~> iirc
[01:21:08] UtkarshRay: has joined #ruby
[01:21:24] zambini: https://github.com/rubygems/rubygems/pull/123
[01:21:36] n_blownapart: has joined #ruby
[01:21:57] Ox0dea: https://youtu.be/LE0g2TUsJ4U?t=990
[01:22:10] Ox0dea: I like the guy that laughs because he gets it immediately.
[01:22:53] bronson: has joined #ruby
[01:22:59] dlitvak: has joined #ruby
[01:23:03] UtkarshRay: has joined #ruby
[01:23:08] yeticry_: has joined #ruby
[01:23:22] IrishGringo: has joined #ruby
[01:24:47] UtkarshRay: has joined #ruby
[01:26:58] emilford: has joined #ruby
[01:29:20] skade: has joined #ruby
[01:29:38] dlitvak_: has joined #ruby
[01:29:42] Scripore: has joined #ruby
[01:29:57] sucks: has joined #ruby
[01:32:56] Sperant: has joined #ruby
[01:34:11] vikas027: has joined #ruby
[01:37:01] sdwrage: has joined #ruby
[01:37:19] x0F: has joined #ruby
[01:39:31] duderono_: has joined #ruby
[01:39:45] Ebok: has joined #ruby
[01:44:56] edwcar13: has joined #ruby
[01:45:08] edwcar13: has left #ruby: ()
[01:45:08] arthropododo: has joined #ruby
[01:45:20] hannelita: has joined #ruby
[01:47:24] IrishGringo_: has joined #ruby
[01:48:39] AndChat-641136: has joined #ruby
[01:48:46] Clutch: havenwood, thank you for your help! ciao!
[01:49:01] Clutch: has left #ruby: ()
[01:49:33] dudedudeman: has joined #ruby
[01:51:07] blarghlarghl: Here's a puzzler for you. If I run a rake/rspec task, a gem I built with native extensions needs the .so ending in the require (i.e. require 'mygem.so') but if I'm just running the code regularly, it does not. What the hell?
[01:55:05] skade: has joined #ruby
[01:55:30] baweaver: has joined #ruby
[01:57:22] Ox0dea: blarghlarghl: You should require 'foo/foo' from lib/foo.rb.
[01:59:33] IrishGringo: has joined #ruby
[01:59:45] blarghlarghl: Ox0dea: That doesn't work! It dies unless I require 'foo.so' in lib/foo.rb. All this is me calling it outside of the gem - already have the gem deployed and in use. When I write test cases in our app, it dies. When I run the app manually, it works.
[02:00:27] Ox0dea: ??\_(???)_/??
[02:00:38] blarghlarghl: Ox0dea: right? crazy stuff.
[02:00:47] newtonianb: has joined #ruby
[02:01:01] blarghlarghl: Ox0dea: honestly, everything that could possibly go wrong with this project, has.
[02:01:02] Ox0dea: blarghlarghl: What are you passing to #create_makefile?
[02:01:15] IrishGringo: has joined #ruby
[02:01:32] blarghlarghl: Ox0dea: create_makefile('foo')
[02:01:40] Ox0dea: blarghlarghl: Try 'foo/foo'.
[02:01:56] Ox0dea: Really, this is all in TFM. :/
[02:02:09] Canar: Fine indeed.
[02:03:12] ZeeNoodleyGamer: has joined #ruby
[02:03:18] blarghlarghl: Ox0dea: "Fine" - you're totally correct. Okay, mea culpa!
[02:04:01] baweaver: has joined #ruby
[02:04:09] Ox0dea: Let us be relentless in our forgiveness.
[02:05:04] semeion: has joined #ruby
[02:07:00] rubynuby: has joined #ruby
[02:07:04] semeion: how i can run the external command 'iconv -t ASCII//TRANSLIT' in a ruby var returning the result of command in same var?
[02:07:52] rubnub: has joined #ruby
[02:08:05] rubnub: has left #ruby: ()
[02:08:13] rubnub: has joined #ruby
[02:08:31] timanema: has joined #ruby
[02:08:34] rubnub: has left #ruby: ()
[02:08:37] rubnub: has joined #ruby
[02:08:40] rubnub: has left #ruby: ()
[02:08:42] rubnub: has joined #ruby
[02:08:44] rubnub: has left #ruby: ()
[02:08:46] rubnub: has joined #ruby
[02:08:49] rubnub: has left #ruby: ()
[02:08:53] rubnub: has joined #ruby
[02:10:05] timanema: has joined #ruby
[02:12:27] jamw: has joined #ruby
[02:13:54] speakingtoad: has joined #ruby
[02:13:59] goodcodeguy: has joined #ruby
[02:15:08] konsolebox: semeion: var = %x[command], but that depends on the command's input, and sometimes output
[02:15:45] konsolebox: blarghlarghl: i prefer naming the extension mygem_ext.so than placing it under a subdirectory when its contents are not in a submodule
[02:15:56] Ox0dea: semeion: https://glot.io/snippets/eb87pykp2u
[02:16:10] Ox0dea: But as konsolebox advises, you'll want to be careful about special characters and the like.
[02:16:23] IrishGringo_: has joined #ruby
[02:18:18] semeion: is this way? myvar = %myvar[iconv -t ASCII//TRANSLIT]
[02:18:24] semeion: i never tried ruby before
[02:20:07] semeion: i only need convert the content of a var removing the accents, that iconv command work fine in bash, but in ruby i don??t know how do the same
[02:20:40] semeion: i need a complete command, because i am not a ruby coder
[02:21:02] skade: has joined #ruby
[02:21:22] Ox0dea: Nice entitlement.
[02:24:46] goodcodeguy: has joined #ruby
[02:24:56] hannelita: has joined #ruby
[02:25:05] timanema: semeion: what does that bash command do?
[02:26:23] semeion: timanema: he remove the accents, type it in console and you will see: iconv -t ASCII//TRANSLIT <<< '??????????????????????'
[02:27:38] timanema: semeion: I get this 'a'e'i'o'uc~a~o^a^e^o
[02:28:57] semeion: timanema: you should get aeioucaoaeo
[02:29:29] semeion: timanema: http://i.imgur.com/BL4gLih.png
[02:30:15] FooMunki: has joined #ruby
[02:30:37] skcin7: has joined #ruby
[02:32:57] Mon_Ouie: Depends on your LANG environment variable, transliteration depends on language (and even then it can depend on context in reality)
[02:34:07] arlek: has joined #ruby
[02:34:25] semeion: can you help me a bit with this command? myvar = %x[iconv -t ASCII//TRANSLIT]
[02:34:51] semeion: i need pass the value of myvar to iconv
[02:35:39] semeion: someting like: myvar = %x[iconv -t ASCII//TRANSLIT <<<myvar]
[02:35:56] semeion: but i don??t know the correct ruby syntax to do it
[02:37:32] timanema: semeion: are you using plain ruby or rails?
[02:38:04] semeion: i don??t know the difference, i am trying fix a script from another author
[02:38:22] IrishGringo: has joined #ruby
[02:38:49] semeion: the script work fine, but when it get some word with accent he fail
[02:38:53] timanema: semeion: can you post a gist of it?
[02:39:03] semeion: so i want remove the accents from that var before it fail
[02:39:11] arescorpio: has joined #ruby
[02:40:11] semeion: it is only 1 line
[02:40:42] semeion: i have a var, i need perform iconv command on this var
[02:40:50] semeion: nothing more
[02:41:36] iateadonut: has joined #ruby
[02:41:47] rkazak: has joined #ruby
[02:41:59] semeion: in bash it could be something like: myvar = $( echo "$myvar" | iconv -t ASCII//TRANSLIT)
[02:42:22] semeion: i need do same in ruby
[02:42:36] Ox0dea: semeion: Is this the last time you're ever going to use Ruby?
[02:43:47] timanema: to_translate = '??????????????????????';exec("iconv -t ASCII//TRANSLIT <<< '#{to_translate}'")
[02:43:52] semeion: i only want fix it
[02:43:59] Ox0dea: timanema: Uh, no, not #exec.
[02:44:00] timanema: sounds like what you need for your situation
[02:44:10] Ox0dea: exec() replaces the current process.
[02:44:19] Ox0dea: semeion: You don't want to learn?
[02:44:24] timanema: it sounds like a simple script for one env why not
[02:44:28] binns: has joined #ruby
[02:44:47] gregf: has joined #ruby
[02:45:05] Ox0dea: timanema: It's okay to be wrong; just strive to not be wrong about the same thing more than once.
[02:45:20] Ox0dea: They obviously want to use this string after they've converted it.
[02:45:32] timanema: Ox0dea: good advice to heed
[02:45:35] TomPeed: has joined #ruby
[02:46:03] dlitvak: has joined #ruby
[02:46:07] timanema: but from the surface this seems a pretty surface level script and exec returns what they need
[02:46:24] skade: has joined #ruby
[02:46:58] daryl256: has joined #ruby
[02:47:18] norc-2: has joined #ruby
[02:48:04] Ox0dea: timanema: exec() replaces the current process...
[02:48:24] binns: has joined #ruby
[02:48:41] jbrhbr: has joined #ruby
[02:48:50] Ox0dea: Using Kernel#exec here will essentially "turn their program into" an invocation of `iconv`, which is absolutely not the intent.
[02:49:09] newbie22: has joined #ruby
[02:49:21] timanema: Ox0dea: sorry I don't mean to sound anything other than inquiring but........so? If the script is run at a superficial level what is the problem with that?
[02:49:34] hiyosi: has joined #ruby
[02:49:34] lessless: has joined #ruby
[02:49:39] sakix: has joined #ruby
[02:50:21] dfinninger: has joined #ruby
[02:51:26] Ox0dea: timanema: Please tell me you see the problem here: https://glot.io/snippets/eb88pb04gn
[02:52:02] Ox0dea: You advised them to kill their process and forget about whatever else they wanted to do with their converted string.
[02:52:11] timanema: yeah I can see that is doesnt reach the last put statement
[02:52:19] Ox0dea: How come?
[02:53:12] Maletor: has joined #ruby
[02:53:29] timanema: okay you are right about exec but instead of condeming it you should have offered this https://glot.io/snippets/eb88r7z722
[02:54:04] timanema: "How come?" condecending teaching voice bullshit
[02:54:14] Ox0dea: Calm down.
[02:54:18] Ox0dea: Learning is good for you.
[02:54:43] timanema: yeah I agree but your fucking condecending tone is poison to your message
[02:56:10] Mon_Ouie: semeion: You can use IO.popen to write to the child process's input
[02:57:08] Ox0dea: Mon_Ouie: They're here for code.
[02:58:46] IronD: has joined #ruby
[03:00:34] IronD: Question: I am attempting to create a program that plays puzzle games right off your computer screen
[03:01:20] IronD: Will I need jruby to interact with my mouse and keyboard?
[03:01:42] IronD: or is there some other way of using just pure ruby
[03:02:13] Ox0dea: IronD: You can actually capture mouse events in a terminal, but you probably don't wanna get your hands *that* dirty.
[03:02:16] hnagamin: has joined #ruby
[03:02:48] Mon_Ouie: Oh, I thought they meant faking events
[03:02:58] Ox0dea: Oh, right.
[03:03:28] IronD: I can look into that
[03:04:00] Ox0dea: IronD: Nah, you want something like AutoHotKey or AutoIt.
[03:04:20] IronD: Well, the issue with that:
[03:04:40] stuxnet: has joined #ruby
[03:04:55] IronD: I need the program to recognize the game state through images on screen(since I dont know of a way that it could get data directly from the game
[03:05:05] Ox0dea: IronD: AutoHotKey can certainly do that.
[03:05:19] Ox0dea: The language isn't near as nice as Ruby, but it's tolerable.
[03:05:56] sakix: has joined #ruby
[03:06:03] Ox0dea: Of course, it's all just data at the bottom, so there's certainly a way to get the information without querying pixels, but it's liable to be much more involved.
[03:06:16] IronD: programming a way for it to recognize shapes, numbers, and other on screen images? That seems like a hardsell on utohotkey
[03:06:27] Ox0dea: It's not. :)
[03:06:33] IronD: Autohotkey*
[03:06:38] Ox0dea: Or, well, it's doable.
[03:06:50] usershell: has joined #ruby
[03:06:53] emilford: has joined #ruby
[03:07:22] IronD: Ok so my final reason to want to do this in Ruby is because I dont get enough practice on it anyway. Ive been a noob forever and then some. This might help me really understand it.
[03:07:57] Ox0dea: Not likely. Making autoplayers that grab the screen and act accordingly is mostly just a lot of grunt work.
[03:10:19] IronD: Well regardless of, I would still like to try it. Any ideas on this apparently dull path I am about to walk down? lol
[03:11:00] Ox0dea: The easiest way to detect shapes and respond on Windows is AutoHotKey.
[03:11:21] Ox0dea: I can't in good conscience advise you elseways.
[03:11:33] IronD: Oh man lol
[03:12:18] IronD: Can I store large amounts of data with Autohotkey?
[03:12:29] IronD: Like, a LOT of data?
[03:12:40] skade: has joined #ruby
[03:12:44] halvo: has joined #ruby
[03:12:55] IronD: or make it play nice with something that can?
[03:13:26] Ox0dea: Java's Robot class is apparently pretty great: https://docs.oracle.com/javase/8/docs/api/java/awt/Robot.html
[03:13:30] Ox0dea: Do the JRuby thing.
[03:13:30] IronD: Can it also call on this data effectively quickly if it has to make decisions somewhat faster than an average human can?
[03:13:45] Ox0dea: IronD: I wish I had any of my old AHK scripts lying around.
[03:13:47] blarghlarghl: Ox0dea: i fixed it all up, followed the guide a bit better, all works fine now! (except the sdk is refusing to play ball sometimes, but i don't think that's down to the gem.)
[03:13:52] blarghlarghl: Ox0dea, so, thanks
[03:14:06] Ox0dea: blarghlarghl: Yay! \o/
[03:14:20] IronD: Ah! An endorsement. I knew I was not too crazy lol
[03:14:54] Ox0dea: IronD: This would've been almost ten years ago now. I'm sure AHK's gotten considerably better in the interim, and it worked just fine back then.
[03:15:18] Ox0dea: I was meticulous about querying as small a portion of the screen as possible for maximum throughput, but that was usually overkill.
[03:15:27] Ox0dea: I just liked seeing it go as fast as I could make it do. :)
[03:16:18] IronD: Ah, understood!
[03:16:56] IronD: Well I initially looked at it when I realized that Ruby might be a better bet, since I am somewhat familiar with it and have other reasons to want to use it more.
[03:17:13] Tempesta: has joined #ruby
[03:17:19] IronD: Again, I do not doubt its ability with mouse/keyboard input
[03:17:22] lacuna: has joined #ruby
[03:17:22] lacuna: has joined #ruby
[03:17:31] IronD: I jsut dont know how well it can do all the other processing I want the program to do
[03:17:43] binns: has joined #ruby
[03:18:59] cson: has joined #ruby
[03:19:03] cson: has left #ruby: ()
[03:19:36] IronD: I essentially wnat the program to be aware of the state of the game at all times and learn to figure out a few things based on that state. Like the best decision to make when killing enemies based on stats it will have to infer from images alone
[03:20:11] blackgoat: has joined #ruby
[03:20:38] IronD: and when I say infer I mwan: There are stats that the player/user of the game will be completely unaware of(health bar of enemies do not display a number)
[03:20:44] govg: has joined #ruby
[03:21:46] IronD: So I will make it calculate HP based on my teams attack power and how much the health bars go down when executing attacks and whatnot.
[03:22:00] IronD: Again, this is the reason I am uncertain of AHK
[03:22:15] Ox0dea: That's perfectly feasible with AHK.
[03:22:40] Ox0dea: In that particular case, as an example of how to optimize, you'd really only need a pixel-high slice of the bar, right?
[03:23:06] IronD: Yes, that would make sense
[03:23:41] Ox0dea: You start out by calibrating your position on the screen based on some static pixel, then code in the offsets of all the elements in which you're interested.
[03:23:44] IrishGringo: has joined #ruby
[03:24:25] asccigcc: has joined #ruby
[03:24:29] Ox0dea: Then you get to make little 6x6 (or whatever) transparent PNGs that contain the right pixels in the right places, have AHK "fuzzy search" the screen to determine what's what, and go from there.
[03:24:53] Ox0dea: It's drudgery until you get to watch it go.
[03:25:17] bronson: has joined #ruby
[03:25:22] IronD: It can also just start based on the position of a given window correct?
[03:25:45] Ox0dea: There's this Ruby wrapper around AutoIt: http://auto.rubyforge.org/au3/doc/index.html
[03:25:58] konsolebox: semeion: Ruby version is complex: https://bpaste.net/show/5ff792757e2d
[03:26:00] Ox0dea: It's very old and doesn't look like it provides anything more than querying a single pixel.
[03:26:04] IronD: Oh, that looks interesting
[03:26:08] konsolebox: semeion: why not use http://ruby-doc.org/core-2.0.0/Encoding.html?
[03:26:51] IronD: What does AHK use for scripting?
[03:26:57] Ox0dea: Its own language.
[03:27:07] al2o3-cr: has joined #ruby
[03:27:19] Ox0dea: It's kinda like the demon spawn of Lua and QBasic.
[03:27:55] IronD: I wish I knew those languages as well as that sentence proves you do :P
[03:28:04] semeion: konsolebox: thank you
[03:28:09] konsolebox: semeion: sorry, this was the proper version: https://bpaste.net/show/7d7e4d9551af. i'm gonna add the function to my collection.
[03:30:35] moeabdol1: has joined #ruby
[03:31:19] semeion: konsolebox: nice code, thank you again
[03:31:21] twistedpixels: has joined #ruby
[03:33:20] User458764: has joined #ruby
[03:34:16] blarghlarghl: Ox0dea: how much do you know about how rspec does its thing? This SDK I'm working on has a licensing check built in - I don't know what it does exactly - and it tells me that it can't find my license if I'm running a test case using rspec. If I run the same code that the test case runs, though, outside of rspec, the SDK works fine. the SDK is called via language bindings, so it's a few steps removed.
[03:34:23] IronD: Ox0dea: Can you tell me more about the "fuzzy searching and how that would work?
[03:34:42] blarghlarghl: Ox0dea: so there must be something funky going on with how rspec handles processes which the SDK objects to.
[03:35:02] Ox0dea: blarghlarghl: Haven't the foggiest. :<
[03:35:24] blarghlarghl: Right, it's very late. Actually already early. I should go to bed. :) Night, and thanks again.
[03:35:32] Ox0dea: Au revoir!
[03:36:04] IrishGringo: has joined #ruby
[03:36:20] emilford: has joined #ruby
[03:36:34] Ox0dea: IronD: It's just that the pixels aren't always exact unless you're botting something crazy-simple; fuzzy matching lets AHK go "close enough".
[03:37:42] skade: has joined #ruby
[03:38:04] Ox0dea: You have to be wary of false positives, though, in which case you must either define your target more precisely or fiddle with the fuzziness threshold.
[03:38:25] Ox0dea: Sounds like a riot, innit? :P
[03:38:53] IronD: I wonder about how a few things would work then
[03:39:34] IronD: Wouldnt the positioning of the pixels always be the same if its relative to the window edges?
[03:39:48] Ox0dea: Aye, I meant color-wise.
[03:40:20] IronD: So I assume that looking for an image is just too resource intensive?
[03:40:30] IronD: or matching that image rather
[03:40:55] Ox0dea: It's all pretty context-dependent.
[03:41:06] sakix: has joined #ruby
[03:41:31] Ox0dea: Asking it to fuzzy-find anything larger than, say, 80x80 will probably be too slow for real-time.
[03:42:56] Ox0dea: If you're willing to strain your eyes enough (or just zoom in) to find those little unique patterns in a 5x5 area, you can speed things up considerably.
[03:43:38] Ox0dea: I'd recommend just diving in; you're liable to get a feel for it.
[03:44:41] Ox0dea: You know, you'd never know the difference between rgb(50, 100, 150) and rgb(50, 99, 150), but they're as different as 1 and 2 to a computer's eyes.
[03:45:15] IronD: Udnerstood
[03:45:23] Ox0dea: You have to account for that, either by masking that particular area, or else increasing the fuzz factor.
[03:46:35] astrobunny: has joined #ruby
[03:46:36] IronD: So, One thing:
[03:47:14] IronD: let me look at the documentation for this
[03:49:00] ledestin: has joined #ruby
[03:50:53] Ebok: has joined #ruby
[03:51:19] IronD: Any suggestions on planning a project?
[03:51:34] Ox0dea: Start now.
[03:52:31] IronD: Yup, Writing down a few things
[03:52:49] Yzguy: has joined #ruby
[03:53:18] toretore: has joined #ruby
[03:55:33] gruz0: has joined #ruby
[03:55:37] Ox0dea: IronD: Particularly useful are areas of high information density and stark contrast.
[03:55:51] Ox0dea: A health bar with a border being the obvious example.
[03:56:00] moeabdol: has joined #ruby
[03:56:48] Averna: has joined #ruby
[03:57:33] Yzguy: has joined #ruby
[03:58:38] Ox0dea: Overall, the trick is simply to realize that a given object can almost always be uniquely identified by some portion of itself that is substantially smaller than the whole image.
[03:58:57] IronD: Yeah, I had been thinking through some of the functionality ill need this to have and realized I might have to make it a little smarter than I want it to be(It might have to figure out how much to scroll when It cant find something on a screen)
[03:58:58] Ox0dea: The less work you give the computer to do, the more times it'll do it for ya.
[03:59:06] Ox0dea: Thanks, computers.
[04:00:17] IronD: The good thing is, the game has some elements that I mgiht be able to use as a reference because in some screens they are always static
[04:03:03] skade: has joined #ruby
[04:03:11] Averna: has joined #ruby
[04:03:21] zast: has joined #ruby
[04:03:56] IrishGringo_: has joined #ruby
[04:04:26] Averna: has joined #ruby
[04:06:45] persistence: has joined #ruby
[04:07:28] krobzaur: has joined #ruby
[04:08:06] marcdel: has joined #ruby
[04:08:41] marcdel: has joined #ruby
[04:09:16] marcdel: has joined #ruby
[04:09:51] marcdel: has joined #ruby
[04:10:13] mfb2: has joined #ruby
[04:10:43] rkazak: has joined #ruby
[04:11:56] mchu: has joined #ruby
[04:12:43] IrishGringo: has joined #ruby
[04:13:14] jamw: has joined #ruby
[04:14:01] astrobunny: has joined #ruby
[04:15:04] usershell: has joined #ruby
[04:15:33] treaki_: has joined #ruby
[04:16:16] braincrash: has joined #ruby
[04:23:49] chipotle: has joined #ruby
[04:28:42] skade: has joined #ruby
[04:28:42] Averna: has joined #ruby
[04:29:37] baweaver: has joined #ruby
[04:35:50] Maxed: has joined #ruby
[04:36:03] IrishGringo: has joined #ruby
[04:37:29] oivoodoo: has joined #ruby
[04:41:02] rtail_: has joined #ruby
[04:42:23] lacuna: has joined #ruby
[04:43:49] [-Orbit-]: has joined #ruby
[04:51:19] gix: has joined #ruby
[04:54:41] skade: has joined #ruby
[04:56:50] nanoz: has joined #ruby
[04:57:25] astrofog: has joined #ruby
[04:59:03] IrishGringo: has joined #ruby
[05:01:04] nerium: has joined #ruby
[05:01:45] DiCablo: has joined #ruby
[05:19:22] djbkd: has joined #ruby
[05:19:24] dudedudeman: has joined #ruby
[05:20:39] usershell: has joined #ruby
[05:27:11] bronson: has joined #ruby
[05:27:50] cpup: has joined #ruby
[05:28:10] usershell: has joined #ruby
[05:28:15] codecop: has joined #ruby
[05:29:54] skade: has joined #ruby
[05:30:12] LMity: has joined #ruby
[05:30:37] IrishGringo: has joined #ruby
[05:31:42] usershell: has joined #ruby
[05:32:22] oivoodoo: has joined #ruby
[05:36:01] afast: has joined #ruby
[05:39:12] chouhoulis: has joined #ruby
[05:39:12] darkf: has joined #ruby
[05:42:52] mfb2: has joined #ruby
[05:43:36] afast: has joined #ruby
[05:43:54] afast: has joined #ruby
[05:45:07] afast: has joined #ruby
[05:49:45] IrishGringo: has joined #ruby
[05:49:56] semeion: konsolebox: what LC_COLLATE i should use to read a html file? it have <head><meta charset="iso-8859-1"> the site is: http://www.dicionarioinformal.com.br/
[05:51:52] semeion: konsolebox: with that process_string_with_coproc function
[05:54:28] altair118: has joined #ruby
[05:54:36] arlek: has joined #ruby
[05:55:19] Averna: has joined #ruby
[05:55:21] usershell: has joined #ruby
[05:55:54] lemur: has joined #ruby
[05:57:41] usershell: has joined #ruby
[05:57:57] skade: has joined #ruby
[06:00:33] asccigcc: has joined #ruby
[06:01:33] usershell: has joined #ruby
[06:03:49] Limix: has joined #ruby
[06:05:23] usershell: has joined #ruby
[06:05:41] semeion: LC_COLLATE doesn??t work in this case, i have put directly in the command: cmd = ['iconv', '-f', 'ISO-8859-1', '-t', 'ASCII//TRANSLIT']
[06:06:11] semeion: konsolebox: now is working, thanks again dude, i finnaly got it working with your function
[06:06:49] konsolebox: semeion: oh yes, in that case, set env to empty hash: env = {}
[06:07:10] semeion: yes, i did :D
[06:07:27] rkazak: has joined #ruby
[06:07:35] semeion: without your help i never could finish it, thanks
[06:11:20] usershell: has joined #ruby
[06:14:05] jamw: has joined #ruby
[06:15:12] freerobby: has joined #ruby
[06:16:49] IrishGringo: has joined #ruby
[06:21:07] rkazak: has joined #ruby
[06:27:14] oivoodoo: has joined #ruby
[06:28:26] sakix: has joined #ruby
[06:29:56] akem: has joined #ruby
[06:31:16] arrayw: has joined #ruby
[06:34:32] kies^: has joined #ruby
[06:34:32] howdoi: has joined #ruby
[06:35:09] yfeldblum: has joined #ruby
[06:35:50] duderono_: has joined #ruby
[06:36:41] skade: has joined #ruby
[06:37:15] duderono_: has joined #ruby
[06:41:35] sneakerhax: has joined #ruby
[06:41:51] krzkrz: has joined #ruby
[06:43:40] graffix222: has joined #ruby
[06:44:01] ur5us: has joined #ruby
[06:44:09] claw: has joined #ruby
[06:45:59] JohnT: has joined #ruby
[06:50:48] kinduff: has joined #ruby
[06:50:49] claw: has joined #ruby
[06:51:03] akem: has joined #ruby
[06:55:00] chouhoulis: has joined #ruby
[06:55:01] dionysus69: has joined #ruby
[07:01:49] IrishGringo: has joined #ruby
[07:02:03] ascarter: has joined #ruby
[07:02:49] skade: has joined #ruby
[07:04:02] govg: has joined #ruby
[07:05:22] atomical: has joined #ruby
[07:05:24] Pupp3tm4st3r: has joined #ruby
[07:05:49] Dmitri: has joined #ruby
[07:07:22] usershell: has joined #ruby
[07:07:59] colegatron: has joined #ruby
[07:10:16] afast: has joined #ruby
[07:14:50] mfb2: has joined #ruby
[07:14:54] PedramT: has joined #ruby
[07:15:47] PedramT: has joined #ruby
[07:15:52] craigp: has joined #ruby
[07:17:25] puria: has joined #ruby
[07:22:02] oivoodoo: has joined #ruby
[07:22:55] sdwrage: has joined #ruby
[07:24:34] karapetyan: has joined #ruby
[07:27:46] Ebok: has joined #ruby
[07:28:21] skade: has joined #ruby
[07:29:24] usershell: has joined #ruby
[07:33:15] speaking1ode: has joined #ruby
[07:36:32] Psy-Q: has joined #ruby
[07:38:50] arup_r: has joined #ruby
[07:41:58] atomical: has joined #ruby
[07:42:29] Dimik: has joined #ruby
[07:43:01] sigurding: has joined #ruby
[07:43:50] IrishGringo: has joined #ruby
[07:44:18] jas02: has joined #ruby
[07:49:50] IrishGringo: has joined #ruby
[07:50:56] jgt: has joined #ruby
[07:53:41] skade: has joined #ruby
[07:54:19] karapetyan: has joined #ruby
[07:54:23] solars: has joined #ruby
[07:56:08] chouhoulis: has joined #ruby
[07:56:08] lxsameer: has joined #ruby
[07:59:38] PedramT: has joined #ruby
[07:59:50] dexter-tzu: has joined #ruby
[08:04:03] wald0: has joined #ruby
[08:06:45] craigp: has joined #ruby
[08:09:12] ledestin: has joined #ruby
[08:12:08] framling: has joined #ruby
[08:12:33] Tempesta: has joined #ruby
[08:14:50] jamw: has joined #ruby
[08:16:20] nanoz: has joined #ruby
[08:19:01] mdw: has joined #ruby
[08:19:04] rippa: has joined #ruby
[08:19:15] Arnvald: has joined #ruby
[08:19:24] skade: has joined #ruby
[08:20:00] IrishGringo: has joined #ruby
[08:22:09] PedramT: has joined #ruby
[08:24:37] atomical: has joined #ruby
[08:29:42] bronson: has joined #ruby
[08:31:02] sakix: has joined #ruby
[08:33:52] TomyLobo: has joined #ruby
[08:34:39] Jackneill: has joined #ruby
[08:34:48] shevy: oooh they changed the format https://bugs.ruby-lang.org/projects/ruby-trunk slightly I think
[08:34:59] sigurding: has joined #ruby
[08:36:00] ss_much: has joined #ruby
[08:42:24] firstdayonthejob: has joined #ruby
[08:44:20] skade: has joined #ruby
[08:52:39] sakix: has joined #ruby
[08:55:31] PedramT: has joined #ruby
[08:56:55] chouhoulis: has joined #ruby
[08:59:24] krzkrz: has joined #ruby
[09:03:39] arup_r: has joined #ruby
[09:04:49] FernandoBasso: has joined #ruby
[09:04:56] arup_r: has joined #ruby
[09:05:41] usershell: has joined #ruby
[09:06:14] arup_r: has joined #ruby
[09:06:27] IrishGringo: has joined #ruby
[09:06:52] arup_r: has joined #ruby
[09:08:07] arup_r: has joined #ruby
[09:10:18] PedramT_: has joined #ruby
[09:10:55] skade: has joined #ruby
[09:11:20] speakingtoad: has joined #ruby
[09:11:48] oivoodoo: has joined #ruby
[09:18:47] DoubleMalt: has joined #ruby
[09:19:35] agit0: has joined #ruby
[09:20:49] oivoodoo: has joined #ruby
[09:22:05] skcin7: has joined #ruby
[09:22:51] kies^: has joined #ruby
[09:23:21] sigurding: has joined #ruby
[09:24:29] User458764: has joined #ruby
[09:27:38] Puffball: has joined #ruby
[09:29:46] crank1988: has joined #ruby
[09:31:59] andymememe: has joined #ruby
[09:32:02] sandstrom: has joined #ruby
[09:37:08] skade: has joined #ruby
[09:37:42] IrishGringo: has joined #ruby
[09:44:39] Ebok: has joined #ruby
[09:48:03] ruby[bot]: -b junglebunnys!*@*$#ruby-banned
[09:52:51] decoponio: has joined #ruby
[09:53:20] PedramT: has joined #ruby
[09:57:37] chouhoulis: has joined #ruby
[09:58:07] colegatron: has joined #ruby
[09:58:24] PedramT_: has joined #ruby
[09:58:28] Xeago: has joined #ruby
[09:58:45] volty: has joined #ruby
[10:03:23] skade: has joined #ruby
[10:03:49] karapetyan: has joined #ruby
[10:04:52] CloCkWeRX: has joined #ruby
[10:07:42] karapetyan: has joined #ruby
[10:11:56] jbrhbr: has joined #ruby
[10:12:09] karapetyan: has joined #ruby
[10:13:25] SCHAAP137: has joined #ruby
[10:14:41] dopie: has joined #ruby
[10:15:41] jamw: has joined #ruby
[10:17:02] ferr: has joined #ruby
[10:17:12] PedramT: has joined #ruby
[10:17:17] craigp: has joined #ruby
[10:19:39] karapetyan: has joined #ruby
[10:21:01] zeroDivisible: has joined #ruby
[10:23:39] krzkrz: has joined #ruby
[10:29:20] skade: has joined #ruby
[10:30:29] sftrabbit: has joined #ruby
[10:30:43] karapetyan: has joined #ruby
[10:30:45] atomical: has joined #ruby
[10:31:23] Ishido: has joined #ruby
[10:32:40] bronson: has joined #ruby
[10:36:49] IrishGringo: has joined #ruby
[10:38:04] sole: hi girls
[10:38:17] PedramT: has joined #ruby
[10:38:27] Ox0dea: Howdy, cowboy.
[10:38:36] sole: could anyone pls help with this issue (make a gem for windows)
[10:38:38] sole: https://github.com/robinst/taglib-ruby/issues/62
[10:39:03] sole: im trying every 6 months to get that working but i always fail :|
[10:39:13] sole: for 2 years now
[10:40:32] Ox0dea: That kind of experience would surely have made a lesser man switch to a saner OS by now.
[10:40:35] Ox0dea: Well done, you.
[10:41:52] sole: just a point of view, nothing else
[10:43:26] sole: but it means you will not help me since you got no clue of the not so same OS
[10:44:15] FernandoBasso: has joined #ruby
[10:44:17] sole: so under those sane OS which is the most sane one?
[10:47:14] PedramT_: has joined #ruby
[10:47:25] mrtomme: has joined #ruby
[10:50:30] shevy: linux is cool but it will always depend on the quality of the gem/bindings ... I have had problems with taglib before myself, just compiling it without error
[10:51:52] sole: hey shevy, but you was able to build it now under win?
[10:52:26] oivoodoo: has joined #ruby
[10:52:31] shevy: nothing works on windows
[10:52:40] skade: has joined #ruby
[10:53:11] Ox0dea: Glaziers work on windows.
[10:54:04] sole: Glaziers just meld lately
[10:54:19] zenlot1: has joined #ruby
[10:54:36] Ox0dea: I know a glazier that does window installations for skyscrapers and the like.
[10:54:48] sole: ah that was glacier
[10:55:00] oivoodoo: has joined #ruby
[10:56:41] UtkarshRay: has joined #ruby
[10:58:23] chouhoulis: has joined #ruby
[10:59:39] ziyadb: has joined #ruby
[11:01:14] akem: has joined #ruby
[11:01:46] oivoodoo: has joined #ruby
[11:03:27] AlexJakeGreen: has joined #ruby
[11:03:39] sole: funtoo portage # uname -r
[11:03:40] sole: 4.3.3-gentoo
[11:05:40] skade: has joined #ruby
[11:06:51] cajone: has joined #ruby
[11:07:00] chipotle: has joined #ruby
[11:07:37] PedramT: has joined #ruby
[11:08:15] Ox0dea: Well, if we're playing that game.
[11:08:17] Ox0dea: $ uname -r
[11:08:20] Ox0dea: 4.4.0-4-ARCH
[11:08:25] Ox0dea: 404, OS not found.
[11:08:45] shevy: all better than windows
[11:08:54] sole: arch is very nice too, mayby my prefered linux =)
[11:09:08] karapetyan: has joined #ruby
[11:09:38] Ox0dea: sol_: Do you have the `ls` with the new default --quoting-style yet?
[11:10:07] ZerGabriel: has joined #ruby
[11:11:05] sole: Ox0dea: sorry Ox0dea, that rings no bell here
[11:11:38] Ox0dea: sol_: Well, count your blessing, sol_, because it's coming, sol_.
[11:11:51] Ox0dea: Filenames with special characters in automatically display with surrounding quotes now. :/
[11:13:11] sole: cant think of a case where i would need that :P
[11:13:29] sole: not on nix
[11:14:11] agit0: has joined #ruby
[11:16:00] IrishGringo: has joined #ruby
[11:16:10] joneshf-laptop: has joined #ruby
[11:17:33] shevy: ohhhhhhhh
[11:17:50] shevy: ls is part of coreutils, I forgot that
[11:17:56] shevy: I was wondering why bash suddenly showed strange quotes
[11:18:06] shevy: it confused the hell out of me
[11:18:09] Ox0dea: Same here.
[11:18:27] Ox0dea: I thought I'd done an accidental `shopt -s <something>` somewhere and it was bugging the hell outta me.
[11:18:28] craigp: has joined #ruby
[11:18:44] atomical: has joined #ruby
[11:18:57] Ox0dea: I have a little script called `pkgs` that shows my packages in install order, ran it, and there was coreutils right at the bottom.
[11:19:32] gruz0: has joined #ruby
[11:19:52] oivoodoo: has joined #ruby
[11:19:53] Anderson69s: has joined #ruby
[11:22:05] mdw: has joined #ruby
[11:26:34] ReK2: has joined #ruby
[11:27:02] hannelita: has joined #ruby
[11:29:15] atomical: has joined #ruby
[11:32:20] craigp: has joined #ruby
[11:33:04] zarubin: has joined #ruby
[11:35:03] zarubin: has joined #ruby
[11:38:20] skade: has joined #ruby
[11:42:10] xdccMule[3486nm]: has joined #ruby
[11:43:02] zarubin: has joined #ruby
[11:44:18] xdccMule[3486nm]: has left #ruby: ()
[11:45:28] gizmore: has joined #ruby
[11:48:39] zarubin: has joined #ruby
[11:48:59] sundhell: has joined #ruby
[11:50:14] karapetyan: has joined #ruby
[11:50:33] nerium: has joined #ruby
[11:51:04] PedramT: has joined #ruby
[11:53:15] gruz0: has joined #ruby
[11:54:01] zarubin: has joined #ruby
[11:55:04] dexter-tzu: has joined #ruby
[11:56:14] tyrbo: has joined #ruby
[11:57:29] ht__: has joined #ruby
[11:58:25] ht__: has joined #ruby
[11:58:44] ChameleonSix4: has joined #ruby
[11:59:12] chouhoulis: has joined #ruby
[12:01:41] skade: has joined #ruby
[12:04:22] tk: has joined #ruby
[12:05:57] nerium: has joined #ruby
[12:06:42] Anderson69s: has joined #ruby
[12:07:30] ht__: has joined #ruby
[12:07:42] skade: has joined #ruby
[12:08:05] howdoi: has joined #ruby
[12:09:19] jottr: has joined #ruby
[12:10:13] zyzioziom: has joined #ruby
[12:10:24] IrishGringo: has joined #ruby
[12:11:30] ht__: has joined #ruby
[12:11:51] usershell: has joined #ruby
[12:11:55] rubynuby: has joined #ruby
[12:12:13] jgt: has joined #ruby
[12:12:18] rubynuby: hey does anyone know how *('a'..'z') works?
[12:12:37] rubynuby: is a range a method on *?
[12:13:20] rubynuby: so i can create an array, but why doesn't *('a'..'z').sample(2) work?
[12:13:33] shevy: the * is splat, http://theadmin.org/articles/rubys-array-splat-operator-array/
[12:13:54] rubynuby: so a splat says that you can have more than one argument
[12:14:02] shevy: range does not have .sample()
[12:14:12] rubynuby: but i thought precedence was left to right
[12:14:40] rubynuby: splat is always right to left?
[12:15:17] shevy: *('a'..'z') standalone there works for you?
[12:15:21] ympeg: has joined #ruby
[12:15:44] shevy: I can't even get your above syntax to work :)
[12:16:01] rubynuby: well i have to assign it to a variable
[12:16:02] Ox0dea: >> [*?a..?z].sample 2 # rubynuby
[12:16:04] ruby[bot]: Ox0dea: # => ["z", "s"] (https://eval.in/506815)
[12:16:22] jamw: has joined #ruby
[12:16:39] rubynuby: yeah that works
[12:16:45] Ox0dea: You can't "splat into thin air", as it were.
[12:16:56] Ox0dea: So it's fine as the RHS of an assignment and within brackets.
[12:17:06] mfb2: has joined #ruby
[12:17:42] rubynuby: you can only splat outside of a bracket if its directly to the right of an assignment variable?
[12:18:24] Ox0dea: To the right of the equal sign, you mean.
[12:18:31] Ox0dea: But no, there's a few other places.
[12:18:39] Ox0dea: Parameter lists and the like.
[12:19:00] rubynuby: okok, i see alrightey thanks
[12:19:20] agit0: has joined #ruby
[12:21:43] sdothum: has joined #ruby
[12:26:27] dlitvak: has joined #ruby
[12:26:54] Xeago: has joined #ruby
[12:31:12] aryaching: has joined #ruby
[12:33:51] emilford: has joined #ruby
[12:34:09] zotherstupidguy: has joined #ruby
[12:38:00] DoubleMalt: has joined #ruby
[12:38:14] PedramT_: has joined #ruby
[12:41:31] Dragooon: has joined #ruby
[12:42:04] mostlybadfly: has joined #ruby
[12:42:35] emilford: has joined #ruby
[12:44:04] CloCkWeRX: has joined #ruby
[12:45:06] toretore: has joined #ruby
[12:45:14] sandstrom: has joined #ruby
[12:47:36] IronD: has joined #ruby
[12:48:04] atomical: has joined #ruby
[12:50:37] senayar^: has joined #ruby
[12:51:05] oivoodoo: has joined #ruby
[12:57:33] ht__: has joined #ruby
[12:58:42] aryaching_: has joined #ruby
[12:59:58] chouhoulis: has joined #ruby
[13:01:22] IrishGringo: has joined #ruby
[13:03:47] CloCkWeRX: has joined #ruby
[13:04:49] User458764: has joined #ruby
[13:05:15] tomphp: has joined #ruby
[13:07:10] PedramT: has joined #ruby
[13:09:13] oivoodoo: has joined #ruby
[13:12:05] usershell: has joined #ruby
[13:12:48] karapetyan: has joined #ruby
[13:13:41] atomical: has joined #ruby
[13:14:43] benderb: has joined #ruby
[13:15:17] benderb: hello room, how do you prevent a serialized value from saving new lines? I???m having an issue where empty fields are saving the value `\n` like so `["walked", "\n", "\n", "\n", "\n", "\n"]
[13:16:23] Ox0dea: >> a = ["walked", "\n", "\n", "\n", "\n", "\n"]; a.delete "\n"; a # benderb
[13:16:24] ruby[bot]: Ox0dea: # => ["walked"] (https://eval.in/506863)
[13:16:30] Ox0dea: Not sure how you feel about that, but it'll do in a pinch.
[13:16:55] Ox0dea: The problem seems to be that you're using something like #each_line or #readlines and forgetting to #chomp.
[13:17:51] bltavares: has joined #ruby
[13:18:12] bltavares: has left #ruby: ("http://tty.space")
[13:19:24] IrishGringo: has joined #ruby
[13:20:04] benderb: thanks #Ox0dea
[13:20:27] benderb: I???m using strong params to save an array like so params[:solution].permit( adjective: [], noun: [], verb: [], job: [])
[13:20:37] bonhoeffer: has left #ruby: ()
[13:22:07] Ox0dea: I can't say I see where the newlines are slipping in.
[13:22:13] jxs_: has joined #ruby
[13:22:55] krzkrz: has joined #ruby
[13:24:43] shevy: oh that is cool... I did not know that Array has .delete
[13:24:54] benderb: sorry, so verb for example, has 6 input fields, so the new lines are being inserted for each field that isn???t filled in. If user fills in 1 ver, 5 ???\n??? are saved, if user fills in 5 verbs, 1 \n is saved
[13:25:31] ht__: has joined #ruby
[13:25:34] sftrabbit: has joined #ruby
[13:27:36] oivoodoo: has joined #ruby
[13:34:28] PedramT: has joined #ruby
[13:35:22] bronson: has joined #ruby
[13:36:09] ta: has joined #ruby
[13:36:32] Sembei: has joined #ruby
[13:37:03] domgetter: has joined #ruby
[13:41:04] carlosjack: has joined #ruby
[13:41:27] carlosjack: Let me ask you guys something?
[13:42:05] ympeg_: has joined #ruby
[13:42:25] carlosjack: Can you guys reccomend some ruby sec libs I like Ronin
[13:42:29] carlosjack: and Metasploit
[13:42:37] apeiros: carlosjack: you smell like a troll.
[13:42:47] Ox0dea: Or a 1337 haxx0r.
[13:42:55] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[13:43:17] carlosjack: I am just asking for fuzzers, something like lib-forensics in python
[13:43:23] carlosjack: something like wdt
[13:43:35] shevy: carlosjack the usage pattern of "guys" gives it away
[13:43:39] apeiros: ?toolbox carlosjack
[13:43:39] ruby[bot]: carlosjack: https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
[13:43:49] Ox0dea: shevy: Good call.
[13:44:07] carlosjack: Their list for sec is ass
[13:44:14] apeiros: ain't got more.
[13:44:21] carlosjack: it's just some whitebox scanners
[13:44:30] carlosjack: and some xss escaping libraries
[13:44:37] shevy: we got no more man!!!
[13:44:49] Sebastia1Thorn: anyone used RXSD? not sure how to get the documentation from the xsd's
[13:45:03] carlosjack: No shevy they didn't even list Ronin
[13:45:15] shevy: those are samurai aren't they?
[13:45:19] carlosjack: so there have to be more resources
[13:45:37] carlosjack: Ronin is an exploit development framework
[13:45:56] oivoodoo: has joined #ruby
[13:46:00] carlosjack: Yeah as much as I love ruby and I like rails I hate how Web Development has hijacked the community
[13:46:34] carlosjack: Makes our lang look like a one trick pony
[13:46:38] shevy: are you buzzword-chaining things together there carlosjack :)
[13:46:48] astrobunny: has joined #ruby
[13:47:07] emilford: has joined #ruby
[13:47:08] shevy: 3x guys... then metasploit... then "rails stole ruby" ... AND NOW the new-line nick highlighting, if jhass would be awake, he'd get at you!
[13:47:19] Ox0dea: Is it jackcom?
[13:47:27] apeiros: lol, no way
[13:47:36] carlosjack: I am seriously asking for some stuff related to fuzzing and forensics
[13:47:41] shevy: not sure... jackcom is nicer than carlosjack
[13:47:54] shevy: he always asks me why he is banned :)
[13:47:57] carlosjack: I am face palming man
[13:48:20] Ox0dea: You should try face napalming.
[13:48:31] carlosjack: For asking for sec libs
[13:48:34] Ox0dea: Calm down.
[13:48:34] shevy: carlosjack careful... Ox0dea may have a meme for facepalming too
[13:49:13] gruz0: has joined #ruby
[13:49:19] carlosjack: Oh btw your Model View Controller and REST libs don't protect you as much as you would think
[13:49:31] ht__: has joined #ruby
[13:49:39] FooMunki: has joined #ruby
[13:49:44] apeiros: that's difficult, given that I don't think they protect me at all.
[13:50:00] carlosjack: Good for you apeiros
[13:50:10] carlosjack: Ok so none of you care about sec
[13:50:26] Ox0dea: Off you go to greener pastures, then.
[13:50:34] apeiros: we care, but sounds like no infosec people are around.
[13:50:44] carlosjack: What config management tool should I pick up Puppet, Chef, or Ansible?
[13:50:53] carlosjack: I know Ansible is python
[13:51:17] fsapo: has joined #ruby
[13:51:21] apeiros: given your troll-smell, I'm inclined to recommend ansible.
[13:51:27] nerium: has joined #ruby
[13:51:54] carlosjack: Why do I smell like a troll that's what I hate about a lot of IRC channels it's so clicky
[13:52:22] carlosjack: You end up just arguing and being dicks more than actually giving people information
[13:52:35] carlosjack: I was leaning more towards chef
[13:52:35] shevy: you provoke it man
[13:53:02] IrishGringo: has joined #ruby
[13:53:22] carlosjack: because it's like more pure ruby even though it could be considered harder than puppets dsl
[13:53:51] apeiros: there's dedicated chef & puppet channels. maybe ask there.
[13:53:54] shevy: go puppet, it's the biggest
[13:54:05] carlosjack: Yeah but that shit is going to be biased as hell
[13:54:11] carlosjack: if I go on chef
[13:54:16] carlosjack: they will likely say chef
[13:54:27] carlosjack: if I go on puppet they will likely say puppet
[13:54:30] shevy: how do you find no bias please??
[13:54:30] carlosjack: if I go on devops
[13:54:38] carlosjack: I will start a flame war
[13:55:02] apeiros: so the preference is to start a flamewar here. great. gotcha.
[13:55:25] carlosjack: Shevy statistically speaking going on ruby you will have people from different backgrounds and experiences
[13:55:29] carlosjack: in config management
[13:55:45] carlosjack: same with devops
[13:55:49] shevy: biggest part will be those who don't use it!
[13:56:53] carlosjack: Ruby is my favorite language right now but like when I go to ruby community areas half of it is RAILS and Sinatra related stuff.
[13:57:11] einarj: has joined #ruby
[13:57:27] carlosjack: But I switched over from Perl I gotta say ruby is better.
[13:58:07] carlosjack: Anyways fuck my biases
[13:58:31] carlosjack: Can you tell me your backgrounds and the cool projects you're working on and how do I seem trollish
[13:59:44] Freeaqingme: has joined #ruby
[14:00:26] apeiros: lets assume for a minute that you're not a troll
[14:00:29] apeiros: > carlosjack: Hey guys; Let me ask you guys something?; Can you guys reccomend some ruby sec libs I like Ronin
[14:00:31] sftrabbit: has joined #ruby
[14:00:35] apeiros: this is like begging for this:
[14:00:39] apeiros: ?guys carlosjack
[14:00:39] ruby[bot]: carlosjack: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[14:00:46] chouhoulis: has joined #ruby
[14:01:02] carlosjack: is insulting
[14:01:09] carlosjack: I don't understand
[14:01:10] apeiros: let's say it's problematic.
[14:01:21] shevy: you "switched away from perl"
[14:01:21] lucasb: has joined #ruby
[14:01:23] carlosjack: I'm legitimately autistic
[14:01:25] apeiros: the message says all, I presume you can read?
[14:01:44] carlosjack: I seriously do not understand
[14:01:50] carlosjack: I am dead ass
[14:02:04] shevy: just admit that you are trolling
[14:02:17] carlosjack: I don't understand
[14:02:23] carlosjack: You guys are not being specific
[14:02:26] apeiros: well, I'm afk. somebody may explain you. but over in #ruby-offtopic please.
[14:02:28] carlosjack: Do you think ruby
[14:02:35] carlosjack: is not good for sec
[14:02:58] shevy: ruby may be too good for you to handle
[14:02:58] jgt: has joined #ruby
[14:03:11] carlosjack: shut the fuck up
[14:03:25] carlosjack: If anything you guys are trolling me
[14:03:45] freerobby: has joined #ruby
[14:03:48] PedramT: has joined #ruby
[14:03:58] oivoodoo: has joined #ruby
[14:05:33] ht__: has joined #ruby
[14:05:50] apeiros: !rude carlosjack
[14:05:51] ruby[bot]: +qq carlosjack!*@* *!*@24.115.87.179.res-cmts.pbg.ptd.net
[14:06:36] slackbotgz: has joined #ruby
[14:07:03] hxegon: has joined #ruby
[14:07:31] hnagamin: has joined #ruby
[14:07:46] ajf-: has joined #ruby
[14:07:52] carlosjack: has left #ruby: ()
[14:08:59] emilford: has joined #ruby
[14:09:18] sigurding: has joined #ruby
[14:11:20] tinnvec: has joined #ruby
[14:13:09] mloy: has joined #ruby
[14:13:42] timanema: has joined #ruby
[14:15:56] arup_r: has joined #ruby
[14:17:03] jamw: has joined #ruby
[14:18:41] kies^: has joined #ruby
[14:18:47] IronD: What was his goal with that whole interactin?
[14:18:47] konsolebox: i see that you guys really drove him to lose his patience wow. he tried so much not to look like a troll. what a lovely community we have here.
[14:18:55] IronD: interaction*
[14:19:07] dlitvak: has joined #ruby
[14:19:08] konsolebox: sensitive much?
[14:21:08] tinnvec: has joined #ruby
[14:21:30] ht__: has joined #ruby
[14:22:12] oivoodoo: has joined #ruby
[14:22:18] sucks: has joined #ruby
[14:25:37] shevy: IronD probably attention
[14:28:41] IrishGringo: has joined #ruby
[14:33:48] emilford: has joined #ruby
[14:35:42] ebbflowgo: has joined #ruby
[14:35:49] goodcodeguy: has joined #ruby
[14:35:51] dwfait: has joined #ruby
[14:37:00] IrishGringo: has joined #ruby
[14:37:20] last_staff: has joined #ruby
[14:37:30] ht__: has joined #ruby
[14:38:20] slackbotgz: has joined #ruby
[14:40:14] oivoodoo: has joined #ruby
[14:41:56] arthropododo: has joined #ruby
[14:41:56] lobster_: has joined #ruby
[14:42:50] karapetyan: has joined #ruby
[14:43:03] emilford: has joined #ruby
[14:43:53] zyzioziom: has joined #ruby
[14:44:14] kies^: has joined #ruby
[14:44:21] zyzioziom: has left #ruby: ()
[14:44:44] Scripore: has joined #ruby
[14:48:28] agit0: has joined #ruby
[14:48:56] dlitvak: has joined #ruby
[14:52:03] emilford: has joined #ruby
[14:53:44] Abrin: has joined #ruby
[14:53:51] pdoherty: has joined #ruby
[14:55:05] volty: has joined #ruby
[14:56:04] ta: has joined #ruby
[14:56:55] thoraxe: has joined #ruby
[14:58:08] tyrbo: has joined #ruby
[14:58:32] oivoodoo: has joined #ruby
[15:01:02] IrishGringo: has joined #ruby
[15:01:11] emilford: has joined #ruby
[15:01:27] chouhoulis: has joined #ruby
[15:02:26] krobzaur: has joined #ruby
[15:02:42] rippa: has joined #ruby
[15:03:05] crowell: has joined #ruby
[15:03:17] skade: has joined #ruby
[15:03:34] dasher00: has joined #ruby
[15:03:56] hiyosi: has joined #ruby
[15:03:59] tinnvec: has joined #ruby
[15:06:03] ruby[bot]: -qq carlosjack!*@* *!*@24.115.87.179.res-cmts.pbg.ptd.net
[15:06:30] peeja: has joined #ruby
[15:08:14] usershell: has joined #ruby
[15:08:46] tinnvec: has joined #ruby
[15:09:40] jottr_: has joined #ruby
[15:09:42] FernandoBasso: Is there any specific piece of documentation that can clarify the order in which things are evaluated in a situation like this? puts arr[i] while arr[i += 1]
[15:09:57] Sebastia1Thorn: this feels bad, doing strip twice, any ideas how it might looks better? file << " ##{line.strip}\n" unless line.strip.empty?
[15:10:18] emilford: has joined #ruby
[15:10:27] shevy: FernandoBasso usually it should be "from right to leftwards evaluation"
[15:10:45] astrobun_: has joined #ruby
[15:11:20] shevy: parens would have higher precedence; {} bind more tightly than do/end - FernandoBasso I think the first answer has most of the rules there http://stackoverflow.com/questions/21060234/ruby-operator-precedence-table
[15:11:58] shevy: also http://stackoverflow.com/questions/1840488/operator-precedence-for-and-in-ruby/1840995#1840995
[15:12:04] FernandoBasso: shevy, Okay. Thank you very much.
[15:12:42] shevy: Sebastia1Thorn well... you could call line.strip! before invoking that line... but that would add a new line of code
[15:14:37] Sebastia1Thorn: shevy: that was the only thing i had in mind aswell, thought someone had some of that magic ruby-dust in their pocket ;)
[15:14:44] volty: file << (ln = line.strip).empty? ? line : ln
[15:16:34] oivoodoo: has joined #ruby
[15:18:24] jottr: has joined #ruby
[15:18:41] Sebastia1Thorn: volty: cool, but that is to hard to read
[15:18:48] Sebastia1Thorn: ill just do a strip!
[15:19:27] emilford: has joined #ruby
[15:25:33] ht__: has joined #ruby
[15:27:11] IrishGringo: has joined #ruby
[15:27:40] emilford: has joined #ruby
[15:29:45] huQeQwdpu47q: has joined #ruby
[15:30:09] Limix: has joined #ruby
[15:32:00] freerobby: has joined #ruby
[15:32:00] apeiros: konsolebox: what I've seen was a troll. and for future reference: discussing kicks/mutes/bans is offtopic and subject to kick/ban.
[15:32:04] skade: has joined #ruby
[15:34:34] oivoodoo: has joined #ruby
[15:36:32] volty: Sebastia1Thorn: just write it more descriptive: file << ( (stripped = line.strip).empty? ? line : stripped ) << "\n" # and get used with ternary - that gives you more readability (out of compact code)
[15:37:56] volty: or, in alternative, you can: file << ( (stripped = line.strip).empty? && line || stripped ) << "\n"
[15:38:10] bronson: has joined #ruby
[15:38:45] apeiros: file << line =~ /\s*/ ? line : line.strip # what about this?
[15:39:09] apeiros: oh, regexp-crime no. 1 committed - no anchoring :-S
[15:39:19] shevy: hmm... \s will match internally to?
[15:39:22] apeiros: file << line =~ /\A\s*\z/ ? line : line.strip # corrected
[15:39:50] rodfersou: has joined #ruby
[15:40:15] volty: nice, but his q. was about reducing code execution (he is probably saving on energy bill)
[15:40:53] apeiros: though I'm quite curious as for why one would want to perform the above???
[15:41:04] volty: me too :)
[15:41:05] apeiros: I mean??? why keep a line with only whitespaces as-is and strip others?
[15:41:46] volty: keep trace of empty lines, probably
[15:42:40] lucasb: I don't think that was his intention
[15:44:26] lacuna: has joined #ruby
[15:44:26] lacuna: has joined #ruby
[15:44:32] gruz0: has joined #ruby
[15:46:41] whiteline: has joined #ruby
[15:46:51] griffindy: has joined #ruby
[15:47:10] rodferso1: has joined #ruby
[15:47:34] ht__: has joined #ruby
[15:47:39] freerobby: has joined #ruby
[15:47:46] hogetaro: has joined #ruby
[15:50:11] moeabdol: has joined #ruby
[15:50:22] hnagamin: has joined #ruby
[15:50:46] skade: has joined #ruby
[15:51:24] emilford: has joined #ruby
[15:52:45] dfinninger: has joined #ruby
[15:53:04] oivoodoo: has joined #ruby
[15:55:32] jlebrech: has joined #ruby
[15:55:54] griffindy: has joined #ruby
[15:59:22] cactuzzz: has joined #ruby
[16:00:27] hannelita: has joined #ruby
[16:00:36] usershell: has joined #ruby
[16:01:55] asccigcc: has joined #ruby
[16:02:14] chouhoulis: has joined #ruby
[16:02:48] freerobby: has joined #ruby
[16:05:33] ht__: has joined #ruby
[16:06:14] drptbl: has joined #ruby
[16:06:55] arup_r: has joined #ruby
[16:07:51] peeja: has joined #ruby
[16:07:56] emilford: has joined #ruby
[16:08:30] shevy: oh hi speaking stone age!
[16:10:22] hannelita: has joined #ruby
[16:11:05] karmatr0n: has joined #ruby
[16:11:13] skade: has joined #ruby
[16:11:55] dlitvak: has joined #ruby
[16:12:57] rgtk: has joined #ruby
[16:13:17] x77686d: has joined #ruby
[16:13:29] emilford: has joined #ruby
[16:14:57] skade: has joined #ruby
[16:16:31] Yzguy: has joined #ruby
[16:16:45] karmatr0n: has joined #ruby
[16:17:51] jamw: has joined #ruby
[16:18:35] hannelita: has joined #ruby
[16:19:33] ht__: has joined #ruby
[16:19:50] emilford: has joined #ruby
[16:20:04] dome22xl: has joined #ruby
[16:23:39] mburns: has joined #ruby
[16:26:56] Faris: has joined #ruby
[16:30:26] fermonkus: has joined #ruby
[16:31:13] asccigcc: has joined #ruby
[16:33:08] drptbl: has joined #ruby
[16:33:59] araujo_: has joined #ruby
[16:34:21] Xeago: has joined #ruby
[16:36:06] araujo_: has joined #ruby
[16:36:55] cactuzzz: can anyone explain why this prints ???what????? https://gist.github.com/rocketz/1fcb66ed7edba17a7928
[16:37:45] volty: case uses === (triple)
[16:37:57] emilford: has joined #ruby
[16:39:32] apeiros: also be aware of the order it uses ===
[16:39:44] apeiros: case expr; when cond --> cond === expr,
[16:40:44] volty: apeiros: /(\A.*\S(?=\s*)|(?!\s*)\z)|(\A\s*\z)/.match(line) # but no comment, got tired
[16:41:11] apeiros: volty: sorry, I'm missing the context - what's that for?
[16:41:24] volty: strip if not empty
[16:41:35] cactuzzz: oh thanks! wasn???t aware of that
[16:42:02] volty: got crazy with zero width lookaheads
[16:42:26] skade: has joined #ruby
[16:44:05] araujo__: has joined #ruby
[16:45:00] binns: has joined #ruby
[16:45:13] nerium: has joined #ruby
[16:46:48] volty: ignore, it's a rubbish regex
[16:47:24] tvw: has joined #ruby
[16:47:29] lucasb: cool, but again, I repeat that was not what he wanted :)
[16:47:55] apeiros: lucasb: you might also just say what he wanted then :-p
[16:47:59] volty: lucasb: what he wanted ? :)
[16:48:17] lucasb: he just didn't just strip twice!
[16:48:23] cschneid_: has joined #ruby
[16:48:29] lucasb: *didn't want to strip
[16:48:59] lucasb: that's why a single "line.strip!" before his statement was enough
[16:49:20] skade: has joined #ruby
[16:52:04] Toledo|gone: has joined #ruby
[16:52:49] TomPeed: has joined #ruby
[16:54:05] BSaboia: has joined #ruby
[16:54:44] shevy: I think we should all strip more often anyway
[16:55:50] mfb2: has joined #ruby
[16:57:08] arlek: has joined #ruby
[16:57:50] emilford: has joined #ruby
[16:58:09] rgtk_: has joined #ruby
[16:58:24] drptbl: has joined #ruby
[16:58:27] volty: is zero-width positive buggy, or it is my head ?
[16:58:30] aryaching: has joined #ruby
[16:58:36] volty: consider:
[16:58:56] volty: >> /\A.*\S(?=\s*\z)/.match 'ciao '
[16:58:57] ruby[bot]: volty: # => #<MatchData "ciao"> (https://eval.in/506926)
[16:59:07] volty: >> /\A.*\S(?=\s*)\z/.match 'ciao '
[16:59:09] ruby[bot]: volty: # => nil (https://eval.in/506927)
[16:59:27] jgt: has joined #ruby
[17:00:42] arlek: has joined #ruby
[17:02:09] IrishGringo: has joined #ruby
[17:03:03] chouhoulis: has joined #ruby
[17:03:28] lucasb: I don't know what to say. Since zero-width lookahead and \z are both anchors, it's confusing to use them together
[17:04:07] sgambino: has joined #ruby
[17:04:11] apeiros: volty: why should the second one match?
[17:04:17] lucasb: but I guess returning nil is the right result
[17:04:21] apeiros: look-ahead is zero-width
[17:04:37] apeiros: and \S\z does not match in 'ciao '
[17:04:49] volty: yes, a non space followed by optional spaces, followed by end of string
[17:05:01] apeiros: that's not what your regex says
[17:05:29] apeiros: your regex says a non-whitespace followed by both, end of string, and (look-ahead) an arbitrary number of spaces
[17:05:35] volty: >> /\S(?=\s*)\z/.match 'ciao '
[17:05:37] ruby[bot]: volty: # => nil (https://eval.in/506947)
[17:05:40] hunzinker: has joined #ruby
[17:05:54] apeiros: volty: again, look-ahead is *zero width*
[17:05:56] apeiros: it does not consume
[17:06:15] apeiros: /\S(?=\s*)\z/ means that /\S\z/ must be satisfied
[17:06:20] volty: ah, it means only one ?
[17:06:42] volty: we cant chain zero width one after the other ?
[17:06:58] apeiros: i.e., /(?=a)b/ is an oxymoron, this expression can't ever be satisfied.
[17:07:20] apeiros: somewhere you've got a misunderstanding of what zero-width means I think
[17:08:05] apeiros: /\S(?=\s)\z/ # <- do you understand why this is impossible to match?
[17:08:07] skade: has joined #ruby
[17:08:48] volty: yes, i got it
[17:09:23] emilford: has joined #ruby
[17:09:29] volty: only one zero width, can't chain
[17:09:48] volty: \z is a zero width look ahead too
[17:10:23] apeiros: no, that's not the issue
[17:10:27] apeiros: you can chain
[17:10:46] apeiros: well, \z is a boundary. but I guess you can also think about it as a look-ahead.
[17:11:29] volty: it is, it must be, that's why I can't put them successive but separate
[17:11:42] apeiros: >> "foo"[/f(?=o)(?=[^O])(?=.)/] # <-- totally chainable
[17:11:43] ruby[bot]: apeiros: # => "f" (https://eval.in/506949)
[17:12:00] apeiros: no. it seems to me you don't understand what zero-width means.
[17:12:08] apeiros: it means it does not advance the "cursor" so to speak.
[17:12:41] apeiros: what do you expect $1 to be here? "fox" =~ /f(?=.)(.)/
[17:12:52] volty: yes, I got it. you look ahead and if there you have to consume it or stop there
[17:13:09] apeiros: you don't consume
[17:13:26] volty: i meant or you consume or you stop
[17:13:49] apeiros: as said, no, you don't consume. look-aheads do not consume.
[17:14:41] karmatr0n: has joined #ruby
[17:14:44] hunzinker: has left #ruby: ()
[17:14:52] volty: Could be that I can't explain myself. I say you have or to consume it (after verified it's there), or to stop matching.
[17:15:03] nchambers: has joined #ruby
[17:15:14] volty: since cursor's stuck there
[17:17:29] apeiros: "to consume" in regex means it moves the cursor
[17:17:41] davedev24: has joined #ruby
[17:17:49] apeiros: but I can't really make sense of that phrase "you have or to consume it"
[17:19:12] volty: for me it meaningful. You are matching, going ahead, then arrives a zero width, and or you consume it (advance) - to go ahead with matching, or it will be the last one
[17:19:26] DoubleMalt: has joined #ruby
[17:19:29] nathanr: has joined #ruby
[17:19:39] eam: volty: a zero width does not consume
[17:19:40] arup_r: has joined #ruby
[17:19:49] volty: that's what i am saying
[17:20:58] Ebok: has joined #ruby
[17:21:10] volty: after verified it's there - you consume it (if you have to match after it), or it's a final one
[17:21:34] volty: to me it's clear, though I can't know how much I am clear
[17:22:36] eam: volty: no, the (?=) structure does not consume when matched
[17:22:44] eam: it is unique in that regard
[17:22:58] eam: yes, that's what apeiros is saying regarding zero width
[17:23:07] volty: i got what apeiros said
[17:23:08] araujo_: has joined #ruby
[17:24:17] marcdel: has joined #ruby
[17:24:22] volty: eam: I was tired, and I messed around. Then I got it (I was matching a lot long time ago).
[17:25:21] eam: no judgement, just trying to help you out
[17:25:29] hfp: has joined #ruby
[17:25:39] gigetoo: has joined #ruby
[17:25:49] volty: just stop insisting. or I do not explain myself well, or you do not understand well. all folks. golden rule : nothing after zero width unless consuming
[17:25:59] volty: help me by not trolling at me
[17:25:59] hfp_work: has joined #ruby
[17:26:10] eam: no one's trolling you, we're trying to help
[17:26:16] lucasb: regex match string long time
[17:26:23] mdw: has joined #ruby
[17:26:28] volty: it happens
[17:27:38] volty: only the brightest do not err, and I am not one of them :)
[17:27:39] craigp: has joined #ruby
[17:28:09] eam: not even the brightest ;)
[17:29:51] apeiros: volty: "or I do not explain myself well" - I think you use terminology wrong, which is why & what eam and I reacted to
[17:30:08] apeiros: because I'd say that golden rule as written by you is incorrect
[17:30:29] apeiros: I assume you do mean the right thing. but it doesn't fit with what you write.
[17:31:27] petersaints: has joined #ruby
[17:32:15] volty: could be. we all have different neurals, but the world is nice because inhabited by varying orders, degrees, and hues
[17:32:22] mdw7: has joined #ruby
[17:32:44] apeiros: sure. but some words have clearly specified meanings ;-)
[17:34:23] zzz: has joined #ruby
[17:35:21] volty: look, I'll try to explain it another way: if I teach somebody about zero-width lookaheads, for sure first I first explain to him the logic of the cursor, but in the end I will repeat him twice that nothing could come after that zero-width unless consumed by a successive expression
[17:36:23] volty: teachers too are varying, with varying results, upon their talent, and upon the talent of students of course :)
[17:36:26] apeiros: you mean an expression after a zero-width must not be another zero-width? (because that's how I read what you write)
[17:37:15] volty: of course, that too
[17:37:27] apeiros: that's not correct, though
[17:37:36] apeiros: 18:10 apeiros: you can chain
[17:37:44] apeiros: 18:11 apeiros: >> "foo"[/f(?=o)(?=[^O])(?=.)/] # <-- totally chainable
[17:37:59] apeiros: having a zero-width followed by another zero-width is legal
[17:38:30] mfb2: has joined #ruby
[17:38:44] volty: what about the sense ?
[17:39:17] volty: alternative zero-widths ?
[17:39:38] apeiros: that's another question. with all positive look-aheads I see little. but you could f.ex. have a positive and a negative lookahead
[17:39:52] bronson: has joined #ruby
[17:40:03] apeiros: also just because I can't think of a case where it makes sense a) doesn't mean there is non, nor b) that it's therefore illegal
[17:40:18] volty: yes, but my hypo was about teaching a student
[17:40:48] volty: nothing could come = nothing has sense
[17:41:09] apeiros: um, I don't think that's equivalent :)
[17:41:12] volty: could != can
[17:41:38] AustinMatherne: has joined #ruby
[17:42:31] volty: But I'd better teach my program how to transform input :
[17:43:16] djbkd: has joined #ruby
[17:43:25] marcdel: has joined #ruby
[17:44:14] volty: but you are the only pedant here (I don't know them all) that is humanly flexible :)
[17:44:41] volty: thx for the correction, and for the hints too
[17:44:50] weemsledeux: has joined #ruby
[17:45:10] lucasb: I consider myself a humanly flexible pedant too
[17:45:22] volty: yes, you too, forgot, sorry :)
[17:45:26] penne12: has joined #ruby
[17:45:37] spleeze: has joined #ruby
[17:46:02] emilford: has joined #ruby
[17:46:41] volty: last questions: is ripper the best ruby parser to go with (for the sake of indexing classes, modules, required files etc etc)
[17:47:09] ajf-: has joined #ruby
[17:48:03] agit0: has joined #ruby
[17:49:29] cicloid: has joined #ruby
[17:50:36] oivoodoo: has joined #ruby
[17:50:58] rtail_: has joined #ruby
[17:52:26] oivoodoo: has joined #ruby
[17:53:11] Jardayn: has joined #ruby
[17:53:43] rtail_: has joined #ruby
[17:55:07] amclain: has joined #ruby
[17:56:58] mrsolow: has joined #ruby
[17:57:08] s2013: has joined #ruby
[17:57:54] houhoulis: has joined #ruby
[17:59:38] marcdel: has joined #ruby
[18:01:55] manjaroi3: has joined #ruby
[18:03:15] lxsameer: has joined #ruby
[18:03:15] lxsameer: has joined #ruby
[18:03:39] jottr: has joined #ruby
[18:03:44] chouhoulis: has joined #ruby
[18:03:50] Yzguy: has joined #ruby
[18:04:24] craigp: has joined #ruby
[18:04:27] tinhajj123: has joined #ruby
[18:05:10] dfinninger: has joined #ruby
[18:05:32] tinhajj123: I got a question about optparser class. I don't understand something in the documentation. http://docs.ruby-lang.org/en/2.1.0/OptionParser.html#method-i-make_switch
[18:06:19] tinhajj123: theres an option to make an argument to a switch required and they give an example with --require, but is that the only way to make an argument to a switch required? By using --require?
[18:07:06] The_Phoenix: has joined #ruby
[18:07:12] tinhajj123: err, I'm just not sure what in that section of code causes an argument to be required
[18:07:29] centrx: has joined #ruby
[18:07:42] s2013: has joined #ruby
[18:10:12] lucasb: I don't know if I understand you correctly, but I think you use p.on('--foo=ARG') to make an argument required
[18:10:21] emilford: has joined #ruby
[18:10:24] lucasb: p.on('--foo=[ARG]') to make optional
[18:10:54] jbrhbr: has joined #ruby
[18:11:08] arlek: has joined #ruby
[18:11:36] lucasb: for the above optional, maybe the right syntax is '--foo[=ARG]'
[18:11:41] guardian: has joined #ruby
[18:12:03] tinhajj123: yeah thats exactly what I was looking for lucas thanks for pointing out the distinction really appreciate it!
[18:12:38] huQeQwdpu47q: has joined #ruby
[18:12:59] cpup: has joined #ruby
[18:14:28] dlitvak: has joined #ruby
[18:14:44] karmatr0n: has joined #ruby
[18:15:02] casadei: has joined #ruby
[18:15:50] last_staff: has joined #ruby
[18:17:18] terminalrecluse: has joined #ruby
[18:17:50] oivoodoo: has joined #ruby
[18:18:35] jamw: has joined #ruby
[18:19:26] emilford: has joined #ruby
[18:23:31] dudedudeman: has joined #ruby
[18:24:17] karmatr0n: has joined #ruby
[18:24:33] Maxed: has joined #ruby
[18:25:50] dfinninger: has joined #ruby
[18:28:03] puria: has joined #ruby
[18:28:34] emilford: has joined #ruby
[18:31:28] mfb2: has joined #ruby
[18:36:06] dexter-tzu: has joined #ruby
[18:36:13] drptbl: has joined #ruby
[18:36:52] arlek: has joined #ruby
[18:37:38] emilford: has joined #ruby
[18:37:43] arlek: has joined #ruby
[18:38:08] arlek: has joined #ruby
[18:39:43] rtail_: has joined #ruby
[18:40:56] ur5us: has joined #ruby
[18:42:17] arlek_: has joined #ruby
[18:43:44] arlek_: has joined #ruby
[18:44:20] stuxnet: has joined #ruby
[18:46:08] s2013: has joined #ruby
[18:47:42] arlek: has joined #ruby
[18:48:44] marr: has joined #ruby
[18:48:58] s2013: has joined #ruby
[18:49:39] JohnT: has joined #ruby
[18:49:50] nchambers: has joined #ruby
[18:50:11] dlitvak: has joined #ruby
[18:50:21] arlek__: has joined #ruby
[18:52:02] _Doran: has joined #ruby
[18:52:44] arlek_: has joined #ruby
[18:53:31] _Doran: has left #ruby: ()
[18:53:41] bahar: has joined #ruby
[18:54:27] gruz0: has joined #ruby
[18:56:06] codecop: has joined #ruby
[18:56:11] s2013: has joined #ruby
[18:57:00] lDoran: has joined #ruby
[18:57:35] emilford: has joined #ruby
[18:57:41] arlek: has joined #ruby
[18:57:55] rhg135: has joined #ruby
[18:59:27] futilegames: has joined #ruby
[19:01:04] arlek__: has joined #ruby
[19:03:21] nchambers: has joined #ruby
[19:03:31] arlek_: has joined #ruby
[19:04:35] chouhoulis: has joined #ruby
[19:05:37] tomphp: has joined #ruby
[19:06:08] arlek: has joined #ruby
[19:06:40] emilford: has joined #ruby
[19:08:50] arlek_: has joined #ruby
[19:10:39] hannelita: has joined #ruby
[19:11:10] arlek__: has joined #ruby
[19:12:31] marcdel: has joined #ruby
[19:12:38] FernandoBasso: has joined #ruby
[19:14:29] arlek_: has joined #ruby
[19:16:42] aspire: has joined #ruby
[19:17:23] arlek__: has joined #ruby
[19:20:31] lele: has joined #ruby
[19:20:37] metameme: has joined #ruby
[19:20:47] metameme: has left #ruby: ()
[19:23:18] BTRE: has joined #ruby
[19:23:29] emilford: has joined #ruby
[19:24:13] jgt1: has joined #ruby
[19:25:19] tape88: has joined #ruby
[19:25:21] tape88: has left #ruby: ()
[19:25:22] tape88: has joined #ruby
[19:26:48] dfinninger: has joined #ruby
[19:27:25] hightower2: has joined #ruby
[19:28:10] asmodlol: has joined #ruby
[19:29:37] tinnvec: has joined #ruby
[19:29:57] s2013: has joined #ruby
[19:30:04] n00bDev: has joined #ruby
[19:30:23] oivoodoo: has joined #ruby
[19:32:17] ebbflowgo: has joined #ruby
[19:32:32] emilford: has joined #ruby
[19:34:02] ferr: has joined #ruby
[19:35:27] dfinninger: has joined #ruby
[19:36:33] tape88: has joined #ruby
[19:36:33] psye: has joined #ruby
[19:37:37] ramfjord: has joined #ruby
[19:40:28] griffindy: has joined #ruby
[19:41:38] emilford: has joined #ruby
[19:42:09] bronson: has joined #ruby
[19:43:21] Graphettion: has joined #ruby
[19:43:34] Galas: has joined #ruby
[19:43:36] kadoppe: has joined #ruby
[19:43:45] tape88: has joined #ruby
[19:44:43] aep_: whats a pretty way to make [a,b,c,a,a] into {a:3,b:1,c:1} ?
[19:44:53] aep_: something with reduce and count
[19:45:32] bahar: has joined #ruby
[19:45:59] Mon_Ouie: each_with_object Hash.new(0) do |x, counts| counts[x] += 1 end
[19:46:04] apeiros: >> [a,b,c,a,a].each_with_object(Hash.new(0)) { | ???
[19:46:06] ruby[bot]: apeiros: # => /tmp/execpad-3f3a3f586d18/source-3f3a3f586d18:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/506978)
[19:46:13] apeiros: ACTION swings fist at Mon_Ouie for being faster
[19:46:30] bahar: has joined #ruby
[19:46:37] Mon_Ouie: Also undefined variable a :p
[19:47:33] aep_: hmm. i'm playing with group_by now
[19:48:14] chris2: then you'll miss a hash-returning Hash#map
[19:50:44] emilford: has joined #ruby
[19:51:37] vvalien: has joined #ruby
[19:51:51] skcin7: has joined #ruby
[19:52:38] tape88: has joined #ruby
[19:53:50] hannelita: has joined #ruby
[19:54:45] chipotle: has joined #ruby
[19:56:04] workmad3: has joined #ruby
[19:57:54] joast: has joined #ruby
[19:59:50] emilford: has joined #ruby
[20:01:34] jaffachief_: has joined #ruby
[20:02:08] atomical_: has joined #ruby
[20:02:49] Dimik: has joined #ruby
[20:03:18] marcdel: has joined #ruby
[20:05:19] chouhoulis: has joined #ruby
[20:05:49] newtonianb: has joined #ruby
[20:06:32] underplank: has joined #ruby
[20:07:10] gruz0: has joined #ruby
[20:07:25] underplank: Hi all. Just trying to run some rspec tests. and getting am getting this error? https://www.refheap.com/113983
[20:07:37] underplank: total newb to ruby, so looking for some pointers.
[20:07:47] underplank: im running bundle exec rake spec
[20:07:51] yasha0x80: has joined #ruby
[20:08:19] nchambers: has joined #ruby
[20:08:58] emilford: has joined #ruby
[20:13:23] mdw: has joined #ruby
[20:14:42] karmatr0n: has joined #ruby
[20:17:20] finisherr: has joined #ruby
[20:17:30] wald0: has joined #ruby
[20:17:47] Rutix: has joined #ruby
[20:17:47] Rutix: has joined #ruby
[20:18:02] emilford: has joined #ruby
[20:19:34] jamw: has joined #ruby
[20:20:01] djellemah: has joined #ruby
[20:20:05] atmosx: underplank: some gem is missing probably
[20:20:46] atmosx: underplank: you're missing some library or ruby can't find due to path issues
[20:20:49] lDoran: has joined #ruby
[20:21:00] underplank: ahh??? ok that makes sense
[20:21:25] TomPeed: has joined #ruby
[20:22:05] craigp: has joined #ruby
[20:22:41] lacuna: has joined #ruby
[20:22:42] lacuna: has joined #ruby
[20:23:40] arup_r: has joined #ruby
[20:24:06] PedramT: has joined #ruby
[20:24:42] Xeago: has joined #ruby
[20:27:06] emilford: has joined #ruby
[20:27:22] axisys: has joined #ruby
[20:29:29] arthurnn: has joined #ruby
[20:30:24] yqt: has joined #ruby
[20:34:36] TomPeed: has joined #ruby
[20:35:17] arthurnn: has joined #ruby
[20:35:28] cicloid: has joined #ruby
[20:36:02] govg: has joined #ruby
[20:36:12] emilford: has joined #ruby
[20:38:17] underplank: My google foo is failing me. In rspec is there a way to check is something is not nil?
[20:40:39] baweaver: expect(foo).to_not be(nil)
[20:40:57] baweaver: https://www.relishapp.com/rspec - this is your friend
[20:41:53] c0ncealed: has joined #ruby
[20:42:46] s2013: has joined #ruby
[20:42:59] _Tariq: has joined #ruby
[20:46:17] arthurnn: has joined #ruby
[20:46:19] domgetter: has joined #ruby
[20:47:56] _Tariq: I am planning to do a hardfork of a rubygem (Calyx), and may need to come up with a different name so that the project can be registered properly on rubygems. Would calling it tra38-calyx be a fine name? I want to be able to merge it back upstream if I can ever get the approval of the maintainer.
[20:48:05] shanemcd: has joined #ruby
[20:48:50] shevy: you have to keep in mind that some people have to type out that name
[20:48:55] shevy: gem install tra38-calyx
[20:48:59] shevy: not a lot of fun to type
[20:49:04] shevy: compare this to
[20:49:06] shevy: gem install rails
[20:49:13] shevy: gem install calyx
[20:49:21] wald0: has joined #ruby
[20:50:34] _Tariq: so should I come up with a shorter name then?
[20:50:52] _Tariq: I am just afraid that coming up with a different name would essentially prevent merging upstream
[20:50:56] _Tariq: but that may be very well be inevitable
[20:51:20] hfp_work: has joined #ruby
[20:51:50] hfp: has joined #ruby
[20:52:09] _Tariq: Do you have a suggestion of such shevy?
[20:56:15] tomphp: has joined #ruby
[20:57:26] diegoviola: has joined #ruby
[20:57:53] vF3hNGxc47h8: has joined #ruby
[20:58:04] JohnT: has joined #ruby
[21:00:06] toretore: has joined #ruby
[21:00:59] maneco: has joined #ruby
[21:01:10] Sperant: has joined #ruby
[21:02:13] wald0: has joined #ruby
[21:02:39] lelo: has joined #ruby
[21:02:54] djellemah: _Tariq: IMO, it doesn't really matter. If you can see a pattern in other forked gem names use that, otherwise use whatever you like. I don't see the name creating a big problem for upstream merge.
[21:05:44] dcunit3d: has joined #ruby
[21:06:28] mdw: has joined #ruby
[21:08:57] triangles: has joined #ruby
[21:10:52] skade: has joined #ruby
[21:11:39] emilford: has joined #ruby
[21:14:32] shevy: _Tariq haha
[21:14:40] karmatr0n: has joined #ruby
[21:14:42] shevy: _Tariq I myself don't follow what I wrote above :-)
[21:14:48] SamGerber: has joined #ruby
[21:14:51] _Tariq: Ah, got it
[21:14:52] shevy: one reason is that many short names are already picked
[21:15:00] shevy: I once wanted to have a gem called "configuration"
[21:15:05] shevy: but there already is such a gem
[21:15:35] shevy: so now, either I rename my gem, or I rename the module... or I retain the name configuration and stick to use it, at the cost of not being able to distribute at rubygems.org (I could of course make it available elsewhere)
[21:16:01] choke: be quirky with it and name it something like twat_waffle... tons of weird named gems out there, part of the fun i guess lol
[21:16:02] shevy: you could call it "configuration_fancypants", and the main module would be: module Configuration but I hate this
[21:16:14] shevy: I think gem-name -> toplevel namespace is logical and simpler
[21:16:43] shevy: choke oh yeah there are so many silly names...
[21:17:00] emilford: has joined #ruby
[21:17:00] shevy: https://rubygems.org/gems/test_bitch
[21:17:13] choke: i came up with a whole story that i told my boss, entirely made up with gem names lol
[21:17:19] shevy: https://rubygems.org/gems/underpants
[21:17:30] adaedra: you'll never beat unicode_snowman.
[21:17:36] shevy: https://rubygems.org/gems/poopypants
[21:17:43] shevy: unicode_snowman is a good name
[21:17:50] shevy: IF it is a unicode snowman
[21:17:56] shevy: if it is a pony then it's a stupid name
[21:18:47] disconnekted: has joined #ruby
[21:19:13] adaedra: unicode_snowman is the perfection.
[21:19:23] adaedra: you'll never find a gem more useful.
[21:20:15] choke: https://gist.github.com/ch0ke/6a988ab321426bbbec1a
[21:20:24] choke: theres the story i told my boss using gem named lol
[21:20:57] cicloid: has joined #ruby
[21:23:37] shanemcd: has joined #ruby
[21:23:56] djbkd: has joined #ruby
[21:24:52] lelo: has joined #ruby
[21:25:43] Term_: has joined #ruby
[21:29:35] Rodya_: has joined #ruby
[21:32:43] ZerGabriel: has joined #ruby
[21:33:16] ht_: has joined #ruby
[21:36:44] PedramT: has joined #ruby
[21:37:05] gizless: has joined #ruby
[21:38:32] Cohedrin: has joined #ruby
[21:39:51] finisherr: has left #ruby: ()
[21:40:14] tomphp: has joined #ruby
[21:44:03] futilegames_: has joined #ruby
[21:44:25] bronson: has joined #ruby
[21:44:29] sakix: has joined #ruby
[21:46:37] hxegon: has joined #ruby
[21:47:23] araujo__: has joined #ruby
[21:48:29] Rodya_: has joined #ruby
[21:49:25] fantazo: has joined #ruby
[21:51:47] futilegames: has left #ruby: ()
[21:51:54] AndChat|349076: has joined #ruby
[21:52:16] shadoi: has joined #ruby
[21:54:33] dlitvak: has joined #ruby
[21:55:06] mfb2: has joined #ruby
[21:55:16] Darmani: has joined #ruby
[21:55:30] Darmani: Hey kids<3
[21:57:35] s2013: has joined #ruby
[21:58:42] sakix: has joined #ruby
[22:00:26] shanemcd: has joined #ruby
[22:01:08] Darmani: Radar are you around?
[22:01:13] ur5us: has joined #ruby
[22:01:21] volty: has joined #ruby
[22:02:36] pwnd_nsfw: has joined #ruby
[22:02:55] Rodya_: has joined #ruby
[22:03:23] Xiti`: has joined #ruby
[22:07:34] Xiti`: has joined #ruby
[22:10:39] skade: has joined #ruby
[22:11:17] K1MOS: has joined #ruby
[22:12:10] nfk: has joined #ruby
[22:12:11] casadei: has joined #ruby
[22:12:23] skofo: has joined #ruby
[22:13:19] last_staff: has joined #ruby
[22:14:29] FernandoBasso: has joined #ruby
[22:14:43] karmatr0n: has joined #ruby
[22:18:48] mprelude: has joined #ruby
[22:20:04] chipotle: has joined #ruby
[22:20:25] jamw: has joined #ruby
[22:20:34] lucasb: has joined #ruby
[22:20:45] skofo: has joined #ruby
[22:20:55] arlek: im trying to include ruby headers within my project (visual studio 2015) and in "ruby/ruby.h" it fails to find "ruby/config.h"
[22:21:10] sftrabbit: has joined #ruby
[22:21:36] arlek: its there and i assume that the issue is due to not using angle brackets instead of quotation marks, but i dont want to change this in every individual ruby file
[22:21:37] cicloid: has joined #ruby
[22:22:34] ruby-lang928: has joined #ruby
[22:23:05] ruby154: has joined #ruby
[22:23:18] arlek: wait no, its actually not there
[22:23:25] arlek: what do i do? im using ruby 2.2
[22:23:35] naim: has joined #ruby
[22:24:37] fedexo: has joined #ruby
[22:24:54] adaedra: arlek: did you add the ruby headers path to your project settings?
[22:25:00] volty: kind of ruby?
[22:25:03] yasha0x80: has joined #ruby
[22:25:18] adaedra: volty: yes, ruby is very kind. :p
[22:26:03] dlitvak: has joined #ruby
[22:26:14] arlek: ruby/config.h doesnt exist
[22:26:15] baweaver: Ox0dea, eam, and jhass would be better with C interface questions
[22:26:20] baweaver: if they're about.
[22:26:22] arlek: it doesnt exist on the github page either
[22:26:26] volty: INCLUDEPATH += /home/volty/.rbenv/versions/2.2.0-dev/include/ruby-2.2. then INCLUDEPATH += /home/volty/.rbenv/versions/2.2.0-dev/include/ruby-2.2.0/x86_64-linux
[22:26:33] arlek: yet ruby/ruby.h still includes it
[22:26:54] volty: ( for qmake, but all the same)
[22:26:58] adaedra: it may be generated by configure
[22:27:44] arlek: how would i get it? im using the prebuilt libraries
[22:28:00] arlek: i cant figure out how to build it under visual studio
[22:28:12] sucks: has joined #ruby
[22:28:18] volty: neither do I :)
[22:28:40] araujo__: has joined #ruby
[22:28:58] robbyoconnor: has joined #ruby
[22:29:11] lucasb: yes, confirming what adaedra said, it is generated by ./configure
[22:29:24] lucasb: dunno how one can do that in windows, however
[22:29:28] ellisTAA: has joined #ruby
[22:29:40] volty: eh, I do not use configure
[22:29:48] ellisTAA: can someone recommend a resource that gives suggestions on how to write more elegant ruby code?
[22:29:53] antgel: has joined #ruby
[22:30:14] volty: go and get the headers for your version of ruby, install them wherever you want, and point there
[22:31:13] adaedra: there's a configure.bat for windows
[22:31:24] naim: @ellista +1
[22:31:59] volty: run it, but configure isn't going to produce ruby.h :)
[22:32:12] arlek: i have ruby.h
[22:32:13] soahccc: ellistaa: what do you mean by elegant? Nifty brainfuckers or just style guide? stdlib is always a good dig
[22:32:14] volty: anyway: run it and see what it says
[22:32:22] adaedra: but they have ruby.h, it's config.h that lacks, volty
[22:32:30] baweaver: ellistaa: Eloquent Ruby
[22:32:48] soahccc: ACTION wrote a "framework" for a modular telegram bot and has almost no idea for actual useful components :sadface:
[22:32:50] ellisTAA: soahccc: stuff to make my code faster .. etc
[22:32:54] ellisTAA: baweaver: ty
[22:33:13] baweaver: then an algorithms book
[22:33:42] tomphp: has joined #ruby
[22:33:47] baweaver: if speed is really a concern though you'll need to drop to a language like Scala or Elixir
[22:33:56] baweaver: though that's rare.
[22:34:08] Darmani: Can someone tell me what's wrong with my code? http://ideone.com/IQSk2P
[22:34:12] ruby154: what about the write more standard code and make it readable
[22:34:19] volty: adaedra: sure there's no config? been searching for that file on your pc?
[22:34:25] baweaver: that'd be Eloquent Ruby
[22:34:43] adaedra: volty: that's not my pc, that's arlek's
[22:34:53] volty: ops, sorry
[22:35:53] baweaver: Darmani: http://rosettacode.org/wiki/Sorting_algorithms/Bubble_sort#Ruby
[22:35:57] baweaver: that site is gold
[22:36:14] Darmani: oh cool fosho
[22:36:19] Darmani: but whats wrong with my code though.... Lol
[22:36:59] lucasb: Darmani: I shouldn't be trying to use array.each and also modifying the array indices at the same time
[22:37:03] ruby154: why your sorted veriable assign to false initially?
[22:37:07] arlek: it gives me fatal error: echo returns 0x01
[22:37:09] lucasb: *you shouldn't ...
[22:37:24] arlek: http://prntscr.com/9tyt20
[22:37:29] arlek: trying to build it
[22:37:42] Darmani: lucasb - ohh my bad. I got you.
[22:37:53] adaedra: arlek: there's a more interesting message above this one.
[22:38:37] arlek: how do i add that option
[22:40:34] bbuurt: has joined #ruby
[22:42:47] araujo_: has joined #ruby
[22:43:11] zenlot1: has joined #ruby
[22:43:21] volty: maybe typing this : @configure I want it with --with-baseruby option, baseruby being at location .... Looking forward for a positive outcome. Best regards, Artek Trollmatch
[22:44:03] gambl0re: has joined #ruby
[22:44:12] arlek: im not trolling
[22:44:37] arlek: anyways i added the command and i get: http://prntscr.com/9tywmv
[22:45:34] Radar: Darmani: I may be, I might not be. Who's asking and why?
[22:46:14] Radar: ACTION opens screenshot, sees Windows, suddenly has more important things to be doing like watching paint dry
[22:47:21] TomPeed: has joined #ruby
[22:50:13] dcunit3d: has joined #ruby
[22:50:55] shevy: arlek you can try to look at how luis lavena builds the rubyinstaller, somewhere there should be the way how they build it on windows https://github.com/oneclick/rubyinstaller
[22:51:10] naim: Is there anybody who is from stuttgart, german?
[22:51:13] baweaver: probably orca iirc
[22:51:17] diegoviola: or get a Linux VM and use chruby/ruby-install
[22:51:23] baweaver: but I avoid windows like the plague.
[22:51:42] freerobby: has joined #ruby
[22:51:44] hightower2: Hey, is there a module or something that would help with "inlining" Ruby methods? By "inlining" I don't mean running foreign code, but reparsing source to inline the code and avoid calling methods
[22:52:17] ruby[bot]: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[22:52:34] hightower2: baweaver, I mean the equivalent of "inline" in C
[22:52:35] shevy: naim dunno... perhaps norc__ or jhass... hmm no jhass was from berlin... perhaps Papierkorb
[22:52:52] du5tball: has joined #ruby
[22:52:53] Radar: I've been to Berlin, does that count?
[22:52:54] hightower2: (With all the inevitable differences that a Ruby version of such thing would have, of course)
[22:53:16] naim: :) just curious
[22:53:16] Radar: hightower2: What exactly are you trying to accomplish? Some code examples would be great.
[22:53:17] shevy: Radar it counts a little
[22:53:22] sucks: has joined #ruby
[22:53:24] gambl0re: has joined #ruby
[22:53:25] du5tball: is it possible to convert a variable in-place to another type? as in, i have x, x gets assigned via user input but i want that to be a float
[22:53:28] Radar: hightower2: Not all programming language constructs convert 1:1 across programming language.
[22:53:31] Radar: languages*
[22:53:37] volty: there cannot be an equivalent of c's inline in ruby, nonsense
[22:53:40] Radar: du5tball: to_f
[22:53:42] shevy: du5tball the various .to_* methods
[22:53:44] Radar: du5tball: x.to_f
[22:54:01] hightower2: volty, as I said, the "equivalent", taking into account Ruby specifics
[22:54:06] Rodya_: has joined #ruby
[22:54:21] du5tball: Radar: so, simply putting "x.to_f" makes x a float for the rest of the operations?
[22:54:27] baweaver: hightower2: what are you trying to do?
[22:54:28] Radar: du5tball: x = x.to_f
[22:54:40] du5tball: i hadn't thought of that. thanks
[22:55:42] hightower2: Radar, baweaver, I have a very high performance app where the code is split into methods simply for manageability and DRYness, of course, but calling methods is slower if the code would be executing in-place, without jumping to methods. So I am looking for something (I guess) which would reparse Ruby code before execution and "inline" those methods
[22:56:01] hightower2: s/slower if/slower than if/
[22:57:07] baweaver: definitely beyond my immediate skillset
[22:57:53] Ebok: has joined #ruby
[22:57:55] baweaver: though I will offer that if you're trying for performance to that extent, Ruby is probably not a good idea.
[22:58:29] tomphp: has joined #ruby
[22:59:40] nertzy2: has joined #ruby
[23:00:00] Radar: Can't provide advice on code I can't see, sorry.
[23:00:18] x77686d: has joined #ruby
[23:02:26] kriskropd: has joined #ruby
[23:04:01] freerobby: has joined #ruby
[23:04:20] volty: hightower2: that's marginal gain, if any. Pay attn not to regress to assembler :)
[23:05:02] h99h9h88: has joined #ruby
[23:06:04] newbie22: has joined #ruby
[23:08:55] h99h9h88: has joined #ruby
[23:09:52] h99h9h88: has joined #ruby
[23:10:17] dlitvak: has joined #ruby
[23:10:47] pdoherty: has joined #ruby
[23:11:23] skade: has joined #ruby
[23:11:37] maneco: has joined #ruby
[23:13:45] casadei: has joined #ruby
[23:14:43] karmatr0n: has joined #ruby
[23:16:23] workmad3: has joined #ruby
[23:17:22] Xiti: has joined #ruby
[23:19:58] norc-2: <volty> there cannot be an equivalent of c's inline in ruby, nonsense
[23:19:59] norc-2: Sure there can,.
[23:20:35] arthropododo: has joined #ruby
[23:21:01] baweaver: https://github.com/seattlerb/rubyinline - after digging
[23:22:34] cicloid: has joined #ruby
[23:22:42] volty: norc__: the garden?? pipe can be seen as an equivalent of elephant's trunk too. From the series ??all you need is fantasy....??
[23:24:59] chimy_: has joined #ruby
[23:26:20] arlek: after some arcane magic i finally got this to work
[23:26:23] norc-2: volty, if by inline you meant a decorator that does absolutely nothing because compilers know better than programmers anyway, then sure
[23:26:31] norc-2: we can add decorators to ruby too.
[23:27:10] akem: has joined #ruby
[23:27:54] arlek: for anyone that's interested, rubyinstaller generates a config file so i copied that and pasted it in another directory. then after that i had to add some includes above it: http://prntscr.com/9tzgcp
[23:28:39] arlek: the static build doesnt work for newer iterations of VS so you have to link to the provided .dll
[23:29:31] arlek: the config.h are located in the folders within the "include" directory in the respective compiler folders
[23:29:39] K1MOS: has joined #ruby
[23:29:41] psf: has joined #ruby
[23:29:44] volty: norc__: inline is an instruction to expand the code inline, instead of creating a real function that calls return. Other question if you instruct your compiler to interpret 'inline' as a hint. Inline's were abused, resulting in gigantic codeprint
[23:29:53] norc-2: volty, it is not an instruction.
[23:30:02] volty: directive ?
[23:30:04] norc-2: volty, it is just a compiler hint that is completely ignored by todays compilers
[23:30:15] volty: it's what I said
[23:30:25] skofo: has joined #ruby
[23:31:14] norc-2: volty, the point is that the inline directive actually doesnt do anything
[23:31:24] araujo__: has joined #ruby
[23:32:37] volty: the point is that inline doesn't do anything because they instructed compilers (all of them?) to not do anything. the other point is that our inliner asked for a real inline in ruby ??? a nonsense imho
[23:34:24] psf: Hey guys, any book advices?
[23:35:11] volty: The codeprint extension was too big and the loading of all that big code was annulling the gains from omitting stack passing + return. The same holds for whatever language, low or high.
[23:35:59] volty: (meant loading time, swaps etc etc )
[23:37:15] Yzguy: has joined #ruby
[23:39:05] volty: another problem with inlined functions was the impossibility to export them (lib)
[23:40:17] volty: so, if not worth in c/c++, how can that be worth in a high level language ?
[23:40:23] altair118: has joined #ruby
[23:40:30] volty: hightower2: got it?
[23:43:16] mdw: has joined #ruby
[23:43:26] asccigcc: has joined #ruby
[23:44:19] Papierkorb: not worth it in C/C++?
[23:44:25] Papierkorb: What year is it?
[23:45:51] volty: I just don't know. It's norc__ that says inline is nowadays ignored. I just compile, from time to time, not using inline, not thinking inline.
[23:46:08] ManUtd27: has joined #ruby
[23:46:15] bronson: has joined #ruby
[23:47:14] solocshaw: has joined #ruby
[23:48:17] s2013: has joined #ruby
[23:49:58] Papierkorb: (Not saying that 'inline' may not be ignored, and that compilers are likely to ignore them)
[23:51:09] Papierkorb: I miss the 'const' keyword in ruby though.
[23:51:55] Papierkorb: Not even for optimization (C/C++ compilers should be able to do that themselves), but as guard against foolish code ;)
[23:52:33] Darmani: baweaver, lucasb - http://ideone.com/vggkcF
[23:52:41] Darmani: took me a while. But I think I get it.
[23:57:33] CloCkWeRX: has joined #ruby
[23:59:04] PaulCapestany: has joined #ruby