capitainIsh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
c0mrad3 has quit [Quit: Connection closed for inactivity]
capitainIsh has joined #ruby
mweshi has quit [Max SendQ exceeded]
TPug has quit [Ping timeout: 250 seconds]
mweshi has joined #ruby
hahuang61 has joined #ruby
Derperperd has joined #ruby
solars has quit [Ping timeout: 244 seconds]
_djbkd has joined #ruby
ledestin has quit [Ping timeout: 258 seconds]
blackgoat has quit [Ping timeout: 240 seconds]
djbkd has quit [Read error: Connection reset by peer]
solars has joined #ruby
mweshi has quit [Ping timeout: 276 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackgoat has joined #ruby
solars has quit [Ping timeout: 240 seconds]
_djbkd has quit [Quit: My people need me...]
Rodya_ has quit [Ping timeout: 250 seconds]
memorasus has joined #ruby
Vingador has joined #ruby
Rodya_ has joined #ruby
solars has joined #ruby
A_Drone has joined #ruby
Torrone has quit [Quit: This computer has gone to sleep]
P_R_Deltoid has joined #ruby
hahuang61 has joined #ruby
<P_R_Deltoid>
If an object contains methods which change it's internal attributes, and I make a attr_reader/accessor for it, does it need to be an accessor to run the methods or can it be a reader only?
replay has quit []
nitric has quit [Ping timeout: 276 seconds]
A_Drone has quit [Ping timeout: 252 seconds]
<baweaver>
Do you have example code of that?
<P_R_Deltoid>
Hmmm. I think tha tmight be worded badly. Lets say I have an object A, which contains an object B, and object B contains a method called "change" which changes some internal attribute C in Object B to another value. When writing an accessor for Object B from Object A, does Object B need to be given a reader or accessor method
<P_R_Deltoid>
Err
<P_R_Deltoid>
Sure
<baweaver>
because a method is already callable unless it's private.
<baweaver>
Look into SimpleDelegator and Forwardable
<baweaver>
There are some tutorials in the wild, but essentially you're telling A that when it receives certain methods you want them to go to B instead
<baweaver>
or C or D or....
<baweaver>
though admittedly your example sounds like you're doing something fairly confounded.
<P_R_Deltoid>
Oh, I've been looking for something like that for a while for some other issues, but I don't think it quite answers my current question
<P_R_Deltoid>
Okay, I can use a real example I suppose
poguez_ has quit [Quit: Connection closed for inactivity]
<P_R_Deltoid>
I have a bot object, which contains a Messenger object which takes care of the Messenging code so the bot can send messages
<P_R_Deltoid>
So the messenger has one public method called "send_message"
<P_R_Deltoid>
I created a attr_accessor :messenger in my bot, but I am curious if, because I am only using methods and not actually "writing" anything, that I co uld just use attr_reader instead and keep it from being messed with
<baweaver>
yeah, you can
hahuang61 has quit [Ping timeout: 250 seconds]
nando293921 has joined #ruby
<baweaver>
since technically anything called on that it attributed to the messenger
<baweaver>
the reader is only pointing to the value, what you do with that value afterwards is none of its concern
dhollinger has joined #ruby
A_Drone has joined #ruby
Spami has joined #ruby
Spami has quit [Remote host closed the connection]
Es0teric has quit [Ping timeout: 276 seconds]
matp has quit [Ping timeout: 265 seconds]
Spami has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
<P_R_Deltoid>
That works
A_Drone has quit [Ping timeout: 252 seconds]
marr has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
poguez_ has joined #ruby
Es0teric has joined #ruby
the_rhizo2 has quit [Ping timeout: 260 seconds]
astrobun_ has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
Dimik has quit [Ping timeout: 250 seconds]
Lord_of_Life has quit [Excess Flood]
blackmesa has joined #ruby
Lord_of_Life has joined #ruby
davedev24 has quit []
blackmesa has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 258 seconds]
capitainIsh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts has quit [Quit: WeeChat 1.4]
capitainIsh has joined #ruby
GinoMan2440 has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 260 seconds]
zacts has joined #ruby
ruid has quit [Ping timeout: 265 seconds]
siaw23 has quit [Quit: siaw23]
rcvalle has quit [Quit: rcvalle]
blackgoat has quit [Read error: Connection reset by peer]
blackgoat has joined #ruby
ruid has joined #ruby
solars has quit [Ping timeout: 250 seconds]
jhack has joined #ruby
solars has joined #ruby
ruid has quit [Ping timeout: 244 seconds]
sneakerhax has joined #ruby
spudowiar has quit [Quit: Leaving.]
ftj has joined #ruby
joey has joined #ruby
joey has quit [Client Quit]
ftj has quit [Client Quit]
jhack has quit [Quit: jhack]
mikecmpbll has quit [Quit: inabit. zz.]
xaxisx has joined #ruby
dminuoso_ has joined #ruby
solars has quit [Ping timeout: 258 seconds]
dionysus69 has joined #ruby
arescorpio has joined #ruby
leea has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
dminuoso has quit [Ping timeout: 250 seconds]
rkazak has joined #ruby
Asher has quit [Quit: Leaving.]
jgt1 has quit [Ping timeout: 252 seconds]
Vingador_ has joined #ruby
Asher has joined #ruby
Vingador_ has quit [Remote host closed the connection]
Vingador_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Vingador has quit [Ping timeout: 240 seconds]
Mia has quit [Read error: Connection reset by peer]
Spami has joined #ruby
solars has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Kyhz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vingador_ has quit [Ping timeout: 240 seconds]
solars has quit [Ping timeout: 258 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
Vingador has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Vingador_ has joined #ruby
ruid has quit [Ping timeout: 250 seconds]
Vingador has quit [Ping timeout: 240 seconds]
Derperperd has quit [Quit: Derperperd]
Bugboy1028 has joined #ruby
ur5us_ has joined #ruby
Derperperd has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
Bugboy1028 has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
cyphase has quit [Ping timeout: 258 seconds]
creat has quit [Ping timeout: 258 seconds]
creat has joined #ruby
Bugboy1028 has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
dhollinger has quit [Quit: WeeChat 1.5]
Ropeney has joined #ruby
roflmyeggo has quit [Ping timeout: 260 seconds]
macsteps has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
jackjackdripper has quit [Quit: Leaving.]
Bugboy1028 has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
Derperperd has quit [Quit: Derperperd]
Bugboy1028 has joined #ruby
solars has joined #ruby
whathappens has joined #ruby
dunpeal has quit [Ping timeout: 260 seconds]
cyphase_eviltwin has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
LoneHermit has joined #ruby
sdwrage has joined #ruby
Bugboy1028 has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
blackgoat has quit [Ping timeout: 276 seconds]
whathappens has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
[narcan] has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
Bugboy1028 has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
patrick-sartent has quit [Ping timeout: 264 seconds]
dunpeal has joined #ruby
jhack has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
dhollinger has joined #ruby
jackjackdripper has joined #ruby
jhack has quit [Client Quit]
JoshGlzBrk has joined #ruby
JoshGlzBrk has quit [Client Quit]
jhack has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
rkazak has quit [Quit: Sleep.....ing....]
jhack has quit [Quit: jhack]
kobain has joined #ruby
AndrewIsHere has quit [Remote host closed the connection]
MackleToe has joined #ruby
xaxisx has quit [Remote host closed the connection]
Ropeney has quit [Remote host closed the connection]
atmosx has quit [Quit: rage rage against the dying of the light...]
karapetyan has quit [Remote host closed the connection]
<Jadz1a>
I solved the problem. just run "gem install iconv"
Jadz1a has quit [Quit: Leaving]
enyo_ has quit [Quit: leaving]
Cohedrin has quit [Client Quit]
Dimik has quit [Ping timeout: 258 seconds]
astrobun_ has quit [Read error: No route to host]
karapetyan has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
joonty has joined #ruby
chipotle has joined #ruby
craigp_ has quit [Ping timeout: 250 seconds]
drptbl has quit [Quit: See you later!]
marr has joined #ruby
atmosx has joined #ruby
astrobun_ has joined #ruby
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
Satyajit has joined #ruby
TheHodge has joined #ruby
iMadper`` has joined #ruby
iMadper` has quit [Ping timeout: 244 seconds]
tylersmith has quit [Ping timeout: 250 seconds]
tylersmith has joined #ruby
mim1k has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Remote host closed the connection]
mim1k has joined #ruby
yfeldblum has joined #ruby
aupadhye has quit [Ping timeout: 244 seconds]
Cohedrin has joined #ruby
siaw23 has joined #ruby
the_drow has joined #ruby
dionysus69 has joined #ruby
arrojo89 has joined #ruby
Cohedrin has quit [Client Quit]
j416 has quit [Ping timeout: 258 seconds]
j416 has joined #ruby
LoneHermit has quit [Remote host closed the connection]
c355e3b has joined #ruby
futilegames has joined #ruby
elaptics has quit [Ping timeout: 264 seconds]
Cohedrin has joined #ruby
futilegames has left #ruby [#ruby]
A_Drone has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 250 seconds]
A_Drone has joined #ruby
tylersmith has joined #ruby
flyingX has joined #ruby
Cohedrin has quit [Ping timeout: 244 seconds]
flying has quit [Ping timeout: 244 seconds]
aupadhye has joined #ruby
aupadhye has quit [Client Quit]
flyingX has quit [Remote host closed the connection]
aupadhye has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
flying has joined #ruby
mim1k has joined #ruby
dr0lan has joined #ruby
mim1k has quit [Ping timeout: 265 seconds]
craigp_ has joined #ruby
workmad3 has joined #ruby
qiukun has joined #ruby
<qiukun>
could i make Dir.glob(‘*’).select &File.method(:directory?) shorter?
<atmosx>
Hello, I have a ruby script which requires an API library. Is there a way to create a self-contained exec which would not require the ruby interpreter installed on the systems?
<zenspider>
there are a few libraries to package ruby + script together. I'm unfamiliar with Travelling Ruby, but should probably start there. :)
<zenspider>
it's from the phusion folk... so yeah
P_R_Deltoid has quit [Ping timeout: 240 seconds]
<mikecmpbll>
zenspider : i added your name as a highlight a while back because i wanted to ask you something. i've long since forgotten what the query was and now i can't remove the highlight
<hanmac>
"Tk is removed from stdlib" yeah one of my dreams become true XD
Koshian_ is now known as i_
i_ is now known as Koshian
joonty has quit [Quit: This computer has gone to sleep]
howdoi has quit [Quit: Connection closed for inactivity]
deniskozlov has joined #ruby
matrim has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leitz has joined #ruby
volix has joined #ruby
<leitz>
Working through Chapter 2 of "The Ruby Way" with Ruby 1.8.7. Section 2.1 isn't printing backspaces or bells, as far as I can tell.
<matrim>
how do I convert an unsigned byte value into signed byte? For example: 130 becomes -126
<leitz>
s6 = "Some backspaces: xyz\b\b\b" puts the entire line, including 'xyz'. THe bells "\a" don't ding.
yfeldblum has quit [Ping timeout: 258 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
<arrojo89>
hello everyone i need to run an application as root
<arrojo89>
but when i try to do sudo bundle install it doesn't work
<arrojo89>
i need to install all the gems for the root user to execute it as root
<leitz>
arrojo89, does it let you do anything as root? Does "sudo ls /root" work? It may not let you sudo. Or bundle might not be installed properly or inroot's path.
<arrojo89>
yes
<arrojo89>
i normally use sudo
<arrojo89>
i have some knowledge about linux sysadmin
<arrojo89>
maybe i got something wrong with bundle
<arrojo89>
i don't know
<arrojo89>
i installed years ago
<leitz>
sudo which bundle
Izabia has joined #ruby
Izabia has quit [Max SendQ exceeded]
siaw23 has quit [Quit: siaw23]
<leitz>
I know a little linux and less Ruby, so hopefully someone else will come along who knows more.
<arrojo89>
leitz, it gives me this /usr/local/bin/bundle
Torrone has joined #ruby
<leitz>
Have you tried to become root and run it manually? It might provide more errors.
<matrim>
anyone?
rodfersou has joined #ruby
<leitz>
matrim, Ilooked some on your question but came up short.
<jgt1>
I have `['foo', 'foo', 'bar']` and I want `[{ name: 'foo', count: 2 }, { name: 'bar', count: 1 }]`. Does Ruby already provide something for this? Or should I try knocking something together?
tildes has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
der-landgraf has quit [Ping timeout: 265 seconds]
matrim has quit [Ping timeout: 250 seconds]
LoneHermit has joined #ruby
matcouto has joined #ruby
joonty has joined #ruby
Heskie has joined #ruby
der-landgraf has joined #ruby
jaruga____ has joined #ruby
deniskozlov has quit [Ping timeout: 244 seconds]
Silthias has joined #ruby
futilegames has joined #ruby
blackgoat has quit [Quit: WeeChat 1.5]
GodFather has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
jaruga___ has quit [Read error: Connection reset by peer]
Silthias1 has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
jaruga____ has quit [Remote host closed the connection]
jaruga____ has joined #ruby
fergal has quit [Quit: fergal]
johnmilton has quit [Remote host closed the connection]
deniskozlov has joined #ruby
Sammichmaker has joined #ruby
futilegames has quit [Quit: futilegames]
devec0 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
hanmac has quit [Ping timeout: 258 seconds]
macsteps has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matp has quit [Ping timeout: 244 seconds]
macsteps has quit [Ping timeout: 244 seconds]
davidklsn has joined #ruby
pokalyis has joined #ruby
Heskie has quit []
futilegames has joined #ruby
dionysus69 has quit [Remote host closed the connection]
leftpad has joined #ruby
abhinav has joined #ruby
<abhinav>
hi
<abhinav>
if i have a string in format a_b_c where number of "_" are unknown and can vary, how do i split the string to delete everything after "last" underscore in
<abhinav>
ruby?
pwnd_nsfw has joined #ruby
dionysus69 has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
Pupeno has quit [Remote host closed the connection]
<dminuoso>
!crosspost abhinav
<dminuoso>
!crosspost
<dminuoso>
?crosspost
<ruby[bot]>
Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
aryaching has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<abhinav>
mentioning provided suggestions and their outcome in all channels = nil. hence....
<dminuoso>
abhinav: You barely waited 2 minutes and immediately hopped in here.
anuxivm has joined #ruby
<dminuoso>
abhinav: The point is, 10 minutes later someone here might spend their time trying to solve your problem, unaware that itm ight have been solved somewhere else.
<Dysp>
Hi there. I believe I have had somewhat of an procedural approach to programming and trying to become more OO. Now; I have some data in a normal array. I want to convert this data into "MyArray" class, so I can run methods specific for this subtype of array.
<Dysp>
Should I simply do it as a module that expands on the original array-class? Should I create a new class MyArray that inherits from Array?
jaruga____ has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
selceeus has joined #ruby
adam12 is now known as adam
adam is now known as Guest49086
ec\ has quit [Ping timeout: 260 seconds]
ec\ has joined #ruby
mim1k has quit [Ping timeout: 258 seconds]
devec0 has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby
AndrewIsHere has joined #ruby
GinoMan2440__ has quit [Ping timeout: 250 seconds]
AndrewIsHere has quit [Ping timeout: 252 seconds]
dn5 has joined #ruby
blaxter has joined #ruby
jaruga___ has quit [Remote host closed the connection]
LoneHermit has joined #ruby
jaruga___ has joined #ruby
johnmilton has joined #ruby
A_Drone has quit [Remote host closed the connection]
<Bish>
Dysp: you should always wrap base-classes, not inherit from them
<Dysp>
Can you elaborate a little further on that?
binaryplease1 has joined #ruby
<Dysp>
What do you mean by wrapping?
tyang has joined #ruby
<Bish>
instead of doing "class MyArray < Array"
blackmesa has joined #ruby
<Bish>
you could just make a class, which has the same methods as arrays, it looks like a "childclass" and acts like one, but isn't and therefore more flexible
<Bish>
thanks to rubys [] == etc being methods, that is easily possible
Heskie has quit []
<Dysp>
I don't understand how to make a class that inherits methods from Array, without letting it inherit?
<Bish>
well by hand
<mikecmpbll>
"you should always" is a little prescriptive ;)
<Bish>
mikecmpbll: i would've added that yeah
LoneHermit has quit [Ping timeout: 264 seconds]
<Dysp>
I am too much of a newbie to get into discussions. Just trying to learn basics.
<Dysp>
So saying "should always" is totally fine.
binaryplease has quit [Ping timeout: 276 seconds]
<Bish>
all of that is opinion, you CAN inherit from array, it will work, and work as intended
jishankai has quit [Ping timeout: 244 seconds]
minimalism has quit [Quit: minimalism]
<Dysp>
Yeah, but I don't want to invent the wheel over again; hence why I ask.
Mia has quit [Read error: Connection reset by peer]
<Dysp>
I'll much rather feed on your painful experience than going through it myself ^^
<Bish>
i never had painful experience with inheriting from hash, but yet, wrapping feels cleaner
<Dysp>
In learning how to program I mean
Heskie has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Heskie has quit [Client Quit]
lapinferoce has joined #ruby
soLucien has joined #ruby
<soLucien>
is there an alternative easier notation for :some_val.to_s == "some_val" ?
<soLucien>
i just hate the fact that :some_val == "some_val" is false
<Dysp>
Uh! I know this! I know something :D
<Dysp>
Please correct me if wrong; but is'nt it because strings are different 'objects' even though their content are the same?
<Dysp>
And a symbol will always be the same, if the 'content'
binaryplease1 is now known as binaryplease
<Dysp>
is the same, meaning the name of the symbol.
<Dysp>
I believe you could use === instead?
<dminuoso>
Dysp: A string is just a a number with a string representation.
<dminuoso>
err
<dminuoso>
A symbols is just a number with a string rerpesentation.
<Dysp>
I mean, couldn't :some_val === "some_val" work?
<dminuoso>
soLucien: Depends on the context. Some containers in rails are a big fan of "indifferent access" (which is nasty)
synthroid has joined #ruby
<dminuoso>
Dysp: No.
<Dysp>
Alright. I'll be quiet then :)
blaxter has quit [Quit: foo]
<dminuoso>
Dysp: === is the operator used by case
<soLucien>
this is not rails, it's vagrant
<soLucien>
ok so i am stuck with doing this over and over
<Bish>
look at that code from the dude whichs code i admire
govg has quit [Ping timeout: 276 seconds]
<Bish>
he needed a thread-safe cache, and just wrote a class for that which is easily exchangeable and without sideeffects
<Bish>
simple as f and working
<Dysp>
It's too complex for me to understand, unfortunately
<Bish>
well explained version is, he just wrote a class which 2 methods which send the same calls to a map
<dminuoso>
Dysp: Don't think of symbols as "strings" - think of them as numbers.
<Bish>
he just adds mutexes, so they won't break as soon as they're accessed from 2 points at the "same" time
<dminuoso>
Suddenly it becomes obvious that "foo" is not the same as 0x71278592 :)
<Dysp>
I don't. I think of them of very unique containers of letters.
<Dysp>
^^
aryaching has quit [Ping timeout: 260 seconds]
<dminuoso>
Dysp: They are just numbers. It's the whole point of symbols.
fmcgeough has joined #ruby
<Dysp>
Yeah, I think that is what I do understand. I just have a hard time expressing myself in the correct programming terms.
<dminuoso>
Dysp: As I said: A symbol is just a number with a string representation. Their main purpose comes from the fact that they are numbers - having Ruby treat them as "strings" just because people keep mixing strings and symbols would negate that. :)
ebbflowgo has joined #ruby
JakFrist has joined #ruby
der-landgraf has quit [Ping timeout: 250 seconds]
colegatron_origi has quit [Ping timeout: 276 seconds]
selceeus has quit [Ping timeout: 244 seconds]
<Dysp>
My understanding with my words: hello = "hello", hello2 = "hello" are not the same objects. hello = :hello, hello2 = :hello are the same objects. No?
<Bish>
thats basicially it, yes
<dminuoso>
Dysp: Yeah.
<Dysp>
I am going to celebrate understanding something :D
<Bish>
and keep in mind they're also faster than strings, then there is all there is to it
<Dysp>
Yes, I've actually adopted the use of symbols pretty well
<Bish>
"string1" == "string2" will be executed much slower than :string1 == :string2
<Dysp>
My biggest issue with programming right now is understanding how to organize everything.
<Bish>
Dysp: and it always will be ;)
<Dysp>
How things should be divided into classes or modules and .. jebus.
<Bish>
when i sit down to write a program, i first write a console, and imagine how i want to use it
<Bish>
things that are seperated from each other mostly get their own class then
<Dysp>
How much experience do you have?
Vingador has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Bish>
not enough, you can never have enough
<Dysp>
But, how long have you been programming for?
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
<Dysp>
It's so extremely hard to learn. I tried to pick it up from scratch 4-5 months ago without any prior knowledge whatsoever - as a 28 year old. It's really hard to learn.
<Bish>
im programming since i am 8, but i am a slow learner, im 26 now
<Dysp>
But I bet it still comes more natural to you because you got it in as a child. It's like learning to speak a foreign language.
sergio_101 has joined #ruby
<Dysp>
I had to watch lectures in the beginning describing programming for complete newbies. "What is a function?", "What is a variable?" and so on.
<Bish>
you cannot phrase it like that, since as you say it's much about organizing stuff, you can have all the grammar you want, but that doesn't make you a programmer
<Bish>
it's like saying "you speak english, you should be able to write a good book"
<Dysp>
Oh, Bish, a language is so much more than just the grammar.
<Bish>
yeah, that was just a metaphor
tlaxkit has joined #ruby
nofxx has joined #ruby
<Bish>
doing it for a long time just helps me understanding the internals, not to do it better
<Dysp>
I think we are on the same page. Programming is like writing a novelle in another language. Even if you learn the language, you still have to learn how to write a proper novelle.
tyang has quit [Quit: Leaving]
Rodya_ has joined #ruby
mim1k has joined #ruby
siaw23 has joined #ruby
<Dysp>
True, but practice makes perfect. And since you know 'the language' you can focus on writing the damn novel. I have to learn the language AND write the novel at the same time :p
Rodya_ has quit [Remote host closed the connection]
<Bish>
well, then ruby is your best friends, because it comes closest to real language
<Bish>
like do "something" if 3>2
<Dysp>
And that is the reason I picked it :D
<Dysp>
I wonder what people in here are working on, actually. They are so talented.
<Dysp>
I hope your skills come to good use
<Bish>
im writing a webapp right now, which has a lot of javascript inside the browser of the "customer"
<Bish>
and on the server side, there is ruby
swills has quit [Quit: Leaving]
<Dysp>
Sure, but in what field?
<Dysp>
Selling stuff online? Doing whaT?
<Dysp>
Without spilling the beans of course
oqui has joined #ruby
<Bish>
well, it's a webapplication not website, so it does something more complex for the customer
<Bish>
don't want to go in detail to much in public :3
<Dysp>
Is it your idea?
<Bish>
nope
<Dysp>
Are you working alone on it?
<Dysp>
Alright
tyang has joined #ruby
<Bish>
i get paid for that, and we just employed a second guy
<Bish>
but that is actually offtopic ;)
<Dysp>
Indeed
tvw has joined #ruby
ebbflowgo has left #ruby [#ruby]
<oqui>
hello, a fairly new to ruby on rails. I've a challenge understanding a certain piece of code and it's about the "self" keyword. I've read that self can to used to refer to the current object (like this in java) and also in method definition when creating static methods. However, Idon't seem to relate this knowldge with this piece of code; def process_request
<oqui>
begin
<oqui>
self.send(@method)
<oqui>
rescue Exception => e
<oqui>
error = { code: 1, message: e.message }
<oqui>
@errors = Array.new << error
<oqui>
render 'error.xml.builder'
abhinav has quit [Quit: leaving]
<oqui>
end
<oqui>
end
<Dysp>
Oh hi there, oqui
<Dysp>
Before you awaken the anger of people in here
<oqui>
Dysp: hi.
<Dysp>
Don't ever paste code like that. Use gist for more than 3 lines of code. https://gist.github.com/
<oqui>
okay
<Dysp>
Secondly, this is the Ruby channel and Ruby is much more than just rails.
<oqui>
I could use pastebin or similar service as well I hope
<Dysp>
So asking Rails related questions in here isn't the best place.
ChiefAlexander has joined #ruby
<Dysp>
They prefer gist. Less ads or something.
<dminuoso>
oqui: ?rails
tvw has quit [Client Quit]
<dminuoso>
?rails
<ruby[bot]>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<oqui>
dminuoso: it's ruby. Although sometimes its tricky for me to differentiate between framework code and pure ruby code.
<oqui>
so how can one explain this piece of ruby code " self.send(@method)"
<dminuoso>
oqui: obj.method is the same as obj.send(:method)
<dminuoso>
oqui: Im guessing that @method contains a symbol, so that code dynamically invokes a method.
<dminuoso>
oqui: Also note that Ruby has no notion of "static methods"
<Yxhuvud>
also that code is silly. Array.new << error instead of [error]
bruno has joined #ruby
bruno is now known as Guest81128
<Guest81128>
hi
<oqui>
dminuoso: so self.send(@method) is the same as self.method? Am struggling to understand what this code is really doing.
Hyuk has joined #ruby
<dminuoso>
oqui: Yes.
Rodya_ has joined #ruby
<dminuoso>
oqui: Well no.
<dminuoso>
oqui: self.method is the same as self.send(:method)
<dminuoso>
oqui: Whether that is the same as self.send(@method) depends on the contents of @method ;-)
<oqui>
dminuoso: okay there's this line in the code that parses certain fields of an xml requested posted via post method >> @method = @params['request']['cmd']
<Dysp>
Be aware that the parentheses are omitted here: k.send :hello, "gentle", "readers" #=> "Hello gentle readers"
<Dysp>
k.send(:hello) is the same as k.send :hello
<Yxhuvud>
oqui: so you have a remote code execution exploit at your hands. nice.
malconis has quit [Remote host closed the connection]
<dminuoso>
upvoted instead.
<dminuoso>
:S
<dminuoso>
?crosspost
<ruby[bot]>
Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<dminuoso>
siaw23 ^-
alfiemax has quit [Ping timeout: 244 seconds]
malconis has joined #ruby
aegis3121 has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest81128 is now known as BDuarte
Nil__ has quit [Quit: leaving]
<BDuarte>
hi
Pupeno has joined #ruby
ramfjord has joined #ruby
ramortegui has joined #ruby
aegis3121 has quit [Ping timeout: 240 seconds]
<BDuarte>
/n
JakFrist has joined #ruby
<siaw23>
dminuoso: thanks :)
ramfjord has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
AzureStigma has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
dminuoso has quit [Ping timeout: 250 seconds]
der-landgraf has joined #ruby
nocd has quit [Ping timeout: 265 seconds]
macsteps has joined #ruby
mim1k has quit [Ping timeout: 264 seconds]
nebg has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anuxivm has quit [Read error: Connection reset by peer]
nocd has joined #ruby
tlaxkit has quit [Quit: tlaxkit]
dminuoso has joined #ruby
macsteps has quit [Ping timeout: 250 seconds]
topolinux has joined #ruby
mim1k has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
<ruby-lang295>
Hi! I'm trying to build my first web application using Sinatra, and I ran into this error: "undefined method `adapter' for #<Hash:0x000000013f50d8> (NoMethodError)"
<ruby-lang295>
what I'm trying to do is the following:
<xapak>
Do you know the best way to hijack Rake default “release” task? We don’t have a Rubygems server, so I’d like it to do all the git tagging and pushing, without it attempting to upload it to Rubygems.
etehtsea has joined #ruby
AnFin has joined #ruby
govg has joined #ruby
c_nick has joined #ruby
hahuang61 has joined #ruby
<c_nick>
Hi All.. can someone suggest a good project management tool like Jira which is open source and good to use..
mcqr has quit [Quit: WeeChat 1.4]
JakFrist has joined #ruby
<dminuoso>
c_nick: I have yet to find a tool that is as great as jira but open source.
<mim1k>
I've used redmine a couple of times, really dated but it does the job
Pupeno has joined #ruby
ruby-lang295 has quit [Quit: Page closed]
cdnchris has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
<dminuoso>
c_nick: Note that Jira is really cheap (10 bucks!) for 10 users, and for free for students/open source projects afaik.
ftj has joined #ruby
flashpoint9 has joined #ruby
<mim1k>
dminuoso: sub model? $10p per month?
<dminuoso>
mim1k: No, 10$ once.
aupadhye has quit [Ping timeout: 276 seconds]
giz|work has joined #ruby
<mim1k>
oh sweet, that's actually not bad
<dminuoso>
mim1k: Indeed, and confluence/stash have the same price models.
<dminuoso>
(So for the stack of three you just end up paying $30 if you have less than 10 users or are not an open source project)
pawnbox has joined #ruby
<mim1k>
Suprised it isn't more, assuming its hosted by atlassian
<dminuoso>
mim1k: If its hosted you pay $100 annually.
<dminuoso>
or $10 monthly
<dminuoso>
But if you do software development, chances are you have a server lying around *somewhere*. ;-)
DaniG2k has joined #ruby
<xapak>
x'D
karapetyan has quit [Remote host closed the connection]
teclator has joined #ruby
<mim1k>
ah yeah I have a couple of cheap boxes *somewhere*
hutch34 has joined #ruby
Guest38_ has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
<mim1k>
dminuoso: you should ask atlassian for commission, think I'll pick up a license at that price
kedare has quit [Quit: Leaving]
mark_66 has quit [Remote host closed the connection]
xapak has left #ruby [#ruby]
Pupeno has quit [Remote host closed the connection]
<mim1k>
I'd love if they provided some metrics on how many people use JIRA/Confluence but completely avoid bitbucket
<c_nick>
thanks dminuoso
AzureStigma is now known as AzureStigma|Away
blackmesa has quit [Ping timeout: 260 seconds]
Vingador has quit [Remote host closed the connection]
AzureStigma|Away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso>
mim1k: Funny story, it was actually really annoying that it was so cheap. Charging the company credit card with 10 USD (diff currency ugh!) was really annoying when the financing department took a look. If we had charged it with some 4-5 figures, they wouldn't have bothered us at all.
DaniG2k has quit [Quit: leaving]
tenderlove has quit [Remote host closed the connection]
cajone has quit [Remote host closed the connection]
synthroid has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
Torrone has quit [Quit: This computer has gone to sleep]
synthroi_ has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
jackjackdripper has joined #ruby
<mim1k>
dminuoso: Typical
karapetyan has joined #ruby
<mim1k>
why is the two companies I've worked at both use an unsupported version of Ruby ha
synthroid has quit [Ping timeout: 265 seconds]
<mim1k>
sigh and these services have 0 test coverage, welp
cajone has joined #ruby
the_drow has joined #ruby
cajone has quit [Remote host closed the connection]
hahuang61 has joined #ruby
symm- has joined #ruby
AnoHito has joined #ruby
terlar has quit [Ping timeout: 265 seconds]
Rodya_ has quit [Remote host closed the connection]
zacts has joined #ruby
<darix>
c_nick: gitlab works well.
tomphp has quit [Ping timeout: 250 seconds]
<darix>
c_nick: but it depends on how much project management you need. issue tracking and stuff is there.
bluOxigen has quit [Ping timeout: 264 seconds]
bluOxigen has joined #ruby
cajone has joined #ruby
giz|work has quit [Ping timeout: 276 seconds]
memorasus has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
andikr has quit [Remote host closed the connection]
Torrone has joined #ruby
<AnFin>
@me has joined
<c_nick>
darix: schedule management and scope management
<c_nick>
basically like Jira
<c_nick>
I will have a look at gitlab
<c_nick>
thanks :)
the_drow has quit [Quit: Leaving]
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
<moparisthebest>
does anyone know of a pure ruby scrypt implementation?
QORRiE has joined #ruby
jackjackdripper has joined #ruby
cdg has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
Rodya_ has joined #ruby
antgel has quit [Ping timeout: 258 seconds]
AndrewIsHere has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
<mikecmpbll>
we use gitlab CE and are really impressed with it
<mikecmpbll>
chose it because of the built in CI features, which are awesome.
<mikecmpbll>
was straightforward to set up.
<mikecmpbll>
UI is a bit clunkety click compared to github, but gets job done
JakFrist has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
mim1k has quit [Ping timeout: 244 seconds]
nitric has joined #ruby
theta8 has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
Coldblackice has joined #ruby
rileyy has quit [Ping timeout: 265 seconds]
ChiefAlexander has quit [Remote host closed the connection]
ixti has joined #ruby
AnFin has left #ruby [#ruby]
cschneid_ has joined #ruby
AndrewIsHere has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
rodfersou is now known as rodfersou|lunch
nando293921 has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Spami has quit [Quit: This computer has gone to sleep]
pawnbox has quit [Remote host closed the connection]
<theRoUS>
i'm an rspec noob, and ignorant. i have a RSpec.configure { |cfg| cfg.before(:each) { ... } } declaration. it works fine at one level, but not in a nested describe { context { } }
the_rhizo2 has joined #ruby
<theRoUS>
is there some setting to cause the hooks to work on all the turtles all the way down? :-)
<dminuoso>
theRoUS: Can you perhaps elaborate what you are trying to achieve instead?
loechel has joined #ruby
etehtsea has quit [Quit: Computer has gone to sleep.]
skylerto has joined #ruby
<dminuoso>
(The question sounds too specific for a self-declared newbie, so Ill just pretend that you are asking for a potentially wrong solution)
chris349 has joined #ruby
zacts has quit [Ping timeout: 240 seconds]
<theRoUS>
the config.before(:each) is defining an instance variable
<theRoUS>
dminuoso: i'm not a newbie in the field, just in rspec
<dminuoso>
theRoUS: It still doesnt sound like something you should be doing.
cdg_ has joined #ruby
<dminuoso>
theRoUS: Any reason you are not using let() ?
drewo has quit [Quit: WeeChat 1.4]
symm- has quit [Ping timeout: 244 seconds]
<theRoUS>
probably ignorance, if nothing else. :-) the instance variable is read from a YAML file.
<dminuoso>
(You can provide let() through such a shared context)
aegis3121 has joined #ruby
<dminuoso>
theRoUS: Using a combination should avoid the problems you are having entirely.
<theRoUS>
dminuoso: isn't :apply_to_host_groups only in 3.5+
chipotle has quit [Ping timeout: 258 seconds]
bluntman has quit [Ping timeout: 240 seconds]
<dminuoso>
theRoUS: Yeah.
Velizar has joined #ruby
aryaching has quit []
rikai has quit [Ping timeout: 250 seconds]
Cohedrin has joined #ruby
<theRoUS>
dminuoso: meh. 3.4 here
bluntman has joined #ruby
rikai has joined #ruby
<dminuoso>
theRoUS: It doesnt matter, you dont need that behavior.
hutch34 has joined #ruby
<dminuoso>
theRoUS: The reason its listed there is that its the "new desired" behavior, but for backwards compatibility reasons the old (:trigger_inclusion) is kept as default.
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
aryaching has joined #ruby
rodfersou|lunch is now known as rodfersou
TPug has joined #ruby
conta has quit [Ping timeout: 264 seconds]
jrafanie has joined #ruby
firstdayonthejob has joined #ruby
<theRoUS>
dminuoso: and #include_context isn't available in RSpec::Core::Configuration 3.4
Dimik has joined #ruby
c_nick has quit [Quit: Leaving.]
simulcr has joined #ruby
QORRiE_ has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
<dminuoso>
theRoUS: You can use metadata matching.
<dminuoso>
(Or manually include the context in each group)
postmodern has joined #ruby
Pupeno has quit [Remote host closed the connection]
<dminuoso>
It will require some patching, but you will be doing it half-way right at least if you don't upgrade to rspec 3.5 :)
jaruga___ has quit [Quit: jaruga___]
GodFather has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
<theRoUS>
dminuoso: exactly; lots of additional instrumenting. i think i'll just flatten the iterations to embed the context text in each test
<dminuoso>
theRoUS: Or use metadata matching as I said.
leitz has joined #ruby
<dminuoso>
Then oyu just need to make sure that all the groups have the required metadata.
kjellpropell has joined #ruby
AzureStigma has joined #ruby
<dminuoso>
theRoUS: Use describe groups properly
AndrewIsHere has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
<theRoUS>
dminuoso: i'll note that for future work; however, i'm not going to be reworking this whole suite, just adding my little bit. i tried to get clever, and failed
byteflame has joined #ruby
Rodya_ has quit [Remote host closed the connection]
eGGshke has quit [Remote host closed the connection]
kavanagh has joined #ruby
the_rhizo2 has quit [Ping timeout: 276 seconds]
Kyhz has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
jaequery has joined #ruby
futilegames has quit [Quit: futilegames]
tenderlove has quit [Read error: Connection reset by peer]
nettoweb has quit [Remote host closed the connection]
tenderlove has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
tenderlove has quit [Read error: Connection reset by peer]
cdg has joined #ruby
GodFather has quit [Ping timeout: 265 seconds]
tenderlove has joined #ruby
cdg has quit [Remote host closed the connection]
nettoweb has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
cdg has joined #ruby
MeMeK has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
tyang has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
Azure has quit [Ping timeout: 240 seconds]
sergey_makagon has joined #ruby
sergey_makagon has quit [Client Quit]
Spami has joined #ruby
tvon has joined #ruby
hahuang61 has joined #ruby
spider-mario has joined #ruby
c_nick has joined #ruby
the_rhizo2 has joined #ruby
giz|work has joined #ruby
blackmesa has joined #ruby
sergey_makagon has joined #ruby
pandaant has quit [Remote host closed the connection]
loechel has quit [Remote host closed the connection]
nettoweb has quit [Remote host closed the connection]
AzureStigma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eprasad has quit [Quit: Leaving]
aryaching has quit [Ping timeout: 265 seconds]
giz|work has quit [Ping timeout: 252 seconds]
cdnchris has quit [Quit: Leaving]
aryaching has joined #ruby
Pupeno has joined #ruby
rails034 has joined #ruby
equivalent8 has joined #ruby
<equivalent8>
Hi everyone, I've created new Github organisation and project [it-recruitment-code-of-conduct\/it-recruitment-code-of-conduct](https://github.com/it-recruitment-code-of-conduct/it-recruitment-code-of-conduct/pulls) that I'm hoping will evolve into community driven guide for recruiters to follow (even if only 1 recruiter ever read it ! :) ) and resource to reference unprofessional IT recruiters.. Can you please review current propos
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
bfrizzle has quit [Ping timeout: 258 seconds]
bocaneri has quit [Remote host closed the connection]
TPug has joined #ruby
Es0teric has joined #ruby
equivalent8 has quit [Ping timeout: 250 seconds]
<moparisthebest>
maybe the first thing he could put on there is about how it's annoying when recruiters spam irc channels
<moparisthebest>
anyone know of a pure ruby scrypt implementation? :(
<Papierkorb>
Respect email unsubscribe? -> Spam, if you can't do this much there's no reason to do business. Also important as blacklist with who to not make business with
<Papierkorb>
Spamming IRC channels? -> No go.
blackmesa has quit [Ping timeout: 264 seconds]
bustiz has quit [Ping timeout: 250 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
bfrizzle has joined #ruby
bustiz has joined #ruby
KaliLinuxGR has joined #ruby
cdg has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
P_R_Deltoid has joined #ruby
Torrone has quit [Quit: This computer has gone to sleep]
the_rhizo2 has quit [Ping timeout: 240 seconds]
johnmilton has quit [Remote host closed the connection]
giz|work has joined #ruby
Rodya_ has joined #ruby
der-landgraf has joined #ruby
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
Guest49086 is now known as adam12
P_R_Deltoid has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 250 seconds]
macsteps has joined #ruby
yardenbar has joined #ruby
Silthias has quit [Quit: Leaving.]
unreal has joined #ruby
macsteps has quit [Remote host closed the connection]
macsteps has joined #ruby
der-landgraf has quit [Excess Flood]
hammond has quit [Ping timeout: 260 seconds]
hammond has joined #ruby
hammond has quit [Changing host]
hammond has joined #ruby
hammond has quit [Changing host]
hammond has joined #ruby
govg has joined #ruby
jackjackdripper has joined #ruby
the_rhizo2 has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
macsteps has quit [Ping timeout: 276 seconds]
Madplatypus has joined #ruby
giz|work has quit [Ping timeout: 240 seconds]
roflmyeggo has joined #ruby
aegis3121 has quit [Ping timeout: 276 seconds]
nando293921 has quit [Quit: Lost terminal]
nando293921 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
c_nick has left #ruby [#ruby]
skylerl has joined #ruby
Derperperd has quit [Quit: Derperperd]
whathappens has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 250 seconds]
tyang has joined #ruby
skylerto has quit [Ping timeout: 260 seconds]
whathappens has joined #ruby
QORRiE has joined #ruby
yeticry has joined #ruby
the_rhizo2 has quit [Ping timeout: 258 seconds]
der-landgraf has joined #ruby
sepp2k has quit [Quit: Leaving.]
nettoweb has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
LoneHerm_ has joined #ruby
epochwolf has quit [Ping timeout: 250 seconds]
spacemud has quit [Ping timeout: 276 seconds]
c_nick has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
<c_nick>
online documentation tool?
ramfjord has joined #ruby
spacemud has joined #ruby
elifoster has quit [Quit: painting a house]
camilasan has quit [Remote host closed the connection]
epochwolf has joined #ruby
<jhass>
c_nick: devdocs.io
<jhass>
c_nick: rdoc.info
johnmilton has joined #ruby
Psi-Jack has quit [Quit: Where'd my terminal go?]
skylerl__ has joined #ruby
gldvvtr has joined #ruby
camilasan has joined #ruby
LoneHerm_ has quit [Ping timeout: 244 seconds]
flashpoint9 has joined #ruby
aegis3121 has joined #ruby
habitullence has joined #ruby
Psi-Jack has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
skylerl has quit [Ping timeout: 260 seconds]
BrianJ has joined #ruby
r_rios has joined #ruby
johnmilton has quit [Ping timeout: 258 seconds]
<c_nick>
jhass: i need something which is like MediaWiki but hosted somewhere in the cloud which i can access from a multiple pc's and update (Note: i dont want to install a software to do the documentation)
<jhass>
github wiki?
<jhass>
nickjj: how trustworthy is the input/how important are symbols as option keys?
dennisvennink has joined #ruby
yardenbar has quit [Ping timeout: 258 seconds]
bluOxigen has joined #ruby
<nickjj>
jhass, option keys could in theory be anything but in jekyll land symbol based args are the standard
<c_nick>
jhass: Github is blocked in the office
<jhass>
oO get a better job
alfiemax has quit [Ping timeout: 276 seconds]
<mikecmpbll>
lol
<nickjj>
it's trustworthy enough, the symbol args are optional but there will always be at least 1 word as input
elaptics has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<nickjj>
{% hello 1word %} , that would be the minimum viable input
<jhass>
eh, it's jekyll, I guess all people would do is shoot into their own foot
<nickjj>
yeah at worst it's going to give a runtime error at build time
nettoweb has joined #ruby
<nickjj>
dealing with args in jekyll is also the most annoying thing in the world haha
<toretore>
nickjj: why don't you make it easier to split the "text" and "args" parts?
<jhass>
a lookahead makes the previous pattern only match if the given contents come after it
<jhass>
so we match any whitespace, but only if one of the option keys comes after it
<nickjj>
toretore, it's kind of a jekyll limitation, people are used to supplying all args without quotes, and its plugin system treats it all as 1 token
<c_nick>
jhass: ZohoDocs
<jhass>
and then split on that whitespace
der-landgraf has joined #ruby
<jhass>
text, *params just decomposes the array then
c_nick has left #ruby [#ruby]
johnmilton has joined #ruby
tfitts has joined #ruby
<nickjj>
jhass, right so params ends up being an array of params
whathappens has joined #ruby
<jhass>
yup
<nickjj>
line 7 basically replaces my 2nd loop
<nickjj>
thanks for the alt solution, it's something to look at for sure
dionysus69 has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
Rein_Aoi has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
<Rein_Aoi>
Hey guys I'm getting a weird (and I find hilarious) outcome of Date::parse. I'm inputting the string "Stu 10 2000" and I'm getting out the date August 10th, 2000. Anyone know why its parsing "Stu" as "Aug" or something akin? I'd love to not have to check the month by hand
<jhass>
what is it supposed to be anyway
synthroi_ has quit []
karapetyan has quit [Ping timeout: 240 seconds]
<Rein_Aoi>
I was hoping it would throw an error like I get when I put an invalid day
<mikecmpbll>
it's defaulted to current month
<Rein_Aoi>
ahh thanks!
<mikecmpbll>
only detected the day and year from the string
<jhass>
this is why you should use strptime :/
djbkd has quit [Ping timeout: 276 seconds]
<mikecmpbll>
it fills the blanks with current values. e.g. Date.parse("20") => Sat, 20 Aug 2016
<cevett>
i have a question about some code on github if someone has a sec
<cevett>
this is probably super basic, I'm a total ruby noob, why does interface_info return something the first time it's called
cdg has joined #ruby
<cevett>
line 50
nando293921 has quit [Ping timeout: 250 seconds]
solars has quit [Ping timeout: 250 seconds]
ChiefAlexander has quit [Remote host closed the connection]
<mikecmpbll>
cevett : not entirely sure i understand your question , but the idea is that it returns what's in @cache if @cache is defined, otherwise it calculates the value and then puts it in @cache
<mikecmpbll>
the next time it's called it gets the value that it calculated last time from @cache, rather than recalculating.
<Rein_Aoi>
cevett assuming @interface_provider is correctly set, the if statement on line 52 will execute, and since that is the last line of the method, the method will return the result of that line (@interface_provider.interface_info(@iface))
<mikecmpbll>
the technique is known as memoization.
<cevett>
Rein_Aoi: thats what i was missing
<cevett>
thanks both of you!
<mikecmpbll>
oic.
djbkd has joined #ruby
* mikecmpbll
shrugs
ChiefAlexander has joined #ruby
<jhass>
cevett: btw if you click on a line number you can link to it ;)
<cevett>
thanks for the tip
jhack has joined #ruby
Es0teric has joined #ruby
der-landgraf has quit [Ping timeout: 244 seconds]
symm- has joined #ruby
der-landgraf has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
pokalyis has quit [Read error: Connection reset by peer]
pokalyis has joined #ruby
memorasus1 has joined #ruby
r_rios has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
memorasus has quit [Ping timeout: 264 seconds]
memorasus1 is now known as memorasus
solars has joined #ruby
eatingthenight has joined #ruby
shinnya has joined #ruby
<eatingthenight>
Hello, I have been trying to write a wrapper around rspec by parsing the json output however it outputs deprication warnings before it spits out some json. The same happens when you send the warning to a file. Does anyone know a way that you can turn off or redirect deprication warnings.
<eatingthenight>
jhass: doing that it still spits out "1 deprecation logged to dep_file.txt"
<eatingthenight>
I can parse that out just seems pretty hacky
<eatingthenight>
that i can't get a clean json output
<eatingthenight>
i checked that it's not actually getting logged to stderr
rgiscard has joined #ruby
<eatingthenight>
nice
airdisa has quit []
<eatingthenight>
as far as i can tell you can't clean it up
flashpoint9 has quit [Remote host closed the connection]
<eatingthenight>
sweet, guess i'll just have to parse it out
eljimmy has quit [Quit: This computer has gone to sleep]
SteenJobs has joined #ruby
<SteenJobs>
is it relatively trivial to package together some gems and a script into an executable for mac OS without a library like platypus or traveling-ruby? or would you strongly recommend using a library
<SteenJobs>
eatingthenight: wrote a web crawler for someone who’s a non-tech person, with Shoes as a GUI - takes a few input values…but the crawler has a few dependencies (in addition to Shoes), so i need it to be non-tech user friendly - meaning no running anything in terminal
<eatingthenight>
jhass: yeah i'll leave it for now and put up a PR so that it doesn't spit that to stout for json format at the very least
<jhass>
SteenJobs: well OS X ships with ruby, you could just make a gem they can gem install and that depends on everything else?
<SteenJobs>
jhass: no gem installs. figure zero terminal access.
<SteenJobs>
the limit of their tech abilities should be considered double clicking shit
<eatingthenight>
never tested but can't you just click on executable scripts?
<eatingthenight>
i'm on nix so can't test
lxsameer has quit [Ping timeout: 240 seconds]
<SteenJobs>
yea but i’d want to package the gems in with it. there are a few libraries for it, i would just rather do it myself instead of a library if possible, for educational purposes and all
<SteenJobs>
no worries - worst case i use one of the gems for packaging it all up. they seem legit.
tvon has joined #ruby
<Rein_Aoi>
correct me if I'm wrong, but if you package a Gemfile with it couldn't you get bundler and run a bundle update at the start of your entry script?
<jhass>
SteenJobs: mmh, doesn't bundler have a standalone mode?
Guest43 has joined #ruby
Guest43 has quit [Changing host]
Guest43 has joined #ruby
<SteenJobs>
ye it does
<SteenJobs>
i’ve just never done this before, so figured i’d ask - if i was building a mac app, i’d be using the macOS SDK. can’t say i’ve every needed to write a script and wrap it in a lightweight GUI for someone. there’s usually a correlation between the code written and the ability to execute the code ha
tomphp has joined #ruby
Rodya_ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
workmad3 has quit [Ping timeout: 276 seconds]
Torrone has quit [Quit: This computer has gone to sleep]
ChiefAlexander has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
giz|work has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
davidw has joined #ruby
rodfersou has quit [Quit: leaving]
<davidw>
Hrm... how do I recreate this? #<BigDecimal:88ca4d0,'0.19375E2',18(36)>
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<davidw>
as in... BigDecimal.new("0.19375E2" ..... ?
karapetyan has quit [Ping timeout: 250 seconds]
<davidw>
it gives me 18(18) if I just type in the number
leea has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Ping timeout: 264 seconds]
leea has quit [Client Quit]
Neobenedict has quit [Ping timeout: 244 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
Neobenedict has joined #ruby
Neobenedict has quit [Changing host]
Neobenedict has joined #ruby
ramfjord has joined #ruby
<zacts>
hi rubyists
Rodya_ has joined #ruby
<davidw>
this does it: BigDecimal.new("0.19375E2", 36)
djbkd has quit [Remote host closed the connection]
timdau has joined #ruby
sergio_101 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
der-landgraf has joined #ruby
giz|work has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
sergio_101 has joined #ruby
<timdau>
I have a process that monitors a queue and runs long running jobs. I want to be able to update the code and restart the process to make sure its using the new code, but I want it to finish the job its running.
GinoMan2440 has quit [Ping timeout: 252 seconds]
<timdau>
I was thinking about using bluepill. Ideally I need something that does a sigterm and then waits forever for it to stop before starting it again.
<timdau>
Not sure if bluepill will do that.
<timdau>
errr... sigquit I guess.
<timdau>
Anyone have a suggestion?
ChiefAlexander has joined #ruby
<jhass>
sigterm is more correct, sigint is acceptable too
sergio_101 has quit [Ping timeout: 258 seconds]
<jhass>
no idea how long bluepill will wait
swills has quit [Ping timeout: 258 seconds]
<jhass>
but most stuff I've seen is configurable in that regard
<jhass>
so you can just choose an insanley long timeout
siaw23 has quit [Quit: siaw23]
<timdau>
yeah, it looks like it will wait any specified time, but then does the job get monitored and restarted as soon as it is complete? Or does it wait until the end of the timeout?
djbkd has joined #ruby
<jhass>
I would expect as soon
<jhass>
waiting for the timeout would be pretty stupid
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 48.0/20160726073904]]
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
gizmore has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
pokalyis has quit [Read error: Connection reset by peer]
jgt2 has joined #ruby
jenrzzz has joined #ruby
ur5us has joined #ruby
leftpad has quit [Remote host closed the connection]
nankyokusei has quit []
pokalyis has joined #ruby
ldnunes has quit [Quit: Leaving]
the_rhizo2 has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
kappy has joined #ruby
byteflame has quit [Ping timeout: 244 seconds]
Nahra has quit [Read error: Connection reset by peer]
Nahra has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kyhz has quit [Ping timeout: 260 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
tomphp has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
Neobenedict has quit [Ping timeout: 240 seconds]
minimalism has joined #ruby
Neobenedict has joined #ruby
jenrzzz has joined #ruby
skylerl__ has quit [Quit: Leaving]
Torrone has quit [Quit: This computer has gone to sleep]
Heskie has quit []
Guest38_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
chris2 has quit [Ping timeout: 250 seconds]
gldvvtr has left #ruby [#ruby]
skweek has quit [Ping timeout: 258 seconds]
demian has joined #ruby
demian has quit [Quit: cya...]
Derperperd has joined #ruby
SteenJobs has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
zeroDi has quit [Quit: WeeChat 1.5]
Torrone has joined #ruby
pokalyis has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
OTORelic2 has quit [Ping timeout: 240 seconds]
roflmyeggo has quit [Ping timeout: 244 seconds]
bustiz has quit [Ping timeout: 252 seconds]
uri has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
hutch34 has quit [Ping timeout: 244 seconds]
xaviergmail has joined #ruby
macsteps has quit [Remote host closed the connection]
kjellpropell has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nitrix has joined #ruby
nankyokusei has quit [Remote host closed the connection]
ddffg has quit [Ping timeout: 276 seconds]
Azure has joined #ruby
youch has quit [Remote host closed the connection]
<minimalism>
Is there a recommended gem to provide a country list for a <select> menu for account purposes?
etetz has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
<IbrahimA>
basically make a mapping from some field to the objects themselves
<IbrahimA>
(eg. database ID or the like)
LoneHermit has quit [Ping timeout: 265 seconds]
GodFather has joined #ruby
TPug has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
leea has joined #ruby
<IbrahimA>
it seems like when working with a bunch of data in say rails, it's useful sometimes to be able to do queries up front and then get associations without having to hit the database again, so you need this type of mapping to do that
agent_white has quit [Quit: brb]
<IbrahimA>
i guess theoretically query.includes(:assocations) should obviate the need for that but it's easy to accidentally perform N+1 queries that way i feel