« Back to channel list

#ruby - 23 April 2017

« Back 1 day Forward 1 day »
[00:05:12] olivier__: has joined #ruby
[00:05:29] milardovich: has joined #ruby
[00:05:35] Cohedrin: has joined #ruby
[00:07:00] minimalism: has joined #ruby
[00:08:08] minimalism: has joined #ruby
[00:16:02] olivier__: has joined #ruby
[00:19:50] mjora7: has joined #ruby
[00:24:07] Guest96: has joined #ruby
[00:24:23] rodrigovlds: has joined #ruby
[00:25:56] olivier__: has joined #ruby
[00:26:31] milardovich: has joined #ruby
[00:28:29] gnufied: has joined #ruby
[00:29:35] cam27: has joined #ruby
[00:29:55] cam27: has left #ruby: ()
[00:32:47] soloscshaw: has joined #ruby
[00:32:52] bronson: has joined #ruby
[00:36:11] vondruch: has joined #ruby
[00:38:48] mooser: has joined #ruby
[00:40:51] vondruch: has joined #ruby
[00:42:49] olivier__: has joined #ruby
[00:49:32] DeeJayh: what's the norm for variables? I know at the end of the day preference is key, but I see some places using underscore_spacing and others use camelCase
[00:49:53] baweaver: In Ruby, underscore typically
[00:49:59] baweaver: In Javascript, camelCase.
[00:51:01] Kug3lis: has joined #ruby
[00:51:02] Trynemjoel: has joined #ruby
[00:52:30] Jameser: has joined #ruby
[00:53:30] havenwood: DeeJayh: snake_case for local_variables, methods, @instance_variables, etc, SCREAMING_SNAKE_CASE for CONSTANTS, CamelCase for Objects, Modules and Classes.
[00:53:50] havenwood: DeeJayh: Never ever headlessCamelCase, as it is an abomination.
[00:54:12] havenwood: CamelsWithHeads only.
[00:54:30] elomatreb: I propose iNVERTEDcAMELcASE
[00:54:52] t-recx: has joined #ruby
[00:55:00] Rubonnek: has joined #ruby
[00:56:05] vondruch: has joined #ruby
[00:56:07] Rubonnek: Is there a way to convert a string into an array to replace the object? I need something similar to array.replace, but I'm having trouble finding what I need.
[00:56:37] apeiros: Rubonnek: no
[00:56:55] apeiros: ruby is strongly typed. objects can't change their type.
[00:57:15] apeiros: you have to reassign if you want a different type
[00:57:22] Rubonnek: How can, then, change an underlying object that's a string?
[00:57:46] havenwood: Rubonnek: Give an example of what you have and what you want?
[00:57:47] apeiros: as said, you can't
[00:57:53] apeiros: you can create an array from a string
[00:58:00] apeiros: but you can't change a string into an array
[00:58:09] elomatreb: If you want to process a string character by character and get a string back, you usually split it into an array, map it, and glue it back together with join
[00:58:15] apeiros: >> x = "hi,there,people"; x = x.split(","); x
[00:58:16] ruby[bot]: apeiros: # => ["hi", "there", "people"] (https://eval.in/780917)
[01:02:32] Rubonnek: havenwood: Thanks, I just figured it out with what apeiros mentioned, but specifically I'm using the Xcodeproj gem, and the same method sometimes returns an array, or sometimes just a string.
[01:02:51] apeiros: oh, lovely
[01:03:09] Rubonnek: I was doing something like x = the.getter_method.here, and then x = [value1,value2]
[01:03:42] Rubonnek: I just tried using the.getter_method.here = [value1, value2] and it worked
[01:03:51] Rubonnek: apeiros: Thanks!
[01:04:03] Trynemjoel: has joined #ruby
[01:05:01] patr0clu1: has joined #ruby
[01:05:53] vondruch: has joined #ruby
[01:06:25] nowhereman: has joined #ruby
[01:08:12] olivier__: has joined #ruby
[01:26:31] DLSteve: has joined #ruby
[01:30:00] cyphase: has joined #ruby
[01:31:27] olivier__: has joined #ruby
[01:33:42] soloscshaw: has joined #ruby
[01:36:13] vondruch: has joined #ruby
[01:36:37] Trynemjoel: has joined #ruby
[01:38:46] gizmore: has joined #ruby
[01:40:55] vondruch: has joined #ruby
[01:43:00] Trynemjoel: has joined #ruby
[01:44:34] grymok: has joined #ruby
[01:49:10] charliesome: has joined #ruby
[01:49:26] olivier__: has joined #ruby
[01:50:04] hutch34: has joined #ruby
[01:51:21] bronson: has joined #ruby
[01:54:42] Kug3lis: has joined #ruby
[02:04:52] libastral: has joined #ruby
[02:12:15] mjora7: has joined #ruby
[02:15:19] Jameser: has joined #ruby
[02:15:23] olivier__: has joined #ruby
[02:16:24] itsautomatisch: has joined #ruby
[02:17:59] ResidentBiscuit: has joined #ruby
[02:20:23] genpaku: has joined #ruby
[02:25:13] KnownSyntax: has joined #ruby
[02:25:13] KnownSyntax: has joined #ruby
[02:29:11] olivier__: has joined #ruby
[02:34:19] soloscshaw: has joined #ruby
[02:34:33] shinnya: has joined #ruby
[02:39:48] astrobunny: has joined #ruby
[02:40:21] astrobunny: has joined #ruby
[02:47:08] minimalism: has joined #ruby
[02:50:50] pickle_: has joined #ruby
[02:51:09] vondruch: has joined #ruby
[02:54:04] agent_white: has joined #ruby
[02:55:54] vondruch: has joined #ruby
[02:57:25] olivier__: has joined #ruby
[03:04:03] Testerneedhelp: has joined #ruby
[03:04:11] Testerneedhelp: anyone available to help me out real quick
[03:04:18] Testerneedhelp: i am getting this error on a simple ruby script and cant see why
[03:04:27] Testerneedhelp: syntax error, unexpected end-of-input, expecting keyword_end
[03:04:52] ineb: you forgot an end statement somewhere
[03:05:08] Testerneedhelp: https://pastebin.com/kZwFC1za
[03:05:10] ruby[bot]: Testerneedhelp: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/fc859ee262cf17b05f63f85ec2866692
[03:05:10] ruby[bot]: Testerneedhelp: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:05:10] Testerneedhelp: this is the code
[03:05:32] Testerneedhelp: do you need to end if statements?
[03:05:34] Testerneedhelp: thats what it is..
[03:05:51] Testerneedhelp: adding another end produces similar results
[03:06:07] apeiros: Testerneedhelp: elsif
[03:06:09] apeiros: not else if
[03:06:09] vondruch: has joined #ruby
[03:06:34] apeiros: also for future reference, please add the error (as a separate file in the same gist preferably)
[03:06:45] olivier__: has joined #ruby
[03:06:45] ineb: and then end in line 20
[03:06:57] ineb: or line 21
[03:07:02] Testerneedhelp: after the for loop, right?
[03:07:06] Testerneedhelp: im using notepad to write this lol
[03:07:13] Testerneedhelp: i appreciate it
[03:07:23] ineb: you may use an editor with indent
[03:07:48] Testerneedhelp: i downloaded jetbrain's rubymine
[03:08:01] Testerneedhelp: but i just started all this today and it's some simple work for class, so i didnt feel like setting up the interpreter for rubymine
[03:08:03] Testerneedhelp: it seems very nice tho
[03:08:06] Testerneedhelp: phpstorm is fantastic
[03:10:08] apeiros: I think you have an off-by-one error in your code too
[03:10:11] apeiros: for i in 1...numbers.length do
[03:10:17] apeiros: will never iterate over index 0
[03:10:26] Testerneedhelp: im getting a new error here
[03:10:27] Testerneedhelp: https://gist.github.com/trevorlang94/78d02958501ee2e36653c0f39b85d743
[03:10:35] PorcoRex: has joined #ruby
[03:10:36] apeiros: idiomatic version:
[03:10:36] Testerneedhelp: something about gets interrupt
[03:10:48] vondruch: has joined #ruby
[03:10:57] apeiros: positives, negatives = numbers.partition { |v| v > 0 }
[03:11:19] Testerneedhelp: that one is over my head
[03:11:22] ineb: Testerneedhelp: press return after entering a value
[03:11:22] Testerneedhelp: ive never used partition
[03:11:37] Testerneedhelp: like type out "return"?
[03:11:41] Testerneedhelp: i was having al ot of trouble with this
[03:11:45] Testerneedhelp: i couldnt get the input stream to terminate
[03:11:49] Testerneedhelp: so far only ctrl+c works reliably
[03:11:56] Testerneedhelp: im using the cli thing from rubyinstaller.org
[03:12:01] ineb: no, if you bail out, your program exit like in your paste
[03:12:06] ineb: but it stops there
[03:12:13] ineb: its not an error.
[03:12:18] hndk: has joined #ruby
[03:12:19] ineb: you send an interrupt and the program stops
[03:12:30] Testerneedhelp: so that's the ctrl+c?
[03:12:35] Testerneedhelp: i was asking in non-ruby dev discords about this
[03:13:00] apeiros: ctrl-c is sighup, which terminates the app
[03:13:05] apeiros: ctrl-d is end-of-input
[03:13:15] Testerneedhelp: im doing ctrl-d
[03:13:18] Testerneedhelp: and it just types out ^D
[03:13:23] Testerneedhelp: and if I enter that it allows for more input
[03:13:33] apeiros: are you on windows? o0
[03:13:45] apeiros: good luck :-p
[03:13:47] Testerneedhelp: haha i shouldve known
[03:13:50] Testerneedhelp: a unix guy told me to use ctrl+d
[03:13:54] Testerneedhelp: well it's odd, ctrl+z seemed to work
[03:14:07] apeiros: no idea about windows, so can't help
[03:14:52] ineb: dont know about it either. if nothing helps, you can use an if statement to check for some arbitrary exit value
[03:15:16] Testerneedhelp: i tried doing that and having them type "end"
[03:15:35] PorcoRex: Are you trying to trap a signal? (not sure if trapping works in Windows?)
[03:15:41] charliesome: has joined #ruby
[03:15:42] ineb: nah you convert gets to int already in gets.to_i
[03:16:00] ineb: "end".to_i is 0
[03:16:07] Testerneedhelp: true, good point
[03:16:23] Testerneedhelp: 0 is useless in this example but the example asks for any 0 input not to be sorted to either array
[03:16:35] Testerneedhelp: it's odd how ctrl+z seemed to work but only certain times
[03:17:22] Testerneedhelp: what's funny to me is that my book didnt cover this at all
[03:17:27] Testerneedhelp: their example was literally a loop that just goes forever
[03:17:50] ineb: like apeiros said, ctrl+d is end-of-input
[03:19:06] Testerneedhelp: yes but on unix only correct?
[03:19:13] ineb: looks like it.
[03:19:20] Testerneedhelp: ye, it does nothing for me. win 10 here
[03:19:23] ineb: dont know :<
[03:19:31] Testerneedhelp: so. If I was to make it that a certain input terminates the stream
[03:19:35] Testerneedhelp: i supposed itd have to be numeric here
[03:19:43] Testerneedhelp: do i need to use "threads"? never used them.
[03:19:46] Testerneedhelp: http://stackoverflow.com/questions/9219280/terminating-loop-on-input
[03:19:55] Testerneedhelp: i found this and the response says threads are necessary
[03:20:09] PorcoRex: Testerneedhelp, what are you trying to do? (sorry, came late to the party).
[03:20:11] olivier__: has joined #ruby
[03:20:27] ineb: Testerneedhelp: no, break statement will get you out of a while
[03:21:08] vondruch: has joined #ruby
[03:22:40] ineb: oh wait, the answer is right. you have to use a thread
[03:23:41] Testerneedhelp: just this simple little assignment
[03:23:52] Testerneedhelp: i gotta take a variable size list of numbers
[03:23:59] Testerneedhelp: and seperate them from positive and negative into new arrays
[03:24:11] Trynemjoel: has joined #ruby
[03:24:13] Testerneedhelp: https://gist.github.com/trevorlang94/78d02958501ee2e36653c0f39b85d743
[03:24:20] Testerneedhelp: this is basically what i've got
[03:24:31] Testerneedhelp: having trouble with ending the input stream atm
[03:24:38] PorcoRex: Ok, but what about the iterrupt signals you were discussing?
[03:25:24] olivier__: has joined #ruby
[03:26:05] vondruch: has joined #ruby
[03:26:12] Testerneedhelp: im pretty sure that came from me using ctrl+c to try to end the stream
[03:26:21] Testerneedhelp: i dont know what the error means, this is the first time ive ever worked with ruby
[03:26:38] PorcoRex: Streams are usually ended by EOF, if I'm not mistaken'
[03:26:51] ineb: Testerneedhelp: https://paste.xinu.at/frXqu0/ruby this programs exit if you enter cyaa
[03:27:02] ineb: should return on windows by entering cyaa and press return
[03:27:07] Testerneedhelp: that is much simpler
[03:27:09] Testerneedhelp: yes lemme test this out
[03:27:47] PorcoRex: That's convenient. :)
[03:28:17] jenrzzz: has joined #ruby
[03:29:09] PorcoRex: In any case, I think CTRL+D is the correct way to end a stream (not EOF), unless I'm missing something: https://en.wikipedia.org/wiki/End-of-Transmission_character
[03:29:12] Testerneedhelp: why did they make it while( input = gets.chomp)
[03:29:17] Testerneedhelp: im on windows that's the caveat LOL
[03:29:25] Testerneedhelp: i had mine as gets.to_i
[03:29:38] Testerneedhelp: but that seems redudntant, i changed the to_i to be at where they assign the numbers to positive or negative
[03:30:30] vondruch: has joined #ruby
[03:30:31] ineb: gets is a method that lets the user enter a line
[03:30:36] PorcoRex: Testerneedhelp, you should be careful with to_i, because it will convert any string into a number. I.e. "asd".to_i #=> 0
[03:30:46] Testerneedhelp: im aware of both those things
[03:30:48] ineb: the result is a string that looks like "cyaa\n"
[03:30:49] PorcoRex: You may want to use Integer(string) instead.
[03:30:58] ineb: calling chomp on that string removes the \n
[03:31:00] Testerneedhelp: why would the input need the newline char chopped off?
[03:31:15] ineb: and calling to_i on a string returns an int
[03:31:19] Testerneedhelp: with edits based on the github you linked me, it runs, but it seems to be chopping off the first input
[03:31:31] Testerneedhelp: yea ineb but that's fine, the inputs are all supposed to be integers for this example anyways
[03:32:24] ineb: not for you
[03:32:30] ineb: since you need some special exit value
[03:32:45] ineb: could be a number though
[03:32:45] Testerneedhelp: ah ye, well, that's what I meant about moving the to_i
[03:32:49] enterprisey: has joined #ruby
[03:32:50] Testerneedhelp: lemme show you what I have now
[03:33:37] Testerneedhelp: https://gist.github.com/trevorlang94/13780569ed39421435a976488156b4c7
[03:33:51] Testerneedhelp: Right so, this is what I have now. I entered as inputs: 1, 2 ,3 , 0 , - 1, -2, -3 then cyaa
[03:34:02] Testerneedhelp: it seemed to work well and did not add 'cyaa' to the arrays of positives and negs
[03:34:07] Testerneedhelp: however the output did not have the 1
[03:34:43] Testerneedhelp: hm yes something isnt working here still
[03:35:02] Testerneedhelp: now i tried -2, 1, 2, 3, 0 , -3, -1
[03:35:04] PorcoRex: Is this class you're taking about Ruby or programming in general? Because that certainly doesn't look like mainstream Ruby code.
[03:35:12] Testerneedhelp: and it didnt sort -1 or -2
[03:35:12] soloscshaw: has joined #ruby
[03:35:20] Testerneedhelp: it's called "server-side scripting"
[03:35:31] Testerneedhelp: glosses over a bunch of stuff, it had us using AJAX instead of jquery or something like that lol
[03:36:05] PorcoRex: Ok. Let's see...
[03:36:05] vondruch: has joined #ruby
[03:36:24] Testerneedhelp: this is literally my first day working with ruby haha
[03:36:51] ineb: you are now experiencing the error that apeiros spotted a while ago
[03:37:09] ineb: regarding the first value gets lost
[03:37:16] Testerneedhelp: it's not just the first apparently
[03:37:25] PorcoRex: First you may want to lose the "index" variable and instead do: numbers << numer, or numbers.push(number).
[03:37:28] Testerneedhelp: the second time i tried a list of inputs it cut off two of them and it was sort of arbitrary
[03:38:02] PorcoRex: But that may not solve your problem though, let's see.
[03:38:07] ineb: your first and last value are ignored
[03:38:17] Testerneedhelp: youre right, it wasnt arbitary
[03:38:20] Testerneedhelp: it was first and last
[03:38:20] ineb: its not abritrar
[03:38:38] PorcoRex: So then, you have a range defined like 1...(n - 1).
[03:38:45] Testerneedhelp: the range needs to be
[03:39:02] Testerneedhelp: this may be a very dumb mistake
[03:39:04] PorcoRex: This will actually be equal to the range (1..(n - 2).
[03:39:30] Testerneedhelp: the for loop needed to run from 0 to length of array
[03:39:34] Testerneedhelp: im used to always -1 the length
[03:39:37] Testerneedhelp: thanks brother, the whole thing works now
[03:39:45] Testerneedhelp: just need to make a better exit code than "cyaa" and I'm all gravy
[03:39:48] Testerneedhelp: appreciate the help everybody
[03:40:26] PorcoRex: Sure. There's a lot to work on it though, in case you want to refactor.
[03:40:34] Testerneedhelp: What do you mean by that?
[03:40:49] vondruch: has joined #ruby
[03:40:57] PorcoRex: while and for is practically not used on mainstream Ruby code.
[03:41:08] Testerneedhelp: ah ye, I noticed that
[03:41:20] Testerneedhelp: the while loop is taken right outta the book i have
[03:42:25] ineb: nothing wrong with while
[03:43:50] TreyG: has joined #ruby
[03:44:17] Testerneedhelp: is the ruby equivalent for one of these 'until' loops?
[03:45:17] totimkopf: Testerneedhelp: yes
[03:46:47] Testerneedhelp: regardless all my stuff works for the night :D
[03:46:49] Testerneedhelp: thanks again everybody
[03:47:03] Testerneedhelp: as much of a bitch as developing can be, it's nice that we can all help eachother like this
[03:47:06] Testerneedhelp: streamlines the whole process A LOT
[03:48:41] PorcoRex: Have a good one.
[03:51:09] vondruch: has joined #ruby
[03:51:15] hutch34: has joined #ruby
[03:51:21] olivier__: has joined #ruby
[03:52:09] Trynemjoel: has joined #ruby
[03:52:44] nofxxx: Testerneedhelp, just 'loop do' but what's the case?
[03:53:00] nofxxx: loop and while trues are kinda last resort in ruby
[03:54:29] milardovich: has joined #ruby
[03:54:56] gix: has joined #ruby
[04:00:57] vondruch: has joined #ruby
[04:08:05] olivier__: has joined #ruby
[04:18:47] Guest96: has joined #ruby
[04:21:01] vondruch: has joined #ruby
[04:22:23] mjora7: has joined #ruby
[04:25:42] vondruch: has joined #ruby
[04:25:59] pickle_: has joined #ruby
[04:30:31] pickle_: has joined #ruby
[04:35:56] soloscshaw: has joined #ruby
[04:45:56] Channel6: has joined #ruby
[04:46:04] vondruch: has joined #ruby
[04:51:03] vondruch: has joined #ruby
[04:52:28] Jameser: has joined #ruby
[04:53:26] Testerneedhelp: @nofxxx it was a simple thing, broke a list of number into two seperate arrays
[04:53:30] TreyG: has joined #ruby
[04:53:32] Testerneedhelp: ill keep that in mind next time i work with this stuff
[05:03:04] olivier__: has joined #ruby
[05:12:29] enterprisey: has joined #ruby
[05:17:29] olivier__: has joined #ruby
[05:18:29] harfangk: has joined #ruby
[05:22:07] shinnya: has joined #ruby
[05:27:12] _whitelogger: has joined #ruby
[05:29:49] nobodyzxc: has joined #ruby
[05:30:04] jenrzzz: has joined #ruby
[05:34:07] j: has joined #ruby
[05:36:46] soloscshaw: has joined #ruby
[05:39:10] pickle_: has joined #ruby
[05:39:44] bloosi: has joined #ruby
[05:40:37] olivier__: has joined #ruby
[05:41:36] pickle_: has joined #ruby
[05:42:58] Guest30: has joined #ruby
[05:43:19] stupidsenpai: has joined #ruby
[05:43:21] xmbsee: hello all!
[05:43:34] xmbsee: how is everyone's morning going?
[05:44:08] pickle_: has joined #ruby
[05:45:06] PorcoRex: Kind of quiet.
[05:46:16] vondruch: has joined #ruby
[05:46:44] xmbsee: for sure, whats the most exciting feature of 3 (that is known), that you're most excited about?
[05:47:59] PorcoRex: Haven't been following it closely enough. I think string literals are frozen by default?
[05:50:13] xmbsee: they are, but do you think that the guilds are going to be the "lets-go" factor for the language?
[05:50:57] PorcoRex: What are the guilds?
[05:51:19] vondruch: has joined #ruby
[05:51:34] xmbsee: an improvement to the threading model: http://olivierlacan.com/posts/concurrency-in-ruby-3-with-guilds/
[05:52:09] hutch34: has joined #ruby
[05:54:49] PorcoRex: Interesting...
[05:56:12] vondruch: has joined #ruby
[05:57:06] sniffer: has joined #ruby
[05:59:11] pickle_: has joined #ruby
[06:03:48] olivier__: has joined #ruby
[06:04:15] milardovich: has joined #ruby
[06:04:27] DeeJayh: is there an include needed for https://ruby-doc.org/stdlib-1.9.3/libdoc/securerandom/rdoc/SecureRandom.html and is there a way to tell what that is for the future
[06:04:49] DeeJayh: error is uninitialized constant SecureRandom
[06:06:03] vondruch: has joined #ruby
[06:06:08] sniffer: has joined #ruby
[06:06:24] ozcanesen: has joined #ruby
[06:08:39] PorcoRex: DeeJayh, require "securerandom"
[06:08:48] mjora7: has joined #ruby
[06:11:12] vondruch: has joined #ruby
[06:15:41] vondruch: has joined #ruby
[06:18:47] nofxxxx: has joined #ruby
[06:26:54] olivier__: has joined #ruby
[06:28:52] benholley: has joined #ruby
[06:29:14] herbmillerjr: has joined #ruby
[06:30:02] tohuw: has joined #ruby
[06:30:15] tohuw: has joined #ruby
[06:31:03] vondruch: has joined #ruby
[06:31:54] jenrzzz: has joined #ruby
[06:31:54] jenrzzz: has joined #ruby
[06:32:45] sneakerhax: has joined #ruby
[06:34:49] imightbestupid12: has joined #ruby
[06:36:02] olivier__: has joined #ruby
[06:36:09] vondruch: has joined #ruby
[06:37:35] soloscshaw: has joined #ruby
[06:41:16] olivier__: has joined #ruby
[06:41:18] soulisson: has joined #ruby
[06:42:17] soulisson: Hi, I have a question about terminology. For a dictionary, a key is associate to a value?
[06:43:55] KnownSyntax: has joined #ruby
[06:43:55] KnownSyntax: has joined #ruby
[06:45:43] ResidentBiscuit: has joined #ruby
[06:49:50] djbkd: has joined #ruby
[06:51:00] nhhc: has joined #ruby
[06:53:11] Guest96: has joined #ruby
[06:55:45] djbkd: has joined #ruby
[06:55:55] vondruch: has joined #ruby
[06:59:27] baweaver: soulisson: Ruby doesn't have dictionaries, it has hashes.
[06:59:38] baweaver: but a key points to a value
[07:01:00] vondruch: has joined #ruby
[07:03:03] soulisson: baweaver, ok, so in english it's more correct to say, the value associated to the key?
[07:03:37] baweaver: {a: 1, b: 1}
[07:03:44] baweaver: same value, different key
[07:04:06] baweaver: so the value 1 is associated to both a and b, which is confusing.
[07:04:15] baweaver: a key is unique
[07:04:35] baweaver: Though really I think this veers into slightly pedantic territory.
[07:04:58] Qchmqs: has joined #ruby
[07:06:08] soulisson: baweaver, ok, thanks very much. I often a hard times expressing my thoughts :)
[07:06:10] vondruch: has joined #ruby
[07:10:47] vondruch: has joined #ruby
[07:14:29] Ishido: has joined #ruby
[07:16:37] charliesome: has joined #ruby
[07:18:07] olivier__: has joined #ruby
[07:19:20] bloosi: has joined #ruby
[07:23:17] cfec0b8d: has joined #ruby
[07:24:33] antgel: has joined #ruby
[07:25:42] SteenJobs: has joined #ruby
[07:31:51] olivier__: has joined #ruby
[07:32:47] jenrzzz: has joined #ruby
[07:36:50] Cohedrin: has joined #ruby
[07:38:16] soloscshaw: has joined #ruby
[07:41:05] olivier__: has joined #ruby
[07:41:53] ski4x7: has joined #ruby
[07:45:49] pickle_: has joined #ruby
[07:46:21] olivier__: has joined #ruby
[07:50:18] velu_aon[m]: has joined #ruby
[07:50:21] jonjits[m]: has joined #ruby
[07:50:32] pickle_: has joined #ruby
[07:51:18] shtirlic: has joined #ruby
[07:52:51] hutch34: has joined #ruby
[07:53:40] KevinMGranger: has joined #ruby
[07:53:47] jusa: has joined #ruby
[07:54:11] Ishido: has joined #ruby
[07:55:29] CloCkWeRX: has joined #ruby
[07:56:15] mjora7: has joined #ruby
[07:56:22] kent\n: has joined #ruby
[07:57:04] BackEndCoder: has joined #ruby
[07:58:07] G: has joined #ruby
[07:59:10] pickle_: has joined #ruby
[08:00:28] lxsameer: has joined #ruby
[08:01:23] _main_: has joined #ruby
[08:02:30] _main_: has joined #ruby
[08:04:18] olivier__: has joined #ruby
[08:05:55] soulcutter: has joined #ruby
[08:09:28] olivier__: has joined #ruby
[08:10:09] shinnya: has joined #ruby
[08:17:42] toretore: has joined #ruby
[08:18:14] olivier__: has joined #ruby
[08:23:26] olivier__: has joined #ruby
[08:24:34] conta: has joined #ruby
[08:27:14] gigetoo: has joined #ruby
[08:30:26] armyriad: has joined #ruby
[08:34:50] blackmesa: has joined #ruby
[08:36:43] unshadow: has joined #ruby
[08:39:10] soloscshaw: has joined #ruby
[08:39:45] galla: has joined #ruby
[08:39:53] galla: has left #ruby: ()
[08:44:05] Qommand0r: has joined #ruby
[08:44:43] Guest96: has joined #ruby
[08:44:52] soloscshaw: has joined #ruby
[08:46:22] olivier__: has joined #ruby
[08:50:24] Guest96: has joined #ruby
[08:53:22] Guest96: has joined #ruby
[09:01:14] dhollin3: has joined #ruby
[09:02:14] rgr: has joined #ruby
[09:04:40] olivier__: has joined #ruby
[09:07:35] milardovich: has joined #ruby
[09:10:10] rippa: has joined #ruby
[09:24:10] _whitelogger: has joined #ruby
[09:26:58] Sammichmaker: has joined #ruby
[09:30:38] TreyG: has joined #ruby
[09:30:59] biberu: has joined #ruby
[09:33:03] Cohedrin: has joined #ruby
[09:33:37] charliesome: has joined #ruby
[09:35:02] sepp2k: has joined #ruby
[09:36:38] deeznao: has joined #ruby
[09:40:39] deeznao: has left #ruby: ("Leaving")
[09:43:57] milardovich: has joined #ruby
[09:44:13] maxirater: has joined #ruby
[09:46:37] olivier__: has joined #ruby
[09:49:50] djbkd: has joined #ruby
[09:54:03] hutch34: has joined #ruby
[09:55:26] DeeJayh: winning_number = SecureRandom.random_number(0..36).to_s digest = OpenSSL::Digest.new('sha256') secret_key = SecureRandom.urlsafe_base64(nil, false) hash = OpenSSL::HMAC.hexdigest(digest, secret_key, winning_number)
[09:55:35] DeeJayh: rip, I'm going to pastebin that
[09:56:02] Antiarc: has joined #ruby
[09:56:21] DeeJayh: https://pastebin.com/J7HmYk5y
[09:56:23] ruby[bot]: DeeJayh: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d9cc734b9ed527b60347a27f7465998b
[09:56:23] ruby[bot]: DeeJayh: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[09:56:43] DeeJayh: oh, ok then, didnt know that was a thing. cool.
[09:57:52] DeeJayh: so, I am taking my winning number, and a randomly generated key, and getting a hash from that. what I'm having issues with is being able to take that back the other way, to be able to prove that the hash and key do in fact match the winning number
[09:58:26] xall: has joined #ruby
[09:59:59] DeeJayh: Nevermind, I'm a simple fool some times lol
[10:00:55] olivier__: has joined #ruby
[10:03:04] rhyselsmore: has joined #ruby
[10:03:08] yeticry: has joined #ruby
[10:14:28] olivier__: has joined #ruby
[10:15:42] bkxd: has joined #ruby
[10:20:35] milardovich: has joined #ruby
[10:21:28] sepp2k: has joined #ruby
[10:23:29] unshadow: It seems to not be in the docs, does anyone knows how to get the Fingerprint of an SSL Certificate ? (No the serial)
[10:23:32] olivier__: has joined #ruby
[10:24:55] sepp2k: has joined #ruby
[10:28:47] olivier__: has joined #ruby
[10:29:29] jenrzzz: has joined #ruby
[10:36:07] nhhc: has joined #ruby
[10:38:01] olivier__: has joined #ruby
[10:41:59] hndk: has joined #ruby
[10:47:36] Guest96: has joined #ruby
[10:50:36] rgtk: has joined #ruby
[10:51:56] olivier__: has joined #ruby
[11:01:11] olivier__: has joined #ruby
[11:07:28] bkxd: has joined #ruby
[11:10:56] Antiarc: has joined #ruby
[11:11:00] ivil: has joined #ruby
[11:12:33] ivil: i am also a hue-man. no suspicion to be had here.
[11:13:15] rgtk: has joined #ruby
[11:13:30] ledestin: has joined #ruby
[11:14:44] ikoma: has joined #ruby
[11:22:36] electrostat: has joined #ruby
[11:29:21] xall: has joined #ruby
[11:30:33] jenrzzz: has joined #ruby
[11:33:36] pppktz: has joined #ruby
[11:33:38] olivier__: has joined #ruby
[11:35:29] SteenJobs: has joined #ruby
[11:36:43] kith: has joined #ruby
[11:37:17] Guest96: has joined #ruby
[11:41:20] millerti: has joined #ruby
[11:42:44] SteenJobs: has joined #ruby
[11:42:58] olivier__: has joined #ruby
[11:46:26] charliesome: has joined #ruby
[11:46:30] aglorei: has joined #ruby
[11:51:48] djbkd: has joined #ruby
[11:54:19] rodrigovlds_: has joined #ruby
[11:54:38] bkxd: has joined #ruby
[11:54:56] hutch34: has joined #ruby
[11:55:34] ahrs: has joined #ruby
[11:57:45] cam27: has joined #ruby
[12:00:23] bkxd: has joined #ruby
[12:00:35] Guest96: has joined #ruby
[12:10:54] stupidsenpai: has joined #ruby
[12:10:55] imightbestupid12: has joined #ruby
[12:14:12] nowhereman: has joined #ruby
[12:14:59] olivier__: has joined #ruby
[12:15:11] moei: has joined #ruby
[12:21:05] ayonkhan: has joined #ruby
[12:27:14] bkxd: has joined #ruby
[12:29:28] robert_reilly: has joined #ruby
[12:30:03] ferr: has joined #ruby
[12:33:07] Lartza: has left #ruby: ("Leaving")
[12:36:18] MrBusiness: has joined #ruby
[12:38:13] bkxd: has joined #ruby
[12:39:16] hinbody_: has joined #ruby
[12:39:25] HoierM: has joined #ruby
[12:39:58] hinbody_: has joined #ruby
[12:41:02] hinbody: has joined #ruby
[12:42:56] olivier__: has joined #ruby
[12:44:14] stupidsenpai: has joined #ruby
[12:44:15] imightbestupid12: has joined #ruby
[12:45:33] kurajber: has joined #ruby
[12:48:42] oleo: has joined #ruby
[12:50:16] pilne: has joined #ruby
[12:50:20] Guest94210: has joined #ruby
[12:53:45] oleo: has joined #ruby
[12:54:15] Kug3lis: has joined #ruby
[12:55:05] Guest42648: has joined #ruby
[12:57:13] olivier__: has joined #ruby
[12:59:54] lxsameer: has joined #ruby
[13:01:44] ryan_notabot: has joined #ruby
[13:02:13] herbmillerjr: has joined #ruby
[13:03:14] ncthom91: has joined #ruby
[13:05:23] Kug3lis: has joined #ruby
[13:05:33] tomphp: has joined #ruby
[13:08:13] mikecmpbll: has joined #ruby
[13:09:06] cam27: has joined #ruby
[13:09:14] bkxd: has joined #ruby
[13:10:16] GodFather_: has joined #ruby
[13:10:56] olivier__: has joined #ruby
[13:14:04] newrubycoder: has joined #ruby
[13:16:36] govg: has joined #ruby
[13:16:47] gr33n7007h: has joined #ruby
[13:18:10] geroz: has joined #ruby
[13:24:05] olivier__: has joined #ruby
[13:29:53] foxxx0: has joined #ruby
[13:39:49] Jameser: has joined #ruby
[13:41:22] newrubycoder: does anyone know how i can be recursive based on array size, like if array.length is 10 i wanna be recursive 10 times?
[13:42:49] newrubycoder: https://gist.github.com/anonymous/452958f89c84d4d7ea09b9fde893b2b3
[13:43:01] newrubycoder: here is my sort code but it only does it 1 time
[13:44:35] griff: has joined #ruby
[13:45:41] olivier__: has joined #ruby
[13:52:20] nobodyzxc: it seems like you wanna do bubble sort recursively
[13:52:46] nobodyzxc: it need O(n^2)
[13:52:47] djbkd: has joined #ruby
[13:53:23] newrubycoder: what? im not very mathematical yet sorry
[13:54:15] pufflin: has joined #ruby
[13:54:29] nobodyzxc: it has done 10 times if its length is 10
[13:54:50] nobodyzxc: but you need do more in bubble sort
[13:55:39] newrubycoder: i mean 10 times 10 times
[13:55:50] newrubycoder: here is my code using loops isntead of recursion
[13:55:52] newrubycoder: https://gist.github.com/anonymous/920d4bf933c53e2340d1dd5fd0200f52
[13:56:01] hutch34: has joined #ruby
[13:56:13] mim1k: has joined #ruby
[13:56:20] newrubycoder: except that last line
[13:58:08] ivil: has left #ruby: ("ick!")
[13:59:16] nobodyzxc: you may need another recursive function
[13:59:56] soloscshaw: has joined #ruby
[14:00:14] griff: has joined #ruby
[14:00:25] SteenJobs: has joined #ruby
[14:03:17] pufflin: has left #ruby: ()
[14:04:13] mim1k: has joined #ruby
[14:06:39] marlinc: has joined #ruby
[14:07:50] marlinc: Can somebody help me debug an issue in Redmine? I know this is not the Redmine channel but I'm running into a problem with the API. I checked the source code to see what its doing but I don't really understand it as its Ruby. Maybe someone here would have a clue to what could be going on
[14:08:46] marlinc: I'm getting the following error https://gist.github.com/Marlinc/9d6877a5f34a56b70c3456e6bf8f61fe and this is were its going wrong http://www.redmine.org/projects/redmine/repository/annotate/trunk/app/models/member.rb#L95
[14:09:25] marlinc: I read that to_i is used to convert a string into integer which I don't think should work as its getting an array?
[14:09:49] houhoulis: has joined #ruby
[14:09:52] Papierkorb: marlinc: try passing that: "role_ids": [0, 8]
[14:10:28] Papierkorb: marlinc: you're passing a Hash, not an Array
[14:11:03] kent\n: has joined #ruby
[14:11:53] marlinc: Papierkorb, not sure, I'm a PHP develop, in PHP that's an array. I tried using [0, 8] as JSON but then it simply crashes like this NoMethodError (undefined method `to_i' for ["0", "0"]:Array):
[14:12:24] Papierkorb: marlinc: Force php to generate a proper JSON array, and not a JSON object
[14:13:50] marlinc: Papierkorb, well, it is. This is what's being sent {"membership":{"custom_fields":[],"user_id":167,"role_ids":[8]}}
[14:14:20] Papierkorb: The rails app receives this: Parameters: {"membership"=>{"user_id"=>"167", "role_ids"=>{"0"=>"8"}}, "project_id"=>"project-identifier"}
[14:14:27] kurajber: has joined #ruby
[14:14:35] Papierkorb: `"role_ids"=>{"0"=>"8"}` <- that is a JSON object, not an array
[14:15:00] marlinc: Yea looks like it, I though that was strange as well, not sure what could cause that to happen
[14:17:10] Papierkorb: marlinc: it is client-side, i.e., in your php script. You can verify what it actually sends over the wire using Wireshark or the like - If you're not encrypting the communication to redmine of course
[14:18:18] marlinc: Papierkorb, its encrypted, but thanks for verifying that its probably not Redmine. I'll try and see what the API client is actually doing
[14:18:54] olivier__: has joined #ruby
[14:19:10] Papierkorb: marlinc: Then output the serialized json string for verification, not that you start chasing a ghost ;)
[14:21:39] hutch34: has joined #ruby
[14:22:08] nobodyzxc: newrubycoder: https://gist.github.com/anonymous/b1300f3df669c58017b194e4004da7e0
[14:24:18] marlinc: Papierkorb, well, it wasn't being sent as JSON at all. It was simply sent as a form-urlencoded string
[14:24:23] marlinc: Now its working, thank you for checking
[14:26:55] newrubycoder: nobodyzxc ty!!!
[14:27:37] toretore: has joined #ruby
[14:27:57] olivier__: has joined #ruby
[14:32:31] jenrzzz: has joined #ruby
[14:32:31] jenrzzz: has joined #ruby
[14:37:48] olivier__: has joined #ruby
[14:37:49] xall: has joined #ruby
[14:38:50] Blaze_Boy: has joined #ruby
[14:41:53] c0mrade: has joined #ruby
[14:42:18] c0mrade: Gain access to my home server with a stardard user and show me watchu go :) ssh -p 9999 anonymous@www.instagramika.com password is: 123 DISCLAIMER: Illegal activities are forbidden on the server. I am not held responsible for any acts as such
[14:43:11] newrubycoder: is this spam or what? xD
[14:43:34] c0mrade: Why would it be?
[14:44:24] newrubycoder: not sure if you're a rubyist or not, kinda looked like advertising your own server over this one
[14:44:55] ryan_notabot: has joined #ruby
[14:45:05] c0mrade: It's a server I got home, not an enterprise class one.
[14:45:24] c0mrade: Not offering any services, asking people to root and compromise it, sort of like a challenge.
[14:46:34] itsautomatisch: has joined #ruby
[14:50:51] MacMeep: has joined #ruby
[14:51:45] rippa: has joined #ruby
[14:58:12] Blaze_Boy: has joined #ruby
[14:59:56] Blaze_Boy: has joined #ruby
[15:00:19] meshsmith: has joined #ruby
[15:00:42] olivier__: has joined #ruby
[15:00:44] soloscshaw: has joined #ruby
[15:01:46] SteenJobs: has joined #ruby
[15:07:10] fschuindt: has joined #ruby
[15:09:22] j2k: has joined #ruby
[15:10:34] jamesaxl: has joined #ruby
[15:12:36] olivier__: has joined #ruby
[15:12:51] minimalism: has joined #ruby
[15:12:52] ayonkhan: has joined #ruby
[15:17:43] sepp2k: has joined #ruby
[15:19:08] newrubycoder: nobodyzxc: i tried making it without another method, but i got stack overflow if i had too many elements lol
[15:33:12] psychicist__: has joined #ruby
[15:34:06] jenrzzz: has joined #ruby
[15:36:12] Guest96: has joined #ruby
[15:37:41] jusa: has joined #ruby
[15:40:37] olivier__: has joined #ruby
[15:41:24] [dmp]: has joined #ruby
[15:41:36] nobodyzxc: newrubycoder: you may need tail recursion , but i don't know if ruby support it...(opt)
[15:42:37] newrubycoder: well your code worked on a lot of elements
[15:43:04] newrubycoder: i had to do arr.length*arr.length, but if i used like 100 elements it overflowed
[15:44:55] xenops: has joined #ruby
[15:49:27] olivier__: has joined #ruby
[15:50:12] binaryplease: has joined #ruby
[15:50:37] electrostat: has joined #ruby
[15:54:14] vuoto: has joined #ruby
[15:54:39] Papierkorb: nobodyzxc: ruby can do TCO, but it's not on by default. and it's no easy task to turn it on either ;)
[15:54:41] djbkd: has joined #ruby
[15:56:28] steffes: has joined #ruby
[16:00:09] arquebus: has joined #ruby
[16:00:55] Guest96: has joined #ruby
[16:01:29] soloscshaw: has joined #ruby
[16:04:10] Guest30: has joined #ruby
[16:08:19] blackmesa: has joined #ruby
[16:11:46] SteenJobs: has joined #ruby
[16:12:09] KnownSyntax: has joined #ruby
[16:12:09] KnownSyntax: has joined #ruby
[16:12:44] yeticry_: has joined #ruby
[16:15:46] olivier__: has joined #ruby
[16:16:18] nobodyzxc: Papierkorb: got it , thx!
[16:16:45] mim1k: has joined #ruby
[16:19:02] Channel6: has joined #ruby
[16:19:20] mooser: has joined #ruby
[16:24:19] olivier__: has joined #ruby
[16:24:24] cerulean: has joined #ruby
[16:24:28] cerulean: can anyone help me fix this?
[16:24:30] cerulean: https://gist.github.com/mixflame/c1543e2aaed0c3f1667ea6b6566aa3a8
[16:24:34] cerulean: i really want git-deploy
[16:24:36] cerulean: but im stumped
[16:24:40] cerulean: diffie hellman p= what
[16:28:03] fschuindt: Folks, I am building a gem. I've set Redis as a dependency in .gemspec but my Configuration class is getting "uninitialized constant FirebaseIdToken::Configuration::Redis". Any tip? Source: https://github.com/fschuindt/firebase_id_token/blob/master/lib/firebase_id_token/configuration.rb
[16:31:29] jrafanie: has joined #ruby
[16:42:53] ineb: fschuindt: you are requiring redis anywhere?
[16:43:23] fschuindt: ineb: no, I thought that using it as a dependency was enough, thank you
[16:43:51] SteenJobs: has joined #ruby
[16:46:59] hutch34: has joined #ruby
[16:49:33] jamesaxl: has joined #ruby
[16:51:56] negatifze: has joined #ruby
[16:52:12] jamesaxl: has joined #ruby
[17:00:52] houhoulis: has joined #ruby
[17:02:11] soloscshaw: has joined #ruby
[17:08:52] cevett: has joined #ruby
[17:11:30] olivier__: has joined #ruby
[17:11:31] muelleme_: has joined #ruby
[17:11:33] xall: has joined #ruby
[17:11:56] tomphp: has joined #ruby
[17:17:14] nobodyzxc: has joined #ruby
[17:17:16] nobodyzx1: has joined #ruby
[17:19:18] nobodyzxc: has joined #ruby
[17:19:26] nobodyzx1: has joined #ruby
[17:21:09] kristofferR: has joined #ruby
[17:21:37] nowhereman: has joined #ruby
[17:30:28] acalycine: has joined #ruby
[17:31:09] jamesaxl: has joined #ruby
[17:32:18] maxirater: has joined #ruby
[17:34:36] millerti: has joined #ruby
[17:35:02] jenrzzz: has joined #ruby
[17:35:23] olivier__: has joined #ruby
[17:35:45] ddffg: has joined #ruby
[17:39:54] rgtk: has joined #ruby
[17:46:44] mooser: has joined #ruby
[17:47:02] Guest96: has joined #ruby
[17:48:48] olivier__: has joined #ruby
[17:48:55] hutch34: has joined #ruby
[17:49:28] Ishido: has joined #ruby
[17:49:42] raul782: has joined #ruby
[17:49:49] muelleme_: has joined #ruby
[17:52:13] wingwalker: has joined #ruby
[17:52:27] tomphp: has joined #ruby
[17:54:05] tomphp_: has joined #ruby
[17:56:49] gusrub: has joined #ruby
[17:57:03] djbkd: has joined #ruby
[17:58:18] nowhereman: has joined #ruby
[18:02:14] Guest96_: has joined #ruby
[18:03:00] soloscshaw: has joined #ruby
[18:07:11] unshadow: has joined #ruby
[18:09:17] newrubycoder: if the stack level gets too deep, can i just make another recursive method on top of that one again?
[18:11:13] cerulean: why does matz hate me
[18:11:58] A124: has joined #ruby
[18:12:37] cerulean: has left #ruby: ()
[18:13:00] catbusters: has joined #ruby
[18:15:29] Ishido: has joined #ruby
[18:17:51] jrafanie: has joined #ruby
[18:18:58] gusrub: has joined #ruby
[18:21:32] patr0clus: has joined #ruby
[18:31:45] tomphp: has joined #ruby
[18:32:22] hutch34: has joined #ruby
[18:36:08] maxirater: has joined #ruby
[18:36:38] jenrzzz: has joined #ruby
[18:36:38] jenrzzz: has joined #ruby
[18:39:38] olivier__: has joined #ruby
[18:41:03] yxhuvud: has joined #ruby
[18:41:06] Cohedrin: has joined #ruby
[18:43:16] skweek: has joined #ruby
[18:44:24] enterprisey: has joined #ruby
[18:48:44] olivier__: has joined #ruby
[18:54:17] olivier__: has joined #ruby
[18:56:22] cfec0b8d: has joined #ruby
[18:56:59] newrubycoder: has joined #ruby
[18:58:11] Vile`: has joined #ruby
[19:00:13] newrubycoder: ok i benchmarked my loop sorter and my recursive method sorter, and the recursive method one is about 20% faster, but it can only handle 5000 elements, the loop can handle a lot more cuz it doesnt overflow
[19:00:39] A124: has joined #ruby
[19:03:37] muelleme_: has joined #ruby
[19:03:45] soloscshaw: has joined #ruby
[19:04:09] minimalism: has joined #ruby
[19:05:21] rodrigovlds: has joined #ruby
[19:06:31] nobodyzxc: has joined #ruby
[19:08:55] milardovich: has joined #ruby
[19:09:49] ozcanesen: has joined #ruby
[19:10:39] olivier__: has joined #ruby
[19:11:39] ayonkhan_: has joined #ruby
[19:15:15] havenwood: newrubycoder: If you'd like you can enable TCO (Tail Call Optimization), you just have to disable the stack trace.
[19:15:35] havenwood: newrubycoder: Then your stack won't overflow.
[19:16:10] havenwood: newrubycoder: Here's my implementation of a require_relative that enables TCO for the required code: https://gist.github.com/havenwood/3c5a5e1476c811460992
[19:17:05] havenwood: newrubycoder: You technically can build Ruby with TCO enabled by default but it requires that you disable stack trace and that was considered not with it overall as a default.
[19:17:46] havenwood: newrubycoder: But even if you don't build it with TCO enabled, you can compile the instruction sequence yourself with :tailcall_optimization enabled.
[19:18:28] havenwood: newrubycoder: If you share your code we might have ideas on how to make the non-recursive version faster.
[19:19:41] blackmesa: has joined #ruby
[19:20:42] jamesaxl: has joined #ruby
[19:21:59] newrubycoder: havenwood here is my loop method: https://gist.github.com/anonymous/67c0467e46945d9fb174e60695854bea
[19:22:09] newrubycoder: i think TCO is a bit above my head atm xD
[19:22:50] soloscshaw: has joined #ruby
[19:23:41] ski7777: has joined #ruby
[19:24:06] havenwood: newrubycoder: `arr.length` is zero, so your code is currently doing `0.times`.
[19:24:16] havenwood: newrubycoder: And the loop never happens.
[19:24:51] newrubycoder: well it depends what i put into gets dont it?
[19:24:54] havenwood: ahh, right, gets
[19:24:59] havenwood: newrubycoder: it does, yeah
[19:27:28] newrubycoder: i know recursiveness and loops now, still struggle with iterations tho
[19:27:51] havenwood: newrubycoder: Nice. It's well worth learning the Enumerable methods, etc. Good stuff!
[19:28:44] tomphp: has joined #ruby
[19:30:32] JoshS: has joined #ruby
[19:36:21] SteenJobs: has joined #ruby
[19:36:52] patarr: has joined #ruby
[19:37:37] jenrzzz: has joined #ruby
[19:37:37] jenrzzz: has joined #ruby
[19:37:38] meshsmith: has joined #ruby
[19:44:13] futilegames: has joined #ruby
[19:45:46] milardovich: has joined #ruby
[19:45:56] olivier__: has joined #ruby
[19:46:14] patarr: has joined #ruby
[19:47:22] ayonkhan: has joined #ruby
[19:48:16] jrafanie: has joined #ruby
[19:50:15] segmond: has joined #ruby
[19:51:03] jamesaxl: has joined #ruby
[19:52:42] muelleme_: has joined #ruby
[19:53:22] futilegames: has joined #ruby
[19:57:32] Kug3lis: has joined #ruby
[20:00:20] ayonkhan: has joined #ruby
[20:00:34] jamesaxl: has joined #ruby
[20:00:45] futilegames: has left #ruby: ()
[20:00:50] patr0clus: has joined #ruby
[20:04:35] olivier__: has joined #ruby
[20:14:07] gusrub: has joined #ruby
[20:19:19] t-recx: has joined #ruby
[20:22:37] cfec0b8d: has joined #ruby
[20:24:07] millerti: has joined #ruby
[20:29:18] Channel6: has joined #ruby
[20:29:23] gusrub: has joined #ruby
[20:32:10] rgr_: has joined #ruby
[20:32:16] enterprisey: has joined #ruby
[20:36:19] gusrub: has joined #ruby
[20:45:48] olivier__: has joined #ruby
[20:48:47] ionte: has joined #ruby
[20:50:04] ledestin: has joined #ruby
[20:52:11] griff__: has joined #ruby
[20:52:56] marr: has joined #ruby
[20:53:18] millerti: has joined #ruby
[20:57:22] tAn: has joined #ruby
[20:59:14] mjora7: has joined #ruby
[20:59:16] djbkd: has joined #ruby
[20:59:30] mim1k: has joined #ruby
[21:00:30] rgtk: has joined #ruby
[21:01:10] mostlybadfly: has joined #ruby
[21:01:51] mooser: has joined #ruby
[21:10:23] pabloh: has joined #ruby
[21:13:05] tlaxkit: has joined #ruby
[21:13:41] olivier__: has joined #ruby
[21:15:35] mim1k: has joined #ruby
[21:15:55] kent\n: has joined #ruby
[21:18:39] jeffaustin81: has joined #ruby
[21:20:07] kent\n: has joined #ruby
[21:23:53] hutch34: has joined #ruby
[21:26:35] planigan: has joined #ruby
[21:27:03] Sambsquanch: has joined #ruby
[21:27:05] gusrub: has joined #ruby
[21:30:01] milardovich: has joined #ruby
[21:33:58] stupidsenpai: has joined #ruby
[21:33:59] imightbestupid12: has joined #ruby
[21:36:53] olivier__: has joined #ruby
[21:38:52] jenrzzz: has joined #ruby
[21:43:48] hutch34: has joined #ruby
[21:45:08] zapata: has joined #ruby
[21:46:57] jusa: has joined #ruby
[21:49:49] bkxd: has joined #ruby
[21:58:03] enterprisey: has joined #ruby
[21:59:38] mummusik: has joined #ruby
[21:59:48] mummusik: has left #ruby: ()
[22:00:01] olivier__: has joined #ruby
[22:00:18] mummusik: has joined #ruby
[22:02:02] mummusik: has left #ruby: ()
[22:02:25] minimalism: has joined #ruby
[22:02:27] Vircung: has joined #ruby
[22:02:49] houhoulis: has joined #ruby
[22:05:07] tAn: has joined #ruby
[22:05:24] olivier__: has joined #ruby
[22:15:45] beauby: has joined #ruby
[22:16:20] beauby: Hi - any way to use a named parameter named `class`?
[22:16:52] gusrub: has joined #ruby
[22:17:58] marcdel: has joined #ruby
[22:18:01] rhyselsmore: has joined #ruby
[22:19:00] olivier__: has joined #ruby
[22:19:30] rgtk: has joined #ruby
[22:22:34] unshadow: has joined #ruby
[22:24:28] djbkd: has joined #ruby
[22:27:53] vondruch: has joined #ruby
[22:31:12] gusrub: has joined #ruby
[22:32:37] olivier__: has joined #ruby
[22:39:11] padi_: has joined #ruby
[22:43:41] Kug3lis_: has joined #ruby
[22:58:32] enterprisey: has joined #ruby
[23:00:27] olivier__: has joined #ruby
[23:01:00] djbkd_: has joined #ruby
[23:02:37] m13io: has left #ruby: ()
[23:02:39] m13io: has joined #ruby
[23:04:42] Channel6: has joined #ruby
[23:08:24] bronson: has joined #ruby
[23:13:20] muelleme_: has joined #ruby
[23:14:05] olivier__: has joined #ruby
[23:14:53] rizonz: I don't know if this puppet related question can be asked here, can I remove the last part of a path ? so /foo/bar/candy becomes /foo/bar ?
[23:15:13] rizonz: I was thinking about splitting and then combine but taht is not ideal
[23:15:31] adam12: File.dirname("/foo/bar/candy")
[23:15:31] patarr: has joined #ruby
[23:15:43] hndk: has joined #ruby
[23:15:57] adam12: >> File.dirname("/foo/bar/candy")
[23:15:58] ruby[bot]: adam12: # => "/foo/bar" (https://eval.in/781431)
[23:16:23] rizonz: is that usable in a pupper manifestr ?
[23:16:26] rizonz: *manifest
[23:16:31] adam12: Good question - no idea. I'm not a Puppet user.
[23:16:38] adam12: Can you use arbitrary Ruby in a manifest? I'm assuming yes?
[23:16:45] rizonz: yes you can
[23:16:54] adam12: So File is in stdlib. I don't see why it wouldn't work.
[23:17:18] rizonz: adam12: yeah I remmeber something like it, but it was 3 months ago :)
[23:18:40] adam12: Pathname works too, if you feel so inclined.
[23:18:50] adam12: Pathname.new("/foo/bar/candy").parent
[23:19:00] adam12: But you'll need to require "pathname"
[23:19:18] rizonz: yes dirname is fine
[23:21:12] Cohedrin: has joined #ruby
[23:21:54] xco: has joined #ruby
[23:23:21] xco: hello. as far as i know “name” is not a keyword in Ruby. but my variable name “name” appears blue (other variables are not formatted) as if it were a class name in my Sublime text, any idea why?
[23:24:01] millerti: has joined #ruby
[23:27:02] itsautomatisch: has joined #ruby
[23:27:48] olivier__: has joined #ruby
[23:32:03] mjora7: has joined #ruby
[23:36:29] Jameser: has joined #ruby
[23:38:59] rgtk: has joined #ruby
[23:40:12] ahrs: has joined #ruby
[23:40:34] jenrzzz: has joined #ruby
[23:40:35] jenrzzz: has joined #ruby
[23:42:48] binaryplease: has joined #ruby
[23:47:31] binaryplease: has joined #ruby
[23:47:50] jusa: has joined #ruby
[23:47:55] rdw200169_: has joined #ruby
[23:51:16] mjora7: has joined #ruby
[23:53:27] fulgore_: has joined #ruby
[23:53:36] olivier__: has joined #ruby
[23:56:46] hashrocket: has joined #ruby
[23:57:16] cam27: has joined #ruby
[23:59:57] GSilva: has joined #ruby