Cohedrin has quit [Read error: Connection reset by peer]
olivi____ has joined #ruby
milardovich has joined #ruby
Cohedrin has joined #ruby
minimalism has joined #ruby
minimalism has quit [Client Quit]
minimalism has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
olivi____ has quit [Ping timeout: 255 seconds]
olivi____ has joined #ruby
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 240 seconds]
mjora7 has joined #ruby
iloveitaly has quit [Ping timeout: 240 seconds]
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
rodrigovlds has joined #ruby
olivi____ has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
milardovich has joined #ruby
gnufied has joined #ruby
cam27 has joined #ruby
cam27 has left #ruby [#ruby]
milardovich has quit [Ping timeout: 260 seconds]
soloscshaw has joined #ruby
bronson has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
soloscshaw has quit [Ping timeout: 268 seconds]
gnufied has quit [Ping timeout: 258 seconds]
mooser has joined #ruby
robert_reilly has quit [Quit: Head hit keyboard ZZZzzzZZZzzzz]
vondruch has quit [Client Quit]
vondruch has joined #ruby
olivi____ has quit [Ping timeout: 255 seconds]
olivi____ has joined #ruby
mooser has quit [Ping timeout: 240 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
Kug3lis has quit [Ping timeout: 252 seconds]
<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
<baweaver>
In Ruby, underscore typically
<baweaver>
In Javascript, camelCase.
dlitvak has quit [Quit: Connection closed for inactivity]
Kug3lis has joined #ruby
Trynemjoel has joined #ruby
olivi____ has quit [Ping timeout: 240 seconds]
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jameser has joined #ruby
hndk has quit [Quit: Leaving]
<havenwood>
DeeJayh: snake_case for local_variables, methods, @instance_variables, etc, SCREAMING_SNAKE_CASE for CONSTANTS, CamelCase for Objects, Modules and Classes.
<havenwood>
DeeJayh: Never ever headlessCamelCase, as it is an abomination.
<havenwood>
CamelsWithHeads only.
bronson has quit [Ping timeout: 260 seconds]
<elomatreb>
I propose iNVERTEDcAMELcASE
t-recx has joined #ruby
Rubonnek has joined #ruby
vondruch has quit [Quit: vondruch]
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
<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.
<apeiros>
Rubonnek: no
jameser has quit [Ping timeout: 240 seconds]
<apeiros>
ruby is strongly typed. objects can't change their type.
<apeiros>
you have to reassign if you want a different type
<Rubonnek>
How can, then, change an underlying object that's a string?
marxarelli|afk is now known as marxarelli
<havenwood>
Rubonnek: Give an example of what you have and what you want?
<apeiros>
as said, you can't
<apeiros>
you can create an array from a string
<apeiros>
but you can't change a string into an array
<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
<apeiros>
>> x = "hi,there,people"; x = x.split(","); x
<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.
<apeiros>
oh, lovely
<Rubonnek>
I was doing something like x = the.getter_method.here, and then x = [value1,value2]
<Rubonnek>
I just tried using the.getter_method.here = [value1, value2] and it worked
<Rubonnek>
apeiros: Thanks!
Trynemjoel has joined #ruby
patr0clu1 has joined #ruby
vondruch has quit [Quit: vondruch]
nowhereman has quit [Remote host closed the connection]
vondruch has joined #ruby
nowhereman has joined #ruby
oliv_____ has joined #ruby
patr0clus has quit [Ping timeout: 252 seconds]
oliv_____ has quit [Ping timeout: 240 seconds]
DLSteve has quit [Ping timeout: 260 seconds]
cfec0b8d has quit [Ping timeout: 260 seconds]
houhoulis has quit [Remote host closed the connection]
cyphase has quit [Ping timeout: 252 seconds]
DLSteve has joined #ruby
cyphase has joined #ruby
olivi____ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
soloscshaw has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
marxarelli is now known as marxarelli|afk
vondruch has quit [Quit: vondruch]
Robtop__ is now known as pwnd_nsfw
vondruch has joined #ruby
Trynemjoel has joined #ruby
gizmore has joined #ruby
soloscshaw has quit [Ping timeout: 260 seconds]
vondruch has quit [Client Quit]
Lucky_ABA has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
gizmore|2 has quit [Ping timeout: 258 seconds]
Trynemjoel has joined #ruby
grymok has joined #ruby
olivi____ has quit [Ping timeout: 258 seconds]
patr0clu1 has quit [Quit: WeeChat 1.4]
charliesome has joined #ruby
Kug3lis has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
bronson has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
Kug3lis has joined #ruby
olivi____ has quit [Ping timeout: 260 seconds]
grymok has quit [Ping timeout: 260 seconds]
libastral has quit [Ping timeout: 240 seconds]
libastral has joined #ruby
Rubonnek has quit [Quit: leaving]
mjora7 has joined #ruby
jameser has joined #ruby
oliv_____ has joined #ruby
itsautomatisch has joined #ruby
ResidentBiscuit has joined #ruby
genpaku has quit [Remote host closed the connection]
KnownSyntax has quit [Remote host closed the connection]
genpaku has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
oliv_____ has quit [Ping timeout: 268 seconds]
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
olivi____ has joined #ruby
soloscshaw has joined #ruby
shinnya has joined #ruby
olivi____ has quit [Ping timeout: 260 seconds]
soloscshaw has quit [Ping timeout: 255 seconds]
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
Guest56443 has quit [Ping timeout: 245 seconds]
astrobunny has quit [Ping timeout: 258 seconds]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Quit: minimalism]
minimalism has joined #ruby
vondruch has quit [Quit: vondruch]
pickle_ has joined #ruby
vondruch has joined #ruby
agent_white has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vondruch has quit [Client Quit]
vondruch has joined #ruby
oliv_____ has joined #ruby
t-recx has quit [Quit: t-recx]
Testerneedhelp has joined #ruby
<Testerneedhelp>
hello
<Testerneedhelp>
anyone available to help me out real quick
<Testerneedhelp>
i am getting this error on a simple ruby script and cant see why
<ruby[bot]>
DeeJayh: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<DeeJayh>
oh, ok then, didnt know that was a thing. cool.
<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
xall has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
<DeeJayh>
Nevermind, I'm a simple fool some times lol
olivi____ has quit [Ping timeout: 260 seconds]
olivi____ has joined #ruby
yeticry has quit [Ping timeout: 252 seconds]
rhyselsmore has joined #ruby
yeticry has joined #ruby
xall has quit [Ping timeout: 260 seconds]
rhyselsmore has quit [Client Quit]
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olivi____ has quit [Ping timeout: 260 seconds]
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
olivi____ has joined #ruby
bkxd has joined #ruby
cfec0b8d has quit [Ping timeout: 258 seconds]
olivi____ has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
milardovich has joined #ruby
sepp2k has joined #ruby
<unshadow>
It seems to not be in the docs, does anyone knows how to get the Fingerprint of an SSL Certificate ? (No the serial)
olivi____ has joined #ruby
sepp2k has quit [Client Quit]
sepp2k has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
olivi____ has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
jenrzzz has joined #ruby
nhhc has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
nhhc has joined #ruby
olivi____ has quit [Ping timeout: 260 seconds]
olivi____ has joined #ruby
hndk has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
Guest96 has quit [Remote host closed the connection]
olivi____ has quit [Ping timeout: 240 seconds]
Guest96 has joined #ruby
maxirater has quit [Quit: Leaving]
rgtk has joined #ruby
olivi____ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 258 seconds]
olivi____ has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
electrostat has quit [Quit: uwotm8]
Antiarc has quit [Quit: No Ping reply in 180 seconds.]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marlinc has joined #ruby
<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
kent\n has quit [Quit: No Ping reply in 180 seconds.]
<Papierkorb>
marlinc: you're passing a Hash, not an Array
kent\n has joined #ruby
<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):
<Papierkorb>
marlinc: Force php to generate a proper JSON array, and not a JSON object
<marlinc>
Papierkorb, well, it is. This is what's being sent {"membership":{"custom_fields":[],"user_id":167,"role_ids":[8]}}
<Papierkorb>
The rails app receives this: Parameters: {"membership"=>{"user_id"=>"167", "role_ids"=>{"0"=>"8"}}, "project_id"=>"project-identifier"}
kurajber has joined #ruby
<Papierkorb>
`"role_ids"=>{"0"=>"8"}` <- that is a JSON object, not an array
<marlinc>
Yea looks like it, I though that was strange as well, not sure what could cause that to happen
toretore has quit [Ping timeout: 260 seconds]
<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
<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
olivi____ has joined #ruby
<Papierkorb>
marlinc: Then output the serialized json string for verification, not that you start chasing a ghost ;)
<marlinc>
Papierkorb, well, it wasn't being sent as JSON at all. It was simply sent as a form-urlencoded string
<marlinc>
Now its working, thank you for checking
sepp2k has quit [Quit: Leaving.]
<newrubycoder>
nobodyzxc ty!!!
toretore has joined #ruby
olivi____ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
unshadow has quit [Quit: leaving]
olivi____ has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
xall has joined #ruby
Blaze_Boy has joined #ruby
c0mrade has joined #ruby
<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
<newrubycoder>
is this spam or what? xD
<c0mrade>
Nope.
<c0mrade>
Why would it be?
<newrubycoder>
not sure if you're a rubyist or not, kinda looked like advertising your own server over this one
ryan_notabot has quit [Read error: Connection reset by peer]
ryan_notabot has joined #ruby
<c0mrade>
It's a server I got home, not an enterprise class one.
<c0mrade>
Not offering any services, asking people to root and compromise it, sort of like a challenge.
<newrubycoder>
ah ok
itsautomatisch has joined #ruby
ryan_notabot has quit [Client Quit]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olivi____ has quit [Ping timeout: 240 seconds]
MacMeep has joined #ruby
rippa has joined #ruby
Blaze_Boy has quit [Quit: Blaze_Boy]
Blaze_Boy has joined #ruby
Blaze_Boy has quit [Client Quit]
Blaze_Boy has joined #ruby
meshsmith has joined #ruby
oliv_____ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
soloscshaw has joined #ruby
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
soloscshaw has quit [Ping timeout: 255 seconds]
fschuindt has joined #ruby
oliv_____ has quit [Ping timeout: 240 seconds]
MacMeep has quit [Quit: MacMeep]
jamesaxl has quit [Read error: Connection reset by peer]
j2k has joined #ruby
jamesaxl has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
oliv_____ has joined #ruby
minimalism has joined #ruby
ayonkhan has joined #ruby
Qchmqs has quit [Ping timeout: 268 seconds]
oliv_____ has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
<newrubycoder>
nobodyzxc: i tried making it without another method, but i got stack overflow if i had too many elements lol
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Blaze_Boy has quit [Quit: Blaze_Boy]
meshsmith has quit [Remote host closed the connection]
psychicist__ has joined #ruby
jenrzzz has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
jusa has joined #ruby
[dmp] has quit [Quit: WeeChat 1.3]
jenrzzz has quit [Ping timeout: 255 seconds]
rgtk has quit [Ping timeout: 240 seconds]
oliv_____ has joined #ruby
[dmp] has joined #ruby
<nobodyzxc>
newrubycoder: you may need tail recursion , but i don't know if ruby support it...(opt)
<newrubycoder>
well your code worked on a lot of elements
<newrubycoder>
i had to do arr.length*arr.length, but if i used like 100 elements it overflowed
xenops has joined #ruby
oliv_____ has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
olivi____ has joined #ruby
binaryplease has joined #ruby
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
vuoto has joined #ruby
<Papierkorb>
nobodyzxc: ruby can do TCO, but it's not on by default. and it's no easy task to turn it on either ;)
djbkd has joined #ruby
steffes has joined #ruby
biberu has quit []
steffes has quit [Client Quit]
djbkd has quit [Ping timeout: 240 seconds]
arquebus has joined #ruby
Guest96 has quit [Remote host closed the connection]
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: agent_white]
A124 has quit [Ping timeout: 240 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
tomphp has joined #ruby
hutch34 has joined #ruby
maxirater has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
rodrigovlds has quit [Ping timeout: 260 seconds]
oliv_____ has joined #ruby
Yxhuvud has quit [Remote host closed the connection]
JoshS has quit [Ping timeout: 252 seconds]
Yxhuvud has joined #ruby
Cohedrin has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
maxirater has quit [Quit: Leaving]
skweek has joined #ruby
oliv_____ has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
hndk has quit [Quit: Leaving]
olivi____ has joined #ruby
olivi____ has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
enterprisey has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
newrubycoder has joined #ruby
Vile` has joined #ruby
<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
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<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.
<havenwood>
newrubycoder: But even if you don't build it with TCO enabled, you can compile the instruction sequence yourself with :tailcall_optimization enabled.
<havenwood>
newrubycoder: If you share your code we might have ideas on how to make the non-recursive version faster.
milardovich has quit [Remote host closed the connection]
blackmesa has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
<adam12>
Good question - no idea. I'm not a Puppet user.
<adam12>
Can you use arbitrary Ruby in a manifest? I'm assuming yes?
<rizonz>
yes you can
<adam12>
So File is in stdlib. I don't see why it wouldn't work.
<rizonz>
adam12: yeah I remmeber something like it, but it was 3 months ago :)
<adam12>
Pathname works too, if you feel so inclined.
muelleme_ has quit [Ping timeout: 260 seconds]
<adam12>
Pathname.new("/foo/bar/candy").parent
<adam12>
But you'll need to require "pathname"
<rizonz>
yes dirname is fine
patarr has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
pppktz has quit [Read error: Connection reset by peer]
xco has joined #ruby
<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?
olivi____ has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patr0clus has quit [Read error: Connection reset by peer]
itsautomatisch has joined #ruby
oliv_____ has joined #ruby
toretore has quit [Ping timeout: 240 seconds]
mjora7 has joined #ruby
jameser has joined #ruby
rgtk has quit [Ping timeout: 255 seconds]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oliv_____ has quit [Ping timeout: 240 seconds]
binaryplease has quit [Quit: binaryplease]
rgtk has joined #ruby
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
binaryplease has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Sambsquanch has quit [Quit: Peace, take it easy.]
binaryplease has quit [Client Quit]
binaryplease has joined #ruby
rdw200169 has quit [Read error: Connection reset by peer]
jusa has joined #ruby
rdw200169_ has joined #ruby
mjora7 has quit [Read error: Connection reset by peer]
mjora7 has joined #ruby
jusa has quit [Ping timeout: 252 seconds]
fulgore_ has joined #ruby
olivi____ has joined #ruby
hashrocket has joined #ruby
cam27 has joined #ruby
Channel6 has quit [Quit: Leaving]
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]