<disappearedng>
burgestrand: is there a way for me to verify?
<burgestrand>
I’ve never seen that exact error before, but it looks like the errors compilers spit out when you try to define the same function multiple times in C, for example.
<burgestrand>
disappearedng: *shrugs* was thinking you have it installed through macports or fink, as well as from homebrew, or something.
pskosinski has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
kevinbond has joined #ruby
maletor has joined #ruby
<burgestrand>
Not sure how you’d find out if that is the case, though. Perhaps trying to uninstall it from Homebrew and see if it still fails?
headius has quit [Quit: headius]
mockra has joined #ruby
strife25 has quit [Ping timeout: 264 seconds]
strife25 has joined #ruby
sevenseacat has joined #ruby
TorpedoSkyline has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
chichou_ has quit [Remote host closed the connection]
oscardelben has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
<Maher4Ever>
I'm facing a strange problem, when I compile my extention manually or with 'rake-compile' my gem works fine. When I use 'gem install' it segfaults on rb_gc_mark. I noticed that the sizes of the produced .so files are diffrent, does anyone here have something which might help? I've spent the last 2 hours working on this with no idea what's causing it
<snail>
disappearedng: did you solve your problem?
<disappearedng>
snail: still solving
<disappearedng>
snail: l no
<snail>
disappearedng: use the command 'locate MagickWand.h' to see whether you have two versions on your computer (which is the most likely problem)
<snail>
disappearedng: the fact there are two ' -I/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick ' terms on the command lines is certainly suggestive, I'd be tempted to remove one of them from the makefiel
<snail>
disappearedng: do you see anything wrong with that?
<disappearedng>
well the search should still work
nopolitica has joined #ruby
<disappearedng>
snail: I dunno what is setting it though
kevinbond has quit [Quit: kevinbond]
<snail>
disappearedng: 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig' should reset it
<disappearedng>
I did and ran gem install but there's the same error
aces1up has joined #ruby
emmanuelux has joined #ruby
IrishGringo has joined #ruby
<aces1up>
anyone know of any tools that I can use to replay an http traffic stream through something like mechanize or another http parser?
<aces1up>
for automated web browser testing?
zeen has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
nadirvardar has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<snail>
aces1up: i believe wireshark can do those kinds of things, but i've never actually do it
disappearedng has quit [Remote host closed the connection]
Vert has quit [Read error: Connection reset by peer]
reuf_ has quit [Read error: Connection reset by peer]
reuf has quit [Read error: Connection reset by peer]
reuf has joined #ruby
reuf_ has joined #ruby
reuf has quit [Remote host closed the connection]
reuf_ has quit [Remote host closed the connection]
reuf has joined #ruby
reuf_ has joined #ruby
justsee|away is now known as justsee
reuf has quit [Client Quit]
reuf_ has quit [Client Quit]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
kevinbond has joined #ruby
gtuckerkellogg has joined #ruby
wpaulson has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<wrapids>
I've got a question about ruby's performance. My app has to receive a string from a server, run a couple regexes on it and a couple if/is nil. It then puts it to that socket. On some of them it's making a remote call to a redis server running remotely also. With about 2 strings sent a second it starts to lose some. Is this normal running speed for ruby?
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mikepack has joined #ruby
<sevenseacat>
starts to lose some what?
<wrapids>
Of the strings. They aren't buffered.
Hanmac has joined #ruby
nari has joined #ruby
<wrapids>
When receiving more than 1 or 2 a second it fails to process some
cakehero has joined #ruby
<wrapids>
I'm not worried about fixing it so much as why this is happening. It's not doing anything complex with the strings for processing. The redis server is about the only thing I could think that _might_ be causing hang time. But if am _only_ receiving input and not running logic then it doesn't lose any input.
<sevenseacat>
im not aware of why anything would be 'losing' input.
<wrapids>
sevenseacat, ####yes
<snail>
wrapids: presumably you're compiling your regexps in advance?
wpaulson_ has joined #ruby
<wrapids>
snail, I don't follow that, I'm qutie new to this
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<snail>
regexps are _very_ expensive to compile
<snail>
for better performance, declare them at the module level and then refer to them
iamjarvo has quit [Quit: Computer has gone to sleep.]
<wrapids>
snail, I'll take a look at that, as well as post my logic section, moment
daniel_hinojosa has quit [Read error: Connection reset by peer]
daniel_hinojosa has joined #ruby
monkegjinni has quit [Remote host closed the connection]
jdar has joined #ruby
williamcotton_ has joined #ruby
williamcotton has quit [Ping timeout: 252 seconds]
williamcotton_ is now known as williamcotton
<snail>
wrapids: I'm guessing that some of those may be faster using string comparison rather than regexps, to avoid having to compile the regexp every time
prometheus has quit [Ping timeout: 260 seconds]
mxweas_ has joined #ruby
Draco_ has quit [Remote host closed the connection]
Maher4Ever has quit [Quit: Ik ga weg]
mxweas_ has quit [Client Quit]
Draco_ has joined #ruby
darren has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
<wrapids>
snail, I was running into a lot of issues with nil in arrays with that. If it's the regex causing the issue I'll precompile them, if it's not I'll fix what's causing it (unless of course it's network), if precompiling the regex doesn't work I'm just going to buffer my input.
sebicas has quit [Quit: sebicas]
<snail>
wrapids: the regexps which contain the value of local variables can't be pre-compiled ...
banisterfiend has quit [Read error: Connection reset by peer]
roadt has joined #ruby
vandemar has quit [Ping timeout: 248 seconds]
vandemar has joined #ruby
subbyyy has quit [Quit: Leaving.]
<roadt>
hi, i'm learning from Yukihiro's 'user guide', testing the control structure of ruby, but i always got error when use 'retry' in loop, is this keyword obsoleted?
zemanel has joined #ruby
<roadt>
i also meet 'String. no such method for 'eacho' , when doing ' for l in "aaa" xxx end' stuff.
jarred has quit [Read error: Connection reset by peer]
jarred has joined #ruby
subbyyy has joined #ruby
prometheus has joined #ruby
zeromodulus has joined #ruby
<roadt>
ruby 1.9.3
<roadt>
any comments is appreciated. thanks in advanced.
jarred has quit [Ping timeout: 252 seconds]
kevinbond has quit [Quit: kevinbond]
<Harzilein>
roadt: pastebin your irb output. 'eacho' sure looks like a typo to me.
raul782 has quit [Remote host closed the connection]
<roadt>
just want to practice quickly, it looks has no ' then' in the article.
<roadt>
so that means the article is obsoleted?
adeponte has quit [Ping timeout: 248 seconds]
libertyprime has quit [Remote host closed the connection]
mascool has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<Harzilein>
roadt: maybe you should not make a sport out wanting to run the 1.8 examples verbatim with 1.9
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<Harzilein>
+of
snail has left #ruby [#ruby]
<Harzilein>
roadt: there is a standard for the ruby syntax now, let's see what it says about using for..in with string literals
<roadt>
Hmmm, indeed, seems i should check 1.9 changelog to dig it out.
<roadt>
Harzilein, thanks for responding.
khakimov has quit [Quit: Computer has gone to sleep.]
radic has quit [Ping timeout: 240 seconds]
wargasm has quit [Read error: Connection reset by peer]
<Azure>
I asked this earlier and I don't think that I got an answer earlier, but: I have a hash with nested hashes that I use in an array, and the hashes have the same structure/keys, but with different data (of course.)
<Azure>
How would I translate that to a struct?
TheHairyWoodsman has joined #ruby
rowaway1 has quit [Quit: rowaway1]
<TheHairyWoodsman>
any recommendations on making a gem programmatically? (like entirely from scratch; I have a very simple gem I want to create as a part of a build process)
<TheHairyWoodsman>
my first thought is to look if I can depend on bundle
<TheHairyWoodsman>
and use it's gem create / package capabiliteis
<TheHairyWoodsman>
I don't want to exec on cmdline, if I can help it
stephenjudkins has quit [Ping timeout: 255 seconds]
nopolitica has quit [Read error: Connection reset by peer]
<Harzilein>
roadt: i can no longer find the draft for the standard, but i think there is a simpler explanation: even in 1.8.7, String#each has another meaning than when that document was written
jdar has quit [Quit: jdar]
fumbe has joined #ruby
<roadt>
Harzilein, hmm, that upgrade too fast..
<Harzilein>
roadt: hmm?
<Harzilein>
roadt: you can get a separate 1.8 installation
timonv has quit [Remote host closed the connection]
<Mon_Ouie>
Or try Pry, which does have commands for that kind of stuff
Eldariof-ru has quit []
justin_ has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<disappearedng>
Pry is pretty amazing fyi
<justin_>
is there a provision for global variables in sinatra??
subbyyy has quit [Quit: Leaving.]
<Banistergalaxy>
disappearedng: use show-doc and show-source
_bart has quit [Quit: _bart]
<justin_>
i have a thread running in one get block, and in another i need to join it and get the output
<justin_>
and thread returns user specific information
<justin_>
whats the best way to do it??
ukd1_ has joined #ruby
workmad3 has joined #ruby
justsee is now known as justsee|away
ukd1 has quit [Ping timeout: 255 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
quest88 has quit [Quit: quest88]
Know1edge has quit [Ping timeout: 260 seconds]
Know1edge has joined #ruby
jprovazn has joined #ruby
s1n4 has joined #ruby
snearch has joined #ruby
adeponte has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
Jackneill has joined #ruby
JohnBat26 has joined #ruby
Jackneill is now known as Guest88305
justsee|away is now known as justsee
workmad3 has quit [Read error: Operation timed out]
hmans has joined #ruby
artOfWar_ has quit [Ping timeout: 240 seconds]
Rochefort has joined #ruby
robdodson has left #ruby [#ruby]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
disappearedng has quit [Remote host closed the connection]
adamkittelson has quit [Remote host closed the connection]
Morkel has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
dhruvasagar has joined #ruby
monokrome has quit [Excess Flood]
tvw has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
wallerdev has quit [Quit: wallerdev]
g_rotbart has quit [Remote host closed the connection]
Speed has joined #ruby
hmans has quit [Quit: Leaving...]
aganov has joined #ruby
_s1n4_ has joined #ruby
_s1n4_ has quit [Changing host]
_s1n4_ has joined #ruby
fayimora has quit [Quit: Busy…..zzzzz]
aganov has quit [Client Quit]
CaptainJet has quit []
aganov has joined #ruby
mneorr has joined #ruby
s1n4 has quit [Ping timeout: 260 seconds]
jgrevich has quit [Quit: jgrevich]
TPFC-SYSTEM has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
sepp2k has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
mohits has quit [Client Quit]
ukd1_ has quit [Ping timeout: 245 seconds]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
_s1n4_ is now known as s1n4
crates has quit [Remote host closed the connection]
crates has joined #ruby
leoncamel has joined #ruby
Eldariof-ru has joined #ruby
adurity has quit [Remote host closed the connection]
adurity has joined #ruby
adurity has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
sdwrage has quit [Quit: geekli.st/programmer]
mattp_ has quit [Ping timeout: 246 seconds]
Criztian has joined #ruby
Criztian has quit [Remote host closed the connection]
CodeVision has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
CodeVision has joined #ruby
hoelzro|away is now known as hoelzro
monokrome has joined #ruby
monokrome has quit [Excess Flood]
D4T has joined #ruby
clocKwize has quit [Quit: clocKwize]
arkiver has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
chichou has joined #ruby
Hien has quit [Quit: leaving]
saschagehlich has joined #ruby
Hien has joined #ruby
krzkrzkrz has joined #ruby
snearch has quit [Quit: Verlassend]
krz has quit [Ping timeout: 260 seconds]
krzkrzkrz is now known as krz
monokrome has joined #ruby
monokrome has quit [Excess Flood]
zommi has joined #ruby
nikeita has joined #ruby
baphled has joined #ruby
Hien has quit [Quit: leaving]
baphled has quit [Read error: Connection reset by peer]
Hien has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
jimeh has joined #ruby
pcboy_ has quit [Ping timeout: 245 seconds]
arkiver has quit [Ping timeout: 260 seconds]
baphled has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
charliesome has joined #ruby
tvw has quit [Remote host closed the connection]
arkiver has joined #ruby
mengu has joined #ruby
zemanel has joined #ruby
patjoh has quit [Ping timeout: 240 seconds]
pcboy_ has joined #ruby
cezar has joined #ruby
cezar has quit [Client Quit]
timonv has joined #ruby
Draco___ has quit [Remote host closed the connection]
_bart has joined #ruby
d3vic3 has joined #ruby
BiHi has joined #ruby
Markvilla has joined #ruby
justsee is now known as justsee|away
cloud|office has joined #ruby
berkes has joined #ruby
zemanel has quit [Ping timeout: 252 seconds]
tze` has joined #ruby
Xethron has quit [Ping timeout: 264 seconds]
perryh is now known as perryh_away
zeromodulus has quit [Remote host closed the connection]
workmad3 has joined #ruby
pskosinski has joined #ruby
hmans has joined #ruby
zeromodulus has joined #ruby
Speed has quit [Ping timeout: 252 seconds]
mathie has joined #ruby
flype has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
saschagehlich has quit [Quit: saschagehlich]
zeromodulus has quit [Ping timeout: 260 seconds]
AlbireoX`Laptop has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Quit: stephenjudkins]
talmuth has joined #ruby
tiripamwe has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
NoICE has joined #ruby
sevenseacat has left #ruby [#ruby]
Drakevr has quit [Quit: demons to some, angels to others]
perryh_away has quit [Ping timeout: 245 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
justsee|away is now known as justsee
baphled has quit [Quit: Lost terminal]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
perryh has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
zeromodulus has joined #ruby
krzkrzkrz has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
Guest60521 has joined #ruby
arturas has joined #ruby
krz has quit [Ping timeout: 264 seconds]
krzkrzkrz is now known as krz
perryh has quit [Ping timeout: 248 seconds]
mjbamford has joined #ruby
Caius has quit [Read error: Connection reset by peer]
perryh has joined #ruby
Xethron has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
arkiver has quit [Ping timeout: 260 seconds]
tatsuya_o has joined #ruby
kaen has quit [Read error: Connection reset by peer]
Drakevr has joined #ruby
kaen has joined #ruby
Guest60521 has quit [Quit: Page closed]
<_bart>
I have a lot of trouble doing .downcase on strings with weird encodings/entities
<hoelzro>
_bart: because downcasing is tricky with Unicode
<_bart>
but basically I'm always doing that to .include? / find a string in another string, and I know I could also use .grep (/something/i)
krz has quit [Quit: krz]
<_bart>
so basically that'd be smarter right, I'm bypassing the downcase by using /i on the regexp
<hoelzro>
that makes sense to me
<_bart>
cool
<_bart>
I'll stick to that then
monokrome has joined #ruby
monokrome has quit [Excess Flood]
zeromodulus has quit [Remote host closed the connection]
mee has joined #ruby
nari has quit [Ping timeout: 245 seconds]
<_bart>
are class variables with attr_accessor thread-safe?
bluOxigen has quit [Ping timeout: 252 seconds]
<hoelzro>
I'm guessing that depends on your environment
<hoelzro>
iirc, Ruby only allows a single thread of Ruby code to run at a time
<hoelzro>
s/Ruby/MRI Ruby/
davidpk has quit [Quit: Computer has gone to sleep.]
<Hanmac>
... class variables & attr_accessor do not work :P
Xethron has quit [Changing host]
Xethron has joined #ruby
<justin_>
any idea how to make a thread accessible across blocks in sinatra??
saschagehlich has joined #ruby
saschagehlich_ has joined #ruby
brg has joined #ruby
<_bart>
hmm
<bnagy>
dunno about sinatra, but blocks can see locals from their binding
<_bart>
undefined method grep for :String :s
saschagehlich has quit [Read error: Operation timed out]
saschagehlich_ is now known as saschagehlich
<Hanmac>
(depends how the block is called)
<bnagy>
so t=Thread.new {sleep 1}; foo.each {|e| # I can see t}
<bnagy>
_bart: grep is on Array
<_bart>
ah include also allows regexp then right?
<_bart>
as in include?
<bnagy>
don't think so
<bnagy>
normally you'd just use =~ if you want a boolean result
<bnagy>
otherwise .match or str[/something/]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
baphled has joined #ruby
nikeita has quit [Quit: bye bye]
nikeita has joined #ruby
nari has joined #ruby
cloud|office has quit [Quit: Page closed]
<_bart>
ah str[/something/] is cool, thanks
lkba has quit [Quit: Bye]
<hoelzro>
that syntax bothers me =/
heftig has quit [Read error: Operation timed out]
apeiros_ has joined #ruby
baphled has quit [Ping timeout: 248 seconds]
justsee has quit [Quit: Leaving...]
pskosinski has quit [Read error: Connection reset by peer]
pk1001100011 has joined #ruby
ringotwo has quit [Remote host closed the connection]
justsee has joined #ruby
pk1001100011 is now known as pskosinski
Ethan has joined #ruby
<shevy>
hehe
prometheus has quit [Ping timeout: 252 seconds]
justin_ has quit [Ping timeout: 245 seconds]
tonini has quit [Remote host closed the connection]
GeekOnCoffee has quit [Ping timeout: 244 seconds]
krz has joined #ruby
Vert has joined #ruby
the-newsman has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mattp_ has joined #ruby
arkiver has joined #ruby
justin_ has joined #ruby
baphled has joined #ruby
talmuth has quit [Read error: Connection reset by peer]
talmuth has joined #ruby
<_bart>
hoelzro: I wonder how to prevent special characters in the something var coming to play with the regexp
monokrome has joined #ruby
Rochefort has quit [Remote host closed the connection]
monokrome has quit [Excess Flood]
<Hanmac>
_bart: what do you mean currectly?
<_bart>
str[/something/]
<_bart>
or rather str[/#{something}/]
<_bart>
and let's say that something is a title, and str a big string, and you're looking for a specific title. But what it the title includes characters like "." and ? and ^?
codespectator has joined #ruby
heftig has joined #ruby
<hoelzro>
does Ruby support something like \Q/\E like Perl does?
<hoelzro>
that would be my answer =)
<Hanmac>
Regexp.quote(".?+")
<workmad3>
there's also Regexp.escape
<Hanmac>
ri says that both are the same
monokrome has joined #ruby
monokrome has quit [Excess Flood]
bluenemo has joined #ruby
zodiac1111 has joined #ruby
<brg>
hi, i really want to know is there any concept of "pass by value" in ruby
darren has quit [Remote host closed the connection]
mneorr1 has joined #ruby
iband has joined #ruby
kedare has joined #ruby
arturas has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
mneorr has quit [Ping timeout: 248 seconds]
<Hanmac>
brg, ruby does not have any pass-by-value / pass-by-reference, like you maybe know ... its mostly an reference-to-object ...
<banisterfiend>
Hanmac: ruby uses pass by value, but what is passed are references ;)
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<Hanmac>
so Numbers like 1,2,3 or 4.5 are "passed by value", but others like Arrays are "passed by reference"
berserkr has joined #ruby
akem has quit [Read error: Connection reset by peer]
arietis has joined #ruby
akem has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
banjara has joined #ruby
Shrink has quit [Ping timeout: 246 seconds]
<workmad3>
banisterfiend: or, as I like to think of it, 'pass-by-pointer-value' :)
sgronblom has joined #ruby
davidpk has joined #ruby
<sgronblom>
Is Marshal.dump/load really the cleanest way to make a deep clone of a Hash?
<Hanmac>
sgronblom yeah i think its the cleanest way
<sgronblom>
banisterfiend: but doesn't that mean for these non-lazy languages that if you have a huge object you'll first have to serialized that to a string in memory and then parse that string to get the deep clone?
<banisterfiend>
sgronblom: im not sure of the exact mechanism, but it's clearly not too slow as it's very common and i haven't seen any complaints
<banisterfiend>
but i never researched it thoroughly
Guest88305 has quit [Read error: Connection reset by peer]
<sgronblom>
Yeah I'm sure for most cases it's not a problem
<workmad3>
sgronblom: deep cloning a huge object can be problematic no matter what language
<sgronblom>
workmad3: yeah but if you built the clone directly from the original at least you won't have to store a string in memory temporarily
<workmad3>
sgronblom: in fact, it's pretty much a language-independent problem, frequently solved by doing copy-on-write strategies rather than doing a full depp clone
<workmad3>
*deep
<sgronblom>
johnny depp
<workmad3>
depp clones...
<Hanmac>
xD
<workmad3>
scary thought :P
<workmad3>
would probably make Tim Burton happy though :)
<Hanmac>
wasnt there depp clones in the third movie?
<sgronblom>
maybe itll be the plot of a pirates of the carribean movie eventually?
bosphorus has joined #ruby
Jackneill has joined #ruby
hmans has quit [Quit: Leaving...]
Jackneill is now known as Guest6776
jdar has joined #ruby
mjbamford has quit [Quit: Leaving...]
justsee is now known as justsee|away
<workmad3>
sgronblom: anyway... in answer to your question, if you have requirements to deep clone a large object where serializing and deserializing in bulk would be problematic, you're probably looking at your own strategy to cloning
mjbamford has joined #ruby
<workmad3>
and Hanmac: deep copy procs? sounds fun... and hazardous :P
davidpk has quit [Ping timeout: 255 seconds]
<Hanmac>
workmad3 i wish there when a proc dont need an binding like {|x| x * 3} it should be somehow dumpable ...
<sgronblom>
workmad3: fortunately i don't. i was just considering the potential probles of serializing for deep cloning
<Hanmac>
its possible with eval, but i dont like it :(
Guest6776 is now known as Jackneill_
<workmad3>
Hanmac: I believe you can in rubinius
the-newsman has left #ruby [#ruby]
ephemerian has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<workmad3>
Hanmac: hell, I think you can serialize a proc with a binding in rubinius, because the bindings themselves are serializable
<banjara>
I want to create an http request with ruby to a long running external service which times out because of the amazon ELB timeout of 60 secs (which is not configurable). What are the defacto ways to handle this in ruby?
ph^ has joined #ruby
<apeiros_>
banjara: you mean the server end times out? you can't configure that from the client…
Rochefort has joined #ruby
yonggu has quit [Ping timeout: 264 seconds]
Rochefort has quit [Remote host closed the connection]
<banjara>
apieros : yeah the ELB kills the request
<apeiros_>
apeiros, not apieros, use tab completion
<apeiros_>
I don't see how you could do anything about the server side timing out…
<banjara>
some sort of long polling to keep the request alive?
BiHi has quit [Quit: Computer has gone to sleep]
<apeiros_>
that's not how http works
Rochefort has joined #ruby
yonggu has joined #ruby
<workmad3>
banjara: long-polling is just having an open request... if something in the middle times out a long-running request, long-polling doesn't work
<apeiros_>
the server timing out is a server side issue. nothing you could do about it.
jdar has quit [Quit: jdar]
<apeiros_>
unless of course you own the server side code… but from how you ask, it doesn't sound like it…
<banjara>
yes I do own the server side too
<apeiros_>
then fix the issue on the server side
<workmad3>
banjara: if a request times out, the only thing you can do in HTTP is just make the request again
<apeiros_>
a) return a token, process in the background, let the client poll for the status of the token
<apeiros_>
b) stream nonsense (worse than the token solution)
<apeiros_>
c) use websockets and push
liluo has quit [Remote host closed the connection]
fermion has joined #ruby
<workmad3>
apeiros_: nothing wrong with the token solution... from a HTTP perspective, you create a long-running task as a resource, it gets assigned a URL, and you can GET that URL to get the resource representation (which corresponds to the current status of the long-running task)
xea has joined #ruby
<xea>
hi
<workmad3>
apeiros_: it's just not as shiny as using websockets :)
<apeiros_>
workmad3: I didn't say something was wrong
<Hanmac>
drupin i cant help with windows problems but it seems that the newer pg is not founded
<apeiros_>
all I did was provide 3 options
<apeiros_>
my order of preference is a > c > b
<workmad3>
apeiros_: you said option b was worse than the token solution... which I interpreted as implying token was bad :)
* Hanmac
is know known as "windows-free"
<drupin>
Hanmac: i am on cygwin now i need to ask i gess pg people
<Hanmac>
maybe yeah
masak has joined #ruby
<workmad3>
drupin: wow, you've actually managed to get cygwin setup...
<JonnieCache>
why would you run postgres in cygwin?
<JonnieCache>
dont mean to be rude...
<masak>
could attributes in Ruby be said to be private by default? and then you add accessors. is that a fair picture?
<apeiros_>
if websockets were more mature, I'd probably prefer c > a > b
<drupin>
workmad3: yes
<JonnieCache>
masak: exactly right
<masak>
\o/
<drupin>
JonnieCache: testing
<banjara>
apeiros_ : thanks, will try option a
<masak>
I'm writing up a set of articles on object systems, and I want to make sure I get things right.
<drupin>
i am on windows so cugwin jonathanwallace
<JonnieCache>
in fact they are always private. adding public methods to interact with them doesnt change that
<masak>
right.
<drupin>
i am on windows so cygwin JonnieCache
<Hanmac>
masak you could define the accessor methods private and protected too if you want
<workmad3>
well, they're as private as anything gets in ruby :)
<masak>
the attributes are always private. accessors can be private/protected/public by need.
<JonnieCache>
drupin: setting up a headless vm to do your testing is probably going to save you a lot of headaches
<workmad3>
drupin: that doesn't mean you have to compile and install postgres with cygwin
<masak>
workmad3: that's the problem with introspection/reflection. it is fundamentally incompatible with encapsulation :)
<workmad3>
drupin: you could just install one of the precompiled distributions (in fact, I'd probably recommend that)
<JonnieCache>
masak: yes. but as always in ruby you can ignore all that with the instance_variable_get method whioch all objects have
<masak>
right.
<JonnieCache>
but you really shouldnt do it
<masak>
well, such an escape hatch is important.
<workmad3>
masak: hardly... it's not incompatible with encapsulation... but it is incompatible with information hiding
<masak>
for things like object initialization and serialization.
<drupin>
workmad3: its not accepted by bundle in ruby
<masak>
workmad3: I've never made the distinction between those two. I know that some people do. why do you consider the distinction important?
<workmad3>
masak: because they're different concepts
<masak>
not according to some.
<drupin>
JonnieCache: VM hmmm .. its gonna take lot of my time now
<workmad3>
masak: you can hide information without encapsulating it, and you can encapsulate behaviour without hiding the information pertaining to it
Rochefortes has joined #ruby
<JonnieCache>
encapsulation is for behaviour and the "role" of a class within the system, information hiding is for, well, information.
* masak
processes this
<workmad3>
masak: encapsulation is more about grouping behaviours and data together and making it so you don't *need* to know the information inside... information hiding is about actually preventing access to the information
<masak>
JonnieCache: oh.
<JonnieCache>
they go hand in hand i guess
<masak>
I see what you're saying. I will use the terms that way from now on.
<masak>
workmad3: well, a blessed hash in Perl is basically saying "hey, this normal hash is now associated with that package name over there. method calls on it dispatch to functions in the package name"
jblack has quit [Quit: Lost terminal]
<workmad3>
masak: hmm... not sure if it's really correct to talk about that in terms of encapsulation or information hiding then
<workmad3>
masak: that seems more about binding to me
* Hanmac
hides information under a stone
<masak>
well, you talked about "bundling" data and behavior above, so I thought that's what you meant.
<masak>
or "grouping" behaviors and data together.
<workmad3>
masak: and there's a lot of conflation of encapsulation and information hiding in literature, and by extension in the programming community
<masak>
aye.
pygospa has quit [Read error: Connection reset by peer]
<masak>
I knew that already.
monokrome has joined #ruby
monokrome has quit [Excess Flood]
brg has left #ruby [#ruby]
<JonnieCache>
i imagine thats because in practice you always use both the concepts together
<workmad3>
masak: so crowdsourced wikis... not necessarily the best place to find a canonical definition ;)
<masak>
can encapsulation be said to be about preserving the integrity of data by different means, of which information hiding may be one?
pygospa has joined #ruby
<masak>
workmad3: well, I'm glad I'm not less confused than Wikipedia, is all. :) I didn't mean to use it as an authoritative source.
<workmad3>
masak: I wouldn't say that... I'd say that the c2 wiki's first entry is pretty good - 'Encapsulation is about boundaries'
<masak>
s/less/more/
jdar has joined #ruby
<masak>
ok, what sort of boundaries. if it's not about data access.
<apeiros_>
I'd say encapsulation goes well along with the idea of SRP
<apeiros_>
i.e., the boundary in OOP will usually be that single responsibility of your class
<workmad3>
masak: any sort of boundary...
<workmad3>
masak: it can be a data boundary, a behaviour boundary, both, neither...
<workmad3>
masak: objects, modules, files... they all perform different aspects of encapsulation
jdar has quit [Client Quit]
<masak>
ok, let's try this, then. encapsulation == "establishing an inner/outer boundary". information hiding == "preventing data from leaking out of such a boundary".
<masak>
does that sound sane?
<workmad3>
masak: I'd say preventing *information* from leaking out personally ;)
<masak>
can you have information hiding without encapsulation of some sort? encapsulation feels very general to me.
<workmad3>
masak: otherwise it would be data hiding
<masak>
ok :)
<masak>
we'll talk about the difference between data and information tomorrow :P
<masak>
but with s/data/information/, do the definitions hold up according to you?
<masak>
because I think I could work with those.
<workmad3>
masak: at a glance, I'd probably agree
<masak>
\o/
<masak>
thank you for helping clear that up in my head.
<workmad3>
masak: given some time to think about it, no doubt I could argue it some more... but I don't have the time ;)
<masak>
can I just say that this seems to be a great channel. I feel very welcome here.
<masak>
usually I homestead in #perl6, which has high standards for niceness and S/N ratio.
<workmad3>
yeah, we're awesome here :)
<masak>
:D
<workmad3>
well, apart from JonnieCache... :P
tonini has joined #ruby
<masak>
哈哈
Shrink has quit [Ping timeout: 248 seconds]
<chiel>
workmad3: I got unicorn running last friday btw. I was being a retard. :D
<workmad3>
chiel: hah :) it happens... frequently on a friday too ;)
<chiel>
workmad3: yeah, happens a little more often than I'd like to admit, but oh well. :D
<chiel>
it wouldn't have been so bad if my code would just be slightly more verbose when it comes to checking requirements. :D
<JonnieCache>
:(
* chiel
soothes JonnieCache.
<chiel>
It's okay, I like you just for your name.
<JonnieCache>
look man dont knock my already fragile self esteem
talmuth has quit [Ping timeout: 264 seconds]
<JonnieCache>
if i commit messy suicide im having my family send the drycleaning bill to you
talmuth has joined #ruby
<chiel>
I mean it! :(
* chiel
cries in a corner.
<workmad3>
JonnieCache: fair enough... I won't pay it, but I'll certainly laugh :P
<chiel>
I wonder if there's any ruby gigs in London where I don't have to do rails. :p
<JonnieCache>
you might get one doing sinatra :)
<workmad3>
or chef, if you're into devops
<chiel>
yeah I like sinatra
<chiel>
I like devops, but I've only used puppet sadly
<workmad3>
well, that too
<chiel>
I want to get into chef though, seems more ruby-ish
Jackneill_ has quit [Quit: Jackneill_]
<workmad3>
only in the sense that it doesn't introduce an external DSL for basic config (aiui, puppet has an external dsl for defining nodes and resources, but you frequently need to drop to ruby and an internal API to create new resources if you want to do smarter stuff)
<workmad3>
while in chef, it's all ruby
<kalleth>
workmad3: :D
justsee has quit [Quit: Leaving...]
<JonnieCache>
always struck me as mad that puppet has its own configuration language
<JonnieCache>
youre already in ruby! famously the language of DSL heaven
Criztian has joined #ruby
<workmad3>
well, it does mean they get to alter certain aspects
<workmad3>
I think the puppet dependency resolution is quite different from chef, for example
Jackneill_ has joined #ruby
<chiel>
I think puppet is interesting, but it can be a bit of a mindfuck at times
<JonnieCache>
moreso than chef?
<chiel>
no idea about chef
<chiel>
I imagine it has it's own quirks :D
<JonnieCache>
i think devops at that level is always a mindfuck. so many moving parts
<workmad3>
and from what I know of it, I'm not sure their style could be easily supported if arbitrary ruby could be used in resource configuration
<chiel>
but still it's gonna be better than some arbitrary shell script executing
<JonnieCache>
oh yeah
<workmad3>
and yeah... there's a certain amount that devops is just inherently a mindfuck :)
<chiel>
I've been trying to pitch the idea of using vagrant at work, for faster setups
<JonnieCache>
that is far beyond a mindfuck. chef reduces it back down to a level where you can actually comprehend it without going mad
<JonnieCache>
just usaing scripts i mean
<chiel>
at the moment we have to completely mutilate our OS X installs just to run the software..
<chiel>
(fucking java... :D)
Shrink has joined #ruby
<chiel>
I guess I just need to do a chef tutorial, see what it's all about
<JonnieCache>
what do you have to do to it?
<JonnieCache>
install a whole custom java stack?
davidpk has joined #ruby
<workmad3>
chiel: if you're already familiar with puppet, I'd suggest you'd probably get a lot more out of just reading the architecture stuff on the opscode wiki ;)
<chiel>
JonnieCache: well, have to disable the apache that comes with OS X, and then install tomcat and lots more stuff
<chiel>
it's a nightmare
<chiel>
I want to automate it so it's just `vagrant up`, and boom, it works.
<chiel>
workmad3: :D
tze` has quit [Quit: --]
<chiel>
I heard chef is not all that great if you don't have a chef server, though
iband is now known as iband|away
mpereira has quit [Ping timeout: 248 seconds]
<workmad3>
you lose a lot of the advanced features, yes
s1n4 has left #ruby ["Leaving"]
<chiel>
I guess the question is which features you need
Jay_Levitt has joined #ruby
<chiel>
I just want to try chef solo or so to begin with
<workmad3>
most of the advanced chef stuff is based off the search capabalities, which are all chef-server based
<chiel>
hmm yeah
<workmad3>
I think you also lose a lot of the environment and versioning capabilities in recipies
<chiel>
opscode has a pretty good repo with cookbooks already though, as far as I could tell
monokrome has joined #ruby
<workmad3>
*recipes
monokrome has quit [Excess Flood]
<Hanmac>
i like the language Piet :P
<workmad3>
yeah, a lot of those cookbooks build off chef server searches though
<JonnieCache>
thats the problem with chef, everythings geared around the server, and the server is just another bloody thing to manage
<JonnieCache>
so if you dont have many servers to start with, its not worth it
<JonnieCache>
im convinced this is to make their hosted offering more attractive
iband|away is now known as iband
<workmad3>
JonnieCache: well, except that opscode give you a hosted chef server that can manage up to 5 nodes for free
<workmad3>
JonnieCache: and also, you can use the chef server to manage the chef server ;)
iband has quit [Quit: Bye!]
<workmad3>
but yes, it is extra overhead
<JonnieCache>
i wouldnt put anything important on that a free service like that.
JohnBat26|2 has joined #ruby
BiHi has joined #ruby
jjang has quit [Ping timeout: 240 seconds]
Markvilla has quit [Quit: Markvilla]
<chiel>
I think devops is such a weird thing to get into though
jjang has joined #ruby
<JonnieCache>
yeah its a great service, its just that the job im in now, falls through the cracks whereby its not appropriate
<chiel>
I mean, I really enjoy it, but I don't have enough experience to do it on a professional level, I think.
<JonnieCache>
the new place has VMs for everything and a whole fancy system set up. im looking forward to it :)
<workmad3>
JonnieCache: sounds funky :)
<workmad3>
chiel: it's still a very new field
geekbri has joined #ruby
<chiel>
yeah, that's true
pete_ has joined #ruby
<chiel>
anyway, off for lunch, see you guys later.
<workmad3>
chiel: enjoy :)
<chiel>
thank you sir
pete_ is now known as Guest34370
<workmad3>
chiel: as a note for after lunch... hanging out in #chef can be very informative ;)
<_bart>
it's not possible to use resque (from defunct) with only ruby?
TheHairyWoodsman has joined #ruby
TheHairyWoodsman has quit [Client Quit]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<JonnieCache>
_bart: how do you mean, only ruby?
<JonnieCache>
its not a rails thing. it is build on redis though
<_bart>
it uses rake?
<_bart>
oh
TheHairyWoodsman has joined #ruby
<JonnieCache>
rake isnt a rails thing either
fantazo has joined #ruby
<_bart>
JonnieCache: this might be a stupid question but right now I added gem 'rake' to the Gemfile, but what should I put in the rakefile?
<JonnieCache>
i dont know. whatever you want?
<JonnieCache>
what are you trying to achieve?
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<_bart>
I want to use resque with ruby only. I already have the gem installed and the class ready, but to setup resque they do Rake commands.
JohnBat26|2 has quit [Ping timeout: 248 seconds]
<_bart>
so I added task "resque:setup" => :environment to a new Rakefile
<_bart>
but it's still saying: Don't know how to build task 'resque:workers'
<apeiros_>
resque is a namespace, not part of the task name
<apeiros_>
e.g. namespace :resque do task :setup => :environment do … end end
berserkr has quit [Quit: Leaving.]
snearch has quit [Ping timeout: 264 seconds]
<_bart>
got it working by doing require "resque/tasks" in the Rakefile
<_bart>
I think
arkiver has quit [Quit: Leaving]
Criztian has quit [Remote host closed the connection]
justinmcp has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
nanderoo has joined #ruby
etehtsea has joined #ruby
nikeita has quit [Quit: sleep]
<_bart>
apeiros_: got it almost working, but now I get #<NameError: uninitialized constant Scraper>. My class is probably not loaded in resque, how do I fix that?
<apeiros_>
you require it?
werdnativ has quit [Quit: werdnativ]
<_bart>
apeiros_: where? I've already required it at the place where I enqueue it
mpereira has joined #ruby
`brendan has joined #ruby
und3f has joined #ruby
<fowl>
RUBAH
mpereira has quit [*.net *.split]
talmuth has quit [*.net *.split]
Rochefortes has quit [*.net *.split]
yonggu has quit [*.net *.split]
arturas_ has quit [*.net *.split]
banjara has quit [*.net *.split]
sgronblom has quit [*.net *.split]
mneorr1 has quit [*.net *.split]
akem has quit [*.net *.split]
zodiac1111 has quit [*.net *.split]
saschagehlich has quit [*.net *.split]
kaen has quit [*.net *.split]
EricKamsky has quit [*.net *.split]
radic has quit [*.net *.split]
Hanmac has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
shellox has quit [*.net *.split]
s0ber has quit [*.net *.split]
thatRD has quit [*.net *.split]
mahlon has quit [*.net *.split]
gmci has quit [*.net *.split]
hsbt has quit [*.net *.split]
Adran has quit [*.net *.split]
Synthead has quit [*.net *.split]
banghouse has quit [*.net *.split]
Zespre_ has quit [*.net *.split]
Dal3k has quit [*.net *.split]
wataken44 has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
explody has quit [*.net *.split]
alindeman has quit [*.net *.split]
_axx has quit [*.net *.split]
pzol has quit [*.net *.split]
Lachryma has quit [*.net *.split]
jeremy_carroll has quit [*.net *.split]
mattrae_ has quit [*.net *.split]
Spaceghostc2c has quit [*.net *.split]
idoru has quit [*.net *.split]
jord has quit [*.net *.split]
ahuman has quit [*.net *.split]
thorncp has quit [*.net *.split]
verto|off has quit [*.net *.split]
jaylevitt has joined #ruby
mattrae has joined #ruby
shellox has joined #ruby
talmuth has joined #ruby
Rochefortes has joined #ruby
yonggu has joined #ruby
arturas_ has joined #ruby
banjara has joined #ruby
sgronblom has joined #ruby
akem has joined #ruby
mneorr1 has joined #ruby
zodiac1111 has joined #ruby
kaen has joined #ruby
saschagehlich has joined #ruby
EricKamsky has joined #ruby
Hanmac has joined #ruby
radic has joined #ruby
RubyPanther has joined #ruby
s0ber has joined #ruby
thatRD has joined #ruby
mahlon has joined #ruby
gmci has joined #ruby
hsbt has joined #ruby
Dal3k has joined #ruby
banghouse has joined #ruby
Zespre_ has joined #ruby
Emmanuel_Chanel has joined #ruby
_axx has joined #ruby
pzol has joined #ruby
Lachryma has joined #ruby
jeremy_carroll has joined #ruby
ahuman has joined #ruby
verto|off has joined #ruby
thorncp has joined #ruby
jord has joined #ruby
idoru has joined #ruby
alindeman has joined #ruby
alindeman has joined #ruby
wataken44 has joined #ruby
explody has joined #ruby
mpereira has joined #ruby
kaen has quit [Max SendQ exceeded]
akem has quit [Max SendQ exceeded]
Synthead has joined #ruby
kaen has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<Hanmac>
that was big :P it netsplitted from >600 to ~30 users :P
nadirvardar has joined #ruby
<apeiros_>
Hanmac: you've just been on the wrong side of the split :-p
<JonnieCache>
posted in the arduino channel. the guy doesnt seem to want to explain himself
<JonnieCache>
i think it could be a death ray
jaylevitt has quit [Client Quit]
Jay_Levitt has joined #ruby
<fowl>
doesnt want to explain himself, lol
<masak>
sorry, I think I confused myself again. is there are way to define data hiding without referring to encapsulation?
<masak>
or does data hiding imply an inner/outer boundary of some kind?
<masak>
er, "information hiding", if that helps :)
krusty_ar has joined #ruby
tiripamwe has quit [Ping timeout: 260 seconds]
mjbamford has quit [Quit: Leaving...]
lorandi has joined #ruby
<shevy>
hmm
<shevy>
masak, well, if you "hide" the data, you simply don't provide any way to access it right?
<masak>
right.
<_bart>
apeiros_: While Resque.enqueue does not error out, I don't see jobs in the web interface, how come?
<masak>
but isn't it always hidden inside something?
<shevy>
well not really
<shevy>
class Foo; SOME_DATA = "this is some data"
<shevy>
Foo::SOME_DATA
<shevy>
ok, in this example it resides within Foo namespace
<Hanmac>
i have a bad news for you masak ... in ruby you cant hide it forever ... i mean the user could find it
<shevy>
class Foo; $some_data = "this is some data"
<shevy>
in this example, it is global and can not be hidden
<fowl>
all hail the user
baphled_ has joined #ruby
baphled has quit [Read error: Connection reset by peer]
<masak>
shevy: doesn't that prove my point, though?
Spaceghostc2c has joined #ruby
<masak>
it's only hidden if it's inside something.
<shevy>
depends on the definition of hidden
<workmad3>
information != data
<masak>
and that something does encapsulation of some sort.
<masak>
workmad3: ok, maybe we need to have that discussion today, then :)
<masak>
...if you have time...
<fowl>
ALL HAIL THE USER
<workmad3>
how something is done is information
<shevy>
nono he may say he does not have time
<shevy>
masak, simply say that workmad3 is wrong, that'll start a discussion :)
<workmad3>
and you *can* hide that sort of detail, if you're willing to jump through hoops :P
<workmad3>
shevy: hey, stop revealing my secrets and weaknesses :P
bigkevmcd has quit [Remote host closed the connection]
<masak>
this is not a very mainstream definition of "information".
alindeman has quit [*.net *.split]
idoru has quit [*.net *.split]
Rochefortes has quit [*.net *.split]
talmuth has quit [*.net *.split]
yonggu has quit [*.net *.split]
arturas_ has quit [*.net *.split]
sgronblom has quit [*.net *.split]
banjara has quit [*.net *.split]
mneorr1 has quit [*.net *.split]
zodiac1111 has quit [*.net *.split]
saschagehlich has quit [*.net *.split]
EricKamsky has quit [*.net *.split]
radic has quit [*.net *.split]
Hanmac has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
s0ber has quit [*.net *.split]
thatRD has quit [*.net *.split]
mahlon has quit [*.net *.split]
gmci has quit [*.net *.split]
hsbt has quit [*.net *.split]
banghouse has quit [*.net *.split]
Dal3k has quit [*.net *.split]
Zespre_ has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
_axx has quit [*.net *.split]
pzol has quit [*.net *.split]
Lachryma has quit [*.net *.split]
jeremy_carroll has quit [*.net *.split]
jord has quit [*.net *.split]
ahuman has quit [*.net *.split]
thorncp has quit [*.net *.split]
verto|off has quit [*.net *.split]
<workmad3>
masak: actually, it is ;)
<masak>
(which is an indirect way of saying "you're wrong, workmad3") :)
<workmad3>
masak: design and implementation is information that can both be encapsulated and hidden
bigkevmcd has joined #ruby
Jay_Levitt has quit [Ping timeout: 260 seconds]
alindeman has joined #ruby
idoru has joined #ruby
talmuth has joined #ruby
Rochefortes has joined #ruby
yonggu has joined #ruby
sgronblom has joined #ruby
banjara has joined #ruby
arturas_ has joined #ruby
mneorr1 has joined #ruby
zodiac1111 has joined #ruby
saschagehlich has joined #ruby
EricKamsky has joined #ruby
radic has joined #ruby
Hanmac has joined #ruby
RubyPanther has joined #ruby
thatRD has joined #ruby
s0ber has joined #ruby
mahlon has joined #ruby
gmci has joined #ruby
hsbt has joined #ruby
Dal3k has joined #ruby
banghouse has joined #ruby
Zespre_ has joined #ruby
Emmanuel_Chanel has joined #ruby
pzol has joined #ruby
_axx has joined #ruby
Lachryma has joined #ruby
jeremy_carroll has joined #ruby
jord has joined #ruby
verto|off has joined #ruby
ahuman has joined #ruby
thorncp has joined #ruby
mtfk_ has joined #ruby
<mtfk_>
hi, how to change default path for tmp file for Tempfile class ?
<fowl>
hail the net split, giver and taker of connection
alindeman is now known as Guest1223
<workmad3>
masak: and the data that an object or program operates on could also be information (although it might also not be information... or your program may transform the data into information...)
<masak>
ok, let's take an example. let's say I have a Set implementation. it's "information" whether the Set is implemented as a linked list or as a tree. I can hide that information so that a user of my class can't tell. that's information hiding. correct?
robert_ has joined #ruby
samuel has joined #ruby
<workmad3>
masak: yes, that is a form of information hiding
<masak>
and data hiding is just making attributes private, essentially.
talmuth has quit [Ping timeout: 240 seconds]
<workmad3>
masak: well, apart from the issue that doing so doesn't make it very private in ruby ;)
talmuth has joined #ruby
<samuel>
\quit
<masak>
so you can have perfect data hiding but screw up your information hiding.
samuel has quit [Client Quit]
<robert_>
shevy :D
<robert_>
anyone here have much experience with Nokogiri?
<shevy>
hey robbyoconnor
<shevy>
I mean
<shevy>
hey robert_
<robert_>
:p
<masak>
workmad3: well, many languages are like that. "not very private" in practice. Perl 5, JavaScript...
mtfk_ has quit [Quit: leaving]
<workmad3>
masak: yes... for example, if you were doing a web API, you can perfectly hide your database IDs
<shevy>
ewwwww perl
<robert_>
ewwwwww
<fowl>
yes yes talk amongst you, try to work out your petty problems, in the end, Net Split always wins
<robert_>
kill it with fire!
<shevy>
I think fowl is on weed again :)
nikeita has joined #ruby
* masak
smiles serenely at the people who have visceral reactions against Perl :)
<robert_>
heh :p
<shevy>
masak, it's ugly!
mtfk has joined #ruby
<masak>
shevy: not mine. nor my friends'.
<masak>
oh, I should be more specific than that.
<workmad3>
masak: you can get around private-ness in pretty much any language to some extent :)
<mtfk>
is there some env variable for directory in Tempfile class ?
<robert_>
shevy: I concur. I've seen enough "badly written" perl code to make me never want to use the language.
<shevy>
the only language where I thought, my own code can be beautiful, was ruby so far
<masak>
the syntax is ugly at times. but the language is still quite awesome.
<workmad3>
masak: you just need to know the tricks, same as with ruby ;)
<masak>
right.
<shevy>
but even in ruby, one can write ugly code
<masak>
I am a sixer, so I'm biased in unusual ways, I guess.
<JonnieCache>
theres the old joke, perl == executable line noise
<masak>
helping develop Perl 6 has given me a deep respect for Perl 5.
<shevy>
masak, yeah, well PHP is ugly too but there are great apps written in it. phpbb and wikimedia ... I still have no replacement for that in ruby
<shevy>
hehe perl 6
<robert_>
yeah
<shevy>
the ideal language for GNU Hurd
<masak>
shevy: well, the difference is that Perl is semantically quite nice. PHP isn't.
<fowl>
perl 666 more like it
<JonnieCache>
mediawiki is NOT great software. wikiPEDIA is a great website, but have you ever actually had to use mediawiki?
<fowl>
hahaha get it, evils and such
<workmad3>
masak: but still... if you take the assumption that people respect 'private' declarations, then yes making an attribute private hides the data
<shevy>
a few years ago, perl 5 didnt seem to move at all, the last 2 years it seems to move forward again
<masak>
oh, I should've anticipated Perl 6 jokes. sure, bring it on. I can take it. :)
<masak>
shevy: correct-ish.
<workmad3>
masak: but you could still leak information about the class/object in other ways
<Hanmac>
masak you cant hide the data with ruby from evil users like me :P
<shevy>
Hanmac loves eval
<masak>
workmad3: right, and sometimes you *want* to, for example information about thread safety.
<workmad3>
masak: exactly
<masak>
\o/
<masak>
I get it.
<masak>
thanks, workmad3.
<workmad3>
masak: and you could even say those details are encapsulated, while still being exposed (because the details are within the object)
<chiel>
I have returned1
<chiel>
! *
<shevy>
chiel why :(
<hoelzro>
make use of me
<masak>
also, I can't make any of you love Perl 5 or Perl 6, and I don't intend to. I'm glad we're not flying at each other's throats as members of different tribes, and just keeping things on a civil teasting level.
<chiel>
It's such nice weather here today, went for a stroll. :D
<shevy>
masak, well perl 6 not as long as it requires me to have a working perl in order to bootstrap (parrot at least has this)
nikeita has quit [Ping timeout: 255 seconds]
<workmad3>
masak: at a more general level, data is just that... data. It's numbers and values. Information has meaning associated with it :)
<masak>
shevy: Niecza is a Perl 6 implementation on the CLR. it doesn't require Perl 5.
<shevy>
aha
<masak>
workmad3: there, I agree.
<shevy>
have not heard of that one before
<masak>
workmad3: so information always resides partly in someone's consciousness?
<masak>
could there be information without consciousness?
<JonnieCache>
yes
<workmad3>
masak: that's a dubious claim... it relies on the assumption that meaning cannot be intrinsic
<JonnieCache>
from a physics point of view
<masak>
shevy: the Niecza developer doesn't do PR very well. so he's still inside the echo chamber. :/
<masak>
workmad3: oh, indeed. I'm not used to thinking about this.
<masak>
workmad3: but I can't seem to recall I've never seen an example of intrinsic information.
<shevy>
DNA!
<JonnieCache>
thats a tough one
moritz has joined #ruby
<JonnieCache>
does the info reside in the DNA or in the organisms that replicate it?
<workmad3>
masak: it's been a while since I've exercised my knowledge on this sort of stuff :)
<shevy>
only 4 different states at any position, and you'll see plentiful diversity in living systems
<shevy>
JonnieCache, in the DNA of course
tiripamwe has joined #ruby
<shevy>
but the interaction levels are complicated
<JonnieCache>
not so easy. theres a whole chapter of godel escher bach on this question.
<workmad3>
shevy: so, you're saying that if you took just DNA, and with none of the machinery to disect and process it, the organism can still pop out of it fully formed?
<shevy>
it's very simple, you can combine hybrid polymerases from yeast and human, and have it work still in both yeast and human
<masak>
information is "how something is done", well then DNA is definitely information, not (just) data.
<workmad3>
shevy: or if you stuck the DNA in a different set of machinery that 'read' it differently, the same result would still occur?
<masak>
or it encodes information, or whatever.
Jackneill_ has quit [Quit: Jackneill_]
<shevy>
workmad3, sure, but it requires a proper assembly platform. there are plenty of differences and modifications, glycosylation in higher living forms, which does not happen in i.e. bacteria
hmans has joined #ruby
<shevy>
workmad3 well DNA alone is not everything
<workmad3>
shevy: right... so where does the meaning of DNA actually reside... in the machinery around it, in the DNA, or in a complex interaction of the two?
dhruvasagar has quit [Ping timeout: 248 seconds]
<JonnieCache>
what about a vinyl record? where is the music residing? is it in the grooves of the record, in the algorithms/processes of the turntable/amp, or is it in my brain, and the record and turntable are just the switch to activate it there?
ph^ has quit [Remote host closed the connection]
<shevy>
workmad3 good question
<workmad3>
shevy: and that's why it's not a simple answer ;)
<justin_>
can threads be named? and referenced by it rather than using references
dhruvasagar has joined #ruby
<justin_>
*reference var
philips_ has quit [Excess Flood]
philips_ has joined #ruby
<masak>
would it be correct to say that Ruby objects are "opaque", in the sense that they are not just hashmaps that you can index? forget about introspection for a while.
verto|off is now known as verto
Jackneill_ has joined #ruby
<workmad3>
masak: yes
<JonnieCache>
justin_: not that i know of. im no expert though
saschagehlich has quit [Remote host closed the connection]
<masak>
ok, great.
ZachBeta has joined #ruby
Axsuul has quit [Ping timeout: 248 seconds]
<workmad3>
masak: that's an easy one to answer :) it's the reverse in JS btw
<_bart>
okay I have these 3 small files and resque installed: https://gist.github.com/d272861d88d80a7bf232 but it's not enqueueing any jobs! And I don't notice workers doing anything or jobs being enqueue'ed in the web interface. Any ideas why?
<workmad3>
masak: and in ruby, the introspection isn't perfect...
<masak>
oh?
<shevy>
yeah
<shevy>
in the language Io, I was surprised that they had better introspection than ruby
<shevy>
5 years ago
<shevy>
:P
<shevy>
I dont like Io syntax though
<workmad3>
masak: ask banisterfiend about things like reliable stack-frame introspection at some point ;)
<masak>
yes, in JS (and Perl), it's the reverse. that makes it seem to me that "data hiding" isn't a very highly held principle in all languages. and maybe such an escape hatch matters in some cases, too.
<justin_>
the threads perform user specific operation
<workmad3>
masak: and not to mention when you have quantum effects on things like code blocks where what they are changes depending on if you 'observe' them or not ;)
<justin_>
and the data is used in another block
<justin_>
am having trouble referencing threads
<justin_>
due to scope rules
<moritz>
workmad3: where observe == invoke?
<_bart>
could someone please take a look at my gist?
<workmad3>
moritz: no, where observe == whether you have a reference or not
<masak>
that sounds... unfortunate.
<moritz>
aye
<workmad3>
it's a runtime optimisation basically
<masak>
are accessors conceptually autogenerated methods?
<masak>
moritz: oh, you're here too? :)
<JonnieCache>
they are literally autogenerated methods
banjara has quit [Quit: Leaving.]
<masak>
great, thanks.
<workmad3>
so it's logically always a proc to some extent... but you can read the code and *know* it isn't, but can never observe that from inside the runtime
nwest has joined #ruby
<justin_>
JonnieCache: is there a better way to get this done, or a workaround
<workmad3>
masak: yes, they are autogenerated methods, and equivalent to 'def whatever; @whatever; end' but I believe the autogenerated method is native code rather than a pure-ruby method in MRI
banjara has joined #ruby
<masak>
right.
<masak>
to what extent can I play around with `Class` to modify the behavior of Ruby classes?
hunglin has joined #ruby
<moritz>
masak: only here because of a hint in #perl6
<masak>
sorry for the vague question. :)
zodiac1111 has quit [Ping timeout: 240 seconds]
robdodson has joined #ruby
tommyvyo has joined #ruby
justinmcp has quit [Remote host closed the connection]
<masak>
moritz: ok. :) the people here think Perl is ugly for some reason, but they're quite civil about it. :P
Markvilla has joined #ruby
<JonnieCache>
masak: you can modify the Class class like any other class
Rochefort has joined #ruby
velikasha has joined #ruby
velikasha has left #ruby [#ruby]
<JonnieCache>
but you cant change inheritance etc behaviour really, at least without hooking into the actual interpreter in C
Rochefortes has quit [Ping timeout: 240 seconds]
<masak>
ah. right.
kpshek has joined #ruby
<moritz>
so it doesn't qualify as a full MOP
<banisterfiend>
masak: what kind of things dou want to change, for example?
<shevy>
masak, well, perl is old. we respect that perl is like the grandpa of scripting languages, so that's ok
<JonnieCache>
you can change a lot of stuff in other ways though, as banisterfiend well knows
<workmad3>
masak: starting on page 348 'Object oriented lisp'
chson has quit [Remote host closed the connection]
banjara has quit [Ping timeout: 248 seconds]
<shevy>
PHP is less respected though... hehehe
<masak>
shevy: I suppose that image is inevitable, even for a language that keeps reinventing itself.
tvw has joined #ruby
<masak>
workmad3: I'll have a look.
<workmad3>
masak: where the author actually includes a discussion as to what OO means and entails that is actually quite frank and enlightening :)
<JonnieCache>
ruby is based on perl. its shot through with perlisms. matz has specifically stated that ruby is basically a tribute to perl
<JonnieCache>
so dissing it in here is a little silly :)
<masak>
I knew about the book, and I suspect I know what he will say about OO, but I will read it just to be sure :)
<shevy>
masak well, after some time, it is hard to change a successful language. I absolute hate the python2 to python3 transition, so much that I dont want to learn python, until they cleaned up that mess
<shevy>
or
apeiros_ has quit [Read error: Connection reset by peer]
<shevy>
ruby1.8 vs 1.9.x
<shevy>
:))))
<masak>
shevy: some things are hard or impossible to change, yes. even though they should be changed.
<masak>
some features run very deep.
<shevy>
but that step from ruby 1.8 to 1.9 is smaller than this python step
richardcreme has joined #ruby
fbernier has joined #ruby
<shevy>
there are some programs, libx11/xorg-related, that require a working python. I once had the idea to use only python3... those compile scripts broke. so I'd have to revert to python2... I was mad
tonini has quit [Remote host closed the connection]
<workmad3>
ah, python 2-3 fun
<moritz>
shevy: IMHO that's an unsolved problem of computer science
tonini has joined #ruby
<masak>
what is? version upgrades?
monokrome has joined #ruby
<moritz>
how to manage breaking changes in something as fundamental as a programming language. Or the linux ABI. or... everything you rely on heavily
monokrome has quit [Excess Flood]
<workmad3>
moritz: hmm, I'd say it's more a partially solved problem of software engineering
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
<shevy>
yah well... you know
cakehero has joined #ruby
<moritz>
workmad3: the partial solution seems to be "just don't do it", right?
<shevy>
if I would be guido and serious about it, I'd simply remove python2
subbyyy has joined #ruby
<workmad3>
moritz: not quite
mascool has quit [Ping timeout: 244 seconds]
<JonnieCache>
moritz: the ruby solution is more "do it every weekend and damnthe concequences!"
<shevy>
hehe
linoj has joined #ruby
<workmad3>
moritz: however, it has been revealed to be not just a technical issue, IMO
nemesit has joined #ruby
jgarvey has joined #ruby
<workmad3>
moritz: and I suspect you could actually extend it out from just computer science into aspect of business processes and possibly event sociology
<banisterfiend>
the rich give their mistresses tiny illuminated dying things and life is neither noble nor sacred nor good
<shevy>
ok, another weed session
<JonnieCache>
lol not everyone who ever wrote anything profound was high
<workmad3>
moritz: but I'd say it's partially solved, because half the problem is detecting when a breaking change has occured and software engineering on the whole is coming up with strategies for that (mostly focusing on boundary testing, and pulling in things like encapsulation to reduce exposure)
<moritz>
workmad3: but that wasn't what I was talking about
nari has joined #ruby
<moritz>
workmad3: I was talking about intentional, breaking changes and how to manage those
<moritz>
workmad3: sorry if that wasn't clear
mohits has quit [Quit: Leaving]
<workmad3>
moritz: yeah, I realised that :)
<workmad3>
moritz: however, not all breaking changes break everything
<_bart>
So I noticed resque-lock is about preventing jobs to be queued. But what if I want my queue to be filled entirely, but I want to lock specific workers. Because my queue consists of a bunch of hosts (for ex. google.com, yahoo.com, yahoo.com and apple.com), now it's processing the queue, but I don't want two of the same hosts entering different workers at the same time! How do I do that? I got resque-lock working but I don't think it'll help in this context.
apeiros_ has joined #ruby
etehtsea has quit []
<moritz>
workmad3: I'm well aware of that, but it's still far away from the core of the problem
<banisterfiend>
JonnieCache: do you like dylan thomas?
wangr has joined #ruby
beakerman has joined #ruby
tonini has quit [Remote host closed the connection]
GoGoGarrett has joined #ruby
<JonnieCache>
yeah i like poetry from that peroid. dont really know much about it though. i should read more...
<workmad3>
moritz: hmm, I'd say it was entirely the core of the problem myself
<workmad3>
moritz: a 'breaking change' only matters to the people using it and who will be affected by it
jrist-afk is now known as jrist
sepp2k has quit [Ping timeout: 260 seconds]
<banisterfiend>
JonnieCache: how do you manage your music?
<workmad3>
moritz: so the start of the problem is being able to reliable identify a) if a change will be a breaking change for yourself, and b) how much exposure you have to the identified breaking change and therefore how hard it is for you to adapt
devdazed has joined #ruby
<moritz>
workmad3: python2 -> python3 is a typical example I'm interested in. Lots of software depends on it. People know they aren't compatible. How to update everything to use the new version? How to make the update cost small enough that everybody does it with their own projects?
<fowl>
you could spend infinite minutes crying over such things, and get no further in life
NorrinRadd has joined #ruby
<fowl>
enjoy wasting your time
futurecode has joined #ruby
<moritz>
fowl: whom are you talking to right now?
<fowl>
i speak to all who would listen
<workmad3>
moritz: yes... and I suspect some (very few, probably trivial) python scripts had no effect from the python2-python3 change... to the perspective of those scripts, it wasn't a breaking change
* moritz
stops listening to fowl
tk__ has joined #ruby
tk___ has joined #ruby
<oddmunds>
fowl: i think what you said applies to every conversation going on in all the irc channels i am in at themoment
<workmad3>
moritz: the rest need to identify a) what aspects of the change are the breaking changes for themselves, b) how much they need to change in order to solve the breakages
<shevy>
I really hate that build software broke because of python2 vs python3 incompatibility. this is like a totally new language
Xethron has joined #ruby
Xethron has quit [Excess Flood]
<masak>
yeah, good thing we made Perl 6 less ambitious than that. *snork*
Xethron has joined #ruby
<ij>
How do I do String#scan#first or String#match@to_s with one call?
<workmad3>
moritz: until they know how exposed their code is, they can't work out how much it will cost either
<workmad3>
moritz: however, that's focussing on the aspects that I classed as 'solved', even though not every project is using the solutions :)
<shevy>
ij can you say what you want to achieve, rather than giving how you must solve it?
<shevy>
you want to find and return only the first match of something in a string?
<ij>
Yeah, with one call.
<ij>
I'm tired of doing two calls.
<JonnieCache>
banisterfiend: i dont really. i used to have lots of folders for genres so everything before a certain date is in folders
<ij>
I hate it.
etehtsea has joined #ruby
<JonnieCache>
banisterfiend: but since then the "unsorted" folder has got bigger and bigger
<shevy>
ij hmm well .scan will always return an array, first will return a string. not sure why you need an additional to_s
<JonnieCache>
banisterfiend: i never really have a problem finding what i want. remembering the name of the track/artist is much harder
<Hanmac>
ij String#[/reg/] ?
nadirvardar has quit [Quit: Computer has gone to sleep.]
<ij>
Yeah. woo hoo! String#[//]!
savage- has joined #ruby
<hoelzro>
=(
<Hanmac>
but i prefer the match object when i use an regexp with grouping
<hoelzro>
indexing strings with regexes hurts my head
robdodson has quit [Quit: robdodson]
hunglin has quit [Quit: Leaving.]
drupin is now known as zz_drupin
nikeita has joined #ruby
subbyyy has quit [Quit: Leaving.]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
xclite has quit [Remote host closed the connection]
<shevy>
hehe
nari has quit [Ping timeout: 245 seconds]
xclite has joined #ruby
sailias has quit [Ping timeout: 260 seconds]
xclite_ has joined #ruby
<banisterfiend>
JonnieCache: but the main issue for me is having the same music avaiable on all my devices, how do u manage that?
* hoelzro
uses rsync for that
<JonnieCache>
by having more music than any one device could ever hold
<JonnieCache>
well not any computer
nikeita has quit [Client Quit]
<JonnieCache>
but i have enough that its more practical to stream it from one machine to another than to sync it
jprovazn has quit [Quit: Leaving]
<banisterfiend>
JonnieCache: how do u stream it?
<banisterfiend>
what software do you use to play the music?
<JonnieCache>
well i used to have a whole thing set up with an http server and an indexer and some fancy stuff
<JonnieCache>
then just SMB sharing within the home network
<JonnieCache>
but these days i live in an apartment on my own and only have one computer. here at work we only listen to podcasts/radio because it avoids having to change tracks a lot
verbad has joined #ruby
<JonnieCache>
generally i used to put a huge amount of effort into tagging/renaming/filing/album-arting/synchronizing/streaming etc etc etc
krusty_ar_ has joined #ruby
uris has joined #ruby
<JonnieCache>
then one day i just stopped caring about any of that. my enjoyment of music hasnt suffered at all.
cpruitt has joined #ruby
bbttxu has joined #ruby
banjara has joined #ruby
<banisterfiend>
JonnieCache: what do you listen to?
<JonnieCache>
preparing DJ sets would probably be a lot easier if i were more organised though...
krusty_ar has quit [Ping timeout: 248 seconds]
<JonnieCache>
all sorts, but mostly "rave" style electronic music and its many and varies offshoots and tributaries
<zai>
hi guys. I have two streams. output from Open3.popen3 a file handle. I'd like to have all output written in the file immediately when it occurs (as opposed to having all output written when the bash process terminates). I tried setting sync=true for the file handle and using stream_copy to copy the streams, though it doesn't work. any ideas?
nikeita has joined #ruby
<xclite_>
it's been a while, but is there a flush method you can call?
Draco_ has joined #ruby
banjara has joined #ruby
zeromodulus has quit [Ping timeout: 260 seconds]
<zai>
kind of. I can't call it while the stream_copy is still running, and it's running until the bash process terminates
<xclite_>
ohhh
<xclite_>
yeah
<xclite_>
i'm useless
<xclite_>
haha
<zai>
nah, thx for the help ^^
areil has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
tatsuya_o has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
WirIrrenUmher has quit [Ping timeout: 245 seconds]
tatsuya__ has quit [Ping timeout: 260 seconds]
pfaff has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
prometheus has joined #ruby
nari has quit [Ping timeout: 248 seconds]
yugui_zzz is now known as yugui
tk__ has quit [Quit: ばいばい]
abra has joined #ruby
Foxandxss has joined #ruby
xaq has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
harcher has quit [Quit: leaving]
Ankhers has joined #ruby
wallerdev has joined #ruby
maesbn has quit [Remote host closed the connection]
mathie has quit [Quit: Sleeping...]
Ankhers has quit [Remote host closed the connection]
mrz7892 has quit [Ping timeout: 245 seconds]
hunglin has quit [Quit: Leaving.]
maesbn has joined #ruby
hoelzro|away is now known as hoelzro
monokrome has joined #ruby
monokrome has quit [Excess Flood]
asobrasil has joined #ruby
maesbn has quit [Read error: Operation timed out]
lkba has joined #ruby
quest88 has quit [Quit: quest88]
Draco___ has joined #ruby
bradhe has quit [Remote host closed the connection]
oscardelben has quit [Quit: oscardelben]
davidpk has quit [Quit: Computer has gone to sleep.]
CaptainJet has joined #ruby
tvw has joined #ruby
Draco_ has quit [Ping timeout: 264 seconds]
wvms has quit [Quit: wvms]
SeySayux has quit [Quit: SeySayux]
kvirani has joined #ruby
tiripamwe has quit [Ping timeout: 245 seconds]
snearch has quit [Quit: Verlassend]
rstokes has joined #ruby
tiripamwe has joined #ruby
mrdodo has joined #ruby
hunglin has joined #ruby
hunglin has quit [Client Quit]
jjbohn is now known as jjbohn|afk
elhu has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
JustinCampbell has joined #ruby
iamjarvo has quit [Ping timeout: 255 seconds]
wvms has joined #ruby
banjara has quit [Quit: Leaving.]
flip_digits has joined #ruby
apeiros_ has joined #ruby
iamjarvo has joined #ruby
jxf has joined #ruby
wangr has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
codespectator has quit [Ping timeout: 260 seconds]
wvms has quit [Ping timeout: 255 seconds]
davidpk has joined #ruby
wangr has joined #ruby
baphled_ has quit [Read error: Operation timed out]
SQLStud has joined #ruby
benson has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
Ammar01 has quit [Quit: Leaving]
mahmoudimus has joined #ruby
S1kx has quit [Quit: Leaving]
Jake232 has quit [Quit: Computer has gone to sleep.]
aganov has quit [Remote host closed the connection]
rbanffy has quit [Quit: Ex-Chat]
hunglin has joined #ruby
Rochefort has quit [Remote host closed the connection]
savage- has joined #ruby
Eldariof-ru has quit [Ping timeout: 264 seconds]
Criztian has joined #ruby
hmans has quit [Ping timeout: 260 seconds]
WirIrrenUmher has joined #ruby
twinturbo has quit [Quit: twinturbo]
<Azure>
asking again (since I never got an answer the first two times):
<Azure>
I asked this earlier and I don't think that I got an answer earlier, but: I have a hash with nested hashes that I use in an array, and the hashes have the same structure/keys, but with different data (of course.)
<Azure>
How would I translate that to a struct?
bbttxu has quit [Quit: bbttxu]
ken_barber has joined #ruby
andrewpthorp has joined #ruby
tiripamwe has quit [Ping timeout: 240 seconds]
tiripamwe has joined #ruby
linusoleander has joined #ruby
awarner has joined #ruby
carloslopes has joined #ruby
<apeiros_>
Azure: you probably better make an example (in & output)
<apeiros_>
Azure: but most likely the answer is `map`
flype has quit [Quit: Computer has gone to sleep.]
mrdodo has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
hoelzro is now known as hoelzro|away
<Azure>
blazes816, most just because I want something small, but I suppose that writing my own class would probably be better since I do have the sub-hashes.
flype has joined #ruby
<blazes816>
Azure: you know your use case much better than I, but I suspect classes (or a class) is the right move here.
<shevy>
LONG LIVE RUBY!!!
<blazes816>
shevy: you missed it, but everyone here has decided to change to erlang, sorry
<Azure>
lmao
<JonnieCache>
whats wrong with hashes man
k_89 has joined #ruby
<JonnieCache>
hashes are great
<shevy>
gah erlang syntax ...
codespectator has joined #ruby
<Azure>
The plan anyway is to have a hash of those objects where the key is a string (or object, haven't fully decided yet), and probably even have methods for adding onto a count and clearing several values at once.
khakimov has joined #ruby
<JonnieCache>
try not to use full objects as keys. lookups are slooow that way
chrisbolton has joined #ruby
<JonnieCache>
i think strings are just as bad but someone here will know for sure
berkes has quit [Quit: Ex-Chat]
<blazes816>
JohnnieCache: I *think* strings < 23 characters are faster
<blazes816>
or 32 or something
<JonnieCache>
that sounds right
nateberkopec has joined #ruby
adeponte has joined #ruby
eywu has joined #ruby
monokrome has joined #ruby
eywu has quit [Client Quit]
simao has joined #ruby
monokrome has quit [Excess Flood]
ukd1 has joined #ruby
eywu has joined #ruby
stat1x has quit [Remote host closed the connection]
stat1x has joined #ruby
linusoleander has quit [Quit: linusoleander]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
burgestrand has joined #ruby
crodas has quit [Quit: Disconnecting from stoned server.]
crodas has joined #ruby
codespectator has quit [Ping timeout: 255 seconds]
strcrzy has quit [Read error: Connection reset by peer]
strcrzy has joined #ruby
andrewhl has quit [Remote host closed the connection]
catphish has joined #ruby
<catphish>
is there a way to get a timezone offset in ruby?
derrida has quit [Ping timeout: 246 seconds]
hynkle has quit [Quit: Computer has gone to sleep.]
MasterIdler has quit [Quit: MasterIdler]
<catphish>
or even just the time in a particular place (which i can use to calculate the offset)
linusoleander has joined #ruby
<heftig>
catphish: well, if you have a Time object, you have time.utc_offset
ryanRT has quit [Ping timeout: 246 seconds]
foolove has quit [Ping timeout: 246 seconds]
etank has quit [Ping timeout: 246 seconds]
gentz has quit [Ping timeout: 246 seconds]
fermion has quit [Quit: P]
icy` has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
linusoleander has quit [Client Quit]
<catphish>
that's only for my local time though isn't it?
busybox42 has quit [Ping timeout: 246 seconds]
<heftig>
yes
vlad_starkov has quit [Remote host closed the connection]
<nikeita>
Hello, i'm new on ruby …i'm just in a studying stage, i would ask what is a best way to make an hash of functions?
MasterIdler has joined #ruby
gentz has joined #ruby
enroxorz has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
<heftig>
nikeita: for what purpose?
mrdodo has joined #ruby
_bart has quit [Ping timeout: 248 seconds]
<nikeita>
just for studying teh language, not e real purpose.
<blazes816>
kaen: \x denotes a hex string, but \3 is 33 octal, not hex
<nikeita>
i was curios how to solve it with an hash…
<nikeita>
btw
<kaen>
oh whoops, thanks
sailias has quit [Ping timeout: 245 seconds]
<blazes816>
nikeita: no reason to. Ruby essentially keeps all methods in a "hash" for sorts. calling send(:foo) is basically looking it up in a hash and calling it
timonv has quit [Remote host closed the connection]
Synthead has quit [Remote host closed the connection]
deryl has joined #ruby
jrist is now known as jrist-gym
darren_ has quit [Remote host closed the connection]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
zemanel has joined #ruby
robert_ has quit [Ping timeout: 265 seconds]
a_a_g has quit [Quit: Leaving.]
Synthead has joined #ruby
flype has quit [Quit: Computer has gone to sleep.]
adamkitt_ has joined #ruby
mjbamford has joined #ruby
mjbamford has quit [Client Quit]
theRoUS has joined #ruby
the_jeebster has joined #ruby
fermion has joined #ruby
<kennyvb>
hmm when ever i require a file even if it's in the same directory i get error's testing in textmate and if i want to test in rib i have to write full path to file. any way of fixing this ? mac os x
kyle__ has joined #ruby
twinturbo has joined #ruby
baphled has joined #ruby
mjbamford has joined #ruby
<kyle__>
Whats the clean/proper way to fall back through different DBM libraries gdbm/dbm/sdbm if the first (or second) choice isn't available?
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<kyle__>
I know I've seen it, I just can't recall it or find it right now.
tzvi has quit [Read error: Connection reset by peer]
<kennyvb>
hmm apparently i have to append ./filename in my require for them to work… kinda annoying. fix wanted
adamkittelson has quit [Ping timeout: 252 seconds]
<wrapids>
banisterfiend`: Yep yep, got that going a minute ago.
bananastalktome has joined #ruby
framirez has joined #ruby
framirez is now known as dokshor
chrisja has quit [Quit: leaving]
<dokshor>
oli
<wrapids>
Didn't occur to me however that debugging a network application would be a little tricker
chrisbolton has joined #ruby
blacktulip has quit [Remote host closed the connection]
ramblex has joined #ruby
fbernier has joined #ruby
<shevy>
kennyvb could try require_relative too, or perhaps add to $LOAD_PATH
WirIrrenUmher has joined #ruby
blacktulip has joined #ruby
nikeita has quit [Quit: sleep]
ph^ has quit [Remote host closed the connection]
hmans has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
tangledhelix has joined #ruby
dokshor has quit [Quit: User abort with 5 Ctrl-C's]
tangledhelix has left #ruby [#ruby]
aquaranto has joined #ruby
brianpWins has joined #ruby
<kennyvb>
shevy i'm relative new to this ruby so have no idea what you want me to do hehe could you explain it ?
fbernier has quit [Read error: Operation timed out]
wangr has quit [Remote host closed the connection]
flype has joined #ruby
<blazes816>
kennyvb: when you require a file it must be found in ruby's LOAD_PATH. You can change 'require' to 'require_relative' which will make it look in the current directory, or you can add the current directory to the load path like "$:.unshift File.dirname(__FILE__)"
<shevy>
kennyvb ok. there was a change from ruby version 1.8 to ruby version 1.9
<shevy>
in 1.8 require 'foo.rb' would work
<shevy>
in 1.9, for god knows what stupid reason, core team changed this
<kennyvb>
i'm running 1.9.3
<shevy>
a new method is require_relative in 1.9.x
<kennyvb>
ahh so require_relative is the keyword i'm looking for
<shevy>
yeah kinda... but I dont like it
<shevy>
require 'foo.rb' is so much nicer to type than require_relative 'foo.rb'
bradhe has joined #ruby
<blazes816>
it's a trade off between typing a few extra characters, and polluting the load path
<kennyvb>
thx shevy how ever i found out that putting ./ before filename makes it work aswell
<shevy>
kennyvb yeah because you give extra information here with "./"
<shevy>
means "in the current directory"
<kennyvb>
ahhh
<shevy>
I think if you change paths, then invoke that .rb file, it would not work
<blazes816>
kennyvb: that will break if you run it elsewhere I think
<shevy>
but if it is just for local testing, then I suppose this is ok
<kennyvb>
so require_relative is better option then period
<blazes816>
yes
<kennyvb>
thx
InFlightMovie has joined #ruby
wangr has joined #ruby
<kennyvb>
Okkey i'm back . that doesn't work at all. i have require_relative test/unit and require_relative myfile and now it just comes up with bunch of errors
<kennyvb>
ahh nwm fixed it :) require 'test/unit' works still it seems
nicoulaj has quit [Ping timeout: 260 seconds]
<Hanmac>
kennyvb: require_relative are for your own files, not for the stdlib ones
CaptainJet has quit [Ping timeout: 252 seconds]
<kennyvb>
Hanmac: ahhh okey, thx a bunch
stringoO has joined #ruby
jjbohn|afk is now known as jjbohn
ph^ has joined #ruby
ianbrandt has joined #ruby
iamjarvo has joined #ruby
adamkitt_ has quit [Remote host closed the connection]
stringoO has left #ruby [#ruby]
thomas is now known as bellzcat
pradeepto has quit [Ping timeout: 240 seconds]
InFlightMovie has quit [Ping timeout: 252 seconds]
nikeita has joined #ruby
tiripamwe has quit [Ping timeout: 248 seconds]
Draco_ has quit [Ping timeout: 260 seconds]
pradeepto has joined #ruby
pradeepto has quit [Changing host]
pradeepto has joined #ruby
<shevy>
yeah
<shevy>
which is how I usually solve things
blazes816 has quit [Read error: Connection reset by peer]
<shevy>
I install projects I work on into SITE PATH
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
fayimora has joined #ruby
<_bart>
how do I clean the redis database?
fbernier has joined #ruby
Draco_ has joined #ruby
w3bcrawler has joined #ruby
fantazo has joined #ruby
tommyvyo is now known as vim
vim is now known as Guest83534
Guest83534 is now known as tommyvyo
sspiff has quit [Remote host closed the connection]
tiripamwe has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
axl__ has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
<KarlHungus>
system("cat <(echo 'hello world')")
<KarlHungus>
why is this failing in ruby?
<KarlHungus>
do i not have access to shell constructs? am in a limited shell?
monokrome has joined #ruby
monokrome has quit [Excess Flood]
ForSpareParts has quit [Disconnected by services]
axl_ has quit [Ping timeout: 260 seconds]
axl__ is now known as axl_
<shevy>
KarlHungus hmm
<shevy>
I dont think system spawns a real shell
ForSpareParts|lo has joined #ruby
<KarlHungus>
fwiw, it also fails with backticks
ForSpareParts has joined #ruby
<shadoi>
KarlHungus: you need popen3 or shell
<ForSpareParts>
Could someone explain the difference between -> => and #=>? It's kind of ungoogleable...
<shevy>
you should be able to use: return_value = `shell some_shell_script.sh`; require 'pp'; pp return_value
<shevy>
ForSpareParts in what context
<shevy>
#=> is clearly a comment
<shevy>
-> could be the new lambda operator
<KarlHungus>
shadoi: interesting
<shevy>
=> alone I never saw before... only via <=>
<shadoi>
ForSpareParts: -> is new systax to refer to a proc / lambda. => is aka "hash rocket" and is part of Hash syntax.
<shevy>
ah yes indeed
<shevy>
hash :)
<blazes816>
ForSpareParts: generally those are referred to as "skinny arrow" and "fat arrow"
<shevy>
key => value
<heftig>
KarlHungus: <() is a bash construct, and system() uses /bin/sh, not /bin/bash
<blazes816>
if that helps you google it
justin_ has quit [Ping timeout: 248 seconds]
<ForSpareParts>
shevy, shadoi OK, thanks. The context in which I saw #=> was the documentation for the Sequel library, here: http://sequel.rubyforge.org/rdoc/
<_bart>
When I do redis.setnx("value", true) I expected it to return false if the value was not set, but it returns true!
<heftig>
KarlHungus: try that line in the /bin/sh shell, and you'll see that you get the same errors
<burgestrand>
ForSpareParts: # => is usually used to show something returns a value.
<Hanmac>
#=> is the comment result ... its used in irc
<burgestrand>
(or prints)
<shadoi>
ForSpareParts: that's an example showing the result of a command in a REPL like IRB.
lorandi has quit [Read error: Operation timed out]
wangr has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<nikeita>
impressed by the power of ruby…really
apeiros_ has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<nikeita>
thank you guys
<shevy>
nikeita you used another language before, right?
<nikeita>
yep...
<shevy>
because your code is not typical newcomer code
<fowl>
nikeita, have you completed The Staring yet?
<nikeita>
Staring?
apeiros_ has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
mahmoudimus has quit [Ping timeout: 264 seconds]
<nikeita>
i use Objecttive-c a lot
<fowl>
nikeita, you must acquire a pure cut ruby (i can sell you one, its not that much) and star at the sun through the ruby until you are enlightened
<shevy>
aha
<shevy>
interesting, I am curious about your next piece of ruby code nikeita ;)
<kyle__>
Heh.
apeiros has quit [Remote host closed the connection]
tzvi has joined #ruby
<kyle__>
There is one thing that sucks about ruby: if you take a grad course that requires you use java or matlab, you feel like you're trying to build a computer with bearskins and stone axes.
<nikeita>
will be in RubyMotion ;)
apeiros_ has joined #ruby
<nikeita>
fowl, i do not understand what you mean
mxweas has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<nikeita>
mmm, maybe i have to ask what is "The Staring"
<shevy>
nikeita fowl is sometimes in the funny zone, too much weed
wangr_ has joined #ruby
itnomad has joined #ruby
mahmoudimus has joined #ruby
wangr has quit [Ping timeout: 264 seconds]
Draco_ has quit [Remote host closed the connection]
Axsuul has joined #ruby
<RubyPanther>
class Sun < ActiveRecord::Base ; has_many :rubies ; has_many :enlightenments, :through => :rubies end end
<j|>
Ruby has some clean design decisions. However it's pathological eclecticisms aren't one of them IMO.
<RubyPanther>
The problem with people's complaints about Ruby's design decisions is that typically their alternatives are much worse.
Niamkik has joined #ruby
kirun has joined #ruby
justin_ has joined #ruby
cakehero has quit [Quit: Leaving...]
<otters>
pathological eclecticisms
Progster has quit [Ping timeout: 260 seconds]
<RubyPanther>
Known things that have better alternatives are already the changes going into 2.0, and other things simply don't have better alternatives.
<otters>
those words make sense individually, but not together
<blazes816>
sounds like a garbage band from the 90s
jastix has quit [Quit: Leaving]
mahmoudimus has quit [Ping timeout: 260 seconds]
<j|>
otters, it's a Perl reference. Basically I'm saying I like a lot of Ruby's OO-related decisions, but I really wish that there weren't so many ways to do the same thing(s).
<otters>
why?
<j|>
Just reminds me of the parts of Perl that drove me crazy.
<RubyPanther>
Ruby gives you clear ways you're _supposed_ to do things, just follow what you're supposed to do.
sdwrage has quit [Quit: geekli.st/programmer]
<j|>
RubyPanther: I like that thought.. what do you mean / examples?
<RubyPanther>
Ruby explicitly rejects the idea that all possible ways are equal, there is usually 1 correct way, and a bunch of other possible ways for emergencies
<kyle__>
j|: But I thought perl's motto was TIMTOWTDI
<kyle__>
There Is More Than One Way To Do It
mahmoudimus has joined #ruby
<fowl>
$->yourmom
<blazes816>
a fundamental part of being a powerful computational language is that there will be more than one way to do things
CaptainJet has joined #ruby
<blazes816>
see: math
<RubyPanther>
If it seems there are a bunch of ways to do things, you're probably violating 2 basic principles already: everything should be duck typed, and methods should be very small and do 1 thing
lorandi has joined #ruby
<kyle__>
All the syntatic sugar in ruby means you can choose how you style your code, and make it consistant. VS either styling it how the buitins are, or making it inconsistant.
<j|>
kyle__: yea, and that made me stop using perl eventually. Anyway, I really do not intend to start a war. I like RubyPanther's suggestion of there being one correct way.
<RubyPanther>
That should leave you with one obviously right way to do anything in Ruby
<kyle__>
j|: Not intended to fight, just pointing out why it's sometimes really nice, even if it is just sugar.
<j|>
kyle__: well, it makes it harder to learn.
jrist-gym is now known as jrist
<j|>
for me, anyway.
<j|>
I found python really easy to pick up and run with. Ruby I haven't been having as easy a time yet.
arturas_ has quit [Ping timeout: 240 seconds]
Maher4Ever has joined #ruby
<j|>
however, I'm totally open to suggestions from people of how to learn
<otters>
ruby is way more flexible than python
<kyle__>
What makes things hard to learn for me is lack of up to date c module documentation. I spent hours cobbling my modules togeather for 1.9, mostly in here bugging experts for help.
<otters>
hell, it has multiline lambdas
<j|>
I'm sure my learning process itself could be guided / improved on.
<otters>
j|: it took me longer to learn Ruby than most other languages I know
<otters>
but you get used to it eventually
greyEAX has quit [Ping timeout: 265 seconds]
hmans has quit [Quit: Leaving...]
forestbird has joined #ruby
<fowl>
j|, are you ready to climb to the top of the peak and bathe yourself in the oils of the sky?
<RubyPanther>
When I switched from Perl it was more a matter of un-learning than learning. You basically just have to read the pickaxe cover to cover three times. And then kick yourself whenever you have a procedural style method that does more than one thing
<j|>
fowl: well, without the oil-bathing, sure.
<forestbird>
what would be a good way to lookup documentation. find "ri" pretty awful... any tips?
<otters>
RubyPanther: ha, that code doesn't typecheck
<otters>
amateurs
<RubyPanther>
otters: 1.8.x, sorry ;)
mahmoudimus has quit [Ping timeout: 240 seconds]
<RubyPanther>
amateurs
<otters>
man
mahmoudimus has joined #ruby
<RubyPanther>
but it does paste into irb if you have the old one, I did take at least that much care
w3bcrawler has quit [Ping timeout: 252 seconds]
codespectator has joined #ruby
nicoulaj has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
<otters>
I don't have 1.8 handy though
<otters>
I don't believe in rvm
<kyle__>
RubyPanther: I don't think that runs in 1.9... doesn't for me at least.
tze` has quit [Quit: .]
<RubyPanther>
Indeed. But I'm willing to promise not to port it.
<kyle__>
Thank you!
baphled has joined #ruby
stephenjudkins has joined #ruby
davidpk has joined #ruby
<Hanmac>
is neary funny as any?(&:=~)
Progster has joined #ruby
chriskk has joined #ruby
Markvilla has quit [Quit: Markvilla]
<ForSpareParts>
Is using @ for instance variables just a convention, or does it have special significance in the language?
<otters>
no, @ means instance variable
<canton7>
it's not an instance variable unless it begins with @
<otters>
if it's not @ it won't be an instance variable
<RubyPanther>
even if you're creating them through the C API you'll need the @
jborica has left #ruby [#ruby]
<ForSpareParts>
I guess I'm confused, then -- I defined a variable with and without @, and got equivalent behavior. And I could've sworn they were both objects. What am I missing...?
<RubyPanther>
unlike method names where you can go outside the rules and still create them and call them through #send
Jackneill_ has quit [Quit: Jackneill_]
jborica has joined #ruby
<canton7>
ForSpareParts, pastie your script?
lukeholder has quit [Quit: Computer has gone to sleep.]
Niamkik has quit [Remote host closed the connection]
<k_89>
canton7, you used to be a php user right?
<canton7>
ForSpareParts, I see no instance variables or classes
<ForSpareParts>
I omitted my model because I'm not sure if it contains information sensitive to my employers. Probably doesn't, but, y'know, better safe than sorry.
jonathanwallace has quit [Remote host closed the connection]
<jborica>
is using defined? bad practice? It seems that I can substitute something like .respond_to in almost every case.
fearoffish has joined #ruby
jjbohn has quit [Ping timeout: 252 seconds]
<ForSpareParts>
canton7, Interesting. So everything's an object, but "object" means something broader in Python terms than it generally implies?
<ranjan>
hi, i need to develop a script that will ssh into all the nodes on a network which has ssh port opened and execute a command . where should i start. i am a beginner to ruby
<ranjan>
and also oop :)
Kiall has quit [Excess Flood]
<lectrick>
ranjan: sounds black-hatty
<eam>
lectrick: are you joking?
<kyle__>
ranjan: The ruby ssh class has examples in the documentation that almost exactly do that.
Morkel has joined #ruby
<kyle__>
lectrick: Something many sysadmins need to do.
<lectrick>
eam: I often do
Morkel has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
raluxgaza has joined #ruby
<shadoi>
ForSpareParts: yeah, I misspoke, everything is an object, but the implementation tends to push people towards not using message passing semantics, and littering the global space with methods, etc.
ken_barber has quit [Remote host closed the connection]
<ranjan>
lectrick, do you have sample code which you use?
chichou has joined #ruby
<canton7>
ForSpareParts, looking at http://stackoverflow.com/a/866085/1086121, it seems they're pretty similar underneath. They just differ in their approaches (deciding to use e.g. str(3) over 3.to_s)
sdwrage has joined #ruby
<ranjan>
but i should identify whether ssh port is up on each node and then do an ssh
<kyle__>
ranjan: Much easier if you're doing something complex. The link I poasted is the docs, which include examples. Start there, even before you look at someone elses code. It will make your life easier.
<Maniacal>
does ruby have an opposing method for String.empty? Something that would return true if it's not empty?
<otters>
tightwork: where?
<canton7>
tightwork, half isn't an array/enumerable ?
<otters>
Fixnum doesn't have a #slice method
tiripamwe has quit [Ping timeout: 255 seconds]
<otters>
you probably want N.slice
locriani has joined #ruby
mxweas has quit [Read error: Connection reset by peer]
<ranjan>
kyle__, thank you for the advice.
<nikeita>
what do you think of rubymine ide from intelliJ ?
<Maniacal>
I want to test that something is not empty and I need to do it in an "if", not an "unless". so the bash guy in me wants this to work: if ! stringvar.empty?a
<ranjan>
kyle__, i will try to learn
<tightwork>
OHHH
<tightwork>
stupid me
bananastalktome has quit [Quit: bananastalktome]
<tightwork>
yeah N.slice .. thank you
<canton7>
Maniacal, yeah you can do 'if !string.empty?', but you might as well use unless...
<otters>
sometimes you just need a fresh set of eyes on it
<canton7>
kyle__, oh dear... tbh imo it's too quick. Doesn't annoy the recipient enough
<eam>
it provides an interface likely suited to your use case, as well as a standalone ssh multiplexing command
sdwrage has quit [Quit: geekli.st/programmer]
<Maniacal>
canton7: yeah, just needed to remove the space after the bang
<kyle__>
Hehe
<Maniacal>
canton7: can't do an unless because it's part of a compound if. thanks for the help
raluxgaza has quit [Remote host closed the connection]
<kyle__>
OK, I undertsand the rubber-ducking. A fair amount of the time I start typing out my questionin irssi, and then delete it because properly asking it answered it.
cakehero has joined #ruby
<canton7>
Maniacal, just switch round the cases?
mxweas has quit [Client Quit]
DrShoggoth has quit [Quit: Leaving]
kevinbond has joined #ruby
<iamjarvo>
is there a great app on github that I can look at for good tests with test unit
atmosx has joined #ruby
pu22l3r has joined #ruby
<atmosx>
hello
ciopte7_ has joined #ruby
ryannielson has quit [Quit: ryannielson]
Axsuul has joined #ruby
ciopte7 has quit [Ping timeout: 255 seconds]
ciopte7_ is now known as ciopte7
snearch has joined #ruby
ken_barber has quit [Remote host closed the connection]
bwlang has joined #ruby
ringotwo has quit [Remote host closed the connection]
lduros has joined #ruby
ringotwo has joined #ruby
lduros has left #ruby [#ruby]
Draco_ has joined #ruby
mikepack has quit [Remote host closed the connection]
piotr has joined #ruby
locriani has quit [Remote host closed the connection]
niklasb has quit [Quit: WeeChat 0.3.8]
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
werdnativ has joined #ruby
mikepack has joined #ruby
EstanislaoStan has joined #ruby
Araxia has quit [Read error: No route to host]
Araxia has joined #ruby
niklasb has joined #ruby
<EstanislaoStan>
How can I do this without the putting the methods calls into an array since that isn't allowed?http://pastie.org/4308213
mjbamford has quit [Remote host closed the connection]
<shevy>
hmm
<kyle__>
On a greenscreen 300baud serial terminal.
<shevy>
if there would be an editor written in ruby...
<shevy>
if ruby could be used like C ...
Araxia has quit [Read error: Connection reset by peer]
fearoffish has quit [Quit: Computer has gone to sleep.]
<WirIrrenUmher>
what does "<--" do in ruby?
Araxia has joined #ruby
<WirIrrenUmher>
i mean "<<-"
<apeiros_>
it's part of a heredoc
<apeiros_>
<<-DELIMITER
<apeiros_>
is a string literal
fbernier has quit [Ping timeout: 248 seconds]
<shevy>
WirIrrenUmher, your nick is great
<apeiros_>
with the content of the string being the text that starts on the next line and is terminated with DELIMITER
<WirIrrenUmher>
shevy: thanks
<WirIrrenUmher>
apeiros_: okay, thanks
<apeiros_>
note that the string really is <<-DELIMITER. meaning you can do foo(<<-DELIMITER), or foo(<<-DELIMITER.downcase)
<apeiros_>
or even multiple here-docs in one line: article(<<-SYNOPSIS, <<-TEXT)
<WirIrrenUmher>
apeiros_: okay... i just read it in some sample code and couldn't find out what it dies
samuel02 has quit [Remote host closed the connection]
<WirIrrenUmher>
does
<shevy>
WirIrrenUmher you should have a look at "alle meine entlein.rb" from apeiros_
<WirIrrenUmher>
what?!
<shevy>
it is some .rb file that plays this audio tune
<WirIrrenUmher>
okay
Eldariof-ru has quit []
fayimora has quit [Ping timeout: 240 seconds]
mdpatrick has quit [Quit: mdpatrick]
pu22l3r has quit [Ping timeout: 248 seconds]
<cmaujean>
I've got a gem that needs to run on both 1.8.7 and 1.9.3, whats the current wisdom on this, should I make different gems, or one gem that remains compatible with both versions through ifs and case statements?
<EstanislaoStan>
blazes816: How would I include my while conditional if I used Enumerable#each?
<shevy>
cmaujean I would use only code that works in both versions
<shevy>
that means, avoid: -> require_relative, new hash syntax ...
<shevy>
(3 items so far)
<cmaujean>
shevy: what about rcov vs simplecov?
<shevy>
hmm... avoid case foo; when bla: lala
<shevy>
never heard of that, what is that?
<shevy>
if it is a pure ruby module, simply turn it into a standalone gem
nikeita has quit [Quit: sleep]
<shevy>
and name it "dualcov" or something :)
<cmaujean>
rcov is a coverage tool for 1.8x and doesn't work in 1.9, simplecov works in 1.9
<shevy>
ok and simplecov does not work in 1.8.x I suppose
<cmaujean>
afaik, no it doesn't
amacgregor_osx has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
<shevy>
but still that sounds easy... just have a method or some other way to use either rcov or simplecov
Draco_ has quit [Ping timeout: 245 seconds]
<cmaujean>
yeah, the main question is really 2 gems or 1 :)
<shevy>
one of course, for your main app
<cmaujean>
I guess I'll go with 1, as i have it coded now :)
TorpedoSkyline has joined #ruby
<blazes816>
EstanislaoStan: add "break unless @should_handle_next_command_type" to the end of the loop block
xaq has quit [Read error: Connection reset by peer]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
xaq has quit [Read error: Connection reset by peer]
manizzle_ has joined #ruby
<EstanislaoStan>
blazes816: Why is this way better? And sorry, I'm bad at thinking of shorter names that remind me what the variable/method/whatever is for.
workmad3 has joined #ruby
Draco_ has joined #ruby
wallerdev has joined #ruby
<blazes816>
Estanislao
dhruvasagar has quit [Ping timeout: 264 seconds]
<blazes816>
EstanislaoStan: only because it's "the ruby way". it's easier to read for other rubyists. they other way would work fine
xaq has joined #ruby
<Mon_Ouie>
EstanislaoStan: Regarding your first question, calling methods from an array literal *is* allowed
hadees has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
sgronblom has quit [Ping timeout: 240 seconds]
<Mon_Ouie>
Ah, never mind, misread what you were trying to do
mwilson_ has quit [Excess Flood]
<apeiros_>
blazes816: meh, breaking from loops is bad style in almost every language
darren_ has quit [Remote host closed the connection]
<apeiros_>
to more or less quote my CS prof: if you break out of a loop, you failed to state your loop condition
mwilson_ has joined #ruby
<apeiros_>
and ruby is especially great at providing a vast arsenal of loops. there's something in for about everybody.
jborica has joined #ruby
<Xethron>
heya guys... I have a IRC bot. I want to search for smileys, but a large regex containing every smily takes a lot of memory. Does anyone have a suggestion? I currently use /:P|:D|:)|:(......./ (Didn't add escapes just to make it look better)
workmad3 has quit [Ping timeout: 252 seconds]
<Mon_Ouie>
apeiros_: I think that some times, it's still more natural to write it using break — when you need a few variables in both the condition and the code to be executed
<apeiros_>
Xethron: "a large regex … takes a lot of memory" - are you just making that up or did you test?
<Xethron>
well, processing power... And yes, I did test it...
<Xethron>
I think I have like 100 different smileys...
<eam>
Xethron: that won't take much memory at all
<apeiros_>
Xethron: that'll certainly cost around 50 wubbabytes!
<lectrick>
apeiros_: / canton7 : So, as it turns out, this will actually work. You don't have to splat an array: rescue OneError, TwoError => e (will rescue both those types of errors, and put the result in e)
<Xethron>
so its /1|2|3|4...|99|100/
<Xethron>
lol
<Xethron>
I just wanted to know if there is a more effective way or not?
<apeiros_>
Xethron: seriously, don't mentarbate.
<lectrick>
(i guess, that's the same as splatting an array tho... anyway the splatted array looks a little more readable to me)
<Xethron>
If there isn't, then its cool
<apeiros_>
Xethron: most likely any other way you'll devise will cost *more* memory
<apeiros_>
most likely *vastly* more
<apeiros_>
unless you plan to write a C extension and are really good at it…
<Xethron>
apeiros_: ah, awesome. Thanks :)
<apeiros_>
Xethron: just be careful about proper escaping
<apeiros_>
/:)/ e.g. is wrong
jgrevich_ has joined #ruby
<Xethron>
I know
<eam>
Xethron: how did you test that it "takes a lot of memory?"
jgrevich has quit [Read error: Connection reset by peer]
<Xethron>
eam: I ment processing power soz
<blazes816>
eam: I believe memory was changed to cpu time
<eam>
I ask because there are a number of escaping bugs you could introduce which would in fact take a lot of memory
jgrevich has joined #ruby
<Mon_Ouie>
Saves the trouble of escaping those manually
<eam>
or processing time
sdwrage has joined #ruby
<eam>
eg many expressions with an unescaped ?
bosphorus has quit [Remote host closed the connection]
mwilson_ has quit [Excess Flood]
<eam>
but those would be errors in the regex, and not slowness in matching a large a|b|c pattern
<Xethron>
and I did it for a few lines at once to see how quick it does it. Just wondered if there's a better way or not.
mwilson_ has joined #ruby
jgrevich_ has quit [Ping timeout: 255 seconds]
yakko has joined #ruby
TorpedoSkyline has joined #ruby
davidpk has joined #ruby
wangr_ has joined #ruby
wangr has quit [Ping timeout: 248 seconds]
davidpk has quit [Client Quit]
asdfqwer has left #ruby [#ruby]
hynkle has quit [Quit: Computer has gone to sleep.]
EricKamsky has joined #ruby
Gavilan has joined #ruby
iamjarvo has joined #ruby
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
itnomad has quit [Quit: Leaving]
stephenjudkins has quit [Ping timeout: 260 seconds]
nortel has joined #ruby
geekbri has quit [Remote host closed the connection]
fbernier has quit [Ping timeout: 252 seconds]
Gavilan is now known as gavilan2
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
yakko has quit [Ping timeout: 260 seconds]
<ForSpareParts>
Anyone know why I would get a "no such file to load -- sinatra" error upon requiring Sinatra? I've already installed the package with gem...
<otters>
try gem "sinatra"
<otters>
i.e. put that in the top of your file
nortel has left #ruby [#ruby]
<shadoi>
ForSpareParts: Make sure you're using the same ruby runtime, and make sure it's in any isolation systems (like bundler, rbenv, etc)
mikepack has quit [Ping timeout: 260 seconds]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
mwilson_ has quit [Excess Flood]
<ForSpareParts>
otters, I get an "undefined method 'gem' for main:Object" error when I do that.
mikepack has joined #ruby
mwilson_ has joined #ruby
<ForSpareParts>
shadoi, I do seem to remember having more than one ruby runtime for some reason. How could I check that everything's in sync?
<ForSpareParts>
I mean I'm assuming that, say, gem is using a different runtime than I'm invoking from the terminal or something along those lines?
balki_ has quit [Read error: Connection reset by peer]
balki has joined #ruby
Azure has joined #ruby
br4ndon has joined #ruby
jjang has joined #ruby
pk1001100011 has joined #ruby
tzvi has quit [Read error: Connection reset by peer]
Nanuq has joined #ruby
pskosinski has quit [Ping timeout: 264 seconds]
br4ndon has quit [Client Quit]
internet_user has quit [Remote host closed the connection]
pk1001100011 is now known as pskosinski
br4ndon has joined #ruby
dv310p3r has quit [Ping timeout: 260 seconds]
headius has quit [Ping timeout: 248 seconds]
bwlang_ has joined #ruby
greyEAX has joined #ruby
br4ndon has quit [Client Quit]
<apeiros_>
Hanmac: yeah, only in america, when a costumed person shoots down people, the *costumes* get banned…
<apeiros_>
Hanmac: also TIL - in the US, buying a car is far more regulated than buying a gun & ammunition
shiki has joined #ruby
<apeiros_>
it's ridiculous, really.
techsaas has quit [Quit: WeeChat 0.3.5]
joshman_ has quit [Ping timeout: 264 seconds]
kevinbond has quit [Quit: kevinbond]
<blazes816>
apeiros_ that isn't true
tatsuya_o has joined #ruby
<shadoi>
ugh, I can't escape this fucking topic.
shadoi has left #ruby [#ruby]
bglusman has quit [Remote host closed the connection]
<blazes816>
a 4 year old could buy a car if they had money and could spell their name
chichou has joined #ruby
WirIrrenUmher has quit [Ping timeout: 252 seconds]
j| has quit [Remote host closed the connection]
<eam>
blazes816: no they can't -- look up vicarious liability
<eam>
giving a 4 year old a dangerous tool is a textbook example
<shevy>
Hanmac yeah no idea why batman costumes are banned
<eam>
(same is true for a gun)
<blazes816>
eam: I don't mean driving or anything
<blazes816>
eam: obviously for that you need a lot more
<blazes816>
but ownership?
tomb_ has joined #ruby
<eam>
right
<blazes816>
i've owned a vehicle since I was 12. Not 4, but I guess we can move it up to 12.
<shevy>
hmm if joker costumes would be banned, they would have to forbid makeup
bk2000 has joined #ruby
fantazo has quit [Remote host closed the connection]
<eam>
also this discussion is retarded, costumes aren't being made illegal or regulated -- this is one theatre changing their private business rules on private property
<eam>
wearing a batman outfit is protected first amendment speech in America and cannot be curtailed by the government
<eam>
totally different from the issue of regulating gun/car purchases
<shevy>
doesn't one amendment say that everyone can use arms?
<eam>
blazes816: whoever gave you a car at 12 might be found liable if you were to crash it
<eam>
shevy: yes but in America the bill of rights applies to the federal government, not necessarily the states or municipal governments
<blazes816>
eam: I bought, with cash, my name on the title. of course my father would be found liable if I were to even drive it, because you can't do that until 14.
<apeiros_>
blazes816: do you need a license to drive a car? do you need training in order to get that training? do you have to pass a written test? a practical test? need insurance for the vehicle? need to pass inspections at intervals?
<eam>
shevy: that's why gun legislation is at the state level, not federal
<apeiros_>
blazes816: and now try the same questions for weapons
<blazes816>
apeiros_: I was only speaking of ownership
<apeiros_>
blazes816: "oh let me exempt everything but the part where my argument makes sense"? :)
<blazes816>
" Hanmac: also TIL - in the US, buying a car is far more regulated than buying a gun & ammunition"
<eam>
apeiros_: your argument is the one that doesn't make sense. Regulating driving on roads is very different than limiting access to vehicles in general
<blazes816>
Not "Hanmac: TIL in the US driving a car is far more regulated than buying a gun & amunition"
nicoulaj has quit [Read error: Connection reset by peer]
<eam>
apeiros_: case in point, nothing prevents an unlicensed driver from buying a car and using it illegally
<apeiros_>
blazes816: ok, I think it's *obvious* that buying a car means driving it
<apeiros_>
the 0.01% that buy a car for their collection are the exception
<shevy>
cars kill more people than guns
<blazes816>
you'd be wrong.
<blazes816>
robotics, mechanical education materials, spare parts
<apeiros_>
eam: but that's not the argument
Progster has quit [Ping timeout: 244 seconds]
<eam>
apeiros_: that's not *your* argument, but it is mine
<eam>
and mine is better
jgarvey has quit [Quit: Leaving]
<apeiros_>
eam: so lets not regulate anything because people might do it illegally anyway?
<apeiros_>
awesome argument…
<eam>
apeiros_: sorry, are you suggesting that shooting people isn't already illegal?
<apeiros_>
eam: no
<eam>
you're the one mis-applying the concepts of ownership, regulation, and illegal activity
dangerousdave has quit [Ping timeout: 260 seconds]
<apeiros_>
no I'm not
<eam>
guns and cars, both are free to buy
<Tasser>
how do you run minitest unit tests from ruby code?
<eam>
guns and cars, both are HEAVILY regulated to use
<eam>
apeiros_: do you see your error?
Draco___ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<apeiros_>
eam: assuming your assertions are correct
heftig has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<apeiros_>
but from what I've heard it's quite to the contrary
<eam>
you've heard wrong
<apeiros_>
eam: so care to answer the questions above?
<eam>
apeiros_: which question?
<apeiros_>
maybe you can clear it up and let me hear it correct then…
<apeiros_>
>> do you need a license to drive a car? do you need training in order to get that training? do you have to pass a written test? a practical test? need insurance for the vehicle? need to pass inspections at intervals?
iamjarvo has joined #ruby
mahmoudimus has joined #ruby
jrajav has joined #ruby
axl_ has quit [Quit: axl_]
<heftig>
s/get that training/get that license/
<apeiros_>
yes, of course
<eam>
operation of a car and firearm are both heavily regulated -- it's much easier to get permission to drive a car in a city than it is to fire a gun in a city
nateberkopec has joined #ruby
<apeiros_>
eam: you're evading
KindOne has quit [Quit: ZNC from TrekWeb Internet Services - https://trekweb.org/]
darkc0met has quit [Read error: Connection reset by peer]
<eam>
I'm answering the question you are trying to ask
<apeiros_>
you're assuming
<eam>
no, I'm stating
<_bart>
I'm having trouble writing a proper test for my new Resque plugin: https://github.com/bartolsthoorn/resque-workers-lock Resque works with redis. The test should check what jobs are queue'ed and ensure the plugin works. (I know because I tested it with a log file and it shows correct behaviour) Contributors welcome!
<eam>
and you're confused
<apeiros_>
00:26 eam: I'm answering the question you are trying to ask
Draco_ has quit [Ping timeout: 260 seconds]
<apeiros_>
that's an assumption
<eam>
nope
philips_ has quit [Excess Flood]
<apeiros_>
lol
<_bart>
also my first gem I ever released :)
<apeiros_>
eam: so why don't you just answer the question straight?
<Tasser>
apeiros_, don't feed the troll. so a) ignore b) go op rage
<eam>
I did
<blazes816>
apeiros_: yes need a license. you probably need training, but if you could figure it out whatever. you do have to pass a (easy) written exam. practical test- not everywhere. you only need liability insurance.
<apeiros_>
eam: no. you didn't
<jrajav>
Holy off topic politics Batman
<eam>
apeiros_: 15:26 < eam> operation of a car and firearm are both heavily regulated
mpereira has joined #ruby
Draco_ has joined #ruby
<eam>
you need licenses for both
<blazes816>
apeiros_: you need a license to carray a weapon. you probably need training to get the license to carray this
<apeiros_>
eam: that's not an answer. blazes816: thanks for actually answering
axl_ has joined #ruby
Draco___ has quit [Ping timeout: 260 seconds]
<eam>
you're obtuse
eam was kicked from #ruby by apeiros_ [no ad-hominems]
tewecske has quit [Quit: Leaving.]
gryllida has joined #ruby
philips_ has joined #ruby
<apeiros_>
blazes816: how about renewals and inspections? do you have to do that for cars?
<Tasser>
apeiros_, my guess would be you picked b)
<workmad3>
apeiros_: wow... it's like eam had never met a programmer before...
ZachBeta has quit [Quit: Computer has gone to sleep.]
<apeiros_>
Tasser: no, I just apply channel rules. he can be abrasive to me all he wants. the moment he insults he has to go.
<blazes816>
apeiros_: you need to renew your license every 4 years, but that's just standing in line. they don't do vehicle inspections everywhere
<blazes816>
workmad3: lol, very true
<workmad3>
blazes816: don't you love being in a profession where you can pick two people, one will argue that black is white, while the other is convinced it's a shade of magenta? :)
<blazes816>
workmad3: Black isn't a color!
<shevy>
only because the human eye cant discern the wavelength in use!
<_bart>
you can't keep people from killing other people, unfortunately
<shevy>
I am going to get me infrared eyes one day
<_bart>
you can only make it harder to do
<workmad3>
blazes816: it is if you're dealing with the subtractive colour model :P
yoklov has quit [Quit: bye!]
justsee has joined #ruby
<heftig>
but eyes are additive!
<workmad3>
heftig: eyes? I was talking about paint!
yugui is now known as yugui_zzz
nari has joined #ruby
<blazes816>
so, apeiros_, jw, how do you feel guns should be handled? flat out illegal?
nilg has joined #ruby
<workmad3>
blazes816: with an intelligence test before ownership is granted...
<blazes816>
that'd be nice
<jrajav>
With the right kind of computer and the right kind of intent, you can bring down a hospital's power long enough to kill many people at once
<jrajav>
Should we outlaw computers?
<workmad3>
blazes816: yeah... can't be letting smart people get guns
<apeiros_>
blazes816: I see no reason anybody should have a weapon. I don't think the world we live in allows to go that route (yet), though.
<workmad3>
blazes816: anyone with an IQ > 100 should be refused ownership :P
<blazes816>
haha
sailias has joined #ruby
<blazes816>
apeiros_, I figured. I imagine that's a common opinion outside the US?
<apeiros_>
blazes816: however, I see absolutely no reason even in the world as it is, for a private person to have an automatic, or even half-automatic gun.
<blazes816>
the only other place i've been is mexico and they love guns
<shevy>
mexico also has insane drug trafficking
Draco_ has quit [Read error: No route to host]
<blazes816>
apeiros_, definitely true.
Draco_ has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
<apeiros_>
blazes816: I mean by what rationale can you justify having a weapon? self-defense is clearly not it anymore when it's about such weapons…
<jrajav>
A free, democratic society should never outlaw something like guns. That opens a very, very dangerous door. Soon everything the government wants to control, it will, all under the name of safety and security.
<blazes816>
shevy: thank the CIA
<shevy>
they already do so, with or without guns
<jrajav>
Regulation is the proper route.
<workmad3>
jrajav: haha... regulation *is* control
<shevy>
the idea that anyone cares just because every few years people go to ballots and make their X, anything changes as a result of this, is an illusion, with or without outlawing guns
<jrajav>
workmad3: Precisely
<jrajav>
It's control that doesn't undermine freedom
ramblex has quit [Quit: ramblex]
<blazes816>
jrajav: reread 1984
<workmad3>
jrajav: bullshit... any and all control undermines freedom
<workmad3>
jrajav: it's just giving up some individual freedom in the name of a working society
<jrajav>
You don't understand what freedom is
<apeiros_>
blazes816: not entirely (common view outside the US) - we have our army weapons at home. and every citizen is required to go to the army. so everybody who wants can theoretically have a gun for free. I'm not a fan of it.
<apeiros_>
and for some reason it stood up against a voting about it just recently.
axl_ has quit [Quit: axl_]
<shevy>
apeiros_ you must defend chocolate with a gun
<blazes816>
apeiros_ where do you live?
<apeiros_>
blazes816: switzerland
<shevy>
in chocolania
<blazes816>
ah, figured
<blazes816>
i'm a fan, but never been there
<apeiros_>
blazes816: but even with that, our guns-per-capita is lower than that of the US - that part amazes me…
<blazes816>
apeiros_: my father has >20 guns. so that it'll do it
<blazes816>
in mass
<shevy>
ack
<shevy>
an addicted man
<blazes816>
definitely
<blazes816>
been marries >10 times
<shevy>
like the guy from american beauty
<blazes816>
married*
<apeiros_>
2 guns per bride?
<workmad3>
heh
<shevy>
what happened to the wives? :)
<blazes816>
only ~7 wives
philips_ has quit [Excess Flood]
<blazes816>
he's hit some them up a few times
kpshek has quit []
<workmad3>
the only guns I've ever seen have been either fake or decomissioned
<blazes816>
not *hit*. bad choice of words
<shevy>
the only real guns I see here are carried by cops
<blazes816>
shevy: he was also a cop
<blazes816>
go figure
<shevy>
ahhh
<workmad3>
shevy: I've never even been around armed cops somehow (or at least, not that I've noticed :) )
<blazes816>
i despise the man, but that's beside the point that a bunch of people have stockpiles, which ups the per capita
<heftig>
in this room here is a safe full of rifles
<blazes816>
workmad3: you can't be in the US? not sure i've seen an unarmed cop (on duty)
<workmad3>
blazes816: nope
<workmad3>
blazes816: UK
justinmcp has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
<blazes816>
ah. hoped maybe a nice small town somewhere
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<workmad3>
blazes816: heh :) hopeful eh? ;)
<workmad3>
ok, out of battery power, g2g
<blazes816>
workmad3: i honestly don't mind guns too much, but not when the cops have them
philips_ has joined #ruby
<workmad3>
blazes816: heh, so you don't trust the people nominally trained to have guns... interesting :)
<blazes816>
trained to be assholes
sailias has quit [Ping timeout: 260 seconds]
<workmad3>
anyway, I am now on empty battery... night
<apeiros_>
blazes816: is that the prevalent impression of cops in the US?
<blazes816>
enjoy your safety!
<apeiros_>
n8 workmad3
fearoffish has quit [Quit: Computer has gone to sleep.]
<blazes816>
apeiros_: pretty much split into 2. probably 60% or so hate cops, the others are too stupid to care.
emmanuelux has joined #ruby
<blazes816>
or, are more forgiving :)
<apeiros_>
funny. here it's usually the <22 who mostly dislike the cops. overall it's probably 80% who see them in a positive light
Progster has joined #ruby
<apeiros_>
but I have the impression that there's much less reported bad behavior of cops here. don't know whether that's just due to the media or reflects the actual behavior differences…
<blazes816>
here, most people arn't bad. therefore the cops (who are just a giant business), have to find other stuff to do.
<blazes816>
most people that dislike cops stongly, do so because they who and what they work for, and the things that implicitly support
<blazes816>
that they*
<blazes816>
drug prohibition, illegal searches and seizures
hunglin has quit [Read error: Operation timed out]
<blazes816>
etc
johnlcox has quit [Read error: Operation timed out]
workmad3 has quit [Ping timeout: 260 seconds]
hadees has quit [Quit: hadees]
Draco___ has joined #ruby
Draco_ has quit [Ping timeout: 260 seconds]
Guest1223 has quit [Quit: /quit]
meskyanichi has joined #ruby
alindeman has joined #ruby
TheHairyWoodsman has joined #ruby
<shevy>
well
<shevy>
some thugs can be used like cops
awarner has quit [Remote host closed the connection]
_alpaca_ has quit [Ping timeout: 252 seconds]
Nikcolas has joined #ruby
<shevy>
see the protests in G8 http://www.youtube.com/watch?v=E9H731Xt_04 at 08:50, undercover cops acting as agent provocateurs and instructing the local cops to move back away from streets a bit
Nikcolas has quit [Client Quit]
sdwrage has quit [Quit: geekli.st/programmer]
Morkel has quit [Quit: Morkel]
sdwrage has joined #ruby
bowlowni has quit [Remote host closed the connection]
iamphi has joined #ruby
Draco___ has quit [Read error: Connection reset by peer]
talmuth has quit [Read error: Connection reset by peer]
<iamphi>
I am getting a "Exec format error" on windows when trying to run the 7zip 64bit installer. More details here: http://pastebin.com/DsYb2XgW
talmuth has joined #ruby
bowlowni has joined #ruby
Draco_ has joined #ruby
piotr has quit [Ping timeout: 260 seconds]
grillo has quit [Ping timeout: 245 seconds]
<_bart>
A var can be Nokogiri::HTML::Document but also a Nokogiri::XML::Element, how do I check for the namespace of a var?
bowlowni has quit [Remote host closed the connection]
TheHairyWoodsman has quit [Quit: Leaving.]
<_bart>
iamphi: added #!/bin/bash to the top of setupNewComputer.rb ?
carloslopes has quit [Quit: Leaving.]
rdctnst has joined #ruby
hadees has joined #ruby
<iamphi>
_bart: I don't thinks so. I can run other installers like that, but they are 32bit
<iamphi>
and i don't have bash on windows
billiam has quit [Quit: Leaving]
<_bart>
oh yes that's true, hmm I knew that fixed some exec format errors for me in the past but that was on unix obviously
<_bart>
apeiros_: I'd like to check on Nokogiri::*
TandemAdam has joined #ruby
xaq has quit [Remote host closed the connection]
chrisbolton has quit [Quit: chrisbolton]
AdamSeabrook has joined #ruby
caveat- has quit [Quit: leaving]
grillo has joined #ruby
wilmoore has quit [Remote host closed the connection]
wilmoore has joined #ruby
bosphorus has quit [Remote host closed the connection]
KindTwo has joined #ruby
<blazes816>
_bart: something like self.class.to_s.split("::").first == 'Nokigiri' ?
caveat- has joined #ruby
<_bart>
ah that's cool, blazes816, thanks!
yugui_zzz is now known as yugui
iamphi has quit [Quit: iamphi]
<blazes816>
np
SQLStud has quit [Quit: Leaving]
rdctnst has quit [Quit: Leaving]
baroquebobcat has quit [Quit: baroquebobcat]
w3bcrawler has quit [Ping timeout: 245 seconds]
Xethron_ is now known as Xethron
Xethron has quit [Changing host]
Xethron has joined #ruby
<Xethron>
woot!!! I just found a tron AI comp!
yy is now known as awayy
KindTwo has quit [Changing host]
KindTwo has joined #ruby
wilmoore has quit [Read error: Operation timed out]
KindTwo is now known as KindOne
<heftig>
send it to the grid
* Xethron
applies
g_rotbart has joined #ruby
darkc0met has joined #ruby
<Xethron>
never done this before... will prob not win... but what can I lose?
<Xethron>
oh darn... needs to be in java or .net...
monokrome has joined #ruby
monokrome has quit [Excess Flood]
* Xethron
wonders wich of the two is faster...
abra has quit [Ping timeout: 276 seconds]
<blazes816>
Xethron: that's a ridiculous, because there's no good up-to-date ruby for the CLR
<blazes816>
ridiculous question*
abra has joined #ruby
twinturbo has quit [Quit: twinturbo]
Draco___ has joined #ruby
<Xethron>
I didn't mean ruby...
<blazes816>
just kidding
<Xethron>
I hoped I could, and then saw its .net...
<blazes816>
I prefer C# over Java any day
<blazes816>
.net only, or can you submit JVM binaries?
<Xethron>
I just dunno .net
<Xethron>
well, I have two months till the comp
<Xethron>
lemme check
<Xethron>
"Your program must be able to be compiled in either a Java 7 or a .NET 4 environment."
<blazes816>
If you can do JVM binaries, write it in mirah and submit the .class files. Otherwise learn C#. If you know Java, it's extremely similar.
<blazes816>
Bingo
<blazes816>
mirah my frield
<blazes816>
friend*
<blazes816>
or Scala
adac has joined #ruby
<Xethron>
Java programs must be compiled using maven and .NET projects must be compiled using msbuild.
fflush has joined #ruby
Draco_ has quit [Ping timeout: 260 seconds]
khakimov has joined #ruby
tiripamwe has quit [Ping timeout: 252 seconds]
<blazes816>
darn
<Xethron>
and "The operating system that will be used for the challenge is Windows Server 2003."
<Xethron>
hehe. yar
<blazes816>
wtf
<Xethron>
no idea?
ilyam has joined #ruby
<blazes816>
write a massive exploit masked as a tron ai
williamcotton_ has quit [Quit: williamcotton_]
<blazes816>
I'd go with C# if I were you
<Xethron>
I don't really know windows or .net all that well... But most people seem to love C#
<Xethron>
ya
<blazes816>
you can write it on unix, and port it windows
<Xethron>
lol, I just dunno C# or .net... :D
<blazes816>
it's super easy
<Xethron>
But cant be much different to C and C++
<blazes816>
if you know them you'll do fine
Draco_ has joined #ruby
<Xethron>
:)
<blazes816>
and especially if you know java
<Xethron>
I hear they're a lot alike
<Xethron>
I'm reading up on strategies people take to wright the AI...
monokrome has joined #ruby
monokrome has quit [Excess Flood]
<jrajav>
C# is actually VERY different from C++
<jrajav>
It's a good thing
<Xethron>
we have 4 seconds per move... which is quite a lot!
<jrajav>
You'll know the operators, that's about it
Draco___ has quit [Ping timeout: 248 seconds]
<blazes816>
you know the general syntax
<Xethron>
the bord is a 30x30 sphere
yugui is now known as yugui_zzz
nwest has joined #ruby
<jrajav>
It's a lot closer to Java; thankfully, it's also not TOO close to Java
<Xethron>
jrajav, thats what the internet is for
<jrajav>
Attaboy :P
<adac>
switching over from mechanize 2.1.1 to 2.5.1 now suddenly gives me an error like this: undefined method `save_as' for #<Mechanize::Image:0x0000000639dce8> any ideas what might be wrong?
verto is now known as verto|off
<Xethron>
ok, lemme go bother people in C#
snearch has quit [Quit: Verlassend]
seanstickle has joined #ruby
ephemerian has quit [Quit: Leaving.]
fbernier has joined #ruby
wpaulson has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
talmuth has quit [Read error: Connection reset by peer]
<Xethron>
Thanks blazes816 and jrajav :)
talmuth has joined #ruby
verto|off is now known as verto
tatsuya_o has joined #ruby
raz has left #ruby ["Leaving..."]
chson has quit [Remote host closed the connection]
tomb_ has quit [Quit: Computer has gone to sleep.]
wilmoore has joined #ruby
verto is now known as verto|off
mrdodo has quit [Remote host closed the connection]
shoky has joined #ruby
shoky has left #ruby [#ruby]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
deryl has quit [Quit: deryl]
nateberkope has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
awayy is now known as yy
mwilson_ has quit [Excess Flood]
shoky has joined #ruby
<EstanislaoStan>
Is this acceptable? Defining the methods inside my methods like this just for organization and easy understanding's sake? http://pastie.org/4309226
jerm1080 has joined #ruby
mwilson_ has joined #ruby
<jerm1080>
Hey guys can any tell me where to look for my problem in this stack?
<seanstickle>
jerm1080: you're trying to split a nil
<seanstickle>
jerm1080: so look for what is being split, and see why it's nil
<jerm1080>
In which file?
<jerm1080>
This isn't a program of mine
JustinCa_ has joined #ruby
<jerm1080>
One I'm tying to run
nateberkopec has quit [Ping timeout: 240 seconds]
<Maher4Ever>
Hey everyone, does anyone know what can be the reason rb_gc_mark blow up on me sometimes with this error 'unknown data type 0x0(02485db8) non object' ?