<sickweezle>
An implementation of Ruby written in Python ... O.o
<shevy>
I am confused
brianpWi1s has joined #ruby
brianpWi1s has quit [Client Quit]
<sickweezle>
That really hurts my brain.
habanany1 has joined #ruby
Megtastique has quit []
baroquebobcat has quit [Quit: baroquebobcat]
vlad_starkov has joined #ruby
<MrZYX>
sickweezle: there's also python in python and ruby in ruby
<MrZYX>
you could also say that C is written in C
burlyscudd has quit [Quit: Leaving.]
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy>
MrZYX you cause us headache
havenwood has joined #ruby
shaunbaker has quit [Remote host closed the connection]
<MrZYX>
good :P
glaksmono has quit [Ping timeout: 246 seconds]
<sickweezle>
I wish I could notice a headache right now. :/
shaunbaker has joined #ruby
<shevy>
sickweezle what hinders you? are you drunk or something?
<shevy>
stoned?
<sickweezle>
I've had a sinus infection for a month. I've been in pain most of that time. :/
<shevy>
ah
shadoi has quit [Quit: Leaving.]
drumusician has quit [Read error: Operation timed out]
jtdowney has joined #ruby
jonahR has quit [Quit: jonahR]
nateberkopec has joined #ruby
brianpWi1s has joined #ruby
brianpWi1s has quit [Client Quit]
shaunbaker has quit [Client Quit]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has quit [Quit: Computer has gone to sleep.]
cbetta_afk is now known as cbetta
venkat has joined #ruby
carif has joined #ruby
brianpWi1s has joined #ruby
smoak has joined #ruby
<smoak>
does ruby 1.9.3 include rubygems with it?
<shevy>
smoak yeah
jayne has quit [Quit: Quit]
<shevy>
sickweezle well get better and stop being sick!
breakingthings has quit []
jayne has joined #ruby
<smoak>
shevy: thanks
glaksmono has joined #ruby
<shevy>
you should be able to check on the commandline via "gem --version"
mansi has joined #ruby
jtdowney has quit [Read error: Connection reset by peer]
<sickweezle>
shevy: man I hope so.. I've been trying to get the CT scan appointment set up, but failing.
brianpWi1s has quit [Client Quit]
brianpWi1s has joined #ruby
Jake232 has joined #ruby
pranny has joined #ruby
ldcicconi has left #ruby [#ruby]
mocfive has quit [Remote host closed the connection]
jtdowney has joined #ruby
mocfive has joined #ruby
davidhq has quit [Remote host closed the connection]
mocfive_ has joined #ruby
davidhq has joined #ruby
amedeiro_ has quit []
<havenwood>
smoak: Yeah, it does come with 1.9+ but ships with an older version of RubyGems so be sure to update: gem update --system
<smoak>
thanks
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackal_ has joined #ruby
<jackal_>
hello
<havenwood>
hi
jackal_ is now known as Guest40259
<Guest40259>
i am workin on a dr who text game
<Guest40259>
like a mud
mocfive_ has quit [Remote host closed the connection]
<Guest40259>
lookin for some input
alexfreidah has joined #ruby
<shevy>
Guest40259 cool
<shevy>
what is the core idea in the design of your mud
<shevy>
or do you just wanna clone an already existing engine
fedesilva has joined #ruby
senayar_ has joined #ruby
<Guest40259>
having trouble setting up a method that can handle the directions and possibly moving to new rooms based off a hash ..right now every room is a method with directions enclosed, anyone have any other ideas on how to write it
<shevy>
Guest40259 how many directions. 9 ? more than 9 ?
<Guest40259>
i just want to make it for my own fun, nothing professional
nateberkopec has quit [Ping timeout: 272 seconds]
<Guest40259>
no
<Guest40259>
n,s,e,w
mocfive has quit [Ping timeout: 260 seconds]
<shevy>
n,ne,e,se,s,sw,w,nw
<Guest40259>
up and down maby too
<shevy>
hmm 8
<shevy>
k, 10
<Guest40259>
yes shevy
<Guest40259>
i was thinking of hashing rooms, maby to keep track or order idk, that part is tricky too
<shevy>
well, simplest one would surely be to use a hash
<Guest40259>
let me post some basic code
<shevy>
hash[:up] => link_to_room_up
<Guest40259>
def rooma
<Guest40259>
puts " You walk into a large blue english police box, as you slide the door open and walk inside you suddenly see that the inside is a large strange spaceship with cables dangling from the ceiling. A tall man turns around and looks at you, the man quickly brushes forth and takes your hand, shaking it vigerously"
<Guest40259>
puts "A man with wild hair and a plain brown suit says"
<Guest40259>
puts "I am the doctor"
<Guest40259>
puts "your exits are N , S , E , W"
<Guest40259>
direction = gets.strip
<Guest40259>
if direction == 'n'
<shevy>
bit much paste ;P
<Guest40259>
roomb
<Guest40259>
elsif direction == 's'
<Guest40259>
roomc
<shevy>
ack
<centrx>
Use pastebin
<Guest40259>
elsif direction == 'e'
<Guest40259>
roomd
<shevy>
help!
<Guest40259>
else
<havenwood>
gist.github.com**
<Guest40259>
puts "please try again"
<shevy>
heeeeeelp!
<centrx>
How long will this go on
<Guest40259>
rooma
<Guest40259>
end
<Guest40259>
end
<shevy>
I see an end
<Guest40259>
yeah sorry ha
<shevy>
ack, again
<Guest40259>
accident
<Guest40259>
done soon
<shevy>
phew...
<Guest40259>
haha
<Guest40259>
sorry
<shevy>
lol
<shevy>
ok wait a moment anyway
<shevy>
rather than if/elsif, just use case when
<centrx>
Is everyone alright?
|RicharD| has quit [Quit: Sto andando via]
<Guest40259>
ok
<Guest40259>
case direction.... when north blahblah
smoak has left #ruby ["WeeChat 0.4.2"]
<shevy>
Guest40259 also, you should probably write at least one class to handle ALL room objects
<shevy>
almost
<shevy>
case direction
<shevy>
when 'n','north'
<shevy>
for instance
<shevy>
when north <--- would not work, ruby parser would think that north is either a local variable or a method
<Guest40259>
oh so it fills in the word if they only put n
<shevy>
but now when a user typed north
<Guest40259>
i know to use the "
<shevy>
what will happen next?
<Guest40259>
i was just doing example sorry
<Guest40259>
ok so
<Guest40259>
heres the tricky part
senayar has quit [Ping timeout: 248 seconds]
<Guest40259>
ticking objects
<Guest40259>
like dr who
alexfreidah has quit [Ping timeout: 252 seconds]
<Guest40259>
every 4 secounds he puts a new line to screen
<Guest40259>
like hes actually talking
aspires has quit []
<Guest40259>
also, having npc enter the room, leave the room as indivigual objects
brianpWi1s has quit [Quit: leaving]
jonahR has joined #ruby
aspires has joined #ruby
<shevy>
well
<shevy>
one thing after theo ther
<shevy>
*the other
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
wallerdev has joined #ruby
<shevy>
you should make a minimal subset of classes you will require
<shevy>
class NPC or class Npc
<Guest40259>
can we do private chat?
<shevy>
one global event handler to count the ticks passed
<havenwood>
Guest40259: Having users just hit 'n', 'w' and they go or they have to also hit 'Return'?
<Guest40259>
so i can have all this saved
<shevy>
no let's talk here!
<Guest40259>
ok
<Guest40259>
haha
<Guest40259>
lots of spam
<shevy>
yeah, havenwood likes to spam
<Guest40259>
havenwood i want them to press enter
<shevy>
:D
<Guest40259>
like MUD style text adventure
IceyEC has joined #ruby
mary5030 has joined #ruby
<shevy>
Guest40259 perhaps also a class Map to hold all rooms
<shevy>
and link in the directions
<Guest40259>
yes
<Guest40259>
right now im pointing to dif methods which are room names
<shevy>
but you should really start simple
<havenwood>
spam?
<shevy>
havenwood, yeah you wrote a sentence above, it was the BEGINNING OF SPAM but thankfully we interrupted you!
<shevy>
Guest40259 make a list of features that you require, then see what you have implemented so far
<havenwood>
whew? :O
cj3kim has joined #ruby
<shevy>
I tried to write a MUD 5 years ago
<shevy>
it was so awful that I decided to rewrite it
<shevy>
after I rewrote about 12 files I lost fun :(
jtdowney has quit [Read error: Connection reset by peer]
<Guest40259>
ok
<centrx>
shevy, You are so inspiring
<Guest40259>
shevy do you still have the code
w4pm has joined #ruby
<shevy>
Guest40259 I did not start with a design doc though
Jake232 has quit [Ping timeout: 246 seconds]
Guest40259 is now known as BFF
<BFF>
ya
<BFF>
what is a design doc?
<BFF>
plain english explaining how it will work?
<shevy>
BFF just the features you want to have
<shevy>
I mean a short list
<BFF>
gotcha
<shevy>
to remind you what you wanted to have
<BFF>
before i start
Virtualize has joined #ruby
<BFF>
am i right in creating rooms as methods?
<BFF>
is that effective
<shevy>
BFF I started using gems only like ~2 years ago, but you'll be able to find this MUD eventually at https://rubygems.org/profiles/shevy
<havenwood>
require 'io/console'; ch = STDIN.getch; case ch; when ?n, ?s, ?e; 'Into the sea...'; when ?w; 'You win!'; else 'Invalid key'; end
<shevy>
there were other ruby gues wanting to write a MUD years ago, faerieMUD btw http://www.faeriemud.org/
<shevy>
ged is still sometimes here
<shevy>
oh he is here :)
<shevy>
BFF dunno
<shevy>
if you think it is useful
<BFF>
ya
vlad_starkov has joined #ruby
<shevy>
class Room; def north;end;end; swamp33 = Room.new; swamp33.north
<havenwood>
io-console is handy when ya need it
<BFF>
i have heard of the fairie mud
<shevy>
I like that it is story driven
<BFF>
hmmm
<BFF>
i like your idea
<shevy>
pure hack and slay MUDs are surely easier to write
<BFF>
i play SWMUD
<BFF>
star wars mud
<BFF>
its awesome
<shevy>
but you kinda need to give ruby a working structure
jay_m has quit [Remote host closed the connection]
<BFF>
ok
<shevy>
like, translate your ideas into the specific ruby code
fijimunkii has quit [Ping timeout: 265 seconds]
coda_23 has quit [Quit: Leaving]
<BFF>
ok
St_Marx has quit [Ping timeout: 276 seconds]
<BFF>
its just a fun project
<BFF>
nothing fancy, just for learning
jay_m has joined #ruby
<BFF>
i just started ruby a few weeks ago
<shevy>
mine was as well, that's why I gave up ... no big loss giving up :P
<BFF>
yeah ha
<shevy>
centrx I need to be motivated!
<BFF>
this is a cool site you showed me
IceyEC has quit [Quit: IceyEC]
cj3kim has quit [Ping timeout: 272 seconds]
<shevy>
BFF well
mocfive has joined #ruby
<shevy>
in the rewrite, I also tried to create smaller subprojects / smaller classes, that solve certain subproblems
<shevy>
as these are easier to handle
venkat has quit []
<BFF>
gotcha
<shevy>
writing a full MUD where others connect to, where you have to store state (of the objects in the MUD), isn't that simple
<BFF>
for variable instances , you want your MUD as dynamic as possible so you have more options
<BFF>
lol
<BFF>
no
<BFF>
im ok off that
Virtualize has quit [Ping timeout: 252 seconds]
aspires has quit [Remote host closed the connection]
aspires has joined #ruby
lethjakman has joined #ruby
sassamo has quit [Remote host closed the connection]
<lethjakman>
is there an easy way to assign attr_accessable's through **args?
<lethjakman>
does that make sense?
<lethjakman>
I feel like it's a pretty common thing to do.
sassamo has joined #ruby
jay_m has quit [Remote host closed the connection]
rubyracer has quit [Quit: Konversation terminated!]
jay_m has joined #ruby
phinfonet has quit [Read error: Connection reset by peer]
<shevy>
BFF like if you must pass data to your class, Room.new('swamp33')
<havenwood>
lethjakman: I'd prolly use kwargs, especially if you want defaults.
<BFF>
ok gotcha thanks
nobitanobi has quit [Quit: Leaving]
<BFF>
thanks
<shevy>
BFF when you use #new on a class, I think it calls allocate() and then initialize() and these two are always available, even if you dont define them
<BFF>
ok thank you
mikepack has quit [Ping timeout: 248 seconds]
<BFF>
so its like a method argument
<BFF>
class argument
<lethjakman>
hmmmm ok
<lethjakman>
thank you...I'll play around with it a bit
<shevy>
BFF yeah, if you need your object to have more info then you must pass it to .new() or to another method lateron. ruby can not find out what arguments you want to pass if you did not define or pass them
<atmosx>
shevy: isn't initialize useful also if you wanna use data through out the object? lke def initialize; @value = "65535";end ...
<lethjakman>
another semi unrelated question. is there a way to set an @ variable based off of text? for example I want to set @user but the only info I have is 'user'
terrellt has quit [Ping timeout: 265 seconds]
<BFF>
ty
<BFF>
later all
<shevy>
atmosx sure. I hate to use initialize like that though, I usually always have specific setters and getters
<shevy>
atmosx problem is, you need to somewhere define an @ivar with the value
<shevy>
initialize() is the only method I know of that will get called by default through #new
<shevy>
atmosx for most of my classes I have a reset() method and a run() method, and usually inside of initialize() also methods (the setters) that pick up the arguments given to initialize()
<maletor>
If I have a method return a File (or Tempfile) how do I ensure the file is always closed when the other method is done using it? Do I just trust all methods that use it to know that they need to close the file?
<shevy>
maletor a block could be used perhaps. File.open('bla.txt') {|entry| entry.write 'foo' } is doing that I think
St_Marx has joined #ruby
<havenwood>
maletor: A block will self-close. Or you can explicitly close the file if you're not using block syntax.
<atmosx>
shevy: btw, I passed all my exams and hit 78% in organic chemistry!! (I couldn't believe it)
e62 has quit [Ping timeout: 272 seconds]
<MrZYX>
don't close resources you don't own
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<atmosx>
shevy: Now I have a last one before I start with my thesis, in 10 days heh.
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
<shevy>
atmosx wow
<progrock>
Hey, I'm setting up a rails project for the first time with devise. When running rails server I was told I had to do: 'bin/rake db:migrate RAILS_ENV=development' .... but hwen I run rake (even as sudo) I get 'permission denied'
bricker has quit [Quit: leaving]
<atmosx>
shevy: I had the hard one, that's why I was kinda worried. There was an easier test based on amides.. Mine had pyrazine-based structures and steroids
<progrock>
anyone know what I may have done wrong.. seems weird that as sudo I am getting a permission denied
ehc has quit [Quit: ehc]
<atmosx>
but anyway, my eyes are... closing :-P later all
<progrock>
rake's permissions are -rwxr-xr-x
<maletor>
With Tempfile the file is deleted when I close it.
<lethjakman>
anything bad happen when you switched?
nilobject has quit [Quit: nilobject]
marr has quit [Ping timeout: 246 seconds]
DrShoggoth has joined #ruby
<shevy>
havenwood yeah I announced it above!
<havenwood>
shevy: w00t
<shevy>
but first... all of gnome, all of kde, then glibc, and THEN ruby 2.1
<havenwood>
lethjakman: Painless for me.
starkhalo has quit [Ping timeout: 248 seconds]
<shevy>
I slowly get the feeling that havenwood likes to brag ... :P
<lethjakman>
I'll give it a shot
<lethjakman>
is it out of dev?
<havenwood>
lethjakman: These are the patchable issues (some are fixed just by updating gems, others will be in 2.1.1): https://gist.github.com/tmm1/8393897
<havenwood>
lethjakman: Yeah, 2.1.0 is latest stable.
sparrovv has quit [Remote host closed the connection]
<havenwood>
lethjakman: Released Christmas day.
workmad3 has quit [Ping timeout: 252 seconds]
<havenwood>
shevy: Hardly bragging in this case. If I had more substantial Ruby app I'd be more likely to have hit pain. :P
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
shevy: Only running a hello world app keeps likelihood of hitting a bug low!
<shevy>
hehe
wtfitsme has joined #ruby
drim has quit [Quit: drim]
clamstar has quit [Quit: Computer has gone to sleep.]
rahult has joined #ruby
mhenrixon is now known as mhenrixon|afk
<lethjakman>
shevy: did you upgrade/have issues?
burlyscudd has joined #ruby
tt1187 has quit [Ping timeout: 260 seconds]
<havenwood>
lethjakman: Github hit a few bugs they said, but they have a number of Rails, Sinatra and Rack apps. But they've moved to 2.1.0 (albeit with patches).
maletor has quit [Quit: Computer has gone to sleep.]
<lethjakman>
hmmm ok
<lethjakman>
I don't think it'll harm me too much...
achru has joined #ruby
<havenwood>
do eet
<lethjakman>
I'll have to do some testing. probably a good idea.
<shevy>
lethjakman I can not upgrade because syck has been removed and my invalid yaml files won't work with psych. all my config files are in yaml right now, I can not switch to UTF-8 due to various unrelated reasons so I am stuck right now in that department
aspires has quit []
pabloh has joined #ruby
<centrx>
lethjakman, If you are running an existing production application, I would recommend waiting.
pietr0 has quit [Quit: pietr0]
<lethjakman>
ewww
<lethjakman>
centrx: it's a beta production application
<lethjakman>
I'm gonna run some tests tonight
<centrx>
lethjakman, Okay, then go for it!
pietr0 has joined #ruby
<shevy>
but I think I will move to another config format, one that won't lock me into UTF, then I can upgrade easily
<lethjakman>
I'm honestly curious more than anything. and some speed would be good.
<lethjakman>
even if it's minimal
pietr0 has quit [Client Quit]
mlpinit has joined #ruby
<lethjakman>
shevy: have you had a lot of problems with yaml?
<shevy>
lethjakman not really. on 1.8.x it worked just fine. psych is stricter, which is considered a "good thing"
habanany has joined #ruby
mlpinit has quit [Remote host closed the connection]
<shevy>
but I looked around. people don't really use yaml files as pure config, they only auto-generated and read in yaml dataset
cj3kim has joined #ruby
senayar_ has quit [Remote host closed the connection]
<shevy>
all my precious comments :(
<shevy>
and my german umlauts!!!
<shevy>
lö is an alias I use :)
jonathanwallace has quit [Quit: ZNC - http://znc.in]
drim has joined #ruby
achru has quit [Ping timeout: 272 seconds]
<RubyPanther>
yeah in the old days it was so flexible, there was all that yaml==json stuff in the blogs
<txdv>
fäggöt
<shevy>
I have yet to find people who use local json files as config data
yasushi has joined #ruby
<RubyPanther>
In apache, I just write the config files. yaml, yeah, I use a generator if I can
tjbiddle has joined #ruby
<RubyPanther>
at least it isn't sendmail
fedesilva has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 272 seconds]
ctp has quit [Quit: Leaving...]
sassamo has joined #ruby
<shevy>
god, apache
thumpba has quit [Remote host closed the connection]
<shevy>
the bastards changed the config format
<shevy>
this was so painful to transition to the new one :(
<shevy>
but due to that change, I made the apache config super modular
glaksmono has left #ruby ["Leaving"]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thumpba has joined #ruby
<havenwood>
shevy: they messed with it to give you an opportunity to cleanly switch to Nginx!
yasushi has quit [Ping timeout: 265 seconds]
Hobogrammer has quit [Ping timeout: 252 seconds]
<shevy>
yeah I considered
<shevy>
but my russian is really bad
<havenwood>
hehe
ctp has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RubyPanther>
All they did is add an extra directory, some people already had it set that way
DrShoggoth has quit [Quit: Leaving]
<RubyPanther>
I like it, I don't end up making the passenger symlink named like _____________passenger.conf
jonathanwallace has joined #ruby
<RubyPanther>
ponymayitchu?
sassamo has quit [Ping timeout: 265 seconds]
thumpba has quit [Ping timeout: 252 seconds]
ctp has quit [Ping timeout: 246 seconds]
jherman3 has joined #ruby
<jherman3>
I am trying to use Ruby's Mechanize to get a webpage that uses HTTPS and authentication. I have a script that works in Perl using Perl's WWW::Mechanize, and I am using the equivalent commands in Ruby, but get 401 Unauthorized errors. How should I troubleshoot this
burlyscudd has quit [Quit: Leaving.]
<Solnse>
have you checked the webpage javascript to make sure you are calling the right URL?
<Solnse>
you might need to be passing along session cookies
<jherman3>
It requires session cookies
reset has quit [Ping timeout: 272 seconds]
<jherman3>
But I am using the agent to get the webpage that provides them before accessing this problem page
bradhe has joined #ruby
<jherman3>
Do I have to do anything special to make the agent save the cookies?
<Solnse>
so it sounds like you aren't passing them along... cookies = first_page.cookies
<jherman3>
Alright thanks; I'll try that
Jdubs has joined #ruby
<Solnse>
first_page being whatever agent result you have from the first call
<jherman3>
Actually, can you make the agent store all the cookies, like a browser would? In Perl's Mechanize, I passed { cookie_jar => {} } to the call to new. Can I do something similar to Ruby's Mecahnize
<Solnse>
yrd
<Solnse>
yes
lioninawhat has joined #ruby
<Solnse>
it's been awhile, but iirc it's agent.cookie_jar.cookie
dik_dak has quit [Quit: Leaving]
Xeago has joined #ruby
<Solnse>
try printing out those to screen to troubleshoot it...
<jherman3>
I created a new cookie jar and set the agent's cookie_jar to it, but its still unauthorized
<jherman3>
I'll look at the cookies like you suggested
MrZYX is now known as MrZYX|off
<Solnse>
what page are you trying to scrape?
Virtualize has joined #ruby
<jherman3>
A page from a service called Blackboard
<jherman3>
For privacy reasons, I cant give you a link, sorry
unixpro1970 has quit [Quit: unixpro1970 has off IRC]
<Solnse>
I did 60+ authenticated page scrapes at my last job, some can be tricky.
nateberkopec has joined #ruby
<Solnse>
no problem.
<Solnse>
some can be a bitch. good luck
<jherman3>
k thanks
sassamo has joined #ruby
<Solnse>
i definitely recommend printing to a result html page or to screen to see your results.
Virtualize has quit [Client Quit]
<Solnse>
use dev tools to go through a browser successfully and see what's really going on, and figure out why mechanize isn't getting the same result.
<Solnse>
usually it's from not passing along the headers or cookies.
pen has quit []
<jherman3>
It looks like it has javascript session cookies
<jherman3>
If those arent getting passed along, that could be the issue
<Solnse>
and that's fine
freerobby has joined #ruby
senayar has joined #ruby
<Solnse>
sometimes you could be passing along too much too... I've had pages that fail authentication until I deleted some cookie attributes.... go with the minimum and start adding them back in until you clear.
<Solnse>
that's why it helps to use firebug or something to watch each step
nateberkopec has quit [Ping timeout: 272 seconds]
<Solnse>
if it's javascript it's usually cake because you can see the header info sent as JSON
brianpWins has quit [Quit: brianpWins]
bradhe has quit [Remote host closed the connection]
fedesilva has joined #ruby
<Solnse>
they on the promenade in Santa Monica? I think I interviewed with them but they wanted a QA guy, not a ruby dev.
bradhe has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
ctp has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
DrShoggoth has joined #ruby
<jherman3>
I'm dont work with them; I'm a student at a school that uses their service
lioninawhat has quit [Ping timeout: 260 seconds]
nycjv321 has joined #ruby
<nycjv321>
any cucumberists here?
<Solnse>
join #cucumber
* nycjv321
already did
bradhe has quit [Ping timeout: 246 seconds]
jherman3 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Solnse>
I have only limited experience with cucumber, didn't see the need since rspec does everything I need. sorry.
<nycjv321>
Solnse: I might stop using it since its giving me the weirdest exception..
ctp has quit [Ping timeout: 252 seconds]
<Solnse>
does it actually help? I mean does the exception happen because you actually have a problem in your code? or are you just trying to make the test comply with your code?
jherman3 has joined #ruby
<nycjv321>
Cucumber seems to be loading the steps definitions twice...
<nycjv321>
It is saying ALL my steps are ambigious, but they are all unique. I will even remove the steps and then readd them.
<jherman3>
In the Perl one, I passed a constructor argument to disable SSL hostname verification. I haven't found a way to do that in the Ruby mechanize API. Do you know of one?
<Solnse>
jherman3: yes, there is a way to disable it... let me look at the syntax, I don't remember the exact wording
<krainboltgreene>
Opinion: All objects should be extended with Forwardable
ndrei has joined #ruby
cbetta is now known as cbetta_afk
<Solnse>
just remember that VERIFY_NONE will leave you open to man in the middle attacks if you use it somewhere that is vulnerable.
<jherman3>
ok thanks for the heads-up
ctp has quit [Ping timeout: 252 seconds]
deens has quit [Ping timeout: 264 seconds]
cbetta_afk is now known as cbetta
alexfreidah has quit [Ping timeout: 252 seconds]
e62 has quit [Ping timeout: 264 seconds]
alvaro_o has quit [Quit: Ex-Chat]
digital-ghost has quit [Remote host closed the connection]
eka has quit [Quit: Computer has gone to sleep.]
lioninawhat has joined #ruby
deens has joined #ruby
cj3kim has joined #ruby
davidhq has quit [Remote host closed the connection]
mocfive has joined #ruby
deens has quit [Read error: Connection reset by peer]
deens has joined #ruby
tyl has joined #ruby
ndrei has quit [Quit: Lost terminal]
yaymukund has quit [Ping timeout: 265 seconds]
deens has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
aryaching has quit []
speakingcode has joined #ruby
deens has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
timonv has joined #ruby
Hobogrammer has joined #ruby
Hobogrammer_ has joined #ruby
Hobogrammer_ has quit [Client Quit]
amclain has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
gja has joined #ruby
io_syl has quit [Ping timeout: 246 seconds]
Targen has quit [Ping timeout: 248 seconds]
bradhe has quit [Remote host closed the connection]
deens has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
mary5030 has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.2]
timonv has quit [Ping timeout: 272 seconds]
diegoviola has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
* nycjv321
is saddened that my installation of cucumber wants to load multiple instances of the step definitions :(
<YOURBESTFRIEND>
>cucumber
<YOURBESTFRIEND>
hahaha
DrShoggoth has quit [Quit: Leaving]
* nycjv321
is starting to think that :(
<YOURBESTFRIEND>
more like cucumbersome
lioninawhat has quit [Ping timeout: 264 seconds]
dorei has quit []
gja has quit [Quit: This computer has gone to sleep]
nateberkopec has joined #ruby
Hanmac has joined #ruby
ewnd9 has joined #ruby
mgorbach has quit [Read error: Connection reset by peer]
<sickweezle>
Cucumber is ... interesting.
mgorbach has joined #ruby
<nycjv321>
I figured it out.
<nycjv321>
I'll take back everything I said about Cucumber.
* nycjv321
<- this guy is a idiot
<godd2>
I'm trying to understand it, but I don't really -get- testing in general. Maybe once I finish The RSpec Book I'll have a better idea.
nateberkopec has quit [Ping timeout: 264 seconds]
<nycjv321>
godd2: what don't you get about it?
<godd2>
nycjv321: well if I knew that I don't think I'd have a problem ;)
<nycjv321>
godd2: you test to prevent bugs from going into production simple as that. You don't want users to use your application and run into issues. You lose your users and you lose your revenue.
cbetta is now known as cbetta_afk
mocfive has quit [Remote host closed the connection]
<nycjv321>
Unit testing is first line of defense. There are loads of other testing mechanisms e.g. functional testing, service testing, load testing
<nycjv321>
godd2: I do functional testing for a living :)
<godd2>
nycjv321: I understand that, but it doesn't tell the whole story. You can over or under test and I can't find a clear explanation of how to find any kind of sweet spot
lioninawhat has joined #ruby
<BFF>
hey
<BFF>
everyone keeps tellin me about faeriemud
<BFF>
anyone know what server its on
<nycjv321>
godd2: the sweet spot? Like it depends on a couple of things -> Resources, Time, and Budget. You get 2 of three 3 things[C, Quality, Low Costs, Fast Development Time
thomasxie has joined #ruby
<nycjv321>
godd2: you need to deciede on what you want, you usually can't get all three ;)
SCommette has joined #ruby
<godd2>
nycjv321: well maybe that's the problem. I'm trying to learn testing with a pet project gem that I have no intention of selling
nari has joined #ruby
<godd2>
on the other hand, when I read definitions and reasons I try to look them up but then I just have more questions
ericmathison has joined #ruby
senayar has joined #ruby
<godd2>
FOr instance, I was trying to learn what the Single Responsibility Principle was. Trying to get an objective defintion that doesn't beg the question, and despite my google-fu skills, I never found a concise, clear explanation
kotk has quit [Ping timeout: 252 seconds]
<BFF>
anyone know faeriemud port
gja has joined #ruby
<BFF>
the ruby MUD
gja has quit [Changing host]
gja has joined #ruby
<nycjv321>
godd2: thats not testing thats just general programming..
lidenbrock has joined #ruby
Virtualize|away has joined #ruby
lidenbrock has quit []
<godd2>
I still couldn't find any definition that made sense, and they bring up the SRP in The RSpec Book which is touted as a kind of go-to book for testing.
Virtualize|away has quit [Client Quit]
<nycjv321>
godd2: the reason that is is a testing book isn't going to teach you how to program OO
senayar has quit [Ping timeout: 252 seconds]
starkhalo has joined #ruby
Virtualize has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
fire has joined #ruby
cleverma_ has quit [Remote host closed the connection]
dukz has joined #ruby
<jherman3>
Solnse, if you're still there, it looks like Mechanize has several bugs relating to NTLM authentication and they are dropping support in the next version anyway. I've noticed some of the bugs that they've posted so are there any alternatives that are similar to Mechanize?
dachi_ has left #ruby [#ruby]
dachi_ has joined #ruby
Wolland has joined #ruby
bricker`LA has quit [Quit: leaving]
Wolland has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
ndrei has quit [Quit: Lost terminal]
habanany1 has left #ruby [#ruby]
habanany has quit [Quit: Leaving]
ndrei has joined #ruby
mojjojo has joined #ruby
<Solnse>
jherman3: net/http
fedesilva has quit [Remote host closed the connection]
guyz has quit [Ping timeout: 245 seconds]
<Solnse>
it all depends on what you need, if you don't mind having a browser object on your server, you can use things like selenium to get the job done. But there's fewer options without a browser installed.
bigmac has joined #ruby
bigmac is now known as i8igmac
rahult has joined #ruby
Barrin6 has joined #ruby
ctp has joined #ruby
jherman3 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
digifiv5e has joined #ruby
digifiv5e is now known as Guest25259
browndawg has joined #ruby
io_syl has joined #ruby
ndrei has quit [Quit: Lost terminal]
rahult has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
ndrei has quit [Client Quit]
io_syl has quit [Read error: Connection reset by peer]
radic has quit [Ping timeout: 248 seconds]
ctp has quit [Ping timeout: 260 seconds]
fedesilva has joined #ruby
jay_m is now known as zz_jay_m
radic has joined #ruby
brianpWins has joined #ruby
tidu12 has joined #ruby
brianpWins has quit [Client Quit]
sski has quit [Remote host closed the connection]
tidu12 has quit [Max SendQ exceeded]
yaymukund has joined #ruby
sski has joined #ruby
cj3kim has joined #ruby
browndawg has quit [Quit: Leaving.]
cyberarm has quit [Quit: Bye]
e62 has joined #ruby
cantonic has joined #ruby
mojjojo has quit [Quit: mojjojo]
diegoviola has quit [Ping timeout: 260 seconds]
lioninawhat has quit [Remote host closed the connection]
diegoviola has joined #ruby
sski has quit [Ping timeout: 260 seconds]
cj3kim has quit [Ping timeout: 248 seconds]
deens has joined #ruby
lioninawhat has joined #ruby
e62 has quit [Ping timeout: 248 seconds]
ewnd9 has quit [Ping timeout: 264 seconds]
cashnguns has quit [Ping timeout: 260 seconds]
tyl has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Remote host closed the connection]
tyl has joined #ruby
tannerburson has joined #ruby
sski has joined #ruby
derick_skibotn has joined #ruby
deens has quit [Ping timeout: 265 seconds]
mary5030 has joined #ruby
jfoy has quit [Quit: jfoy]
thesheff17 has joined #ruby
dukz has quit [Remote host closed the connection]
diegovio1 has joined #ruby
fedesilva has quit [Remote host closed the connection]
diegovio1 has quit [Changing host]
diegovio1 has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
derick_skibotn has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
diegoviola has quit [Ping timeout: 248 seconds]
derick_skibotn has joined #ruby
snath has joined #ruby
dukz has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
nateberkopec has quit [Ping timeout: 260 seconds]
kuzushi_ has joined #ruby
gja has joined #ruby
troyready has quit [Ping timeout: 272 seconds]
dukz has quit [Ping timeout: 264 seconds]
kuzushi__ has quit [Read error: Operation timed out]
diegovio1 is now known as diegoviola
cashnguns has joined #ruby
TenJack has joined #ruby
nifty has joined #ruby
lioninawhat has quit [Remote host closed the connection]
drim has quit [Quit: drim]
TenJack has left #ruby [#ruby]
browndawg has joined #ruby
nifty has quit [Ping timeout: 248 seconds]
Targen has joined #ruby
aantix has joined #ruby
braincrash has quit [Quit: bye bye]
sassamo has quit [Read error: Connection reset by peer]
sassamo has joined #ruby
tannerburson has quit [Quit: tannerburson]
braincrash has joined #ruby
dukz has joined #ruby
dukz has quit [Remote host closed the connection]
ckinni has quit [Read error: Connection reset by peer]
ckinni_ has joined #ruby
derick_skibotn has quit [Ping timeout: 272 seconds]
speakingcode has quit [Ping timeout: 260 seconds]
ndrei has joined #ruby
browndawg has quit [Quit: Leaving.]
fire has quit [Quit: WeeChat 0.4.1]
tylersmith has joined #ruby
ckinni has joined #ruby
xue has joined #ruby
ckinni_ has quit [Ping timeout: 246 seconds]
godd2 has quit [Ping timeout: 252 seconds]
sski has quit [Remote host closed the connection]
sski has joined #ruby
ctp has joined #ruby
sski has quit [Remote host closed the connection]
sski has joined #ruby
ckinni_ has joined #ruby
alexfreidah has joined #ruby
ckinni_ has quit [Remote host closed the connection]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ckinni has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
yacks has joined #ruby
ctp has quit [Ping timeout: 245 seconds]
alexfreidah has quit [Ping timeout: 252 seconds]
dkamioka has joined #ruby
e62 has joined #ruby
Wixy has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 248 seconds]
tylersmith has quit []
tylersmith has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
jwang_ has joined #ruby
dkamioka has quit [Remote host closed the connection]
bjhaid has quit [Ping timeout: 272 seconds]
dkamioka has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
yfeldblum has joined #ruby
mary5030 has quit [Remote host closed the connection]
deens has joined #ruby
Seich has joined #ruby
freerobby has quit [Quit: Leaving.]
nateberkopec has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
BFF has quit [Ping timeout: 252 seconds]
bricker`LA has joined #ruby
deens has quit [Ping timeout: 252 seconds]
w4pm has quit [Ping timeout: 246 seconds]
tejas has joined #ruby
Wixy has joined #ruby
nateberkopec has quit [Ping timeout: 265 seconds]
melfy has quit [Ping timeout: 240 seconds]
dkamioka has quit [Remote host closed the connection]
Seich has quit [Ping timeout: 252 seconds]
gja has quit [Ping timeout: 252 seconds]
kate_r has joined #ruby
mykeus has quit [Ping timeout: 272 seconds]
Jdubs has quit [Remote host closed the connection]
melfy has joined #ruby
mykeus has joined #ruby
tejas has quit [Quit: This computer has gone to sleep]
deens has joined #ruby
tonythomas01 has joined #ruby
<tonythomas01>
when I give rvm install ruby-2.1.0 terminal shows Already installed ruby-2.1.0.
<tonythomas01>
To reinstall use:
<tonythomas01>
but, when I give ruby -v
<tonythomas01>
it shows ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
deens has quit [Ping timeout: 252 seconds]
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
browndawg has joined #ruby
melfy has quit [Read error: No route to host]
melfy has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
larissa has quit [Quit: Leaving]
jonahR has quit [Quit: jonahR]
kep1 has joined #ruby
kep1 has quit [Client Quit]
bsdbofh has quit [Ping timeout: 276 seconds]
<centrx>
tonythomas01, rvm is its own world
<centrx>
tonythomas01, rvm install does not install ruby on the general system, it installs ruby within rvm so you can use different versions of ruby and gemsets easily on the same system
<tonythomas01>
centrx: so how will I switch to my version ?
thesheff17 has quit [Remote host closed the connection]
<centrx>
tonythomas01, Are you trying to use rvm for some purpose?
<tonythomas01>
centrx: of course. for setting up mediawiki vagrant
<centrx>
tonythomas01, I meant using RVM as opposed to using Ruby, but nevertheless
<centrx>
tonythomas01, It looks like you just have to run rvm use 2.1.0
thesheff17 has joined #ruby
<centrx>
then when you do ruby -v it will use the ruby 2.1.0 you installed
<tonythomas01>
centrx: let me try
drim has joined #ruby
senayar has joined #ruby
e62 has quit [Ping timeout: 260 seconds]
<tonythomas01>
centrx: now it shows all right
huttan has quit [Quit: leaving]
nateberkopec has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
Wolland has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
thesheff17 has quit [Remote host closed the connection]
peregrin_ has quit []
tonythomas01 has quit [Ping timeout: 252 seconds]
diegoviola has quit [Quit: WeeChat 0.4.2]
krz has joined #ruby
sparrovv has joined #ruby
ctp has joined #ruby
bradhe has quit [Remote host closed the connection]
coderhs has joined #ruby
bradhe has joined #ruby
eka has joined #ruby
diegoviola has joined #ruby
sparrovv has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 246 seconds]
ctp has quit [Ping timeout: 276 seconds]
styped has joined #ruby
styped has quit [Max SendQ exceeded]
ace_striker has quit [Ping timeout: 272 seconds]
tonythomas01 has joined #ruby
dayepa has joined #ruby
pablo__ has joined #ruby
lioninawhat has joined #ruby
aantix has quit [Quit: aantix]
kuzushi__ has joined #ruby
pabloh has quit [Ping timeout: 264 seconds]
pablo__ has quit [Ping timeout: 252 seconds]
Xiti has quit [Quit: Leaving]
Xiti has joined #ruby
kuzushi_ has quit [Ping timeout: 260 seconds]
lioninawhat has quit [Remote host closed the connection]
eka has quit [Quit: Computer has gone to sleep.]
<nycjv321>
Is it possible with Net:HTTP to make simultanous requests within a single thread?
coderhs has quit [Quit: Leaving]
<nycjv321>
Are there other libraries maybe?
<nycjv321>
Typhoeus looks promising but is limited to 200 concurrent requests*
dukz has joined #ruby
<Oog>
if i have an array how do I "explode" it to pass the values individually to a function that takes a variable argument list?
kobain has quit []
<nycjv321>
In Ruby does a Thread instance correspond to a physical core ?
<centrx>
nycjv321, If something is making concurrent requests, it is probably running in multiple threads or processes
<bnagy>
threads never correspond to physical cores
kobain has joined #ruby
kobain has quit [Changing host]
kobain has joined #ruby
<nycjv321>
bnagy: what do they relate to? Like in Java if you make a new thread, I thought the JVM tries to distribute that thread to an available thread.
dukz_ has joined #ruby
<centrx>
nycjv321, Ruby is multicore except in certain circumstances
SCommette has quit [Quit: SCommette]
<bnagy>
uh
<bnagy>
like 'never' for MRI?
<bnagy>
I guess that's a 'certain circumstance'
Es0teric has joined #ruby
thesheff17 has joined #ruby
* nycjv321
facepalms
<centrx>
bnagy, I am thinking with C extensions
<nycjv321>
I am looking at this python app and trying to port some of its functionality. It advertises "simulation of million" of users.
<centrx>
bnagy, It might look like it is in Ruby, but apparently C extensions are single core
Megtastique has joined #ruby
<bnagy>
centrx: it doesn't look like it is al all for mri
<nycjv321>
I just realized its done via distribution of workload over multiple machines.
<bnagy>
as in only one ruby thread can run
dukz has quit [Ping timeout: 248 seconds]
<bnagy>
nycjv321: for io stuff like http gets you probably do just as well with some kind of greenthread / libev approach anyway
<bnagy>
io is super sloow
tonythomas01 has quit [Remote host closed the connection]
<bnagy>
tbh MRI mative threads are almost certainly going to slow you down
yaymukund has quit [Ping timeout: 252 seconds]
<bnagy>
compared to even just select()
<nycjv321>
bnagy: So like what do Ruby threads map to?
<bnagy>
for bulk downloady thing I _start_ at 200 concurrent conns
<bnagy>
just not in threads
<nycjv321>
Like if I create 10 threads and only have 4 cores. How does this work?
<havenwood>
nycjv321: Ruby threads map to system threads.
<bnagy>
new MRI threads are 'native' threads
<havenwood>
nycjv321: You can run 10 threads concurrently on one core.
<bnagy>
but only one thread can be running ruby code at any one time
<nycjv321>
Is there any benefit to doing this?
<mbff>
hello! I am trying to run options = Net::SSH.configuration_for(server,true) Net::SSH.start(nil,nil,options) do |ssh| and I am getting the following error: no implicit conversion of nil into String
<bnagy>
jruby threads are native and also parallel ( and concurrent, which is implied )
<nycjv321>
There is no benefit gained for creating more threads then cores then?
<bnagy>
but yeah native threads are heavy, especially if you want to spin a lot of them
nateberkopec has joined #ruby
BrixSat has quit [Remote host closed the connection]
<mbff>
I need to set the first two args to nil because the has of host contains everything SSH.start needs
<centrx>
nycjv321, The cores are used anyway, if you have a single thread, it uses multiple cores
BrixSat has joined #ruby
<havenwood>
nycjv321: There are big benefits sometimes. Some things let go of the GVL (global vm lock).
fgo has quit [Remote host closed the connection]
<bnagy>
centrx: sorry but that's just a misleading thing to say
<bnagy>
all threads use multiple cores. Just that MRI won't use more than one at once
<mbff>
I looked up the error, I could't find anything specific to net/ssh.
<bnagy>
ie concurrent but not parallel
sergicles has quit [Quit: sergicles]
<mbff>
why does SSH.start require 3 arg's , that's what doesn't make any sense to me...
<bnagy>
nycjv321: there is huge benefit sometimes to creating more threads than cores
senayar has joined #ruby
<bnagy>
in fact, the only time you _don't_ win is when you have a completely CPU bound app
<nycjv321>
bnagy: I'm a noobie. Could you educate me? :)
<nycjv321>
and/or point me to documentation?
<bnagy>
any time you are using eg io your threads or coroutines or whatever are spending dead time waiting
<bnagy>
in which time other stuff could be using the cpu
<centrx>
mbff, "the has of host contains everything SSH.start needs" What does this mean? It sure looks like Net::SSH.start requires the first two arguments
<havenwood>
nycjv321: Jesse Storimer has some great blog posts, but if you want to really learn Ruby Threads checkout his book on Threads: http://www.jstorimer.com/
<bnagy>
downside being that threads are expensive ( ram ) to create and ( scheduler ) to switch between
<mbff>
right but those first two args are within the hash the configuration_for makes
Vivekananda has quit [Quit: Ex-Chat]
<mbff>
so first I make "options" and then use it in SSH.start.
dukz_ has quit [Ping timeout: 264 seconds]
<havenwood>
nycjv321: Threads share memory, tend to run in parallel for IO but block for computation etc. Processes don't share memory, and can always run in parallel (given more than one core).
<centrx>
mbff, Okay, the method definition for #start requires the first two arguments. You can do it this way:
<mbff>
options already has info on the user and the ip address...
nateberkopec has quit [Ping timeout: 272 seconds]
Megtastique has quit []
<centrx>
mbff, If you want to use the configuration_for options in one line, do Net::SSH.start(options.delete(:host), options.delete(:user), options)
<bnagy>
havenwood: well there's no implicit reason for threads to not run in parallel
<centrx>
mbff, the #start method expects the first two arguments to have the host and user, not the third argument with options
<bnagy>
I mean in MRI, yes, very agree with entire statement
<havenwood>
bnagy: Well, if one grabs the GVL. Hard to talk about threading casually because so many caveats.
senayar has quit [Ping timeout: 252 seconds]
<havenwood>
bnagy: aye, meant MRI
<centrx>
mbff, Actually, maybe allows a strange way of doing it with the options hash
<mbff>
i tried your idea, the same error appeared: rake aborted! no implicit conversion of nil into String
<centrx>
mbff, What is the contents of "options"
<mbff>
hold, i may have screwed something up
<mbff>
hold on*
e62 has joined #ruby
deens has joined #ruby
<mbff>
ok, it wasn't me...
<mbff>
contents of options?
<mbff>
like in the .ssh/config file?
<centrx>
The options variable
<mbff>
options is hash of everything from the variable "server"
_5kg has quit [Ping timeout: 272 seconds]
<mbff>
which corresponds to a host entry
OdNairy has joined #ruby
<mbff>
Host,HostName,Port,User,IdentityFile
timonv has joined #ruby
e62 has quit [Ping timeout: 252 seconds]
<centrx>
mbff, Okay, well that is not the format Net::SSH expects options to be in
<nycjv321>
havenwood: I'm guessing the concepts talked about in that book are applicable to any other language?
deens has quit [Ping timeout: 264 seconds]
<mbff>
well I don't know if it is in that order... configuation_for is supposed to handle that, correct?
ranmocy has joined #ruby
<nycjv321>
havenwood: what do u mean by "tend to run in parallel for IO but block for computation etc. "
<centrx>
mbff, I don't know, that is why I referred to the contents of the options variable after configuration_for is run
<havenwood>
nycjv321: I said that badly, i meant in MRI**
<centrx>
mbff, You look at that, and then you look at what Net::SSH.start expects
<centrx>
mbff, That is where the error lies
<havenwood>
nycjv321: So in MRI if you send six threads to go download an archive and unzip it, all size will download in parallel, but the unzipping will block and only one thread at a time can do that part at once.
<havenwood>
all six*
<nycjv321>
oh wow
mlpinit has quit [Remote host closed the connection]
<centrx>
havenwood, That sounds incorrect?
<nycjv321>
havenwood: is this standard? io is always parrellel and compution is single threaded?
<bnagy>
nope, it's right
<havenwood>
nycjv321: If you wanted to unzip in parallel you'd need to use forking or a Ruby implementation that doesn't have a GVL/GIL.
<bnagy>
cause the 'downloading' is mostly the os doing stuff
<mbff>
centrx, I did a puts on options and got this back >>> {:send_env=>[/^LANG$/, /^LC_.*$/]}
<centrx>
Why would six threads only be able to unzip one thing at a time
<centrx>
mbff, Not much there :)
timonv has quit [Ping timeout: 272 seconds]
<bnagy>
so there are OS socket buffers filling up in kernel etc
<bnagy>
centrx: because only one thread runs native ruby code at a time in MRI
<bnagy>
because GVL / GIL / whatever you want to call it
ranmocy has quit [Read error: Connection reset by peer]
m00nlight has quit [Ping timeout: 252 seconds]
<mbff>
centrx, that is because the host isn't valid
<mbff>
i am testing to see if my rescue statements cover that situtation
<mbff>
how would I rescue something like that?
<nycjv321>
havenwood: how does it know to do io in parrellel and compution as a single thread?
<bnagy>
io is mostly syscalls
<bnagy>
as in the OS is doing most of it
alexfreidah has joined #ruby
ctp has joined #ruby
thomasxie has quit [Ping timeout: 264 seconds]
Jetchisel has quit [Ping timeout: 252 seconds]
<mbff>
centrx, problem solved. Thanks!
<nycjv321>
havenwood: I think I am going to buy Working with Ruby Threads
<centrx>
Disk is I/O though, and slower than the CPU
<havenwood>
nycjv321: Worth getting, great way to really get a grasp on threading (which tends to be a pain!)
<havenwood>
nycjv321: Nice to keep around as a reference too.
<nycjv321>
havenwood: besides explaining how threads work in ruby, is any of the information applicable to just concepts applicable to any language (just curious)?
<havenwood>
mutexes, semaphores and condition variables, oh my!
<havenwood>
nycjv321: yeah, mostly so - a lot of general Unix threading background
diegovio1 has joined #ruby
diegovio1 has quit [Changing host]
diegovio1 has joined #ruby
fgo has joined #ruby
<nycjv321>
havenwood: thank you for the reccomendation.
<havenwood>
nycjv321: no prob, hope you like
diegoviola has quit [Ping timeout: 260 seconds]
alexfreidah has quit [Ping timeout: 252 seconds]
ehc has joined #ruby
ctp has quit [Ping timeout: 252 seconds]
<bnagy>
nycjv321: imvho I'd try and focus less on threads if you're just learning concurrency patterns
<bnagy>
they're kind of a crap model tbh
szerated has joined #ruby
<nycjv321>
bnagy: what do u mean? (I'm a noob :) )
<bnagy>
'modern' patterns tend to try and avoid pretty much everything that threaded programming promotes
<bnagy>
shared memory etc
<bnagy>
it's tricksy, and it doesn't really scale beyond a single system
havenwood has quit [Remote host closed the connection]
<bnagy>
plus thread stuff is racy and locky :/
<bnagy>
it might actually cause cancer
<nycjv321>
lol
* nycjv321
actually understood that reference :D
cj3kim has joined #ruby
vlad_starkov has joined #ruby
rippa has joined #ruby
<bnagy>
still, lots of people like them, and it's good to be comfortable with them, just so you can show people the mutex scars
browndawg has quit [Quit: Leaving.]
<bnagy>
I'm a sign, not a cop
gja has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
havenwood has quit [Read error: Connection reset by peer]
kobain has quit []
coderhs has joined #ruby
diegovio1 is now known as diegoviola
w4pm has joined #ruby
Lulzon is now known as LulzonAway
charlies_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
yfeldblum has quit [Remote host closed the connection]
w4pm has quit [Ping timeout: 272 seconds]
fgo has quit [Remote host closed the connection]
sassamo has quit [Read error: Operation timed out]
Jetchisel has joined #ruby
sassamo has joined #ruby
nateberkopec has joined #ruby
rezzack has quit [Read error: Operation timed out]
rezzack has joined #ruby
<nycjv321>
man I'm looking at that book havenwood reccomended.
<nycjv321>
Already informative!
<chipotle>
how to program by pine?
<bnagy>
no pine is an email client you want nano
nateberkopec has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
<nycjv321>
So a Ruby thread != CPU Thread?
geggam has quit [Remote host closed the connection]
<bnagy>
what's a cpu thread?
<nycjv321>
Well core? Like I have a i3 which is dual core hyper threading. So it effectivelly has 4 core, or 4 threads that it can deal with concurrently.
<nycjv321>
I always looked at threads as being processes
mois3x has quit [Read error: Connection reset by peer]
<bnagy>
HT is.. not threads
bjhaid has joined #ruby
<bnagy>
honestly, don't even try to start looking at CPU stuff
<nycjv321>
why?
<bnagy>
not until you have a grasp of OS threads
<bnagy>
ideally for >1 os
Es0teric has quit [Quit: Computer has gone to sleep.]
<bnagy>
well because CPUs don't give a crap about OS threads
mois3x has joined #ruby
<nycjv321>
bnagy: ok
<bnagy>
they do stuff like, say you have an if statement? Hey, I'll just run the code for both outcomes BECAUSE I CAN
<bnagy>
and then you know, once I work out the result of the test IRL I'll give you the right result
<bnagy>
or like, I know you think you need to test this all the time, but between you and me it's 99% going to not be true, so screw you I'll just inline it as a loop
mois3x has quit [Client Quit]
<bnagy>
and then once in a while recover messily
<bnagy>
but yeah HT lies, like like threading is fundamentally a lie
<bnagy>
if you have 4 tight loops HT won't help you compared to 4 real cores
mercwithamouth has joined #ruby
thesheff17 has quit [Ping timeout: 260 seconds]
<bnagy>
like intel goes high clock plus trix, AMD goes lower clock plus real cores
<bnagy>
most normal people want intel irl
<nycjv321>
bnagy: ah
w4pm has joined #ruby
mocfive has joined #ruby
Barrin6 has quit [Quit: Leaving]
w4pm has quit [Ping timeout: 272 seconds]
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
Hobogrammer_ has joined #ruby
visof has joined #ruby
Hobogrammer has quit [Ping timeout: 252 seconds]
popl has joined #ruby
popl has joined #ruby
szerated has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 264 seconds]
sassamo has quit [Ping timeout: 272 seconds]
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
starkhalo has quit [Ping timeout: 265 seconds]
yaymukund has joined #ruby
gsvolt__ has joined #ruby
gsvolt has quit [Ping timeout: 252 seconds]
ctp has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
Zespre has quit []
fgo has joined #ruby
coda23 has joined #ruby
claymore has joined #ruby
melfy has quit [Ping timeout: 240 seconds]
jcp has joined #ruby
jcp is now known as Guest62441
ctp has quit [Ping timeout: 260 seconds]
wtfitsme has quit [Ping timeout: 252 seconds]
fgo has quit [Ping timeout: 265 seconds]
rhys has quit [Read error: Connection reset by peer]
melfy has joined #ruby
Kruppe has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 272 seconds]
szerated has joined #ruby
wallerdev has quit [Quit: wallerdev]
vlad_starkov has joined #ruby
cj3kim has joined #ruby
rhys has joined #ruby
flagg0204_ has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
flagg0204 has quit [Ping timeout: 240 seconds]
melfy has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<ktosiek>
looking through koans I see one can run methods on self with explicit or implicit receiver - which style is more popular?
dfcnvt has joined #ruby
rylinaux has joined #ruby
pixelgremlins_ba has joined #ruby
pushpak has joined #ruby
amclain has quit [Quit: Leaving]
kuzushi__ has quit [Quit: Leaving]
pixelgremlins has quit [Ping timeout: 252 seconds]
krz has quit [Quit: WeeChat 0.4.2]
<apeiros>
ktosiek: without `self.`
Wolland has joined #ruby
<ktosiek>
apeiros: thanks
<Hanmac>
you only night need self. when you have variables with the same name as the method or for private setters
KK4MGV has joined #ruby
Lewix has quit [Remote host closed the connection]
coderhs has quit [Ping timeout: 272 seconds]
braddeicide has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
<ktosiek>
isn't that what @ is used for?
arietis has quit [Quit: Computer has gone to sleep.]
<shevy>
ktosiek he only refers to the few cases where self. may be important to use to satisfy the ruby parser
yfeldblum has joined #ruby
mehlah has joined #ruby
fgo has joined #ruby
nateberkopec has joined #ruby
xue has quit [Remote host closed the connection]
bricker`LA has quit [Read error: Connection reset by peer]
<pontiki>
heyhey
vlad_starkov has joined #ruby
<Hanmac>
ktosiek: yes and no
yjmsf20 has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
<shevy>
lol
<shevy>
a haskell monad answer
<shevy>
Maybe
cj3kim has joined #ruby
<Hanmac>
ktosiek & shevy: for sample in one of my classes i have a "data" and a "data=" method, and also a @data variable, but both return different things (@data is an Array, while "data" returns the compressed string representation)
cbetta_afk is now known as cbetta
<shevy>
that would kill me
vlad_starkov has quit [Read error: Connection reset by peer]
<shevy>
C++ spoiled you man
nateberkopec has quit [Ping timeout: 252 seconds]
eka has joined #ruby
<Hanmac>
if you find a nicer whay you can try to rewrite it ;P
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
darthdeus has quit [Read error: Connection reset by peer]
<ciwolsey>
im probably not going to be writing them myself but i have a problem using stuff i dont at least understand when writing rails stuff
Sammael has joined #ruby
alexfreidah has joined #ruby
popl has quit [Quit: Hoppe hoppe Reiter]
hiall_ has joined #ruby
asteros has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
hiall has quit [Ping timeout: 252 seconds]
hiall_ is now known as hiall
gja has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
SCommette has joined #ruby
as-cii has quit []
araujo has joined #ruby
araujo has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
jhaals has joined #ruby
<coder_neo>
guys need a little help with testing a gem, the travis build fails, but on my local machine the same test cases seems to pass, I have also tested with drone.io and it passes on drone.io
achru_ has quit [Remote host closed the connection]
doodlehaus has quit []
dukz has quit [Ping timeout: 252 seconds]
dukz has joined #ruby
tvw has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
kotk has joined #ruby
mercwithamouth has joined #ruby
aaronmcadam has joined #ruby
estebistec has joined #ruby
Lewix has joined #ruby
brain_shim has joined #ruby
browndawg has quit [Quit: Leaving.]
afhammad has joined #ruby
fijimunkii has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
Soda has joined #ruby
fijimunkii has joined #ruby
Keita\raimat has joined #ruby
speakingcode has joined #ruby
habanany has joined #ruby
yfeldblum has joined #ruby
mhenrixon is now known as mhenrixon|afk
Keita\raimat has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
pierre1 has joined #ruby
tjbiddle has joined #ruby
DanAndreasson has joined #ruby
godd2 has joined #ruby
freerobby has joined #ruby
pierre1 has quit [Max SendQ exceeded]
pierre1 has joined #ruby
araujo has joined #ruby
araujo has quit [Read error: Connection reset by peer]
tjbiddle has quit [Client Quit]
cj3kim has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
yaymukund has quit [Ping timeout: 252 seconds]
freerobby has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
felixjet_ has joined #ruby
cafhacker has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
thumpba has joined #ruby
<shevy>
design question
<shevy>
I have a hash in a class
<shevy>
but I also may have @ivars for some keys
<shevy>
like hash = { :foo => 'abc' }
<shevy>
and @foo would also point at 'abc'
<shevy>
I am wondering why I have @ivars at all
<shevy>
seems useless or?
<MrZYX>
yup, seems so
jtdowney has quit []
<godd2>
depends on how you want to access values
jtdowney has joined #ruby
<godd2>
instance_of_class.hash_name[:foo] vs instance_of_class.foo or both
<MrZYX>
no problem with defining def foo; @hash[:foo]; end
<shevy>
yeah
visof has quit [Ping timeout: 272 seconds]
<shevy>
I dont remember why I used @ivars in the first place
tyl has joined #ruby
<shevy>
there are like 10 different @ivars and about 30 different keys in the hash, with about 7 @ivars being just pointers to 7 keys in that data-hash
DanAndreasson has quit [*.net *.split]
habanany has quit [*.net *.split]
estebistec has quit [*.net *.split]
ewnd9 has quit [*.net *.split]
AlSquirrel has quit [*.net *.split]
canton7 has quit [*.net *.split]
synergy__ has quit [*.net *.split]
ringaroses has quit [*.net *.split]
sivoais has quit [*.net *.split]
alexherbo2 has quit [*.net *.split]
spider-mario has quit [*.net *.split]
OdNairy has quit [*.net *.split]
felixjet has quit [*.net *.split]
DaZ has quit [*.net *.split]
binw has quit [*.net *.split]
zmansiv has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
SirCmpwn has quit [*.net *.split]
andredieb has quit [*.net *.split]
linduxed has quit [*.net *.split]
Pixels has quit [*.net *.split]
jibi has quit [*.net *.split]
wlanboy has quit [*.net *.split]
go|dfish has quit [*.net *.split]
Rennex has quit [*.net *.split]
soukihei has quit [*.net *.split]
theRoUS has quit [*.net *.split]
vongrippen has quit [*.net *.split]
speakingcode-wor has quit [*.net *.split]
Freeaqingme| has quit [*.net *.split]
mosez has quit [*.net *.split]
oz has quit [*.net *.split]
yellow5 has quit [*.net *.split]
awarner_ has quit [*.net *.split]
nuck has quit [*.net *.split]
Bish has quit [*.net *.split]
sn0wb1rd has quit [*.net *.split]
popl has quit [Quit: Hoppe hoppe Reiter]
DanAndreasson has joined #ruby
vongrippen has joined #ruby
soukihei has joined #ruby
zmansiv has joined #ruby
theRoUS has joined #ruby
Pixels has joined #ruby
estebistec has joined #ruby
TheMoonMaster has joined #ruby
Bish has joined #ruby
OdNairy has joined #ruby
SirCmpwn has joined #ruby
binw has joined #ruby
mosez has joined #ruby
sivoais has joined #ruby
andredieb has joined #ruby
Freeaqingme| has joined #ruby
ewnd9 has joined #ruby
jibi has joined #ruby
nuck has joined #ruby
linduxed has joined #ruby
canton7 has joined #ruby
go|dfish has joined #ruby
ringaroses has joined #ruby
DaZ has joined #ruby
wlanboy has joined #ruby
speakingcode-wor has joined #ruby
habanany has joined #ruby
synergy__ has joined #ruby
oz has joined #ruby
sn0wb1rd has joined #ruby
awarner_ has joined #ruby
AlSquirrel has joined #ruby
Rennex has joined #ruby
yellow5 has joined #ruby
pu22l3r has quit [Excess Flood]
spider-mario has joined #ruby
pu22l3r has joined #ruby
fijimunkii has quit [Read error: Connection reset by peer]
<DouweM>
ciwolsey: we still use the tab key, it's just 2 spaces in code
bashdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Morrolan>
ciwolsey: You absolutely have to hit space twice!
<BFF>
gotcha
<DouweM>
ciwolsey: so yeah, that's okay and that's what we all do
<DouweM>
Morrolan: ;)
<Cope>
but i can't seem to work out how to get values - I want the lp1:creationdate value
<ciwolsey>
ok :)
claymore has quit [Ping timeout: 264 seconds]
<Cope>
any suggestions?
<DouweM>
BFF: you can update the gist, please do so we can see the changed version
<MrZYX>
BFF: so, character in new_character is a local variable, it ceases to exist when the method finishes
<BFF>
im making account now
<BFF>
gotcha!
<BFF>
scoped wrong
gja has quit [Client Quit]
<chipotle>
hi all, anyone have some advice for a new ruby programmer? this is my first programming language... i'm starting with chris pine's learn to program, then the well grounded rubyist
<MrZYX>
BFF: two options: return the new Player object from your method and pass it along all the time or make the whole thing a class and use an instance variable
Schmidt has quit [Ping timeout: 272 seconds]
<chipotle>
i started with zed shaw's learn python the hard way, but i wasn't grasping it completely and i've heard good things about ruby
<DouweM>
BFF: please make the whole thing a class and set the character as in ivar :)
fedesilv_ has joined #ruby
claymore has joined #ruby
claymore has quit [Changing host]
claymore has joined #ruby
DanAndreasson has quit [Ping timeout: 252 seconds]
<DouweM>
chipotle: advice is to keep with it and ask questions here if you can't figure it out ;) the books you're using are good
w4pm has quit [Ping timeout: 252 seconds]
<BFF>
im gettin there
<BFF>
making account
<BFF>
ok
<chipotle>
DouweM: do you recommend going to the local meetups? i live in boston and they have a monthly meeting
<Dude007>
chipotle: Ruby is quite high level language. It's easy to learn but if you wanna be a good programmer you should probably start with a lower lvl language. For example C :) It teaches you how to handle memory for example, how does pointers work :)
<DouweM>
chipotle: it might be a bit too much right now, you probably won't understand most of the talks, but they're probably willing to help a newbie out
LekeFly has joined #ruby
<BFF>
grr
<DouweM>
Dude007: I would say those aren't relevant at the moment, and chipotle can learn those *later* if they want to know more about low level programming languages and theoru
<BFF>
is there a way to change it from text to ruby after i put it out
fedesilva has quit [Ping timeout: 248 seconds]
<DouweM>
BFF: edit, and by the filename should be the file type
<BFF>
thanks
saarinen has joined #ruby
<chipotle>
i heard C is a pretty difficult language
m00nlight_ has quit [Ping timeout: 260 seconds]
<chipotle>
lots of syntax
<DouweM>
chipotle: to start of with, and compared to the likes of ruby and python? sure
<DouweM>
chipotle: syntax isn't really the issue, mostly the low level stuff you have to deal with
<MrZYX>
Cope: quick and dirty: doc.xpath("//lp1:creationdate", 'lp1' => "DAV:")
<ciwolsey>
you get yourself a good book on c and theres no reason you cant start with it
<DouweM>
chipotle: I would advice starting off with Ruby, Python whatever, and checking out C later if you need it. Which could be never
<ciwolsey>
c was one of the first languages i learnt
postmodern has quit [Quit: Leaving]
<DouweM>
ciwolsey: sure, but Ruby is a lot more accessible
<ddd>
douwem explain that comparison to 'the likes of ruby.."
<ciwolsey>
certainly
relix has joined #ruby
Schmidt has joined #ruby
<ddd>
you can be just as good a programmer learning Ruby
<DouweM>
ddd: I mostly mean high level languages like Ruby, Python, JS
<BFF>
ok so i should make the entire game a class ?
mlpinit has joined #ruby
<ddd>
and the next level down would of course be C
<ddd>
so not sure the reference there
<Cope>
MrZYX: ok.. how does that work? do I need to go and read about xpath?
<ddd>
oh i get you now
<MrZYX>
Cope: certainly, it's a useful tool when working a lot with xml
<DouweM>
ddd: what I meant to say is that C isn't difficult per se, but that it can be regarded as such compared to ruby and the likes
<DouweM>
ddd: :)
<ddd>
the details the language handles for you that C would not, thus learn C in order to see what it is that Ruby is actually managing for oyu
<ddd>
s.oyu.you.
<Dude007>
chipotle: C is low level language. Ruby is high level. In ruby you basically don't care about memory management. Pointers etc.. Ruby does it for you. This can be both advantage or disadvantage. When you write something in Ruby it's 'compiled' to C in background
<DouweM>
right. which is the whole point of high level languages :)
<BFF>
if i do a line def new_character then Character = Player.new
<chipotle>
what does high level mean?
<BFF>
will changing it to a constant open its scope?
<ddd>
douwem right. I just missed your point. took me a second to reread the backlog to catch it
<ddd>
nm :)
<shevy>
you sit on top of the food chain chipotle
<shevy>
rather than dig down to the ugly core
<Mon_Ouie>
Dude007: No it isn't. In YARD, bytecode is generated and run by a VM
<DouweM>
think of pyramid with the width of the level (row of stones? something like that) the amount of stuff you have to worry about
<Cope>
MrZYX: can you give me a quick summary of what that did and how, and then I'll go and find out more.
<chipotle>
why would i use C over ruby?
<shevy>
SPEED
<DouweM>
chipotle: smaller footprint
chrisseaton has joined #ruby
<DouweM>
so it's most popular right now in embedded devices
<ddd>
douwem yeah, i don't disagree with your statement at all. Learning C will teach you the low-lvl stuff that the higher languages abstract away for you.
<chipotle>
my goal in programming is to build webapps. mainly because i don't know what other apps i would build and i'm coming from a drupal background, building websites
<chipotle>
lie raspberry pi?
<MrZYX>
Cope: I just googled how to use that with namespaces and nokogiri, but //creationdate just says to search for that element anywhere in the (sub)tree
<shevy>
THEN DO YOU THINK WILL YOU NEED C
<DouweM>
ddd: yeah, misunderstanding caused by backlog :)
<DouweM>
chipotle: more embedded even
v0n has quit [Read error: Operation timed out]
<DouweM>
chipotle: for web apps, don't go with C even though it's possible. Ruby is fine
<ddd>
chipotle well Ruby does a LOT more than just websites. Yes, you can use the Rails framework or osmething like ramaze which (imho) is a better 'rails'
<chipotle>
i heard sinatra is quite nice
<ddd>
but don't think that because of rails, or rather without rails, that ruby is .. useless?..
<chipotle>
havenwood is going to be my mentor, we are going to touch base once a week. he's charging $50 an hour which i think is more than reasonable
<DouweM>
Haven't played with Ramaze yet. Looks nice
<chipotle>
i think it's a good idea to have a mentor that can help you learn programming?
<DouweM>
chipotle: you can't go wrong with havenwood :)
<Cope>
MrZYX: yeah I knew about // search, but what's the 'lp1' => "DAV:" bit?
<chipotle>
he's really nice
mlpinit has quit [Ping timeout: 260 seconds]
<ddd>
douwem my friend manveru wrote ramaze. very well done
<Dude007>
chipotle: For web apps Ruby is good enough. It does so much for you. In C you would need to do everything manually. Anyway, having a C background is good because then you understand how things work
<DouweM>
chipotle: I didn't have a mentor or anything when I first started programming, probably like most here, but I think it would've been nice
<ddd>
douwem might want to play with it for awhile, see what you think
<chipotle>
Dude007: i see, so can i study C after i get comfortable with ruby?
e62 has joined #ruby
<MrZYX>
Cope: redefining the namespace, since it seems to have trouble with the declaration
<chipotle>
DouweM: yeah, i think it's a good idea, to make sure i understand the difficult topics
<DouweM>
chipotle: yeah
<ddd>
douwem hehe true that. i'm 100% self taught, and did so late in life (I'm in my 40s). Might have been a lot easier if I'd had a mentor to work with
<chipotle>
and i don't just gloss over them
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chipotle>
ddd: nice!
<ddd>
but then again, what i have learned is hard won so it's worth more i guess you could say
<Dude007>
chipotle: Of course. I would say a lot of programmers including me started with a high level language (I started with php) and now I am going back to roots with C and assembler :)
<DouweM>
ddd: I was 9, not sure who would have put up with mentoring me at that point :P
cashnguns has joined #ruby
<ddd>
hehe
<chipotle>
i'm in my mid 20s, i have a phd in physics but i want to be a programmer
<chipotle>
there's few jobs in string theory, unfortunately
<ddd>
douwem what are you now if i might ask?
<DouweM>
20
<ddd>
chipotle dude, I eat everything i can about physics and astrophysics
<ddd>
no formal training at ALL but i love the stuff
<chipotle>
Dude007: php is such a difficult language, because from what i understand, is there's a lot of crappy code
<ddd>
i can understand most of the concepts even if I suck like a vaccum cleaner at the actual math
<DouweM>
PHP is a terrible language
<Dude007>
chipotle: You can write a bad code in any language :)))
<chipotle>
i hope to still work with drupal, even after learning ruby. but i don't know much php (i've hacked together some drupal modules but nothing from scratch)... i am hoping after learning ruby, i can pick up php quickly?
fantazo has joined #ruby
<chipotle>
ddd: :) the corrected feynman lectures just came out
<DouweM>
not sure why you'd need php knowing ruby
<chipotle>
would you like a copy?
<chipotle>
it is the most beautiful way to learn physics
<BFF>
awesome
<BFF>
fixed it
<BFF>
i just made the variable global
<BFF>
thanks everyone
<BFF>
i will fix my funny indentation and bug yall later im sure
banisterone has joined #ruby
<banisterone>
Hi girls
<chipotle>
DouweM: to build drupal modules....
<DouweM>
BFF: omg no global vars
<ddd>
douwem damn, most of the people i meet working with this language, and others, are in their 20s or ealy 30s. the far far side are people in their 50s and 60s that still irvc because they're used to that as their medium, and have been involved with the major aspects of computing
sassamo has joined #ruby
<ddd>
weird ride
<MrZYX>
BFF: nooooo, forget that global vars exist! now!
<DouweM>
chipotle: ah right, if you still need todo that, you'll have to learn PHP. It'll probably be easier when you already know Ruby, but it's quite a bit different. Less OO, for one
<chipotle>
less OO in php?
<ddd>
chipotle got a url? for me it was people like Hawking, Kaku, Greene, and Sagan that got me hooked on physics, and astronomy/astrophysics
<ddd>
douwem I got hurt on Active Duty, can't do the heavy jobs anymore, so I needed to reinvent myself
<chipotle>
ddd: i'm sorry. i have a similar problem, kind of
yfeldblum has joined #ruby
<ddd>
chipotle nothing to be sorry about, you're not the towelhead that tried to kill me. :shrug:
<chipotle>
i had six right knee surgeries and have chronic right knee pain. i take oxycontin every day. that's the reason i'm not working in a lab anymore, and i'm trying to be a programmer
<Dude007>
chipotle: Ruby is 'pure' Objective oriented language. To be honest PHP in OO bit sucks. :) Anyway, I just wanted to point on the thing that you can start with ruby and go back to C, C++, Objective C etc.. later
<shevy>
go PHP
<shevy>
after 2 years you will switch
<ddd>
yeah, i live on vicodin to make it through my days. pain is a daily companion. at first it was really tough, but an gunny got me thinking along the track of 'if you hurt, you're still alive so stfu'
<chipotle>
ok, i'll learn ruby first, then i'll learn php so i can be a better drupal programmer
<shevy>
no go with php
<DouweM>
chipotle: just so you know, shevy is our village troll
<chipotle>
i figure once i understand ruby, i'll be unstoppable picking up new languages
<banisterone>
Dude007: way harder to go from high to low than low to high imo
<DouweM>
ddd: jeez
<shevy>
and DouweM is our village crossdresser
sassamo_ has quit [Ping timeout: 264 seconds]
<DouweM>
:')
<Dude007>
banisterone: Indeed
<banisterone>
chipotle: wrong, some paradigms are so different ruby is very little help
<shevy>
chipotle ruby won't help you that much with haskell :)
<DouweM>
chipotle: but yeah, that's just for imperative programming, not so much functional languages like Haskell
<chipotle>
scott aaronson told me that once you learn one language, it's easy to pick up a new one. i guess he was wrong
<DouweM>
within the same paradigm, sure
<chipotle>
what is a functional language? i don't understand
jherman3 has quit [Remote host closed the connection]
<ddd>
chipotle i'm not 'great' as a programmer, and i ask a lot of what others might think are dumb questions because there's serious holes in my knowledge base, but love programming.
<shevy>
it's true but the question is - why would you want to pick up inferior languages after you got a GOOD language?
<ktosiek>
it's easy to pick up similar ones ;-)
<ddd>
i wake up every day just to beat my head on it :)
<ddd>
shevy backfilling skills
<ddd>
shevy there's still a call for C, C++, and java programmers out there. You see it on the job boards all the time
Wolland has joined #ruby
<Dude007>
chipotle: If I would have a chance to go back I would firstly learn C and Objective C (or C++) first. But knowing PHP and Ruby gave me resources (money) so I can learn it now :)
<chipotle>
shevy: because i have a drupal background
<DouweM>
chipotle: look up functional progamming and imperative progamming
<ktosiek>
ddd: that's pretty much what learning is about, when you stop doing this you either know everything or something is wrong ;-)
<chipotle>
and i want to continue building drupal apps
<ddd>
ktosiek hehe damned straight :)
<DouweM>
chipotle: why not learn PHP then? :/
<Dude007>
chipotle: Then go with PHP
<chipotle>
Dude007: yeah, that's a good point. why are ruby devs paid so much? i have a friend who just got hired at harvard business school making $100/hr as a ruby dev for a 1 year contract
<DouweM>
chipotle: if drupal is what you want to do
<chipotle>
DouweM: because i want to move into building ruby apps
<chipotle>
that's the ultimate goal
<DouweM>
chipotle: ah, right.
<chipotle>
but i want to be able to work with drupal too, but as a side project
yfeldblum has quit [Ping timeout: 265 seconds]
<ktosiek>
if you start with Ruby you'll hate PHP
<ktosiek>
a lot
<chipotle>
ultimately, i want to work on a startup in boston
peregrin_ has quit []
<DouweM>
if you start with PHP you'll hate PHP
<ddd>
ktosiek i work from home, don't go to bed usually until 2 or 3am, and spend the time on irc channels related to programming, watching videos, reading ebooks, practicing in pry, bugging the shit out of people for solutions to whatever i don't understand etc.
<ddd>
i'm working on a real world rails app for my wife, when i complete that i'll be back on dtgf
<ddd>
err dtf
<DouweM>
dtf?
<ddd>
Deryl's Testing Framework
<Mon_Ouie>
It's quite funny that people usually agree that there is no answer to the 'which language is better' question, unless it's PHP or Brainfuck.
<banisterone>
DouweM: down to f*ck
<ddd>
modular framework for testing RVM and the like
<DouweM>
banisterone: yeah, that one I got :P
<ddd>
github.com/dtf-gems/dtf
<shevy>
chipotle start with php
<DouweM>
Mon_Ouie: :)
DanAndreasson has joined #ruby
<Dude007>
chipotle: Don't listen to them :D The best way is not to hate any language. Learn them all so you can decide which language to use 'project' based. Every project is different, sometimes is better to use for example node.js. Ruby for example sucks in speed
<ddd>
douwem it was my first attempt at a real-world real-usage framework
<banisterone>
DouweM: Ddd is still innocent about the unfortunate name of his project ;)
<DouweM>
ddd: do you have an example?
<ddd>
banisterone hah! no I just choose to pretend you're being nice
<ddd>
douwem err? look at the repo
<DouweM>
lol
<DouweM>
yeah, completely missed that. went straight for the readme, where I didn't see it
sparrovv has quit [Remote host closed the connection]
<ddd>
basically you create Analysis suites where you can db record test runs, marshal them out, replay them later, compare environment and previous error situations, then compare the environments and internal structures to make testing a bit easier
Advocation has quit [Quit: Advocation]
<DouweM>
huh, interesting
<ddd>
pick and choose from different analysis sets to build upon for different situations
MrZYX is now known as MrZYX|off
nateberkopec has joined #ruby
<ddd>
everything from installing a particular version of rvm through ruby through gems, record application states etc
<banisterone>
Mon_Ouie: hello, what's up, ltns
<Mon_Ouie>
banisterone: I had my last exam yesterday
MrZYX|off is now known as MrZYX
<ddd>
douwem its got a *long* way to go ;)
<banisterone>
Mon_Ouie: great , so you've finished college?
<Mon_Ouie>
Nah :p the last for this exam session
<DouweM>
Mon_Ouie: what year are you?
sassamo has quit [Remote host closed the connection]
<ddd>
dude007 actually i'd rewrite your statement as the only way to *truly* hate a language is to know more than a few upon which you can base your own decision
<Mon_Ouie>
Classes start again in one week
<Mon_Ouie>
DouweM: It's my second year (studying engineering)
<ddd>
otherwise you're just playing sheeple if you make a choice to hate a language without something to compare to
sassamo has joined #ruby
troessner has joined #ruby
<ddd>
mon_ouie mine started this week. couldn't make this week's classes but will be on time all the time starting monday
sparrovv has joined #ruby
<ddd>
2nd semester
wallerdev has joined #ruby
saarinen has quit [Quit: saarinen]
<ddd>
banisterone stop talking, you're running everyone off
sparrovv has quit [Remote host closed the connection]
bashdy has joined #ruby
<chipotle>
thanks all!
<DouweM>
chipotle: :)
nateberkopec has quit [Ping timeout: 252 seconds]
<banisterone>
Mon_Ouie: what's your major now? Comp Sci.
<banisterone>
?
sepp2k has quit [Quit: Leaving.]
<Mon_Ouie>
Not sure how you'd translate it, probably more like software engineering (and minoring into electrical engineering)
<ddd>
cad involved?
<Mon_Ouie>
It's only now that we don't all take the same classes
chipotle has quit [Quit: cya]
<banisterone>
Mon_Ouie: is it mainly Java?
alexfreidah has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
<Mon_Ouie>
banisterone: Nah, there was just one Java class at the beginning
<DouweM>
My uni switched from Java to C# a couple of years ago
<banisterone>
Mon_Ouie: lucky guy! So what's the primary language now?
ping-pong has joined #ruby
<DouweM>
Not too bad, it just requires me to use mono for everything and check on windows before submitting
<banisterone>
DouweM nasty
<Mon_Ouie>
banisterone: Not sure. I think we're going to do some C.
<banisterone>
Ah, so long as you're not locked into the MS tool chain
vlad_sta_ has joined #ruby
<DouweM>
don't mind it too much. liking it more than the Java I was taught in high school
<Mon_Ouie>
ddd: No, or not yet at least. I guess those who take mechanical engineering are much more likely to have such classes.
<DouweM>
banisterone: yeah, we can use git and we don't need Visual Studio or anything, it's just the language we use
SCommette has quit [Quit: SCommette]
<banisterone>
DouweM: not bad
fedesilv_ has quit [Ping timeout: 272 seconds]
teddyp1cker has quit [Remote host closed the connection]
fedesilva has joined #ruby
afhammad has quit [Remote host closed the connection]
afhammad has joined #ruby
tannerburson has joined #ruby
vlad_starkov has quit [Ping timeout: 265 seconds]
<banisterone>
Mon_Ouie: have you experienced the caress of a woman yet
<Mon_Ouie>
Depends on whether or not that's a euphemism. If it is, no.
pietr0 has joined #ruby
tannerburson has quit [Client Quit]
<DouweM>
lol
moshee has quit [Remote host closed the connection]
clamstar has joined #ruby
aaronmcadam has joined #ruby
pierre1 has quit [Ping timeout: 272 seconds]
afhammad has quit [Ping timeout: 248 seconds]
zigomir has quit [Remote host closed the connection]
tt1187 has quit [Ping timeout: 252 seconds]
browndawg has quit [Quit: Leaving.]
estebistec has joined #ruby
francisfish has joined #ruby
* apeiros
wonders what that could be an euphemism for…
mocfive has joined #ruby
coca_rails has joined #ruby
afhammad has joined #ruby
Dude007 has quit []
rickruby has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
moshee has joined #ruby
bashdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klaut has quit []
po10 has quit [Quit: /]
<DouweM>
use your imagination
dh64 has quit [Quit: Konversation terminated!]
achru has joined #ruby
* DouweM
goes to make some dinner. later
nari has quit [Ping timeout: 272 seconds]
<apeiros>
my imagination comes up empty handed
pierre1 has joined #ruby
anonnumberanon has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
moshee has quit [Remote host closed the connection]
anonnumberanon has left #ruby ["Leaving"]
moshee has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* yyyzzz
waking up
ehc has joined #ruby
ehc has quit [Client Quit]
yfeldblum has joined #ruby
zz_jay_m is now known as Xuisce
afhammad has quit [Remote host closed the connection]
max96at has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yyyzzz has quit [Remote host closed the connection]
afhammad has joined #ruby
dorei has quit [Remote host closed the connection]
coca_rails has quit [Remote host closed the connection]
<shevy>
that's understandable
<shevy>
machines do not dream
jrist has quit [Ping timeout: 248 seconds]
<apeiros>
data would disagree
ndrei_ has quit [Quit: Lost terminal]
aantix has joined #ruby
<Xuisce>
shevy: hi
moshee has quit [Remote host closed the connection]
<Xuisce>
whats up ?
ahmedelgabri has quit []
<shevy>
wat
<shevy>
Xuisce code more man!
davidhq has joined #ruby
moshee has joined #ruby
afhammad has quit [Ping timeout: 264 seconds]
<Xuisce>
shevy: :P
<Xuisce>
its me
<Xuisce>
dannyJ
<Xuisce>
xD
<Xuisce>
sorry this is my nick with my bouncer
<shevy>
oh man
<shevy>
you have too many nicks
ndrei has quit [Quit: Lost terminal]
nari has joined #ruby
<Xuisce>
shevy: its a bouncer for a reason
<Xuisce>
lol
alexfreidah has joined #ruby
estebanrules has joined #ruby
<Xuisce>
sorry won't happen again bro
<shevy>
you are having way too much fun :P
jkamenik has joined #ruby
pierre1 has quit [Ping timeout: 252 seconds]
sski has quit [Remote host closed the connection]
sski has joined #ruby
lethjakm1 has joined #ruby
francisfish has quit [Remote host closed the connection]
lethjakman has quit [Ping timeout: 272 seconds]
Rainicorn has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
Czupa has joined #ruby
sski has quit [Ping timeout: 272 seconds]
IceyEC has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
ewnd9 has quit [Read error: Operation timed out]
sassamo has joined #ruby
IceyEC has quit [Client Quit]
lukec has joined #ruby
MrZYX is now known as MrZYX|off
LadyRainicorn has quit [Ping timeout: 272 seconds]
jrist has joined #ruby
mocfive has quit [Ping timeout: 260 seconds]
davidhq has quit []
abf has joined #ruby
davidk has joined #ruby
davidk is now known as Guest61731
OdNairy has joined #ruby
samuel02 has joined #ruby
teddyp1cker has joined #ruby
Rainicorn is now known as LadyRainicorn
colonolGron has joined #ruby
troessner has quit [Read error: Connection reset by peer]
pierre1 has joined #ruby
joshu has joined #ruby
nateberkopec has joined #ruby
snatchfrigate has joined #ruby
rickruby has quit [Remote host closed the connection]
centrx has joined #ruby
mocfive has joined #ruby
moshee has quit [Remote host closed the connection]
<Xuisce>
shevy: thanks again
<Xuisce>
I'll learn Ruby shortly
mlpinit has joined #ruby
<Xuisce>
:P
pierre1 has quit [Max SendQ exceeded]
pierre1 has joined #ruby
<pontiki>
stand tall!
<Xuisce>
:D
teddyp1cker has quit [Client Quit]
moshee has joined #ruby
peregrin_ has joined #ruby
freerobby has quit [Quit: Leaving.]
nateberkopec has quit [Ping timeout: 272 seconds]
pierre1 has quit [Max SendQ exceeded]
yaymukund has joined #ruby
<shevy>
stand down!
achru has quit [Remote host closed the connection]
<BFF>
hey shevy
<BFF>
thanks ive got it workin ok now
<BFF>
commin together
saarinen has joined #ruby
rickruby has joined #ruby
sethen has joined #ruby
tt1187 has joined #ruby
_tpavel has quit [Quit: Leaving]
e62 has quit [Ping timeout: 260 seconds]
rooster_rus has quit [Ping timeout: 246 seconds]
speakingcode has quit [Ping timeout: 272 seconds]
camilasan has quit [Ping timeout: 260 seconds]
cantonic has joined #ruby
Soda has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
cantonic has quit [Client Quit]
vlad_sta_ has quit [Remote host closed the connection]
yano has quit [Ping timeout: 630 seconds]
vlad_starkov has joined #ruby
mojjojo has joined #ruby
cafhacker has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
estebistec has quit [Remote host closed the connection]
freerobby1 has quit [Ping timeout: 252 seconds]
ndrei has quit [Ping timeout: 264 seconds]
siwica has quit [Ping timeout: 272 seconds]
estebistec has joined #ruby
nateberkopec has joined #ruby
po10 has joined #ruby
siwica has joined #ruby
<Cope>
I have the following code which looks like it ought to be abstracted into a method, but is it possible to parameterise the :filename => /some regex/ bit?
achru has quit [Remote host closed the connection]
pukkapi has left #ruby [#ruby]
fire has joined #ruby
pukkapi has joined #ruby
fire is now known as ffio
eka has joined #ruby
bkparso has quit [Ping timeout: 264 seconds]
cmaxw has quit [Ping timeout: 264 seconds]
atmosx has joined #ruby
SHyx0rmZ has joined #ruby
cmaxw has joined #ruby
bkparso_ has joined #ruby
nycjv321 has joined #ruby
rootshift has joined #ruby
<nycjv321>
I'm reading Working with Ruby Threads and I'm reading that Ruby doesn't support true parellel programming due to the GIL. Is that true?
_tpavel has joined #ruby
mojjojo has quit [Quit: mojjojo]
duggiefresh has joined #ruby
_tpavel has quit [Client Quit]
<Mon_Ouie>
Depends on the implementation you're using, but yes, YARD doesn't (at least not without forking)
russfrank is now known as rf
rf has quit [Changing host]
rf has joined #ruby
<nycjv321>
Mon_Ouie: MRI?
<Mon_Ouie>
MRI, YARD, same thing (It was rewritten in 1.9)
po10 has quit [Quit: /]
coder_neo has quit [Quit: Leaving]
e62 has joined #ruby
duggiefresh has quit [Ping timeout: 246 seconds]
francisfish has joined #ruby
SHyx0rmZ has quit [Ping timeout: 248 seconds]
baroquebobcat has joined #ruby
<Jason>
hey all - any ideas on how i can base64 (or 32/non case sensitive would be even better) without padding?
po10 has joined #ruby
<mocfive>
Has anyone found a really killer capistrano v3 tutorial ?
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
dkamioka has quit [Remote host closed the connection]
e62 has quit [Ping timeout: 252 seconds]
<nycjv321>
So concurrency is fully supported and benefits IO but no parrellism in MRI (standard ruby? installed on any Linux distro)? Is that correct?
<RubyPanther>
nycjv321: right, for concurrency it is traditional in Ruby to use *nix fork and IPC patterns. drb in the stdlib is often used for the IPC
chrisseaton has joined #ruby
pskosinski has joined #ruby
<nycjv321>
RubyPanther: do you have links/documentation so I can see?
<RubyPanther>
nycjv321: parallelism is the wrong concept, that only exists in special types of hardware that mostly don't get built anymore. The word you want is concurrency
<nycjv321>
RubyPanther: then maybe I don't understand... If I have 4 core. And I have an application that uses 4 threads. It may distribute each thread on multiple cores. But each thread is only executed one at a time as per the GIL ?
mehlah has joined #ruby
<DouweM>
In MRI, that's pretty much right
* nycjv321
dies
vlad_starkov has quit [Remote host closed the connection]
bricker`LA has quit [Remote host closed the connection]
<nycjv321>
Is there anyway to program parrellel in Ruby using native OS threads?
bricker`LA has joined #ruby
vlad_starkov has joined #ruby
<nycjv321>
thats native to the language and doesn't require using external C libs?
<Mon_Ouie>
Using other Ruby implementation, I think JRuby allows that for example
coderhs has quit [Ping timeout: 272 seconds]
<nycjv321>
Mon_Ouie: yes I saw that.
cgore has joined #ruby
<nycjv321>
But I don't want to use that version lol... Is it not natively supported, is there no native feature?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
senayar has quit [Remote host closed the connection]
<DouweM>
The GIL is core to MRI. If you don't want the GIL, don't use MRI
ndrei has joined #ruby
<nycjv321>
So is Rails always runnging a single thread if I am using MRI?
<Cope>
yep, however I spin this I find I need to parameterise a regex? Is this possible? ie can I pass the regex I want to use as an arg to a method, and then use it in the method?
<DouweM>
If you're not using unicorn, which spawns extra processes, pretty much
* nycjv321
<- Mind blown.
<ktosiek>
well, in production you want multiple processes running your Rails app
<DouweM>
IO is outside of Ruby though, so in that case you will have multiple threads running simultaneously
<DouweM>
so while one thread is waiting for IO
<ktosiek>
and anyway, isn't waiting for DB most of what Rails app does?
<DouweM>
nycjv321: If you want concurrency, go with JRuby!
<Mon_Ouie>
Cope: Sure, regexps are just objects
<nycjv321>
DouweM: more Java :(
<nycjv321>
Cope: why not?
<DouweM>
You don't need to write Java, it's just the Java VM
<Cope>
Mon_Ouie: ok so I can create one with Regexp.new or some siuch?
<nycjv321>
Cope: try it
decoponio has quit [Quit: Leaving...]
<DouweM>
exactly
<Mon_Ouie>
Or just write it literally like /foo/
<DouweM>
and google before you irc ;)
<nycjv321>
For large scale operations is MRI used then? Or is JRuby and other implementations that support native OS threads favored due to true parellism?
einarj has joined #ruby
<nycjv321>
Does anyone know if true parrellism is ever going to be natively supported in MRI?
<RubyPanther>
nycjv321: the unix way scales fine ;)
<DouweM>
Unicorn will spawn multiple processes, which will give you the same effect as multiple threads
<RubyPanther>
so MRI has nothing to worry about
<nycjv321>
RubyPanther: could you provide links so I could read about that? please
<DouweM>
But I can imagine some production operations do use JRuby, sure
<RubyPanther>
And there is not parallelism because Ruby has not been ported to a Transputer
<DouweM>
lol
<DouweM>
And research a bit about MRI's GIL, the need therefore and any plans to let go of it
nari has joined #ruby
ckinni has joined #ruby
<RubyPanther>
Yes, I wasted a year learning to program a transputer. I thought it was the future. But the future was still the past, fork()
<RubyPanther>
The GIL is not planned to be removed
aryaching has quit [Ping timeout: 252 seconds]
e62 has joined #ruby
<DouweM>
I know, but surely there have been proposals, and surely there it will have been explained why it's not planned
<nycjv321>
DouweM: from what I saw its mostly for "helping" with thread safety? I didn't see the benefit.
dkamioka has joined #ruby
<RubyPanther>
What is the actual use case? How many apps are waiting on or are limited by CPU time, and have problems that can be divided that way, and yet need tighter shared memory integration than you get with inter-process IPC?
<DouweM>
nycjv321: I think part of the point is that there are a lot of C extensions to Ruby that may or may not be threadsafe. So without the GIL, you would never be able to reliably use those
<RubyPanther>
It always ends up being some networked doohickey where some standard network server can already do that part
<ktosiek>
RubyPanther: games
<DouweM>
nycjv321: fwiw, the top Google results for "mri gil" are quite interesting
<RubyPanther>
ktosiek: Games aren't going to be in pure ruby if they're CPU-bound and also so IO-bound that process IPC is problematic
MrJoshua has quit [Read error: Connection reset by peer]
bricker`LA has quit [Ping timeout: 272 seconds]
<RubyPanther>
And there is a very nice C API for that situation and... unix scales fine with or without threads
mesamoo has joined #ruby
bricker`LA has joined #ruby
Briareos1 has joined #ruby
* nycjv321
has asked RubyPanther twice for documentation on "*nix fork" and ipc patterns :(
Briareos1 has quit [Remote host closed the connection]
Soda has joined #ruby
<RubyPanther>
nycjv321: It is a rather extensive subject, if you're not sure where to start, most likely you don't even need these features yet and should just focus on making your app work in a single thread in a single process, or using drb (documented in Ruby stdlib) between 2 processes
Barrin6 has quit [Read error: Connection reset by peer]
reluctantlove has joined #ruby
gustavn has joined #ruby
spider-mario has quit [Remote host closed the connection]
gustavn has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
reluctantlove has quit [Client Quit]
e62 has quit [Remote host closed the connection]
nateberkopec has joined #ruby
freerobby has joined #ruby
Matriks has joined #ruby
dkamioka has quit [Remote host closed the connection]
Matriks has quit [Read error: Connection reset by peer]
Matriks has joined #ruby
r0nin has quit []
jkamenik has quit [Quit: Leaving.]
nateberkopec has quit [Ping timeout: 265 seconds]
DarthGandalf is now known as ZNC-Linker
freerobby has quit [Ping timeout: 252 seconds]
danshult_ has quit [Remote host closed the connection]
Cephalostrum has quit [Remote host closed the connection]
Cephalostrum has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
senayar has joined #ruby
mlpinit has quit [Remote host closed the connection]
heftig has quit [Ping timeout: 245 seconds]
fedesilv_ has joined #ruby
cj3kim has quit [Ping timeout: 272 seconds]
fedesilva has quit [Ping timeout: 252 seconds]
mgorbach has quit [Max SendQ exceeded]
endash has joined #ruby
mgorbach has joined #ruby
zumba_addict has quit [Quit: zumba_addict]
iamjarvo has joined #ruby
RubyPanther has quit [Ping timeout: 272 seconds]
lockweel has joined #ruby
francisfish has quit [Remote host closed the connection]
zumba_addict has joined #ruby
RubyPanther has joined #ruby
rickruby has joined #ruby
drjblouse_ has joined #ruby
francisfish has joined #ruby
rickruby has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
<Jason>
so
<Jason>
i'm doing this:
<Jason>
x=21**4
<Jason>
i want to get back to 21 from x and 4.
achru has joined #ruby
<Jason>
(4 will change- it isn't always going to be 4, but i will know what the value is).
epscy has quit [Ping timeout: 260 seconds]
<centrx>
Jason, You mean take the root?
<Hanmac1>
Jason: 194481 ** (1.0/4) #=> 21.0
<Jason>
oh.
<Jason>
figures.
* Jason
scratches head.
icantbecool has joined #ruby
* soahccc
finally has it's own OSX in the cloud, yay!
<apeiros>
soahccc: NSA compatible?
icantbecool has quit [Client Quit]
<soahccc>
apeiros: sure, what isn't? :D
fedesilv_ has quit [Remote host closed the connection]
<apeiros>
my left foot
<apeiros>
it failed certification
* apeiros
is unhappy now
<apeiros>
part of me just doesn't belong :(
habanany has quit [Ping timeout: 252 seconds]
ringaroses has joined #ruby
dkamioka has joined #ruby
<Hanmac1>
the only good thing the NSA does is to support the Hardware industry (because they need bigger storages)
ringaroses1 has joined #ruby
Lewix_ has joined #ruby
Jetchisel has joined #ruby
<apeiros>
I think their impact there is marginal
senayar has quit [Remote host closed the connection]
ringaroses2 has joined #ruby
freerobby has joined #ruby
dkamioka has quit [Read error: No route to host]
Lewix has quit [Remote host closed the connection]
dkamioka has joined #ruby
replay has quit [Ping timeout: 252 seconds]
aaronmcadam has joined #ruby
yaymukund has quit [Ping timeout: 272 seconds]
lockweel has quit [Ping timeout: 245 seconds]
<Jason>
Hanmac1: i'm getting strange numbers with your solution
<Jason>
Hanmac1: => 2.002742230665527
Matriks has quit [Remote host closed the connection]
<Hanmac1>
are you sure you did it right?
Hanmac1 is now known as Hanmac
lukec has quit [Quit: lukec]
<Jason>
Hanmac: actually, i lied. typoed.
<Hanmac>
;P
<Jason>
Hanmac: you are the winner! :p
<Jason>
thanks.
<Jason>
Hanmac: any ideas on how to shorten 2.0 -> 2? doing .to_i doesn't seem to do anything.
ringaroses has quit [Ping timeout: 265 seconds]
<bnagy>
using floats like that is unlikely to be successful for really big numbers imho
<Hanmac>
it should maybe you forgot () somewhere?
<Jason>
ooh
<Jason>
Hanmac: man you can read my mind.
<bnagy>
but hey, easier than doing Math
<Jason>
bnagy: yea
ringaroses1 has quit [Ping timeout: 265 seconds]
<Hanmac>
XD
<Jason>
Hanmac: /3
<Jason>
err
<Jason>
typo
bricker`LA has quit [Ping timeout: 246 seconds]
* Hanmac
- knowing the solution before you know the problem
ringaroses2 has quit [Ping timeout: 265 seconds]
ndrei has quit [Read error: Operation timed out]
pskosinski has quit [Quit: Til rivido Idisti!]
dkamioka has quit [Ping timeout: 246 seconds]
<shevy>
apeiros is your left foot made of chocolate?
<Jason>
Hanmac: actually, no, and i'm sure this is right
<Jason>
Hanmac: i'm getting '0' now
mklappstuhl has joined #ruby
<Jason>
Hanmac: => 0
bricker`LA has joined #ruby
<Jason>
er
<shevy>
is this a 0
<Jason>
i think it's a 0
<Jason>
yes :P
<apeiros>
shevy: no. I'm mostly sour, not swet.
<apeiros>
*sweet
<shevy>
perhaps it is a O Jason
<Jason>
stop :(
<shevy>
hehe ok
<bnagy>
you can't "shorten" 2.0
<Jason>
Hanmac: return ((num1**(1.0/by))).to_i
<Jason>
yeah?
baroquebobcat has quit [Quit: baroquebobcat]
<apeiros>
Jason: show the full calculation, including the input
<Jason>
sure
* Hanmac
knows that "0.0" and "-0.0" are totally different objects
<bnagy>
it's a Float. You can print it out with less precision or you can turn it into an Integer
kobain has joined #ruby
<Jason>
ahh
ndrei has joined #ruby
<Jason>
Hanmac: wait a second. i've got the problem.
<Jason>
Hanmac: i'm doing to_i on => 0.9999999999999991
<Jason>
which makes it 0.
<Jason>
it should be 1.
<apeiros>
Jason: you want round
<Jason>
what i need to do is, like bnagy said, print it out rounded to 1
<Jason>
apeiros: .ceil?
<apeiros>
Jason: to_i is truncate towards -Infinity iirc (or towards 0?)
<apeiros>
>> -0.8.to_i
<apeiros>
damn bot
<bnagy>
towards 0
vlad_sta_ has joined #ruby
<apeiros>
ok, truncation towards 0
clamstar has quit [Quit: Computer has gone to sleep.]
fedesilva has joined #ruby
mansi has quit [Remote host closed the connection]
<apeiros>
Jason: don't know, but I'd expect you want round. depends on your use-case. curious as to why you'd want int for an inherently non-int calculation anyway.
mansi has joined #ruby
<apeiros>
unless you only deal with special cases
<apeiros>
beware, ceil will ceil too for e.g. 1.000000000000001
<Jason>
yea
mklappstuhl has quit [Remote host closed the connection]
<centrx>
nycjv321, For example, they said that six threads would only support unzipping one file at a time, but the disk I/O would easily allow them to cycle through
<apeiros>
centrx: only with slow disks!!!!!1!
<centrx>
nycjv321, Use multiple processes, that is what they are there for
<centrx>
apeiros, the disk is always slower than the CPU
<nycjv321>
apeiros: yes that is what it seems is true
aryaching has joined #ruby
<apeiros>
centrx: do I need <j/k> tags? :)
<p4tux>
apeiros, shevy thanks a lot for your patience and help
<nycjv321>
apeiros: lol
<centrx>
:)
QKO has quit [Ping timeout: 245 seconds]
<apeiros>
nycjv321: if you want parallel threads, use jruby, not rubinius. IMO.
<centrx>
Yes, JRuby
mhenrixon is now known as mhenrixon|afk
<nycjv321>
apeiros: ? why not?
<apeiros>
jruby is quite up-to-date, and closely mirrors ruby. rubinius is further away, more experimental, less vetted against production.
<nycjv321>
ah
<nycjv321>
:'(
danshult_ has quit [Remote host closed the connection]
<bnagy>
the important part of unzipping, in the context of the discussion, is the ruby code that does the unzip work, not writing the output though
<shevy>
centrx who is the lead developer?
alexfreidah has quit [Ping timeout: 260 seconds]
<bnagy>
I have no idea and I can't be bothered reading it
<bnagy>
but everything I have actually said is, imho not wrong
<RubyPanther>
apeiros: is there any support in there for passing filehandles?
<centrx>
bnagy, Okay, then just this line: "In reality, Ruby switches to another thread whenever it needs to block for IO. "
alexfreidah has joined #ruby
aantix has quit [Client Quit]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy>
sure
mojjojo has quit [Client Quit]
<apeiros>
RubyPanther: no. filehandles are not serializable through marshal. you could use the fd number I guess.
<apeiros>
not sure though
<bnagy>
how is that incompatible with anything that was said?
asteros has quit [Quit: asteros]
<centrx>
shevy, The lead developer of what?
<RubyPanther>
yeah, that is what I was thinking, passing a fd over a unix socket
mikepack has quit [Remote host closed the connection]
<apeiros>
RubyPanther: forks share filehandles, though. if your filehandle is open before forking, you can use it
<centrx>
shevy, Oh Rubinius, these blog posts are all by the top github committer: http://rubini.us/blog/
<shevy>
centrx <centrx> The lead Rubinius developer on the Rubinius blog has a post with the sentence "Ruby is a dying language."
<nycjv321>
shevy: do you know why he said that?
<shevy>
that is nice but who is it? the project founder has abandoned Rubinius
Kricir has joined #ruby
<shevy>
nycjv321 who
<shevy>
can I get a name ...
mikepack has joined #ruby
<nycjv321>
shevy: Brian Shirai
<centrx>
nycjv321, He is shocked at the fad of Node.js
<RubyPanther>
apeiros: yeah, I'm just thinking of the case of a server where you want to pass the new connections to the back end, perhaps after auth
<shevy>
never heard that name before
<shevy>
for someone to lead a project for one year it's a bit bold to already throw the towel
<shevy>
but IMHO, projects change when people leave. all of _why's projects are just not the same anymore :(
<shevy>
shoes4 depending on java ...
<RubyPanther>
shevy: I still use Hpricot
<shevy>
hehe
<RubyPanther>
shoes is all about not caring what the implementation is, or what implementation are, or any of that stuff
yaymukund has quit [Ping timeout: 248 seconds]
<apeiros>
RubyPanther: seems IO.for_fd works with a fork
mikepack has quit [Ping timeout: 260 seconds]
<apeiros>
RubyPanther: feel free to add a send_filehandle/receive_filehandle and make a PR :)
<RubyPanther>
It might be true to the spirit to use whatever the new people can make cross platform. _why is such an excellent C coder, it is hard to find people that can improve his code because mostly C people don't care about simple GUIs for kids and newbs
<RubyPanther>
apeiros: k :)
kotk has quit [Read error: Connection reset by peer]
freezey has joined #ruby
replay has joined #ruby
madhatter has quit [Read error: Operation timed out]
<centrx>
v10energy, Otherwise, it is JSON.parse(prices).inject { |sum, t| sum + t["price"] }
vlad_sta_ has joined #ruby
<v10energy>
centrx, what if the number is a string?
ndrei has quit [Read error: Operation timed out]
<centrx>
Use #to_i
araujo has joined #ruby
<centrx>
t["price"].to_i
araujo has quit [Read error: Connection reset by peer]
v0n has quit [Quit: WeeChat 0.4.3-dev]
echevemaster has quit [Ping timeout: 272 seconds]
<v10energy>
hmm i did try it before asking, but it didn't work. maybe i am doding something wrong. sec
<rickruby>
what is composition and how would I use it in ruby ?
Mikhail has joined #ruby
vlad_sta_ has quit [Read error: Connection reset by peer]
<rickruby>
just calling methods from other classes within a class ? instead of inheriting? "Car has a engine" composition but "Car is a Vehicle" inheritance?
echevemaster has joined #ruby
<centrx>
rickruby, Assuming you mean object composition, you would have a variable in your car class like @engine = Engine.new()
<centrx>
Thus the components of a vehicle become part of the car
vlad_starkov has quit [Ping timeout: 264 seconds]
<CodeBunny>
any cucumer or PageObject wiz's around
<rickruby>
Oh I see, makes more sense now. I'm composing the car of other "stuff"
<rickruby>
centrx thanks
Hanmac1 has joined #ruby
heftig has joined #ruby
Wolland has joined #ruby
<Morrolan>
You could also reuse the individual components for multiple cars. Hilarity ensues!
ckinni has joined #ruby
<CodeBunny>
Just make sure your wheel is a round rolly thing
<atmosx>
hmm I think my applications is kinda ready for alpha yay!
<atmosx>
CSS doesn't suck anymore
* atmosx
is a ninja
echevemaster has quit [Ping timeout: 252 seconds]
zer0ne has left #ruby [#ruby]
<atmosx>
Finished in 1.09 seconds
<atmosx>
15 examples, 0 failures
Hanmac has quit [Ping timeout: 264 seconds]
<CodeBunny>
So YOU have the ninja suit!
<atmosx>
CodeBunny: No!!! I need to buy one!
<CodeBunny>
I've been looking for that all day
echevemaster has joined #ruby
<Hanmac1>
rickruby: for sample, different (car) engines may have different code, but same base fuctions
<CodeBunny>
My tests are RED
<atmosx>
CSS is so much harder than ruby
<atmosx>
and sucks so much
* CodeBunny
looks consternated
<atmosx>
CodeBunny: okay, I won't write anymore lol
<CodeBunny>
Tell you what. I'll write your CSS, and you write my PageObject tests
<CodeBunny>
then we BOTH get Ninja suits
<CodeBunny>
maybe?
vlad_starkov has joined #ruby
<CodeBunny>
I am not in love with cucumber
<nycjv321>
CodeBunny: whats wrong with it?
<v10energy>
centrx: I think it doesn't work because price is inside other properties.. so basically i have to iterate through test and then test2
<CodeBunny>
or rather, I am not in love with cucumber when I have to debug someting that doesn't work
<apeiros>
23:31 centrx: v10energy, Otherwise, it is JSON.parse(prices).inject { |sum, t| sum + t["price"] }
<apeiros>
that would not work
<apeiros>
JSON.parse(prices).inject(0) { |sum, t| sum + t["price"] }
<CodeBunny>
Whats wrong with it? It's hard to bubble up errors
<apeiros>
otherwise, sum would initially be a hash
yctn is now known as ws2k3
<v10energy>
it still doesn't work.. TypeError: no implicit conversion of String into Integer
<apeiros>
v10energy: then show your actual input. riddling sucks.
<apeiros>
v10energy: but it sounds like your values were strings, and centrx already told you how to solve that (if they should be integers)
danshultz has joined #ruby
alexfreidah has quit [Ping timeout: 252 seconds]
alexfreidah has joined #ruby
francisfish has joined #ruby
zumba_addict has quit [Ping timeout: 260 seconds]
BraddBitt has quit [Ping timeout: 245 seconds]
zumba_addict has joined #ruby
timonv has quit [Remote host closed the connection]
danshultz has quit [Ping timeout: 272 seconds]
<v10energy>
now i am getting NoMethodError: undefined method `+' for nil:NilClass
<CodeBunny>
So now I have a bug in timing that I would normally throw a wait in to debug and figure out what is going on. (thats already hard in cucumber) and I can't for the life of me figure out how to do it in this spaggetti monster
<shevy>
mhhm... spaghetti...
<nycjv321>
apeiros: .. ah
Kricir has joined #ruby
freerobby has quit [Quit: Leaving.]
kotk has joined #ruby
pu22l3r_ has joined #ruby
<nycjv321>
anyone familiar with ConditionVariable? Does it require a argument when constructing one?
lioninawhat has joined #ruby
<shevy>
what is that
echevemaster has quit [Ping timeout: 246 seconds]
<apeiros>
nycjv321: documentation can tell you
pskosinski has quit [Quit: Til rivido Idisti!]
sassamo has joined #ruby
<nycjv321>
apeiros: documentation tells me it doesn't but the source I have installs says I do >_<
<apeiros>
shevy: a concurrency primitive
<CodeBunny>
The Spahgetti monster is going to eat me! Halp!
pu22l3r_ has quit [Remote host closed the connection]
<shevy>
cool
<shevy>
did not know that one
echevemaster has joined #ruby
<apeiros>
nycjv321: I don't see the source saying it needs an arg…
<shevy>
"ConditionVariable objects augment class Mutex."
pu22l3r_ has joined #ruby
vt102-away is now known as vt102
Jetchisel has joined #ruby
asteros has quit [Quit: asteros]
<nycjv321>
apeiros: heres my constructer: in the source def initialize(monitor); @monitor = monitor; @cond = ::ConditionVariable.new; end
lioninawhat has quit [Remote host closed the connection]
ringaroses has joined #ruby
<nycjv321>
Looks like an IDE issue :'(
PebkacJones has quit []
pu22l3r_ has quit [Ping timeout: 264 seconds]
<soahccc>
nycjv321: I just recently used monitor with conditional variables... new_cond doesn't have any args on my side
aryaching has joined #ruby
<soahccc>
nycjv321: Don't you use @monitor.new_cond ?
troyready has quit [Ping timeout: 252 seconds]
<nycjv321>
soahccc: I am using condition_variable = ConditionVariable.new
<atmosx>
good night everyone
<nycjv321>
then I can do condition_variable.signal
<soahccc>
nycjv321: creating the variable through the monitor requires to have the lock on the monitor in order to wait on the variable
<nycjv321>
For some reason it looks to be some weird issue locally. Like the IDE freaks out over some code it has cached but I can run it just fine in JRuby.