Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest27793 has quit [Client Quit]
darkxploit has quit [Ping timeout: 255 seconds]
LW_Luna has joined #ruby
shakes has joined #ruby
LW_Luna is now known as Guest79072
charliesome has joined #ruby
Guest79072 has quit [Client Quit]
ico has quit [Remote host closed the connection]
LW_LunAFK has joined #ruby
LW_LunAFK has quit [Changing host]
LW_LunAFK has joined #ruby
LW_LunAFK is now known as LW_Luna
LW_Luna is now known as Luna_Moonfang
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
bradleyprice has quit [Remote host closed the connection]
prereflect has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
?used
<ruboto>
Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
grill has joined #ruby
infiton has joined #ruby
sankaber has joined #ruby
cdg has quit [Remote host closed the connection]
darkxploit has joined #ruby
infiton has left #ruby ["WeeChat 1.3"]
celly has joined #ruby
infiton has joined #ruby
harai has quit [Ping timeout: 246 seconds]
pabs has quit [Ping timeout: 246 seconds]
pabs has joined #ruby
bithon has quit [Ping timeout: 276 seconds]
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 43.0.3/20151223140742]]
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
rgtk has joined #ruby
Luna_Moonfang is now known as Guest7949
Guest7949 has quit [Changing host]
Guest7949 has joined #ruby
Guest7949 is now known as LW_Luna
LW_Luna is now known as Luna_Moonfang
celly has quit [Ping timeout: 256 seconds]
marr has quit [Ping timeout: 255 seconds]
paradisaeidae has joined #ruby
infiton has quit [Ping timeout: 255 seconds]
RobertBirnie has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
RobertBirnie has quit [Client Quit]
rgrmatt has joined #ruby
lessless has joined #ruby
hinbody has joined #ruby
infiton has joined #ruby
prereflect has joined #ruby
sorbo_ has joined #ruby
RobertBirnie has joined #ruby
shanemcd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blt has quit [Ping timeout: 264 seconds]
rgrmatt has quit [Remote host closed the connection]
Lucky__ has joined #ruby
atumzin has quit [Read error: Connection reset by peer]
Luna_Moonfang has quit [Quit: WeeChat 1.3]
Luna_Moonfang has joined #ruby
atumzin has joined #ruby
vdamewood has quit [Quit: Life beckons.]
infiton has quit [Ping timeout: 260 seconds]
rgrmatt has joined #ruby
dorei has quit []
neanderslob has joined #ruby
rgrmatt has quit [Remote host closed the connection]
akem has joined #ruby
sorbo_ has left #ruby [#ruby]
infiton has joined #ruby
charliesome has joined #ruby
mistermocha has joined #ruby
cdg has joined #ruby
pabs has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
ohaibbq has quit [Read error: Connection reset by peer]
ohaibbq has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
justicefries has joined #ruby
pabs has joined #ruby
infiton has quit [Quit: WeeChat 1.3]
duckpuppy has quit [Ping timeout: 256 seconds]
dn5 has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 255 seconds]
shanemcd has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
dopie has quit [Quit: Lost terminal]
dopie has joined #ruby
hinbody has quit [Quit: leaving]
hinbody has joined #ruby
charliesome has quit [Client Quit]
aaeron has quit [Quit: aaeron]
DrShoggoth has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
sneakerhax has joined #ruby
devoldmx has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
dingman has quit [Ping timeout: 260 seconds]
dopie has quit [Quit: Lost terminal]
dopie has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
lessless has quit [Remote host closed the connection]
charliesome has joined #ruby
pabs has quit [Ping timeout: 245 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
pabs has joined #ruby
kies^ has quit [Ping timeout: 250 seconds]
govg has joined #ruby
rodfersou has quit [Quit: leaving]
mdw has quit [Quit: Sleeping Zzzzz]
Jardayn has quit [Quit: Leaving]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pontiki has joined #ruby
pawnbox has joined #ruby
aaeron has joined #ruby
blt has joined #ruby
atumzin has quit [Ping timeout: 245 seconds]
senayar has quit []
aaeron_ has joined #ruby
pawnbox has quit [Ping timeout: 245 seconds]
dmcp has joined #ruby
dmcp has quit [Read error: Connection reset by peer]
aaeron has quit [Ping timeout: 260 seconds]
aaeron_ is now known as aaeron
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 43.0.3/20151223140742]]
FooMunki has quit [Quit: FooMunki]
aaeron has quit [Ping timeout: 256 seconds]
Yzguy has quit [Quit: Zzz...]
DrShoggoth has quit [Quit: Leaving]
Ox0dea has joined #ruby
arescorpio has joined #ruby
amclain has quit [Quit: Leaving]
Bidun has joined #ruby
freerobby has joined #ruby
Bidun has left #ruby [#ruby]
BTRE has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
celly has joined #ruby
akem has quit [Quit: Bye]
bb010g has joined #ruby
Rodya_ has joined #ruby
freerobby has quit [Quit: Leaving.]
celly has quit [Ping timeout: 255 seconds]
freerobby has joined #ruby
yes`r has joined #ruby
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
pawnbox has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BTRE has left #ruby ["Leaving"]
hxegon has quit [Ping timeout: 256 seconds]
duncannz has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grill has joined #ruby
Highsen has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
joneshf-laptop has quit [Ping timeout: 245 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
finisherr has quit [Ping timeout: 250 seconds]
finisherr has joined #ruby
prereflect has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
joneshf-laptop has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
shanemcd has joined #ruby
braincras has quit [Quit: bye bye]
startupality has joined #ruby
shanemcd has quit [Ping timeout: 265 seconds]
Ox0dea has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
duckpuppy has joined #ruby
aaeron has joined #ruby
yqt has quit [Ping timeout: 256 seconds]
pdoherty has quit [Ping timeout: 276 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
braincrash has joined #ruby
dingman has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
webus has joined #ruby
devoldmx has joined #ruby
snarkanoid has quit [Ping timeout: 250 seconds]
shakes has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 276 seconds]
duckpuppy has joined #ruby
andywojo has quit [Ping timeout: 245 seconds]
aaeron has quit [Quit: aaeron]
arescorpio has quit [Quit: Leaving.]
duncannz has quit [Ping timeout: 256 seconds]
druonysus has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
cdg has quit [Remote host closed the connection]
seitensei has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has quit [Ping timeout: 240 seconds]
sorbo_ has joined #ruby
seitensei has quit [Ping timeout: 250 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
robh71 has joined #ruby
robh71 has quit [Max SendQ exceeded]
sorbo_ has quit [Remote host closed the connection]
robh71 has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
startupality has quit [Quit: startupality]
cdg has joined #ruby
arup_r has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
braincra- has joined #ruby
trwyth has joined #ruby
colegatron has joined #ruby
cdg has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 260 seconds]
rkazak has quit [Quit: Sleep.....ing....]
krz has joined #ruby
ss_much has joined #ruby
trwyth has quit [Ping timeout: 264 seconds]
startupality has joined #ruby
phutchins has quit [Quit: WeeChat 1.3]
Rodya_ has quit [Quit: Leaving...]
startupality has quit [Client Quit]
trwyth has joined #ruby
celly has joined #ruby
harai has joined #ruby
trwyth has quit [Client Quit]
psy_ has quit [Remote host closed the connection]
celly has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
vdamewood has joined #ruby
tubuliferous_ has joined #ruby
freerobby has quit [Quit: Leaving.]
atumzin has quit [Read error: Connection reset by peer]
arooni_______ has quit [Ping timeout: 250 seconds]
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
adgtl has joined #ruby
pdoherty has joined #ruby
startupality has joined #ruby
DavidDudson has joined #ruby
startupality has quit [Client Quit]
startupality has joined #ruby
atumzin has quit [Ping timeout: 246 seconds]
atumzin has joined #ruby
tubuliferous_ has quit [Ping timeout: 265 seconds]
andywojo has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
sigurding has joined #ruby
varunwachaspati has joined #ruby
grill has joined #ruby
DavidDudson has joined #ruby
andywojo has quit [Ping timeout: 256 seconds]
<slackR>
.seen jhass
<jhass>
slackR: 1 second
scampbell has joined #ruby
grill has quit [Ping timeout: 246 seconds]
<slackR>
Okai.
atumzin has quit [Ping timeout: 240 seconds]
atumzin has joined #ruby
<slackR>
jhass: would it be a bad idea to solve a problem implementing a while loop?. It won't loop forever
<jhass>
slackR: first answer yes. Second answer no.
skcin7 has joined #ruby
<slackR>
I'll take that as a yes. In the sense not a bad idea.
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
mesamoo has joined #ruby
skcin7 has joined #ruby
arup_r has quit [Remote host closed the connection]
hagabaka has quit [Ping timeout: 256 seconds]
hagabaka has joined #ruby
<slackR>
jhass, https://paste.teknik.io/2645. Check the code now. I did touch it for 10 days or so, I couldn't figure out a way to re-write random_word function/method, I'm finally thinking about using a while loop there.
arooni_______ has joined #ruby
<slackR>
I hope I fixed all the syntax issues
darkf has joined #ruby
scampbell has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblu_ has joined #ruby
tubuliferous_ has joined #ruby
graffix222 is now known as graffix
cyfr0n has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
arup_r has joined #ruby
rgtk has quit [Remote host closed the connection]
terminalrecluse has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
RegulationD has quit [Ping timeout: 264 seconds]
kies^ has joined #ruby
tildes has joined #ruby
<jhass>
slackR: it truly is 50/50
devbug has joined #ruby
<jhass>
depends entirely on the problem
bradleyprice has joined #ruby
hagabaka has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
marcdel_ has quit [Ping timeout: 264 seconds]
juddey has quit [Ping timeout: 256 seconds]
pdoherty has quit [Ping timeout: 245 seconds]
scripore has quit [Quit: This computer has gone to sleep]
pawnbox has joined #ruby
hagabaka has joined #ruby
<shevy>
jhass!
<shevy>
you are back
<jhass>
shevy: are you sure?
darkf_ has joined #ruby
startupality has quit [Quit: startupality]
darkf has quit [Ping timeout: 272 seconds]
haxrbyte_ has quit [Ping timeout: 240 seconds]
rkazak has joined #ruby
ton31337 has joined #ruby
<ton31337>
what does this mean?
<ton31337>
def otherwise(&block)
<ton31337>
&block
arooni_______ has quit [Ping timeout: 250 seconds]
<havenwood>
defendguin: You have brew installed in a strange place...
<havenwood>
defendguin: Warning: /usr/bin occurs before /usr/local/homebrew/bin
kalopsian has quit [Ping timeout: 260 seconds]
<defendguin>
yup see it
pawnbox has quit [Remote host closed the connection]
DavidDudson has joined #ruby
pawnbox has joined #ruby
<defendguin>
ahh much better
<defendguin>
ok that fixed that
<defendguin>
my pg gem wont install
damaged_fxxk has joined #ruby
rkazak has joined #ruby
adgtl has joined #ruby
PedramT has joined #ruby
<havenwood>
defendguin: Did you install PosgreSQL?
<defendguin>
i did
<havenwood>
defendguin: Error?
<defendguin>
not via brew but i did
startupality has joined #ruby
<havenwood>
defendguin: Ah
sp1rs has joined #ruby
Highsen has quit [Remote host closed the connection]
<damaged_fxxk>
I have come from Perl background... But I wanna give ruby a try... I am actually interested in network programmin'.. Could ya guys suggest me some good books?!
dfdfdf has joined #ruby
PedramT has quit [Remote host closed the connection]
<havenwood>
damaged_fxxk: That's the first that comes to mind. It's quite accessible but doesn't go into crazy detail.
domgetter has joined #ruby
<damaged_fxxk>
gracis @havenwood...I know the internal of socket programmin'... I wanna write some clean code .. I do socket programmin' in Perl usin some libraries
<havenwood>
defendguin: Can't find the 'libpq-fe.h header
<havenwood>
defendguin: I'd probably install postgres with brew. You could alternatively point it at where it pg really is.
atumzin has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
damaged_fxxk: Well here's a good place for questions. I can't think of a general Ruby network programming book at the moment.
sp1rs has quit [Quit: sp1rs]
<havenwood>
damaged_fxxk: Hrm, looking at what i have. I guess the dRuby book is related but probably not what you're looking for either.
sp1rs has joined #ruby
hostess has quit [Quit: No Ping reply in 180 seconds.]
<damaged_fxxk>
havenwood: Thats okay... I will try some ruby network libraries...
<havenwood>
damaged_fxxk: I can point you towards some nice libraries at least. There are quite a variety of HTTP clients but this is a great one: https://github.com/httprb/http#readme
framling has joined #ruby
<defendguin>
havenwood: /Library/PostgreSQL/9.4 i don't know if i have that header file though
<damaged_fxxk>
havenwood: damn....... My english is extremly terrific! apologies
<havenwood>
dfdfdf: So you're expecting it in /usr/share/chruby then? Double check that's not where it is? The standard location is /usr/local/share/chruby but it's up to the AUR package.
tagrudev has joined #ruby
rgtk has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
domgetter has joined #ruby
urine_boy has joined #ruby
<urine_boy>
ALL NIGGERS SHOULD BE EXTERMINATED
<urine_boy>
death to niggers
karapetyan has joined #ruby
<ljarvis>
!mute urine_boy
<urine_boy>
ALL NIGGERS SHOULD BE EXTERMINATED because they are black
celly has quit [Ping timeout: 276 seconds]
jschmid has joined #ruby
krz has quit [Quit: WeeChat 1.2]
DavidDudson has joined #ruby
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
roshanavand has joined #ruby
DavidDudson has quit [Max SendQ exceeded]
govg has joined #ruby
Averna has joined #ruby
DavidDudson has joined #ruby
Wsewolod has quit [Ping timeout: 240 seconds]
colegatron has quit [Ping timeout: 250 seconds]
urine_boy has left #ruby [#ruby]
seitensei has quit [Ping timeout: 240 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
nfk|laptop has quit [Ping timeout: 265 seconds]
<yorickpeterse>
lol
govg has quit [Ping timeout: 240 seconds]
<yorickpeterse>
it's like people aren't even trying any more these days
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
grill has joined #ruby
dlitvak has joined #ruby
<DefV>
hmz
<DefV>
Good thing he actually added his reasoning
<DefV>
as not to make us wonder
blackmesa has joined #ruby
harai has quit [Ping timeout: 264 seconds]
pawnbox has quit [Remote host closed the connection]
grill has quit [Ping timeout: 255 seconds]
duckpuppy has joined #ruby
toretore has joined #ruby
<shevy>
yorickpeterse lol
toretore has quit [Client Quit]
nfk|laptop has joined #ruby
pawnbox has joined #ruby
whiteline has quit [Ping timeout: 245 seconds]
jschmid has quit [Ping timeout: 260 seconds]
colegatron has joined #ruby
sameerynho has joined #ruby
DavidDudson has quit [Read error: Connection reset by peer]
<yorickpeterse>
"How do I troll an IRC channel? I KNOW IT, I'LL CALL PEOPLE "NIGGERS"! GENIUS"
duckpuppy has quit [Ping timeout: 265 seconds]
<yorickpeterse>
"also lol "urine_boy" is such a funny handle hahaha I'm totally going to troll them"
lxsameer has quit [Ping timeout: 272 seconds]
<pontiki>
this seems typical of the genre
<apeiros>
yorickpeterse: it's not even people. it's a single idiot.
<pontiki>
"I need attention because I'm bored and don't know how else to make my way."
lxsameer__ has joined #ruby
<DefV>
you wonder. Did he come online "Damn, pissboy is already taken. pissman as well. Let's go for urine_boy then."
<pontiki>
are you going to make me look if those are taken or have you already done that? :)
sameerynho has quit [Ping timeout: 260 seconds]
Begi has joined #ruby
<DefV>
12:08 [Freenode] -!- There is no such nick pissboy
TvL2386 has quit [Quit: Ex-Chat]
kalopsian has joined #ruby
Begi2 has joined #ruby
Begi has quit [Ping timeout: 264 seconds]
kalopsian has quit [Ping timeout: 256 seconds]
tvw has joined #ruby
dfdfdf has quit [Read error: Connection reset by peer]
<dionysus69>
hello guys, can anyone guide me through how to cheat on youtube? is there a way to send a ruby request to some video that refreshes automatically every 5 minutes? I understand it won't load it in the browser but how can I simulate viewing a youtube video without actually opening it up in browser? or do I have to hack a browser for that?
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Zarthus>
dionysus69: that sounds rather unethical, what are you trying to do?
<dionysus69>
no evil done really just trying to win in a not very important contest
<Zarthus>
that sounds evil to me :)
<Zarthus>
win legitimately, or not at all
<dionysus69>
come on I am 100% sure at least thousand participants will cheat, there will be no fair winner
<Zarthus>
that said, you actually cannot. Views on youtube are unique and require watching of a large percentage of the video (that youtube does not disclose)
<shevy>
he can not?
<dionysus69>
what if I simulate "watching video" without actually looking at it? thats why I asked, if I hack browser so it runs as a service? maybe in that case I can?
<Zarthus>
just don't participate in the contest, if everyone is cheating ;)
<dionysus69>
then I can implement some IP spoofing so not every view is from the same address, makes sense?
<shevy>
if you can find out how to automate it
<Zarthus>
YouTube has a robust system for detecting unique views
<shevy>
are you advertising or something?
<dionysus69>
nope some contest, whoever has highest views, wins
<dionysus69>
but ye the video is advertising some company
<shevy>
no not you
<shevy>
there isn't that much in ruby to help you ... there is mechanize for websites but these are mostly just click-on-button... then we have xdotool ... which is somewhat annoying....
<ljarvis>
youtube probably has the best anti-gaming system on the planet..
<pontiki>
hmm, sounds like you're trying to perpetrate click fraud
skcin7 has joined #ruby
skade has quit [Ping timeout: 272 seconds]
centrx has joined #ruby
<yorickpeterse>
maybe just get people to genuinely watch your video
<pontiki>
"buncha other people will do it" doesn't motivate anyone to help you figure out how to do the same
Thomas-0725 has joined #ruby
blub` is now known as blub
lxsameer__ is now known as lxsameer
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<dionysus69>
yorickpeterse: will try that too but just an insurance
<dionysus69>
hahaha
<ljarvis>
this isn't on topic any more, so please take it to #ruby-offtopic, dionysus69
<dionysus69>
ye but what if we come up with some new technique that no one has tried
<Zarthus>
dionysus69: then you can submit it to the bug bounty and actually earn money
<dionysus69>
haha ok thanks for input anyways :)
<dionysus69>
Zarthus: after exploiting it a lil :D :D
puria has quit [Ping timeout: 255 seconds]
jondot has joined #ruby
blackgoat has joined #ruby
andywojo has joined #ruby
dfdfdf has joined #ruby
webus has joined #ruby
yos7ph has joined #ruby
<Zarthus>
does anyone know where I can find the official source of the Regex Engine (Origuruma I think?) ruby uses?
<Zarthus>
there's a lot of sources but I have no idea which one is official
karapetyan has quit [Remote host closed the connection]
finisherr has quit [Quit: finisherr]
andywojo has quit [Ping timeout: 260 seconds]
<Mon_Ouie>
The Ruby uses its modified version of Oniguruma, look at files matching reg*.{c,h} in Ruby's source code
<Mon_Ouie>
(plus the enc directory and oniguruma.h)
sandstrom has quit [Quit: My computer has gone to sleep.]
<ljarvis>
all hail onigmo
karapetyan has joined #ruby
FernandoBasso has joined #ruby
llfwf33 has joined #ruby
govg has joined #ruby
PedramT has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 255 seconds]
PedramT has joined #ruby
<Zarthus>
I suppose that's the best place to look, yeah.
El3k0n has joined #ruby
sigurding has quit [Quit: sigurding]
PedramT has quit [Read error: Connection reset by peer]
El3k0n has quit [Client Quit]
PedramT has joined #ruby
PedramT has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 276 seconds]
robh71 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PedramT has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
puria has joined #ruby
PedramT has quit [Remote host closed the connection]
whiteline has joined #ruby
PedramT has joined #ruby
bob_f has joined #ruby
<bob_f>
Hi, it seems that `&&` does not short circuit, but I find many people discouraging using `and` instead. Is there a conventional way to use `&&` in a short-circuit fashion ?
<bob_f>
Surprisingly difficult to find an authorative answer to this.
Mia has quit [Ping timeout: 276 seconds]
govg has joined #ruby
<apeiros>
bob_f: && always short circuits
<apeiros>
bob_f: so the question is - what makes you think it wouldn't?
<j416>
bob_f: authoritative answer -- try it and see™
<bob_f>
apeiros: I must be doing something stupid then.
<bob_f>
This line gives me `no implicit conversion of Symbol into Integer`: if action.is_a? Hash && action[:partial]
<bob_f>
Am I parenthesising wrong ?
<apeiros>
yes
<bob_f>
if (action.is_a? Hash) ?
<apeiros>
ew
<apeiros>
action.is_a?(Hash)
<ljarvis>
if action.is_a?(Hash)
<bob_f>
Ah. Cheers. :)
<bob_f>
Figured I would have noticed by now if && wasn't short-circuiting; thought I was losing my marbles. Thanks guys.
<ljarvis>
or Hash === action (I prefer is_a?)
<apeiros>
&& has precedence, so you get action.is_a?(Hash && action[:part])
<apeiros>
?guys bob_f
<ruboto>
bob_f, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<bob_f>
Right, got it. My understanding of `and` vs `&&` was that the only difference was precedence, so was getting really confused.
<apeiros>
correct. `and` and `&&` only differ in precedence. which can help leaving parens away in some situations.
<bob_f>
And is the tide against using `and` a general consensus ?
<apeiros>
I doubt there's general consensus
<apeiros>
I tend to not use `and`, but use parens and && instead.
<bob_f>
Cool, a lot of stuff online suggests that there's a definitive consensus, I was taking that with a pinch or two of salt.
<apeiros>
but I've seen people advocate to use whichever requires less parens.
<ljarvis>
actually I would say that is the general consensus, at least the unoffocial style guides say avoid and/or (I also use &&/||)
<apeiros>
ljarvis: "that" = "use && + parens"?
<ljarvis>
apeiros: aye
karapetyan has quit [Remote host closed the connection]
wrilain has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
<bob_f>
I'm coming from Python so am reluctantly dropping parens where I can so my code looks as cool as everyone else's.
<bob_f>
But clearly getting into a spot of bother with it from time to time. :)
<ljarvis>
I'm a huge fan of parens, and if I had a choice I'd make them non-optional in Ruby :)
nfk|laptop has quit [Ping timeout: 255 seconds]
RegulationD has joined #ruby
roshanavand has quit [Remote host closed the connection]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
mostlybadfly has joined #ruby
Axy has quit [Ping timeout: 276 seconds]
yos7ph has quit [Quit: Leaving]
rgtk has quit [Remote host closed the connection]
aef has quit [Remote host closed the connection]
prestorium has joined #ruby
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 260 seconds]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis>
my perfect Ruby would have ivar instantiation inside method argument definitions, and first-class functions (with () mapping to #call()) and non-optional parens
<ljarvis>
it's not much to ask right :)
houhouli_ has joined #ruby
puria has quit [Ping timeout: 265 seconds]
<blub>
some times when i have a bunch of nested function calls i start formatting it like lisp and then i have to go back and juggle spaces to make it look normal its so annoying of me..
pawnbox has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
houhoulis has quit [Ping timeout: 246 seconds]
CloCkWeRX has left #ruby [#ruby]
atumzin has quit [Ping timeout: 250 seconds]
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
PedramT has quit []
Thomas-0725 has joined #ruby
sandstrom has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 276 seconds]
roshanavand has joined #ruby
atumzin has quit [Read error: Connection reset by peer]
<blub>
dtordable: you can do it like that, but you should use the public accessors instead
axsuul has joined #ruby
axsuul has quit [Max SendQ exceeded]
axsuul has joined #ruby
aegis3121 has joined #ruby
<dtordable>
That "attr_accessor_ way, blub?
<blub>
if they're defined like that
jackcom has left #ruby [#ruby]
<blub>
the point is that you should get and set the variables by sending messages to self like anyone else would, for the same reasons they should
<dtordable>
In that way dont need the "attr_read" thing are also defined as readable?
<blub>
instead of using attr_reader, you could define your own reader trivially if that's what you mean. attr_whatever are just convenience functions
DoubleMalt has quit [Remote host closed the connection]
zack6849 has joined #ruby
zack6849 has quit [Changing host]
zack6849 has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
<havenwood>
dtordable: I'm not sure what you're asking. Yes, you can access instance variable like @so. Do you have a gist of code in particular that you're wondering about?
<dtordable>
To create setters readers for a class blub?
<blub>
'attr_reader :x' == def x; @x; end
<dtordable>
Ah that's another way...
scepticulous has quit [Ping timeout: 250 seconds]
iateadonut has joined #ruby
iateadonut has left #ruby [#ruby]
nietzschette has joined #ruby
kmckelvin has joined #ruby
Guest38 has joined #ruby
<dtordable>
£got a "attr_accessor :var1, :var2" to provide external access to vars of an instance
cdg has joined #ruby
defendguin has joined #ruby
magaudet has quit [Remote host closed the connection]
magaudet has joined #ruby
<dtordable>
So vars without an attr declaration are private then?
arup_r has joined #ruby
<blub>
dtordable: the methods of your class that don't need to touch instance variables directly, which is virtually all of the methods you will write, should use the accessor functions as well
dingman has quit [Ping timeout: 272 seconds]
<nietzschette>
private, but visible
<blub>
you aren't making the variable public by defining accessors, you're just providing methods that manipulate them
skcin7_ has joined #ruby
<diegoviola>
why does this returns 0
<diegoviola>
(296 / 2854) * 100
<dtordable>
Aha...
<blub>
to the person calling the methods, they don't even know if it is an instance variable or not, or if there's any extra processing going on when they deal with them
<nietzschette>
because you're not dealing with floats
<diegoviola>
but on google calc it gives me 10 or something
mallu has quit [Quit: Page closed]
<havenwood>
diegoviola: 0 * 100 #=> 0
skcin7 has quit [Read error: Connection reset by peer]
<nietzschette>
switch to .to_f
<nietzschette>
either denominator or numerator
<havenwood>
diegoviola: Or compare with: 296.fdiv(2854) * 100
<havenwood>
&ri Fixnum#/
<dtordable>
So more to say everything on Ruby are methods blub?
The_Phoenix has joined #ruby
<havenwood>
dtordable: Everything is not a Method.
chouhoul_ has quit [Remote host closed the connection]
<diegoviola>
ok
<nietzschette>
all numbers are subclasses of Numeric
<dtordable>
Blub you mean the "initialize" method of a given class,that I saw as constructors in other languages?
chouhoulis has joined #ruby
<havenwood>
diegoviola: See: Fixnum.ancestors
<dtordable>
That uses @variable.
<diegoviola>
wow
<diegoviola>
cool
terlar has quit [Ping timeout: 245 seconds]
<diegoviola>
ty
aibot has quit [Ping timeout: 265 seconds]
<blub>
dtordable: you should use self.var = x there too
<blub>
you have to prefix writers with self. or ruby will think you're defining a new function-local variable
Begi has joined #ruby
ta0 has quit [Ping timeout: 264 seconds]
andywojo has joined #ruby
<dtordable>
Ahhh... Ok blub
prereflect has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
prereflect has joined #ruby
Begi2 has quit [Ping timeout: 264 seconds]
<blub>
dtordable: you will see people use bare @variable to talk to instance variables, but that's bad style, it makes it harder to change things later
<dtordable>
Blub never read anything about self dot some thing... Will read on my book later
<dtordable>
(I suppose)
skcin7_ has quit [Max SendQ exceeded]
<havenwood>
blub: I disagree regarding using instance variables to access instance variables. Nothing wrong with it!
skcin7 has joined #ruby
celly has joined #ruby
<havenwood>
blub: Barewords are a sometimes food.
<nietzschette>
yeah, i use @var all day, why is that any less difficult than self.var
<blub>
dtordable: self.x just sends the message x to the object. most of the time you could just write x, but for assignments you need the self to stop ruby getting confused
celly_ has joined #ruby
<dtordable>
Yeah blub, thanks
SCHAAP137 has quit [Remote host closed the connection]
andywojo has quit [Ping timeout: 260 seconds]
gccostabr has joined #ruby
<havenwood>
blub: There are a variety of reasons why it's fine. It expresses meaning, is idiomatic and saves an unnecessary method call.
leksster has quit [Quit: Leaving]
leksster has joined #ruby
<blub>
nietzschette: for the same reason any other code uses accessors to get at instance variables
<havenwood>
blub: From *outside* the class.
<dtordable>
Aha
<blub>
havenwood: why don't the same benefits apply to code inside the class
chipotle_ has quit [Quit: cheerio]
celly has quit [Ping timeout: 260 seconds]
Ox0dea has joined #ruby
<havenwood>
blub: Note there's no private_attr_accessor...
<blub>
especially in a language where you can add extra methods later
seitensei has joined #ruby
<blub>
but conceptually, how is it any different whether the other code is inside the class or not
<blub>
it's still needlessly relying on an implementation detail
<havenwood>
blub: Just use instance variables as Matz intended. :P Public methods for the public interface to the class and private methods when more than variable setting or reading is needed.
<Ox0dea>
!next
<havenwood>
blub: If you're just reading or writing an instance variable, do just that!
<dtordable>
So "attr_reader" for reading and "attr_accessor" for writing and anyway for setting vars inside of a class use self dot notation no blub?
<blub>
attr_accessor defines a reader and a writer
<Ox0dea>
dtordable: #attr_writer for writing.
bMalum has quit [Quit: bMalum]
thisirs has joined #ruby
colegatron has quit [Ping timeout: 255 seconds]
<dtordable>
Thanks, anyone...
thisirs has quit [Remote host closed the connection]
<havenwood>
dtordable: attr_reader to expose reading outside the class, attr_writer for writing, attr_accessor for both - inside use instance variables, since you can, they're fast, and proper
Hounddog has quit [Remote host closed the connection]
<Ox0dea>
blub wants Ruby to be something else.
<havenwood>
Uby
karapetyan has joined #ruby
<Ox0dea>
Rub.
<havenwood>
Bluby*
<blub>
i want it to be object oriented
<havenwood>
blub: Instance variables are Objects. Done!
* havenwood
goes in search of coffee
<nietzschette>
class Pointer;end
<Ox0dea>
Pointer = Class.new
FernandoBasso has joined #ruby
<nietzschette>
so, you're allocating heep to reference heep. makes sense
<Ox0dea>
Now *this* is pod racing!
<dtordable>
Don't initiate a flame war with a newcomer like I am...
<Ox0dea>
From whom did you steal that pedestal?
seitensei has quit [Ping timeout: 265 seconds]
Wsewolod has joined #ruby
Jardayn has joined #ruby
centrx has quit [Remote host closed the connection]
* dtordable
serves cup of tea to everyone here...
<nietzschette>
def Pointer.->(a);a;end
framling has quit [Ping timeout: 246 seconds]
millerti has joined #ruby
<Ox0dea>
nietzschette: Can't have adjecent binops. :<
<Ox0dea>
You'd have to say something like `ptr-~a`, which looks terrible.
<nietzschette>
you're right, i should have irb'd it before suggesting it
<nietzschette>
well, not the full power, obviously.
scripore has quit [Quit: This computer has gone to sleep]
kfpratt has joined #ruby
sneakerhax has quit [Ping timeout: 250 seconds]
dtordable2 has joined #ruby
dtordable has quit [Ping timeout: 240 seconds]
<Ox0dea>
If it's not a problem to spin up a new process for each request, I'd advise sandboxing those instead.
celly_ has quit [Ping timeout: 265 seconds]
<nietzschette>
nah, they're all working with the same environment
<Papierkorb>
nietzschette: You could use something like Docker. Running user code in your app server, even if using something like a 'sandbox' gem, cries for security issues
<adaedra>
sandbox anyway.
ylbeys has quit [Remote host closed the connection]
pdkl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
Papierkorb: Why not systemd-nspawn?
aryaching has quit [Remote host closed the connection]
<Papierkorb>
Ox0dea: Never used it, Docker is what came to mind first
pdkl has joined #ruby
niceperl has joined #ruby
dtordable2 has quit [Client Quit]
dtordable has joined #ruby
<nietzschette>
well, at least I have options
agit0 has quit [Quit: zzzZZZ….]
mdw has joined #ruby
niceperl has quit [Remote host closed the connection]
<Papierkorb>
nietzschette: Has the code to be run on your server?
<Ox0dea>
nietzschette: I probably shouldn't have linked shikashi; letting Ruby watchdog Ruby is not a great idea.
<Papierkorb>
nietzschette: or is it more of a here-try-ruby sandbox type of thing?
rkazak_ has joined #ruby
aryaching has joined #ruby
pdkl has quit [Client Quit]
arooni_______ has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
prereflect has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nietzschette>
yeah, sort of like that
prereflect has joined #ruby
rgtk has quit [Remote host closed the connection]
nfk|laptop has joined #ruby
dfdfdf has quit [Quit: Leaving]
<Papierkorb>
nietzschette: http://opalrb.org/try/# you could use Opal. Not 100% coverage of Ruby, but as a first look probably enough
ico has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
vikaton has joined #ruby
kmckelvin has joined #ruby
<Papierkorb>
nietzschette: Benefit is that it runs completely in the users browser. There are no security issues on your end, as the user could at maximum "hack" their own session.
<nietzschette>
unfortunately, i'd like to allow multiple users into the same environment
<havenwood>
mruby on a toaster
<nietzschette>
and they're using a graphical front end provided by me
B1n4r10 has joined #ruby
celly_ has joined #ruby
govg has quit [Ping timeout: 265 seconds]
ta0 has joined #ruby
<Papierkorb>
nietzschette: then spawn a ruby process in its own cgroup with set quotas for ram, cpu, and everything, running as user nobody in its own 'empty' root. Don't use chroot(). Use Docker or, if you have systemd, take a look what it can do for you. This is no small undertaking.
govg has joined #ruby
pdoherty has quit [Remote host closed the connection]
<Papierkorb>
Make sure to understand what is actually a security-sandbox feature and what is not. Docker is not one, so that's really risky. chroot() is documented to be NOT one ($ man 2 chroot). Cgroups might be one, or not. It's really a crazy hard issue to get right
axsuul has quit [Ping timeout: 260 seconds]
celly has quit [Ping timeout: 260 seconds]
<Papierkorb>
You could migitate it by e.g. spinning up a small EC2 instance (or similar) and share it for some users, so they're not running code on your local app server. Among other things, this is what c9.io does (Practically, a multi-user Web IDE)
platzhirsch has quit [Quit: Leaving.]
celly_ has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
axl_ has quit [Ping timeout: 240 seconds]
axl__ is now known as axl_
harai has joined #ruby
thezanke has joined #ruby
sdwrage has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 240 seconds]
dn` has quit [Quit: dn`]
DarkElement_ has joined #ruby
ico has quit [Read error: Connection reset by peer]
dn` has joined #ruby
ico has joined #ruby
Cohedrin has joined #ruby
<DarkElement_>
What is the best way to avoid sql injection in ruby - mysql? I am doing an insert statement and need to do "VALUES ('#{var1}') but when the var1 is a sentence with something like "don't", then the quotation screws it up.
<DarkElement_>
I realize ruby-mysql has a prepare statement.
<Ox0dea>
DarkElement_: Prepared statements.
<Ox0dea>
Tada!
<DarkElement_>
XD
<DarkElement_>
Thanks for help :D
startupality has quit [Quit: startupality]
DarkElement_ has quit [Quit: Leaving]
last_staff has quit [Quit: last_staff]
PedramT has quit [Read error: Connection reset by peer]
delsol has quit [Quit: delsol]
nanoz has quit [Ping timeout: 240 seconds]
scripore has joined #ruby
dfinninger has joined #ruby
last_staff has joined #ruby
PedramT has joined #ruby
GinoManWorks has joined #ruby
azgil has quit [Quit: Leaving]
PedramT has quit [Remote host closed the connection]
chipotle_ has quit [Ping timeout: 255 seconds]
sgambino has quit [Ping timeout: 245 seconds]
last_staff has quit [Remote host closed the connection]
roshanavand has joined #ruby
n00bdev has joined #ruby
chipotle has joined #ruby
robh71 has joined #ruby
karapetyan has quit [Remote host closed the connection]
ico has quit [Read error: Connection reset by peer]
<n00bdev>
hey guys, is there anyway to set a range when the ending number in the range is a instance variable? ruby isnt being nice to me