DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
kalopsian has quit [Ping timeout: 260 seconds]
coyo has joined #ruby
pietr0 has quit [Quit: pietr0]
firstdayonthejob has quit [Ping timeout: 252 seconds]
twe4ked has quit [Ping timeout: 250 seconds]
pragmatism has quit [Ping timeout: 248 seconds]
rkazak has joined #ruby
[afk]chocoelho has quit [Ping timeout: 268 seconds]
alem0lars has quit [Ping timeout: 268 seconds]
al2o3-cr has quit [Ping timeout: 260 seconds]
Klumben has quit [Ping timeout: 250 seconds]
woodruffw has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
SegFaultAX has quit [Ping timeout: 268 seconds]
arlek has joined #ruby
znz_jp has quit [Ping timeout: 250 seconds]
duoi has quit [Ping timeout: 250 seconds]
pragmatism has joined #ruby
ledestin has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
drbrain has quit [Ping timeout: 268 seconds]
pragmatism has quit [Max SendQ exceeded]
sondnm has quit [Quit: Leaving]
pragmatism has joined #ruby
drbrain has joined #ruby
twe4ked has joined #ruby
[afk]chocoelho has joined #ruby
DLSteve has joined #ruby
b|ackwolf has quit [Ping timeout: 240 seconds]
duoi has joined #ruby
SegFaultAX has joined #ruby
znz_jp has joined #ruby
baweaver has joined #ruby
rkazak has quit [Ping timeout: 250 seconds]
crdpink2 has joined #ruby
tubulife- has quit [Ping timeout: 276 seconds]
crdpink has quit [Ping timeout: 248 seconds]
eurialo has quit [Ping timeout: 260 seconds]
iwaffles has joined #ruby
Klumben has joined #ruby
bronson has joined #ruby
woodruffw has joined #ruby
diegoviola has quit [Quit: WeeChat 1.4]
tvon has quit [Remote host closed the connection]
tvon has joined #ruby
i8igmac has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Read error: Connection reset by peer]
Moosashi has quit [Quit: Moosashi]
jottr has quit [Ping timeout: 264 seconds]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
tvon has quit [Ping timeout: 276 seconds]
tubulife- has joined #ruby
jottr has joined #ruby
eggoez has quit [Ping timeout: 260 seconds]
KanKava has quit [Remote host closed the connection]
astrobun_ has joined #ruby
ltp has quit [Ping timeout: 248 seconds]
duoi has quit [Excess Flood]
PaulCapestany has quit [Max SendQ exceeded]
crowell has quit [Ping timeout: 252 seconds]
DmitryBochkarev has joined #ruby
PaulCapestany has joined #ruby
al2o3-cr has joined #ruby
CloCkWeRX has quit [Ping timeout: 248 seconds]
tubulife- has quit [Ping timeout: 240 seconds]
duoi has joined #ruby
baweaver has quit [Remote host closed the connection]
Moosashi has joined #ruby
johnmilton has quit [Remote host closed the connection]
eggoez has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
sp4rrow has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
alem0lars has joined #ruby
ltp has joined #ruby
<nano->
Ok.. so if I create a module, or even a submodule, rdoc can emit constants for rb_define_const in the html output. If I instead pass a class to rb_define_constant there will be no constant in the documentation.
<nano->
It should be in the class though, any suggestions on potential workarounds?
<nano->
the classes there aren't under any module though - if that changes anything.
crowell has joined #ruby
<nano->
Yep, rdoc can extract constants from classes if the class is root level rather than within a module.
uglybandersnatch has joined #ruby
Arcaire is now known as mices
7GHAAJPIV has joined #ruby
ensyde has joined #ruby
aeterne has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
mices is now known as Arcaire
arescorpio has joined #ruby
lxsameer has quit [Quit: Leaving]
<nano->
Not entirely true though, a minimal test case works. So maybe the parser that freaks out about something else.
vikaton has joined #ruby
intrigueD has quit [Remote host closed the connection]
tubulife- has joined #ruby
sneakerhax has quit [Quit: back later]
marxarelli is now known as marxarelli|afk
freakcoder has joined #ruby
wreet has joined #ruby
wreet has joined #ruby
7GHAAJPIV has quit [Ping timeout: 252 seconds]
SCHAAP137 has quit [Read error: Connection reset by peer]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
<drbrain>
nano-: if RDoc can't trace a path up to object it'll ignore the constant
<drbrain>
Object
Xiti has joined #ruby
<drbrain>
if you have MyModule::MyClass::MY_CONSTANT, but the C file defines MyClass and MY_CONSTANT without defining MyModule RDoc won't be able to see it unless you give it a hint
snockerton has quit [Quit: Leaving.]
lessless has joined #ruby
<nano->
I have an #if 0 rb_define_module(..) to satisfy rdoc.
freakcoder has quit [Ping timeout: 240 seconds]
<drbrain>
do you have an example that fails?
<nano->
No, I haven't been able to construct one yet.
tomatoes has quit [Read error: Connection reset by peer]
tomatoes has joined #ruby
RTG` has quit [Ping timeout: 244 seconds]
<drbrain>
lol: error: object f6afd43be60d7adcf4e034f8ffe429570e1b8857: badTimezone: invalid author/committer line - bad time zone
<nano->
And it also seems like I have to run the file through the c preprocessor before running rdoc later on, due to DEF_CONST used there, but that's trivial as long as this starts working.
jsaak has quit [Ping timeout: 244 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
RTG` has joined #ruby
jsaak has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jdreaver has quit [Remote host closed the connection]
<nano->
drbrain: Tried that, didn't work. Can try again.
endash has quit [Quit: endash]
<drbrain>
hrm, checking
<nano->
Well.. for that line it doesn't work as it uses a macro to create the const, but a bit further up for NS_ALL I'd expect something like that to work, but it doesn't.
<drbrain>
hrm, maybe Document-const doesn't create one without an rb_define_const following
Asher has joined #ruby
<nano->
As I said, there are rb_define_const's a bit further up, and doesn't help there either.
endash has joined #ruby
endash has quit [Client Quit]
endash has joined #ruby
frustrum has quit [Read error: Connection reset by peer]
<Ox0dea>
jottr: Just separate the pairs with commas.
<jottr>
Ox0dea: ok
<Ox0dea>
That's called a Hash literal, incidentally, but you can add onto a Hash at any time with Hash#[]=, regardless of how it was instantiated.
pawnbox has joined #ruby
zast has joined #ruby
benlieb has quit [Quit: benlieb]
blt has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
CloCkWeRX has left #ruby [#ruby]
U7se6 has joined #ruby
Spami has joined #ruby
skweek has quit [Remote host closed the connection]
jyaworski has joined #ruby
jyaworski has quit [Client Quit]
Uo9er_ has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
ziyadb has quit [Quit: Connection closed for inactivity]
pwn has joined #ruby
<pwn>
Hi, what does this code do: @sid = "#{@session[16..-1]}"
chandlerbing has joined #ruby
<Ox0dea>
pwn: About which part are you most powerfully confused?
<pwn>
the right hand side of the assignment
<Ox0dea>
pwn: @session is a String, [16..-1] grabs the characters from index 16 all the way to the end (Ruby supports negative indexing), and then that result is being interpolated (unnecessarily, since it's already a String).
Moosashi has quit [Quit: Moosashi]
crowell has quit [Ping timeout: 246 seconds]
<pwn>
will it work if session is a string like "99" ?
<pwn>
or does it have to be at least 16 characters long?
LoneHerm_ has joined #ruby
<Ox0dea>
?try
<ruby[bot]>
Why don't you try it and see for yourself?
rmulligan has quit [Ping timeout: 250 seconds]
<Ox0dea>
^_^
<pwn>
Im editing a metasploit script.. kinda hard to figure out whats going on
uglybandersnatch has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
bronson has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
Sucks has quit [Read error: Connection reset by peer]
woodruffw has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
halfamind has quit [Quit: Leaving.]
LoneHerm_ has quit [Ping timeout: 248 seconds]
gbgdev_ has quit [Remote host closed the connection]
baweaver has joined #ruby
crowell has joined #ruby
benlieb has joined #ruby
rrrepsaj has joined #ruby
swistak35 has quit [Ping timeout: 276 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
duncannz has joined #ruby
rrrepsaj has quit [Remote host closed the connection]
y2mq37 has quit [Ping timeout: 264 seconds]
woodruffw has joined #ruby
y2mq37 has joined #ruby
linoj has joined #ruby
vash_ has joined #ruby
<vash_>
hola
vash_ is now known as Guest35290
aspiers has joined #ruby
<Guest35290>
hola
uglybandersnatch has quit [Ping timeout: 244 seconds]
<Guest35290>
alguien por ahi?
vdamewood has joined #ruby
bezhermoso has joined #ruby
linoj has quit [Client Quit]
djbkd has quit [Quit: My people need me...]
aspiers has quit [Ping timeout: 240 seconds]
ruind has quit [Ping timeout: 248 seconds]
elifoster has quit [Ping timeout: 260 seconds]
Guest35290 has quit [Quit: Saliendo]
uglybandersnatch has joined #ruby
tercenya_ has joined #ruby
rmulligan has joined #ruby
blt has quit [Ping timeout: 248 seconds]
bezhermoso has quit [Quit: Zzzzz...]
Vlat- has joined #ruby
tercenya has quit [Ping timeout: 276 seconds]
wasane has joined #ruby
halfamind has joined #ruby
davedev24 has joined #ruby
tercenya has joined #ruby
LastGabs has joined #ruby
pawnbox has joined #ruby
tercenya_ has quit [Read error: Connection reset by peer]
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pwn has quit [Quit: Page closed]
wasane has quit [Client Quit]
poguez_ has quit [Quit: Connection closed for inactivity]
zast has quit [Remote host closed the connection]
rrrepsaj has joined #ruby
Nick_ZWG has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
daivyk has quit [Quit: ZZZzzz…]
pawnbox has quit [Ping timeout: 276 seconds]
<Nick_ZWG>
Hi. I want to check to see if two strings in an array, and if they are, order them in a specific order (A, B, rest of array untouched). I already have the code to add the items to the list if they aren't in it: https://gist.github.com/nmcspadden/1db5ab3dd4f71a9a7c02
<mozzarella>
do you want to move them to the front of the array?
braincrash has quit [Quit: bye bye]
<Nick_ZWG>
Yes, sorry. I read in the list of paths from /etc/paths, and I need to insert A and B in order to the front of the array.
poerror has quit [Ping timeout: 240 seconds]
<Nick_ZWG>
Works fine so far with .unshift, but that code doesn't work if A and B are already in /etc/paths but out of order
<Nick_ZWG>
i.e. /etc/paths should always end up being:
<Nick_ZWG>
A, B, <whatever else>
vikaton has quit [Quit: Connection closed for inactivity]
halfamind has quit [Quit: Leaving.]
<Nick_ZWG>
I feel like I'm overcomplicating it, but is it better to try to compare two arrays? Or just check to see if the array includes A, and if it does, move it to the top, andthen do the same for B?
<Nick_ZWG>
I feel a bit indecisive about the approach
<mozzarella>
just tell me what you're trying to do
<mozzarella>
what does your program do
<Nick_ZWG>
Read in /etc/paths. If A and B are not in /etc/paths already, prepend them to the list of paths, and then write it back out so that it's A, B, <whatever>
<Nick_ZWG>
End result is that /etc/paths should always be A, B, whatever
<Nick_ZWG>
regardless of what it was when it was read in
<mozzarella>
what if there's only A or only B?
<Nick_ZWG>
If either or both are missing, they should be prepended in order
Vlat- has quit [Quit: Vlat-]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<mozzarella>
so in all scenarios you end up with A and B at the beginning of the array?
<Nick_ZWG>
yes
<Nick_ZWG>
That's the end goal for all scenarios, regardless of what goes in.
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
IrishGringo has quit [Ping timeout: 248 seconds]
<mozzarella>
then I would just remove them and add them back
braincrash has joined #ruby
yqt has quit [Ping timeout: 246 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<Nick_ZWG>
Wow. That's so obvious.
<Nick_ZWG>
I totally overcomplicated it.
<Nick_ZWG>
Thanks.
pawnbox has joined #ruby
LastGabs has joined #ruby
rrrepsaj has quit [Remote host closed the connection]
<Ox0dea>
Nick_ZWG: How about `([A, B] + paths).uniq`?
mistermocha has quit [Ping timeout: 240 seconds]
mane is now known as naem
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Nick_ZWG>
That's also a great solution.
<Nick_ZWG>
Thanks.
pawnbox has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 260 seconds]
<Ox0dea>
Sure thing.
pawnbox has joined #ruby
<Ox0dea>
It's wasteful, but I imagine you don't have thousands of paths. :P
tjbiddle has joined #ruby
bungoman has joined #ruby
slakevc has quit [Quit: Leaving]
MyMind has quit [Ping timeout: 260 seconds]
Pisuke has joined #ruby
bungoman has quit [Client Quit]
<Nick_ZWG>
Indeed, the default /etc/paths only has 5 entries and we're just adding 2
ur5us has quit [Remote host closed the connection]
uglybandersnatch has quit [Ping timeout: 248 seconds]
frustrum has quit [Read error: Connection reset by peer]
terminal_ has joined #ruby
frustrum has joined #ruby
DmitryBochkarev has joined #ruby
tjbiddle has quit [Ping timeout: 276 seconds]
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
sysodaff has joined #ruby
hxegon has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
blackmesa has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
DmitryBochkarev has quit [Client Quit]
hxegon is now known as hxegon_AFK
nando293921 has quit [Ping timeout: 264 seconds]
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kalopsian has joined #ruby
uglybandersnatch has joined #ruby
treaki_ has joined #ruby
DmitryBochkarev has joined #ruby
sysodaff has quit [Remote host closed the connection]
<Ox0dea>
Nick_ZWG: Are you learning Ruby, or was this kind of a one-off thing?
LoneHermit has joined #ruby
mistermocha has joined #ruby
DmitryBochkarev has quit [Client Quit]
treaki__ has quit [Ping timeout: 246 seconds]
kalopsian has quit [Ping timeout: 252 seconds]
hxegon_AFK is now known as hxegon
hxegon is now known as hxegon_AFK
LoneHermit has quit [Remote host closed the connection]
bronson has joined #ruby
LoneHerm_ has joined #ruby
Norrin has quit [Ping timeout: 264 seconds]
IrishGringo has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
Chagel has quit [Remote host closed the connection]
Nick_ZWG has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 252 seconds]
marienz has quit [Ping timeout: 612 seconds]
krz has joined #ruby
LastGabs has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akosednar has joined #ruby
Chagel has joined #ruby
pfg has quit [Ping timeout: 264 seconds]
liquid-silence has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hk238 has joined #ruby
pfg has joined #ruby
bricker has joined #ruby
fedexo has joined #ruby
Chagel has quit [Remote host closed the connection]
akosednar is now known as ako
aspiers has joined #ruby
whippythellama has quit [Quit: WeeChat 1.2]
Chagel has joined #ruby
naem is now known as girll
girll is now known as grill_power
gix has quit [Ping timeout: 268 seconds]
kirillzh has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jkahn has quit [Remote host closed the connection]
aupadhye has joined #ruby
ta_ has quit [Ping timeout: 268 seconds]
frustrum has quit [Ping timeout: 240 seconds]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
gix has joined #ruby
davedev24 has joined #ruby
Vlat- has joined #ruby
tercenya has joined #ruby
slash_mode is now known as slash_nick
Chagel has quit [Remote host closed the connection]
norc has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
hxegon_AFK is now known as hxegon
blackmesa has quit [Ping timeout: 264 seconds]
Chagel has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
hxegon is now known as hxegon_AFK
poerror has joined #ruby
ta_ has joined #ruby
hxegon_AFK has quit [Quit: BRB]
halfamind has joined #ruby
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
rmulligan has quit [Ping timeout: 268 seconds]
rmulligan has joined #ruby
ruind has joined #ruby
merida has joined #ruby
ruind has quit [Client Quit]
ruid has joined #ruby
rmulligan has quit [Ping timeout: 250 seconds]
A124 has quit [Quit: '']
A124 has joined #ruby
Uber|Dragon has quit [Ping timeout: 248 seconds]
marienz has joined #ruby
Uo9er_ has joined #ruby
norc has quit [Ping timeout: 240 seconds]
blt has joined #ruby
liquid-silence has joined #ruby
liquid-silence has joined #ruby
crystal77 has joined #ruby
U7se6 has quit [Ping timeout: 244 seconds]
sauvin has joined #ruby
Norrin has joined #ruby
saneax_AFK is now known as saneax
eljimmy has quit [Quit: Leaving]
bluOxigen has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
skade has joined #ruby
rmulligan has joined #ruby
y2mq37 has quit [Quit: Leaving]
IrishGringo has quit [Ping timeout: 250 seconds]
halfamind has quit [Quit: Leaving.]
tubulife- has joined #ruby
poerror has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
Xentil has joined #ruby
skade has joined #ruby
rmulligan has quit [Ping timeout: 240 seconds]
Xiti has quit [Quit: Xiti]
skade has quit [Client Quit]
Chagel has quit [Remote host closed the connection]
ohaibbq has joined #ruby
ruid has quit [Ping timeout: 268 seconds]
Chagel has joined #ruby
Xentil has quit [Ping timeout: 248 seconds]
cdg has quit [Remote host closed the connection]
halfamind has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sp4rrow has joined #ruby
Nawn has joined #ruby
Sero_ has joined #ruby
Sembei has joined #ruby
halfamind has quit [Ping timeout: 240 seconds]
Pisuke has quit [Ping timeout: 244 seconds]
sp4rrow has quit [Client Quit]
Sero has quit [Ping timeout: 276 seconds]
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
siaw has joined #ruby
Chagel has quit [Remote host closed the connection]
quazimodo has joined #ruby
<quazimodo>
is there a simple way to create a digested identifier for a hash or array with nested hashes/arrays
<quazimodo>
should I just serialize the data and run something like md5 digest on that ?
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
<Nawn>
Hey guys, I'm trying to practice my recursion on the initial Project Euler problems. I understand how recursion works, but I'm having troubles debugging my code. It's giving me a result of 10Mil, when it should be around 4.6Mil according to some internet searches. My code: https://gist.github.com/Nawn/a1dbf22df7dec7a748e2
<quazimodo>
havenwood: i'll look into it
<quazimodo>
um
<quazimodo>
yes stable across invocations
halfamind has joined #ruby
<quazimodo>
i want to get users filter preferences from a web connection as a json object and store it in db, passing the digest back up
dionysus69 has joined #ruby
<quazimodo>
they hold onto the digest in the query string and can share the link with arbitrary filters applied
iwaffles has quit [Quit: iwaffles]
<quazimodo>
if the server gets some filters passed to it, it'll first digest those and see if the record already exists, if not it creates it
liquid-silence has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
liquid-silence has joined #ruby
liquid-silence has quit [Changing host]
liquid-silence has joined #ruby
siaw has quit [Quit: siaw]
<quazimodo>
havenwood: seems like Object.hash isn't so stable
<quazimodo>
I'll Marshal.dump into Digest
Macaveli has joined #ruby
<mozzarella>
Nawn: which problem is it?
<Nawn>
3
<Nawn>
adding up the even numbers of the Fibanacci sequence up to 4,000,000
Chagel has quit [Remote host closed the connection]
Chagel has joined #ruby
kalopsian has joined #ruby
siaw has joined #ruby
Abrin_AWAY has quit [Ping timeout: 244 seconds]
siaw has quit [Client Quit]
siaw has joined #ruby
siaw has quit [Client Quit]
<havenwood>
Nawn: you're very close
<Nawn>
Okay, just updated the git
<Nawn>
back to where it says the 10316619
<Nawn>
it was giving me an error before :P hadn't realized
kalopsian has quit [Ping timeout: 252 seconds]
<Nawn>
I'm not very familiar with recursion, so I don't know where to start debugging
<Nawn>
Yeah, I'd imagine if we continue to go up the fib sequence, we'll eventually hit a 4,000,000 mark, and that's where we stop creating stacks, right? and then go back, and add them up?
ziyadb has joined #ruby
Chagel has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ur5us has joined #ruby
rmulligan has quit [Ping timeout: 248 seconds]
vdamewood has quit [Read error: Connection reset by peer]
danielwzd has joined #ruby
<Nawn>
I don't understand what the error is Dx
vdamewood has joined #ruby
blt has quit [Ping timeout: 244 seconds]
crayon has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
Chagel has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
bricker has quit [Ping timeout: 248 seconds]
<havenwood>
Nawn: What if #even_fibs took a second argument that was `sum`?
blackmesa has quit [Ping timeout: 252 seconds]
poerror has joined #ruby
Chagel has quit [Remote host closed the connection]
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 244 seconds]
<havenwood>
Nawn: And then `sum` instead of `fib_num` as the return value `if fib_num > 4_000_000`.
Chagel has joined #ruby
bronson has joined #ruby
<Nawn>
Okay, what I just updated to, worked
<Nawn>
Whoa
<Nawn>
What caused that?
<Nawn>
why was it giving me the wrong input? :o
<havenwood>
Nawn: :)
halfamind has quit [Quit: Leaving.]
Chagel has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
<havenwood>
Nawn: It was giving you the last fib_num (the largest fibonacci seq number under 4 mil) before.
<havenwood>
Nawn: You've updated it to properly pass the sum along, and return the sum of all fib_nums instead of just the last one.
<havenwood>
Nawn: A nit that happens to not matter, but "whose values do not exceed four million" would allow four million exactly so > rather than >=.
bronson has quit [Ping timeout: 252 seconds]
Chagel has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
<havenwood>
Since that last one would still need to get added to the sum if it was a fib.
<Nawn>
OH
uglybandersnatch has quit [Ping timeout: 264 seconds]
<Nawn>
I think I understand.
fedexo has quit [Ping timeout: 250 seconds]
blt has joined #ruby
<havenwood>
Nawn: Get rid of all the returns other than the two early returns. :)
<havenwood>
Nawn: Just lines 27 and 30 aren't already implicitly returned if you remove the explicit `return`.
<havenwood>
Nawn: A shorthand nicety in Ruby for `fib_num % 2 == 0` is `fib_num.even?`.
dog3521 has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
dog3521 has left #ruby [#ruby]
<havenwood>
Nawn: Another suggestion would be seeing what it would be like to not use `+=` with `sum` and instead pass a second `sum` argument everywhere you use #even_fibs.
_wreet has joined #ruby
<havenwood>
Nawn: And if you have success then consider how you could do the same for `n` with no `+=`.
Nawn has quit [Read error: Connection reset by peer]
solars has joined #ruby
poerror has quit [Ping timeout: 252 seconds]
JohnBat26 has joined #ruby
last_staff has joined #ruby
tobiasvl has quit [Ping timeout: 260 seconds]
<solars>
can anyone tell me which IDEs support ruby refactoring?
scepticulous has joined #ruby
<havenwood>
solars: JetBrains RubyMine is one.
emilkarl has joined #ruby
nocontrol has joined #ruby
danielwzd has quit [Quit: Leaving]
scepticulous has quit [Client Quit]
moei has quit [Read error: Connection reset by peer]
scepticulous has joined #ruby
bqscott has quit [Ping timeout: 244 seconds]
moei has joined #ruby
rmulligan has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
agit0 has quit [Quit: zzzZZZ….]
htmldrum has joined #ruby
moeabdol has joined #ruby
_wreet has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
emilkarl[away] is now known as emilkarl
<solars>
havenwood, I'll have a look, thanks
codecop_ has quit [Read error: Connection reset by peer]
tjbiddle has quit [Ping timeout: 248 seconds]
kalopsian has joined #ruby
rigel_ has joined #ruby
cibs has joined #ruby
Asher has quit [Read error: Connection reset by peer]
<rigel_>
how can i use ri to look up documentation on ruby keywords?
ako has quit [Read error: Connection reset by peer]
Asher has joined #ruby
nuck has quit [Ping timeout: 276 seconds]
moeabdol has quit [Ping timeout: 248 seconds]
ReK2 has quit [Remote host closed the connection]
ReK2 has joined #ruby
U7se6 has joined #ruby
rigel_ has quit [Client Quit]
tjbiddle has joined #ruby
scepticulous has quit [Ping timeout: 244 seconds]
__main__ has quit [Ping timeout: 276 seconds]
jwang has quit [Ping timeout: 276 seconds]
tjbiddle has quit [Remote host closed the connection]
Uo9er_ has quit [Ping timeout: 244 seconds]
kalopsian has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
nuck has joined #ruby
nuck is now known as Guest37582
jwang has joined #ruby
djbkd has joined #ruby
__main__ has joined #ruby
liquid-silence has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tubulife- has joined #ruby
bruce_lee has joined #ruby
<apeiros>
wow, a full 2min of patience.
ta_ has joined #ruby
rnda has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
ferr has joined #ruby
norc has joined #ruby
arescorpio has quit [Quit: Leaving.]
RegulationD has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
SG045734 has joined #ruby
liquid-silence has joined #ruby
liquid-silence has joined #ruby
rmulligan has quit [Ping timeout: 260 seconds]
<norc>
Ox0dea: Can you explain to me the story behind VALUE?
baweaver has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 260 seconds]
tubulife- has quit [Ping timeout: 264 seconds]
vdamewood has quit [Quit: Life beckons.]
SG045734 has quit [Ping timeout: 268 seconds]
bronson has joined #ruby
<shevy>
once upon a time, the ruby devs sat together to create VALUE
<shevy>
and there was much rejoicing!
htmldrum has quit [Ping timeout: 244 seconds]
<shevy>
for six days they feasted upon the lambs... and the cows... and the
hahuang61 has joined #ruby
firstdayonthejob has joined #ruby
vdamewood has joined #ruby
AlexRussia has quit [Ping timeout: 248 seconds]
krz has quit [Ping timeout: 260 seconds]
ur5us has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
rdark has joined #ruby
pawnbox has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
hahuang61 has quit [Ping timeout: 240 seconds]
jud has joined #ruby
troulouliou_div2 has joined #ruby
astrobun_ has quit [Read error: Connection reset by peer]
Chagel_ has joined #ruby
davee_ has joined #ruby
<nocontrol>
when I select a web server, can I go with Puma alone ?
astrobun_ has joined #ruby
<nocontrol>
I mean that If you run Puma as a service, there is no need for nginx and complicated setups
htmldrum has joined #ruby
davedev24 has joined #ruby
<nocontrol>
why should you do so ? Why should you choose to setup nginx with puma together ?
Don_John has quit [Read error: Connection reset by peer]
Chagel has quit [Ping timeout: 244 seconds]
agit0 has joined #ruby
<norc>
nocontrol: One reason might be TLS termination, or some form of load balancing through nginx.
duncannz has quit [Remote host closed the connection]
<nocontrol>
norc: but puma supports workers also
<nocontrol>
isn't it the same thing ?
<norc>
nocontrol: Well you might want to balance between multiple nodes across servers.
theRealAlexz has quit [Quit: No Ping reply in 180 seconds.]
<nocontrol>
and why do you need to use both ? Why do people use them both instead of just using nginx ?
<norc>
There is so many reasons why you might want to have an nginx in front. What do you want yourself?
<norc>
Are we talking about Rails?
cibs has quit [Ping timeout: 240 seconds]
<nocontrol>
hmmm yes
<nocontrol>
I used foreman to extract to systemd where I use my Procfile and puma
<nocontrol>
so in every restart/reboot puma runs as a service
<nocontrol>
and I don't see anything that is missing right now, meaning that the web page is served successfully and there are no problems
skade has joined #ruby
<nocontrol>
this is a very low traffic website for internal use or local (vagrant) ones
<norc>
nocontrol: In that case you still might want an nginx in front for TLS termination.
pawnbox has quit [Remote host closed the connection]
<norc>
If you do not care about secure communication in the slightest you could ditch nginx entirely easing up deployment.
pawnbox has joined #ruby
<norc>
This is what we do as well (we use unicorn though).
<nocontrol>
norc: IF I understand well you're talking about SSL certificates and https ?
<norc>
Well TLS, but yes.
<nocontrol>
I guess puma doesn't support them
<nocontrol>
haven't thought about that
<nocontrol>
so nginx/apache need puma/passenger/unicorn to serve ruby files ?
<nocontrol>
starting to make sense
merida has quit [Remote host closed the connection]
<norc>
nocontrol: Not sure about Puma honestly. We just use unicorn internally. :)
theRealAlexz has joined #ruby
<norc>
And we have Apache2 TLS termination proxies for the applications for historic reasons.
merida has joined #ruby
<nocontrol>
norc: thanks, it really makes sense
<norc>
nocontrol: The moment that you have scalability concerns you do not get around a properly setup nginx+puma or nginx+passenger setup though, so keep that in mind.
ohaibbq has quit [Quit: Leaving...]
cibs has joined #ruby
pawnbox has quit [Remote host closed the connection]
bricker has joined #ruby
pawnbox has joined #ruby
astrobun_ has quit [Read error: Connection reset by peer]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 276 seconds]
bricker has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
poerror has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has joined #ruby
Macaveli has joined #ruby
djbkd has quit [Quit: My people need me...]
kirillzh has joined #ruby
Dimik has quit [Ping timeout: 250 seconds]
quazimodo has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 240 seconds]
DoubleMalt has joined #ruby
htmldrum has joined #ruby
aufi has joined #ruby
rmulligan has joined #ruby
djbkd has joined #ruby
futilegames has joined #ruby
ur5us has joined #ruby
jenrzzz has joined #ruby
jaruga has joined #ruby
<nocontrol>
norc: got it
TomyWork has joined #ruby
ur5us has quit [Remote host closed the connection]
jas02 has joined #ruby
rmulligan has quit [Ping timeout: 268 seconds]
moeabdol has joined #ruby
codecop has quit [Remote host closed the connection]
rkazak has joined #ruby
Axy has joined #ruby
aganov has joined #ruby
scepticulous has joined #ruby
liquid-silence has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomatoes has quit [Quit: Bye]
Mia has quit [Ping timeout: 244 seconds]
futilegames has quit [Quit: futilegames]
moeabdol has quit [Ping timeout: 260 seconds]
quazimodo has joined #ruby
djbkd has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
mrgrieves has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.4]
terlar has joined #ruby
jas02 has quit [Quit: jas02]
firstdayonthejob has joined #ruby
baweaver has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
tvw has quit [Remote host closed the connection]
siaw has joined #ruby
poerror has quit [Ping timeout: 276 seconds]
jas02 has joined #ruby
firstdayonthejob has quit [Ping timeout: 264 seconds]
baweaver has quit [Ping timeout: 250 seconds]
liquid-silence has joined #ruby
liquid-silence has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
KensoDev has quit [Read error: Connection reset by peer]
rkazak has quit [Read error: Connection reset by peer]
igam has joined #ruby
Uber|Dragon has joined #ruby
RickHull has quit [Remote host closed the connection]
rkazak has joined #ruby
ReK2 has quit [Remote host closed the connection]
RickHull has joined #ruby
Gadgetoid has joined #ruby
duderonomy has joined #ruby
kirillzh has quit [Max SendQ exceeded]
CloCkWeRX has quit [Ping timeout: 246 seconds]
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
__main__ has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
__main__ has joined #ruby
Uber|Dragon has quit [Ping timeout: 264 seconds]
bluOxigen has joined #ruby
jenrzzz has joined #ruby
platzhirsch has joined #ruby
d0nn1e has quit [Ping timeout: 248 seconds]
mfaeh has joined #ruby
MyMind has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
haraoka has joined #ruby
d0nn1e has joined #ruby
Couch has joined #ruby
Sembei has quit [Ping timeout: 248 seconds]
marr has joined #ruby
biberu has joined #ruby
Cohedrin has quit [Max SendQ exceeded]
frustrum has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
Cohedrin has joined #ruby
blackmesa has joined #ruby
merida has quit [Remote host closed the connection]
astrobun_ has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
tubulife- has joined #ruby
poerror has joined #ruby
rmulligan has quit [Ping timeout: 250 seconds]
astrobun_ has quit [Remote host closed the connection]
hackeron_ has joined #ruby
Chagel has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
GioVdK has joined #ruby
hackeron has quit [Ping timeout: 276 seconds]
tubulife- has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
hahuang61 has joined #ruby
bronson has joined #ruby
Chagel_ has quit [Ping timeout: 268 seconds]
uglybandersnatch has joined #ruby
last_staff has quit [Quit: last_staff]
tvw has quit [Remote host closed the connection]
davedev24 has quit []
roshanavand has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
quazimodo has quit [Ping timeout: 276 seconds]
quazimodo has joined #ruby
zapata has quit [Quit: WeeChat 1.4]
roshanavand has quit [Client Quit]
zapata has joined #ruby
charlemagne has joined #ruby
darkf has quit [Quit: Leaving]
basic has quit [Ping timeout: 276 seconds]
charlemagne has quit [Read error: No route to host]
krz has quit [Ping timeout: 244 seconds]
charlemagne has joined #ruby
hightower3 has joined #ruby
amundj has joined #ruby
andrewvos has joined #ruby
lurch_ has joined #ruby
<lurch_>
hi, is there a way to have .to_yaml not generate single quotes when the value in the hash is a string containing only numbers? eg: { "a" => "5" }.to_yaml
platzhirsch has joined #ruby
<lurch_>
if i use a nun-numeric character it outputs the yaml without the quoting: { "a" => "5x" }.to_yaml
<norc>
lurch_: You could .map the Hash first to coerce such strings into numbers.
<apeiros>
lurch_: no quotes means it's an integer, not a string. so no.
<norc>
That is, fixnums.
amundj has quit [Client Quit]
Suntzu has quit [Read error: Connection reset by peer]
<lurch_>
apeiros, i'm talking about the resulting yaml.. in the first case -> a: '5' , in the second case -> a: 5x
<apeiros>
lurch_: yes, and I'm telling you a: 5 and a: '5' in yaml has a different meaning
TheHodge has joined #ruby
<lurch_>
ah, ok
<apeiros>
without quotes it's not a string. so either you have to make up your mind whether your value is a string or an integer, or you'll have to accept that it needs quoting.
quazimodo has quit [Ping timeout: 244 seconds]
triggerwarning has joined #ruby
arlek has joined #ruby
triggerwarning is now known as iongall
lxsameer has quit [Quit: Leaving]
iongall is now known as triggerwarning
kron4eg has joined #ruby
bricker has joined #ruby
kron4eg has left #ruby [#ruby]
charlemagne has quit [Ping timeout: 260 seconds]
rmulligan has joined #ruby
bqscott has joined #ruby
charlemagne has joined #ruby
elaptics`away is now known as elaptics
triggerwarning has left #ruby ["probably kicked"]
rmulligan has quit [Ping timeout: 248 seconds]
bricker has quit [Ping timeout: 260 seconds]
blackmesa has quit [Quit: WeeChat 1.4]
krz has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
poerror has quit [Ping timeout: 244 seconds]
jds has joined #ruby
andrewvos has quit [Ping timeout: 260 seconds]
ur5us has quit [Remote host closed the connection]
s00pcan_ has joined #ruby
graffix has quit [Ping timeout: 276 seconds]
roshanavand has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
drptbl has joined #ruby
victor_ has quit [Ping timeout: 252 seconds]
graffix has joined #ruby
krz has quit [Ping timeout: 276 seconds]
roshanavand has quit [Quit: This computer has gone to sleep]
jaiks has quit [Remote host closed the connection]
jaiks has joined #ruby
Suntzu has joined #ruby
amincd has quit [Quit: Page closed]
andrewvos has joined #ruby
<norc>
apeiros: Interesting. So I just learned that NTH_REF (i.e. $1, $2, ...) works only until INT_MAX>>2 to INT_MAX>>1 (depending on whether long is larger than int) ..
<norc>
Which also explains why on some architectures my problem could not be reproduced.
<apeiros>
ah, regex capture globals?
<apeiros>
interesting inconsistency
* apeiros
meanwhile tries to beat oracle + oci8 into submission
<norc>
No, they are not globals.
adgtl has joined #ruby
<apeiros>
I know
<apeiros>
but they look like globals and are listed as such
<apeiros>
actually… are they listed with global_variables?
<norc>
apeiros: Hah, did you know the recent AR adapter introduced a bug that randomly causes connection losses?
<norc>
apeiros: Im close to switching over to jruby now, just have to test the activerecord jdbc adapter first. :)
<norc>
Hopefully that will solve many headaches.
<apeiros>
did you know that AR::Model.create > 1.4x plsql.table > 10x OCI8#parse + bind_params + exec_array?
A124 is now known as AI24
<apeiros>
and let me tell you that the last one is an effing pain to work with
AI24 is now known as A124
<norc>
Can you rephrase that statement?
zarubin has joined #ruby
<apeiros>
I first had: MyModel.create!(columns.zip(values)), it took 700s for ~160k records
siaw has quit [Quit: siaw]
nofxx has quit [Ping timeout: 260 seconds]
<apeiros>
I then moved to: plsql.my_model_table.insert_values(columns, *records)), that took ~500s
zarubin has quit [Client Quit]
Chagel has quit [Ping timeout: 276 seconds]
p1k has joined #ruby
Chagel has joined #ruby
<norc>
That sounds awfully slow.
workmad3 has joined #ruby
<apeiros>
and now I use: insert = OCI8.parse("INSERT INTO …"); (1..cols).zip(types, records.transpose) do |pos, type, values| insert.bind_param_array(pos, values, type) end; insert.exec_array
<apeiros>
and that takes ~50s
zarubin has joined #ruby
<apeiros>
it is. horribly. slow.
<norc>
I would expect this to complete in the ballbark of maybe 20 seconds.
<apeiros>
I'm pretty sure pg's COPY would take <5s
<norc>
Nope.
<norc>
You would have to have a really special database for that to work *that* fast.
<norc>
;-)
<apeiros>
at least iirc it took <1s for 10k records when I tested
<apeiros>
COPY is crazy fast
zarubin has quit [Client Quit]
<norc>
Oh, wait you mean in a single transaction.
<norc>
mm yeah.
<apeiros>
yes
<apeiros>
it's a seeding operation. in total it's 1mio records I seed. ~300MB of data.
<apeiros>
IMO should be IO bound.
marr has joined #ruby
codecop has joined #ruby
codecop_ has joined #ruby
<apeiros>
especially when doing it over the network.
zarubin has joined #ruby
<p1k>
why is <array>.slice(<num>) a thing ? isn't it the same as <array>[idx] and surprising that .slice can return a non-array value ?
zarubin has quit [Client Quit]
tubulife- has joined #ruby
<apeiros>
p1k: for the same reason that ruby has tons of other aliases.
<apeiros>
(I know, not really an answer)
zarubin has joined #ruby
liquid-silence has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<norc>
p1k: Actually Array#[] is the more special thing because it does not follow the regular method syntax. ;-)
<crayfishx>
So, I can use 'respond_to?' to see if an object contains a certain method - is there anyway to dig a little deeper to check how many arguments the method takes?
uglybandersnatch has quit [Ping timeout: 246 seconds]
<norc>
crayfishx: well respond_to does not check whether the *object* contains a method.
<norc>
Modules and classes have methods.
<apeiros>
crayfishx: note, it's not reliable
<norc>
It tells you whether an object responds to that method.
<apeiros>
plenty of methods will simply report -1, because they're implemented in C
<apeiros>
(and didn't bother to properly declare how many args they take)
<norc>
(Which means itself, its singleton class, or any other class or module in its inheritance chain has that method available)
<crayfishx>
In my scenario I think its ok - I need to import dynamic code (plugins) and the host app needs to determine whether or not a certain method exists (respond_to?) and if so whether or not to pass an argument hash to it
<p1k>
norc: that's not really correct :[] is a method
<apeiros>
crayfishx: IMO introspection is a brittle way to do that.
<norc>
p1k: It absolutely is.
tubulife- has quit [Ping timeout: 260 seconds]
zarubin has quit [Quit: leaving]
mikecmpbll has joined #ruby
<p1k>
I guess you could say it's an exact alias since [a..b] and [a]
zarubin has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
<norc>
p1k: I would not call it an alias, but 2 separate methods bound to the same underlying C function.
<norc>
(Reason is Im really not sure how aliases work under the hood and what possible implications they have)
gbgdev has joined #ruby
Snowy has joined #ruby
FooMunki has joined #ruby
andrewvos has quit [Ping timeout: 260 seconds]
<norc>
p1k: My point was just that its a special production rule in the grammar that allows for AREF/ASET calls. Beyond that they are just regular methods, like you said. :)
<crayfishx>
arity seems to be what I'm after - thanks
<norc>
apeiros: But yeah, the activerecord oracle enhanced adapter is kind of meh.
<norc>
Especially annoying are the tons of column conversions you have to do.
Chagel has quit [Remote host closed the connection]
<norc>
(Though I do not know how many of my problems are related to the fact that we are still running on 11gr2)
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
Chagel has joined #ruby
tamole has joined #ruby
kalopsian has joined #ruby
rmulligan has joined #ruby
siaw has joined #ruby
frustrum has joined #ruby
Suntzu has quit [Quit: changing servers]
last_staff has joined #ruby
s00pcan_ has quit [Quit: leaving]
pawnbox has quit [Remote host closed the connection]
andrewvos has joined #ruby
kam270 has joined #ruby
pawnbox has joined #ruby
kalopsian has quit [Ping timeout: 244 seconds]
rmulligan has quit [Ping timeout: 268 seconds]
basic has joined #ruby
s00pcan has quit [Quit: leaving]
s00pcan has joined #ruby
slakevc has quit [Quit: Leaving]
tesuji has joined #ruby
Chagel has quit [Remote host closed the connection]
frustrum has quit [Ping timeout: 250 seconds]
vondruch__ has joined #ruby
vondruch__ has quit [Remote host closed the connection]
vondruch has joined #ruby
Xentil has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
poerror has joined #ruby
pawnbox has quit [Remote host closed the connection]
rodfersou has joined #ruby
Snowy has quit [Ping timeout: 246 seconds]
vondruch_ has quit [Ping timeout: 268 seconds]
ziyadb has joined #ruby
arlek has quit [Ping timeout: 248 seconds]
Snowy has joined #ruby
stannard has joined #ruby
sepp2k has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
stannard has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
spiman has joined #ruby
bluOxigen has quit [Ping timeout: 268 seconds]
A124 has quit [Quit: '']
A124 has joined #ruby
emilkarl is now known as emilkarl[away]
BSaboia has joined #ruby
pawnbox has joined #ruby
U7se6 has joined #ruby
withnale has joined #ruby
Suntzu has joined #ruby
Uo9er_ has quit [Ping timeout: 260 seconds]
n008f4g_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
catphish has joined #ruby
spiman_ has joined #ruby
<catphish>
does ruby by any chance have a single operator that says "set variable to value if value is truthy", ie "variable = value if value" or "variable = value || variable"
crdpink has joined #ruby
gagrio is now known as gagrio|CZ
spiman has quit [Ping timeout: 264 seconds]
crdpink2 has quit [Ping timeout: 268 seconds]
<workmad3>
catphish: it does not
<catphish>
that's a shame, thanks :)
andrewvos has quit [Ping timeout: 276 seconds]
spiman_ has quit []
rbennacer has joined #ruby
mwlang has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
GioVdK has quit [Ping timeout: 244 seconds]
stan has quit [Ping timeout: 276 seconds]
trinaldi has joined #ruby
RegulationD has joined #ruby
deavid has joined #ruby
_blizzy_ has quit [Quit: Leaving]
s00pcan_ has joined #ruby
poerror has quit [Ping timeout: 244 seconds]
GioVdK has joined #ruby
ldnunes has joined #ruby
noway_ has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
sdothum has joined #ruby
Marsupermammal has joined #ruby
johnmilton has joined #ruby
bronson has joined #ruby
graffix has quit [Ping timeout: 276 seconds]
stan has joined #ruby
deavid has quit [Read error: Connection reset by peer]
Spami has joined #ruby
Sero_ has quit [Read error: Connection reset by peer]
<unshadow>
tobiasvl: Related in the sense that both are using some forms of Artificial Intelegence ;)
reprazent has joined #ruby
<tobiasvl>
hehe, yeah, just wondering if that's what inspired you to check out ANNs
kam270 has quit [Max SendQ exceeded]
<tobiasvl>
I have no experience with it unfortunately
htmldrum_ has joined #ruby
kam270 has joined #ruby
andikr has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
htmldrum has quit [Ping timeout: 244 seconds]
<unshadow>
Oh no, tobiasvl I'm working on an Opensource project that uses ANN to identify web based security attacks using pattern learning. just wondered if there is someone I can ask a few more indepth questions
victor_ has quit [Ping timeout: 268 seconds]
reprazen_ has joined #ruby
kam270 has quit [Max SendQ exceeded]
kam270 has joined #ruby
reprazent has quit [Ping timeout: 248 seconds]
andikr has quit [Ping timeout: 260 seconds]
ruid has joined #ruby
graffix has joined #ruby
MuffinPimp has quit [Ping timeout: 260 seconds]
<shevy>
unshadow I think you my be the first to bring up this topic here on #ruby in the last 3 years!
<unshadow>
shevy: Really ? I thought this is kinda "hot tech" right now with all the new AI shananigns going on
saneax is now known as saneax_AFK
<shevy>
dunno... I use ruby mostly just for boring, simple tasks that can be automated. AI sounds pretty advanced
nocontrol has quit [Remote host closed the connection]
Guest34101 has quit [Ping timeout: 246 seconds]
<unshadow>
shevy: But I see what you're getting at, it seems that Ruby has become the Go-to languge for scripts and web (ROR etc..) instead of a full featured multi purposed languge it is really.
tomatoes has joined #ruby
BSaboia has quit [Ping timeout: 252 seconds]
<shevy>
well it depends on where or how you use it of course
<shevy>
I would not know where to begin with AI, regardless of the language :)
<shevy>
but you are right... I really could not tell you anyone who uses ruby and AI... perhaps some japanese devs who happily describe their projects in japanese only :D
guest805 has joined #ruby
charlema_ has quit [Ping timeout: 276 seconds]
philtr_ has quit [Quit: leaving]
sonOfRa has quit [Quit: Bye!]
guest8051 has joined #ruby
sonOfRa has joined #ruby
poerror has quit [Ping timeout: 264 seconds]
Shaboum has quit [Quit: WeeChat 1.4]
vondruch_ has joined #ruby
tubuliferous has joined #ruby
vondruch_ has quit [Read error: Connection reset by peer]
vondruch_ has joined #ruby
guest8052 has joined #ruby
tk__ has joined #ruby
guest805 has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
baweaver has joined #ruby
guest8051 has quit [Ping timeout: 248 seconds]
vondruch has quit [Ping timeout: 246 seconds]
Xentil has quit [Read error: Connection reset by peer]
poerror has joined #ruby
guest8052 has quit [Ping timeout: 240 seconds]
<unshadow>
Well, the company I work at is using Ruby in a lot of different ways, we have a Reverse Proxy built using Ruby, including SSL Stripping and URL Re-Write. we also have an automation server that accepts files, save them to a Linux container and scans them using multiple tools. all in pure Ruby.
tubuliferous has quit [Ping timeout: 248 seconds]
<unshadow>
So I guess it really dependes what your programmers like to use XD
Meow-J has quit [Quit: Connection closed for inactivity]
<norc>
unshadow: Ruby is a full featured multi purpose language.
RegulationD has quit [Ping timeout: 240 seconds]
<norc>
unshadow: And Ruby 3.0 will hopefully remove some of the larger performance constraints making it more suitable to a wide variety of problems.
baweaver has quit [Ping timeout: 248 seconds]
<unshadow>
norc: I really do wish it too, really waiting for the JIT to be added
poerror has quit [Ping timeout: 260 seconds]
kalopsian has joined #ruby
bronson has joined #ruby
rmulligan has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 248 seconds]
<norc>
unshadow: The thing about languages though is often libraries. When picking a language, often a deciding factor is availability of adequate libraries to speed up development. Ruby on Rails is the major reason why Ruby has this "web" feeling when browsing rubygems.
tomatoes has quit [Ping timeout: 276 seconds]
<norc>
Simply because it attracted a lot of web developers to Ruby.
guest805 has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
SG045734 has joined #ruby
tjvc has joined #ruby
kalopsian has quit [Ping timeout: 252 seconds]
rmulligan has quit [Ping timeout: 264 seconds]
tamole has quit [Quit: ...]
roobienoobie has joined #ruby
<unshadow>
norc: Makes sense, though there are lots of gems out there, I usually find everything i'm looking for as a gem, NTLM, SSH, ANN, SSL etc.. I really enjoy having lower level aspects of programming accecable even though I use "high" languge like Ruby
charlemagne has joined #ruby
GioVdK has quit [Ping timeout: 250 seconds]
<norc>
unshadow: To me though the main aspect behind Ruby is the ease of writing with frameworks like rspec or any other that you might prefer.
<norc>
writing *tests.
<norc>
We have such extensive testing suites that you can do large aspects of Rails development without ever opening your browser for months.
tamole has joined #ruby
<norc>
And its amazing how seamlessly and effortlessly things like vcr with webmock can help there.
scepticulous has joined #ruby
GioVdK has joined #ruby
ruid has quit [Quit: Leaving]
terlar has quit [Ping timeout: 244 seconds]
adgtl has quit [Remote host closed the connection]
Chagel has joined #ruby
zotherstupidguy has joined #ruby
terlar has joined #ruby
griffindy has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
frustrum has joined #ruby
Vlat- has quit [Quit: Vlat-]
Sero has joined #ruby
Xeago has joined #ruby
n008f4g_ has quit [Ping timeout: 248 seconds]
pawnbox has quit [Remote host closed the connection]
howi has joined #ruby
frustrum has quit [Ping timeout: 268 seconds]
vise890 has joined #ruby
aegis3121 has joined #ruby
<howi>
good day. does anyone know what happened to the 'ping' module that was in standard library back in 1.8.7?
stannard has joined #ruby
vise890 has quit [Client Quit]
stannard has quit [Remote host closed the connection]
<unshadow>
The net-ping library provides a ping interface for Ruby. It includes separate TCP, HTTP, LDAP, ICMP, UDP, WMI (for Windows) and external ping classes.
Rickmasta has joined #ruby
andrewvos has joined #ruby
kalopsian has joined #ruby
Didac has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gagrio|CZ is now known as gagrio
mfaeh has joined #ruby
bruce_lee has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
davee_ has quit [Ping timeout: 252 seconds]
atmosx has quit [Quit: This is aparting message!]
mistermocha has joined #ruby
aryaching has joined #ruby
howi has left #ruby [#ruby]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ChiefAlexander has quit [Remote host closed the connection]
daivyk has joined #ruby
daivyk has quit [Client Quit]
halfamind has quit [Ping timeout: 244 seconds]
joast has quit [Quit: Leaving.]
<hanmac>
havenwood: didnt shevy want to make a "everything" gem? so you can do: requires 'everything' XD
berserk_ren has joined #ruby
<havenwood>
hanmac: and then an every_version_of_everything gem for when you're really bored
<havenwood>
i guess one version per gem is traditional
<havenwood>
random_version_of_each_gem then
xaxisx has quit [Quit: xaxisx]
Guest41075 has quit [Remote host closed the connection]
<shevy>
hanmac haha yeah ... but I am not sure how serious I was... I think I once tried to just re-package all gems into a standalone gem, or perhaps on a per-program thing so that everything is bundled into one and distributed as that. I remember that 2 years ago, it was kinda silly to have to do a batch "gem install name" when I could just put everything into a single .gem anyway
xaxisx has joined #ruby
paultreny_ has joined #ruby
rmulligan has joined #ruby
bricker has joined #ruby
<adaedra>
If only we had a way of installing all gem dependencies at once
<unshadow>
TBH a require 'lib/*' will be awsome :)
joast has joined #ruby
mallu has joined #ruby
Gasher has joined #ruby
halfamind1 has quit [Ping timeout: 248 seconds]
halfamind has joined #ruby
tk__ has quit [Quit: ばいばい]
BSaboia has joined #ruby
andrewvos has quit [Ping timeout: 248 seconds]
bricker has quit [Ping timeout: 244 seconds]
tesuji has quit [Read error: Connection reset by peer]
crowell has quit [Ping timeout: 240 seconds]
rmulligan has quit [Ping timeout: 260 seconds]
jgpawletko has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
techietrash has quit [Quit: Bye! <(^_^<)]
RegulationD has joined #ruby
uglybandersnatch has joined #ruby
y0da has joined #ruby
baweaver has joined #ruby
techietrash has joined #ruby
moeabdol has joined #ruby
jds has quit [Quit: Connection closed for inactivity]
but3k4 has quit [Read error: Connection reset by peer]
paultreny_ has quit [Quit: ¯\_(ツ)_/¯]
gbgdev has quit [Remote host closed the connection]
paultreny_ has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
shpoont has joined #ruby
uglybandersnatch has quit [Ping timeout: 276 seconds]
polishdub has joined #ruby
Sero has quit [Changing host]
Sero has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
crowell has joined #ruby
crowell has joined #ruby
dionysus69 has joined #ruby
lxsameer has joined #ruby
bkxd has joined #ruby
<shevy>
I put the gems into a subdir and required them from there
avenj has quit [Ping timeout: 248 seconds]
steffkes has quit [Ping timeout: 276 seconds]
xaxisx has quit [Quit: xaxisx]
rippa has joined #ruby
paultreny_ is now known as paultreny
dionysus69 has quit [Client Quit]
deavid has joined #ruby
andrewvos has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Chagel has quit [Ping timeout: 248 seconds]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
bricker has joined #ruby
slawrence00 has joined #ruby
catphish has left #ruby ["Leaving"]
xaxisx has joined #ruby
slackbotgz has joined #ruby
xaxisx has quit [Client Quit]
freakcoder has joined #ruby
kam270 has quit [Ping timeout: 276 seconds]
mostlybadfly has joined #ruby
DmitryBochkarev has joined #ruby
charlemagne has joined #ruby
krz has quit [Ping timeout: 240 seconds]
ChiefAlexander has joined #ruby
Xeago has quit [Remote host closed the connection]
D9 has quit [Ping timeout: 276 seconds]
aegis3121 has quit [Ping timeout: 260 seconds]
johnny56 has quit [Quit: WeeChat 1.4-dev]
subosito has joined #ruby
ixti has joined #ruby
johnny56 has joined #ruby
ixti has quit [Client Quit]
VeryBewitching has joined #ruby
aegis3121 has joined #ruby
diegoviola has joined #ruby
<VeryBewitching>
G'day folks.
norc has quit [Ping timeout: 252 seconds]
ta_ has quit [Remote host closed the connection]
dhollinger has joined #ruby
ta_ has joined #ruby
Vlat- has joined #ruby
D9 has joined #ruby
whippythellama has quit [Ping timeout: 248 seconds]
ziyadb has quit [Quit: Connection closed for inactivity]
tubuliferous has joined #ruby
freakcoder has quit [Quit: Leaving.]
fostertheweb has joined #ruby
jyaworski has joined #ruby
jds has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
nullwarp_ is now known as nullwarp
crystal77 has joined #ruby
tvw has quit [Read error: Connection reset by peer]
aganov has quit [Remote host closed the connection]
A124 has quit [Ping timeout: 248 seconds]
reprazen_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paultreny has quit [Quit: ¯\_(ツ)_/¯]
techietrash has quit [Quit: Bye! <(^_^<)]
techietrash has joined #ruby
whippythellama has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
paultreny has joined #ruby
paultreny is now known as Guest42570
y0da has quit [Ping timeout: 252 seconds]
subosito has joined #ruby
subosito has quit [Remote host closed the connection]
but3k4 has joined #ruby
subosito has joined #ruby
marr has quit [Ping timeout: 276 seconds]
haylon has joined #ruby
y0da has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
n008f4g_ has joined #ruby
techietrash has quit [Max SendQ exceeded]
Guest42570 has quit [Changing host]
Guest42570 has joined #ruby
techietrash has joined #ruby
krz has joined #ruby
davedev24 has joined #ruby
pawnbox has quit [Remote host closed the connection]
<nano->
drbrain: Can I generate a .gem from rdoc @ github? I'm a non native speaker when it comes to ruby and its echo system.
<nano->
s/echo/eco/
pawnbox has joined #ruby
mistermocha has joined #ruby
bezhermoso has joined #ruby
tubuliferous has quit [Ping timeout: 240 seconds]
rmulligan has joined #ruby
<Papierkorb>
I'm looking for web frameworks which I can use to *embed* a web interface into an existing ruby (cli) application. Currently looking at Sinatra, which after some fiddling plays nice, but are there other notable frameworks?
Guest34101 has joined #ruby
blandflakes has joined #ruby
chipotle has quit [Quit: cheerio]
<Papierkorb>
@Sinatra, I disliked how hard it was to mount a controller (Which itself is a Sinatra::Base sub-class) at a given path from another Base sub-class.
<VeryBewitching>
Papierkorb: Afaik, Sinatra probably is best.
rodfersou is now known as rodfersou|lunch
SenpaiSilver has quit [Quit: Leaving]
<VeryBewitching>
You could just use Rack though, that's an option.
<adaedra>
I was going to say that
shpoont has quit [Read error: Connection reset by peer]
<adaedra>
But it requires more work
shpoont has joined #ruby
andrewvos has quit [Ping timeout: 268 seconds]
sneakerhax has quit [Ping timeout: 276 seconds]
moeabdol has quit [Quit: WeeChat 1.4]
TvL2386 has joined #ruby
krz has quit [Ping timeout: 250 seconds]
slackbotgz has quit [Remote host closed the connection]
<havenwood>
Papierkorb: Then just pair it with Sequel (maintained by the Roda creator) and you're good to go! ;)
nanoz has joined #ruby
<Papierkorb>
I love Sequel, so that's a plus!
<shevy>
Roda ... Cuba ... Yoda!
bronson has joined #ruby
<havenwood>
Jeremy Evans if often around in the #roda channel. Best. Maintainer. Ever.
shredding has joined #ruby
<subosito>
ddv haha, sounds like a poor naming?
<ddv>
he's a communist :P
<ddv>
j/k
krz has joined #ruby
whippythellama has quit [Ping timeout: 248 seconds]
kies has quit [Quit: baaaaiiiiiiiiiii~]
<subosito>
ahh :)
<havenwood>
Papierkorb: But other than the plugins, all of Roda lives in this one file. I think it and the plugins are worth a read and it's really been lovely to use.
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
janzo has joined #ruby
urbanmonk has joined #ruby
seitensei has joined #ruby
LastGabs has joined #ruby
benlieb has joined #ruby
spintronic_ has joined #ruby
amclain has joined #ruby
freakcoder has joined #ruby
araujo has quit [Ping timeout: 248 seconds]
andrewvos has quit [Ping timeout: 252 seconds]
pietr0 has joined #ruby
spintronic has quit [Ping timeout: 244 seconds]
spintronic_ has quit [Remote host closed the connection]
victor_ has joined #ruby
adgtl has joined #ruby
adgtl has quit [Changing host]
adgtl has joined #ruby
marr has joined #ruby
spintronic_ has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
subosito has quit [Quit: :qa]
subosito has joined #ruby
Sucks has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
victor_ has quit [Ping timeout: 248 seconds]
[Butch] has joined #ruby
tamole has quit [Quit: ...]
djbkd_ has joined #ruby
PedramT has quit [Remote host closed the connection]
rmulligan has joined #ruby
PedramT has joined #ruby
PedramT has quit [Remote host closed the connection]
maner has joined #ruby
jterra has quit [Quit: leaving]
poerror has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
PedramT has joined #ruby
PedramT has quit [Remote host closed the connection]
<havenwood>
workmad3: Looking at this after having had coffee it seems it's already using relative path to the working directory via #absolute_path.
tubuliferous has joined #ruby
benlieb has quit [Quit: benlieb]
subosito has quit [Quit: :qa]
<havenwood>
"Relative paths are referenced from the current working directory of the process unless dir_string is given, in which case it will be used as the starting point."
<rapha>
hmm
<havenwood>
workmad3: Testing seems to confirm. Am I missing something?
<apeiros>
rapha: you use double quotes instead of single quotes.
mdih has quit [Ping timeout: 244 seconds]
dopamean_ has joined #ruby
tamole has joined #ruby
<rapha>
Yay!!!
<rapha>
Thank you apeiros! :)
<apeiros>
rapha: ruby 101, single quotes only escape \\ and \'
<apeiros>
and don't do interpolation
KensoDev has joined #ruby
adgtl has quit [Remote host closed the connection]
<rik>
I have a default install of Sequel ... and it's complaining that it can't find the sqlite3 adapter.
<rik>
i have no idea why
maletor has joined #ruby
frustrum has quit [Ping timeout: 252 seconds]
zast has joined #ruby
mistermocha has quit [Remote host closed the connection]
hightower2 has joined #ruby
rkazak has joined #ruby
mistermocha has joined #ruby
fostertheweb has joined #ruby
tomchapin has joined #ruby
<rapha>
apeiros: That's why I thought I'd have to use single quotes :8
<rapha>
:(
<apeiros>
that… makes no sense?
<rapha>
yes i understand that now
<rapha>
the \uXXX stuff confused me
IrishGringo has quit [Ping timeout: 248 seconds]
mleung has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
<apeiros>
rapha: DIACRITICS.each {|d| f.write("#{d}\t\n") # do you want that trailing tab?
pawnbox has quit [Remote host closed the connection]
hightower3 has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
mfaeh has quit []
<apeiros>
oh… actually… you write every single character with a trailing tab on its own line
Guest5 has joined #ruby
<apeiros>
I somehow doubt that's what you intend to do. take a look at both IO#puts and Array#join
Dreamer3 has quit [Max SendQ exceeded]
<zacts>
hi rubyists
Dreamer3 has joined #ruby
shpoont has quit [Read error: Connection reset by peer]
<apeiros>
hi zacts
pawnbox has quit [Remote host closed the connection]
<zacts>
yo
RegulationD has joined #ruby
pawnbox has joined #ruby
shpoont has joined #ruby
mattwashere has joined #ruby
crystal77 has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3>
havenwood: `require_relative` is relative to the file it's in, not the working directory
<manveru>
rik: install the sqlite3 gem
avenj has joined #ruby
bigkevmcd has joined #ruby
<workmad3>
havenwood: i.e. it's not the same as `require "./foobar"` which would be relative to CWD
avenj has quit [Changing host]
avenj has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
* manveru
should start the use-require-relative-everywhere initiative
<apeiros>
ew
<workmad3>
manveru: please no :(
wilbert has joined #ruby
WebDawg has joined #ruby
steffkes has joined #ruby
shinnya has joined #ruby
LastGabs has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<manveru>
well, not everywhere, but at least within libraries
<workmad3>
manveru: still, please no
<apeiros>
would be an improvement over that fugly require + File.expand_path + __FILE__ shit I see sometimes
<apeiros>
but still nope. nope. nope. nope.
rodfersou|lunch is now known as rodfersou
<manveru>
what's the reason to search 300 locations just to stumble over the file in the same directory...
<zacts>
so with ruby is it better to use as many gems as possible to not duplicate work, or is it better to stay minimalist and only use what you need?
<apeiros>
manveru: that ruby has to search at all is an optimization problem. where to look for files is a connaisance problem.
roshanavand has joined #ruby
<apeiros>
and not the business of the file to know.
SCHAAP137 has quit [Remote host closed the connection]
<shevy>
zacts the fewer dependencies on gems the better, but some gems are more important than others, like either those that are very very basic or those that do a lot of useful things
<workmad3>
manveru: `require` fixes the location of a single file (the file you're requiring). `require_relative` fixes the location of two files (the current file and the file you're requiring)
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seitensei has quit [Quit: "For a good time, try: 'curl -L http://bit.ly/10hA8iC | bash' ;)"]
d0nn1e has joined #ruby
<manveru>
require depends on the contents of your environment and the file you're requiring, require_relative only on the location of two files :P
<apeiros>
require makes it a business of your app to know where stuff is.
<apeiros>
require_relative makes it a business of the requiring file to know where stuff is.
<drbrain>
nano-: rake package
urbanmonk has quit [Quit: urbanmonk]
<manveru>
exactly
<zacts>
shevy: ah ok, cool thanks
<manveru>
apeiros: i don't mean to require whole libraries with require_relative
<manveru>
you just use require for the initial one
<apeiros>
how does that matter?
<manveru>
that way libraries are always self-contained
synthroid has joined #ruby
rkazak has quit [Ping timeout: 276 seconds]
ferr has quit [Quit: WeeChat 1.4]
steffkes has quit [Ping timeout: 240 seconds]
agit0 has quit [Client Quit]
<manveru>
going to the other extreme ends with rails... where nobody knows where a file was actually required
<apeiros>
$"
<manveru>
if i try to strace a rails app, i have to wait 5 minutes until it finally is done looking for files :P
chouhoulis has quit [Remote host closed the connection]
<rapha>
apeiros: sorry, was already back at the code. yes, that trailing tab plus newline is exactly what i wanted. The file will become a replacement table, but I'll have to write the replacement characters manually behind the tabs. Just wanted to spare myself the work of having to press "tab" on each line.
<manveru>
and startup would be significantly faster if requiring was O(1) instead of O($:.size)
<apeiros>
rapha: ah, ok. carry on then ;-)
Guest5 has joined #ruby
<rapha>
:)
n008f4g_ has quit [Ping timeout: 246 seconds]
<apeiros>
manveru: as said, that's an optimization problem. and yeah, that part is IMO regrettable about ruby.
guest8051 has quit [Ping timeout: 244 seconds]
<workmad3>
manveru: require_relative is still O(n) btw... as it needs to check $LOADED_FEATURES still to ensure that the file hasn't been previously required
<manveru>
workmad3: but without I/O
<apeiros>
workmad3: that should be O(1) with a Set
<apeiros>
(and back to optimization problems)
<manveru>
and yeah, i think $" is already optimized quite a bit since 1.9 or so
bronson has joined #ruby
<manveru>
used to be much worse
<apeiros>
for every problem of slow code there's a fast solution which is wrong.
<manveru>
:)
<manveru>
you just have to choose which part of the solution you want right
<manveru>
anyway, it's moot for me to talk about it, since nobody will ever listen anyway
<apeiros>
yupp
<apeiros>
and I'm moving to zeroload for my stuff anyway.
<apeiros>
the private stuff, that is.
<manveru>
what's a zeroload?
<apeiros>
you call it in the root module, it autoloads the rest of your library.
mrgrieve1 has quit [Ping timeout: 240 seconds]
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
and yes, that means it's somewhat similar to require_relative :)
* apeiros
doesn't see any irony there.
<manveru>
lol
bigkevmcd has joined #ruby
<manveru>
well, that sounds like a good compromise
Macaveli has joined #ruby
<apeiros>
the hard part is that it breaks with all conventions
<apeiros>
you do lib/Foo/BarBaz.rb for Foo::BarBaz
shpoont has quit [Read error: Connection reset by peer]
<apeiros>
but IME it's totally worth it.
roshanavand has quit [Quit: This computer has gone to sleep]
<manveru>
so it does the module_missing shit?
<apeiros>
(so far)
<apeiros>
holy no
<apeiros>
it uses Kernel#autoload
<apeiros>
which has the advantage that all code is fully explorable, unlike rails
<manveru>
wasn't that supposed to be deprecated like a decade ago?
<apeiros>
i.e. all constants will be there even if the file wasn't loaded.
<apeiros>
yeah, that situation isn't fully cleared. but it's no longer thread-unsave.
<manveru>
that's something :)
<apeiros>
which was the reason to deprecate it. so I guess that's no longer the case. it just has never been said explicitly.
<workmad3>
apeiros: nice, how did they solve that issue with it?
<manveru>
mutex...
roshanavand has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<apeiros>
workmad3: no idea. iirc when I tried to do that the main problem was toplevel code like "loop do … end"
<apeiros>
without that, it'd be simple
<apeiros>
I guess they made the loading two-step. thread-safely register that the file is being loaded.
<manveru>
though require_relative isn't used by autoload anyway, so it's a two-folded issue still
agit0 has joined #ruby
<apeiros>
I'll let perfect be the enemy of good here ;-)
<apeiros>
well, zerload frees you from using require other than requiring your root file.
<apeiros>
*zeroload
ChiefAlexander has quit [Remote host closed the connection]
wreet has joined #ruby
Xeago has joined #ruby
bronson has joined #ruby
<workmad3>
apeiros: just found the patch thread for it... it's interesting, basically they have to delay the replacement of an autoloaded constant with a module until after the autoload finishes (the old situation was that when you had `module Foobar; blah blah blah; end` and Foobar was autoloaded, the constant was replaced immediately upon seeing that first `module Foobar`)
<workmad3>
s/module/value
Xeago has quit [Remote host closed the connection]
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davee_ has quit [Quit: Leaving]
freerobby has joined #ruby
AlexRussia has joined #ruby
<strongcode>
if I have a helper method `parse_html` that I want to use in both an instance method and a class method of the same class, what is the cleanest way to go about doing that?
techietrash has quit [Quit: Bye! <(^_^<)]
<strongcode>
make parse_html() an instance method and have both call it with Foo.parse_html() ?
zarubin has quit [Quit: leaving]
ghormoon has quit [Ping timeout: 268 seconds]
zarubin has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
ChiefAlexander has quit [Remote host closed the connection]
<adaedra>
arthurl: what system are you on?
benlieb has quit [Quit: benlieb]
<adaedra>
t-ask: does it really matter?
<arthurl>
ubuntu 14.04
pawnbox has quit [Remote host closed the connection]
kt2 has quit [Remote host closed the connection]
<adaedra>
apt-get update/upgrade or whatever the keyword is?
TomyLobo has joined #ruby
anjen has joined #ruby
<t-ask>
adaedra: well it asks me ti install nvidia or mesa driver versions and I don't know which one the VPS needs. And if Ruby actually doiesn't need it at all why install it :9
siaw has left #ruby [#ruby]
<adaedra>
It's a dependency, surely a linked library.
<adaedra>
In doubt, mesa.
roshanavand has joined #ruby
ChiefAlexander has joined #ruby
graffix has quit [Ping timeout: 276 seconds]
<arthurl>
adaedra I'm on ubuntu 14.04
azmelanar has joined #ruby
<TomyLobo>
mesa also isa gl driva
<adaedra>
arthurl: you already said that. Did you see my answer?
jottr_ has joined #ruby
WebDawg has quit [Ping timeout: 276 seconds]
<TomyLobo>
</jarjar>
shadoi has joined #ruby
<arthurl>
adaedra you mean the apt-get update answer?
<adaedra>
arthurl: yes
jottr has quit [Ping timeout: 240 seconds]
<adaedra>
t-ask: I've got mesa installed on my server too
rmulligan has joined #ruby
<t-ask>
adaedra: I wonder if gl is needed for websites. I guess, I'm just confused, why I need to install any opengl lib for a website
tamole has quit [Quit: bye]
slakevc has joined #ruby
slakevc has quit [Max SendQ exceeded]
<adaedra>
t-ask: either a direct or indirect dependency
<adaedra>
fedora's ruby does not seem to pull it tho
jottr_ has quit [Ping timeout: 244 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
<arthurl>
adaedra thank you- i didn't even think that was a system package that was installed using apt-get for some reason :)
<arthurl>
simple enough - unfortunately it's areadly 'up to date' even though it's not
<adaedra>
/usr/bin is usually package manager's territory for Linux
<t-ask>
adaedra: thaks, then it is an indirect dep. and I can ask the website/project owner if I need libgl for this website
<arthurl>
right- that makes sense
n008f4g_ has joined #ruby
<adaedra>
t-ask: if it's a /required/ dep, you will not get around
Sam____ has joined #ruby
<Sam____>
Oi oi
ghormoon has quit [Ping timeout: 240 seconds]
<adaedra>
t-ask: but it's ubuntu; does yours by any chance pulls recommended and/or suggested packages by default?
<t-ask>
adaedra: yes, that is what I try to figure out. its an AUR pkg. Sometimes they add deps which aren't needed.
WebDawg has joined #ruby
Axy has quit [Read error: Connection reset by peer]
<adaedra>
wat
TheCubeLord has quit [Quit: Leaving]
graffix has joined #ruby
<adaedra>
oh wait, I missed you both
<t-ask>
Arch linux USer package
TheCubeLord has joined #ruby
<adaedra>
mixed*
freerobby has quit [Quit: Leaving.]
<adaedra>
you're under Arch?
<t-ask>
yes
<t-ask>
want to install Diaspora
s00pcan_ has quit [Ping timeout: 244 seconds]
spider-mario has joined #ruby
<adaedra>
Will be a bit easier to look then
cdg has joined #ruby
<adaedra>
Which AUR package, exactly?
brendan- has quit [Remote host closed the connection]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirillzh has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
gizmore has quit [Ping timeout: 240 seconds]
jyaworski has joined #ruby
ftj has joined #ruby
stannard has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
ftj has quit [Client Quit]
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
pawnbox has joined #ruby
nibbo has joined #ruby
Karix has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
haylon has quit [Quit: WeeChat 1.4]
gatman has joined #ruby
mdw has joined #ruby
mdw_ has quit [Ping timeout: 248 seconds]
pawnbox has quit [Ping timeout: 268 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
IrishGringo has quit [Remote host closed the connection]
_djbkd has joined #ruby
SCHAPiE_ has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
tomchapin has joined #ruby
Xiti has joined #ruby
rmulligan has joined #ruby
SG045734 has quit [Ping timeout: 276 seconds]
BTRE has quit [Ping timeout: 250 seconds]
gizless has quit [Ping timeout: 244 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
mdw has quit [Quit: Sleeping Zzzzz]
hxegon_AFK has quit [Quit: BRB]
stannard has joined #ruby
roshanavand has joined #ruby
jpfuentes2 has joined #ruby
SirFunk has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
yasha_ has joined #ruby
yasha_ has quit [Max SendQ exceeded]
jaequery has joined #ruby
Xeago has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
victor_ has joined #ruby
_stu_ has quit [Quit: _stu_]
SirFunk has joined #ruby
huddy has joined #ruby
Vlat- has quit [Quit: Vlat-]
htmldrum has joined #ruby
axl_ has quit [Quit: axl_]
stannard has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
gbgdev has joined #ruby
yasha_ has joined #ruby
gbgdev has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 250 seconds]
victor_ has quit [Ping timeout: 268 seconds]
p0p0pr37 has joined #ruby
nando293921 has quit [Ping timeout: 240 seconds]
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uglybandersnatch has quit [Ping timeout: 240 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
ensyde_ has quit [Read error: Connection reset by peer]
ensyde_ has joined #ruby
Ropeney has joined #ruby
fullofcaffeine has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BTRE has joined #ruby
_stu_ has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
Snowy has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
Snowy has joined #ruby
dopamean_ has quit [Ping timeout: 260 seconds]
cpup has quit [Ping timeout: 260 seconds]
kies has quit [Ping timeout: 244 seconds]
hxegon has joined #ruby
ascarter has joined #ruby
jorrin has joined #ruby
jottr_ has joined #ruby
fullofca_ has joined #ruby
_djbkd has quit [Remote host closed the connection]
fullofcaffeine has quit [Ping timeout: 248 seconds]
cpup has joined #ruby
Vingador has joined #ruby
gatman has quit [Remote host closed the connection]
zenlot has joined #ruby
tubuliferous has joined #ruby
jottr_ has quit [Ping timeout: 264 seconds]
zenlot6 has quit [Ping timeout: 244 seconds]
audiodude has quit [Ping timeout: 264 seconds]
golgaroth has quit [Ping timeout: 264 seconds]
gatman has joined #ruby
audiodude has joined #ruby
golgaroth has joined #ruby
rbennacer has joined #ruby
_djbkd has joined #ruby
_djbkd has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 268 seconds]
_djbkd has joined #ruby
poerror has quit [Quit: leaving]
cpup has quit [Ping timeout: 260 seconds]
Ishido has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
grill_power has quit [Remote host closed the connection]
gatman has quit []
intrigueD has quit [Remote host closed the connection]
solocshaw has joined #ruby
cpup has joined #ruby
choke has joined #ruby
speakingcode has quit [Ping timeout: 250 seconds]
Linell has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
lxsameer has quit [Quit: Leaving]
cpup has quit [Ping timeout: 244 seconds]
az has joined #ruby
trosborn has joined #ruby
trosborn has quit [Client Quit]
johnmilton has joined #ruby
mdw has joined #ruby
ruby-lang516 has joined #ruby
<ruby-lang516>
hello buddy
<ruby-lang516>
anyone here
<ruby-lang516>
I need help
<RickHull>
what seems to be the problem?
ruby-lang516 has left #ruby [#ruby]
<Canar>
i need help too
<Canar>
someone send a psychiatrist
<baweaver>
RickHull: apparently IRC
cpup has joined #ruby
<RickHull>
problem solved
rmulligan has quit [Ping timeout: 268 seconds]
<Canar>
:)
Rahul_Roy has quit [Quit: Connection closed for inactivity]
kirillzh has quit [Ping timeout: 260 seconds]
jackjackdripper1 has joined #ruby
mdw has quit [Ping timeout: 244 seconds]
BSaboia has quit [Ping timeout: 240 seconds]
freakcoder has quit [Quit: Leaving.]
joonty has joined #ruby
BTRE has quit [Ping timeout: 240 seconds]
jackjackdripper has quit [Ping timeout: 260 seconds]
jottr_ has joined #ruby
tubuliferous has joined #ruby
baweaver has quit [Remote host closed the connection]
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
az has left #ruby [#ruby]
jaruga has joined #ruby
jaruga is now known as jaruga_
<Linell>
I'm using rails as an API for a react front end, with Devise for authentication. How can I change the link for resetting the user passwords?
deimos has quit [Ping timeout: 264 seconds]
BSaboia has joined #ruby
<Linell>
And then how should I format the request to actually set the passwords? It looks like a GET request, but I can't seem to figure ou the right params.
<RickHull>
try #rubyonrails
saneax_AFK is now known as saneax
<Linell>
Awesome, thanks
mdw has joined #ruby
deimos has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
cpup has quit [Ping timeout: 248 seconds]
sdwrage has quit [Quit: Leaving]
y2mq37 has quit [Ping timeout: 264 seconds]
PedramT has joined #ruby
tubuliferous has quit [Ping timeout: 248 seconds]
y2mq37 has joined #ruby
kirillzh has joined #ruby
jaruga_ has quit [Client Quit]
rattatmatt has quit []
Rickmasta has joined #ruby
Snowy has quit [Quit: ragequit]
jaruga has joined #ruby
jaruga is now known as jaruga_
PedramT has quit [Ping timeout: 276 seconds]
<Radar>
?rails Linell
<ruby[bot]>
Linell: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
halfamind has quit [Quit: Leaving.]
jorrin has quit [Quit: Leaving]
machinewar has joined #ruby
<machinewar>
has anyone had an issue when parsing CSV where column header row has more values then the following rows. They should be nil, but they're just left out of the arrays after the header