<benzrf>
so it sees the whole string as a separator
<lethjakman>
oh
venkat has quit [Read error: Connection reset by peer]
<lethjakman>
ugh
<lethjakman>
you're right
<lethjakman>
thank you
moted has joined #ruby
<benzrf>
lewellyn: hey did you see that i stopped working on legend
venkat has joined #ruby
<lethjakman>
thank youthank you too benzrf :)
<benzrf>
np
<lethjakman>
what's legend?
<lethjakman>
so...it returns another empty string at the end. is there a way to stop that?
<benzrf>
it was a thingy for zelda-type custom dungeons and stuff but then i found out about something called 'zelda classic' which is basically similar to what i was aiming for
<benzrf>
lethjakman: what exactly do you mean?
<benzrf>
lethjakman: oh
skulker has joined #ruby
deens has joined #ruby
<lethjakman>
benzrf: try running my exact string
<benzrf>
lethjakman: make it 1
<benzrf>
not 0
<lethjakman>
ahhh got it
shime has quit [Ping timeout: 272 seconds]
<lethjakman>
benzrf: that's cool, did you know that's what zelda dungeons were originally supposde to be?
<benzrf>
hm>
<lethjakman>
did you know gaming did a cool bit on it
venkat has quit [Read error: Connection reset by peer]
venkat has joined #ruby
<benzrf>
pls link me o-o
grzywacz has quit [Ping timeout: 252 seconds]
<lewellyn>
benzrf: i did not. i have not taken the time to follow up on it.
freezey has quit [Read error: Operation timed out]
<lethjakman>
benzrf: ok one sec
<benzrf>
lethjakman: ;p
yoshie902a has joined #ruby
<benzrf>
* @lewellyn
rootshift has joined #ruby
<lewellyn>
benzrf: i'm trying to finish up this enterprise app before i look at things which actually have a fun result :P
deens has quit [Read error: No route to host]
venkat_ has joined #ruby
deens has joined #ruby
<benzrf>
hah
venkat has quit [Read error: Connection reset by peer]
unixpro1_ has quit [Ping timeout: 272 seconds]
deens has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
<jamest3>
Would appreciate it if someone could look at my project euler ruby solution for problem #10 and explain to me how come im getting the wrong output(sieve of eratosthenes). https://gist.github.com/jamesjtong/8533129
nobitanobi has quit [Quit: Leaving]
jailbot has joined #ruby
fgo has quit [Remote host closed the connection]
kells has joined #ruby
kells is now known as Guest36442
Senjai has quit [Changing host]
Senjai has joined #ruby
zastern has quit [Quit: WeeChat 0.4.2]
Guest36442 has quit [Client Quit]
zastern has joined #ruby
kells_ has joined #ruby
burlyscudd has joined #ruby
gabriha__ has joined #ruby
kells_ is now known as kells
mklappstuhl has joined #ruby
<bnagy>
why don't you refactor?
<bnagy>
make seive an isolated method, then seive like 1..20 and visually inspect it?
<bnagy>
also you only need to seive with up to sqrt lim
<bnagy>
lots of people just hardcode a table of primes to use for that, cause dividing through with composites of stuff you already did is a waste of cycles
gabriham_lincoln has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mklappstuhl has quit [Ping timeout: 246 seconds]
<bnagy>
YOURBESTFRIEND: project euler is a set of exercises. Using the sieve is the entire point.
<zastern>
YOURBESTFRIEND: you win best IRC nick (of the hour)
Neomex has joined #ruby
bradhe has joined #ruby
aryaching_ has joined #ruby
speakingcode has quit [Ping timeout: 264 seconds]
Neomex has quit [Client Quit]
thesheff17 has joined #ruby
aryaching_ has quit [Read error: Connection reset by peer]
<Lewix>
YOURBESTFRIEND: I was gonna say capital nicknames should be forbidden
<Lewix>
that's ostentatious
aryaching has quit [Ping timeout: 272 seconds]
gja has joined #ruby
aryaching has joined #ruby
enebo has quit [Quit: enebo]
vlad_starkov has joined #ruby
charliesome has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
yaymukund has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
rootshift has joined #ruby
phipes has quit [Remote host closed the connection]
bojolo5 has joined #ruby
nycjv321 has joined #ruby
<bnagy>
jamest3: also, it's not a great idea to modify a collection you're each'ing over
aryaching_ has joined #ruby
<bojolo5>
236
xybre has quit [Ping timeout: 264 seconds]
<jamest3>
hmmm thanks and yeah i could just do Prime.each(1999999).inject(&:+) . i will definitely refactor first thanks bnagy
<nycjv321>
Question. I am trying to simulate user load by generating HTTP requests. I've seen tools that "advertise" to generate many users. If I am able to design my application correctly, isn't the numbers of "users", and connections I generate tied down to my hardware?
coca_rails has joined #ruby
<bnagy>
jamest3: Prime.each is not fulfilling the exercise
benzrf|totalyafk has quit [Ping timeout: 264 seconds]
<bnagy>
unless you use it to fill your seed primes, then it's fine
benzrf has joined #ruby
<benzrf>
hello
<benzrf>
i think i was pinged while i was afk
aryaching has quit [Ping timeout: 260 seconds]
<benzrf>
anybody know what that was
coca_rails has quit [Remote host closed the connection]
aryaching has joined #ruby
xybre has joined #ruby
<centrx>
benzrf, I can't speak for everyone, but I said "good job" after you said "crap"
jamest3 has quit [Remote host closed the connection]
<benzrf>
bojolo5: what port
<benzrf>
and what protocol
<bojolo5>
please 8080
<bojolo5>
u can hack me
<bojolo5>
jajaja
<YOURBESTFRIEND>
Lewix: no
nhhagen has quit [Ping timeout: 260 seconds]
<benzrf>
Lewix: there are some valid points
<xybre>
Lewix: other than flamebait, that might have been "true" as far as people could tell when it was posted in 2008, but the top answer isn't really accurate and is sort of an oversimplification, but it makes some good points.
<benzrf>
Lewix: i dunno how much i entirely agree
Spami_ has quit [Quit: This computer has gone to sleep]
prc has quit [Ping timeout: 272 seconds]
<benzrf>
Lewix: i guess id say...
jfoy has quit [Quit: jfoy]
<benzrf>
Lewix: python is more about being simple, straightforward, obvious, and consistent
nfk has quit [Quit: yawn]
<benzrf>
Lewix: sometimes at the expense of elegance or convenience
<YOURBESTFRIEND>
it's not consistent
<xybre>
If you want to talk philosophy, it barely touches the actual philosophy of its creators.
<benzrf>
xybre: o rly
<xybre>
You can't really talk about comparing Python and Ruby without talking about Perl.
<benzrf>
true
queuetip has quit [Quit: leaving]
<benzrf>
what is inconsistent about python tho?
skulker has quit [Remote host closed the connection]
<shevy>
python 3
<benzrf>
<_>
<Lewix>
benzrf: i thought that was also part of ruby philosophy
<shevy>
I can't stand sudden changes like print foo vs print(foo)
<centrx>
Python is more C-like
yacks has joined #ruby
<shevy>
and given that python is used in some build scripts, namely part of some libraries in modular xorg, this has been insanely annoying
<benzrf>
Lewix: not exactly
<benzrf>
Lewix: i tend to find that ruby favors convenience over purity sometimes
<shevy>
ruby favours lazy people
<benzrf>
it believes in there being more than one way to do things
<benzrf>
and in being clever
mklappstuhl has joined #ruby
<shevy>
you can do: def foo(i) vs. def foo i, and people often chose the latter because they can eliminate at least keystroke there (the last ')')
<Lewix>
benzrf: remind me what's ruby philosophy
<xybre>
benzrf: Matz wrote Ruby with the intention to make beautiful code, a sort of executable poetry. This influences the entire design and culture of Ruby. It inherets a lot of the "many way to express a concept" from perl.
<shevy>
*one keystroke
<benzrf>
right
<shevy>
benzrf what would be cool would be a mix between ruby and python
<benzrf>
ruthon
mlpinit has quit [Remote host closed the connection]
<shevy>
that name is awful
<benzrf>
yup
<Lewix>
DRY
_reset has joined #ruby
<shevy>
people would be ashamed to admit that they would use a language called "ruthon"
<benzrf>
ha
<Lewix>
ruthon aha
<benzrf>
Lewix: one thing ive noticed about python vs ruby
mklappstuhl has quit [Read error: Connection reset by peer]
<shevy>
Ruby code can be very elegant. It can also be very awful, you just have to look at some of the code written ~10 years ago
mklappstuhl has joined #ruby
<xybre>
shevy: considering that "python" is named after the monty not the snake.. I'm impressed people aren't embarassed by that bad joke.
<shevy>
yeah
<Lewix>
shevy: or the code I wrote yesterday
<shevy>
this I wondered too
<bnagy>
as opposed to the elegance that is modern Rails
<shevy>
xybre, I think back in 1995 it was kinda true
<benzrf>
Lewix: given a feature that could be useful or nice to have, but could also lead to confusion or unexpected behavior
<shevy>
compared to perl, python was more fun to write and maintain
<xybre>
shevy: thats true, because of the perl-like expressiveness of Ruby you can do truly awful things in it.
<benzrf>
Lewix: i tend to find that python will reject it, while ruby will embrace it
<shevy>
yeah, matz is very experimentation happy
<shevy>
so we get useless things like stabby lambda
<Lewix>
I got to say, I kind like the python philosophy. it's more focus
Kricir has joined #ruby
enebo has joined #ruby
<shevy>
Lewix that's why we need a language uniting the best of both worlds!
Hanmac1 has joined #ruby
<benzrf>
Lewix: same-ish
<benzrf>
Lewix: btw, minor example of the above
<Xuisce>
shevy: hi
<benzrf>
Lewix: in ruby, you can have default values for arguments
<Xuisce>
Ruby ftw
<shevy>
hey Xuisce - did you write more ruby in between already?
<xybre>
They're opposing philosophies. You'd need a new philosophy, a more Tao and less Zen philosophy. Take the middle path.
<benzrf>
Lewix: so you can say 'def foo(a, b, c=3, d=4)'
<benzrf>
Lewix: you can do the same thing in python
<shevy>
and benzrf have you finally found a new project? you keep on talking about zelda but it's like a month ago since you stopped on it, it is time for you to find a new project and release a GEM
<benzrf>
Lewix: in python, you cannot have a required argument after one with a default
<shevy>
python is the general that leads you to win in a battle but only the one true way how it is fight
reset has quit [Ping timeout: 272 seconds]
Hanmac has quit [Ping timeout: 265 seconds]
emptymag00 has quit [Read error: Connection reset by peer]
<shevy>
ruby is more like a philosophizer talking endlessly about the world, spawning ideas - and never finishing a job, because there is always a better way to do it
<shevy>
*fought
<shevy>
YOURBESTFRIEND I hate you :(
<shevy>
you are one of those who omit () in defs
<Lewix>
shevy: well said
<centrx>
YOURBESTFRIEND, Yes, the method name itself is 85 characters
mklappstuhl has quit [Ping timeout: 260 seconds]
<shevy>
hehe
<xybre>
I omit parens in everything.
<shevy>
:(
<shevy>
hmm
<shevy>
xybre why?
<benzrf>
xybre: do you do (foo bar) over foo(bar)
<xybre>
Any time it can be avoided, it should be. If you have to use parens, its probably because your code is too complex.
<shevy>
lol
<centrx>
Python is missing blocks, and object-oriented methods on major functionality like str() and len()
<Ponyo>
...
<shevy>
def foo i
<shevy>
how is that complex
atraylen has quit [Read error: Connection reset by peer]
judd7_ has quit [Ping timeout: 264 seconds]
<Lewix>
shevy: do you lean towards python
<shevy>
Lewix hmm not really, only parts of it are nice
Targen has quit [Read error: Operation timed out]
<shevy>
I can not forgive explicit self
<xybre>
shevy: exactly, you don't need them.
<shevy>
but there are more people using python out there
<Ponyo>
The only part of python I find nice is the part that works that i don't have to touch.
<shevy>
haha
<shevy>
<3 Ponyo
<Ponyo>
<3
<benzrf>
Lewix: i did python for something like 9 months probably
<benzrf>
Lewix: before trying out ruby
kells has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<benzrf>
Lewix: i still think python is cleaner and less annoyingly complicated and weird
fgo has quit [Remote host closed the connection]
<benzrf>
Lewix: but in terms of getting down to business and writing code that actually does something
krz has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<benzrf>
Lewix: i find ruby significantly more pleasant
<benzrf>
:)
<xybre>
I keep hearing people say python is used more thna ruby, but I know more out of work pythonistas than rubyists.
<Ponyo>
So far I have found Ruby to be the most pleasant language i've ever coded in
centipedefarmer has joined #ruby
<Lewix>
xybre:because it was ruby sexy time. The honeymoon will be over soon
<centrx>
Plus, it doesn't suck like Python
<Ponyo>
ha
<benzrf>
centrx: python hardly sucks
Hanmac1 has quit [Ping timeout: 272 seconds]
<benzrf>
it is merely less neat than ruby
<centrx>
Right now I am trying to debug a C++ network application, so it could be worse
Davey_ has joined #ruby
<Ponyo>
rm is the best debugger in the world
<shevy>
xybre you mean paid work?
<benzrf>
rm?
asteros has quit [Quit: asteros]
<benzrf>
oh lol
<shevy>
Because when I look at bindings, I see the opposite - like the gnome/gtk-bindings in python are more polished and complete than the ruby ones
<Lewix>
rubyists have too many philosophers
kells has joined #ruby
<Lewix>
get to work people
<xybre>
shevy: yes?
<shevy>
also ruby-qt vs python-qt
<shevy>
yeah Lewix!
kells is now known as Guest37217
<bnagy>
xybre: if unemployment were a fixed percentage among programmers and your sample was unbiased then what you said would still support the opposite of your premise
wallerdev has joined #ruby
skulker has joined #ruby
Davey_ has quit [Client Quit]
<xybre>
bnagy: Ah, sorry, I meant companies, not people. Here in the US we get that confused all the time.
<bnagy>
out of work companies?
<benzrf>
hah
<benzrf>
i have to go so see you
<benzrf>
but it was pleasant bikeshedding
benzrf has left #ruby [#ruby]
Davey_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<shevy>
it's not bikeshedding at all!
<xybre>
bnagy: Used by more companies, come on keep up :D
Spami has joined #ruby
<shevy>
How productive, fast, good people are is hugely influenced by the language used
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
chipotle has quit [Quit: cya]
<bnagy>
xybre: the more widely python is used by companies the more unemployed pythonistas one would expect to see
bojolo5 has left #ruby [#ruby]
wald0 has quit [Quit: Lost terminal]
<shevy>
they suck anyway
Hanmac has joined #ruby
aryaching_ has quit [Ping timeout: 248 seconds]
Thanatermesis has joined #ruby
<nycjv321>
This is a stupid scope question if I have method a call method b a -> will variables in a be visible in method b? e.g. a.my_variable -> b.{p my_variable} ?
<Asitha>
Hey guys - I've got a form that has multiple checkboxes that are grouped in an array as days[], so when it is saved in the db, it is stored as a string
<Asitha>
So when I call the value in ruby, it returns as ["Monday", "Tuesday", "Thursday"]
mudmaster has quit [Read error: Connection reset by peer]
byprdct has joined #ruby
mudmaster has joined #ruby
<progrock>
Hey, not exactly a ruby question (tho I need to know it to be able to program... ifits possible)... Anyone know how to balance an equation that uses Modulus? ie. I need to isolate c and r in the equation m = c % 3 + 3(r % 3)
dukz has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 265 seconds]
<progrock>
Pretty sad that I have an engineering degree, yet never experienced doing something liek that (maybe because its not exactly possible?)
yasushi has quit [Remote host closed the connection]
swills has left #ruby [#ruby]
stkowski has joined #ruby
<havenwood>
shevy: i need to read the pickaxe, i've only browsed through at the book store - though am just starting reading a pre-copy of Well-Grounded Rubyist second edition beta i just bought
synergy_ has quit [Remote host closed the connection]
<havenwood>
it gets right into it!
<agent_white>
Yeah I'm thinking I needa do the same... I've just skimmed it, but nevr read it in full. After POODR ;)
mklappstuhl has joined #ruby
<havenwood>
I liked The Ruby Programming Language. I need to re-read the last chapters and see if I understand more of it now. >.>
<havenwood>
shevy: read Learn to Program for the first time today, got tired of recommending it without having read it
<havenwood>
well, skim/read
krz has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
Asher has quit [Client Quit]
kbouwser has quit [Quit: Computer has gone to sleep.]
<shevy>
havenwood aha
<shevy>
I read it when I started with ruby
<shevy>
right after _why's guide
<shevy>
_why's guide confused me
mklappstuhl has quit [Ping timeout: 252 seconds]
kristiandelay has joined #ruby
w4pm has joined #ruby
aryaching has joined #ruby
yaymukund has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
sparrovv has joined #ruby
<agent_white>
I loved it!... so far. Taking it easy on the Metaprogramming chapter though.
<havenwood>
LTP, WGR or _PGTR? ;P
achru has joined #ruby
<havenwood>
TRPL
kristiandelay has quit [Ping timeout: 264 seconds]
<havenwood>
I guess the shorthand names are easier. Sparrow, Pickaxe, all the short names are from the cover.
<havenwood>
I guess Well-Grounded Rubyist should be "renaissance lady in red" or something :P
w4pm has quit [Ping timeout: 260 seconds]
<havenwood>
red dress*
<shevy>
or "red bitch"
sparrovv has quit [Ping timeout: 252 seconds]
<shevy>
the japanese have some awesome names
<havenwood>
that wouldn't be a good name
<havenwood>
we need more not less diversity :P
<havenwood>
shevy: like what?
<shevy>
in molecular biology, in chromosome condensation, there is a protein called "Shugoshin" - it's a protective ghost/spirit -> http://www.sciencedirect.com/science/article/pii/S0955067405001523 "Shugoshin: guardian spirit at the centromere". it's easy to remember what function it does, because it is a protector!
gja has quit [Quit: This computer has gone to sleep]
<shevy>
compare this with names given by research groups in the USA - "RING" http://en.wikipedia.org/wiki/RING_finger_domain. Know what RING stands for? "Really Interesting New Gene" ... wtf who can remember what function this stupipd name has...
<shevy>
sorry
<havenwood>
good point, we have tons of arcane usage words too that wouldn't be confused - better than acronyms!
<shevy>
was not the USA actually, but the UK "Department of Biochemistry, Oxford University"
<havenwood>
not on this list, but if i recall the anglo-saxon for prince is "kingling"
<shevy>
havenwood come to think about it, eld kinda makes more sense than "age"... no idea where age came from
brennanMKE has joined #ruby
<shevy>
Eltern... "those dudes who are older than you are" hehe.... hmm... older ... elder ...
<shevy>
hehe
<shevy>
kingling?
<shevy>
that sounds kinda cute
yaymukund has joined #ruby
<shevy>
Somersault
<shevy>
weird name
Es0teric has quit [Quit: Computer has gone to sleep.]
<shevy>
dutch is very similar to german, and languages like danish or swedish are a little bit similar to north german dialect too
gja has quit [Ping timeout: 265 seconds]
<havenwood>
if you could get a comprehensive list of anglo-saxon/french origin word equivalents, would be fun to write a little script to substitute the same text to all one or all the other
<havenwood>
or set a percentage
<havenwood>
or evaluate percentage useage
bradhe has joined #ruby
krz has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
Jdubs has joined #ruby
nomadic_ has quit [Remote host closed the connection]
<Jdubs>
Hello! o.
<Jdubs>
o/
<Jdubs>
I'm having trouble with an includes for my JSON api
<Jdubs>
It's not returning the ID of the included item
<Jdubs>
How can I make it also give the ID?
<Jdubs>
nevermind!
<Jdubs>
got it
Jdubs has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
nycjv321 has quit [Quit: leaving]
nhhagen has joined #ruby
Hanmac1 has joined #ruby
BrixSat has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
agent_white has quit [Ping timeout: 260 seconds]
BrixSat has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
mklappstuhl has quit [Ping timeout: 252 seconds]
PickledBarrelAss has joined #ruby
nhhagen has quit [Ping timeout: 252 seconds]
Barrin6 has joined #ruby
PickledBarrelAss has left #ruby ["WeeChat 0.4.2"]
agent_white has joined #ruby
butblack has joined #ruby
jrhorn424 is now known as zz_jrhorn424
yfeldblum has quit [Ping timeout: 272 seconds]
phansch has joined #ruby
eka has joined #ruby
icantbecool has left #ruby [#ruby]
kate_r has joined #ruby
nomadic has joined #ruby
Jdubs has joined #ruby
justsee has joined #ruby
eka has quit [Ping timeout: 252 seconds]
mikepack has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Quit: Leaving.]
Hanmac has joined #ruby
fgo has joined #ruby
Macaveli has joined #ruby
justsee has quit [Client Quit]
Hanmac1 has quit [Ping timeout: 246 seconds]
fijimunkii has quit [Ping timeout: 248 seconds]
sergicles has joined #ruby
_tpavel has joined #ruby
iliketurtles has joined #ruby
crocket has left #ruby ["Leaving"]
brennanMKE has joined #ruby
gja has joined #ruby
butblack has left #ruby [#ruby]
nomadic has quit [Read error: Connection timed out]
nomadic has joined #ruby
warpx has joined #ruby
warpx has left #ruby [#ruby]
fgo has quit [Remote host closed the connection]
brennanMKE has quit [Read error: Connection reset by peer]
brennanM_ has joined #ruby
Kricir has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
Spami has joined #ruby
brennanM_ has quit [Ping timeout: 264 seconds]
mocfive has quit [Remote host closed the connection]
zxd has joined #ruby
mklappstuhl has quit [Ping timeout: 248 seconds]
lioninawhat has joined #ruby
Al__ has joined #ruby
coca_rails has quit [Remote host closed the connection]
v10energy has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
noop has joined #ruby
vlad_starkov has joined #ruby
heftig has quit [Quit: Quitting]
tonni has quit [Remote host closed the connection]
nwertman has joined #ruby
tharindu has joined #ruby
yasushi has joined #ruby
yfeldblu_ has joined #ruby
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
Al__ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Al__ has joined #ruby
yfeldbl__ has joined #ruby
notjohn has quit [Quit: notjohn]
browndawg has quit [Quit: Leaving.]
tagrudev has joined #ruby
ewnd9 has quit [Ping timeout: 272 seconds]
bjhaid has joined #ruby
nwertman has quit [Ping timeout: 252 seconds]
yasushi has quit [Ping timeout: 252 seconds]
ixti has quit [Quit: WeeChat 0.4.2]
lioninawhat has quit []
Wolland has joined #ruby
yfeldblu_ has quit [Ping timeout: 265 seconds]
stkowski has quit [Quit: stkowski]
coca_rails has joined #ruby
sensen has joined #ruby
dawe has joined #ruby
dodosan has quit [Read error: Connection reset by peer]
Al__ has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
Al__ has joined #ruby
estebistec has joined #ruby
<shevy>
long live Ruby!
<shevy>
Jdubs cheer with us
styped has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Jdubs>
Whats going on?!?!
<Jdubs>
RUBY 4 LIFE
<Jdubs>
anyone else mining dogecoin?
notjohn has joined #ruby
freezey has quit [Remote host closed the connection]
tdk2fe has joined #ruby
mklappstuhl has joined #ruby
gabriha__ has quit [Remote host closed the connection]
gabriham_lincoln has joined #ruby
<agent_white>
So
bradhe has quit [Ping timeout: 260 seconds]
<agent_white>
Is there a way to check if a file has metadata? I'm trying to use TagLib to read mp3 file tags, and found that it couldn't locate anything for one.
<agent_white>
So I'm trying to see if I can locate it myself :)
fgo has joined #ruby
<shevy>
hmm
<shevy>
I am sure there is a super duper way in ruby
mocfive has joined #ruby
<shevy>
can't you somehow fetch the bytes that constitute that metadata
carif has quit [Ping timeout: 260 seconds]
<agent_white>
shevy: No super-duper way needed, I'm just pissed that it won't work for all my files and want it to :P
<agent_white>
shevy: http://rubyquiz.com/quiz136.html is the closest thing I've found that is related... but I may need to learn about parsing binary data?
renklaf has joined #ruby
<agent_white>
shevy: Apparently the offset (?) is 128 bytes for a ID3 tag, but I tried it on this file and got a whole lotta 0's.
mklappstuhl has quit [Read error: Operation timed out]
brennanMKE has joined #ruby
<agent_white>
Though... this is a nice detour from banging away at Rails.
nhhagen has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
sensen has quit [Read error: Connection reset by peer]
sensen has joined #ruby
gokul has joined #ruby
mengu has joined #ruby
brennanMKE has quit [Ping timeout: 252 seconds]
yacks has quit [Quit: Leaving]
zxd has quit [Ping timeout: 272 seconds]
subbyyy has joined #ruby
SHyx0rmZ has joined #ruby
amclain has quit [Quit: Leaving]
nhhagen has quit [Ping timeout: 252 seconds]
mocfive has quit [Remote host closed the connection]
pietr0 has joined #ruby
dukz has joined #ruby
madb055 has quit [Ping timeout: 260 seconds]
mocfive has joined #ruby
estebistec has quit [Remote host closed the connection]
zipper has joined #ruby
estebistec has joined #ruby
ixti has joined #ruby
Al__ has quit [Quit: Al__]
wwwwwwwwwwww has joined #ruby
mocfive has quit [Ping timeout: 248 seconds]
wwwwwwwwwwww has left #ruby [#ruby]
byprdct has quit [Ping timeout: 252 seconds]
aantix has quit [Quit: aantix]
estebistec has quit [Ping timeout: 252 seconds]
ndrei has quit [Ping timeout: 272 seconds]
kobain has quit []
brennanMKE has joined #ruby
nhhagen has joined #ruby
lethjakman has quit [Ping timeout: 272 seconds]
vlad_sta_ has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
weeems has quit [Ping timeout: 246 seconds]
nhhagen has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
vlad_starkov has quit [Ping timeout: 252 seconds]
brennanMKE has quit [Ping timeout: 272 seconds]
centrx has quit [Quit: Leaving]
mklappstuhl has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
Davey_ is now known as Davey
Jdubs has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 272 seconds]
tdk2fe has quit [Remote host closed the connection]
nkts_ has joined #ruby
dukz has quit [Remote host closed the connection]
jacob_ has joined #ruby
godd2 has quit [Ping timeout: 248 seconds]
gja has quit [Quit: This computer has gone to sleep]
<Silox|>
Hello there! I'm trying to use session.has_key? "string", but it requires me to use parenthesis around the argument. Is this because I use it in a shorthand if, or is there another reason?
<shevy>
look at the cgi part in stdlib, no simple error handling
<apeiros>
the rest of your code does. because you obviously have more than just the piece you wrote.
<shevy>
Silox| are you sure this is the case? I only know that if you test more than one condition at the same time and only with certain checks, like && ! foo.has? 'bla'
Vitor has joined #ruby
<shevy>
hmm
<shevy>
rather if foo and ! foo.has? 'bla'
<shevy>
OR perhaps it was
Vitor_ has quit [Ping timeout: 260 seconds]
<shevy>
if foo.has? 'ble' and ! foo.has? 'bla'
<shevy>
:D
<shevy>
whatever .has? is ...
wald0 has joined #ruby
vlad_starkov has joined #ruby
zxd is now known as Zap-W
Zap-W is now known as zxd
<shevy>
Silox| say something!
<Silox|>
It's indeed a bit bigger than the code I pasted; I use a rails helper function which takes 3 arguments: a form, a tag and an optional default value
<shevy>
\o/
<shevy>
ruby can be very agile
<shevy>
if foo
<shevy>
run_bar
<Silox|>
I though the problem was more ruby than rails, so I asked it here, but if it's because of Rails, I'll continue in rails
<shevy>
end.unless ble.include? 'yippie'
<shevy>
sorry
<shevy>
end unless ble.include? 'yippie'
<Silox|>
Oh, I broke your code :<
<shevy>
dunno why I tried end.unless here
<shevy>
I think such constructs are not good for the brain
vlad_starkov has quit [Read error: Connection reset by peer]
urbanslug has joined #ruby
Xeago has joined #ruby
heftig_ has joined #ruby
camilasan has joined #ruby
ahmedelg_ has joined #ruby
habanany has quit [Read error: Operation timed out]
heftig has quit [Ping timeout: 264 seconds]
Al__ has quit [Quit: Al__]
heftig_ is now known as heftig
mklappst_ has joined #ruby
pushpak has joined #ruby
sassamo has joined #ruby
ahmedelgabri has quit [Ping timeout: 272 seconds]
Al__ has joined #ruby
ahmedelg_ has quit [Ping timeout: 260 seconds]
eka has joined #ruby
mklappstuhl has quit [Ping timeout: 252 seconds]
sassamo has quit [Ping timeout: 248 seconds]
tharindu has quit [Quit: Leaving...]
po10 has quit [Quit: /]
Mon_Ouie has joined #ruby
falood has joined #ruby
rdark has quit [Ping timeout: 264 seconds]
fire has joined #ruby
yfeldblum has joined #ruby
mspah_ has quit [Quit: This computer has gone to sleep]
MatthewsFace has quit [Quit: This computer has gone to sleep]
rdark has joined #ruby
zeeraw has joined #ruby
bradhe has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
vpretzel has quit [Remote host closed the connection]
fixl has quit [Remote host closed the connection]
dagobah has joined #ruby
francisfish has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seoaqua has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
browndawg has joined #ruby
falood has quit [Remote host closed the connection]
Virtualize has joined #ruby
rudisimo has joined #ruby
<pontiki>
Silox|: the need for using parens depends entirely on the larger context, operator precedence, and parsing.
<Silox|>
pontiki: Okido, thanks :)
falood has joined #ruby
<pontiki>
nw
DaniG2k has quit [Quit: leaving]
falood has quit [Remote host closed the connection]
<apeiros>
TheLarkInn: misspelling my nick doesn't help in getting me aboard :-p
RaCx has joined #ruby
<TheLarkInn>
DOH!
matenano has joined #ruby
<matenano>
ciao
<TheLarkInn>
apeiros
<TheLarkInn>
there we go
himsin has quit [Quit: himsin]
<matenano>
!list
Virtualize has quit [Read error: Connection reset by peer]
matenano has left #ruby [#ruby]
<waxjar>
that's one big sql query :p
Virtualize|away has joined #ruby
vpretzel has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<TheLarkInn>
lol yes it is, but long story short, I am wanting to allow 0-6 parameters
nwertman has joined #ruby
<keyword>
guys anyone knows this error? I'm trying sphinx and when I add <<< I get error
Targen has quit [Read error: Connection reset by peer]
<keyword>
Model.search("'<<<'") ThinkingSphinx::SyntaxError: index advisor_core,advisor_delta: syntax error, unexpected TOK_BEFORE near '<<''
<apeiros>
TheLarkInn: most important tip: DONT MIX TABS AND WHITESPACE!
<apeiros>
also: don't use tabs for alignment. horrible idea.
mspah_ has quit [Quit: This computer has gone to sleep]
MatthewsFace has quit [Quit: This computer has gone to sleep]
shaunbak_ has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
<waxjar>
TheLarkInn: you're probably vulnerable to sql injection now, the way you build up your query
ffranz has joined #ruby
duggiefresh has joined #ruby
<TheLarkInn>
probably but this is an in house api, so I'm too worried abotu that
<TheLarkInn>
I just want to know if there is an easier way or better way to do what I am doing,
<apeiros>
and in ruby, you shouldn't use tabs for indent either. use 2 spaces. but that's "only" convention, whereas the other two are horrible crimes.
<TheLarkInn>
lol I know that, the person who is in charge of me likes to read it in tab vs 2space, thus why I write it that way,
ahmedelgabri has quit [Ping timeout: 260 seconds]
<shevy>
kill the tabbers
RaCx has quit [Ping timeout: 260 seconds]
<apeiros>
appointments.rb, lines 4-41 - move that into a view, IMO
<TheLarkInn>
anything other than whitespace suggestions rofl
<apeiros>
as waxjar already said, things like " DATE(appointment.start) >= DATE('#{start_date}')" - HUGE nono!
<apeiros>
use bind variables
<TheLarkInn>
could you provide an example?
<waxjar>
TheLarkInn: i have no idea what it's actually doing, but try to use clearer names for everything. "params", "select_query", etc are about as vague as single letter variable names :p
Targen has joined #ruby
shaunbaker has quit [Ping timeout: 264 seconds]
<wm3|lunch>
it's a huge NONO because start_date and end_date are taken directly from user input
samsonasu has quit [Quit: samsonasu]
yfeldblum has joined #ruby
aryaching has joined #ruby
notjohn has joined #ruby
<wm3|lunch>
TheLarkInn: basically, *never* put user input directly into an SQL query
jrist has joined #ruby
rdark has quit [Ping timeout: 252 seconds]
<wm3|lunch>
TheLarkInn: it doesn't matter that it's just an in-house API... doing so means that someone could, innocently and accidentally, malform a URL and drop your entire database
jrist has quit [Read error: Connection reset by peer]
<TheLarkInn>
Alright, well then that will something I will def change, so you are suggesting some sort of validation for those dates
<TheLarkInn>
tahts not too bad
<apeiros>
no, validation doesn't cut it
<TheLarkInn>
And rails is to heavy for a simple API, thus why I'm using sinatra
<apeiros>
use bind variables. that's the only really secure way.
<wm3|lunch>
TheLarkInn: you could still use an ORM for interacting with the database
<apeiros>
TheLarkInn: sinatra has no own db layer, so what are you using?
<TheLarkInn>
I'm not familiar with that, would you please show me an example or point me toward a link
<wm3|lunch>
TheLarkInn: it's what you're building anyway
<TheLarkInn>
Apeiros: Sequel
rdark has joined #ruby
tulak has joined #ruby
<apeiros>
TheLarkInn: that has similar mechanisms. consult the docs.
sambao21 has joined #ruby
<TheLarkInn>
sounds good,
<wm3|lunch>
TheLarkInn: at the moment, you're not using Sequel... you're just firing a query off directly
pu22l3r_ has joined #ruby
<apeiros>
wm3|lunch: sequel has an ORM-less part
<apeiros>
personally I only use that part of sequel too
<wm3|lunch>
apeiros: to create a db connection?
<wm3|lunch>
fair enough
<apeiros>
wm3|lunch: no
jrist has joined #ruby
<TheLarkInn>
I know that, but the db layer is the sequel gem, like I said, I simply don't care about the security factor at this point, and I'm more concerned with the means in which I facilitate a request having 0 params to 6 params all at the same time
<apeiros>
wm3|lunch: you can do more with it. he uses it rather bluntly.
<apeiros>
so == probably doesn't care about the encoding and just performs a binary equality check
zipper has joined #ruby
Zubin has joined #ruby
tonni has quit [Remote host closed the connection]
<Zubin>
Hi I am a newbie in ruby and rails. I have managed to learn ruby a little but I am not able to learn rails 4.0 . I searched the web but could not find an appropiate rails 4.0 book. Can someone here help me please?
puppeh has joined #ruby
Czupa has joined #ruby
<mikecmpbll>
Zubin: you might be interested in #rubyonrails
<Wulf>
thanks guys for the help
<puppeh>
i'm using unicorn with oobgc on 1.9.3 (falcon patch). I'm considering in using 2.1, will there be any performance gains?
<puppeh>
I mean GC-wise
<Zubin>
mikecmpbll, thanks
sailias has joined #ruby
angusiguess has joined #ruby
vlad_sta_ has joined #ruby
Zubin has quit [Read error: Connection reset by peer]
araujo has quit [Read error: Connection reset by peer]
arctarus has joined #ruby
MindfulMonk has joined #ruby
fantazo has joined #ruby
cephalostrum is now known as zz_cephalostrum
Zubin has joined #ruby
brennanMKE has quit [Ping timeout: 272 seconds]
ahmedelgabri has joined #ruby
Zubin has quit [Client Quit]
r0nin has quit []
aspiers has joined #ruby
dkamioka has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
marr has quit []
tkuchiki has joined #ruby
Silox| has quit [Quit: leaving]
Hobogrammer has joined #ruby
angusigu1ss has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
coca_rails has joined #ruby
notjohn has quit [Ping timeout: 252 seconds]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
gabriham_lincoln has joined #ruby
dkamioka has quit [Ping timeout: 252 seconds]
supergeek has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alexherbo2>
replace phone number in List with ** ** ** ** **
<alexherbo2>
1) select lines begins ^-
johnmilton has joined #ruby
<alexherbo2>
2) select phone
<alexherbo2>
and replace with **
kevind has joined #ruby
<ccooke>
well, you know Ruby is a programming language, not an editor?
<mikecmpbll>
lol.
<alexherbo2>
..
cjsarette has quit [Ping timeout: 260 seconds]
<ccooke>
Ruby supports all of the same operators as the editors you linked to, along with more regex functionality. It doesn't use the same instructions, though
zipper has joined #ruby
<momomomomo>
alexherbo2: a good way to get the feel of Regex in ruby is http://rubular.com
<oznik_>
my sysadmin uses puppet to implement configurations and since he has'nt a config for ruby versions newer than 1.9.3p194 why don't i use that. i see that Old Stable is a more recent build (p484). is it a bad idea to use versions older than old stable for production ?
figgleberry has joined #ruby
<alexherbo2>
doesn’t make sense to make structured Regexp built-in Ruby ?
renklaf has quit [Remote host closed the connection]
fantazo has quit [Ping timeout: 252 seconds]
interactionjaxsn has joined #ruby
colonolGron has joined #ruby
<shevy>
oznik_ always use the newest p-version
ahawkins has quit [Read error: Connection reset by peer]
<shevy>
oznik_ the differences from one p to another p shouldn't be large though
ahawkins has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
tagrudev has quit [Remote host closed the connection]
rippa has joined #ruby
<oznik_>
shevy: would this be the moment to push the sysadmin though?
relix has joined #ruby
geggam has joined #ruby
tannerburson has quit [Quit: tannerburson]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
figgleberry has quit [Ping timeout: 272 seconds]
tannerburson has joined #ruby
notjohn has joined #ruby
mansi has joined #ruby
<shevy>
oznik_ dunno, you seem to be scared of change
<oznik_>
hm... perhaps
tonni has quit [Read error: Connection reset by peer]
chrisseaton has joined #ruby
zz_cephalostrum is now known as cephalostrum
stock584 has joined #ruby
m8 has joined #ruby
pskosinski has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
angusigu1ss has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<shevy>
the technical university in vienna, the student pages, actually uses RoR
<workmad3>
atmosx: that's pretty much the main reason - yes the framework is larger, but it also does massively more for you
<atmosx>
shevy: cool
<shevy>
there are a few really awesome things it provides - one is autogeneration of .pdf results
w4pm has quit [Ping timeout: 264 seconds]
<shevy>
all apps should have that
max96at has joined #ruby
<atmosx>
workmad3: okay
<atmosx>
workmad3: so if I want to build a consumer application, is better to use rails becuase...?
<shevy>
also a calendar and entries that you can re-shuffle for lectures in an orderly way
<atmosx>
workmad3: it will make develpment easier?
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
* atmosx
updating his freebsd servers
<workmad3>
atmosx: depends massively on the app you're building
<workmad3>
atmosx: but potentially, yes
alexherbo2 has joined #ruby
<shevy>
you are a freebsd user? why?
Zubin has quit [Read error: Connection reset by peer]
cephalostrum is now known as zz_cephalostrum
marr has joined #ruby
_maes_ has joined #ruby
<atmosx>
workmad3: I will have user accounts, will display info... monitoring data mostly. And will also have an API so that users can access their info via REST
<workmad3>
atmosx: end of the day, the only reason to use any framework is because it'll make things easier for you... if it ends up making things harder then chances are your app isn't a good fit
<atmosx>
workmad3: good
brotspinne has joined #ruby
<workmad3>
atmosx: that's obviously with the proviso that you give enough time to learning the framework to have a bit of knowledge about it
<shevy>
atmosx will you make screenshots once you are finished building those web thingies for your thesis/med-company that you do?
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<atmosx>
I started learning RoR, then switched Sinatra, then stick to it, but now I'm pretty familiar with many concepts, like MVC, so I'll give RoR another shot, while start digging into JS
<workmad3>
atmosx: you could also look at the rails-api project
phansch has joined #ruby
kevind_ has joined #ruby
<atmosx>
shevy: the web-company no, the thesis will be open source, so totally the current app, I'm polishing ... is about 75% ready.
<atmosx>
workmad3: what is the rails-api project?
bradhe has joined #ruby
tonni has quit [Read error: Connection reset by peer]
<workmad3>
atmosx: basically, rails but only with the stuff loaded that's useful for API development
danshultz has quit [Ping timeout: 265 seconds]
arctarus has quit [Read error: Operation timed out]
net_mask has joined #ruby
Wolland has joined #ruby
<brotspinne>
has someone an idea about the error and question is this code? http://ideone.com/jZQmD it's about classes constants
<brotspinne>
in*
arctarus has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
vlad_sta_ has joined #ruby
jprovazn has quit [Quit: Leaving]
<workmad3>
atmosx: if you were using rails-api on a project that needed front end stuff, you're probably building a rich JS client for it (angular, knockout, ember, something like that)
<workmad3>
atmosx: so that's kinda the spot it's aimed at
kevind has quit [Ping timeout: 252 seconds]
kevind_ is now known as kevind
<atmosx>
workmad3: okay
colonolGron has quit [Quit: leaving]
gja has quit [Quit: This computer has gone to sleep]
<brotspinne>
the first case works just fine when defining the class method with def self.foo instead of self << class
phansch has quit [Ping timeout: 265 seconds]
mikepack has joined #ruby
huttan- has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
<brotspinne>
I think the issue is about the eigenclass
aspires has joined #ruby
mikepack has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 252 seconds]
<atmosx>
shevy: FreeBSD just works and I like the documentation.
<atmosx>
I also like the PF firewall
havenwood has joined #ruby
<atmosx>
but generally speaking I can configure anything I put hands on and it's not windows..
tannerburson has quit [Quit: tannerburson]
<shevy>
ok but linux is not windows either!
g0bl1n has quit [Read error: Operation timed out]
<shevy>
atmosx aaaaand there is a new alpha release of gobolinux!!! :D
<shevy>
(but it is a one man project right now... should wait for a while to see if it survives)
<atmosx>
gobowhat?
tannerburson has joined #ruby
zeeraw has joined #ruby
<workmad3>
brotspinne: it's to do with constants being looked up with the lexical scope
vlad_sta_ has quit [Remote host closed the connection]
<atmosx>
yeah I'm on it
vlad_starkov has joined #ruby
<shevy>
atmosx it's hey days were like 8 years ago though when hisham was still a student, nowadays he is working more on lua-rocks (with lua)
<brotspinne>
workmad3: hm okay but what about "self::FOOBAR" vs "FOOBAR"?
tonni has joined #ruby
<shevy>
mruby must takeover lua!
timonv has quit [Read error: Connection reset by peer]
tesuji has quit [Ping timeout: 264 seconds]
<shevy>
atmosx is there really a big difference between freebsd and linux?
timonv has joined #ruby
<workmad3>
brotspinne: 'self::FOOBAR' is accessing the FOOBAR constant from 'self', which in a class method is the class (and therefore the constant exists)
<atmosx>
shevy: I don't really know anymore. I haven't used linux lately. I'm reading too many things for the new init system (systemd) and the debian debate which will probably set the state for everyone else
<workmad3>
brotspinne: 'FOOBAR' is accessing the FOOBAR element from the lexical scope... but FOOBAR isn't in the lexical scope at that point
tonni has quit [Read error: Connection reset by peer]
<atmosx>
shevy: My linux distribution of choice was gentoo, but I think that if I have to use linux in the future I'll go with debian
<brotspinne>
workmad3: but why does it work when doing def self.foo; FOOBAR; end?
vlad_starkov has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
<workmad3>
brotspinne: there's a reason, again to do with scoping, but I can't remember it properly atm
nateberkopec has joined #ruby
<shevy>
I see
vlad_starkov has joined #ruby
mikepack has joined #ruby
<workmad3>
brotspinne: you also missed the case 'class A; FOOBAR = "hi"; class B < A; class << self; def test; FOOBAR; end; end; end; end'
terrellt has joined #ruby
bamdad has joined #ruby
<brotspinne>
workmad3: this is case 1. and case 1 vs case 4 is the mystery for me. one is working and the other is not
<workmad3>
brotspinne: which is different from 'class A; FOOBAR = "hi"; end; class A::B < A; class << self; def test; FOOBAR; end; end; end'
<Takumo>
Hi all, I've got a question about memoization, I've tried both the memoize and memoizer gems, but for some reason neither of them want to work
<brotspinne>
okay
<workmad3>
brotspinne: the case I just gave isn't case 1 ;)
<waxjar>
Takumo: what is your question?
<Takumo>
I've got my class which has include Memoizer, and then next to the methods I want memoized I've done memoize(:method_name)
<Takumo>
but I keep getting this error
<Takumo>
well the error undefined method memoize
ahawkins has quit [Remote host closed the connection]
<brotspinne>
workmad3: I see but I guess your case should work always
angusigu1ss has joined #ruby
<workmad3>
brotspinne: yes, because 'FOOBAR' is in the lexical scope defined by 'Module.nesting' at that point... but in the second case, with class A::B, FOOBAR isn't in the Module.nesting scope, and the method doesn't work
vlad_starkov has quit [Read error: Connection reset by peer]
tonni has joined #ruby
<workmad3>
brotspinne: constants and lexical lookup in ruby get a bit weird
shaunbak_ has quit []
<waxjar>
Takumo: are you including that module before you call memoize?
bean__ has joined #ruby
<brotspinne>
workmad3: still doesn't make sense to me
stock584 has quit [Quit: This computer has gone to sleep]
<Takumo>
waxjar: I've got class Foo include Memoizer include MyModule end
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
<Takumo>
and MyModule has memoize(:method) after the definition of :method
<waxjar>
you need to include Memoizer in MyModule, then
Quintus_q has joined #ruby
dblessing has quit [Quit: dblessing]
samsonasu has quit [Quit: samsonasu]
phansch has joined #ruby
zz_cephalostrum is now known as cephalostrum
<Takumo>
ok.
nwertman has joined #ruby
bamdad has quit [Quit: bamdad]
tonni has quit [Read error: Connection reset by peer]
xXxRosexXxEE has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205173331]]
khismetix has joined #ruby
yasushi has quit [Remote host closed the connection]
angusigu1ss has quit [Ping timeout: 265 seconds]
arietis has joined #ruby
krz has quit [Ping timeout: 272 seconds]
huttan- has quit [Quit: leaving]
CaptainJet has joined #ruby
<workmad3>
brotspinne: this is the bit of real relevance to you ;) 'If the constant cannot be found by looking at any of the modules in Module.nesting, Ruby takes the currently open module or class, and looks at its ancestors.'
<puppeh>
is it called the top-level namespace or the global namespace?
shaunbaker has joined #ruby
<workmad3>
brotspinne: so in the singleton class case, Module.nesting doesn't contain the scope for the constant (because it's scoped to A) and the currently open class is the singleton class for B, which doesn't have B (and by extension doesn't have A) in its ancestors
nwertman has quit [Ping timeout: 252 seconds]
<brotspinne>
I see
danshultz has joined #ruby
<workmad3>
brotspinne: but 'self::CONSTANT' is accessing CONSTANT directly on 'self'... and self is the class 'B'
andikr has quit [Remote host closed the connection]
Quintus_q has quit [Quit: WeeChat 0.4.2]
ferr has joined #ruby
<workmad3>
brotspinne: and then 'def self.foobar' doesn't change the currently open class
<brotspinne>
gotcha
maletor has joined #ruby
<workmad3>
brotspinne: it's not exactly the most intuitive lookup mechanism in the world, especially at some edge cases (like this one) but it is at least well defined and something you can reason through, once you have the rules to hand :)
<brotspinne>
thanks :)
lkba has quit [Ping timeout: 272 seconds]
spyderman4g63 has quit []
<Hanmac>
its only a little bit difficult when you try to define constants into a singleton class ;P
acrussell has left #ruby [#ruby]
burlyscudd has quit [Quit: Leaving.]
rayners has joined #ruby
tobago has quit [Remote host closed the connection]
deens has joined #ruby
RaCx has joined #ruby
momomomomo has joined #ruby
vlad_starkov has joined #ruby
lethjakman has joined #ruby
nwertman has joined #ruby
<Hanmac>
>> o = Object.new; class << o; class Foo; Bar = 5;end;end; o.singleton_class::Foo::Bar
<apeiros>
roflphp… mysql_escape_string is deprecated, please use mysql_real_escape_string…
yosafbridge has joined #ruby
qubit has joined #ruby
yokel has joined #ruby
Tarential has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
cbetta has joined #ruby
awkisopen has joined #ruby
qubit has quit [Changing host]
qubit has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
kloeri has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
DrCode has joined #ruby
bmn has joined #ruby
jerius has joined #ruby
kloeri has joined #ruby
joshu has joined #ruby
Mattx has joined #ruby
kbouwser has joined #ruby
<Mattx>
Hello
guinslym has joined #ruby
jfoy has quit [Client Quit]
<Mattx>
I've a script running 24x7, scrappying some webs
Fractional has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
<Mattx>
I've noticed that after a few hours it slows down
vlad_sta_ has quit [Remote host closed the connection]
sassamo has quit [Remote host closed the connection]
<atmosx>
Mattx: it's the exhaustion
<Mattx>
but it doesn't crash return any error or anything
<atmosx>
Mattx: you have to check it out
speakingcode-wor has quit [Quit: Lost terminal]
<Mattx>
ok, and the question is, what could be the problem apart from memory consumption?
<Fractional>
Good morning! :D
vlad_starkov has joined #ruby
<atmosx>
Mattx: engine?
sassamo has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
bluOxigen has joined #ruby
<Mattx>
engine?
yfeldblum has joined #ruby
<atmosx>
Mattx: engine
<Mattx>
what do you mean by "engine?"
figgleberry has quit []
dEPy has joined #ruby
Deele has joined #ruby
beardedninja has joined #ruby
<Mattx>
well, I didn't get your question
lethjakman has quit [Ping timeout: 248 seconds]
kpshek has joined #ruby
<Hanmac>
atmosx: maybe its using to_sym somewhere in the script? ;P
sepp2k has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
RaCx has joined #ruby
nowthatsamatt has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
Hobogrammer has quit [Remote host closed the connection]
allaire has quit []
bluOxigen has joined #ruby
ferr has quit [Quit: Lost terminal]
sassamo has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
allaire has joined #ruby
rootshift has joined #ruby
maletor has joined #ruby
<apeiros>
php's mysqli interface is a joke, right? o0
Hanmac1 has joined #ruby
<apeiros>
holy fuck, I know why I quit with that horrible pile of shit…
phansch has quit [Quit: Leaving]
<mjc_>
apeiros: I think PDO is the recommended method for that these days
allaire has quit [Client Quit]
Virtualize has quit [Quit: Leaving...]
maletor has quit [Client Quit]
<apeiros>
mjc_: sounds like visualbasic… that had like 5 incomplete DB interfaces too…
Hanmac has quit [Ping timeout: 248 seconds]
IcyDragon has joined #ruby
<mjc_>
apeiros: yeah
IceDragon has quit [Ping timeout: 260 seconds]
IcyDragon is now known as IceDragon
rmorello has joined #ruby
Hobogrammer has joined #ruby
tharindu has joined #ruby
heftig has quit [Quit: Quitting]
brennanMKE has joined #ruby
nism has joined #ruby
skaflem has quit [Quit: Leaving]
<atmosx>
everyone is bashing at php
<atmosx>
poor phph
maletor has joined #ruby
<atmosx>
Mattx: I bet your problem has more to do with websites banning your IP than anything ese
<atmosx>
else
v0n has quit [Quit: WeeChat 0.4.2]
<atmosx>
Mattx: except if you're doing something stupid like opening a new database connection on every object you create etc
v0n has joined #ruby
[FBI] has joined #ruby
<[FBI]>
| Starting logging this channel #ruby - See logs at http://irclogger.arpnetworks.com - Lines beginning with "[off]" will not be logged - You can stop logging by typing [FBI]: off
iliketurtles has joined #ruby
timonv has joined #ruby
iliketurtles has quit [Excess Flood]
<atmosx>
[FBI]: off
<[FBI]>
| Stopping logging this channel #ruby - See logs at http://irclogger.arpnetworks.com - You can re-enable log by inviting me back, e.g: /INVITE [FBI] - or telling me in a private message: LOG #CHANNEL [KEY]
[FBI] has left #ruby [#ruby]
<atmosx>
wtf?
<atmosx>
[FBI]: restart
yacks has quit [Quit: Leaving]
tyl_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
canton7-mac has quit [Quit: Leaving]
Hanmac1 has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
chrisseaton has joined #ruby
pel_daniel has joined #ruby
thesheff17 has quit [Remote host closed the connection]
bluOxigen has quit [Remote host closed the connection]
nathancahill has quit [Ping timeout: 272 seconds]
bluOxigen has joined #ruby
<shevy>
haha
<shevy>
FBI was here!
chrisseaton has quit []
dkamioka_ has joined #ruby
noop has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
MrZYX|off is now known as MrZYX
jailbot has joined #ruby
meatherly has joined #ruby
nathancahill_ has quit [Ping timeout: 272 seconds]
angusigu1ss has joined #ruby
carraroj has quit [Read error: Operation timed out]
tkuchiki has quit [Remote host closed the connection]
rubyracer has joined #ruby
bradhe has joined #ruby
<momomomomo>
shevy: I don't think the FBI hosts on a VPS
hamakn has quit [Ping timeout: 272 seconds]
bluOxigen has quit [Remote host closed the connection]
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
timonv has quit [Remote host closed the connection]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
g0bl1n has quit [Ping timeout: 272 seconds]
sparrovv has joined #ruby
kristiandelay has joined #ruby
Virtualize has joined #ruby
garybrett has quit [Quit: Leaving...]
sparrovv has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 252 seconds]
IceyEC has joined #ruby
mlpinit_ has joined #ruby
bluOxigen has quit [Remote host closed the connection]
zxd has quit [Ping timeout: 246 seconds]
estebanrules has joined #ruby
angusigu1ss has quit [Ping timeout: 272 seconds]
sassamo has joined #ruby
momomomomo has quit [Quit: momomomomo]
bluOxigen has joined #ruby
<estebanrules>
I'm a fairly new ruby programmer, coming over from python. I cam to a realization about python earlier this morning.
arctarus has quit [Remote host closed the connection]
<estebanrules>
*came
dEPy has quit [Quit: Computer has gone to sleep.]
aantix has joined #ruby
kristiandelay has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Read error: Connection reset by peer]
wildroman2 has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
mlpinit has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
bluOxigen has joined #ruby
jetole has joined #ruby
RUBICN64 has joined #ruby
nathancahill has joined #ruby
spider-mario has joined #ruby
RUBICN64 has left #ruby [#ruby]
duggiefresh has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 252 seconds]
carraroj has joined #ruby
<jetole>
Hey guys. I don't know any ruby. I installed a bunch of packages the other day for some app via bundle. I'm not using the app anymore. Does anyone know how I can uninstall all gems on the system that were installed via bundle. I don't want to uninstall anything that the package manager may have installed (apt-get in my case)
<jetole>
i.e. I don't want to uninstall any gems that may be system installed dependencies for official packages and would have been installed via apt-get
sassamo has quit [Ping timeout: 260 seconds]
kpshek has joined #ruby
niftylettuce_ has quit [Ping timeout: 264 seconds]
chihhsin_cloud has quit [Ping timeout: 264 seconds]
<MrZYX>
do you still have the Gemfile(.lock) ?
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
<jetole>
MrJoshua, I don't think so. It was part of the following app but I don't see bundle on the github pages: https://github.com/bltavares/baseline
camilasan has joined #ruby
Xeago has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
dEPy has joined #ruby
bluOxigen has joined #ruby
tylersmith has joined #ruby
<jetole>
oops MrZYX
<jetole>
said the wrong nick
Vitor has joined #ruby
<MrZYX>
This doesn't look like it's using bundler, so i doubt you installed anything with bundle for that
ohwhoa has quit [Quit: woah!]
Zespre_ has joined #ruby
<jetole>
MrZYX, yeah I used bundle for something and don't recall what and it was part of during that app install that it happened
lethjakman has joined #ruby
bitri has joined #ruby
mary5030 has joined #ruby
niftylettuce_ has joined #ruby
<jetole>
one gem I just manually removed was vagrant gem
<jetole>
but there were more
<MrZYX>
gem list gives you all that are installed
mojjojo has joined #ruby
<Xuisce>
ah got out of all the other ruby channels
<MrZYX>
consult your apt to determine which are installed through it
<Wardje>
Is there a way to generate a Gemfile with versions going by the versions currently installed for a project? I inherited a project that doesn't specify version numbers whatsoever in its Gemfile and I want to gradually bump up the version numbers manually and not run into possible issues due to version mismatch after running an update
<Xuisce>
Best bet is to stick here for ruby
<Xuisce>
:)
<MrZYX>
run gem remove for everything else
<Wardje>
Or is this a manual job using bundle show and writing things down?
<jetole>
MrZYX, well right off the bat I have timestamps for a bunch of them via ls -l /usr/local/bin
<MrZYX>
Wardje: manual job, you can also bump the locked version of a single gem with bundle update gemname
<jetole>
MrZYX, can that help me isolate it
<jetole>
?
Txandy has joined #ruby
bjhaid has quit [Ping timeout: 272 seconds]
nhhagen has quit [Remote host closed the connection]
<Wardje>
MrZYX: ok, thanks, good thing the list isn't terribly long ^̮^
jailbot has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 272 seconds]
jailbot has joined #ruby
<MrZYX>
jetole: if you don't have the specification (=list) of what was installed anymore, there's no safe way to determine what you want to keep than to make a list (=look up in apt) what you want to keep
<anildigital>
Friends.. I will be giving talk on Ruby to my work colleagues
snatchfrigate has quit [Ping timeout: 272 seconds]
<anildigital>
they are all programmers.. but never done Ruby
<anildigital>
what type of talk should I give?
<anildigital>
What should slides contain?
<anildigital>
thanks
<Morrolan>
Code.
<Morrolan>
If you have the time, a high-level walkthrough of a real-world application.
<MrZYX>
what's you business? what's the common denominator among your colleagues? can you compare ruby ('s features) to that?
<anildigital>
consulting .. and services..
rmorello has joined #ruby
<anildigital>
basically new projects.. team here use java, scala, groovy
SHyx0rmZ has joined #ruby
snatchfrigate has joined #ruby
tonni has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
heidi has joined #ruby
<anildigital>
so it would be what is ruby, who started it.. ruby as object oriented language. strings, arrays, hashes.. classes, modules .. mixins.. exceptions.. enumerables
<anildigital>
what's missing there?
yaymukund has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
<kacperix>
Hi. I stuck with gem dependencies. I have own gem, rails engine & rails application. All 3 are in development. rails application includes rails engine which includes gem. But I have problem with install rails enginge inside rails application because of gem is not found
<MrZYX>
data transformation, .map, .inject, .each_with_object etc
bluOxigen has quit [Read error: Connection reset by peer]
bitri is now known as justinbleeper
bluOxigen has joined #ruby
vlad_starkov has quit [Ping timeout: 265 seconds]
<MrZYX>
oh and blocks of course
JZTech101 is now known as {me}
rayners has quit [Ping timeout: 264 seconds]
<anildigital>
MrZYX: yepp..
chipotle has quit [Remote host closed the connection]
{me} is now known as me
me is now known as JZTech101
chipotle has joined #ruby
chipotle has quit [Max SendQ exceeded]
mocfive has joined #ruby
Kricir has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
bluOxigen has quit [Remote host closed the connection]
chipotle has joined #ruby
chipotle has quit [Max SendQ exceeded]
bluOxigen has joined #ruby
spyderman4g63 has joined #ruby
chipotle has joined #ruby
sparrovv has joined #ruby
duggiefresh has joined #ruby
rdark has quit [Quit: leaving]
heidi has joined #ruby
nateberkopec has quit [Quit: Leaving...]
klaut_ has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
<estebanrules>
sorry as I was saying before
fire has quit [Quit: WeeChat 0.4.1]
stephanos-belli has joined #ruby
m00nlight has quit [Ping timeout: 272 seconds]
ktosiek_ has joined #ruby
mityaz has joined #ruby
aaronmcadam has joined #ruby
mikepack has joined #ruby
<estebanrules>
I feel like learning python before ruby really restricted my imagination. There are so many ways to do things in ruby, and python is more "stuffy and strict".
keyword has quit [Quit: Leaving.]
jlast_ has joined #ruby
m00nlight has joined #ruby
<estebanrules>
so now I have to adopt a new attitude towards coding, and I think that's been the hardest part for me.
Lewix has quit [Remote host closed the connection]
Notte has joined #ruby
banjara has joined #ruby
Lewix has joined #ruby
nateberkopec has joined #ruby
lmickh has quit [Remote host closed the connection]
<Hanmac>
shevy: you dont need "Foo." inside the foo method
<estebanrules>
what I really need to study more is blocks/procs
bluOxigen has quit [Remote host closed the connection]
<estebanrules>
I'm having issues wrapping my head around them
mojjojo has quit [Quit: mojjojo]
Matriks has joined #ruby
bradhe has joined #ruby
nateberkopec has quit [Client Quit]
bluOxigen has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
<shevy>
Hanmac really? hmm
<Hanmac>
shevy imo the best way would be: class << self; alias; end
<shevy>
waaah
deens has joined #ruby
nateberkopec has joined #ruby
<shevy>
uuuuugly
carraroj has quit [Ping timeout: 260 seconds]
<shevy>
estebanrules yeah. when do you wanna use a proc?
<Hanmac>
estebanrules: did you have other programing language experimance before? like C(++) ? think about procs as anonymous functions or function pointers
VTLob has joined #ruby
<estebanrules>
I used to code a lot in C, and most recently python
<shevy>
ack
<shevy>
a pythonista!
<estebanrules>
shevy - to be truthful, I don't know ;) I think that's part of the problem
<shevy>
close the doors, ready the shotguns!
<shevy>
estebanrules yeah
<estebanrules>
shevy - read what I wrote above
<estebanrules>
concerning python
vlad_starkov has joined #ruby
<shevy>
I face the same situation even after all those years
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
<shevy>
blocks given you more flexibility
<shevy>
*give
<Hanmac>
shevy yes and no ... there are exceptions ... nearly everything is an object ... and what is not an object returns an object(like if ... else is not an object but returns one) or can be turned into an object (blocks are no objects but can be turned into procs which are objects)
<estebanrules>
shevy - so what's the difference between just calling the method
<shevy>
estebanrules often you won't really absolutely need them, you can just write methods without tapping into blocks
jmeeuwen has joined #ruby
mocfive has quit [Remote host closed the connection]
alvaro_o has joined #ruby
<shevy>
estebanrules that you can put a lot of additional information into a block! it's like an extra argument
<shevy>
to all methods!
matchaw has quit [Read error: Connection reset by peer]
<shevy>
and the best thing is you don't have to use them if you don't want to
<estebanrules>
yeah, blocks just seem to be a very interesting way of doing things
mocfive has joined #ruby
<shevy>
also, they can automatically run some code like in File.new() {}
alexfreidah has joined #ruby
<shevy>
like perform .close there automatically
<shevy>
in python you'd have to do .close specifically I think
<shevy>
no idea actually ;)
<shevy>
lemme google how you create files in python...
failshell has joined #ruby
vlad_sta_ has joined #ruby
<Hanmac>
estebanrules: for sample get all files into current dir and sort the file names after file size ... Dir["*"].sort(&File.method(:size)) ... there is where the #method can be useful
<shevy>
oh yes... "The easiest way to simply create a file without truncating it in case it exists is this:"
<shevy>
open(x, 'a').close()
chrisseaton has quit [Read error: Connection reset by peer]
<shevy>
I was right!
<estebanrules>
Hanmac - I see
<shevy>
hmm although it is mentioned that .close() is optional
mocfive_ has joined #ruby
bluOxigen has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 252 seconds]
bluOxigen has joined #ruby
mocfive has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
bricker has joined #ruby
<Hanmac>
shevy "The easiest way to simply create a file without truncating it in case it exists is this:" what about that? ;P FileUtils.touch x
angusigu1ss has quit [Ping timeout: 272 seconds]
vpretzel has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
mklappstuhl has joined #ruby
lockweel has joined #ruby
jprovazn has joined #ruby
dkamioka_ has quit [Remote host closed the connection]
<shevy>
Hanmac without touch!
<shevy>
and without modifying mtime
<shevy>
:)
Rickmasta has joined #ruby
<Hanmac>
hm creating a file without touching it ... hm ...
<miah>
hai
* Hanmac
uses Telekinesis ... it is very effective!
nhhagen has joined #ruby
<LastWhisper>
hey guys
<LastWhisper>
i'm trying to learn more about ruby hashes
<LastWhisper>
besides the rubydoc page
<LastWhisper>
does anyone have a good resource/tutorial about it?
mikepack has joined #ruby
alex88 has quit [Quit: Leaving...]
sassamo has quit [Read error: Connection reset by peer]
Notte has quit [Remote host closed the connection]
mklappstuhl has quit []
stephanos-belli has quit [Quit: Page closed]
nhhagen has joined #ruby
mehlah has quit [Quit: Leaving...]
alexfreidah has joined #ruby
<Hanmac>
"nancy"? it could be worse ;P
keyword has joined #ruby
noop has quit [Ping timeout: 260 seconds]
monkegjinni has quit [Ping timeout: 264 seconds]
<LastWhisper>
Hanmac: that's an interesting perspective. I think the only thing that is proving difficult to wrap my head around is the syntax itself, and how to call things. :)
<Fractional>
Hanmac, Shevy: Are your auras still flowing with Ruby energy? :D
a-priori has joined #ruby
<shevy>
Fractional I am still using ruby
keyword has left #ruby [#ruby]
* Hanmac
is currently on the dark side ... deep in the C-ext programming ... ;P
<shevy>
but I am waiting for a better language
oznik_ has left #ruby [#ruby]
jlast_ has quit [Remote host closed the connection]
lockweel has quit [Remote host closed the connection]
iamsean has joined #ruby
reset has joined #ruby
<Hanmac>
Fractional: dam ... i didnt do yet what i wanted to do for you ... do you have your newest stuff in a git repository? i wanted to add some TileSet class feature (where you can use one image or multiple for managing the Image of the Tiles )
<Fractional>
Hanmac: Having a hard time understanding a effecient way to handle collision detection. It really made me become less motivated to finnish the work =/
<Hanmac>
event collision for event calling? yeah that can be very complicated ... (i only wanted to add the Tileset stuff for you, the other could be to complicated)
ephemerian has joined #ruby
jlast has joined #ruby
zz_cephalostrum is now known as cephalostrum
dfranciosi has quit [Remote host closed the connection]
phipes has joined #ruby
mocfive has joined #ruby
centrx has joined #ruby
aspires has quit [Remote host closed the connection]
weszlem has joined #ruby
aspires has joined #ruby
sassamo has quit [Read error: Operation timed out]
mocfive_ has quit [Ping timeout: 260 seconds]
mikepack has joined #ruby
decoponio has quit [Quit: Leaving...]
blaxter has quit [Ping timeout: 272 seconds]
phantasm66 has joined #ruby
phantasm66 has quit [Excess Flood]
sassamo has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has quit [Excess Flood]
lkba has joined #ruby
phantasm66 has joined #ruby
Virtualize has quit [Quit: Leaving...]
v10energy has joined #ruby
<v10energy>
does anybody know of a gem that allows you to update google docs spreadsheet?
kebabski has joined #ruby
nwertman has quit [Ping timeout: 260 seconds]
claymore has quit [Ping timeout: 252 seconds]
v0n has joined #ruby
yasushi has quit [Remote host closed the connection]
zeade has joined #ruby
zeade has left #ruby [#ruby]
alexherbo2 has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
mikepack has quit [Ping timeout: 252 seconds]
claymore has joined #ruby
wiku6 has joined #ruby
<wiku6>
can anyone explain to me why ruby-lang you can't type/chat in it?
fijimunkii has joined #ruby
<centrx>
wiku6, Isn't this type/chat?
<pragmatism>
wiku6: I think it's a private channel: you're allowed to monitor.
<pragmatism>
Dunno though.
<pragmatism>
I used to idle in there actually, maybe you need to ident?
<centrx>
wiku6, It may have a freenode mode set where you have to be registered with nickserv to send messages
<pragmatism>
^^ that
<wiku6>
ohhhhhhhhhhhhhhhhhhhhhhhh, that makes sense
rezzack has joined #ruby
freezey has quit [Remote host closed the connection]
<wiku6>
i've been logged into ruby-lang all day though and BARELY anyone talks
<wiku6>
some dude just said 'quack quack' and that's the most i've seen all day
<centrx>
This is the more popular channel, along with #rubyonrails
<centrx>
That was me!
<centrx>
Even though #ruby-lang is the channel the Ruby website refers you to
RoryHughes has joined #ruby
deception has joined #ruby
<shevy>
wiku6 they changed the #ruby-lang channel to "register to speak" I think either in 2012 or in 2013
<shevy>
since then there was a decline. I left because of that
<wiku6>
i'm pretty new to IRC, but freenode = programming languages, rizon = random shit, quakenet = games, right?
mechanicles has quit [Remote host closed the connection]
<pragmatism>
wiku6: basically :P
geekbri has joined #ruby
<pragmatism>
can someone mention me?
<centrx>
DALnet used to be the place to be
<Morrolan>
pragmatism: Ding.
<pragmatism>
Morrolan: thanks.
<pragmatism>
Guess irssi still needs some configging
wildroman2 has joined #ruby
nathancahill_ has joined #ruby
<pragmatism>
Morrolan: one more try?
<wiku6>
What is a rubyist opinion on Go? Reddit has been raving about it recently.
coca_rails has quit [Remote host closed the connection]
<shevy>
wiku6 just one new language sponsored by a big corporation, similar to all the already existing C-family ones
<pragmatism>
Go is awesome for concurrency
<Morrolan>
pragmatism: Itsa me!
<pragmatism>
You could use EM or Celluloid to do about the same thing in ruby
nathancahill has quit [Ping timeout: 272 seconds]
nathancahill_ is now known as nathancahill
coca_rails has joined #ruby
St_Marx has quit [Ping timeout: 264 seconds]
<havenwood>
wiku6: Go is a nice modern replacement for where you might otherwise use C.
<pragmatism>
also what shevy said
<havenwood>
wiku6: Fugly.
postmodern has joined #ruby
Virtualize has joined #ruby
<wiku6>
god damnit, i just realized that my tmux fucked up again, stupid utf-8
wiku6 has quit [Quit: WeeChat 0.3.8]
Virtualize has quit [Client Quit]
<shevy>
there he goes again
<estebanrules>
I've been learning Go, its cool. And some of the web frameworks that have been coming out are interesting
<pragmatism>
estebanrules: What implementations attracted you to it?
<pragmatism>
aka what are you building?
<shevy>
it's a bad omen - he mentions Go, and there he Go-es again
wiku6 has joined #ruby
dangerousdave has joined #ruby
<pragmatism>
groan lol
<shevy>
Hanmac now I am doing hanmac-style jokes ... :(
<shevy>
pragmatism don't worry, Hanmac will soon do even worse jokes
St_Marx has joined #ruby
<Hanmac>
shevy : "might the pun with you" ;P
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<estebanrules>
pragmatism - I used to code a lot in C. I like the "C-esque" nature of it. I'm primarily interested in the web applications, but also programs for servers
<pragmatism>
estebanrules: Cool. I use Ruby (obs, lol) for most web stuff, and C for most everything else
<shevy>
look Hanmac everyone is doing C in here
weszlem has quit []
coca_rails has quit [Ping timeout: 240 seconds]
<Hanmac>
estebanrules & pragmatism i use evil C macros to connect C++ functions with ruby in my binding (they create the get and set methods for me)
freezey has joined #ruby
bradhe has joined #ruby
phipes has quit [Remote host closed the connection]
<estebanrules>
pragmatism: I'm learning ruby right now, once I have a good handle on ruby then I'll jump in to rails
craigp has joined #ruby
bean__ has joined #ruby
<pragmatism>
estebanrules: It's a small jump :) Ruby makes everything so deliciously easy
<wiku6>
estebanrules: isn't your name from that second life video of the small midget going to strip clubs and saying he owns it now?
<estebanrules>
I think anyone who is a serious coder should try and learn some C. It's so helpful.
tannerburson has quit [Quit: tannerburson]
<pragmatism>
Bash, C, Ruby
<pragmatism>
Trifecta of productivity
<estebanrules>
wiku6: not to my knowledge. My last name is Esteban, and I rule ;)
<pragmatism>
:O
<pragmatism>
:OOOOO
<estebanrules>
yes
<pragmatism>
NOW WE KNOW WHO YOU ARE
<estebanrules>
indeed.
jetole has quit [Ping timeout: 246 seconds]
<pragmatism>
Now every time you ask a question, we're gonna send you a beer bill
alekst has joined #ruby
<estebanrules>
pragmatism - would you recommend learning Sinatra before Rails?
<pragmatism>
Nah
ffranz has quit [Ping timeout: 260 seconds]
<havenwood>
estebanrules: I would.
<pragmatism>
IMHO there's really not that much to learb in Sinatra
therod has joined #ruby
MatthewsFace has joined #ruby
<estebanrules>
I've been told Sinatra is good to learn routing
mspah_ has joined #ruby
digital-ghost has joined #ruby
<estebanrules>
havenwood - why specifically? I'm interested in Sinatra.
<pragmatism>
Maybe, but you'll learn the same thing in Rails.
<pragmatism>
Sinatra is good when you don't need rails
<havenwood>
estebanrules: Because it is simpler. Simple is good.
<pragmatism>
Otherwise, Rails does everything sinatra does
<havenwood>
shevy: Yes.
<pragmatism>
shevy: Anything Ruby is good when you need a beer
bradhe has quit [Ping timeout: 252 seconds]
<pragmatism>
aka all the time
<havenwood>
pragmatism: Allow an app to consist of a single file?
<shevy>
hehe
Advocation has quit [Quit: Advocation]
<wiku6>
shevy: depends if you're getting more than 10,000 beers at the same time
<pragmatism>
:P
<pragmatism>
Finnnneeeee
<estebanrules>
havenwood - Simple is indeed good.
<pragmatism>
I'm only giving you that point because I like you
<pragmatism>
and because it has merit
<pragmatism>
lol
<havenwood>
:P
enebo has quit [Quit: enebo]
Jdubs has joined #ruby
freezey_ has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
p8952 has quit [Quit: Leaving]
Virtualize has joined #ruby
jailbot has quit [Remote host closed the connection]
MatthewsFace has quit [Ping timeout: 264 seconds]
mansi has quit [Remote host closed the connection]
jailbot has joined #ruby
mansi has joined #ruby
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phantasm66 has quit [Quit: *poof*]
mspah_ has quit [Quit: This computer has gone to sleep]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
MattStratton has joined #ruby
colonolGron has joined #ruby
colonolGron has left #ruby [#ruby]
wtfitsme has joined #ruby
RaCx has quit [Ping timeout: 246 seconds]
<shevy>
simple is good because most of us are pretty dumb
_Andres has joined #ruby
nwertman has joined #ruby
freezey has joined #ruby
Riking has quit [Ping timeout: 253 seconds]
venkat has quit []
therod has quit [Quit: Lost terminal]
mansi has quit [Ping timeout: 246 seconds]
tvw has quit []
<pragmatism>
Hanmac: not bad :P
jailbot has quit [Ping timeout: 272 seconds]
RoryHughes has joined #ruby
<Hanmac>
in another binding there is also error handing/converting included ... (like catch c++ exception and wrap them into ruby exception and raise it) ... but for that binding its okay
<atmosx>
JavaScript syntax seems so stupid to me know
<atmosx>
err s/know/now
ahmedelgabri has quit [Ping timeout: 246 seconds]
<atmosx>
weird, but it's considerably easy all in all
angusigu1ss has joined #ruby
RoryHughes has quit [Client Quit]
mehlah has joined #ruby
mark_locklear has quit [Ping timeout: 252 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubyPanther>
atmosx: "Some people do not understand Camping and lash out with spears reaching 4 to 6 feet in length. Others fear and quake under carcass attire."
mark_locklear has joined #ruby
<atmosx>
I see
coder_neo has quit [Quit: This computer has gone to sleep]
<atmosx>
I understand now
wiku6 has quit [Quit: WeeChat 0.3.8]
wiku5_ has joined #ruby
blueOxigen has joined #ruby
<estebanrules>
camping looks cool.
nwertman has quit [Ping timeout: 260 seconds]
v0n has quit [Ping timeout: 260 seconds]
wiku5_ has quit [Client Quit]
wiku5_ has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
Riking has joined #ruby
poulson has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
angusigu1ss has quit [Ping timeout: 272 seconds]
burlyscudd has quit [Quit: Leaving.]
deens has quit [Remote host closed the connection]
kristiandelay has quit [Ping timeout: 248 seconds]
<RubyPanther>
I have no idea if camping still works on a modern Ruby. But I refer to its documentation often. As likely to be useful as the documents for whatever I'm really using, and more likely to entertain me.
bluOxigen has quit [Ping timeout: 252 seconds]
<estebanrules>
yeah I noticed it could be a bit outdated ;)
Hanmac has quit [Ping timeout: 260 seconds]
blueOxigen has quit [Read error: Connection reset by peer]
<estebanrules>
and yes of course entertaining
Hanmac has joined #ruby
bluOxigen has joined #ruby
skulker has joined #ruby
burlyscudd has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
Hanmac1 has quit [Ping timeout: 252 seconds]
nwertman has joined #ruby
<RubyPanther>
THere we go, while I did link a very old page, at github I see it is actively maintained
jrunning__ has joined #ruby
maletor has quit [Ping timeout: 265 seconds]
Xuerian_ is now known as Xuerian
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
notjohn has quit [Quit: notjohn]
heftig has joined #ruby
punkzioc has joined #ruby
nhhagen has joined #ruby
maletor has joined #ruby
pixelgremlins has joined #ruby
anildigital is now known as zz_anildigital
allaire has joined #ruby
nathancahill has quit [Ping timeout: 260 seconds]
sassamo has quit [Remote host closed the connection]
<shevy>
is camping still less than 4000 lines of code
jlast has quit [Remote host closed the connection]
sassamo has joined #ruby
relix has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
<v10energy>
anybody heard of adobe muse? basically there's already a website with bunch of html and css files generated by adobe muse. I need to add a simple contact form which will send out an email. using rails is uncessesary for this simple task. I already have a server with nginx and unicorn installed, any suggestions on how to implement the contact page with ruby?
sassamo has joined #ruby
monkegjinni has joined #ruby
<centrx>
"Design websites without code." great... :)
nhhagen has quit [Ping timeout: 252 seconds]
<ericwood>
ugh okay so I have strings with percent encoding for unicode shit
<ericwood>
for example: %uFEFF
<ericwood>
I want to decode them
<ericwood>
but I'm terrible at this and do not know how to do this the right way
maletor has quit [Quit: Computer has gone to sleep.]
Briareos1 has quit [Ping timeout: 264 seconds]
shaunbaker has joined #ruby
<centrx>
v10energy, Oh you mean simple_form requires rails...
ffranz has quit [Remote host closed the connection]
<v10energy>
centrx: yap
chrisseaton has joined #ruby
<apeiros>
ericwood: what format uses that encoding?
camilasan has quit []
workmad3 is now known as xpslnbe4
ffranz has joined #ruby
<ericwood>
apeiros: I don't have a ton of info, since this is kinda convoluted
iMe has quit [Read error: Operation timed out]
<ericwood>
but the problem is stuff being stored in a cookie then retrieved by rails
vpretzel has quit [Ping timeout: 246 seconds]
<ericwood>
and the strings I'm getting back have that stupid encoding shit
<v10energy>
centrx: i want to avoid converting bunch of html and css files into rails... it's hard because there's no layout page, meaning i have to create a layout page then trim the header and footer from every single page.
<ericwood>
well, so far I've only seen that one escape code
<centrx>
v10energy, It looks like simple_form only requires actionpack and activemodel from Rails...may not really need to use Rails with it
<v10energy>
centrx: so then i will put the existing website under /public/ or something, and then use sinatra just for 1 contact form page... i wonder if that's possible
shime_ has joined #ruby
shime has quit [Read error: Connection reset by peer]
nhhagen has joined #ruby
Hobogrammer has quit [Ping timeout: 272 seconds]
<centrx>
v10energy, Jekyll is another option havenwood recommended that I have heard people use
jkwaldri has joined #ruby
v0n has joined #ruby
spalenza has quit [Client Quit]
Hobogrammer has joined #ruby
ahmedelgabri has joined #ruby
blackmesa has joined #ruby
w4pm has joined #ruby
jkwaldri has quit [Quit: leaving]
ktosiek has joined #ruby
vlad_starkov has joined #ruby
<havenwood>
v10energy: Sure, you can set it up in Apache/Nginx conf however you want.
mlpinit_ has quit [Remote host closed the connection]
RoryHughes has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
<v10energy>
centrx: but it looks like jekyll is entirely for different purpose
<centrx>
ok
wildroman2 has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
deens has joined #ruby
shime_ has quit [Read error: Operation timed out]
<havenwood>
v10energy: it is for generating a static site, you can then use simple form in your generated site
sickweezle has quit [Ping timeout: 252 seconds]
ahmedelgabri has quit [Client Quit]
<havenwood>
v10energy: Maybe I'm confused what you're trying to do.
<v10energy>
havenwood: I already have like 20 pages generated from adobe muse and i just need to integrate 1 contact form page, and i want to use ruby
havenwood has quit [Read error: Connection reset by peer]
mocfive has quit [Ping timeout: 264 seconds]
<v10energy>
dammit lol
havenwood has joined #ruby
<workmad3>
v10energy: did you consider using a contact form service instead? a very quick google search turns up http://kontactr.com/help/faq
<workmad3>
v10energy: which would allow you to have an entirely static site on your end, contact form backend is handled by that service
venkat has joined #ruby
<havenwood>
nice idea
scarolan has joined #ruby
<v10energy>
workmad3: I'd still need to write some data to google docs after the e-mail is sent out using contact form
iamsean has quit [Quit: iamsean]
dawe has joined #ruby
<v10energy>
havenwood: here's the message i sent you before you got disconnected. I already have like 20 pages generated from adobe muse and i just need to integrate 1 contact form page, and i want to use ruby
bradhe has joined #ruby
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
mlpinit has joined #ruby
jlast has joined #ruby
<workmad3>
v10energy: that would have been useful up-front info ;)
coca_rails has joined #ruby
<workmad3>
v10energy: if you're gonna add in (to us) extra requirements when a suggestion comes up, it gets kinda annoying
<v10energy>
workmad3: sorry :)
<centrx>
He said it before
vlad_starkov has quit [Ping timeout: 252 seconds]
deens has quit [Ping timeout: 272 seconds]
deens has joined #ruby
<v10energy>
i might just use rails, dump the whole website into public/ folder, and then generate a controller with 1 view. lol
jailbot has quit [Remote host closed the connection]
<workmad3>
centrx: I didn't see anything about writing out to google docs
<centrx>
oh, I thought those were two separate projects
<v10energy>
it will be easy to deploy since i already have nginx and unicorn setup
rudisimo has quit []
<workmad3>
v10energy: I'd probably just use sinatra or possibly even a raw rack app at that point tbh
Bira has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
carraroj has quit [Write error: Broken pipe]
<v10energy>
workmad3: yea or sinatra. just gotta figure out how to deploy it
deens has quit [Client Quit]
maasha has joined #ruby
coca_rails has quit [Ping timeout: 240 seconds]
<workmad3>
v10energy: just use unicorn
St_Marx has quit [Ping timeout: 264 seconds]
<workmad3>
v10energy: unicorn is a rack app server, sinatra is a rack framework... ;)
<maasha>
Any insights in performance of IO.pipe vs named pipes?
<workmad3>
v10energy: make sure that nginx is pointed at the equivalent of a public/ directory to serve static HTML and CSS, point unicorn at the config.ru file for your sinatra or rack appp
<workmad3>
*app
scarolan has joined #ruby
<v10energy>
workmad3: allright, thanks :)
<centrx>
maasha, Can't you open the named pipe in read-write mode instead of making two descriptors for one named pipe file?
tannerburson has quit [Quit: tannerburson]
mehlah has quit [Quit: Leaving...]
LekeFly has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
<maasha>
centrx: I think I already tried, but it still hangs.
tannerburson has joined #ruby
enebo has joined #ruby
TheLarkInn has quit [Quit: Leaving.]
alex88 has joined #ruby
<shevy>
man
<shevy>
I just looked here
nhhagen has quit []
<shevy>
and I read "named pig"
St_Marx has joined #ruby
<workmad3>
maasha: err, isn't .gets a blocking call?
<workmad3>
maasha: as in, it'll block until input is ready
shadoi has joined #ruby
<maasha>
workmad3: possibly
rootshift has joined #ruby
RaCx has joined #ruby
<workmad3>
maasha: it's the named pipe that seems to hang
<maasha>
workmad3: I figured that much :o/
sickweezle has joined #ruby
<maasha>
and it is the read step
andrewhl has joined #ruby
MatthewsFace has joined #ruby
mspah_ has joined #ruby
mspah_ has quit [Max SendQ exceeded]
Virtualize|away has quit [Read error: Connection reset by peer]
Virtualize has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
<maasha>
ok, using write_nonblock and read_nonblock unhangs the situation.
burlyscudd has quit [Quit: Leaving.]
failshell has quit []
mspah_ has joined #ruby
<Hanmac>
maasha: and? what is faster?
venkat has quit [Remote host closed the connection]
clamstar has quit [Quit: Computer has gone to sleep.]
araujo has quit [Remote host closed the connection]
<Hanmac>
maasha: "goes fubar." ... is that good or bad?¿
<maasha>
Hanmac: bad ...
* Hanmac
goes into 10th doctor mode 'i am sorry, so sorry' ... ;P
MatthewsFace has joined #ruby
Asher has quit [Quit: Leaving.]
prc has joined #ruby
Asher has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
mspah_ has joined #ruby
Spami has joined #ruby
Kricir has joined #ruby
jerius has joined #ruby
coca_rails has joined #ruby
kalabiyau has left #ruby [#ruby]
Kricir has quit [Remote host closed the connection]
Speed has left #ruby ["WeeChat 0.4.2"]
Squarepy has joined #ruby
Kricir has joined #ruby
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
I have come to realize that code is evil
Butcho has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<pragmatism>
shevy: My apologies
<Hanmac>
shevy: you mean other than my code ? ;P
monkegjinni has joined #ruby
Kricir_ has quit [Ping timeout: 252 seconds]
diegoviola has quit [Quit: WeeChat 0.4.2]
geekbri has quit []
Butcho has quit [Client Quit]
scarolan has joined #ruby
<centrx>
shevy, It is because there is only 0 and 1, no third
alexlindenlevy has joined #ruby
nobitanobi has joined #ruby
<alexlindenlevy>
Hey guys I am trying to use %x(command) and I want to use some variables in the command string, is that possible?
burlyscudd has quit [Quit: Leaving.]
carif has joined #ruby
bradhe has joined #ruby
<nobitanobi>
Given myarr = ['test', 'test3','test4'] - How could I get this 'test', 'test3', 'test4' - Basically I want to pass the elements of that Array as parameters of a method.
freezey has quit [Remote host closed the connection]
yalue has quit [Quit: Leaving]
freezey has joined #ruby
<centrx>
alexlindenlevy, %x(run #{my_var})
<havenwood>
nobitanobi: *myarr
<godd2>
You never go full fubar
<alexlindenlevy>
centrx: ok, that is what I am doing
<nobitanobi>
havenwood, thanks :)
vlad_starkov has joined #ruby
monkegjinni has quit [Ping timeout: 252 seconds]
soulcake has quit [Ping timeout: 260 seconds]
devinus has joined #ruby
<devinus>
anybody know of a test framework to test command line output from input?
habanany has joined #ruby
v10energy has quit [Quit: Page closed]
<devinus>
i'd like to use ruby to write the tests or have the tool itself be written in ruby
vlad_starkov has quit [Read error: Connection reset by peer]
mojjojo has quit [Quit: mojjojo]
nfk has joined #ruby
maasha has quit [Quit: Page closed]
bradhe has quit [Ping timeout: 248 seconds]
robbyoconnor has quit [Read error: Operation timed out]
<godd2>
devinus you should be abel to use any of the test frameworks to do that. Just capture ARGV to check programatically
<godd2>
You also might want to check out the Thor gem if you're doing command liney stuff
Lewix has quit [Remote host closed the connection]
monkegjinni has joined #ruby
nanoyak has joined #ruby
robbyoconnor has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
Elhu has joined #ruby
tonni has quit [Quit: Leaving...]
danijoo has quit [Ping timeout: 272 seconds]
ciwolsey has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
mspah_ has quit [Quit: This computer has gone to sleep]
Lewix has joined #ruby
MattStratton has quit [Read error: Connection reset by peer]
MattStratton has joined #ruby
Txandy is now known as Txandy|away
JZTech101 is now known as jacob3
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jacob3 is now known as JZTech101
baroquebobcat has quit [Quit: baroquebobcat]
aspires has joined #ruby
<pragmatism>
Jeez JZTech101 make up your damn mind
mary5030 has joined #ruby
freerobby has quit [Quit: Leaving.]
nomenkun has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
mary5030 has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
Txandy|away is now known as Txandy
nanoyak has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
wildroman2 has joined #ruby
Matriks has quit [Remote host closed the connection]
<JZTech101>
pragmatism: no.
kpshek has quit []
baroquebobcat has quit [Client Quit]
rezzack has quit [Quit: Leaving.]
lkba has quit [Ping timeout: 272 seconds]
<Pixels>
how would i test to see if a regex completely matched a string, for example string.completematch(/(test|blah)/) would match string = "testblahtest" but not "this is a test"
coca_rails has quit [Remote host closed the connection]
<godd2>
I haven't read the cucumber book, so I can't say, but I like the rspec book.
Kabaka has quit [Ping timeout: 272 seconds]
Rylee has quit [Ping timeout: 272 seconds]
mocfive has quit [Ping timeout: 265 seconds]
dblessing has joined #ruby
<adi3009>
i find introductions quite boring, because i m already familiar with most concepts from other languages
ryantm has joined #ruby
Virtualize has joined #ruby
fede_ has quit [Ping timeout: 252 seconds]
<godd2>
Well it was only a suggestion. Feel free to skip around the text or not read it at all :)
IceyEC has quit [Quit: IceyEC]
<godd2>
I do suggest even reading the intros because you'll pick up ruby-specific things
<godd2>
especially in the pragprog books
<adi3009>
but the above introduction looks pretty brief so i may give it a go
<adi3009>
thanks godd2
stock584 has quit [Quit: Leaving]
<atmosx>
adi3009: if you are familiar with other programming languages, pick a book that is not for beginners. The pickaxe is a good choice imho for advanced users.
mark_locklear has quit [Ping timeout: 264 seconds]
<atmosx>
s/users/programmers
Elhu has quit [Quit: Computer has gone to sleep.]
wildroman2 has quit [Remote host closed the connection]
<godd2>
when atmosx refers to "The Pickaxe Book" he's talking about the link I sent you "Programming Ruby"
wildroman2 has joined #ruby
<bnagy>
tbh if you're familiar with other languages you mainly just need to understand blocks and mixins, then you can just use ruby-doc.org for the rest
<bnagy>
assuming 'other languages' includes proper OO somewhere
lkba has joined #ruby
mocfive_ has joined #ruby
<adi3009>
Scala does :)
Al___ has joined #ruby
wildroman3 has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<adi3009>
I am learning Ruby for Cucumber and BDD stuff
<atmosx>
why do you want to learn ruby if you know scala?
wildroman2 has quit [Read error: Connection reset by peer]
<godd2>
Scala and Ruby are similar in several ways, so it should be an easier transition than from straight Java
mansi has quit [Remote host closed the connection]
w4pm has joined #ruby
Elhu has joined #ruby
<bnagy>
cucumber is barely ruby, until you get to the point of actually writing passing code, at which point it's not cucumber any more, so you're not really making much sense to me
mansi has joined #ruby
<bnagy>
but hey, whatever
_tpavel has quit [Ping timeout: 252 seconds]
hetre85 has joined #ruby
alexherbo2 has quit [Read error: Connection reset by peer]
alexherb1 has joined #ruby
clamstar has quit [Client Quit]
LastWhisper has quit [Ping timeout: 272 seconds]
drumusician has joined #ruby
pusewicz has joined #ruby
<adi3009>
I know you can use any language with cucumber, also scala
<adi3009>
but we already have steps in ruby
jailbot has joined #ruby
venkat_ has joined #ruby
<adi3009>
its kind of business requirement that we can not use Scala for step definitions
Virtualize has quit [Quit: Leaving...]
webgen has joined #ruby
Mapley has quit [Ping timeout: 246 seconds]
<havenwood>
adi3009: Who actually writes and uses your Cukes? You have non-programmer stakeholders who are able to deal with that vegitable?
<havenwood>
just curious
mansi has quit [Ping timeout: 260 seconds]
CoverSlide has quit [Ping timeout: 252 seconds]
venkat has quit [Read error: Connection reset by peer]
nism has quit [Quit: Leaving]
<havenwood>
I've never personally seen a case where I though using cucumber was sane. But I've never been on a big team.
Rylee has joined #ruby
terrellt has quit [Ping timeout: 265 seconds]
<godd2>
Yea it's kind of odd that your development team forbade Scala step definitions.
wtfitsme has quit [Quit: wtfitsme]
freerobby has joined #ruby
<adi3009>
it is not easy to find Scala developers, and most developers in test know ruby than Scala
burlyscudd has joined #ruby
<havenwood>
ah
terrellt has joined #ruby
<adi3009>
and we also want it to be consistent across multliple projects
burlyscudd has quit [Client Quit]
<havenwood>
a testing department
<agent_white>
What's the preferred method of reading a IO stream backwards from a certain point?
<adi3009>
yes something like that
<bnagy>
you can't?
burlyscudd has joined #ruby
Advocation has joined #ruby
<bnagy>
agent_white: read it into something, then work with it
<godd2>
dunno how resouce intensive it is, but that will chew byte by byte backwards through a file
duggiefresh has quit [Remote host closed the connection]
<Hanmac>
godd2: use File.open with block form
vlad_starkov has quit [Read error: Connection reset by peer]
tannerburson has joined #ruby
larissa has quit [Quit: Leaving]
i_s has joined #ruby
depesz has joined #ruby
<depesz>
hi. I need to run system command, via IO::popen, but I'm on old ruby (1.8.7), and it takes only string as command, not list of command/arguments. so i'd like to "escape" all potentially bad characters in arguments.
<depesz>
is there any function, like "quotemeta" in perl, that would escape all problematic characters?
<apeiros>
I thought I had done it with plain core too, but don't remember how :-S
<jxport>
What's the best means of persisting data structures/objects for later instantiation?
<bnagy>
Fractional: stop asking for help with your homework
<apeiros>
jxport: waaaay too vague
<jxport>
apeiros: hehe
<bnagy>
Fractional: if in doubt, add more comments and refactor
<Fractional>
bnagy: It is not homework :P
<depesz>
apeiros: would be perfect if I could do the 2>&1 in there too
<jxport>
apeiros: I'm starting vague before committing to an implementation ;)
spider-mario has quit [Remote host closed the connection]
<bnagy>
the answer always falls out eventually
burlyscudd1 has joined #ruby
sparrovv has quit [Read error: Connection reset by peer]
<bnagy>
debugging this kind of thing yourself is the only way to actually learn to program
<apeiros>
jxport: ok, then my answer is: by pencil and paper.
benzrf has joined #ruby
<apeiros>
hth
sparrovv has joined #ruby
<benzrf>
i dont think ive ever heard hth non-sarcastically
<benzrf>
was that non-sarcastic?
<benzrf>
if so, first
<havenwood>
jxport: serialize it
<bnagy>
find points where you are sure you know what the values should be and print debugging info
<jxport>
havenwood: OK - my question is; how *best* to serialize my objects
<havenwood>
jxport: MsgPack
<apeiros>
benzrf: funny, I almost always use hth non-sarcastically. but this time, of course it was :)
<godd2>
jxport delegate/proxy?
<Fractional>
bnagy: Debugging with cards, notes and following the code. I really can't seem to stop it but I'll keep going! :D
<jxport>
godd2 lol wat
<godd2>
useful for lazy evaluation
wtfitsme has joined #ruby
<apeiros>
jxport: define "best", yadda yadda
<havenwood>
jxport: MsgPack, Marshal, JSON, YAML, your choice.
<bnagy>
Fractional: how do you debug with 'cards' ? Use p whatever statements
<jxport>
havenwood: *that's* what I'm looking for!
* apeiros
off to watch some junk, n8 guys & girls
aspires has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 248 seconds]
<depesz>
n*, and thanks apeiros
<havenwood>
jxport: Ruby has PStore and YAML::Store as well if you want to persist to disk.
<Hanmac>
yeah i found a "error" in stringIO ;P
<havenwood>
jxport: How much data do you have. Using a database?
burlyscudd has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
skulker has quit [Remote host closed the connection]
<havenwood>
jxport: (PStore is for Marshal and YAML::STORE is for... guess)
<jxport>
havenwood: I'm basically going to be looking to persist game state. Think: checkers
<apeiros>
did they consider calling YAML::Store YStore? would have been a far more funny name…
<havenwood>
hehe
<bnagy>
msgpack has implementations for most langs and is network friendly and fast
<havenwood>
that woulda been good
TigerWolf has joined #ruby
<bnagy>
Marshal is slightly faster afaik
<havenwood>
yay msgpack!
<bnagy>
or was, last I benched
skulker has joined #ruby
<havenwood>
and smaller
<apeiros>
in 1.8 it was ~3x faster than yaml
<Hanmac>
apeiros: IO#seek support symbol, StringIO#seek does not :/
<Fractional>
bNagy: I place the cards in branches just like the algorithm would do. It is easy visually.
<bnagy>
Marshal can serialize more stuff but it's bulky and a bad choice for interop
<bnagy>
Fractional: oh. Don't do that. Debug your code, not how you think your code works
<Fractional>
bnagy: I read the code then I do the steps :P
<bnagy>
if you could read your code accurately it would be working
<MrZYX>
Fractional: do the right thing with the cards, check if you code does the same thing (by outputting what it does, not by looking at it), not the other way around
MattStratton has quit [Ping timeout: 246 seconds]
<godd2>
testing is easy. You just run yoru program, and if something doesnt work, you fix it, duhh
coca_rails has joined #ruby
sassamo has joined #ruby
<Hanmac>
godd2 & bnagy & shevy: look at that what i have done! ;P
<agent_white>
shevy: I am... but I'm taking a breather from it and diving into something interesting :)
rubyracer has quit [Quit: Konversation terminated!]
jerius has quit [Read error: Operation timed out]
kebabski has quit [Read error: Connection reset by peer]
<bnagy>
agent_white: if it's itunes btw you could also parse their xml
<agent_white>
bnagy: Well I want to do it myself, not use a gem!
alvaro_o has joined #ruby
<bnagy>
saves looking at track metadata
kewubenduben has quit [Read error: Connection reset by peer]
zz_anildigital is now known as anildigital
<bnagy>
bindata just gives you a lib that you can use to write your parsers
<bnagy>
that is yak shaving work and you should let someone else do it
<benzrf>
Hanmac: isnt there something like that or something
<agent_white>
bnagy: Well it's basically... I was using taglib "basic parser" and it couldn't find a song name without me using a different subclass, so now... binary parsing!
sailias has quit [Ping timeout: 272 seconds]
<bnagy>
plus a subtle parser bug can ruin your whole day once you build a big tool on top of it
<bnagy>
trust me, I've been there :(
mlpinit_ has quit [Client Quit]
<benzrf>
Hanmac: why not just use monads
<benzrf>
B)
alekst has quit [Quit: Computer has gone to sleep.]
<benzrf>
[i will assume that they are relevant because really when are they not]
johnmilton has quit [Remote host closed the connection]
<Hanmac>
benzrf: each_slice only allows chunk of equal size
mlpinit has quit [Ping timeout: 272 seconds]
<benzrf>
wow so lame
<benzrf>
no this is what i would like:
<benzrf>
hmm nbm
<benzrf>
*nvm
<benzrf>
let me think this through .-.
alekst has joined #ruby
<benzrf>
i want iteration where i can see in front of and behind me, and also i can specify that later ones should be skipped or repeated or somethin
<benzrf>
i should make this :-D
Mattx has quit [Ping timeout: 252 seconds]
S3mI has joined #ruby
<agent_white>
bnagy: Ahhh yeah... maybe I should. Waaay in over my head trying this, but it's fun I suppose!
<bnagy>
benzrf: most of that you can get with next and retry?
mityaz has quit [Quit: See ya!]
kaldrenon has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
<txdv>
we need wards
<benzrf>
bnagy: hmm, retry?
Hiall has joined #ruby
<bnagy>
for looking ahead/behind though mostly have to use blah.with_index
<agent_white>
bnagy: How about this, any suggestions on a parsing project for a beginner? So I'm not diving into the abyss like I am currently?
<benzrf>
txdv: what r wards
<benzrf>
bnagy: with_index?
<txdv>
objects that provide vision
<benzrf>
agent_white: write a parsing framework thing B)
banister has joined #ruby
<benzrf>
agent_white: it is not so hard
<agent_white>
benzrf: Then stick with reading ID3 tags?! :D
nowthatsamatt has quit [Quit: nowthatsamatt]
<benzrf>
agent_white: i made one based on Parsec in like a few hours
<godd2>
bnagy thanks for pointing out the bindata gem. I'll use it for my RIFF parsing gem
<benzrf>
agent_white: or a method called 'many', to make a repeated parser
vlad_starkov has joined #ruby
shadoi1 has quit [Quit: Leaving.]
habanany has quit [Ping timeout: 265 seconds]
<centrx>
Fractional, That is the kind of error message you get if you have endless recursion. quicksort calling quicksort and never stopping
raar has joined #ruby
habanany1 has joined #ruby
<centrx>
Fractional, Also, Ruby has a native method for Array#partition
raar is now known as Guest24136
<centrx>
Fractional, Or you may be looking for Array#each_slice
<agent_white>
benzrf: Ahhh I see... sounds pretty 'meta'? (Just dove into _why's chapter on metaprogramming)
<benzrf>
not exactly
<benzrf>
but sort of
<benzrf>
agent_white: haskell has a pretty great library for parsing called Parsec, which is basically what I just described
m8 has quit [Quit: Sto andando via]
<centrx>
Fractional, Rather, it is Enumerable#partition, Enumerable#each_slice, etc.
<Hanmac>
centrx: Array#partition is not what you think
<benzrf>
agent_white: it handles creating values from parsing by having a sort of callback thing
<benzrf>
agent_white: in ruby it might look like this
monkegjinni has quit [Remote host closed the connection]
<benzrf>
def json_object
<centrx>
Yeah you probably want slice or each_slice
<benzrf>
char('{').then
|RicharD| has quit [Quit: Sto andando via]
<benzrf>
no wait
<benzrf>
hmmm
vlad_starkov has quit [Read error: Connection reset by peer]
<benzrf>
well, this is not actually possible working ruby code, but:
monkegjinni has joined #ruby
<benzrf>
def json_object
<shevy>
I wanna slice all of you!
<Fractional>
centrx: Ok, thanks! :)
<benzrf>
char('{')
drumusician has quit [Ping timeout: 248 seconds]
<benzrf>
pairs = property_pair.sep_by(',')
<benzrf>
char('}')
<benzrf>
pairs
<benzrf>
end
<shevy>
Hanmac do you think you will release a rxw gem this year?
wildroman2 has quit [Remote host closed the connection]
<benzrf>
agent_white: so you would intertwine the code that creates an object with the parser description
craigp has joined #ruby
Al___ has quit [Read error: Connection reset by peer]
camilasan has quit [Ping timeout: 264 seconds]
<Hanmac>
shevy depends ... currently i am jobless, thats why i can manage > 15 commits per day, if i find a job it would be more complicated ... the problem is: find some one that "!can!" commit to rwx ;D
Al___ has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<shevy>
hmm
<agent_white>
benzrf: Ahhh alrighty!
allaire has quit []
<benzrf>
:)
<shevy>
ok so you must release a gem before you'll land a new job :D
brennanMKE has joined #ruby
Megtastique has quit []
<godd2>
Does doing the tutorial Hola gem count?
<agent_white>
benzrf: Perfect... I actually might just get to work on a json parser to start with! Thank you very much, I appreciate it! :)
<benzrf>
agent_white: np!
<benzrf>
agent_white: i would not try to design it to work exactly as above, just fyi
ryantm has quit [Ping timeout: 252 seconds]
coca_rails has joined #ruby
<benzrf>
agent_white: it would be difficult to get that to work in ruby
<bnagy>
because ruby isn't haskell
<benzrf>
yup
<benzrf>
agent_white: i would represent parsers as objects with a 'parse' method, which takes a string or an IO or something and gives back a parsed representation
<benzrf>
agent_white: then you can combine them into new parsers n shit
colonolGron has joined #ruby
<bnagy>
also text parsing is quite different from binary parsing
monkegjinni has quit [Ping timeout: 248 seconds]
<Fractional>
I have NEVER been happier! :O
<Fractional>
Finally my quicksort is working, woho! :D
<shevy>
your happiness sickens me
<godd2>
level 2 is to make your json_parser error-aware, at least on some level
DaZ has joined #ruby
<benzrf>
mine used exceptions for failurlure
<benzrf>
it was so fuckin slow
nanoyak has joined #ruby
<Fractional>
It was that times loop that caused the issue ^
<Fractional>
^^
sassamo has quit [Remote host closed the connection]
freezey has quit [Ping timeout: 272 seconds]
sassamo has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
habanany has joined #ruby
<agent_white>
Awesome... I'm excited! :D
recurrence has joined #ruby
<recurrence>
I'm using capistrano and it's complaining that a ruby gem is not checked out. But it is... is there a good way to debug that?
ktosiek has quit [Read error: Connection reset by peer]
brennanMKE has quit [Ping timeout: 260 seconds]
coca_rails has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
<elektronaut>
are you running capistrano with bundle exec?
<benzrf>
agent_white: you should be
habanany1 has quit [Ping timeout: 272 seconds]
<benzrf>
shits fun =D
<recurrence>
elektronaut: with cap deploy actually
<benzrf>
agent_white: gl dont get frustrated o-o
<benzrf>
agent_white: remember that parsers must be able to indicate that they failed so that you can implement trying several possible parsers
<Fractional>
Any good resource on how to document code properly?
coca_rails has joined #ruby
Vivekananda has joined #ruby
<benzrf>
Fractional: im trying to think of a lame meta joka
<benzrf>
*joke
sassamo has quit [Ping timeout: 252 seconds]
Hanmac1 has joined #ruby
aspires has quit []
burlyscudd has quit [Quit: Leaving.]
blackmesa has quit [Quit: WeeChat 0.4.2]
tulak1 has quit [Ping timeout: 246 seconds]
tulak has joined #ruby
MrZYX is now known as MrZYX|off
Hanmac has quit [Ping timeout: 264 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
sassamo has joined #ruby
venkat_ has quit [Remote host closed the connection]
venkat has joined #ruby
<havenwood>
Fractional: When there is something interesting to say that the code doesn't already, add documentation.
<havenwood>
Fractional: Often there isn't. :P
kevind has quit [Quit: kevind]
<Fractional>
haven: I am getting graded based of how well I documentate code.
<havenwood>
oooh
tvw has quit []
<Fractional>
on*
<lethjakman>
hrm...odd thing. I'm running Time.method(:now).source_location and it's returning nil. however there does seem to be a Time.now method. why is that?
danshultz has joined #ruby
<Fractional>
haven: Got 4 algorithms to comment before I go to bed :)
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kitak has joined #ruby
scarolan has quit [Ping timeout: 272 seconds]
<Hanmac1>
lethjakman: #source_location and #parameters does not work for native (C/C++) methods
<lethjakman>
anyways the real issue is I have a Time.now and I need to compareit to a previous time to make sure 24 hours hasn't passed. is that possible?
Hanmac1 is now known as Hanmac
<Fractional>
Havenwood: Thank you so very much, that is EXACTLY what I was looking for! :D
<lethjakman>
Hanmac: oh. I didn't realize Time was written in c++
smathieu has joined #ruby
<lethjakman>
or c
<Hanmac>
it was C
<lethjakman>
whichever
<Hanmac>
most of the ruby core functions are written in C
epichero has joined #ruby
Al___ has quit [Quit: Al___]
<lethjakman>
huh, interesting.
<lethjakman>
that makes perfect sense
sepp2k has quit [Read error: Connection reset by peer]
venkat has quit [Ping timeout: 252 seconds]
<lethjakman>
is there a way to compare Time's though?
coca_rails has quit [Remote host closed the connection]
coca_rails has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
mspah_ has quit [Quit: This computer has gone to sleep]
tyl has joined #ruby
<depesz>
hi. "puts" adds "\n" at the end of line. Can it be somehow configured? I'd like to output "\r\n" even though I'm on Unix.
<bnagy>
anyway cheat all you want, just don't bother lying. Saying you're 'just writing quicksort because it looked interesting LOL' isn't going to fool anyone ever
tyl has quit [Client Quit]
<Fractional>
bnagy: I am not cheating and I am not lying.
<bnagy>
depesz: gotta do it manually afaik, using print
brennanMKE has joined #ruby
aryaching has joined #ruby
<depesz>
bnagy: ok.
_Andres has joined #ruby
Fractional has quit [Quit: Leaving]
<bnagy>
depesz: hm, there might be a global actually.. but tbh I would still suggest doing it manually
<bnagy>
otherwise it's going to weird someone the hell out one day
<centrx>
You could use IO.new, but that seems like overkill
mojjojo has quit [Quit: mojjojo]
baroquebobcat has joined #ruby
S3mI has left #ruby [#ruby]
kirun has quit [Quit: Client exiting]
baroquebobcat has quit [Client Quit]
habanany has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 272 seconds]
Fractional has joined #ruby
mojjojo has joined #ruby
<benzrf>
txdv: what are wards
<pragmatism>
Fractional: Tell us how you really feel ;)
<Fractional>
pragmatism: While doing it boring but after managing to do it awesome :D
venkat has quit [Remote host closed the connection]
bradhe has joined #ruby
venkat has joined #ruby
<benzrf>
Fractional: ;)
habanany has joined #ruby
<Fractional>
benzrf: Is that what you wanted to hear? Haha