<apeiros>
there's 2 different things: a) effectively elapsed days, and b) calendars
<apeiros>
calendars can have gaps
<apeiros>
effectively elapsed days otoh are a fact
<jhass>
well sure, I'm talking about the calendar years of course
bronson has joined #ruby
mistermocha has joined #ruby
Notte has quit [Remote host closed the connection]
Limix has quit [Quit: Limix]
hectortrope has joined #ruby
mitchellhenke has joined #ruby
<apeiros>
jhass: well, that's the definition part I talked about :)
thinkswan has joined #ruby
<apeiros>
it then depends on what calendar you use. because gregorian wasn't invented before I think 1582, and in many parts of the world not used before I think 175x
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_honning_ has quit [Ping timeout: 244 seconds]
<apeiros>
oh, wow, actually even much later: "The last European country to adopt the reform was Greece, in 1923"
<apeiros>
and a difference of 1 day can mean a difference of 1 year in age
<apeiros>
that's why I said "issues of definition"
<apeiros>
region matters, calendars matter…
<apeiros>
heh, interesting link
ndrei has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
musashi1 has joined #ruby
<musashi1>
So i'm following along some examples in a ruby book and i'm confused as to an example. The code is here : http://pastebin.com/cka3scDD and I'm curious if someone would be so kind as to tell me how it gets to the last block where it says #now we can select a random throw...
<helpa>
Hi musashi1. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<musashi1>
o...kay - not sure if i should resubmit that
mitchellhenke has joined #ruby
Xoro__ has quit [Read error: No route to host]
work_op has joined #ruby
Channel6 has joined #ruby
sevvie has quit [Ping timeout: 256 seconds]
TheNet has joined #ruby
<TheNet>
is hash.sort.to_h.values the best way to get an array of values sorted by their key?
Xoro has joined #ruby
Xoro has quit [Client Quit]
<work_op>
so is Well Grounded Rubyist a good book?
Renich has quit [Quit: Lost terminal]
Xoro has joined #ruby
<centrx>
work_op, By near-unanimous consent of Great Rubyists
<work_op>
excellent
<apeiros>
TheNet: it will also sort by value if keys are order-equal
<apeiros>
which may be good or bad - depending on your values and context
<TheNet>
apeiros: awesome
sevvie has joined #ruby
Wolland has joined #ruby
enebo has joined #ruby
marr has quit [Ping timeout: 246 seconds]
Sawbones_ has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
Dakuan has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 255 seconds]
juanca_ has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
enebo has quit [Quit: enebo]
swgillespie has joined #ruby
JoshGlzBrk has joined #ruby
robustus|Off has joined #ruby
robustus|Off is now known as robustus
vim_shimm has joined #ruby
Papierkorb__ has joined #ruby
Cork has quit [Ping timeout: 264 seconds]
sevvie has joined #ruby
jerematic has joined #ruby
Papierkorb_ has quit [Ping timeout: 264 seconds]
christiandsg has joined #ruby
vim_shimm has quit [Ping timeout: 244 seconds]
Feyn has joined #ruby
enebo has joined #ruby
jerematic has quit [Ping timeout: 252 seconds]
sankaber has joined #ruby
hpoydar has joined #ruby
zacts has joined #ruby
sevvie has quit [Ping timeout: 256 seconds]
martinbmadsen has quit [Ping timeout: 256 seconds]
jwinder has quit [Ping timeout: 265 seconds]
hpoydar has quit [Ping timeout: 244 seconds]
plashchynski has quit [Quit: plashchynski]
krisquigley has joined #ruby
lordkryss has quit [Quit: Connection closed for inactivity]
Xoro has quit [Read error: Connection reset by peer]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts has quit [Quit: leaving]
riotjones has joined #ruby
krisquigley has quit [Ping timeout: 252 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JDiPierro has quit [Remote host closed the connection]
deol has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
riotjones has quit [Ping timeout: 252 seconds]
Xoro has joined #ruby
Aswebb__ has quit [Remote host closed the connection]
Renich has joined #ruby
Xoro has quit [Client Quit]
tus has joined #ruby
Xoro has joined #ruby
overcrush has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
_1_minecraft has joined #ruby
<_1_minecraft>
are you a girl
Caius has quit [Ping timeout: 276 seconds]
JDiPierro has joined #ruby
<Nilium>
Someone might want to ban that bot.
<Radar>
On it
jonr22 has joined #ruby
_1_minecraft was kicked from #ruby by ChanServ [User is banned from this channel]
<Nilium>
Cheers.
charliesome has joined #ruby
jack_rabbit has joined #ruby
cacocola has joined #ruby
<Radar>
np
<Radar>
bbl
bronson has quit [Ping timeout: 255 seconds]
Renich has quit [Ping timeout: 255 seconds]
christiandsg has quit [Remote host closed the connection]
<greedo>
github pages is offline
christiandsg has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
basiclaser has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
msimkins has quit [Ping timeout: 252 seconds]
Aswebb_ has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
djellemah_ has quit [Ping timeout: 256 seconds]
<centrx>
whoa
hectortrope has quit [Quit: WeeChat 1.0.1]
<greedo>
""The attack is aimed at two popular Github projects, Great Fire and CN-NY Times, that help Chinese citizens get around their government's restrictive online censors to access blocked content."
Papierkorb has joined #ruby
<centrx>
that link is from yesterday though and said it started March 26
teddyp1cker has quit [Remote host closed the connection]
sivsushruth has joined #ruby
sigurding has quit [Quit: sigurding]
wottam has joined #ruby
DavidDudson has quit [Ping timeout: 252 seconds]
Synthbread has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
macoecho has joined #ruby
teddyp1cker has joined #ruby
scripore has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
wldcordeiro has joined #ruby
gsd has joined #ruby
Alphazzz has quit [Quit: Connection closed for inactivity]
sivsushruth has joined #ruby
cientifico has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
mloveless has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
sivsushruth has joined #ruby
bim has joined #ruby
Sawbones has quit [Remote host closed the connection]
sigurding has joined #ruby
Sawbones has joined #ruby
zacts has quit [Quit: leaving]
bronson has quit [Remote host closed the connection]
Zggb has joined #ruby
bim has quit [Ping timeout: 255 seconds]
krisquigley has joined #ruby
_akers has quit [Quit: leaving]
pen has joined #ruby
Wolland has joined #ruby
<Zggb>
Hello, guys. Can anyone help me with nested model. How I can create a parent model, from child? In console it's simple. I'm using method ".build_user". But what I need to include in my private Params in nested controller? Or I can only create parent at first and use accepts_nested_attributes? Thanks in advance
krisquigley has quit [Ping timeout: 252 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
jlast has joined #ruby
Megtastique has quit []
Sawbones has quit [Remote host closed the connection]
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Alayde has joined #ruby
thinkswan has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
<apeiros>
Zggb: #rubyonrails is probably better suited for this
astrobunny has joined #ruby
sn0wb1rd has quit [Ping timeout: 245 seconds]
aswen has joined #ruby
<Alayde>
If I'm writing a module that has multiple methods and I want say, a base url instance variable available to all of those methods. What's the best way to accomplish that?
<Alayde>
er. a 'base_url' variable rather
jonr22 has joined #ruby
sigurding has quit [Quit: sigurding]
thinkswan has quit [Ping timeout: 265 seconds]
Hounddog has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
<Zggb>
apeiros: thanks
wldcordeiro has quit [Ping timeout: 265 seconds]
astrobunny has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
jayeshsolanki has joined #ruby
senayar has joined #ruby
aswen has quit [Ping timeout: 248 seconds]
Sawbones has joined #ruby
sn0wb1rd has joined #ruby
senayar has quit [Ping timeout: 265 seconds]
DavidDudson has joined #ruby
thinkswan has joined #ruby
sivsushruth has quit [Ping timeout: 252 seconds]
sivsushruth has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
AlexRussia has quit [Ping timeout: 272 seconds]
sivsushruth has joined #ruby
blackmesa has joined #ruby
vim_shimm has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
jayeshsolanki has quit [Ping timeout: 248 seconds]
sivsushruth has joined #ruby
astrobunny has quit [Ping timeout: 252 seconds]
vim_shimm has quit [Ping timeout: 250 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
jayeshsolanki has joined #ruby
sivsushruth has joined #ruby
antgel has quit [Ping timeout: 248 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
antgel has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
jerematic has joined #ruby
Sawbones has quit [Remote host closed the connection]
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
jerematic has quit [Ping timeout: 255 seconds]
hpoydar has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
ponga has joined #ruby
juanpablo__ has joined #ruby
bronson has joined #ruby
sivsushruth has joined #ruby
keen__________29 has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
rkgudboy has joined #ruby
keen__________28 has quit [Ping timeout: 250 seconds]
juanpablo__ has quit [Ping timeout: 245 seconds]
sivsushruth has joined #ruby
Synthbread has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hpoydar has quit [Ping timeout: 272 seconds]
bronson has quit [Ping timeout: 252 seconds]
quimrstorres has joined #ruby
xcombelle has joined #ruby
bim has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.1.1]
relix has joined #ruby
lkba has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
jlast has joined #ruby
bim has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
rkgudboy has quit [Ping timeout: 255 seconds]
jheg has joined #ruby
quimrstorres has quit [Remote host closed the connection]
sivsushruth has quit [Read error: Connection reset by peer]
Joufflu has quit [Quit: Peace]
sivsushruth has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
_ixti_ has joined #ruby
cacocola has joined #ruby
ixti has quit [Ping timeout: 264 seconds]
sandelius has joined #ruby
alexherbo2 has joined #ruby
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
Takle has joined #ruby
Wolland has quit []
Wolland has joined #ruby
DeathCode has joined #ruby
<DeathCode>
hello
<DeathCode>
is ruby used for managing databases in web servers?
alexherbo2 has quit [Client Quit]
senayar has joined #ruby
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
<riceandbeans>
ruby is used for many things
<DeathCode>
ye
<apeiros>
DeathCode: you can use ruby to manage databases, yes
<DeathCode>
thats what i want to do
<DeathCode>
i want ruby to manage profiles on a web server
senayar has quit [Remote host closed the connection]
mloveless has quit [Remote host closed the connection]
jeromelanteri has quit [Max SendQ exceeded]
jeromelanteri has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
benlieb_ has quit [Quit: benlieb_]
lolmaus has joined #ruby
ominari has quit [Quit: Be back later ...]
lemur has quit [Remote host closed the connection]
lordkryss has joined #ruby
bruno- has joined #ruby
<gr33n7007h>
DeBot: !hangman ruby
<DeBot>
␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
sivsushruth has quit [Ping timeout: 256 seconds]
DEA7TH has joined #ruby
pen has quit []
<gr33n7007h>
DeBot: AEIOU
<DeBot>
␣e␣␣␣␣␣␣␣␣␣␣e␣au␣␣␣␣o␣␣ [i] 1/12
<gr33n7007h>
DeBot: :#
<DeBot>
␣e␣::␣␣␣␣::␣e␣au␣␣␣␣o␣␣ [i#] 2/12
<gr33n7007h>
DeBot: n
<DeBot>
Ne␣::␣␣␣␣::␣e␣au␣␣␣␣o␣␣ [i#] 2/12
<gr33n7007h>
DeBot: t
<DeBot>
Net::␣TT␣::␣e␣au␣t␣␣o␣t [i#] 2/12
<gr33n7007h>
DeBot: h
<DeBot>
Net::HTT␣::␣e␣au␣t␣␣o␣t [i#] 2/12
<gr33n7007h>
DeBot: p
<DeBot>
Net::HTTP::␣e␣au␣t␣po␣t [i#] 2/12
<gr33n7007h>
DeBot: d
<DeBot>
Net::HTTP::de␣au␣t␣po␣t [i#] 2/12
<gr33n7007h>
DeBot: f
<DeBot>
Net::HTTP::defau␣t␣po␣t [i#] 2/12
<gr33n7007h>
DeBot: l
<DeBot>
Net::HTTP::default␣po␣t [i#] 2/12
Dakuan has quit [Remote host closed the connection]
<gr33n7007h>
DeBot: lr
<DeBot>
Net::HTTP::default␣port [i#] 2/12
sivsushruth has joined #ruby
<gr33n7007h>
DeBot: .
<DeBot>
Net::HTTP::default␣port [i#.] 3/12
<gr33n7007h>
drrr
<sevenseacat>
DeBot: _
<DeBot>
Net::HTTP::default_port [i#.] 3/12 You won!
<sevenseacat>
snipe!
<apeiros>
hehe
<gr33n7007h>
lol
<Ove___>
Snippa
jeromelanteri has quit [Ping timeout: 264 seconds]
<apeiros>
ah, right - mind a pm sevenseacat?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat>
apeiros: pm away
bruno- has quit [Ping timeout: 256 seconds]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
vim_shimm has joined #ruby
overcrush has quit [Quit: sleeeeeeep zzz]
jerematic has joined #ruby
alexherbo2 has joined #ruby
sdothum has joined #ruby
vim_shimm has quit [Ping timeout: 256 seconds]
max96at|off is now known as max96at
chihhsin has joined #ruby
sivsushruth has quit [Ping timeout: 256 seconds]
sivsushruth has joined #ruby
jerematic has quit [Ping timeout: 265 seconds]
juanpablo__ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
juanpablo__ has quit [Ping timeout: 256 seconds]
nszceta has joined #ruby
jeromelanteri has joined #ruby
lkba_ has joined #ruby
xenokiller has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
<Alayde>
Is there any particular trick to using mixins when your modules/classes are in different files?
xenokiller has quit [Ping timeout: 252 seconds]
<jhass>
no
elaptics_away is now known as elaptics
kyrylo has joined #ruby
<Alayde>
Huh. I must be doing something wrong. I've got two files: lib/get_weather.rb (class) and lib/generate_url.rb (module). 'include GenerateUrl' inside of the GetWeather class returns the following: lib/get_weather.rb:2:in `<class:GetWeather>': uninitialized constant GetWeather::GenerateUrl (NameError)
<shevy>
Alayde then you do not require that other file
Vile` has joined #ruby
<shevy>
Alayde you must pull it in first via load() or require()
davedev24_ has quit [Remote host closed the connection]
<Alayde>
shevy: When going the route of doing "require_relative 'generate_url.rb'", my code then complains that the methods defined in the GenerateUrl module don't exist :(
Zggb has quit [Quit: Connection closed for inactivity]
<shevy>
nah
<jhass>
how do you call them?
<shevy>
you must be doing something wrong Alayde - whole ruby works fine as it via require
<Alayde>
shevy: Oh I'm sure I am, it's awful early and I'm still learning this shit
<shevy>
try on two small test files perhaps
<shevy>
>> module Foo; def hi; p 'hi'; end; end; class Bar; include Foo; end; Bar.new.hi
<helpa>
Alayde: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
<Alayde>
jhass: I'm in the midst of putting it into a gist
<Alayde>
but I want to try a thing or two first, bear with me
<shevy>
yeah it is often easier to work on less lines of code
<Alayde>
Also if I'm like, organizing this code in a completely senseless way let me know. Most of my ruby experience is with single files that include multiple functions, so I'm trying to get a better handle on breaking things out into classes
Zggb has joined #ruby
Zai00 has joined #ruby
jlast has joined #ruby
mengu has quit [Remote host closed the connection]
Sirupsen has joined #ruby
<jhass>
Alayde: small tip for you future gists: you can add multiple files and choosing a filename ending in .rb turns on syntax highlighting ;)
bim has quit [Ping timeout: 250 seconds]
<Alayde>
jhass: Roger that, I'll keep that in mind for future gists
<jhass>
so, why did you remove the include?
<jhass>
that was closer to the correct solution
<jhass>
modules don't have a .new, only classes do
fgo has joined #ruby
<Alayde>
ah yeah, that was part of my failed testing
<Alayde>
but also good to know lol
<shevy>
you add include GenerateUrl
<shevy>
in your class
<shevy>
and in the file of your class, you require that module
sivsushruth has quit [Ping timeout: 265 seconds]
Sirupsen has quit [Remote host closed the connection]
<Alayde>
Oh?
Sirupsen has joined #ruby
sivsushruth has joined #ruby
<Alayde>
shevy: in doing that, I get the following: undefined method `current_weather_url' for GenerateUrl:Module
<Alayde>
(the .new's have been removed)
AlexRussia has joined #ruby
<shevy>
ok so
<shevy>
why do you call it on the module?
<jhass>
include adds the methods as instance methods to the class
<shevy>
and please update the gist in such a way as that the code you run can be reproducible for others
mengu has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 250 seconds]
yqt has joined #ruby
<jhass>
yeha, nothing really identifying in that code
sephilix has quit [Remote host closed the connection]
<adaedra>
can be anything
paradoja has joined #ruby
Feyn has quit [Ping timeout: 264 seconds]
jlast has quit [Ping timeout: 265 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
Macaveli has joined #ruby
edwinvdgraaf has joined #ruby
<naftilos76>
Hi, i am getting this in apache's error.log : "App 2834 stderr: [sudo] password for naftilos76:" when i am executing terminal commands by using this: `echo "my_pass" | sudo -S sh -c "df -h"` in ruby 2.2.0 . The same thing happens for any command not just df -h . I am in an ubuntu 14.04 server. Can anybody guess what may be the culprit?
<adaedra>
Because you’re trying to execute sudo from a ruby script
<adaedra>
Which is run by your webserver
<naftilos76>
If i rub this in irb i get no errors in apache's log
<naftilos76>
run
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
<adaedra>
because when you run it from irb, you’re not running it in apache context but IRB one
sephilix has joined #ruby
ltd has quit [Remote host closed the connection]
<adaedra>
passing your password through a pipe to sudo is not a good idea at all
<naftilos76>
adaedra: Is there anything i can do to prevent those errors from filling the error.log? Maybe something in apache's vhosts?
quimrstorres has quit [Remote host closed the connection]
<naftilos76>
is there another way to execute terminal commands when you are a sudo user?
<adaedra>
You may prefer to add the command you want to run as NOPASSWD for apache’s user to be able to run commands, even if it’s not very good
<adaedra>
The best solution would be to run everything in current user, why do you need to run it as sudo?
FrenchieUser12 has quit [Quit: Page closed]
<naftilos76>
i tried that but for some reason it was denied
<naftilos76>
i will probably have to read some more on that
<adaedra>
look at how sudo works
<adaedra>
but passing it like that is really bad
<naftilos76>
i get it, thanks
mengu has joined #ruby
mengu has joined #ruby
<jhass>
never run stuff as root to "fix things"
<jhass>
if you don't exactly understand why something wouldn't work under any circumstances as non-root, research until you do, don't just use root
stef204 has quit [Ping timeout: 252 seconds]
Takle has joined #ruby
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
<naftilos76>
jhass: you are right, i have messed up an entire installation in the past and i had to reinstall
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
charliesome has joined #ruby
juanpablo__ has joined #ruby
sevvie has joined #ruby
Dakuan has joined #ruby
ltd has joined #ruby
vim_shimm has joined #ruby
juanpablo__ has quit [Ping timeout: 264 seconds]
Dakuan has quit [Ping timeout: 250 seconds]
sjums has joined #ruby
martinbmadsen has joined #ruby
vim_shimm has quit [Ping timeout: 252 seconds]
hpoydar has joined #ruby
FaresKAlaboud has quit [Quit: Quit~]
martinbmadsen has quit [Ping timeout: 250 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_tpavel has joined #ruby
macoecho has joined #ruby
mac_ has joined #ruby
FaresKAlaboud has joined #ruby
_tpavel has quit [Remote host closed the connection]
koi has joined #ruby
hpoydar has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
xcombelle has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
Cust0sL1men has quit [Ping timeout: 248 seconds]
sjums has left #ruby [#ruby]
<pagios>
i have a hash with 3 keys and values i want to extract only 2 keys and values how can i easily do this?
jenrzzz has joined #ruby
riotjones has joined #ruby
Vile` has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
bMalum has joined #ruby
bMalum has quit [Remote host closed the connection]
Vile` has joined #ruby
riotjones has quit [Ping timeout: 265 seconds]
arturhoo has joined #ruby
<pagios>
like i have hash1 = {key1->value,key2->value2} i want hash2 to contain only key1->value1
bronson has quit [Ping timeout: 264 seconds]
sevvie has quit [Ping timeout: 250 seconds]
sevvie has joined #ruby
Megtastique has joined #ruby
amystephen has joined #ruby
charliesome has quit [Quit: zzz]
<jhass>
pagios: rails/activesupport available?
<pagios>
nop
<jhass>
then #select
sevvie has quit [Ping timeout: 246 seconds]
A205B064 has joined #ruby
jlast has joined #ruby
sevvie has joined #ruby
<pagios>
h.select {|k,v| k == "time" || k == "seq" } jhass ?
<jhass>
yeah
<jhass>
%w(time seq).include? k if you have many keys
mostlybadfly has quit [Quit: Connection closed for inactivity]
<pagios>
that will actually modify h no need to do h = h.select right?
davedev24_ has joined #ruby
shanlar has quit [Read error: Connection reset by peer]
<jhass>
no, it'll return a new one
<jhass>
.select! would modify
<pagios>
cool
<pagios>
thanks
jlast has quit [Ping timeout: 256 seconds]
shanlar has joined #ruby
palms has quit [Ping timeout: 264 seconds]
Zggb has quit [Quit: Connection closed for inactivity]
jack_rabbit has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
sigurding has joined #ruby
freerobby has quit [Client Quit]
jack_rabbit has joined #ruby
vim_shimm has joined #ruby
Papierkorb has joined #ruby
tb1 has joined #ruby
kirun has joined #ruby
palms has joined #ruby
nfk has joined #ruby
charliesome has joined #ruby
krisquigley has joined #ruby
Macaveli has quit [Ping timeout: 264 seconds]
antgel has quit [Ping timeout: 252 seconds]
antgel has joined #ruby
sevvie has quit [Ping timeout: 250 seconds]
sevvie has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
krisquigley has quit [Ping timeout: 255 seconds]
yqt has quit [Ping timeout: 272 seconds]
juanpablo__ has joined #ruby
Dakuan has joined #ruby
Limix has joined #ruby
roger_rabbit has joined #ruby
bricker has joined #ruby
roger_rabbit has quit [Changing host]
roger_rabbit has joined #ruby
juanpablo__ has quit [Ping timeout: 272 seconds]
jheg has joined #ruby
ghr has joined #ruby
Dakuan has quit [Ping timeout: 250 seconds]
tb1 has quit [Quit: WeeChat 1.0.1]
dfinninger has joined #ruby
willharrison has joined #ruby
jheg has quit [Client Quit]
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
bricker has quit [Ping timeout: 265 seconds]
jerematic has joined #ruby
vim_shimm has quit [Ping timeout: 244 seconds]
Spami has joined #ruby
Pupeno has quit [Quit: Leaving...]
<pagios>
jihai am having a weird problem , defing an empty array as myarray = [] then pushing some elements into it i get the first element on point1 instead of position0 like this: [ [],{"time":1427635277,"value":51},{"time":1427635278,"value":92}... ]
jonr22 has joined #ruby
<pagios>
jhass: ^
sigurding has quit [Quit: sigurding]
<jhass>
!code
<helpa>
We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
nateberkopec has quit [Read error: Connection reset by peer]
einarj has joined #ruby
nateberkopec has joined #ruby
mengu has quit [Remote host closed the connection]
timonv has joined #ruby
<pagios>
jhass: point.select!{|key,val| key =="time" || key =="value"} where point is: [{"time"=>1427637190, "sequence_number"=>59490001, "value"=>11}, ... ] is not working
ghr has quit [Ping timeout: 265 seconds]
<pagios>
i get an empty array
dfinninger has quit [Remote host closed the connection]
<jhass>
yes
<jhass>
you call select on the array
<jhass>
so key is the hash
jeramy_s has joined #ruby
<jhass>
and val is nil
<pagios>
point is the array and i am calling select on the array
<jhass>
yes
<pagios>
yea but puts point reutns an empty array
<jhass>
yes
<jhass>
that's expected
<pagios>
jhass: hehe i want it to return the array with value and time only without the sequenece number
<jhass>
I got that
<jhass>
calling select on the array won't magically call it on the hashes though
<jhass>
you have to call it on the hashes
jenrzzz has quit [Ping timeout: 265 seconds]
sevvie has quit [Ping timeout: 256 seconds]
Takle has quit [Remote host closed the connection]
bronson has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claptor has joined #ruby
lolmaus has joined #ruby
<pagios>
jhass: so i have to loop on the array?
<jhass>
yes
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
lolmaus has quit [Client Quit]
bronson has quit [Ping timeout: 246 seconds]
<pagios>
jhass: something like : point.each do |element| element.select{|key,val| key =="time" || key =="value"}
ToApolytoXaos has joined #ruby
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
<jhass>
remember .select will just return the modified value
<tongcx>
hi guys, why there is the step of exchange access token with auth grant with auth server? Why cannot we just use auth grant to acess resource?
<pagios>
jhass: sorry bu i didnt get it , i am using a select on the hash as you suggested, should it filter it?
<tongcx>
waht does that separate line means? Where does that come from?
<jhass>
tongcx: because you want to reduce the times that token goes over the wire
doodlehaus has quit [Remote host closed the connection]
<jhass>
pagios: are you in pry/irb?
jheg has joined #ruby
teddyp1cker has joined #ruby
<pagios>
yea i have it installed
<tongcx>
jhass: why that helps?
<jhass>
play around with .select and .map until they make sense for you
<jhass>
tongcx: the access token usually expires a lot more often, so if somebody can intercept it the damage is more limited
<jhass>
er, a lot quicker
koi has quit [Read error: Connection reset by peer]
<jhass>
I might not even need to deauthorize the application
wicope has joined #ruby
<tongcx>
jhass: i see. Also seems different auth strategies leads to different kind of grants, but you may want only one kind of token. Is that another reason?
<jhass>
in fact in a proper implementation just getting a new access token should invalidate the old one
<tongcx>
jhass: very good point
<jhass>
so it can be transparent to the user
kreeves has joined #ruby
stef204 has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
<jhass>
I'm not quite following what you mean by you last question
<pagios>
ok i see jhass so it should be select!
<jhass>
pagios: it can work with either
<jhass>
you need to decide/recognize what you want/need
urbanmonk has joined #ruby
<pagios>
yea map creates a new array, the other overwrites the current
<jhass>
there's also .map!
nuy_19031046 has quit [Max SendQ exceeded]
<tongcx>
jhass: i mean you may have different auth strategies, if you directly use auth grant to access resource, then resource servers need to deal with all different kind of grants
VBlizzard has joined #ruby
<tongcx>
jhass: from a pointview of software design, that doesn't seem separate concerns enought
<jhass>
oh, ah well, you would need something to differentiate the users anyway and could apply different authorization upon that
<jhass>
in your scheme
nuy_19031046 has joined #ruby
<tongcx>
jhass: right
<tongcx>
jhass: do you know where does the separating line come from? the '---------------'
<tongcx>
jhass: just before your line on 10:35:36
flcn has quit [Quit: Be back later ...]
<jhass>
it's a thing your client does
<jhass>
weechat from your user
<jhass>
try switching to a different channel and coming back ;)
Dakuan has joined #ruby
_blizzy_ has quit [Ping timeout: 252 seconds]
<tongcx>
jhass: disappeared
daveomcd has quit [Quit: Leaving]
<tongcx>
jhass: why? what's the point ot that line?
Flcn__ has joined #ruby
<jhass>
it's a marker for how far you've read
VBlizzard is now known as _blizzy_
jlast has joined #ruby
<jhass>
there most certainly is some setting to turn it off ;)
_honning_ has joined #ruby
<jhass>
yep, weechat.look.read_marker
felltir has joined #ruby
<jhass>
but I find it quite useful personally
nuy_19031046 has quit [Max SendQ exceeded]
Sawbones has joined #ruby
noway has quit [Ping timeout: 264 seconds]
Sembei has quit [Ping timeout: 264 seconds]
Dakuan has quit [Ping timeout: 250 seconds]
<tongcx>
jhass: thanks, it's useful
jamto11 has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
Deele has quit [Ping timeout: 256 seconds]
Sirupsen has joined #ruby
Sawbones has quit [Ping timeout: 244 seconds]
noway has joined #ruby
Azure has quit [Quit: My MBP went to sleep.]
doodlehaus has joined #ruby
roolo has quit [Remote host closed the connection]
Filete has joined #ruby
Deele has joined #ruby
mattjbarlow has left #ruby ["WeeChat 1.1.1"]
juanpablo__ has joined #ruby
einarj has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
Mark-z has joined #ruby
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doodlehaus has quit [Remote host closed the connection]
juanpablo__ has quit [Ping timeout: 256 seconds]
Sembei has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
<pagios>
by default sinatra returns a GET?
AlexRussia has joined #ruby
wicope has quit [Quit: Leaving]
jeramy_s has joined #ruby
Sawbones has joined #ruby
Mark-z has quit []
bronson has joined #ruby
Azure has joined #ruby
Pharaoh2_ has joined #ruby
<pagios>
jhass: my sinatra is returning http://pastie.org/10060874 which can be correctly viewed in the browser, now if i try to read that in javascript i am receiving them as http://snag.gy/vhILL.jpg
ascarter has joined #ruby
shredding has joined #ruby
<jhass>
so what's [0] in there?
Sawbones has quit [Remote host closed the connection]
<shevy>
a method call
<shevy>
jhass did so much crystal that he forgot ruby!
<pagios>
is it fine to return this way from sinatra? ealtimeTemperature.to_json
Pharaoh2 has quit [Ping timeout: 256 seconds]
<pagios>
or should i use "#{realtimeTemperature.to_json}"
bronson has quit [Ping timeout: 256 seconds]
<jhass>
to_json returns a string
enebo has joined #ruby
<jhass>
interpolating it into another string won't change anything
<atmosx>
github is under attack by the chinese government (according to the WSJ)
gsd has joined #ruby
lordkryss has joined #ruby
jonr22 has quit [Ping timeout: 255 seconds]
CustosLimen has joined #ruby
<banister>
why on earth would someone want to ddos github
<jhass>
eh, well, attribution is always hard
<centrx>
They host software for avoiding Chinese surveillance
bim has quit [Remote host closed the connection]
<centrx>
that's the top theory currently I believe
silkfox has quit [Ping timeout: 252 seconds]
Notte has joined #ruby
hectortrope has quit [Quit: WeeChat 1.0.1]
bim has joined #ruby
<atmosx>
centrx: hm, not convincing enough IMHO.
Azure has quit [Ping timeout: 265 seconds]
<work_op>
WSJ is bullshit tho....
dfinninger has quit [Remote host closed the connection]
<atmosx>
+1
<atmosx>
bbl
<Papierkorb_>
Could always be dumb kids trying to blackmail github into paying them
sevvie has quit [Read error: Connection reset by peer]
agrinb has quit [Remote host closed the connection]
<jhass>
dunno, 80+ hours is a bit too much for kids though
Notte has quit [Remote host closed the connection]
<jhass>
usually
<work_op>
no, they know what they're doing. anybody who can keep github crawling for almost 4 days now has gotta know what they're doing
agrinb has joined #ruby
dfinninger has joined #ruby
<Papierkorb_>
Botnet
<work_op>
however, it'd be the perfect crime if some group was putting a bunch of traffic thru china, to cover their tracks
<jhass>
Papierkorb_: botnet is not as adaptive as this attack
<jhass>
it's certainly a component though
<Papierkorb_>
well as far as I heard 'only' HTTP traffic coming from china to baidu is hijacked by some network router, but i'd be surprised if that'd be enough to shoot GH down
<vhlfd>
China doesn't like git. :(
<Papierkorb_>
vhlfd: Of course not
<Papierkorb_>
with SVN branching is a social event
<Papierkorb_>
time to preach communism and work-more-for-foreign-companies
mrsolo has quit [Quit: Leaving]
<work_op>
papier, a billion people live in china, it's more than enough, as evidenced by the past 83~ hours
Azure has joined #ruby
<Papierkorb_>
work_op: Not those, afaik, only traffic that goes *out* of china (because you loaded baidu.com in your browser) is hijacked
Sawbones has quit [Remote host closed the connection]
<Papierkorb_>
not traffic inside china. Still afaik.
sdogruyol has joined #ruby
<work_op>
ur missing the point, it's the volume that makes it possible
<jhass>
I really doubt that was the only component of the attack
hpoydar has quit [Remote host closed the connection]
tus has quit [Ping timeout: 250 seconds]
<Papierkorb_>
work_op: what volume? The volume of people living outside china requesting baidu?
agrinb has quit [Ping timeout: 256 seconds]
<Papierkorb_>
jhass: Yeah would be surprised too
SouL_I_ has quit [Ping timeout: 245 seconds]
Dakuan has joined #ruby
SouL has joined #ruby
jlast has joined #ruby
Sawbones has joined #ruby
sdogruyol has quit [Client Quit]
sankaber has joined #ruby
bim has quit [Remote host closed the connection]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aswen has quit [Ping timeout: 248 seconds]
matt1249 has joined #ruby
Notte has joined #ruby
Dakuan has quit [Ping timeout: 256 seconds]
jlast has quit [Ping timeout: 256 seconds]
Sawbones has quit [Ping timeout: 265 seconds]
matt1249 has quit [Quit: Leaving]
fawkes1 has joined #ruby
overcrush has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
Aswebb__ has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Aswebb_ has quit [Read error: Connection reset by peer]
davispuh has quit [Remote host closed the connection]
macoecho has joined #ruby
mac_ has joined #ruby
fawkes1 has joined #ruby
jheg has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
Papierkorb__ has joined #ruby
fawkes1 has joined #ruby
fawkes1 has quit [Max SendQ exceeded]
rubytor has quit [Ping timeout: 265 seconds]
cacocola has joined #ruby
sevvie has joined #ruby
Papierkorb_ has quit [Ping timeout: 248 seconds]
astrobunny has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
starless has joined #ruby
tus has joined #ruby
asdffdas has joined #ruby
<asdffdas>
ruby is shit
<jhass>
asdffdas: yeah. How's your ruby going though, wrote anything awesome?
milesmatthias has joined #ruby
* asdffdas
urinates on jhass head
* asdffdas
dances around naked
bim has joined #ruby
<asdffdas>
jhass is a gaylord
towski_ has quit [Remote host closed the connection]
<asdffdas>
stupid bitchass punk
milesmatthias has quit [Remote host closed the connection]
<asdffdas>
jhass motherfucker
yqt has quit [Ping timeout: 264 seconds]
bim has quit [Remote host closed the connection]
<jhass>
asdffdas: bored?
<centrx>
I didn't know any of these things about jhass before
<jhass>
you know me, if there's nothing interrupted I like some fun ;)
<centrx>
jinx
<apeiros>
heh
<apeiros>
I'm fine. I almost pulled the hammer, then I noticed that you actually could have done that yourself, so I didn't.
RegulationD has joined #ruby
vtcsts has quit [Remote host closed the connection]
<jhass>
I pondered a /kick Offtopic though
<jhass>
that one just didn't have enough endurance
<jhass>
besides, they do that because they pull some weird kind of satisfaction of that, so why grant them that if it doesn't harm an existing conversation ;)
<jhass>
being banned/kicked that is
<apeiros>
centrx: aahaha, awesome log
quimrstorres has joined #ruby
tvw has quit []
<jhass>
oh you didn't know it?
<jhass>
:D
silkfox has quit [Ping timeout: 246 seconds]
<apeiros>
no
dfinninger has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
Papierkorb has joined #ruby
agrinb has joined #ruby
<jhass>
that's what my #haskell trainingscamp was refering to
quimrstorres has quit [Remote host closed the connection]
<apeiros>
I see
sankaber has quit [Ping timeout: 248 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
cacocola has quit [Remote host closed the connection]
relix has joined #ruby
Papierkorb__ has quit [Ping timeout: 250 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
f3lp has joined #ruby
quimrsto_ has joined #ruby
kirun has joined #ruby
sankaber has joined #ruby
colorados has joined #ruby
jimbo has joined #ruby
jimbo has left #ruby [#ruby]
quimrsto_ has quit [Remote host closed the connection]
dfinninger has joined #ruby
<atmosx>
weird, I run vhosts on my nginx config + ssl. From the iPhone the browser connects to the right vhost, when browsing from my sister's mac, all browser redirect to the wrong vhost.
OrbitalKitten has joined #ruby
lemur_ has joined #ruby
chinmay_dd has quit [Quit: Leaving]
<jhass>
old mac without SNI perhaps?
<jhass>
no idea how SNI support is with apple
dfinninger has quit [Remote host closed the connection]
<atmosx>
aaah
jerematic has joined #ruby
<atmosx>
yes
<jhass>
on windows it's since vista there iirc
<jhass>
OpenSSL since 0.9.8 I think?
<jhass>
f or so, I don't remember
oo_ has joined #ruby
<atmosx>
hm, I guess this means that's for an eshop it's better to use a dedicated VPS.
nettoweb has joined #ruby
<jhass>
some providers will also offer you to assign multiple IPs to a single one
<jhass>
which will work fine too, if configured correctly
lkba has joined #ruby
dfinninger has joined #ruby
<shevy>
you write haskell jhass?
<jhass>
no
Limix has joined #ruby
juanpablo__ has joined #ruby
lkba_ has quit [Ping timeout: 252 seconds]
sigurding has joined #ruby
jerematic has quit [Ping timeout: 248 seconds]
Rephiax has quit []
bim has joined #ruby
oo_ has quit [Ping timeout: 272 seconds]
naftilos76 has quit [Remote host closed the connection]
<atmosx>
Okay, I'm stupid blah. I found the *bug* ...
juanpablo__ has quit [Ping timeout: 245 seconds]
threh has joined #ruby
iml has joined #ruby
Joufflu has joined #ruby
livingstn has joined #ruby
Dakuan has joined #ruby
Shidash has quit [Remote host closed the connection]
hpoydar has quit [Remote host closed the connection]
jonr22 has quit [Client Quit]
blackmesa has joined #ruby
jlast has joined #ruby
benlieb_ has joined #ruby
bim has quit [Remote host closed the connection]
threh has quit [Ping timeout: 252 seconds]
centrx has quit [Quit: Shutting down, Please wait...]
threh has joined #ruby
martinbmadsen has joined #ruby
lolmaus has joined #ruby
astrobunny has quit [Remote host closed the connection]
kyrylo_ has joined #ruby
astrobunny has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
Megtastique has quit []
kyrylo has quit [Ping timeout: 255 seconds]
<musashi1>
So i'm following along some examples in a ruby book and i'm confused as to an example. The code is here : http://pastebin.com/cka3scDD and I'm curious if someone would be so kind as to tell me how it gets to the last block where it says #now we can select a random throw...
<helpa>
Hi musashi1. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
spiderbyte has joined #ruby
<jhass>
did you run the code? I somehow have my doubts it works
martinbmadsen has quit [Ping timeout: 244 seconds]
<musashi1>
yessir
<jhass>
at least in the way you presented it
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TheNet>
github = Website.find_by_url('https://github.com'); github.stop_ddos if github.ddos_active
<musashi1>
it gets tothe bottom for sure
Zai00 has joined #ruby
<jhass>
musashi1: well, it's not the code you run for sure, because what you pasted throws a syntax error
astrobunny has quit [Ping timeout: 250 seconds]
Alayde has joined #ruby
<atmosx>
I remember this game from Konstantin Haasse's book about Sinatra
elaptics is now known as elaptics_away
<musashi1>
@jhass what's the syntax error?
Shidash has joined #ruby
<musashi1>
@atmosx yep that's what it's from
jonr22 has joined #ruby
benlieb_ has quit [Quit: benlieb_]
<jhass>
it's missing an end
<TheNet>
^ line 17
<TheNet>
well, 19
<musashi1>
god damnit.. lol - i removed the end; it's there in the book
<jhass>
neither really
ParSalian has joined #ruby
<musashi1>
but i'm running it without it
<jhass>
I doubt that
jonr22 has quit [Client Quit]
<TheNet>
you should add the end regardless
<atmosx>
code works fine here
jonr22 has joined #ruby
<musashi1>
it had it on line 31
<jhass>
musashi1: exactly
<atmosx>
musashi1: it's not possible to run the code without an additional end at line 31
<TheNet>
musashi1: you can do this if you want it on one line though: halt 403, "You must throw one of the following: #{@throws}" unless @throws.include?(player_throw)
<TheNet>
dammit you beat me
<musashi1>
oooooohh
framling has joined #ruby
<jhass>
er, that extra end I mean, you get it
<jhass>
btw I hope that book mentions that params[:something].to_sym is actually a horrible idea
bim has joined #ruby
<musashi1>
I do get it, thank you
<musashi1>
it hasn't siad that that I have seen
<musashi1>
why is that a bad idea?
krisquigley has quit [Ping timeout: 245 seconds]
milesmatthias has joined #ruby
jonr22 has quit [Client Quit]
ParSalian has quit [Quit: WeeChat 1.1.1]
<jhass>
1) because until ruby 2.2 it would never be garbage collected and 2) Symbols are not for representing (user) data
doodlehaus has quit [Ping timeout: 250 seconds]
ParSalian has joined #ruby
sigurding has quit [Quit: sigurding]
musashi1 has quit [Quit: Leaving]
musashi1 has joined #ruby
musashi1 has quit [Client Quit]
musashi1 has joined #ruby
Megtastique has joined #ruby
<musashi1>
@jhass interesting.. thanks
lavros has quit [Quit: спать]
dfinninger has quit [Remote host closed the connection]
Frenchieuser12_ has joined #ruby
<Frenchieuser12_>
Is this the rails chanel too?
Megtastique has quit [Client Quit]
<ToApolytoXaos>
Frenchieuser12_: nope
<Frenchieuser12_>
Do you know the chanel?
<work_op>
if I have an array [a,b,c,d] where each item is a hash, what's the easiest way to find a[b][c][d]?
jonr22 has joined #ruby
<ToApolytoXaos>
Frenchieuser12_: the name of the whole project
agrinb has quit [Remote host closed the connection]
bronson has joined #ruby
agrinb has joined #ruby
jimms has joined #ruby
swgillespie has joined #ruby
f3lp has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
jonr22 has quit [Client Quit]
Cache_Money has quit [Quit: Cache_Money]
zorak8 has quit [Ping timeout: 246 seconds]
<jhass>
work_op: you mean where each item is a key of a nested hash?
<work_op>
hopefully
<jhass>
well, otherwise I can't make any sense out of your question
<work_op>
yes
jonr22 has joined #ruby
<jhass>
what guarantees do we have about key existence?
bronson has quit [Ping timeout: 256 seconds]
<work_op>
none
agrinb has quit [Ping timeout: 265 seconds]
<jhass>
.inject(hash) {|key, hash| (hash || {})[key] } then
Cache_Money has joined #ruby
<jhass>
er, |hash, key|
<work_op>
ok, inject is what i was looking for
<work_op>
i couldnt find fold, or reduce or anything
<jhass>
look harder, reduce exists as an alias of inject
<work_op>
ah
cacocola has joined #ruby
dseitz has joined #ruby
cientifico has quit [Ping timeout: 256 seconds]
Frenchieuser12_ has quit [Ping timeout: 246 seconds]
jonr2219 has joined #ruby
jonr22 has quit [Client Quit]
jonr22 has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
colorados has quit [Remote host closed the connection]
stefannilsson has joined #ruby
<work_op>
is it possible to convert a string to regexp object?
Takle has quit [Remote host closed the connection]
voidwalkr has joined #ruby
<stefannilsson>
hi all! can someone help out in having a true / false answer in case there has been any "recent" changes for the "empty string" handling of Ruby 2.2.0 (thinking back to Ruby 1.8?)?
<stefannilsson>
getting "no implicit conversion of nil into Hash" for some fluentd plugins I'm working with and I can see default values being assigned with "" as value.
quimrstorres has quit [Remote host closed the connection]
<centrx>
yh, ActiveRecord is very featureful. Sequel has some interesting things like a more SQL-oriented library with less abstraction. Sequel is probably faster too.
Filete has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<centrx>
yh, but going through that list on the link you provided, the listed advantages are not very significant
<ytti>
i've only used sequel, what features activerecord has that sequel is missing?
<centrx>
yh, "Allows you to avoid SQL code fragments 99% of the time, if you want and without screwing with core Ruby classes." - ActiveRecord may be more like 95%
nfk has quit [Remote host closed the connection]
decoponyo has quit [Quit: Leaving...]
<centrx>
yh, "Foreign key constraint support in migrations out of the box." - this functionality is now in ActiveRecord 4.2
<centrx>
yh, "Left join support. Heh." - this is incorrect. ActiveRecord supports left joins
<c355E3B>
The posting is a few years old, so take its comparisons with a grain of salt
Dakuan has quit [Remote host closed the connection]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ytti>
i'd guess if you're using rails, it's easier to get support to your problem when using activerecord
Sawbones has joined #ruby
<c355E3B>
If your smart about how you interface with either libary switching is not too bad
<ytti>
if using anything else, likely easier to get help as sequel user
<ytti>
writing abstraction layer between your orm and your application seems like lot of overhead
<ytti>
not sure i view it as smart, perfect is enemy of done
milesmatthias has quit [Remote host closed the connection]
hpoydar has joined #ruby
duncannz has joined #ruby
<yh>
ytti: I feel the same way. Besides it not bringing "business" value, maybe you could even argue it makes matters unnecessarily worse as now you've got to know 2 APIs: your facade and the implementation
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
deol has joined #ruby
mac_ has joined #ruby
macoecho has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sawbones has quit [Remote host closed the connection]
unixssh has joined #ruby
mistermocha has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<unixssh>
UnixSSH.com - free shells accounts with ruby :)
unixssh has left #ruby [#ruby]
mac_ has quit [Client Quit]
bigmac has joined #ruby
macoecho has quit [Client Quit]
<centrx>
yh, If you're not using Rails, I would pick based on a) which syntax you like better, b) if you have specific features or use cases in mind, see which one supports them
hpoydar has quit [Ping timeout: 250 seconds]
silkfox has joined #ruby
benlieb_ has quit [Quit: benlieb_]
hpoydar has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
ominari has joined #ruby
paradoja has quit [Ping timeout: 248 seconds]
<ytti>
my random, uneducated notion, if not rails, sequel every time
silkfox has quit [Ping timeout: 264 seconds]
<ytti>
if rails, maybe activerecord, if team has existing clue on it
blackmesa has joined #ruby
Otterpocket has quit [Quit: Leaving]
sevvie has quit [Remote host closed the connection]
hpoydar has quit [Ping timeout: 256 seconds]
sevvie has joined #ruby
doodlehaus has joined #ruby
ominari has quit [Ping timeout: 255 seconds]
jefus__ has quit [Ping timeout: 265 seconds]
relix has joined #ruby
hpoydar has joined #ruby
gsd has joined #ruby
Channel6 has quit [Quit: Leaving]
arietis has quit [Quit: Leaving.]
lolmaus has quit [Quit: Konversation terminated!]
SouL has quit [Remote host closed the connection]
unreal has quit [Ping timeout: 245 seconds]
m8 has quit [Quit: Sto andando via]
compac has joined #ruby
j_mcnally has joined #ruby
compac has left #ruby ["Leaving"]
quimrstorres has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
_KaszpiR_ has left #ruby [#ruby]
colorisco has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
dorei has joined #ruby
doodlehaus has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
zarubin has joined #ruby
RandyT has joined #ruby
quimrstorres has quit [Remote host closed the connection]
unreal has joined #ruby
marr has joined #ruby
Zamyatin has joined #ruby
jenrzzz has joined #ruby
DavidDudson has joined #ruby
Zamyatin has quit [Max SendQ exceeded]
hpoydar has quit [Remote host closed the connection]
DavidDudson has quit [Client Quit]
colorisco has quit [Quit: Leaving]
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
colorisco has joined #ruby
colorisco has quit [Client Quit]
Zamyatin has joined #ruby
colorisco has joined #ruby
martinbmadsen has quit [Ping timeout: 272 seconds]
DavidDudson has joined #ruby
jottr has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirun has quit [Quit: Client exiting]
quimrstorres has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
rbennacer has quit [Remote host closed the connection]
<shevy>
sort(guys, key=-_.height)
<shevy>
awesome
<shevy>
that's a smiley there
KC9YDN has joined #ruby
KC9YDN has joined #ruby
centrx has quit [Remote host closed the connection]
MrBeardy has quit []
centrx has joined #ruby
duncannz has quit [Ping timeout: 246 seconds]
threh has quit [Remote host closed the connection]
Megtastique has quit []
wldcordeiro has joined #ruby
mhib has quit [Remote host closed the connection]
cacocola has joined #ruby
<dorei>
shevy: have u converted to python? :p
jerematic has joined #ruby
Rarikon has joined #ruby
havenwood has quit [Remote host closed the connection]
max96at is now known as max96at|off
juanpablo__ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
<shevy>
dorei nah, just peeking at the enemy
jerematic has quit [Ping timeout: 252 seconds]
Sawbones has joined #ruby
pothibo has joined #ruby
riotjones has joined #ruby
<shevy>
I just hope that ruby has all of that covered as well
milesmatthias has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo__ has quit [Ping timeout: 272 seconds]
quimrstorres has quit [Remote host closed the connection]
bronson has joined #ruby
riotjones has quit [Ping timeout: 264 seconds]
spider-mario has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 252 seconds]
asmodlol has quit [Quit: Leaving]
milesmatthias has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 255 seconds]
JDiPierro has quit [Remote host closed the connection]
ghostpl_ has joined #ruby
cacocola has quit [Remote host closed the connection]
ragingcake_ has joined #ruby
sankaber has joined #ruby
Zai00 has quit [Quit: Zai00]
KC9YDN has quit [Ping timeout: 245 seconds]
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop_ has quit [Remote host closed the connection]
macoecho has joined #ruby
cacocola has joined #ruby
mac_ has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
zarubin has quit [Remote host closed the connection]
ominari has joined #ruby
ghostpl_ has quit [Ping timeout: 255 seconds]
merqlove has quit [Quit: Connection closed for inactivity]
Deele has joined #ruby
cacocola has quit [Remote host closed the connection]
_ixti_ has quit [Ping timeout: 244 seconds]
Flcn__ has quit [Quit: Be back later ...]
KC9YDN has joined #ruby
kraljev11 has quit [Quit: kraljev11]
_ixti_ has joined #ruby
ominari has quit [Ping timeout: 265 seconds]
sevvie has quit [Ping timeout: 255 seconds]
bonhoeffer has joined #ruby
<bonhoeffer>
hey -- more a stats question than a ruby question . . . but the ruby pdf library only has Y = normpdf(X) -- no accounting for different mean, variance, etc -- i think i remember this doesn't matter . . . true?
iamninja has quit [Read error: Connection reset by peer]
<bonhoeffer>
meaning, you can adjust the input for any mean and variance
iamninja has joined #ruby
kubunto has left #ruby [#ruby]
Megtastique has joined #ruby
krisquigley has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
Sawbones has quit [Remote host closed the connection]
duncannz has joined #ruby
pothibo has quit [Quit: pothibo]
GinoMan has quit [Ping timeout: 245 seconds]
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
sevvie has joined #ruby
<shevy>
you could try to ask in #R
<shevy>
they are math geniuses over there
cacocola has joined #ruby
lemur_ has joined #ruby
krisquigley has quit [Ping timeout: 248 seconds]
<centrx>
What is the "ruby pdf library"
zarubin has joined #ruby
<shevy>
hehe
<shevy>
the ruby library that deals with pdf
livingstn has quit []
duncannz has quit [Ping timeout: 246 seconds]
JDiPierro has joined #ruby
livingstn has joined #ruby
Notte has quit []
merqlove has joined #ruby
martinbmadsen has joined #ruby
<Radar>
yeah you know the one
bobnormal has joined #ruby
ArchRogem has joined #ruby
<shevy>
bonhoeffer do you mean prawn?
<bonhoeffer>
shevy: sorry?
<shevy>
prawn, the pdf library
<bonhoeffer>
no -- i mean partial distribution function
<bonhoeffer>
ha -- sorry
<bobnormal>
having a painful time debugging a series of interlinked scripts. basically there is a client, a remote socket-connected server, and a separate server backend implementation script. the behavior observed is that the server process hangs seemingly randomly while polling the server backend implementation. sometimes this occurs while polling stderr, other times stdout, though the script is known to function. i believe it may be a buffer filling or something, but