<i8igmac>
this xpath example will output something like => " some name\n\n", "\t", "(","2009",")"
<ferret_guy>
bricker should I have a PassengerDocumentRoot?
<bricker>
ferret_guy: I don't know, just a thought
<bricker>
I've only ever setup subdomains in passenger with nginx
<bricker>
and I remember it being non-trivial
<ferret_guy>
where might I add it? location?
<bricker>
and that was 3 years ago
<bricker>
yeah
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
enebo has joined #ruby
<ferret_guy>
Invalid command 'PassengerDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration
Yiota has joined #ruby
hahuang65 has joined #ruby
Yiota has quit [Client Quit]
eggoez has quit [Ping timeout: 240 seconds]
Yiota has joined #ruby
zendrix has quit [Ping timeout: 256 seconds]
<ferret_guy>
bricker: might it be called something else?
Brainling has joined #ruby
JDiPierro has quit [Remote host closed the connection]
wallerdev_ has quit [Quit: wallerdev_]
mistermocha has quit [Ping timeout: 255 seconds]
<ferret_guy>
no idea why the alias is not working though... should be dropping me into /public
bodgix_wrk_ has joined #ruby
<bricker>
dunno sorry
<bricker>
if I had it all in front of me I could figure it out but this is a difficult problem to debug by proxy
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
avril14th has quit [Ping timeout: 264 seconds]
<ferret_guy>
bricker: thanks for your help! I think it has something to do with alias not working right if I dont get it figured out in the next several hours hopefully the passenger irc can help
astrobun_ has joined #ruby
eggoez has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<ferret_guy>
bricker: so I got an error message form passenger, We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
hololeap has joined #ruby
KaZeR has quit [Remote host closed the connection]
<ferret_guy>
I found out I had 2 virtual hosts one in another file and one in the conf directory
blackmes1 has quit [Quit: WeeChat 1.2]
keen__________13 has quit [Ping timeout: 276 seconds]
<sphex>
it's attached to it via an internal instance variable, so it doesn't even waste memory for a pointer when not used. oh zenspider! isn't that fascinating?
<Papierkorb>
Why is "Fixnum === Fixnum" 'false' ?
chipotle has joined #ruby
casadei_ has quit [Ping timeout: 255 seconds]
segmond has quit [Ping timeout: 244 seconds]
sarkyniin has quit [Ping timeout: 252 seconds]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
Papierkorb: because you're invoking Module#===
<Papierkorb>
zenspider: Yep, got it. thanks. Mh, so I have a type inside a variable 'type', and want to do a case over it.
<Papierkorb>
Thinking about it, I think I want classes instead of a case.
<bricker>
ferret_guy: invalid YAML syntax in history.yml
chipotle has joined #ruby
<ferret_guy>
bricker: hmm my app starts w/o problems let me check what that does
segmond has joined #ruby
RegulationD has joined #ruby
Cache_Money has joined #ruby
Ilyas has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
jeramyRR has joined #ruby
<ferret_guy>
bricker: fixed YAML, dashing is now redirecting me to /sample where the dashboard is but of coursr Apache has no idea how to handle that, what should I do?
hotpancakes has joined #ruby
unreal has joined #ruby
<sphex>
hey. could anyone recommend some documentation about ruby's class system? I read some random bits here and there, but I'm not too confidant I could do metaprogramming right as it is.
towski_ has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
gambl0re has quit []
kkeuning has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
<bricker>
sphex: what kind of information are you looking for exactly?
kkeuning has quit [Max SendQ exceeded]
jpfuentes2 has joined #ruby
<sphex>
*everything*!
hotpancakes has quit [Ping timeout: 256 seconds]
<pontiki>
everything2.com is for you, then
apt-get_ has quit [Read error: No route to host]
<sphex>
I just figured out that classes do not have class methods; just instance methods and singleton instance methods. so I'm basically "there". I guess if there would be some doc that presented it from the start it would help me to reread it too. :/
<sphex>
this is really neat and seems all really well thought out.. but still pretty confusing
<sphex>
oh... yeah, I didn't check for real books yet. maybe I should.
sepp2k has quit [Quit: Leaving.]
<sphex>
pontiki: can you recommend that one?
Lucky_ has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jxpx777 has joined #ruby
Lucky_ has quit [Client Quit]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ddarkpassenger has joined #ruby
bronson has quit [Ping timeout: 246 seconds]
<sphex>
well then
snapfractalpop has left #ruby ["WeeChat 1.3-dev"]
sarkyniin has quit [Remote host closed the connection]
jfarmer has quit []
fmcgeough has quit [Quit: fmcgeough]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ddarkpassenger has quit [Client Quit]
Cache_Money has quit [Quit: Cache_Money]
sarkyniin has joined #ruby
balazs has joined #ruby
<ferret_guy>
it works!!!!!!!!
hotpancakes has joined #ruby
Rickmasta has joined #ruby
ferret_guy has left #ruby [#ruby]
zendrix has joined #ruby
momomomomo has quit [Quit: momomomomo]
mistermocha has joined #ruby
balazs has quit [Ping timeout: 265 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
reset has quit [Ping timeout: 264 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
baweaver has quit [Remote host closed the connection]
stantonnet has joined #ruby
zendrix has quit [Ping timeout: 252 seconds]
bricker has quit [Quit: leaving]
kkeuning has joined #ruby
Azulinho has joined #ruby
kkeuning has quit [Max SendQ exceeded]
nateberkopec has quit [Quit: Leaving...]
mistermocha has quit [Read error: Connection reset by peer]
rodfersou has quit [Quit: leaving]
mistermocha has joined #ruby
kkeuning has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
sarkyniin has quit [Quit: Quit]
kkeuning has quit [Max SendQ exceeded]
zacstewart has joined #ruby
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucky_ has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
Nick_joes_ has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 264 seconds]
Nick_joes_ has joined #ruby
jeramyRR has joined #ruby
sepp2k has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
Guest24 has quit [Ping timeout: 256 seconds]
jacaballero has joined #ruby
werelivinginthef has joined #ruby
hahuang65 has joined #ruby
jhwhite has joined #ruby
jhwhite has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 246 seconds]
mistermocha has quit [Read error: Connection reset by peer]
sharpmachine has quit [Remote host closed the connection]
lele has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
griffindy has joined #ruby
Igorshp has joined #ruby
wallerdev_ has quit [Ping timeout: 265 seconds]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has quit [Client Quit]
shinnya has quit [Ping timeout: 264 seconds]
Igorshp has quit [Ping timeout: 248 seconds]
christiandsg has joined #ruby
blokc has joined #ruby
nerium has quit [Quit: nerium]
hotpancakes has quit [Remote host closed the connection]
jerematic has quit []
kkeuning has joined #ruby
christiandsg has quit [Remote host closed the connection]
<Antiarc>
sphex: If you think of classes as instances of Class, which themselves have instance methods, then it becomes even more clear :)
d0lph1n98 has joined #ruby
GriffinHeart has joined #ruby
<Antiarc>
("eigenclass" is a keyword that may serve you well)
chipotle has quit [Quit: cheerio]
GriffinHeart has quit [Remote host closed the connection]
kkeuning has quit [Max SendQ exceeded]
GriffinHeart has joined #ruby
jeramyRR has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
momomomomo has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
werelivinginthef has joined #ruby
christiandsg has joined #ruby
Limix has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
devbug has joined #ruby
astrobun_ has joined #ruby
werelivinginthef has quit [Ping timeout: 265 seconds]
RegulationD has joined #ruby
prettiestPony11 has joined #ruby
casadei_ has joined #ruby
eggoez has quit [Ping timeout: 240 seconds]
<sphex>
Antiarc: huh. I guess. I'm really having a hard time figuring all of this out. :/ maybe I just need to concentrate harder. my brain must be hardwired for simula/C++ style classes.
astrobun_ has quit [Ping timeout: 255 seconds]
RegulationD has quit [Ping timeout: 256 seconds]
casadei_ has quit [Ping timeout: 240 seconds]
Limix has quit [Quit: Limix]
<Antiarc>
sphex: The way I think about it (which isn't entirely correct, but works well enough 99% of the time) is just "instance methods and static methods"
GriffinHeart has quit [Remote host closed the connection]
<Antiarc>
Is there something in particular you're struggling with, metaprogramming-wise?
ohaibbq has quit [Quit: Leaving...]
dstarh has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
GriffinHeart has joined #ruby
Rixius has joined #ruby
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
transiency has joined #ruby
towski_ has joined #ruby
c_nick has joined #ruby
workmad3 has joined #ruby
Agoldfish has quit [Quit: G'Bye]
bronson has joined #ruby
<sphex>
Antiarc: not at the time, but thanks! I get confused real easy when there are a lot of includes/extends happening. I prolly need to practice. or get a book. I guess understanding the eigenclass better will really help me though.
<c_nick>
Active record where function is used but it takes all the column entries as parameters how can I send a like query in it
eggoez has joined #ruby
louism2wash has joined #ruby
<louism2wash>
hey guys, what does the ** operator do in a file path?
Oog has joined #ruby
<c_nick>
Louism2wash directories and subdirectories
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<c_nick>
I want to query select * from students where name is Josh and address like %newyork% and age = 23
<Oog>
i figured it out. that was a bad bug
hornairs has quit [Ping timeout: 246 seconds]
<Oog>
major problem there
<c_nick>
But my active record function is like Student.where(name: sname, address: sadd age:sage)
eggoez has quit [Ping timeout: 248 seconds]
<c_nick>
How to get a like field in the address field
<blokc>
Foo.where("bar LIKE ?", "%#{query}%")
<cout>
mmm.. sage
* cout
licks his chops
Rickmasta has quit [Ping timeout: 252 seconds]
<sphex>
Antiarc: oh yeah.. it helps to see it work with an anonymous class too. it probably would have confused the s**t out of me if I saw it in the wild.
<c_nick>
blokc: that would give me all students living in new York but how to filter it with Josh with age
darkf has joined #ruby
<c_nick>
I had tried merge bit then this like query did not return anything also in rails u could traverse db using rails console how to try db in normal active records
lessless has joined #ruby
eggoez has joined #ruby
Rickmasta has joined #ruby
<sevenseacat>
c_nick: Student.where("name LIKE "%#{whatever}%").where(age: 25, address: whatever)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alicef has joined #ruby
<sevenseacat>
I was not posting exact code to be used, which I thought was obvious by the fact I was using the wrong field names and the wrong variables.
alicef has left #ruby ["Leaving"]
<sevenseacat>
I was showing how it could be done by chaining where queries.
yfeldblum has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: zzz]
yfeldblum has joined #ruby
<c_nick>
The parameters need to be a hash ?_
<sevenseacat>
?rails also
<ruboto>
also, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
msnyon has quit [Ping timeout: 252 seconds]
kkeuning has joined #ruby
JoshuaPaling has joined #ruby
<blokc>
I'm in #rubyonrails too.
<c_nick>
No seven I meant on the link blokc gave there it mentions name like :dname", {dname: name}
hololeap has joined #ruby
<c_nick>
Blokc ActiveRecords is rails active record aint :)
<blokc>
We need to move this to the RubyonRails Channel @c_nick
<c_nick>
Hmm ok
<sevenseacat>
i... what?
<sevenseacat>
nvm
<c_nick>
I will try these.
hakunin has quit [Remote host closed the connection]
<c_nick>
Thanks seven and blokc moving to rails channel
<blokc>
True it's not rails @c_nick, but this discussion would benefit people in that channel more.
<blokc>
I'm in that channel as well.
<c_nick>
Cool no problem. :)
charliesome has joined #ruby
hotpancakes has joined #ruby
Sehryn has quit [Ping timeout: 276 seconds]
jesterfraud has joined #ruby
balazs has joined #ruby
Channel6 has quit [Quit: Leaving]
nfk has quit [Quit: yawn]
bullcitydev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<blokc>
by the lucky stiff (and friends) is a classic
<blokc>
the go to book I read once a week is 'Elegant Ruby' by Russ Olsen.
<blokc>
That book will more than anything help you right in the style of Ruby.
<blokc>
So if you're coming from another language that'll help.
Xoro has quit [Read error: Connection reset by peer]
t0rrieri has quit [Quit: Be back later ...]
<garysollin>
great, I kind of like the interface
<sevenseacat>
jesterfraud: lol
GriffinHeart has joined #ruby
kfpratt has quit [Remote host closed the connection]
<garysollin>
learn by doing, lol
bungoman has quit [Remote host closed the connection]
<blokc>
makes sense to me. also key is to have fun.
GriffinHeart has quit [Remote host closed the connection]
mistermocha has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
<garysollin>
gotta work now, good luck guys
iateadonut has joined #ruby
wallerdev has quit [Quit: wallerdev]
jcp has quit [Remote host closed the connection]
<blokc>
\wave
lessless has joined #ruby
lessless has left #ruby [#ruby]
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
dellavg has quit [Ping timeout: 264 seconds]
balazs has quit [Remote host closed the connection]
balazs has joined #ruby
ohaibbq has joined #ruby
kfpratt has joined #ruby
<Aeyrix>
wtf bundler is being a little shit
<Aeyrix>
demanding sudo
sigurding has quit [Quit: sigurding]
<blokc>
could be permissions on your gem dir
<blokc>
that's happened to me once
jhwhite has joined #ruby
balazs has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
<Aeyrix>
Nah it's because this isn't my server.
<Aeyrix>
<__<
Azulinho has quit [Ping timeout: 252 seconds]
<Aeyrix>
fixed with `bundle install --path ~/.gem`
mistermocha has quit [Read error: Connection reset by peer]
<Aeyrix>
although this is probably going to break something fierce when I try and use system ruby with user gems.
Azulinho has joined #ruby
mistermocha has joined #ruby
Rickmasta has joined #ruby
GriffinHeart has joined #ruby
<Aeyrix>
Radar:
<Aeyrix>
what's your blog post url again
<Aeyrix>
i actually need it for this stupid box
<Radar>
Aeyrix: Google "Ryan Bigg ubuntu"
<Radar>
first result
<Aeyrix>
<3
Oog has quit []
<sevenseacat>
you're internet famous!
<Aeyrix>
wait
<Radar>
Sure am.
<Aeyrix>
son of a bitch
<Aeyrix>
oh christ, okay, so here's my issue
<Aeyrix>
there's a system ruby installed already that I can't touch
<Aeyrix>
I can't remove it
<Aeyrix>
ruby 1.9.1
jhwhite has quit [Ping timeout: 252 seconds]
<Aeyrix>
what do?
<Radar>
Can't touch it? Why not?
hotpancakes has quit [Ping timeout: 256 seconds]
<Aeyrix>
Because this isn't my server.
<Aeyrix>
I am but a tenant.
<Radar>
Oh right, you've hacked into someone else's server :P
<Aeyrix>
Actually no.
<Radar>
Install ruby-install + chruby as your user.
<Aeyrix>
Just throw them in ~/bin or something?
<Radar>
It'll install all your gems in your home directory.
<Aeyrix>
nvm misread
<Radar>
Aeyrix: It will install it on a user-level unless you specify --system.
<Aeyrix>
disregard me im shit
<Radar>
hah no you're not
<Aeyrix>
also does bundler install gems systemwide by default?
<Aeyrix>
it appears to do so, isn't that bad practice according to basically everybody?
<Aeyrix>
(inc. me)
<Radar>
No, bundler installs them depending on your Ruby install. Use ruby-install + chruby and make sure that `which bundler` shows the one coming from your home directory and it should be fine.
<Aeyrix>
rite
<Radar>
i.e. on my machine: `which ruby` shows as: /Users/ryanbigg/.rubies/ruby-2.2.2/bin/ruby
<Aeyrix>
elliot@vega:~ $ which ruby
<Aeyrix>
kek
<Aeyrix>
/usr/local/bin/ruby
<Radar>
`which bundler` shows as /Users/ryanbigg/.gem/ruby/2.2.2/bin/bundler
<Aeyrix>
Thanks homebrew!
<Radar>
Do you chruby+ruby-install setup?
<Aeyrix>
Nah this is my dev box - homebrew.
<Radar>
Could be that chruby's autoswitching isn't turned on by default
<Aeyrix>
Because I know I can nuke it at any time.
<lucas__>
so, basically, here's the logic here. So, it takes an input of mode([5, 4, 3, 1, 1]) right? And it inputs all the values into the hash. then so the values of the hash is at a default 0, and it counts one by one
<lucas__>
and then it will return the value with the highest number. So I feel like I'm close... But the assignment says the output only should give back the "1", and not [0] 1, [1] 2
<lucas__>
I hope that makes sense....
christiandsg has joined #ruby
<lucas__>
and so i was thinking, well, it'll give back x, y, and so I just want the x, so I put in the .select... but that doesn't work, I guess
<blokc>
best place to find yourself with a method you don't understand.
<blokc>
that and here
lkba has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
hodI is now known as bosma
lkba has joined #ruby
chrissonar has joined #ruby
<lucas__>
hmm.... yeah, I guess my question is... I wasn't sure select would be the right method to use, but I really don't know what else to use here. I guess I just want a part of the output it's giving me, and I don't really know how to specify like, ruby, just give me this part
<lucas__>
I guess select is more like, if x is _____, then we will select it
<lucas__>
and i guess what i put in doesn't really follow that formula?
<Radar>
result.max will return the wrong value I think
<Radar>
Sorry, hash.max
<Radar>
hash.to_a.sort { |k,(a,b)| a <=> b }.last
<Radar>
That's my first attempt
<Aeyrix>
help i've fallen and i can't get up
<Radar>
There's a better way
eggoez has joined #ruby
<lucas__>
hmm.you know what. i think you're right. that would return the highest value in the hash.
<Radar>
result.sort_by { |k,v| v } .last
<lucas__>
ugh.
* sevenseacat
picks Aeyrix up
<Aeyrix>
Thank. :>
<Radar>
That returns a 2-D array of the hash, with the value that appears the most being the last element of that array
<Radar>
result.sort_by { |k,v| v }.last => [1,2]
<Radar>
Which tells you that 1 appeared twice
transiency has quit [Ping timeout: 244 seconds]
<lucas__>
ohhh i see i see
<lucas__>
can you explain what a <=> b does?
<lucas__>
oh never mind i found something to read up on it
<lucas__>
I'm going to read this and then i'll get back on here
iwishiwerearobot has joined #ruby
* Aeyrix
is lost with this shit.
<Aeyrix>
I think I broke something.
<Radar>
Aeyrix: Walk me through it?
<blokc>
Excellent, now learn how to break it some more.
pengin has quit [Remote host closed the connection]
RegulationD has joined #ruby
wallerdev has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lucas__>
https://gist.github.com/lucasrim/d11b591988750960accd I guess I'm still having problems with my original question... if the input were mode([5, 4, 1, 1] it would output [0] 1, [1] 2, but I really only want the 0 line. is there a way to speicfy which part of the hash i want returned?
dopieee has joined #ruby
mistermocha has joined #ruby
Xoro has joined #ruby
dopie has quit [Ping timeout: 252 seconds]
sharpmachine has joined #ruby
Ilyas has joined #ruby
<Burgestrand>
lucas__: you want the number only, not its' count?
<lucas__>
yeah...
RegulationD has quit [Ping timeout: 252 seconds]
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
<Burgestrand>
lucas__: yes there is a way, thing is, as soon as you've done to_a, it's no longer a hash, it's an array of [key, values], I'm guessing you've observed this?
oo_ has quit [Remote host closed the connection]
<Burgestrand>
Sorry, bad pluralisation, [key, value]
<lucas__>
ahhhh you're right. you're right. yeah i want to return it as a hash, so I can just take that out.
sharpmachine has quit [Ping timeout: 246 seconds]
railsraider has joined #ruby
<Burgestrand>
lucas__: so you go from [5, 4, 1, 1], into hash { 5 => 1, 4 => 1, 1 => 2 }, into array with to_a, [[5, 1], [4, 1], [1, 2]], you sort it (happens to end up in same order), and pick the last element, [1, 2]
<Burgestrand>
lucas__: (hint) your final step is you want the first element of that final result
niemcu has joined #ruby
tagrudev has joined #ruby
oo_ has joined #ruby
allomov has joined #ruby
Brainling has quit [Read error: Connection reset by peer]
<Radar>
first element or last element?
Feyn has quit [Quit: Leaving]
* Radar
reads again
<lucas__>
so can I just do... an .at(0) ?
<Burgestrand>
it wants the key
<Radar>
lucas__: [0] is shorter :)
<Burgestrand>
lucas__: yes, there's also a .first that you can use, very similar to .last, except it's… first :)
aganov has joined #ruby
<lucas__>
ohhh... So if I used [0], and if there was more than one mode.... would it return just the 1?
<Burgestrand>
lucas__: what is a mode, is each of 5, 4, 1, 1 a mode?
oo_ has quit [Remote host closed the connection]
<lucas__>
no no, so i'm looking for the mode, so the mode would be 1
<Burgestrand>
lucas__: I don't know what a mode is.
<lucas__>
ohhh a mode is the number in the sequence that occurs most often
workmad3 has joined #ruby
<lucas__>
so... if the input was 5, 4, 1, 1, 5, the mode would be both 5 and 1
<Burgestrand>
lucas__: so if there's a tie in the number of occurrences you want them all?
<Radar>
that'd made it bimodal
<Burgestrand>
or trimodal!
<Radar>
multimodal!
<Radar>
MULTIBALL
<Burgestrand>
MEGAMODAL
eGGsha has joined #ruby
aryaching has quit [Ping timeout: 248 seconds]
oo_ has joined #ruby
<Burgestrand>
Getting all of them makes the problem so much trickier I guess. :)
<lucas__>
ideally. yeah. or however many ___modal...
<Radar>
Not that much tricker
niemcu has quit [Ping timeout: 240 seconds]
<lucas__>
m-m-m-m-monster modal
<Radar>
Find the maximum count, then find all other keys in the hash with that value
<Burgestrand>
It's all relative to how accustomed you are to the programming and language
Carnage\ has joined #ruby
<lucas__>
almost completely new.... this would be about 1 week in to learning :\
<lucas__>
on my own.
<Burgestrand>
lucas__: I believe it'd help with your understanding if you split up all your method calls into one line each, so you could observe what it looks like at every step
allomov has quit [Remote host closed the connection]
eGGsha is now known as eGGshke
tkuchiki has quit [Remote host closed the connection]
eGGshke is now known as eGGsha
<Burgestrand>
lucas__: so there's always multiple ways of doing this. Since you have an array in the end, there's no good way to just "pick this key" or "pick this count" from it, you'll need to walk through the list and pick out the parts you want.
workmad3 has quit [Ping timeout: 240 seconds]
<Burgestrand>
lucas__: because it's sorted, the items you want (those sharing the highest mode) will always be at the end of the list, you'll have at least one but you could have many.
Carnage\ has quit [Client Quit]
jacaballero has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
<lucas__>
okay. so... Uh okay, I think I have a better answer.... Give me one second to write this out
rushed has joined #ruby
<lucas__>
then i'll type it
<Burgestrand>
lucas__: I'll be here for at least 8 hours more, no hurry ;)
eGGsha is now known as eGGshke
allomov has joined #ruby
mistermocha has joined #ruby
<certainty>
moin
<Burgestrand>
\o.
<certainty>
o/
<lucas__>
Burgerstand: just checking if this works
<lucas__>
hmm.
<Burgestrand>
lucas__: there's a bug in your current code as well, but it might disappear if you retype your solution, we'll see :)
balazs has joined #ruby
TinkerTyper has quit [Ping timeout: 256 seconds]
eGGshke is now known as eGGsha
<lucas__>
I'm gonna start from scratch, if you don't mind. Honestly, I've been staring at this code for 2 hours, and I would like to just start again.
kfpratt has quit [Remote host closed the connection]
dopieee has quit [Quit: This computer has gone to sleep]
arturaz has joined #ruby
balazs has quit [Ping timeout: 265 seconds]
Macaveli has joined #ruby
ivanskie has joined #ruby
yeticry has quit [Ping timeout: 248 seconds]
<lucas__>
also I'm not sure if that's the correct way to blip you.... I haven't really used irc
<Radar>
lucas__: Type the first couple of characters of someone's name and hit tab
<Aeyrix>
lucas__: Just type their name, or type some of it and press TAB.
jfarmer has quit []
yeticry has joined #ruby
<lucas__>
ohhh okay
allomov has quit [Remote host closed the connection]
christiandsg has joined #ruby
<Burgestrand>
Tap completion is very useful when you have a name that looks like burgerstand, but isn't ;).
wallerdev has quit [Quit: wallerdev]
Xeago has joined #ruby
* Aeyrix
actually thought it was Burgerstand.
<Aeyrix>
:P
<Burgestrand>
Most do :)
<shevy>
mhhmmm burgers
<shevy>
this is strange, #ruby is a channel that makes me hungry
<lucas__>
hey i think i got it actually
El3ktra has joined #ruby
<Burgestrand>
lucas__: \o/
mistermocha has quit [Ping timeout: 255 seconds]
<lucas__>
let me write in some comments to explain my thoughts i guess
hotpancakes has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
Ilyas has quit [Read error: Connection reset by peer]
davedev24_ has quit [Ping timeout: 248 seconds]
icosa1 has joined #ruby
Asher has quit [Remote host closed the connection]
Asher has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
joonty has joined #ruby
zacts has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<Burgestrand>
A nice part about this channel is that you sometimes get small fun problems to solve, it's therapeutic.
<Burgestrand>
Writing ruby code just for the sake of throwing it away once done.
roolo has joined #ruby
<shevy>
hehe
astrobu__ has joined #ruby
olistik has quit [Remote host closed the connection]
<shevy>
for that purpose I usually store that ruby code in a .rb file, so that I can invoke it lateron through a call again, by calling the method there
<baweaver>
they throw out lots of Ruby code :troll:
astrobun_ has quit [Ping timeout: 265 seconds]
<Burgestrand>
lucas__: yeah, looks good, well done :)
<lucas__>
cool! very happy. Thank you guys so much! Radar and Burgestrand
<Radar>
No worries mate :)
roolo_ has joined #ruby
<shevy>
we use a radar to find a burger...
lucas__ has quit [Quit: Page closed]
Scroff has joined #ruby
lucas__ has joined #ruby
ndrei has joined #ruby
dgutierrez1287 has joined #ruby
hoofed has quit [Read error: Connection reset by peer]
bronson has joined #ruby
<Burgestrand>
lucas__: in case you're interested, I also made one, https://repl.it/vu0, I wanted to try and reduce the number of iterations to a minimum
haxrbyte_ has quit [Read error: Connection reset by peer]
codecop_ has quit [Quit: Išeinu]
<Ox0dea>
No direct influences, then?
bhuvanaurora has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
bhuvan_aurora has quit [Ping timeout: 255 seconds]
warriorkitty has joined #ruby
arup_r has quit []
devbug has quit [Ping timeout: 265 seconds]
<warriorkitty>
Hi all. I need to get the time in New York (different time zone than mine)? What would be the easiest way? New York is in UTC-4 timezone. Thank you very much.
krz has quit [Quit: WeeChat 1.0.1]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
eGGsha has joined #ruby
<Burgestrand>
warriorkitty: I'm assuming you want it through ruby, and not by googling "time in new york"?
<warriorkitty>
Burgestrand: Yes, I'm doing it through rake as a task.
gagrio has joined #ruby
iwishiwerearobot has joined #ruby
krz has joined #ruby
<Burgestrand>
warriorkitty: in that case yes, that documentation is where you should look. I'm not sure I feel good setting it globally through Time.zone, so I'd look for an alternative, but in a pinch that should do.
<warriorkitty>
Burgestrand: Thank you.
warriorkitty has quit [Quit: Lost terminal]
jenrzzz has quit [Ping timeout: 256 seconds]
tno has joined #ruby
jenrzzz has joined #ruby
iwishiwerearobot has quit [Ping timeout: 256 seconds]
roolo_ has quit [Remote host closed the connection]
jacaballero has quit [Read error: Connection reset by peer]
jacaballero has joined #ruby
bhuvan_aurora has joined #ruby
bhuvanaurora has joined #ruby
AlexAltea has quit [Ping timeout: 244 seconds]
thiagovsk has quit [Quit: Connection closed for inactivity]
Xeago has joined #ruby
jacaballero has quit [Max SendQ exceeded]
ta has joined #ruby
jacaballero has joined #ruby
blueOxigen has joined #ruby
mistermocha has joined #ruby
t3k has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unshadow has joined #ruby
bluOxigen has quit [Ping timeout: 255 seconds]
ta has quit [Remote host closed the connection]
dumdedum has joined #ruby
lxsameer has joined #ruby
t3k has joined #ruby
randiman has quit [Quit: (null)]
slucx has joined #ruby
troulouliou_dev has joined #ruby
xcesariox has joined #ruby
t3k has quit [Client Quit]
Musashi007 has quit [Read error: Connection reset by peer]
devbug_ has quit [Read error: Connection reset by peer]
olistik has joined #ruby
slucx has quit [Client Quit]
slucx has joined #ruby
Musashi007 has joined #ruby
slucx has left #ruby [#ruby]
dumdedum has quit [Ping timeout: 264 seconds]
baweaver has quit [Remote host closed the connection]
kies^ has joined #ruby
anaeem1 has joined #ruby
bosma has quit [Read error: Connection reset by peer]
ValicekB has quit [Ping timeout: 250 seconds]
unshadow has quit [Quit: leaving]
bosma has joined #ruby
Xeago has quit [Remote host closed the connection]
jacaballero has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
jacaballero has joined #ruby
RegulationD has joined #ruby
workmad3 has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
<shevy>
jhass, crystal would be faster for GUI stuff such as gtk bindings because it is compiled rather than interpreted, such as ruby, right?
<izzol>
The problem is that I don't see my DNS server on the output.
<izzol>
but just the 'dns'.
<izzol>
so basicialy I would like to see: config(nameserver: 8.8.8.8)
penzurx has quit [Ping timeout: 255 seconds]
<maloik>
try this: describe "test_host with #{dns} as the server" do
<ljarvis>
what even is this syntax
<izzol>
I did that but it doens't work
<ljarvis>
dammit rspec
<ljarvis>
when i thought i knew you
<maloik>
still using should?
casadei_ has quit [Ping timeout: 256 seconds]
<izzol>
ohh wait
<izzol>
it works when I changed '' to ""
<izzol>
:)
<izzol>
cool, now I see what I want to see :P
<maloik>
yes, that's how interpolation works ;-)
<izzol>
thanks maloik
<maloik>
yw
hotpancakes has joined #ruby
quimrstorres has quit []
bhuvan_aurora has joined #ruby
bhuvanaurora has joined #ruby
<yorickpeterse>
ljarvis: yeah, the it { ... } form is really confusing
<maloik>
yea, there's that
<ytti>
yorickpeterse, do you think postgres is good for large time series?
<maloik>
we hardly ever use that except for with the "is expected to validate presence of" things
<ytti>
yorickpeterse, like billions of entries?
workmad3 has joined #ruby
quimrstorres has joined #ruby
rodfersou has joined #ruby
<maloik>
ytti: at the risk of sounding incredulous, is that an actual problem right now? billions of entries sounds like quite a lot ;)
<yorickpeterse>
ytti: do you actually need a database for that?
<yorickpeterse>
as in, will you actually reach that scale within now and the next ~2 years?
<maloik>
^ that
oo_ has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby
<yorickpeterse>
yay floats: [array of lots of integers supposedly adding up to 100].sum # => 100.00000000000001
<yorickpeterse>
but surely float + float _always_ give back consistent decimals right?
<yorickpeterse>
right??
<ytti>
maloik, yorickpeterse yes
<ytti>
tsdb scale usually is trillions
GriffinHeart has quit [Remote host closed the connection]
<yorickpeterse>
"usually" != your use case
<ytti>
when you want to collect persistent metrics from many datapoints, very frequently, and store them for lon
<yorickpeterse>
Either way, if the data is small Pg can probably handle it just fine
<ytti>
i'm asking for tsdb, because i know the dataset will be very large
<yorickpeterse>
If you need zomgscale you'll have to look into whatever timeseries DB out of many out there suits your needs
<ytti>
yes, and that is what i was asking, if people here have recommendation
<yorickpeterse>
Row counts doesn't really matter also
DaniG2k has quit [Quit: leaving]
<yorickpeterse>
it's the size of each row that you need to be worried about
<yorickpeterse>
and how much you intend to index
AlexAltea has joined #ruby
last_staff has joined #ruby
hmnhf has quit [Remote host closed the connection]
decoponyo has joined #ruby
christiandsg has joined #ruby
hotpancakes has quit [Ping timeout: 264 seconds]
decoponyo has quit [Max SendQ exceeded]
chinmay_dd has joined #ruby
decoponyo has joined #ruby
decoponio has quit [Ping timeout: 240 seconds]
krz has quit [Read error: Connection reset by peer]
blueOxigen has quit [Ping timeout: 252 seconds]
parabolize has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Spami has joined #ruby
decoponyo has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
felixr has joined #ruby
sharpmachine has joined #ruby
zacstewart has joined #ruby
garysollin has quit [Quit: Leaving]
decoponio has quit [Max SendQ exceeded]
konsolebox has joined #ruby
decoponio has joined #ruby
marr has joined #ruby
bronson has joined #ruby
zacstewart has quit [Ping timeout: 264 seconds]
sharpmachine has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
Zai00 has quit [Quit: Zai00]
adamski2600 has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
<maloik>
Our SSL provider's API is being routed through CloudFlare and returning a ton of http 525 errors because CloudFlare can't complete the SSL handshake with the provider's servers... something is not right here :/
bronson has quit [Ping timeout: 265 seconds]
platzhirsch has joined #ruby
Scroff has quit [Remote host closed the connection]
konsolebox has quit [Max SendQ exceeded]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
krz has joined #ruby
oo_ has quit [Remote host closed the connection]
Scroff has joined #ruby
Macaveli has joined #ruby
oo_ has joined #ruby
yaw has joined #ruby
AlexAltea has quit [Ping timeout: 244 seconds]
oo_ has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 265 seconds]
Rickmasta has joined #ruby
oo_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
there's something satisfying to having decent spec descriptions
<yorickpeterse>
besides it actually being easy to understand what the heck the specs do
aryaching has joined #ruby
RegulationD has joined #ruby
chipotle has joined #ruby
lkba has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bhuvan_aurora has quit [Ping timeout: 256 seconds]
khebbie has joined #ruby
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eGGsha has joined #ruby
<Bitcrusher01>
I've got at quick question; I'm currently making some tests using serverspec, and found an example for testing a network interfaces netmask - I just don't understand the format the variable is in --- it { should have_ipv4_address("${2:ipaddress/netmask}") }
nerium has joined #ruby
<Bitcrusher01>
can anyone explain it to me?
mistermocha has quit [Read error: Connection reset by peer]
<Bitcrusher01>
the ${2:ipaddress/netmask} part - I've only seen #{} till now
decoponio has quit [Quit: Leaving...]
leonardoajim has quit [Quit: Be back later ...]
sdothum has joined #ruby
mistermocha has joined #ruby
denver has joined #ruby
felixr has joined #ruby
<apeiros>
Bitcrusher01: that's not something which comes from ruby itself
<apeiros>
i.e. it's probably something serverspec or whatever interpolates itself. e.g. using gsub.
<Bitcrusher01>
apeiros: thanks :) I'll try to figure out what $ is when using serverspec
<apeiros>
I assume it's some kind of template mechanism / variable substitution
<maloik>
could very well be chef-specific? afaik, they embed some kind of ruby in the latest versions
yaw has joined #ruby
jhwhite has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<maloik>
although im not sure to what end serverspec is linked to chef
<maloik>
(if at all, for that matter)
Voker57 has joined #ruby
<Bitcrusher01>
I have not installed chef directly (assuming it's a gem) - only if it's been installed as some king of mandatory dependency for server
<Bitcrusher01>
*serverspec
<maloik>
I just googled for that piece of code, the only place I've found a result for is a snippets file for what I believe to be a vim autocompletion plugin
nfk has joined #ruby
<maloik>
is that .snip file the one you're looking at?
bhuvan_aurora has quit [Ping timeout: 248 seconds]
andikr has joined #ruby
tkuchiki has quit [Remote host closed the connection]
bhuvanaurora has quit [Ping timeout: 264 seconds]
CloCkWeRX has joined #ruby
jhwhite has joined #ruby
arturmartins has quit [Quit: Leaving...]
stamina has quit [Ping timeout: 240 seconds]
Gadgetoid has joined #ruby
CloCkWeRX has left #ruby [#ruby]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonathanwallace has joined #ruby
fella6s is now known as fella5s
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kully3xf has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has quit [Ping timeout: 256 seconds]
quimrstorres has quit [Remote host closed the connection]
stamina has joined #ruby
kkeuning has joined #ruby
mary5030 has joined #ruby
kkeuning has quit [Client Quit]
bhorn1 has joined #ruby
willhumphreys has quit [Ping timeout: 246 seconds]
krz has joined #ruby
vt102 has joined #ruby
zacstewart has quit [Remote host closed the connection]
anaeem1 has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
sgambino has joined #ruby
Sehryn has joined #ruby
yaw has joined #ruby
kies^ has joined #ruby
mary5030 has quit [Remote host closed the connection]
dangerousdave has joined #ruby
bhuvan_aurora has joined #ruby
victortyau has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
bhuvanaurora has joined #ruby
nerium has quit [Quit: nerium]
mjuszczak has joined #ruby
bruno- has joined #ruby
nateberkopec has quit [Quit: Leaving...]
griffindy has joined #ruby
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Remote host closed the connection]
livathinos has quit [Read error: Connection reset by peer]
livathinos has joined #ruby
bosma_ has joined #ruby
felixr has quit [Ping timeout: 240 seconds]
Zarthus has quit [Ping timeout: 248 seconds]
anaeem1__ has joined #ruby
anaeem1 has quit [Read error: No route to host]
felixr has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
knikolov has quit [Ping timeout: 248 seconds]
InternetFriend has joined #ruby
artmann_ has joined #ruby
artmann has quit [Ping timeout: 248 seconds]
tobyx_ has joined #ruby
AlexAltea has joined #ruby
hackeron has quit [Ping timeout: 265 seconds]
PlasmaStar has quit [Ping timeout: 256 seconds]
Bitcrusher01 has quit [Read error: Connection reset by peer]
kiki_lamb has quit [Ping timeout: 252 seconds]
Sehryn has quit [Ping timeout: 264 seconds]
marsjaninzmarsa has quit [Ping timeout: 250 seconds]
jhass has quit [Ping timeout: 248 seconds]
tobyx has quit [Ping timeout: 248 seconds]
Hien has quit [Ping timeout: 248 seconds]
Cork has quit [Ping timeout: 248 seconds]
ukd1_ has quit [Ping timeout: 276 seconds]
Zarthus has joined #ruby
knikolov has joined #ruby
krz has quit [Read error: Connection reset by peer]
marsjaninzmarsa has joined #ruby
kiki_lamb has joined #ruby
bosma has quit [Ping timeout: 248 seconds]
hackeron has joined #ruby
jhass has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
Hien has joined #ruby
felixr has quit [Client Quit]
ukd1 has joined #ruby
felixr has joined #ruby
quimrstorres has joined #ruby
PlasmaStar has joined #ruby
Cork has joined #ruby
cir0x1 has joined #ruby
bigkevmcd has quit [Ping timeout: 246 seconds]
bigkevmcd has joined #ruby
sharpmachine has joined #ruby
dblessing has joined #ruby
cir0x1 has left #ruby [#ruby]
cir0x has quit [Ping timeout: 276 seconds]
eGGsha has joined #ruby
mjuszczak has quit []
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scroff has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 265 seconds]
JDiPierro has joined #ruby
quimrstorres has quit [Ping timeout: 248 seconds]
dangerousdave has joined #ruby
<neanderslob>
hi everyone, I'm attempting to install the latest version of a rather popular ruby gem but am being told when I run bundle install that the given version doesn't exist
prettiestPony11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Scroff has joined #ruby
<sevenseacat>
is the command you ran, a big secret or something?
t0rrieri has joined #ruby
nateberkopec has joined #ruby
leonardoajim has quit [Quit: Be back later ...]
<apeiros>
same question regarding the error you get…
<ddv>
sexy gem?
zacstewart has joined #ruby
<neanderslob>
sevenseacat: trying to install version 1.10 of cancan
<sevenseacat>
there is no 1.10 version
sharpmachine has quit [Ping timeout: 244 seconds]
<sevenseacat>
latest is 1.6.10
<sevenseacat>
that would be why :)
<neanderslob>
sevenseacat: ok, that's consistent with what I'm finding :-P
<jhass>
and it works for 2.1 here, so just broken on 2.2
senayar has joined #ruby
davedev24_ has joined #ruby
Xzanron has quit [Quit: Leaving]
<adaedra>
rapha: unicode?
<jhass>
rapha: you look at it with puts instead of p (.inspect)
workmad3 has joined #ruby
<diegoviola>
jhass: ok
<jhass>
and don't realize they're in fact different
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cgrieger^away has quit [Ping timeout: 252 seconds]
<rapha>
adaedra: yes, Arabic text
casadei_ has joined #ruby
InternetFriend has joined #ruby
<rapha>
jhass: and yes, I .puts it into a file
quazimodo has quit [Ping timeout: 244 seconds]
freerobby has quit [Quit: Leaving.]
<jhass>
rapha: as said, they byte sequences will be different, due to invisible chars, things that look the same or something
<jhass>
*the
enebo has joined #ruby
cats has quit [Ping timeout: 252 seconds]
Kilo`byte has quit [Ping timeout: 256 seconds]
dhjondoh has quit [Quit: dhjondoh]
<rapha>
jhass: you were right, they look exactly the same, but are slightly different forms of the same letter. thank you!
<jhass>
copy paste the two "identical" words into your irb and do "foo".bytes
nertzy has quit [Quit: This computer has gone to sleep]
Xeago has quit [Remote host closed the connection]
Patrick_Bateman has joined #ruby
wlknsn has joined #ruby
linuxboytoo has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quimrstorres has joined #ruby
<linuxboytoo>
Hey all -- I had someone suggest using "%{}" instead of "#{}" for delayed interpolation however I am not finding it to actually work - anyone have input on this?
jpfuentes2 has quit [Read error: No route to host]
neoscene has joined #ruby
sigurding has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
neoscene has quit [Client Quit]
<diegoviola>
java might have a lot of this nlp stuff, maybe I can just use jruby then
fabrice31 has quit [Ping timeout: 265 seconds]
<yorickpeterse>
diegoviola: what are you trying to do?
hotpancakes has joined #ruby
<yorickpeterse>
Because that opener-project thing works via Ruby
chrissonar has quit [Remote host closed the connection]
<yorickpeterse>
(although we shell out to Python/Perl in a few cases, huehue)
msnyon has joined #ruby
* yorickpeterse
runs
scripore has quit [Quit: This computer has gone to sleep]
lokulin has joined #ruby
RegulationD has quit [Ping timeout: 248 seconds]
EagleDelta has joined #ruby
Al3ks has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
<Ox0dea>
yorickpeterse: For Lingua?
Feyn has quit [Quit: Leaving]
ksjdflsjldf has joined #ruby
<yorickpeterse>
Yeah no shit, what I meant was what specifically. Do they just want language detection, or the whole package of language -> pos -> opinion detection etc
<diegoviola>
yorickpeterse: just trying to get started with NLP
bigkevmcd has quit [Quit: Outta here...]
Scroff has quit [Remote host closed the connection]
<Ox0dea>
yorickpeterse: What? I was asking you to clarify why you were shelling out to Perl for NLP.
<yorickpeterse>
diegoviola: Ah, then opener might be a bit too much since the output is pretty raw
<yorickpeterse>
Ox0dea: oh right
<yorickpeterse>
heh
bigkevmcd has joined #ruby
<yorickpeterse>
Some researcher wrote the underlying code and thought that was a good idea
ksjdflsjldf has quit [Remote host closed the connection]
<yorickpeterse>
we've been replacing a bunch of parts with pure Ruby lately
<diegoviola>
boss said "Go learn some NLP, we need it for some project" and here I am
sevenseacat has quit [Quit: Me dun like you no more.]
JoshL_ has joined #ruby
Agoldfish has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has joined #ruby
JoshL has quit [Read error: Connection reset by peer]
<shevy>
hook hook hook it up!
tkuchiki has joined #ruby
<ccooke>
the downside of course is that some objects *can't* be converted to json
<ccooke>
or whatever
redteam has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<shevy>
gthank should be simple to write a gem that would modify the inspect output upon an include-event
tmtwd has quit [Ping timeout: 240 seconds]
penzur has quit [Quit: Leaving]
redteam has quit [Client Quit]
<shevy>
I envision the name for this gem be ... "viral_json" :)
pdoherty has joined #ruby
redteam has joined #ruby
<ccooke>
shevy: Nah, use objectspace to find every instance method called "inspect" and patch in a wrapper. It'll be easy!
jgpawletko has joined #ruby
axl__ has joined #ruby
oo_ has joined #ruby
dgutierrez1287 has joined #ruby
victortyau has joined #ruby
<shevy>
objectspace scares me
<jhass>
why not use tracepoint to catch the inspect calls actually happening only, much more efficient
<ccooke>
I had to use it recently. I love that it's *there*.
<ccooke>
but I think that every single time I've used it, I've added a comment including exactly how long this particular dirty hack should be tolerated
<shevy>
what did you have to do there? find some rogue objects?
Outlastsheep is now known as zz_Outlastsheep
duggiefresh has quit [Remote host closed the connection]
Soda has quit [Read error: Connection reset by peer]
ksjdflsjldf has quit [Quit: Leaving...]
but3k4 has joined #ruby
<gthank>
TracePoint looks like it would be **terribly** inefficient
iamninja has quit [Ping timeout: 252 seconds]
<gthank>
Isn't it adding (best-case) an operation to every single method invocation?
railsraider has quit [Ping timeout: 276 seconds]
joaomdmoura has quit []
mleung has quit [Quit: mleung]
<ccooke>
shevy: No. I had to patch an object to infect its exception handling with a .ignore method
joaomdmoura has joined #ruby
<shevy>
hahaha
<shevy>
that's actually great :)
Xeago has quit [Remote host closed the connection]
<ccooke>
A couple of weeks and *that* hack will be deleted :-)
dgutierrez1287 has quit [Remote host closed the connection]
eGGsha has quit [Read error: Connection reset by peer]
dopie has joined #ruby
dgutierrez1287 has joined #ruby
jhwhite has joined #ruby
<shevy>
should be stored in "best of objectspace modifications - top 20"
<shevy>
I am sure there will be lots more competition for it ccooke!
Xeago has joined #ruby
jas02 has quit [Quit: jas02]
<ccooke>
basically, we're building a complex infrastructure involving third party code and parts of it aren't there yet. I implemented a dirty hack to replace two web services that aren't there with the ability to recursively pull stuff from a git repo, but the object I could add this to was a cleanroom-style protected DSL
JoshL_ has quit []
<shevy>
gthank tracepoint stuff confuses me... last time I tried it, was through pickaxe playing with set_trace_var I think... and there is also set_trace_func? or something like that... when I used global variables less and less, it lost a lot of its appeal to continue to play with it
jas02 has joined #ruby
bodgix_wrk has joined #ruby
JoshL has joined #ruby
mistermocha has joined #ruby
anmeng has joined #ruby
bbeer has joined #ruby
kfpratt has joined #ruby
<bbeer>
Hello, anyone here. I'm trying to setup gitlab and I'm failing on the mysql "gem". I don't know anything about ruby, so....help?
JoshL has quit [Client Quit]
<ccooke>
said DSL would not allow you to add a method to it, because it would only call methods defined in the DSL's core file. Solution? Patch in .ignore, catch the no method exception, ignore it. :-)
<ccooke>
shevy: This fact says a lot - good and bad - about Ruby: I had applied this, tested it and got it working within five minutes of deciding this was the best answer. It took me longer to write the comment explaining the why and when this should be deleted.
<bbeer>
Could not find mysql2-0.3.16 in any of the sources
mary5030 has joined #ruby
<shevy>
wait... never gonna let you go
<shevy>
isn't that rick rolling?
<ccooke>
yes
anmeng has left #ruby [#ruby]
tkuchiki has joined #ruby
<shevy>
do I dare to click on such an URL :D
<ccooke>
the theme is used in the code :-)
aryaching has joined #ruby
<shevy>
bbeer hmm so it's also related to bundler; I am sure someone else can help you with bundler, let me see if that mysql2 gem exists though
<ytti>
is this right tool for the job, or can someone recommend another tool
renderful has quit [Ping timeout: 244 seconds]
<shevy>
you can click on the "0.3.16" part and download it there, then you have the .gem file, and perhaps you can do "gem install *.gem", or just pass the specific version to "gem" itself... gem install mysql2 -v 0.3.16 or so I think. but whether this works with bundler or not I have no idea, I have not been able to demystify bundler yet
acke has quit [Remote host closed the connection]
sigurding has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has quit [Quit: This computer has gone to sleep]
solars has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bbeer>
shevy: All I see in the Gemfile is :gem "mysql2", group: :mysql
<bbeer>
I'm so confused.
jeanjack has left #ruby [#ruby]
Xeago has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Burgestrand]
sepp2k has joined #ruby
<shevy>
yeah no idea sorry. The most recent version is 0.3.18 so I am not sure why it wants 0.3.16. jhass is a bundler expert, perhaps he knows
sarkyniin has joined #ruby
fella5s has quit [Read error: Connection reset by peer]
<bbeer>
shevy: it still says mysql2 is not part of the Gemfile...
<bbeer>
:(
<jhass>
bbeer: bundle -v?
<bbeer>
segfault
<shevy>
there also is #bundler by the way in the event that jhass sleeps but I just see he does not sleep!
<jhass>
pardon, sudo -u git -H bundle -v
linuxboytoo has quit [Remote host closed the connection]
<bbeer>
I might have another version of ruby installed. I thought I deleted it. Is there a way to remove ruby?
doertedev has quit [Ping timeout: 264 seconds]
<bbeer>
I had to do a source build.
livathinos has joined #ruby
<jhass>
a sudo make install is not easy to undo, no
linuxboytoo has joined #ruby
livathinos is now known as livathinos|away
<jhass>
hence why it's discouraged
livathinos|away is now known as livathinos
linuxboytoo has quit [Read error: Connection reset by peer]
failshell has quit []
linuxboytoo has joined #ruby
Xeago has joined #ruby
yardenbar has quit [Ping timeout: 252 seconds]
<shevy>
couldn't he do a make uninstall?
genpaku has quit [Ping timeout: 250 seconds]
yokel has quit [Ping timeout: 246 seconds]
<DefV>
shevy: if make uninstall is implemented
allomov_ has quit [Remote host closed the connection]
j_mcnally has joined #ruby
balazs has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheBrayn is now known as TheBrany
<shevy>
I trust my japanese ruby hackers!
j_mcnally has quit [Max SendQ exceeded]
TheBrany is now known as TheBrayn
yokel has joined #ruby
<bbeer>
shevy: Make uninstall is not implemented.
j_mcnally has joined #ruby
rippa has joined #ruby
<shevy>
:(
genpaku has joined #ruby
j_mcnally has quit [Max SendQ exceeded]
<shevy>
ccooke lol I see it now... module NeverGonnaLetYouDown
j_mcnally has joined #ruby
<jhass>
bbeer: so, what about my question? what's your bundler version?
<ccooke>
shevy: indeed
<ccooke>
shevy: it's quite nicely written, for what it does.
oo_ has quit [Remote host closed the connection]
allomov has joined #ruby
Xeago has quit [Remote host closed the connection]
<ccooke>
shevy: Definitely an argument for or against Ruby ;-)
gambl0re has quit [Ping timeout: 246 seconds]
chussenot has joined #ruby
Hounddog has quit [Remote host closed the connection]
<bbeer>
jhass: It segfaulted, so I deleted the ruby in /usr/local so the latest in /usr/ would work. But now it says /usr/local/ items doesn't exit.
balazs has quit [Ping timeout: 256 seconds]
<bbeer>
jhass: I'm rebuilding 2.1.6 with --prefix=/usr/local maybe that will overwrite the old install?
fabrice31 has quit [Remote host closed the connection]
centrx has joined #ruby
Xeago has joined #ruby
serivich has joined #ruby
<havenwood>
There are: make clean && make distclean
jhack has joined #ruby
<havenwood>
shevy: Sounds like a name for a supervisor gem.
<shevy>
bbeer yeah, if you omit --prefix, then it will default to /usr/local
momomomomo has joined #ruby
<jhack>
jhass: sasl auth?
<shevy>
bbeer but you may have one ruby at /usr/bin/ruby and then one at /usr/local/bin/ruby
abuzze has quit [Remote host closed the connection]
<bbeer>
shevy: I cant' complete the install. I'm out of space.
<shevy>
bbeer delete something you don't need!
<ght>
I'd like to add a new key, "execute_push", to each of those "tag" entries when they're stored in the array. It's temporary so it doesn't need to be written to the DB.
<ght>
For some reason, the syntax for doing such is escaping me.
yardenbar has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhack has quit [Ping timeout: 256 seconds]
<jhass>
user_profile["mysql_client"] - that looks sooo wrong...
tkuchiki has quit [Remote host closed the connection]
<ght>
Don't worry about that part, that works.
<ljarvis>
i always store my db clients in my user_profile
<ght>
I'm worried about adding the key.
linuxboytoo has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 240 seconds]
<jhass>
ght: conceptually wrong, not technically
linuxboytoo has joined #ruby
<ljarvis>
also using interpolation in an sql query = bad
<ght>
Werd, so, in that .each loop for populating the user_profile["tags"] array with the entries from the table, it's working fine, but is there any way on each tag entry to add an "execute_push" boolean value?
<ght>
On a per array entry, temporary basis.
momomomomo has quit [Quit: momomomomo]
<ght>
I feel like there is but the technique is escaping me for some reason.
<bbeer>
shevy: I need it all. It's a new server!
InternetFriend has joined #ruby
nerium has joined #ruby
<jhass>
I hesitate to answer it, it sounds like doing the design mistake over and over again ...
christiandsg has joined #ruby
<ght>
lol, dude, it works otherwise.
<ght>
So does anyone know?
j_mcnally has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
<ght>
Ok, to keep you placated, I'll bite. What is the design mistake exactly in the code?
allomov has quit [Remote host closed the connection]
<shevy>
ght I don't think I understood it. can't you just simply add more data to your array?
adamski2600 has quit [Remote host closed the connection]
<ght>
I add a reference to the mysql_client and pass it around functions because I execute queries in various sections.
davedev24_ has joined #ruby
but3k4 has joined #ruby
<shevy>
if your current array is [['bananas','apples','peaches']] you could turn it into a [['bananas','yummy'],['apples','totally awesome'],['peaches','allergic to peaches']]
<ght>
shevy: It's the .each loop. I'm doing myquery.tags.each do |tag|; myarray << tag; end;
<shevy>
though that sounds more like a Hash
<ght>
Essentially
<jhass>
ght: user_profile, pretending to or being a hash should know shit about your database connection, it should only cater about the user profile data
<shevy>
isn't that just a case for .map ?
jhack has joined #ruby
<ght>
ok jhass, thanks for the tip.
<ght>
shevy: Might be, I rarely use .map, I need to study that method more.
<shevy>
I mean that just looks like a classical example
<jhass>
ght: anyway... so what's tag.class that you think you can add more random attributes to it?
<shevy>
you iterate over a collection, then modify parts of it via a << method call
mistermo_ has quit [Ping timeout: 264 seconds]
riotjones has quit [Remote host closed the connection]
<ght>
user_profile["tags"] is an array
<ght>
[]
linuxboytoo has quit [Ping timeout: 264 seconds]
<jhass>
yeah, not what I asked because not what you want stick stuff to
tmtwd has joined #ruby
werelivinginthef has quit [Read error: Connection reset by peer]
jhack has quit [Remote host closed the connection]
werelivinginthef has joined #ruby
<ght>
What?
<shevy>
>> array = %w( a b c ); array.map {|l| l+l.succ }
<jhass>
and Object is the only thing I can be fairly sure about that is included into whatever user_profile["mysql_client"] returns
programmerq has joined #ruby
<ght>
Ok, thanks for the help, appreciated.
momomomomo has quit [Client Quit]
<jhass>
I also hesitate on going on a hunt into what I guess would be the right docs to figure out what tag is if it takes you 15 seconds to find out by simply doing p tag.class
Azulinho has joined #ruby
bungoman has quit [Remote host closed the connection]
bungoman has joined #ruby
chouhoulis has joined #ruby
spider-mario has joined #ruby
Rickmasta has joined #ruby
s2013 has joined #ruby
cochise_ has joined #ruby
cochise has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 246 seconds]
khebbie has joined #ruby
arturaz has quit [Ping timeout: 265 seconds]
Xeago has quit [Remote host closed the connection]
sharpmachine has joined #ruby
Zai00 has quit [Quit: Zai00]
AlphaAtom has joined #ruby
AlphaAtom has quit [Client Quit]
iamse7en has joined #ruby
txdv has left #ruby [#ruby]
rqde has joined #ruby
Cache_Money has joined #ruby
<rqde>
Hey, I'm trying to deploy my first ruby app to openshift, but I've run into some problems. Help?
DoubleMalt has quit [Remote host closed the connection]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
shevy: /\A\d/
icflournoy has joined #ruby
nerium has quit [Quit: nerium]
<jhack>
Is there a way where can i have sasl encryption with smuxi?
<jhass>
better question for #freenode
podman has joined #ruby
bungoman has joined #ruby
<shevy>
jhack and jhass... so similar nicks
<jhass>
sasl isn't encryption btw, it's authentication. It just requires a TLS connection
<eam>
what's the right way to make a string safe to print on a terminal?
phutchins has joined #ruby
<jhass>
depends on the terminal I'd guess
<jhass>
so, limit it to ascii?
<eam>
let's say standard ansi-supporting vt100
<shevy>
yay, colours!
jhack has quit [Client Quit]
<eam>
jhass: what if I want to support unicode?
<eam>
(because yeah, right now my stopgap is & 0x7F)
jhack has joined #ruby
armyriad has joined #ruby
Agoldfish has quit [Quit: G'Bye]
danman has joined #ruby
andrewstewart has left #ruby [#ruby]
anisha has quit [Quit: Leaving]
nerium has joined #ruby
sdothum has joined #ruby
symbol_ has joined #ruby
kies^ has joined #ruby
okdas has quit [Ping timeout: 256 seconds]
woodennails has joined #ruby
bhuvan_aurora has quit [Ping timeout: 250 seconds]
niemcu has quit [Ping timeout: 255 seconds]
bhuvanaurora has quit [Ping timeout: 248 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
msgodf has quit [Ping timeout: 246 seconds]
amclain has joined #ruby
symbol has quit [Ping timeout: 256 seconds]
dumdedum has quit [Ping timeout: 246 seconds]
okdas has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
arturaz has joined #ruby
bungoman has quit [Remote host closed the connection]
icebourg has joined #ruby
hotpancakes has joined #ruby
icebourg has quit [Max SendQ exceeded]
<iamse7en>
using Devise, i want to add a time_zone_select for :account_update but not :sign_up. I added the field to registrations/edit and put it in strong parameters for :account_update. however, when I do a sign up, it has error "Time zone is not included in the list". Time Zone isn't in sign_up because I don't want it there. how do I make it so it's not required for sign_up?
<shevy>
[Silence in the channel after eam's unicode question.]
<adaedra>
?rails iamse7en
<ruboto>
iamse7en, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
warweasle has quit [Read error: Connection reset by peer]
icebourg has joined #ruby
noname1 has quit [Ping timeout: 256 seconds]
linuxboytoo has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
werelivinginthef has quit [Read error: Connection reset by peer]
werelivinginthef has joined #ruby
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has quit [Read error: Connection reset by peer]
adamski2600 has quit [Remote host closed the connection]
bmurt has joined #ruby
baweaver has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<eam>
well, I actually do want to allow the non-ascii characters
<eam>
it's ansi escape sequences I'm concerned with
<Senjai>
Good morning ruby
<ccooke>
eam: ansi escape sequences are by definition valid for a terminal, though
InternetFriend has joined #ruby
<eam>
right
<eam>
just like html sequences are by definition valid for a web page, but there are often good reasons to filter or escape them ;)
gambl0re has joined #ruby
<eam>
this is an untrusted input scenario
<ccooke>
Right
__butch__ has joined #ruby
<ccooke>
That's not the easiest thing to do
<eam>
so & 0x7F keeps it ascii just fine, but then I can't support other languages
<ccooke>
the *simplest* thing is to escape the escape characrer
<ccooke>
There *are* other sequences, but they are rare
<ccooke>
and hardware-dependant
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ccooke>
and since 0x1b is never printable, it helps
<eam>
well, just removing 0x1b is going to break unicode where that byte appears as part of a character, right?
okdas has quit [Ping timeout: 256 seconds]
<ccooke>
no, not if you remove it sensibly
joonty has quit [Quit: joonty]
<ccooke>
work on each character, not each byte
<eam>
hm, that's probably adequate
<ccooke>
if your string is encoded as unicode, there won't be an 0x1b in it unless there's actually an escape
towski_ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<ccooke>
you should also remove anything from 0x00-0x1f and 0x7f
bigkevmcd has quit [Read error: Connection reset by peer]
livathinos has quit []
<ccooke>
the "printable" range of ANSI is 0x20-0x7e
Xeago has joined #ruby
<eam>
I suppose another complication is I don't know the encoding of this string ;)
acke has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<Ox0dea>
ccooke: From a philosophical standpoint, it's difficult to say whether 0x20 should be considered "printable".
<ccooke>
depending on what you need, you could also whitelist 0x09 (tab), 0x0a (newline)
<ccooke>
Ox0dea: this is true, but from a *mechanical* standpoint it is definitely an expected character if you want sensible text :p-)
sigurding has quit [Quit: sigurding]
eGGsha has joined #ruby
<ccooke>
eam: that is a much harder problem to solve.
<eam>
ccooke: specifically, I want to print out /proc/*/cmdline on linux, for various other processes, and I don't want an attacker to mess with my terminal
<eam>
eg by putting an arg into a command with an escape sequence
<jhass>
eam: [[:print:]] perhaps?
<eam>
jhass: oooh
okdas has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
<ccooke>
jhass: nice.
<ccooke>
that'll not sort out the encoding issue
railsraider has joined #ruby
momomomomo has joined #ruby
<eam>
but, that depends on having a valid encoding, right? I guess what I'll do is try system default first, then fall back to 7bit clean bytes?
<jhass>
never checked whether that considers the ANSI codes printable though
<ccooke>
however, for /proc/*/cmdline... get the default system encoding, force the string to be encoded as that, then print it safely. worst case scenario, you'll have a bit of damage.
RegulationD has quit [Remote host closed the connection]
Lucky_ has joined #ruby
khebbie has joined #ruby
blaines_ has quit [Ping timeout: 264 seconds]
Spami has quit [Quit: This computer has gone to sleep]
revath has quit [Read error: Connection reset by peer]
Igorshp has quit [Remote host closed the connection]
revath has joined #ruby
grey_beard has quit [Ping timeout: 276 seconds]
k3asd` has joined #ruby
k3asd`_ has joined #ruby
stamina has quit [Quit: WeeChat 1.2]
jonathanwallace has quit [Quit: Leaving.]
blaines has joined #ruby
grey_beard has joined #ruby
victortyau has quit [Quit: Leaving]
icebourg has quit []
JakFrist has joined #ruby
Ilyas has joined #ruby
mistermocha has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anaeem1__ has quit [Remote host closed the connection]
Agoldfish has joined #ruby
victortyau has joined #ruby
nateberkopec has quit [Quit: Leaving...]
bricker has joined #ruby
kies^ has quit [Ping timeout: 240 seconds]
riotjones has joined #ruby
momomomomo has quit [Quit: momomomomo]
gagrio has quit [Ping timeout: 265 seconds]
Zai00 has quit [Quit: Zai00]
khebbie has quit [Ping timeout: 244 seconds]
Zai00 has joined #ruby
hotpancakes has quit [Remote host closed the connection]
senayar has quit []
revath has quit [Quit: Leaving.]
benlieb has joined #ruby
Zai00 has quit [Client Quit]
duggiefresh has quit [Remote host closed the connection]
revath has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
scripore has joined #ruby
arturaz has quit [Ping timeout: 256 seconds]
nateberkopec has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lee-jon has joined #ruby
c_nick has joined #ruby
zendrix has joined #ruby
Spami has joined #ruby
zendrix has quit [Read error: Connection reset by peer]
cmisenas has joined #ruby
zendrix has joined #ruby
Igorshp has joined #ruby
jhack_ has joined #ruby
jhack__ has joined #ruby
jhack99 has joined #ruby
quazimod1 has joined #ruby
jhack99 has quit [Remote host closed the connection]
jhack411 has joined #ruby
jhack411 has quit [Remote host closed the connection]
djbkd has joined #ruby
jhack__ has quit [Remote host closed the connection]
jhack_ has quit [Remote host closed the connection]
jhack has quit [Remote host closed the connection]
jhack has joined #ruby
ljt has joined #ruby
symbol_ has quit [Quit: WeeChat 1.1]
willhumphreys has quit [Ping timeout: 250 seconds]
thiagovsk has joined #ruby
baweaver has quit [Remote host closed the connection]
jpfuente_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Alayde has joined #ruby
revath has quit [Quit: Leaving.]
revath has joined #ruby
nertzy has quit [Read error: Connection reset by peer]
Xeago has quit [Read error: Connection reset by peer]
nertzy has joined #ruby
NeverDie has joined #ruby
intinig has quit []
bronson has joined #ruby
railsraider has quit [Quit: railsraider]
mistermocha has quit [Read error: Connection reset by peer]
j_mcnall_ has joined #ruby
spider-mario has quit [Remote host closed the connection]
hahuang65 has joined #ruby
mistermocha has joined #ruby
bb010g has joined #ruby
j_mcnally has quit [Ping timeout: 250 seconds]
bodgix_wrk has quit [Quit: Leaving...]
bronson has quit [Ping timeout: 264 seconds]
linuxboytoo has quit [Quit: Leaving...]
bruno- has quit [Quit: Lost terminal]
Xeago has joined #ruby
revath has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
SCHAAP137 has joined #ruby
revath has joined #ruby
t_ has quit [Remote host closed the connection]
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #ruby
willhumphreys has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
jakobhans has quit []
AlphaAtom has joined #ruby
kerrizor has joined #ruby
adamski2600 has joined #ruby
jaroslav has left #ruby [#ruby]
victortyau has quit [Ping timeout: 252 seconds]
t_ has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
pengin has joined #ruby
yardenbar has joined #ruby
bruno- has quit [Quit: Lost terminal]
yardenbar has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
User458764 has joined #ruby
momomomomo has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
jerius has quit [Quit: /quit]
bungoman has joined #ruby
momomomomo has quit [Client Quit]
ljt has quit [Read error: Connection reset by peer]
lee-jon has left #ruby [#ruby]
JoshL has quit [Ping timeout: 265 seconds]
willhumphreys has quit [Ping timeout: 264 seconds]
livathinos has joined #ruby
christiandsg has joined #ruby
bocelli202 has joined #ruby
shadoi has joined #ruby
bhorn1 is now known as bhorn1|lunchz
jerius has joined #ruby
<Senjai>
What's the canonical way to determine if an argument is a class? E.g when a method needs to accept both MyClass and :my_class
darkf has quit [Quit: Leaving]
j_mcnally has joined #ruby
bocelli202 has quit [Remote host closed the connection]
<centrx>
Senjai, Sounds like you want a case statement that tests against MyClass or Symbol
slumos has left #ruby [#ruby]
<centrx>
Senjai, or if x.is_a?(MyClass)
jpfuentes2 has joined #ruby
<Senjai>
c_nick: MyClass can by any class
<Senjai>
centrx: **
<centrx>
oh, all classes are of type Class right?
nerium has quit [Quit: nerium]
<Senjai>
At the moment I'm at defined?(thing) == "constant"
j_mcnall_ has quit [Ping timeout: 265 seconds]
balazs has joined #ruby
<jhass>
.is_a? Class ?!
<Senjai>
For some reason I thought that wouldn't work.
victortyau has joined #ruby
<jhass>
or .respond_to? :new for some duck typing
kobain has quit [Ping timeout: 252 seconds]
<Senjai>
In this case I could probably ductype on #activate!
duggiefresh has joined #ruby
<Senjai>
but yeah, that'd work
<Senjai>
Essentially if its a symbol, I need to constantize it, and if its a Class, I can do the ducktyping
khebbie has joined #ruby
khebbie has quit [Client Quit]
hotpancakes has quit [Remote host closed the connection]
notalanturing has joined #ruby
dented42 has joined #ruby
balazs has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 265 seconds]
jtdoncas has joined #ruby
<Ox0dea>
Senjai: const_get(arg.to_sym) would cover both cases.
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
enders has joined #ruby
RegulationD has joined #ruby
jonathanwallace has joined #ruby
victortyau has quit [Max SendQ exceeded]
victortyau has joined #ruby
<Senjai>
Ox0dea: I have some silly complexities that might prevent that. For example if it's a symbol, I need to constantize under a specific namespace.
<Senjai>
E.g. :my_class should resolve to Namespace::Something::MyClass
Igorshp has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 245 seconds]
axl__ is now known as axl_
JDiPierro has joined #ruby
Azulinho has quit [Quit: Leaving]
<centrx>
It shall work, with the Power of Ruby!
yardenbar has joined #ruby
khebbie has joined #ruby
khebbie has quit [Client Quit]
bosma_ is now known as bosma
pullphinger has joined #ruby
<Senjai>
Eh, I'm not really big on this metaprogramming stuff
bungoman has quit [Remote host closed the connection]
<Senjai>
I dont really like having to write code like this
hotpancakes has joined #ruby
bungoman has joined #ruby
dangerousdave has joined #ruby
revath has quit [Quit: Leaving.]
revath has joined #ruby
Jackneill has joined #ruby
pengin has quit [Remote host closed the connection]
ht__ has joined #ruby
griffindy has quit [Read error: Connection reset by peer]
AlphaAtom has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
hotpancakes has quit [Ping timeout: 256 seconds]
<shevy>
:)
kobain has joined #ruby
livathinos has quit []
howdoi has quit [Quit: Connection closed for inactivity]
lessless has joined #ruby
<Ox0dea>
>> ([Object] + %w[Resolv DNS Resource IN A]).reduce(:const_get)
<ruboto>
Ox0dea # => uninitialized constant Resolv (NameError) ...check link for more (https://eval.in/395057)
<Ox0dea>
>> require 'resolv'; ([Object] + %w[Resolv DNS Resource IN A]).reduce(:const_get)
<lessless>
folks, maybe somebody can help to generate signed url for s3?
ht__ has quit [Client Quit]
numberten has left #ruby [#ruby]
sbhatore has joined #ruby
foooobear has quit [Quit: (null)]
towski_ has quit [Remote host closed the connection]
ht__ has joined #ruby
<rqde>
Im a first time programmer trying to deploy a ruby app on OpenShift (this one: https://github.com/rqde/soundboard-demo/), but when I do I get "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly." - Is that a fault of mine?
bungoman has quit [Remote host closed the connection]
<jhass>
Ox0dea: .inject(Object, :const_get), no?
revath has quit [Read error: Connection reset by peer]
sbhatore is now known as jaimessi
wookiehangover has quit [Ping timeout: 248 seconds]
<jhass>
rqde: you'll want to have a look at the log
hmnhf has quit [Quit: Konversation terminated!]
abuzze has joined #ruby
hmnhf has joined #ruby
revath has joined #ruby
<jhass>
rqde: one issue might be that your rack version is too new
Alina-malina has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 240 seconds]
gambl0re has joined #ruby
kith has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
<diegoviola>
iszak: I don't think my boss will allow me to install Linux on the host
centrx has quit [Quit: Shutting down, Please wait...]
<iszak>
diegoviola: no good, what's your setup? terminal multiplexer? shell? etc.
bougyman has quit [Ping timeout: 248 seconds]
jinie has joined #ruby
aef has joined #ruby
zendrix has quit [Remote host closed the connection]
anaeem1 has joined #ruby
Alina-malina has joined #ruby
mhib has joined #ruby
allomov has joined #ruby
gdakram has quit [Quit: gdakram]
bougyman has joined #ruby
mistermocha has joined #ruby
zendrix has joined #ruby
bruno- has joined #ruby
<diegoviola>
iszak: i3wm with termite/bash/tmux/vim
jenrzzz has quit [Ping timeout: 256 seconds]
<diegoviola>
I miss a good graphics file manager sometimes
<diegoviola>
I was using KDE a few months ago
drewo has quit [Ping timeout: 276 seconds]
<Ox0dea>
diegoviola: Why?
snockerton has quit [Quit: Leaving.]
Lucky_ has quit [Ping timeout: 244 seconds]
mistermocha has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
<diegoviola>
what do you mean why?
<diegoviola>
why what?
baweaver has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
snockerton has joined #ruby
mhib has quit [Quit: Leaving]
maletor has quit [Quit: Computer has gone to sleep.]
A205B064 has joined #ruby
MVPhelp has quit [Remote host closed the connection]
MVPhelp has joined #ruby
icebourg has quit []
<Ox0dea>
diegoviola: If you miss having a graphical file manager, why don't you just use one?
<weaksauce>
is $RUBY_VERSION always set?
<Ox0dea>
Yes.
scripore has joined #ruby
<weaksauce>
I am calling ruby from vim and that variable seems to not get set correctly and it is nil
Channel6 has joined #ruby
<Ox0dea>
diegoviola: Clicking this and this and right-clicking that and making sure you've caught everything that matches a certain pattern is much better than learning basic regular expressions. :)
hahuang65 has joined #ruby
maletor has joined #ruby
<Ox0dea>
weaksauce: Ah, sorry, RUBY_VERSION is a constant available only from within Ruby; it's not a global or environment variable.
<weaksauce>
yeah. I was using it from within ruby
<weaksauce>
get a nil error just to see if the code was actually being called
<Ox0dea>
weaksauce: Nix the $.
<Ox0dea>
Global variables and constants are different things.
<diegoviola>
Ox0dea: but which one would I use in i3?
t0rrieri has joined #ruby
<diegoviola>
if I use a file manager I'd like to use a DE but when using a DE I miss i3wm
<diegoviola>
catch 22
<weaksauce>
ah nice. that worked. yeah i know that they are different but why does this work from the command line but not from inside a system call from vim?
<weaksauce>
x=`ruby -e "puts '$RUBY_VERSION'"`
<diegoviola>
:(
v4n has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 276 seconds]
<shevy>
vim sucks!
bruno- has quit [Ping timeout: 256 seconds]
<diegoviola>
shevy: no
<Ox0dea>
weaksauce: Erm, I can't imagine that actually worked?
kies^ has quit [Ping timeout: 256 seconds]
lee-jon has joined #ruby
<shevy>
works in irb!
<Ox0dea>
weaksauce: The double quotes expand $ variables at the shell, so it must be the case you have a RUBY_VERSION environment variable.
<shevy>
:)
<weaksauce>
perhaps yeah
jonathanwallace has joined #ruby
<Ox0dea>
It must be so. :)
konsolebox has quit [Ping timeout: 264 seconds]
<nofxx>
can't think of many things that sucks more than vim... lost an hour of my life 10 ys ago. Still can remember the agony.
<Ox0dea>
You people are silly.
<weaksauce>
nofxx wow a whole hour?!?!
<shevy>
Emacs made me a better person.
<Ox0dea>
shevy: Which is your favorite Lisp?
warweasle has joined #ruby
<nofxx>
weaksauce, hope not. Swear was the only time in my life I punched the screen.
ESpiney_ has joined #ruby
<shevy>
The unwritten kind of Lisp.
<nofxx>
luckly it was a crt
neohunter has quit [Ping timeout: 248 seconds]
<warweasle>
Liiiisp?
<diegoviola>
shevy: Emacs is a good OS only lacking a good text editor
cmisenas has quit [Quit: cmisenas]
<Ox0dea>
shevy: So you use an editor that you don't even know how to customize?
<nofxx>
diegoviola, old bad joke but ok
<weaksauce>
Ox0dea yeah there is an environment variable that was interfering with my best laid plans
<diegoviola>
shevy: but there's evil-mode now, so good for you
<shevy>
I don't use emacs
ESpiney_ has quit [Remote host closed the connection]
<Ox0dea>
weaksauce: Alas, we are but men.
<diegoviola>
nofxx: lol ikr
<warweasle>
Student: Does emacs have Buddha nature? Master: Why the hell not. It has everything else.
<diegoviola>
nofxx: emacs is nice, don't get me wrong
J4D has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
Aryasam has quit [Read error: No route to host]
aryaching has joined #ruby
<warweasle>
Question about modernizer 2.0.2.sudo -u git -H bundle install --deployment --without development test postgres aws
zendrix has quit [Remote host closed the connection]
<nofxx>
it's simple: I change my editor, not the other way around. Those crazy emacs keybinding are like that for you to change, not to use em ;)
<warweasle>
Could not find modernizr-2.6.2 in any of the sources
<warweasle>
And I can't download the damn thing either.
ESpiney has quit [Ping timeout: 240 seconds]
<nofxx>
diegoviola, thing with emacs is that you need a) find a good .emacs.d repo to start or b) give it a month to write yours
lee-jon has quit [Quit: lee-jon]
lee-jon has joined #ruby
lee-jon has left #ruby [#ruby]
<nofxx>
those inspired by mac/textmate RUBY guys are your best bet.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mistermocha has quit [Read error: Connection reset by peer]
<warweasle>
Can anyone describe how modernizer-2.6.2 is MISSING FROM RUBY? Why would you do that?
<nofxx>
WarWeasle, if that version ever was it was yanked
<nofxx>
check the site
<warweasle>
nofxx: Yes. I've looked everywhere and I can't download it to install it.
<izzol>
hmm, I'm getting Dnsruby::ServFail.
momomomomo has joined #ruby
<izzol>
But not sure why:(
mistermocha has joined #ruby
kies^ has joined #ruby
<izzol>
I'm querying google NS 8.8.8.8 and all works fine. The thing is sometimes I'm getting this Dnsruby::ServFail.
<izzol>
I don't think that there is a problem in google ;P
<izzol>
eam: I'm sure. I'm running it from the Datacenter so I doubt that there is any packetloss. Anyway our monitoring is saying that network is fine. hmm.
<diegoviola>
nofxx: same with vim I think, except that vim is already half way useful without a ~/.vimrc
Jackneill has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 256 seconds]
<eam>
izzol: mtr to 8.8.8.8?
<eam>
"the network" is never fine, the internet's always a variable place
<warweasle>
Antiarc: I just had a thought: I swiched gitlab to the master branch
jenrzzz has joined #ruby
<eam>
izzol: you could also instrument and look for patterns in the errors
sharpmachine has quit [Remote host closed the connection]
Mendenhall has joined #ruby
scripore has joined #ruby
jpfuentes2 has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
revath has quit [Ping timeout: 255 seconds]
drewo has joined #ruby
spider-mario has joined #ruby
lkba_ has quit [Remote host closed the connection]
scripore has quit [Client Quit]
mjuszczak has joined #ruby
foooobear has quit [Quit: (null)]
revath has joined #ruby
jgpawletko has joined #ruby
workmad3 has joined #ruby
mjuszczak has quit [Client Quit]
Papierkorb has joined #ruby
<nofxx>
diegoviola, the diff is that vim will continue half useful
multi_io has quit [Ping timeout: 265 seconds]
<Ox0dea>
nofxx: Pfft.
hahuang65 has joined #ruby
enders has quit [Read error: Connection reset by peer]
mando has quit [Ping timeout: 264 seconds]
<diegoviola>
nofxx: vim is very capable editor, what are you talking about?
multi_io has joined #ruby
<diegoviola>
but it's not like emacs that it's an editor and also a kitchen sink
<weaksauce>
and a clawhand
<diegoviola>
if you want the editor and the kitchen sink integrated with it, sure, vim is not capable... if all you want is a text editor, vim is good enough
revath has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
ballPointPenguin has left #ruby [#ruby]
<adaedra>
^
chouhoulis has quit [Ping timeout: 256 seconds]
<warweasle>
diegoviola: Emacs is a programming language with an editor built in. It gets rediculous when you use slime with common lisp;.
baweaver has quit [Remote host closed the connection]
jmignault has joined #ruby
<diegoviola>
WarWeasle: yeah I know
<Ox0dea>
diegoviola: If all you want is a text editor, Vim is far more than "good enough".
<diegoviola>
Ox0dea: sure
mjuszczak has joined #ruby
<Ox0dea>
Most people don't just want to edit text, though, and it's really quite easy to turn Vim into "more than a text editor".
<adaedra>
“but it is so hard to use” – Sublime Text average user
<Ox0dea>
Not the tool's fault.
mando has joined #ruby
mjuszczak has quit [Read error: Connection reset by peer]
<diegoviola>
vim is not hard to use at all
zendrix has quit []
<Antiarc>
it is kind of amazing to me that it's 2015 and we're still squabbling over text editors
<slash_nick>
why everyone doesn't just use "ed", i'll never understand
<diegoviola>
some people try to use vim without understanding that it's a modal editor, and I think that's why they find it hard to use
<diegoviola>
because they try to use it like other editors
scripore has joined #ruby
<Ox0dea>
diegoviola: Quick, name all the modes. :)
<Antiarc>
"it doesn't conform to my expectations" is a pretty standard definiton of "hard to use" for the average user, to be fair. Not just in editors, but in all UX.
<Ox0dea>
adaedra: Select.
<Antiarc>
And I say that as a vim user.
<adaedra>
Ox0dea: that's visual, no?
<Ox0dea>
It's not.
<adaedra>
Oh
chussenot has joined #ruby
<Antiarc>
vim is really good at subverting your expectations :P
<adaedra>
vim is really good imo, and I know that I use it at such a low level of its possibilities :x
tomphp has joined #ruby
acke has quit [Remote host closed the connection]
pengin has quit [Remote host closed the connection]
<Ox0dea>
Neovim's :terminal command = <3
<diegoviola>
"Why is not deleting my text when I keep pressing backspace key. This editor sucks, I'm going back to sublime." -- Averga sublime text user when using vim in normal mode
<diegoviola>
average*
felixr has joined #ruby
<adaedra>
NeoVim's usable now?
<Senjai>
Ox0dea: we have one neovimmer that is all crazy about that
<Senjai>
Ox0dea: The rest of us just use vim tmux navigator and vim dispatch
<Ox0dea>
Senjai: Yep, I made the switch from precisely that setup.
freerobby has quit [Quit: Leaving.]
<Ox0dea>
I still use <C-\>, but now it's to switch to the most recently active terminal buffer and back again.
freerobby has joined #ruby
bluOxigen has joined #ruby
<diegoviola>
sorry about that, I didn't want to offend any sublime users :)
<Senjai>
You totally did
<Senjai>
that's the whole point of your statement
<Senjai>
not that i use sublime
<adaedra>
diegoviola: you're not the first one ;)
Scroff has quit [Remote host closed the connection]
gambl0re has quit [Remote host closed the connection]
dblessing has quit [Ping timeout: 240 seconds]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
felixr has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Lucky_ has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
mike___1234 has quit [Ping timeout: 252 seconds]
<sphex>
hey. since an object's singleton class has the object's class as its superclass, can one say that method lookups are done by recursing throught the singleton class (and thus only incidentally reach the object's class), or are the lookup rules more complicated?
symm- has quit [Read error: Connection reset by peer]
<Ox0dea>
sphex: Your initial assumption was invalid.
scripore has quit [Quit: This computer has gone to sleep]
<sphex>
dammit!
symm- has joined #ruby
<Ox0dea>
A singleton class's superclass is the singleton class of its superclass. :)
<sphex>
I was only looking at ''.singleton_class.superclass
J4D has joined #ruby
<Ox0dea>
Ah, right, then my previous statement isn't always true either.
icebourg has quit [Ping timeout: 240 seconds]
mjuszczak has joined #ruby
jimothy has joined #ruby
J4D has quit [Max SendQ exceeded]
hanmac has quit [Ping timeout: 246 seconds]
Scroff has quit [Ping timeout: 264 seconds]
<sphex>
Ox0dea: I remembered reading the method lookup rules somewhere and they were a bit complicated. but I can't find it back. :/ I was wondering if they could actually have been simpler than that.
J4D has joined #ruby
<Ox0dea>
sphex: Method lookup essentially just ascends the ancestor chain until it finds the method; if it doesn't find it anywhere, it starts over looking instead for a definition of #method_missing.
J4D has quit [Max SendQ exceeded]
<Ox0dea>
It's how the ancestor chain obtains its links that can be tricky.
J4D has joined #ruby
cochise_ has quit [Ping timeout: 264 seconds]
sumark has quit [Remote host closed the connection]
cochise has joined #ruby
danzilio has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Mendenhall has quit [Ping timeout: 248 seconds]
msgodf has quit [Ping timeout: 276 seconds]
silkfox has joined #ruby
sumark has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgutierrez1287 has quit [Remote host closed the connection]
tkuchiki has joined #ruby
hahuang65 has joined #ruby
bigbadbear has quit [Ping timeout: 264 seconds]
swgillespie has joined #ruby
<Ox0dea>
axisys: Does it help to point out that your `clusters` is an array of one element?
tomphp has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
bhorn1|lunchz has quit [Remote host closed the connection]
mdarby has joined #ruby
<axisys>
puts clusters gives #<RbVmomi::VIM::ObjectContent:0x00000003906a98> and yes today it is but I like to prepare for multiples
djbkd has quit [Remote host closed the connection]
gambl0re has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
postmodern has quit [Quit: Leaving]
v4n has quit []
postmodern has joined #ruby
Channel6 has quit [Quit: Leaving]
gambl0re has joined #ruby
danzilio has quit [Quit: My computer has fallen asleep!]
mistermocha has quit [Read error: Connection reset by peer]
mwlang has joined #ruby
mistermocha has joined #ruby
<sphex>
if I ever figure out ruby's class system correctly.. I'm gonna write a tutorial. the one that I would have needed. "singleton classes for simpletons"
vdamewood has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
<apeiros>
somebody doesn't know that regexen can be composited
<jhass>
I like how fast it must be to that little backtracking
bluOxigen has quit [Ping timeout: 256 seconds]
bmurt has quit []
<apeiros>
also superduper that all strings now know whether they're a valid email address…
<mwlang>
sheez.
Ilyas has quit [Read error: Connection reset by peer]
<mwlang>
most email validations I’ve seen are just simple one liners. I don’t know about y’all, but just validate it has the prerequisite components, send an email to the person and have ‘em verify the email by clicking the token link.
<apeiros>
a) in some places you don't want to send an email
<mwlang>
alright, apeiros, enlighten me.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang>
apeiros: this is for a new user sign up form…
<apeiros>
b) in some places you get a huge drop in registrants due to invalid email addresses and people not fixing it
Limix has joined #ruby
<mwlang>
so let’s say its for the purposes of collecting a “real user’s” email.
<eam>
if you don't send an email and get positive confirmation the email very likely is bogus
pdoherty has quit [Quit: Leaving]
diegoviola has quit [Quit: WeeChat 1.2]
krz has quit [Quit: WeeChat 1.0.1]
jonathanwallace has joined #ruby
<mwlang>
eam, I’ve used a few repexp over the years, but basically, just something like this: [A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}
ixti has joined #ruby
hotpancakes has joined #ruby
<sphex>
mwlang: email addresses can have double-quotes and backslash escapes in their "local" component. but those are very rarely accepted by web forms.
bruno- has joined #ruby
<jhack>
I'm a little confused with exercism.io lol
<jhack>
I can't seem to see other peoples exercises that they're working on..?
<jhack>
in the ruby section
<mwlang>
jhack: for a moment I thought you were misspelling exorcism (which is what I def. want to do on this new project). :-)
<havenwood>
jhack: Complete the exercise yourself first.
Notte has joined #ruby
momomomomo has quit [Quit: momomomomo]
pengin has quit [Remote host closed the connection]
<jhack>
havenwood, i have completed the hello-world project already
_ixti_ has quit [Ping timeout: 240 seconds]
felixrsmith has joined #ruby
duggiefresh has quit []
<havenwood>
jhack: And you can't see others' hello-world?
<jhack>
no
<jhack>
its under Ntpick > Ruby, right?
msgodf has joined #ruby
<havenwood>
jhack: Did you finalize it, or whatever it's called. Submit that you're done modifying it based on comments?
<jhack>
havenwood: yeah
MagePsycho has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
<shevy>
havenwood you working on any cool projects lately?
<havenwood>
jhack: Yeah, when I click the same I see what I've finished.
<mwlang>
I guess my point with the regexp for email validation is why go to such extremes when the end goal is a user’s email you’re going to send an email to anyway? (in our case, new user signup). I personally can’t even read and understand that regexp.
<havenwood>
shevy: Did you see my Elixir stdlib in Ruby thing?
<shevy>
nope, what is that?
<mwlang>
and I look at it and think, “there’s guaranteed to be a bug there."
aryaching has quit [Ping timeout: 256 seconds]
<jhack>
havenwood: do you see other peoples projects?
hotpancakes has quit [Ping timeout: 248 seconds]
dagda1 has joined #ruby
<havenwood>
jhack: yup
mdarby has joined #ruby
<Antiarc>
mwlang: Agreed; I just validate "something@anything.anything"
MagePsycho has quit [Client Quit]
<jhack>
havenwood: wth
acke has joined #ruby
<Antiarc>
Valid emails can be completely nutso
mistermocha has joined #ruby
mdarby has quit [Max SendQ exceeded]
bruno- has quit [Ping timeout: 252 seconds]
felixr has quit [Ping timeout: 256 seconds]
mdarby has joined #ruby
<apeiros>
mwlang: nice. you disallow all IDN email addresses
<mwlang>
now….if I were a service like evite.com where one can paste a giant list of emails….I could see something like this being a good idea.
<apeiros>
mwlang: also probably a couple of the new TLDs
ldnunes has quit [Quit: Leaving]
platzhirsch has joined #ruby
<yorickpeterse>
The only valid Email regex is /[^@]+@[^@]+/
<yorickpeterse>
or maybe just /.+/
<mwlang>
apeiros: yeah. Important if you want International users…but most of my clients are solely concerned with US-based customers.
<bougyman>
yorickpeterse: /@/ suffices
gambl0re has quit [Read error: Connection reset by peer]
<mwlang>
jhass: are you saying you tried that massive regexp I gist’d to jex.im?
<v4n>
havenwood: good to know. Any idea what's the benefit of having more than 1 Cluster? If I want more Concurrency I could just increase the Thread count.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kully3xf_ has quit [Ping timeout: 264 seconds]
<Antiarc>
Are you on MRI or jruby?
paulcsmith has quit [Ping timeout: 248 seconds]
<Antiarc>
MRI can't use more than 1 core's worth of CPU per process
quimrstorres has joined #ruby
<jhass>
mwlang: sure, it works fine if you replace the octal stuff with hex escapes
<jhass>
except for the image export
paulcsmith has joined #ruby
<jhass>
let's see if copy pasting the generated svg works
<mwlang>
ah, I bet that’s a fun visual. I wouldn’t mind seeing it if you get it to save.
<mwlang>
whatever happened to SMTP’s query email validity feature? I know that’s been around forever, but not all SMTP servers correctly implemented it, so it never really got adopted as a way to validate emails.
scripore has quit [Quit: This computer has gone to sleep]
<v4n>
Antiarc: I'm using MRI
<momomomomo>
JRuby is pretty dope
<Antiarc>
You will want 1 process per core in your CPU then
<v4n>
havenwood: thanks
<Antiarc>
To fully utilize the box
<Antiarc>
Or use jruby and get all cores with one process :)
shazaum_ has joined #ruby
<apeiros>
havenwood: uh, no? each worker is a process. and each process has a thread-pool.
<Antiarc>
threading in MRI is mostly nice for parallelizing IO-heavy work; it won't help you with CPU-intensive stuff.
GPrime has joined #ruby
paulcsmith has quit [Client Quit]
<apeiros>
havenwood: i.e. puma forks + threads
<momomomomo>
apeiros: are we talking about straight ruby or something like puma
dagda1 has joined #ruby
<momomomomo>
apeiros: "On MRI, there is a Global Interpreter Lock (GIL) that ensures only one thread can be run at a time. But if you're doing a lot of blocking IO (such as HTTP calls to external APIs like Twitter), Puma still improves MRI's throughput by allowing blocking IO to be run concurrently (EventMachine-based servers such as Thin turn off this ability, requiring you to use special libraries). Your mileage may vary. In order to get the best throughput, it i
<momomomomo>
highly recommended that you use a Ruby implementation with real threads like Rubinius or JRuby."
<momomomomo>
from puma docs
<apeiros>
momomomomo: I'm talking about "v4n: Are Puma Threads and Workers synonyms?" - "havenwood: v4n: Yes" - and that's wrong
<Antiarc>
(ps jruby is awesome)
mjuszczak has quit []
<momomomomo>
ah gotta go meeting
iamninja has quit [Ping timeout: 264 seconds]
<havenwood>
apeiros: hrm?
paulcsmith has joined #ruby
baweaver has joined #ruby
paulcsmith has quit [Client Quit]
<apeiros>
havenwood: I'd love to answer your question, but can't do much with "hrm?" :-)
scripore has joined #ruby
paulcsmith has joined #ruby
stantonnet has quit [Ping timeout: 256 seconds]
paulcsmith has quit [Client Quit]
<havenwood>
apeiros: The Puma ThreadPool is started with "workers" which are Threads.
peter_paule has quit [Ping timeout: 264 seconds]
<apeiros>
unless they badly reuse the term worker, that's incorrect. workers are processes in puma.
<havenwood>
apeiros: The code I linked above ^. I'm not following what you mean.
<apeiros>
and each process has threads.
<apeiros>
see https://github.com/puma/puma "Clustered Mode". --workers to control forking, -t to control threads per worker
pengin has joined #ruby
<Antiarc>
per the puma doc, workers are the number of processes in a cluster
crdpink2 has joined #ruby
<apeiros>
^
<Antiarc>
And each process runs a threadpool of -t threads
<apeiros>
precisely
<havenwood>
okay, so term reuse
<jhack>
what does arr do again? finds the array?
<Antiarc>
jhack: It emphasizes your point, if you're a pirate
<Antiarc>
Arr.
<jhack>
lol
crdpink has quit [Ping timeout: 248 seconds]
<cout>
R
olistik has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
<apeiros>
havenwood: shame on them :<
<havenwood>
v4n: So I retract what I said. I've contributed to the ThreadPool code so that's what I'm most familiar with. I got confused.
olistik has joined #ruby
<havenwood>
apeiros: Thanks for the correction, I *should* have kept them straight. Looking at the command line args it's coming back to me.
<apeiros>
yw
<apeiros>
masterpedant loves to correct
<havenwood>
:)
<Antiarc>
you kids and your "clusters" and "threads" these days. Back in my day, we managed a pack of single-threaded mongrels manually. Uphill. Both ways. In the snow.
icebourg has quit []
baweaver has quit [Ping timeout: 244 seconds]
Notte has quit [Remote host closed the connection]
<mwlang>
Antiarc: you forgot a bit….”without electricity” :-D
<Antiarc>
Damn straight. If I wanted to serve a web request, I had to pull out the hand crank.
JoshL has quit []
<mwlang>
I still remember the night I switch an entire cluster of 70+ servers from mongrel to Passenger.
<Antiarc>
I'll bet that was a good day.
mando has joined #ruby
gamename has quit [Remote host closed the connection]
<mwlang>
That’s 70 different Rails apps…yeah, it was a great day…I went home at 4am, came in the next afternoon and everybody wanted to know what I did last night.
sharpmachine has joined #ruby
BrianBoyko has quit [Ping timeout: 248 seconds]
gamename has joined #ruby
<jacky>
"Just saved us a whole bunch of money by switching to Geico, that's what."
<mwlang>
My first question was, “why? what’s broke?” They said, “nothing…its just that not one single crash report’s come in yet."
<mwlang>
That comment made my year.
<Antiarc>
OTOH, mongrel did a good job of forcing you to build redundant, monitored systems.
charliesome has quit [Quit: zzz]
sharpmachine has quit [Remote host closed the connection]
<havenwood>
apeiros: Think I might submit a PR to clear up the nomenclature internally. Will ponder.
shazaum_ has quit [Quit: Leaving]
<mwlang>
Antiarc: indeed. Mongrel is the reason I know how to virtualize the fluie out of everything.
workmad3 has joined #ruby
<Antiarc>
havenwood: Since you seem to have your fingers in puma, is there any plan for zero-downtime reloads under non-forking runtimes (ie, jruby)?
<mwlang>
Xen would not be in my backpack without Mongrel.
<Antiarc>
We're on torquebox right now but jboss makes me cry with many sads
yardenbar has quit [Quit: Leaving]
danzilio has quit [Quit: My computer has fallen asleep!]
<havenwood>
Antiarc: How about fork and exec via ffi?
gamename has quit [Ping timeout: 248 seconds]
<Antiarc>
The JVM doesn't support forking, I'm not sure you could even do it via ffi
zacstewart has quit [Remote host closed the connection]
<apeiros>
havenwood: I'm curious - what will you use internally as name?
zacstewart has joined #ruby
<havenwood>
apeiros: That's what I'd need to ponder. :O
<apeiros>
heh
JMoir has quit [Ping timeout: 276 seconds]
<apeiros>
I think I had the same problem before. trying to remember with what I settled.
<Antiarc>
Whoa, okay, headius has a post on doing so
<Antiarc>
Wellll now.
<Antiarc>
I'm going to do some reasing.
<Antiarc>
reading*
<eam>
you can fork the jvm
<havenwood>
Antiarc: Yeah, I don't have experience setting it up personally. I'll have to try that.
workmad3 has quit [Ping timeout: 246 seconds]
<Antiarc>
Ah, but that'd be multiple JVM instances. Hrm.
ndrei has quit [Ping timeout: 256 seconds]
<havenwood>
Line em up!
<eam>
forking any GC'd language is fraught with peril
Jamal has joined #ruby
<apeiros>
eam: hm? because of COW?
<havenwood>
eam: though it's really not forking, just exec
<apeiros>
or why?
tilllt has joined #ruby
<eam>
because of non-determinism in finalizers
<eam>
havenwood: oh, in that case just vfork / create_process
<eam>
er, create_process? I mean posix_spawn
<eam>
havenwood: is this starting up a new server without downtime in the old one?
<havenwood>
bug sprayer coming through, must evacuate to safety
<apeiros>
havenwood: best I came up with so far is "processor". not happy about it :-|
<havenwood>
eam: sorry, i think i'm equivocating - puma internally just execs but i guess we're also discussing forking the jvm
<havenwood>
back in a few
<eam>
ah
<jhass>
mwlang: didn't manage to render a viewable PNG (stuff breaks at 70k x 2.5k pixels), but just enter http://paste.mrzyx.de/pkdukxsic/3rvjfc/raw into regulex and give your browser a minute or two to render
<eam>
so if it's a server re-exec'ing itself one neat trick is to spin up a new one and use IPC to pass the listening socket from one to the other
<eam>
(vs inheriting it across an exec)
<eam>
added bonus is you can warm-up the new server before the old one goes away, or even test-load traffic on it, entirely hitless
jerius has quit [Quit: /quit]
<eam>
I have some example ruby code for that
hotpancakes has joined #ruby
Soda has quit [Remote host closed the connection]
Mendenhall has joined #ruby
<mwlang>
jhass: looks like a lot of the same thing is repeated over and over.
<jhass>
yeah
blaines has joined #ruby
jhack has quit [Ping timeout: 246 seconds]
mary5030 has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DoubleMalt has quit [Remote host closed the connection]
<mwlang>
but this is a nice tool. You’ve introduced me to several regexp sites that are quite useful.
soxet has quit [Quit: Leaving]
vdamewood has quit [Ping timeout: 248 seconds]
pengin has quit [Remote host closed the connection]
danzilio has joined #ruby
<jhass>
I find it a bit weird how it seems to allow tabs and newlines everywhere
<tilllt>
hi people. i am a ruby beginner and i fear the (simple) project i chose is beyond what i can figure out without some help. basically i want to write a program that copies a file from one place to another as quickly as possible, BUT creating checksums of the original and the destination file. i figured that the „zero copy“ approach (http://www.bigfastblog.com/zero-copy-transfer-data-faster-in-ruby) probably is the fastest way possible for the copy process its
<tilllt>
(at least while you are on linux) and xxHash (https://github.com/justinwsmith/xxhash) is the fastest hashing algorithm, so these two in combination could be a good approach. the IO.splice used for zero copy also comes with an IO.tee example, but i fail to understand if it is possible to „pipe“ an input file to the hashing algorithm with tee and at the same time write it to a destination file… by chance anyone here knows about these approaches and point me i
ZeeNoodleyGamer has quit [Read error: Connection reset by peer]
<shevy>
?godzilla
<ruboto>
I don't know anything about godzilla
<jhass>
meh, it actually is three lines :D
<mwlang>
jhass: yeah, I saw that. I really have no idea what the previous developers were thinking. It’s almost like they grabbed one of the RFC ones linked earlier.
jenrzzz has quit [Ping timeout: 248 seconds]
ixti has quit [Ping timeout: 276 seconds]
<jhass>
I've seen regex generators for some RFCs
acke has quit [Ping timeout: 244 seconds]
<jhass>
wouldn't be surprised if this is generated in fact
<baweaver>
? 'that, but I do know why kids love cinnamon toast crunch'
<baweaver>
?'that, but I do know why kids love cinnamon toast crunch'
vdamewood has joined #ruby
<baweaver>
drat
<al2o3-cr>
tilllt: probably look at IO.copy_stream
blaines has joined #ruby
<al2o3-cr>
that is, if you are using IO
vdamewood has quit [Max SendQ exceeded]
felixrsmith has quit [Quit: Konversation terminated!]
<apeiros>
jhass: regulex better than debuggex?
vdamewood has joined #ruby
<tilllt>
al2o3-cr: i managed to use the IO.splice code fine and make a copy of a file, it is very fast, faster than linux „cp“ i think.… the question is, am i on the wrong path thinking that i could use IO.tee to additionally create a checksum while reading the file…
jenrzzz has joined #ruby
j_mcnally has joined #ruby
<mwlang>
tilllt: if speed is your biggest concern, you may want to go with a compiled language — especially if you’re aiming to operate on entire disk volumes.
<jhass>
apeiros: regulex renders nicer IMO (and handles bigger inputs if you give it some time), but it doesn't do anything beyond rendering
<apeiros>
well, the mail regex rendered quickly enough :)
<al2o3-cr>
well tee'ing is going to be considerably slowing things down
<jhass>
most time is your browser rendering the generated svg, yeah
polpak has joined #ruby
x1337807x has joined #ruby
<mwlang>
tilllt: doing zero-copy means your app isn’t interested in the data that’s being transferred, so you’re cutting the middle-man (your app) out of the process. The kernel does the work and lets you know when it’s done. However computing CRC means you are interested in the data, so the two seem mutually exclusive to me.
baweaver has quit [Remote host closed the connection]
vdamewood has quit [Max SendQ exceeded]
<zenspider>
hard linking and shelling out to md5 cmdline seems the fastest in my mind (not measured)
zacstewart has quit [Remote host closed the connection]
Olipro has quit [Ping timeout: 256 seconds]
<tilllt>
mwlang: thats what i feared, yes. still, zero copy is so much faster then a regular copy, that i think it might be still a good approach to copy the file and then create the checksum hashes afterwards. so i guess that zero copy also implies that the file is not cached, so successive reads will not access a cached version (and benefit from that, speedwise) but read the entire file again for hashing?
renderful has quit []
FernandoBasso has joined #ruby
duncannz has quit [Remote host closed the connection]
<mwlang>
tilllt: yeah, you’re going to read the file twice in your scenario, as far as I can tell.
<zenspider>
you only need to hash one of them, right?
<mwlang>
…and without digging into Linux system level api docs….
<tilllt>
zenspider: no, both. i need to make sure the file is identical.
davedev24_ has quit [Ping timeout: 248 seconds]
<zenspider>
tilllt: why are you testing whether the copy worked? it'll error out if it didn't work
<eam>
ruby is the wrong language for this level of optimization
podman has quit [Quit: Connection closed for inactivity]
<tilllt>
zenspider: md5 is overkill (from my research for data integrity), i dont need a cryptographic hash. https://code.google.com/p/xxhash/
freerobby1 has joined #ruby
Timba-as has joined #ruby
davedev24_ has joined #ruby
<tilllt>
zenspider: check the link to give you an idea of checksum algorithm speed comparison
freerobby has quit [Read error: Connection reset by peer]
<zenspider>
still doesn't address my question
postmodern has joined #ruby
momomomomo has quit [Quit: momomomomo]
havenwood has joined #ruby
christiandsg has joined #ruby
arcanez has left #ruby [#ruby]
<tilllt>
i want to build a system that copies video / audio files, on-set, to several backup volumes (insurances usually require at least 3 copies). This data might then be transferred to other facilities and be processed again. if a file is corrputed on any of these steps, i need to be able to document on any of these distribution steps that the data is entirely intact. so i think there is no way around checksums.
ixti has joined #ruby
Mendenhall has quit [Ping timeout: 256 seconds]
victortyau has quit [Quit: Leaving]
<Antiarc>
I'd just use rsync ;)
<eam>
tilllt: are the files larger than RAM?
<tilllt>
oh yes
<tilllt>
think hundreds of GB
mistermocha has joined #ruby
<eam>
yeah, it might make sense to build your own copy command then
<tilllt>
in worst case
duncannz has joined #ruby
pullphinger has quit []
<eam>
cp breaks down at edge cases with extremely large sets of files - so does rsync
Scroff has joined #ruby
<zenspider>
there's a multi-dest rsync variant
<eam>
tilllt: but, if you really care you should also make sure to use a filesystem which takes care of this for you
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
but I don't think you'll benefit if this is local volumes
<eam>
like zfs
enebo has quit [Quit: enebo]
<zenspider>
but, I'm not sure you can do zero-copy across volumes
<eam>
see the CERN paper on bit-flips per GB, you'll get some at that size
<tilllt>
eam: i cant force the people that are going to use the system to any kind of filesystem. this entirely depends on what they need to pass to their editors, so this might be NTFS / HFS / ext3 or whateve they need in their editing suites…
eggoez has quit [Ping timeout: 256 seconds]
Kully3xf has quit [Ping timeout: 246 seconds]
<eam>
fair. So, you definitely want a rolling checksum as you copy
redteam has quit [Read error: Connection reset by peer]
christiandsg has quit [Ping timeout: 265 seconds]
<tilllt>
obviously zfs or btrFS would have some advantages for data integrity. but thats not the reality on a film-set :)
<eam>
I wouldn't worry about the cost of copying -- the cost of writing to disk will be many orders of magnitude higher
<eam>
you should be able to ignore the cost of copying the buffer in ram
t0rrieri has quit [Quit: Be back later ...]
<eam>
zerocopy matters when it's a webserver serving the same file from vfs cache a million times
<eam>
it won't help much when your dataset > RAM
jenrzzz has quit [Ping timeout: 250 seconds]
mistermocha has quit [Read error: Connection reset by peer]
Scroff has quit [Ping timeout: 265 seconds]
eggoez has joined #ruby
Leef_ has joined #ruby
Leef_ has quit [Remote host closed the connection]
bungoman has quit [Remote host closed the connection]
<eam>
tilllt: but, just running `md5` on the file post-copy is still probably the best
<tilllt>
eam: so you are saying that if file > ram, i can just use any kind if IO read / write and it will be the same speed?
<zenspider>
very interesting talk about video processing w/ huge datasets ... at... cascadia
<eam>
so if you're looking to optimize that memory copy, you're looking to do a 0.001% optimization
<eam>
tilllt: again, that's a 0.01% speed issue
platzhirsch has quit [Ping timeout: 246 seconds]
<eam>
your overwhelming cost will be reading the bytes off the platters
<eam>
it's like planning a road trip across the US, then arguing over which side of the gas station is faster to pull up to
baweaver has joined #ruby
olistik has quit [Remote host closed the connection]
Metus has joined #ruby
<zenspider>
haha
<zenspider>
that's a great analogy
<tilllt>
well, the source media that contains the data files will probably anything from SSD’s to SD Cards, CFAST, CF … some of those (especially SSD) are quite fast…
<eam>
car analogies ftw
<eam>
tilllt: yeah, ssd can maybe get it to 100x
<eam>
memory is still massively faster
<zenspider>
not fast enough
brettnem has quit [Quit: brettnem]
<eam>
(a top of the line ssd like a FusionIO)
<eam>
tilllt: by all means, use the checksum you want, though
<eam>
but benchmark your entire process before you put too much time into any optimization
<apeiros>
xxhash seems to have a command utility too
<apeiros>
at least one is in the PRs
<tilllt>
it has a ruby gem ;)
EagleDelta has quit [Read error: Connection reset by peer]
<eam>
but then you can't read the data to checksum it
<havenwood>
Release... the GVL!!
<mwlang>
I’m so behind the times… “Note : as Google Code is closing, the new official xxHash repository is now on Github…”
<tilllt>
apeiros: there is also a ruby wrapper around the c version of xxhash, i guess that should be pretty much the same as the command line version… https://github.com/nashby/xxhash
brettnem has joined #ruby
<tilllt>
speedwise
bricker has quit [Ping timeout: 256 seconds]
<havenwood>
nice
<al2o3-cr>
it will be in ruby 3.0 (hopefully) :D
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* al2o3-cr
crosses fingers
<eam>
tilllt: note the ruby gem for xxhash requires you to have the entire file in memory :)
<eam>
ah, no, there's a stream interface
<tilllt>
yeah, thats what i was trying to use...
bricker has joined #ruby
Ropeney has joined #ruby
<eam>
tilllt: if you're doing this in ruby, just read 4k chunks, and write them into the xxhash IO object and the destination file object
<eam>
don't sweat the copying
<eam>
the read/write will be even in the best case with a $10k FusionIO backing drive still 99% of the time spent
<Senjai>
tilllt: Do you have a speed problem?
quimrstorres has quit [Remote host closed the connection]
<eam>
now, if you really want to go fast, you could investigate parallel copies
<Senjai>
If you do, then worry about your algorithm, if you dont, waste all the resources you want
<eam>
slice the file into N threads where N is the optimal parallelism for your storage device (say N spindles of disk drives)
danzilio has quit [Quit: My computer has fallen asleep!]
<eam>
and have each thread write 1/N of the file
danzilio has joined #ruby
jimmiejohnson has joined #ruby
solars has quit [Ping timeout: 255 seconds]
<eam>
that could give you potentially an order of magnitude speed boost
quazimod1 has quit [Ping timeout: 256 seconds]
adamski2600 has quit [Remote host closed the connection]
jimmiejohnson has quit [Client Quit]
<tilllt>
eam: this is possible in ruby?
mistermocha has quit [Read error: Connection reset by peer]
<eam>
sure
mwlang has quit [Quit: mwlang]
danzilio has quit [Client Quit]
yizr has joined #ruby
<tilllt>
what do i have to look for when researching on parallelizing stuff in ruby?
gambl0re has quit [Ping timeout: 252 seconds]
<eam>
you could thread or fork
gambl0re has joined #ruby
mistermocha has joined #ruby
[H]unt3r has quit []
<eam>
you'll want to do a bunch of reading on how to do threaded programming before you tackle that approach though
<eam>
it's one of the more complex paradigms folks struggle with
last_staff has quit [Quit: last_staff]
Xeago has joined #ruby
<tilllt>
yeah, probably too much for me at this point but still a very interesting aspect…
spider-mario has quit [Remote host closed the connection]
thiagovsk has quit [Quit: Connection closed for inactivity]
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
<Senjai>
tilllt: avdi wrote a decent book on threading
<tilllt>
senja: sounds great, thanks for the link.
<Senjai>
It is verry basic
<Senjai>
though
choke has joined #ruby
<al2o3-cr>
+1 Jesse Storimer
<Senjai>
But if you want ruby specific, thats the one I would recommend
<tilllt>
perfect for me then ;)
<Senjai>
tilllt: After reading it, try writing an IRC bot. It's a great case for writing threaded code
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai>
*from scratch*
x1337807x has quit [Ping timeout: 252 seconds]
<avdi>
Senjai: hahaha, I was all, I did what now??
<tilllt>
i think i’ll centre my ruby learning around this video / audio backup thingy for the moment. sounded simple at first but proves to have a steeper leaning curve then i expected.
<eam>
if you wish to write an irc bot from scratch you must first invent the universe
<tilllt>
again?
<tilllt>
parallel universe?
mistermocha has quit [Ping timeout: 252 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<eam>
tilllt: ;) interestingly, almost any mundane computing problem can become arbitrarily complex in corner cases
<Senjai>
avdi: Sorry man, your books are good too
jenrzzz has joined #ruby
brettnem has quit [Quit: brettnem]
monod has quit [Quit: Sto andando via]
<Senjai>
eam: The only crappiness is around message codes and format
<Senjai>
eam: The whole respond while still reading input stuff is kind of a cute thing to do to learn how to write concurrent code
momomomomo has quit [Quit: momomomomo]
<Senjai>
But yeah, you'll run into a lot of complexities with IRC
ramblinpeck has quit [Ping timeout: 248 seconds]
but3k4 has joined #ruby
<eam>
yeah, still relatively basic compared to say http though
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai>
like the fact your bot must respond to a PING every little while to prevent being disconnected
<eam>
great for beginners, especially since you can talk to it
<Senjai>
I'll leave the rest of the goodies to discover for you
ramblinpeck has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
vcoinminer has quit [Ping timeout: 248 seconds]
swgillespie has joined #ruby
<Senjai>
When I did mine, I had a ping thread, a input thread, and a response thread
skmp has quit [Ping timeout: 248 seconds]
avdi has quit [Ping timeout: 248 seconds]
alekst_ has quit [Ping timeout: 248 seconds]
frode15243 has quit [Ping timeout: 248 seconds]
saintcajetan has quit [Ping timeout: 248 seconds]
duoi has quit [Ping timeout: 248 seconds]
Lingo has quit [Ping timeout: 248 seconds]
duoi has joined #ruby
avdi has joined #ruby
frode15243 has joined #ruby
vcoinminer has joined #ruby
waxjar has joined #ruby
alekst_ has joined #ruby
saintcajetan has joined #ruby
skmp has joined #ruby
rgs has quit [Ping timeout: 246 seconds]
<eam>
bonus points: one thread, multiplex all the i/o interaction
<eam>
parallelism vs concurrency
rgs has joined #ruby
j_mcnally has joined #ruby
<havenwood>
Then use a FiberPool for something.
j_mcnally has quit [Max SendQ exceeded]
tno has quit [Remote host closed the connection]
bruno- has joined #ruby
casadei_ has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
jesterfraud has joined #ruby
codecop has quit [Remote host closed the connection]
pengin has quit [Remote host closed the connection]
vdamewood has joined #ruby
acke has joined #ruby
<havenwood>
Or not.
Timba-as has quit [Quit: Be back later ...]
ixti has quit [Ping timeout: 240 seconds]
devdazed has joined #ruby
rqde has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
scripore has joined #ruby
workmad3 has joined #ruby
jobewan has quit [Quit: Leaving]
acke has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
quimrstorres has joined #ruby
michael_mbp has quit [Excess Flood]
<rqde>
I've pushed https://github.com/rqde/soundboard-demo to OpenShift, but I get a "Something went wrong" message once it's running. Doing rhc tail -a myapp I get this http://pastebin.com/hP7Gud2e . Im new to programming and I have no clue how to approach this (let alone fix it). Can you guys help?
tituspullo has quit [Remote host closed the connection]
idafyaid has quit [Ping timeout: 264 seconds]
Musashi007 has quit [Quit: Musashi007]
cndiv has quit [Quit: Quit]
MichaelGG has joined #ruby
Olipro has joined #ruby
<MichaelGG>
Hi there! I'd like to use Ruby to use it to make a website (gonna make a simple blog/cms for my company). I've got a lot of experience programming, mostly C/C#/F#. Where should I start? If I use a RoR tutorial will I pickup enough Ruby on the way?
mando has joined #ruby
<MichaelGG>
Or should I look into a ruby tutorial before touching rails?
dstarh has quit [Ping timeout: 248 seconds]
<zenspider>
probably depends on how you learn
RegulationD has quit [Remote host closed the connection]
<zenspider>
there's a book by david black for teaching ruby to people who's already dove into rails
<Senjai>
zenspider: Really
<Senjai>
zenspider: Damn, I'd say there are books for everything in ruby these days
jtdoncas has quit [Ping timeout: 276 seconds]
Muhannad has joined #ruby
<baweaver>
I'm writing one too now :D
bruno- has quit [Ping timeout: 265 seconds]
<MichaelGG>
I guess I'm asking if the RoR tutorials from the ror site are suitable for also picking up Ruby or if I need to go learn ruby first. It looks easy enough
mando has quit [Ping timeout: 252 seconds]
<MichaelGG>
ive been in webdev for ~ 2 decades so i dont need a beginners guide just tell me what to do in ror/ruby
<cout>
if you have experience you can pick up the basics of ruby in a day or so
finisherr has joined #ruby
mistermocha has joined #ruby
yizr has quit [Ping timeout: 264 seconds]
t0rrieri has quit [Ping timeout: 250 seconds]
Olipro has quit [Ping timeout: 252 seconds]
<MichaelGG>
ok thanks ill dive in cheers
<baweaver>
The Ruby Way and Eloquent Ruby
t0rrieri has joined #ruby
<Senjai>
MichaelGG: The ones baweaver recommended would be good
<baweaver>
The Ruby Way is more of a comprehensive guide, and Eloquent is more of how to do things like a Ruby programmer
zacstewart has joined #ruby
axl_ has quit [Quit: axl_]
<baweaver>
Rails 4 in Action was written by members on the channel, but I haven't read it myself yet
<MichaelGG>
Excellent
<Senjai>
I can vouch for it
<baweaver>
Radar: R4iA, more of a beginners book or what level in general?
<Senjai>
I've read both R3IA and R4IA
<Senjai>
It's a beginners book
<Senjai>
But its "fast"
tvw has quit [Remote host closed the connection]
<Senjai>
because you're actively writing an application while reading
<baweaver>
I still need to read it later
<MichaelGG>
beginner as in new to ruby/ror not new to programming
<Radar>
baweaver: Beginners book for those who have experience with Ruby.
howdoicomputer has joined #ruby
<Radar>
(basic experience)
<Radar>
Say you've been toying around with Ruby for a week... you should be able to pick up R4IA and read it
<MichaelGG>
thanks Radar
<baweaver>
^ is one of the authors
Olipro has joined #ruby
<Radar>
MichaelGG: Read The Well-Grounded Rubyist first :)
<baweaver>
sevenseacat whenever they're online too
<Radar>
baweaver: in about 30 minutes iirc
shevy has quit [Ping timeout: 252 seconds]
<Radar>
TWGR is the book that zenspider is thinking of I think
<MichaelGG>
Radar, ok I'll do that now
tkuchiki has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
David Black wrote it, so probably
<Radar>
He might be thinking of a prequel to that book too, Ruby for Rails.
lupine has joined #ruby
war_pigs has joined #ruby
<MichaelGG>
Just seems like for building little content sites, Ruby has more community, like it's easy to drop in A/B testing and stuff. Whereas ASP.NET MVC doesnt have that community and python's somewhere in the middle
<Radar>
Which is not what I would recommend at all since it's very out of date.
<MichaelGG>
should be fun since Ruby's on the other end of the spectrum from what I like
mistermocha has quit [Read error: Connection reset by peer]
<baweaver>
define what you like
<Senjai>
MichaelGG: TBH there are more bad resources for learning ruby then there are good ones. Just ask us if a resource your considering is worthwhile.
jeanlinux has joined #ruby
<baweaver>
because if you're already keen on F# you're going to notice things
<Senjai>
It's also a simple language, so yeah.
Agoldfish has quit [Quit: G'Bye]
symbol has joined #ruby
<MichaelGG>
baweaver, yes I'm much more into statically typed functional programming. And Rust when I need C compat.