fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
nari has quit [Ping timeout: 245 seconds]
khakimov has joined #ruby
ph^ has quit [Ping timeout: 244 seconds]
luckyruby has quit [Remote host closed the connection]
sebastorama has quit [Quit: Computer has gone to sleep.]
fbernier has quit [Ping timeout: 276 seconds]
<bricker88>
Did Ruby 19. drop Digest::MD5? I just want to generate unique hashes for some things, what's the best way to do that now? Sort of like commit hashes for git
<bricker88>
1.9*
baroquebobcat has quit [Quit: baroquebobcat]
sailias has joined #ruby
<bricker88>
ah I can just use Digest::SHA1
daniel_hinojosa has joined #ruby
mikepack has quit [Remote host closed the connection]
dagobah has quit [Ping timeout: 246 seconds]
chrishunt has quit [Ping timeout: 260 seconds]
<Sou|cutter>
bricker88: there's OpenSSL::Digest::MD5 I think
<dagnachewa>
will ruby in the future remove the lock ? for multithreading purposes ? what is the future of ruby regarding multithreading ?
olrrai has quit [Quit: Saliendo]
await has quit [Quit: await]
blazes816 has quit [Quit: blazes816]
Banistergalaxy has joined #ruby
locriani_ has joined #ruby
<fowl>
dagnachewa: i hear its all about dat copy-on-write
ph^ has joined #ruby
locriani has quit [Ping timeout: 244 seconds]
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
havenn has joined #ruby
Nisstyre has joined #ruby
rcloak has quit [Quit: rcloak]
ncr100_ has joined #ruby
ph^ has quit [Ping timeout: 260 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
dku has joined #ruby
dku has quit [Changing host]
dku has joined #ruby
cbuxton has quit [Quit: Leaving.]
linoj has joined #ruby
Nisstyre has quit [Excess Flood]
ncr100 has quit [Ping timeout: 255 seconds]
Monie has quit [Quit: Quit]
dku has quit [Quit: dku]
mikepack has quit [Remote host closed the connection]
guns has joined #ruby
mercwithamouth has quit [Read error: Operation timed out]
austinbv has quit [Ping timeout: 246 seconds]
gift has quit [Ping timeout: 276 seconds]
ZachBeta has joined #ruby
ejnahc has quit [Changing host]
ejnahc has joined #ruby
rubious has joined #ruby
grizlo42 has quit [Quit: Leaving.]
Banistergalaxy has quit [Ping timeout: 264 seconds]
amaya_ has joined #ruby
davidcelis has joined #ruby
sdwrage has joined #ruby
jasonkuhrt has joined #ruby
artOfWar has quit [Remote host closed the connection]
Nisstyre has joined #ruby
ejnahc has quit [Remote host closed the connection]
setuid has joined #ruby
ejnahc has joined #ruby
snorkdude has joined #ruby
<setuid>
I'm trying to get gtdtracks working, and the install tells me to run 'bundle install', but Ruby 1.8 doesn't include bundle, and I can't upgrade to 1.9 (no 1.9 in Debian Squeeze). Where or what package contains "bundle"?
ncr100_ has quit [Ping timeout: 260 seconds]
<fowl>
gem install bundler
<setuid>
Trying that now..
Hanmac1 has joined #ruby
specialGuest has quit [Quit: WeeChat 0.3.8]
scb has joined #ruby
Chryson has joined #ruby
<setuid>
Same, after successfully installing bundler
Hanmac has quit [Ping timeout: 276 seconds]
<setuid>
Bundler couldn't find some gems.Did you run `bundle install`?
<setuid>
$ bundle install
<setuid>
-bash: bundle: command not found
Juul has quit [Ping timeout: 246 seconds]
fbernier has joined #ruby
banisterfiend has joined #ruby
austinbv has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
snorkdude has quit [Remote host closed the connection]
* setuid
tries again
<setuid>
Now it's working
dagnachewa has quit [Quit: Leaving]
gift has joined #ruby
techhelp has joined #ruby
tiripamwe has quit [Ping timeout: 260 seconds]
await has joined #ruby
dmiller has joined #ruby
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
GraemeLion has joined #ruby
locriani_ has quit [Quit: Leaving...]
c0rn_ has quit [Quit: Computer has gone to sleep.]
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
sneakyness_wk has quit [Quit: tato]
techhelp has quit [Quit: This computer has gone to sleep]
<await>
I'm to a point where Name::Configuration.new creates a good configuration object, but can't figure out how to get changes in from, say, a rails intializer.
lolzie has joined #ruby
justinmcp has quit [Remote host closed the connection]
linoj has quit [Quit: linoj]
ph^ has joined #ruby
noahsussman has quit [Quit: Unexpected SpanishInquisitionException]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
linoj has joined #ruby
Dreamer3 has joined #ruby
pipopopo has quit [Ping timeout: 260 seconds]
Ruler_Of_Heaven_ has joined #ruby
jarred has quit [Quit: jarred]
jenrzzz has quit [Ping timeout: 268 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
Z_Mass has joined #ruby
Solnse has joined #ruby
Peter_lee has joined #ruby
hadees has quit [Quit: hadees]
<Peter_lee>
Is there a way to see all the content that outputs in a ruby irb window? I'm parsing a large file and can't see all the text.
nari has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
pipopopo has joined #ruby
Ruler_Of_Heaven_ has quit [Ping timeout: 268 seconds]
tyfighter has quit [Quit: tyfighter]
slate has joined #ruby
<banisterfiend>
Peter_lee if you use pry it'll get sent through the 'less' pager which should make it easy for u
<slate>
Hi. What would be the best rubish way to create a config file for my script? I guess some kind of parser, not sure what the format should be, kinda would like something key = value rather than some strict json
cakehero has quit [Quit: Computer has gone to sleep.]
<fowl>
slate: i would use json or yaml
wpaulson has joined #ruby
<banisterfiend>
slate or just pure ruby
<banisterfiend>
using a cute little dsl or clean api
banisterfiend has quit [Ping timeout: 276 seconds]
manizzle has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
lolzie has quit [Quit: Page closed]
Spooner has quit [Ping timeout: 276 seconds]
cmasseraf has quit [Ping timeout: 252 seconds]
seanstickle has quit [Quit: seanstickle]
AlbireoX has joined #ruby
AlbireoX`Laptop has quit [Read error: Connection reset by peer]
cmasseraf has joined #ruby
roadt has joined #ruby
nari has joined #ruby
ewag has joined #ruby
hadees has joined #ruby
Peter_lee has quit [Quit: ChatZilla 0.9.88.2 [Firefox 3.6.18/20110628230241]]
moted has quit [Ping timeout: 248 seconds]
havenn has quit [Remote host closed the connection]
noahsussman has quit [Quit: Unexpected SpanishInquisitionException]
hadees has quit [Client Quit]
khakimov has quit [Quit: Computer has gone to sleep.]
snorkdude has joined #ruby
philcrissman has joined #ruby
await_ has joined #ruby
shadoi1 has joined #ruby
shadoi1 has quit [Client Quit]
await has quit [Ping timeout: 255 seconds]
await_ is now known as await
Agis__ has quit [Quit: Agis__]
GraemeLion has quit [Quit: out]
shadoi has quit [Ping timeout: 245 seconds]
mistergibson has joined #ruby
<mistergibson>
With respect to String#encode, encoding options Hash : :replace and :fallback are exclusive - yes?
asklov has quit [Ping timeout: 244 seconds]
<mistergibson>
Odd thing also : when I supply a Proc to :fallback as docs say .. it attempts to convert it to a hash ... odd.
philcrissman has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 246 seconds]
apok_ has joined #ruby
thiagopnts has quit [Quit: Leaving]
apok has quit [Ping timeout: 244 seconds]
apok_ is now known as apok
<setuid>
Can someone give me some hints on how to configure Apache to run Ruby/Rails apps? Do I have to log in interactively and run ./script/server under an interactive screen(1) session to run these apps?
<mistergibson>
setuid: have you considered passenger for Apache ?
<setuid>
mistergibson: It's already installed
<mistergibson>
ok
<setuid>
Not sure how I verify that it's working though
<setuid>
And I've been googling for awhile, nobody has this figured out, apparently. They all give up and use the fcgid approach.
<setuid>
with lots of workarounds and hacks
linoj has quit [Quit: linoj]
Vert has quit [Ping timeout: 252 seconds]
hbpoison has quit [Ping timeout: 260 seconds]
<setuid>
Any ideas? Links you can point me to?
<bnagy>
setuid: try one of the rails channels maybe
c0rn_ has joined #ruby
apok has quit [Quit: apok]
<karstensrage>
there is config/initializers/devise.rb
tommyvyo has quit [Quit: Computer has gone to sleep.]
seanwash has quit [Quit: Computer has gone to sleep.]
<karstensrage>
should i put my config in there or should i create my own config like config/initializers/myconfig.rb
machty has quit [Quit: machty]
rakl has joined #ruby
gen0cide_ has joined #ruby
Nisstyre-laptop has joined #ruby
demet8 has joined #ruby
demet8 has quit [Client Quit]
tommyvyo has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
cmasseraf has quit [Quit: This computer has gone to sleep]
wargasm has joined #ruby
hbpoison has joined #ruby
mercwithamouth has joined #ruby
SeySayux has quit [Ping timeout: 252 seconds]
meskyanichi has quit [Quit: Leaving...]
meskyanichi has joined #ruby
c0rn_ has quit []
SeySayux has joined #ruby
ken_barber has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
ken_barber has quit [Ping timeout: 240 seconds]
<setuid>
bnagy: Seems #rails is dead, maybe Rails (the project) is dead too?
philcrissman has joined #ruby
<dmiller>
setuid: I find in large channels it's hard to get people to answer for some reason
sailias has quit [Quit: Leaving.]
<dmiller>
I channel with 20 people in my experience is way more likely to engage than a channel with 200
<Norrin>
dmiller: My experience is exactly the opposite.
libryder has joined #ruby
techhelp has joined #ruby
<Norrin>
The more users, the highly the probability at least 1 person us capable of helping
<Norrin>
Also, probably 1 of those capable isn't AFK
<Norrin>
higher* probability*
<dmiller>
yeah that's sometimes true but a lot of people idle in channels like #ruby/#php/etc and "tune it out" whereas the people idling in #erlang seem to tune in more.
wpaulson_ has joined #ruby
<dmiller>
Completely subjective and non-scientific as Erlang as the only example I can point to :P
<dmiller>
*is
cmasseraf has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
philcrissman has quit [Remote host closed the connection]
<bnagy>
it's not a great time of day
<bnagy>
most of US / europe is asleep
wargasm has quit [Ping timeout: 240 seconds]
luckyruby has joined #ruby
wpaulson has quit [Ping timeout: 244 seconds]
wpaulson_ is now known as wpaulson
ninp0 has joined #ruby
wargasm has joined #ruby
cmasseraf has quit [Read error: Connection reset by peer]
manizzle has joined #ruby
cmasseraf has joined #ruby
Z_Mass has quit [Quit: Leaving]
ananthakumaran has joined #ruby
hbpoison_ has joined #ruby
Guest81709 has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
xnm has quit [Ping timeout: 276 seconds]
sonkei has joined #ruby
larissa has quit [Quit: Leaving]
S1kx has quit [Ping timeout: 260 seconds]
adamkittelson has quit [Remote host closed the connection]
beneggett has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
techhelp has quit [Quit: This computer has gone to sleep]
bradyl0ve has joined #ruby
hbpoison_ has quit [Ping timeout: 252 seconds]
setuid has quit [Quit: Leaving...]
hbpoison has joined #ruby
manizzle has quit [Ping timeout: 245 seconds]
justinmc_ has joined #ruby
manizzle has joined #ruby
sonkei has quit [Quit: Computer has gone to sleep.]
coyo has joined #ruby
sonkei has joined #ruby
Solnse has quit [Ping timeout: 272 seconds]
rakl has quit [Ping timeout: 245 seconds]
Takehiro has joined #ruby
snorkdude has quit [Remote host closed the connection]
<bananagram>
do you upgrade irb with rvm?
v0n has joined #ruby
adamkittelson has joined #ruby
<dmiller>
bananagram: yeah, irb is part of ruby proper
<bananagram>
k
pu22l3r has joined #ruby
insulator has joined #ruby
<dmiller>
rvm install 1.9.3, rvm use 1.9.3 --> your irb is now REPLing ruby 1.9.3
insulator has quit [Remote host closed the connection]
<Banistergalaxy>
bananagram I don't think irb changes much between ruby versions anyway
<bananagram>
is there much difference between 1.8.7 and 1.9.3?
<Banistergalaxy>
Yes
<dmiller>
it's pretty significant yeah
<Banistergalaxy>
Google it ;)
sebastorama has joined #ruby
rakl has joined #ruby
mikepack has joined #ruby
slate has quit [Ping timeout: 245 seconds]
cableray has quit [Quit: cableray]
sonkei has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
Bosma has quit [Ping timeout: 245 seconds]
spopescu has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
yakko has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
yakko has joined #ruby
Guest81709 has quit [Ping timeout: 272 seconds]
justsee has quit [Quit: Leaving...]
yxhuvud has joined #ruby
ph^ has joined #ruby
banisterfiend has joined #ruby
josh^ has quit [Remote host closed the connection]
<karstensrage>
is there anything else besides success! and fail!? for rails or ruby? not sure which is providing that?
wchun has quit [Quit: Leaving]
ken_barber has quit [Ping timeout: 244 seconds]
Erfankam has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
ph^ has quit [Ping timeout: 276 seconds]
c0rn_ has quit []
josh^ has joined #ruby
spopescu has quit [Quit: Leaving]
CodeFriar has quit [Quit: Leaving...]
yasushi has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 244 seconds]
ananthakumaran has quit [Quit: Leaving.]
<Hanmac>
karstenrage i think you should ask the rails quys at #rubyonrails
CodeFriar has joined #ruby
chendo_ has joined #ruby
tonini has joined #ruby
c0rn_ has joined #ruby
await has quit [Quit: await]
adamkittelson has quit [Remote host closed the connection]
CodeFriar has quit [Ping timeout: 240 seconds]
capsule_toy has joined #ruby
sonkei has joined #ruby
hadees has joined #ruby
tyfighter has joined #ruby
austinbv has quit [Ping timeout: 276 seconds]
justsee has quit [Quit: Leaving...]
sambio has quit [Quit: Saliendo]
wuzzzzaah has quit [Quit: wuzzzzaah]
rakl has quit [Quit: sleeping]
emanu has joined #ruby
<emanu>
hey, so I have a Fixnum that I know is 64 bits, I should be able to pack that into an 8 character string, right?
wuzzzzaah has joined #ruby
banisterfiend has quit [Ping timeout: 246 seconds]
<emanu>
or rather, the question is how
mrdodo has joined #ruby
tvw has joined #ruby
tvw has quit [Remote host closed the connection]
stepnem has joined #ruby
pu22l3r has quit [Remote host closed the connection]
namidark has quit [Ping timeout: 246 seconds]
c0rn_ has quit []
mr-rich has joined #ruby
yakko has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
<Hanmac>
emanu is the bits are signed or unsigned?
zigomir has quit [Quit: Leaving]
<emanu>
it's just a positive integer (fixnum)
<emanu>
I'm looking at Array.pack
<emanu>
but having a hard time understanding why it's in array...?
<emanu>
it's actually the output of an fnv1a_64 hash
khakimov has quit [Quit: Computer has gone to sleep.]
<Hanmac>
>> [(10 ** 20)].pack("Q*")
<al2o3cr>
(String) "\x00\x00\x10c-^\xC7k"
<Hanmac>
>> [(10 ** 20)].pack("Q>*")
<al2o3cr>
(String) "k\xC7^-c\x10\x00\x00"
<Hanmac>
depending on wich ending you want
<Hanmac>
>> [(10 ** 20)].pack("Q<*")
<al2o3cr>
(String) "\x00\x00\x10c-^\xC7k"
<emanu>
so what's the reasoning behind having to put it in an array?
tvw has joined #ruby
chimkan has joined #ruby
<Hanmac>
because pack is a method of Array
banisterfiend has joined #ruby
rakl has joined #ruby
<emanu>
yea, that's what I don't get
ananthakumaran has joined #ruby
<emanu>
on top of other things that is...
<emanu>
anyways, not important
Solnse has quit [Ping timeout: 246 seconds]
<emanu>
so can I concatenate two packed 64 bit strings?
<bnagy>
pack is always on array
<bnagy>
like... that what pack / unnpack do
<emanu>
bnagy: I know that it's on array now… I just can't understand why they put it there
<bnagy>
because there is literally no other sensible plave to put it
<emanu>
so I want a data structure of 5000 bits, all set to 0
<bnagy>
like.. where would it go?
<emanu>
how do I do that?
<Hanmac>
because you can pack more than one object
laen_ has quit [Read error: Connection reset by peer]
<emanu>
and then I want to OR my packed integers with that
<bnagy>
emanu: "\x00" * 625
tvw has quit [Remote host closed the connection]
<emanu>
ok, full disclosure:
<emanu>
I'm making a bloom filter
tvw has joined #ruby
<emanu>
and I want 5000 bits, all set to 0
sebastorama has joined #ruby
wchun has joined #ruby
<emanu>
and I'm taking all words from the english dictionary, and hashing them with various hashes, and concatenating and rehashing the output to fill up 5000 bits, then OR-ing it against my filter to set it
<emanu>
… does that make sense?
<emanu>
is there a better way to do this?
<bnagy>
ok?
<bnagy>
well the easiest way to get 5000 bits is as a string, but xor is not ideal on that
<bnagy>
there are some bitvector classes, but every time I want them they are old and nasty
stkowski has joined #ruby
<bnagy>
but you could google around
<emanu>
so should I deconstruct the string into multiples of 64 and do my xor there?
<bnagy>
but 5000 bits is pretty small, so bytewise xor isn't going to be that bad
<bnagy>
you could time it
<emanu>
yea, but 5000 bits is likely not enough for an effective bloom filter
<bnagy>
the cpu time you would save by xoring 64 bits at a time I suspect would be lost by chunking your string
ph^ has joined #ruby
<emanu>
how do people build these things effectively with limited bits allowed in an xor?
<emanu>
so should I just avoid the complexity and build it into an array?
laen_ has joined #ruby
tvw has quit [Remote host closed the connection]
<emanu>
where each index is true/false?
<emanu>
instead of trying to the bits packed into a string/
<bnagy>
an array of 64 bit ints doesn't seem dumb
qwerxy has joined #ruby
tvw has joined #ruby
<bnagy>
like you can always access any bit with the index and a little bit of arithmetic
<emanu>
hrm, that is better than an array of 500000 booleans
thaz has joined #ruby
<bnagy>
one sec I got some cut paste fodder somewhere
<emanu>
so for 500,000 bits, I'd need an integer array of 7812
<bnagy>
I wrote that for some set compression stuff, but it ended up being not ideal for my data
<emanu>
bnagy: that's cool, but it looks like I'd still have to deconstruct it to check the bits
<emanu>
you know how a bloom filter works?
v0n has quit [Quit: Leaving]
<bnagy>
yeah
<emanu>
so yea, I'm trying to find the fastest way to implement it in ruby
<bnagy>
you can check any bit with that code, but if you don't need to memory / space savings it's more work obviously
tvw has quit [Remote host closed the connection]
<xsdg>
emanu: fast as in implementation time or run time?
<emanu>
run time
banisterfiend has quit [Remote host closed the connection]
<emanu>
and also statistically effective
<xsdg>
emanu: personally, any time I bit arithmetic comes up, my inclination is "drop to C," _especially_ when speed is a factor
<xsdg>
s/I //
dr_bob has joined #ruby
tvw has joined #ruby
<emanu>
yea, I just don't know how to do that yet. :)
JarJar has joined #ruby
<emanu>
and I'm trying to demo a bloom filter to my team, and it's already complex, dropping to C might confuse them more
* xsdg
nods
* xsdg
is reading wikipedia right now :o)
<bnagy>
I recommend abtracting the primitives you need, writing it however comes to mind, and then refactoring
maesbn has joined #ruby
tagrudev has joined #ruby
<bnagy>
like basically you just need a set inclusion primitive
<bnagy>
and your hashing stuff
Erfankam has quit [Ping timeout: 252 seconds]
<emanu>
I don't understand what that means
<emanu>
oh, like BloomFilter#in_set?
<bnagy>
you need a way to say 'is this in the set'
<bnagy>
that's close to the only primitive
<bnagy>
so once you abtract that and make your API you can implement the set itself however you want
charliesome has joined #ruby
<bnagy>
and improve it later
fyolnish has quit [Remote host closed the connection]
<bnagy>
like you could just start with Set and add integer values
a_a_g has joined #ruby
<xsdg>
emanu: perhaps just extend Set as, say, BloomSet, and override the #include? method
mahmoudimus has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
rohit has joined #ruby
<emanu>
hrmm, good ideas here
<Hanmac>
emanu what about a c-binding? then you get the speed of C with the elegance of ruby
<emanu>
Hanmac: see above
justsee has quit [Client Quit]
sgmac has joined #ruby
<emanu>
though I gotta say this is the first thing I do in ruby that feels "dirty". :)
<bnagy>
again, once you abstract your bloom set and api, you can convert it to a native ext later
sgmac has left #ruby [#ruby]
Elico1 has joined #ruby
<xsdg>
==bnagy
<bnagy>
or bring in jruby - some java guy has a jar for this I guarantee
<xsdg>
I did the same thing for doing levenshtein distance a surprisingly long time ago
<emanu>
jruby? jar?
<xsdg>
wrote it in ruby, let it putter around for a bit, then ported the perl C implementation to ruby and it was, like, 100 times faster
<emanu>
I have a lot to learn methinks....
<xsdg>
(of course, the perl C implementation doesn't do any copies, which helps a lot)
Criztian has joined #ruby
<bnagy>
emanu: jruby is another implementation of the ruby VM running on java
hemanth has quit [Read error: Connection reset by peer]
s1n4 has joined #ruby
<bnagy>
advantage being that it's a lot faster for cretain stuff and gives you easy access to the java ecosystem
hemanth has joined #ruby
<emanu>
and the VM is the interpreter?
<bnagy>
and scientific / algorithmic stuff is an area where people write a crapload of java
<emanu>
like, the ruby command line app?
<bnagy>
yeah
<bnagy>
interpreter, whatever
hemanth has quit [Read error: Connection reset by peer]
<bnagy>
native java won't be as fast as C but it can be a lot faster than ruby
hemanth has joined #ruby
chimkan has quit [Quit: chimkan]
<bnagy>
but tbh most of your cycles will be spent calculating hashes
<bnagy>
set testing / insertion are very low order
<emanu>
and the ruby vm included in rvm was written in C?
justinmcp has joined #ruby
<Hanmac>
emanu yeah it is
Morkel has joined #ruby
<bnagy>
MRI ('normal' ruby) is a C core and stdlib now
<emanu>
but doesn't java need its own VM? or have I just not looked into this in like 7 years?
<bnagy>
it does
<bnagy>
but the java vm is better than the MRI one
<bnagy>
in general
<emanu>
but last I checked (again, this was a long time ago), java was this language that compiled into some intermediary universal object code that was then fed into a a java vm
<bnagy>
bytecode they call it, yes
<emanu>
so I thought bytecode was always going to be slower than native executable code?
Erfankam has joined #ruby
<bnagy>
but ruby is kind of the same with MRI
<Hanmac>
emanu the newer ruby does that too, but you dont get notic that
<emanu>
Hanmac: so newer ruby is actually compiled on the first run?
arietis has joined #ruby
<xsdg>
emanu: I think the real point is that jruby doesn't just copy MRI's implementation in Java
<bnagy>
basically with any dynamic language you can't really produce native code
Erfankam has quit [Client Quit]
daniel_hinojosa has quit [Ping timeout: 240 seconds]
JarJar has quit [Quit: Leaving]
<emanu>
wait, but java's compiled, not interpreted, right?
<bnagy>
at least you can't in many cases, you can in some
<xsdg>
emanu: so even if they behave the same, they end up having different performance characteristics
<bnagy>
ugh I hate this talk
<emanu>
ok ok, sorry bnagy
<xsdg>
emanu: depends on what you mean by "interpreted" :o)
<bnagy>
compiled vs interpreted was always a false dichotomy
<bnagy>
and even more so these days
Takehiro has joined #ruby
<emanu>
I assumed an interpreter just reads your code line by line and executes every line it encounters
<bnagy>
only the one you do in 3rd year :)
tvw has quit [Read error: Connection reset by peer]
<bnagy>
any real interpreter does a lot more than that
<emanu>
but there's a sort of per-line compilation that happens
iamjarvo has quit [Ping timeout: 244 seconds]
<emanu>
so without boring you into a CS lesson, where's the best place to wrap my head around this?
Erfankam has joined #ruby
<bnagy>
good question
<Hanmac>
emanu ruby <1.9 is interpreted line-by - line ... ruby>=1.9 is pressed into native bytecode and then runned (but for the script there is no difference)
<bnagy>
but the new interpreter, which some might call KRI is a redesign
<Paradox>
heh
<Paradox>
interpret all the things
fyolnish has joined #ruby
<emanu>
and what's MRI?
<emanu>
the JVM of ruby?
<xsdg>
emanu: MRI stands for "Matz' Ruby Interpreter"
arkiver has quit [Read error: Connection reset by peer]
<emanu>
MRI == ruby command-line executable
<emanu>
?
<bnagy>
yes
<xsdg>
emanu: it is a specific implementation of ruby
<xsdg>
jruby is a different implementation of ruby
<Paradox>
YARV
arkiver has joined #ruby
<emanu>
MRI == the default ruby vm, the one that's bundled with rvm?
<bnagy>
I didn't know anything was bundles with rvm
<Paradox>
no…
<Paradox>
doesnt 1.9 use yarv
<emanu>
sorry, the one that gets loaded into your path when you do an rvm install 1.9.3-p194?
Takehiro has quit [Remote host closed the connection]
<bnagy>
Paradox: yeah, aka KRI
sebastorama has quit [Ping timeout: 264 seconds]
<bnagy>
yes, that's 'normal' ruby
<Paradox>
k?
<Paradox>
who's k?
* Paradox
is doped to fuck with more meds than there are
c0rn_ has joined #ruby
<Paradox>
turns out i have some new virus
<Paradox>
its similar to tb
<Paradox>
but not tb
<emanu>
ok, so there's MRI, which is a compiled-c interpreter that takes ruby code as input
<bnagy>
Koichi
<Hanmac>
yes
<emanu>
and there's jruby that implements a ruby interpreter in bytecode, and gets interpreted by the JVM that outperforms MRI?
jprovazn_away is now known as jprovazn
<bnagy>
yeah
sonkei has quit [Quit: Computer has gone to sleep.]
<bnagy>
basically take ruby code, produce java bytecode, run that on the java vm
<emanu>
so is that because some java guy had no life whereas Matz is some creative performance-ignorant genius out scoring chicks? How does that happen?
Chryson has quit [Quit: Leaving]
Erfankam has quit [Ping timeout: 244 seconds]
<bnagy>
well matz wrote MRI, like himself
<bnagy>
the java vm has significantly more pedigree and resources
tvw has joined #ruby
<emanu>
but it has to compile your ruby app into bytecode
<emanu>
well that's not "cool". Matz > miserable java dudes
<bnagy>
some of your ruby will indeed be compiled, some will always go through translation
Erfankam has joined #ruby
<emanu>
stupidity aside, I can't believe getting something like rails to run in a jvm was an easy task
<emanu>
s/easy/fun/
<bnagy>
so the vm part of vm means virtual machine
<bnagy>
all you gotta do is translate stuff to bytecode and it'll run
sebastorama has joined #ruby
<emanu>
yea, I meant that translating ruby into bytecode must have been difficult
<bnagy>
whether it's simple or complex
<emanu>
and doesn't ruby have more syntactic magic than java?
<Hanmac>
emanu all JRuby,Rubinus,MRI1.9 makes bytecode first, ... the only difference is that the MRI bytecode is not useful on an other maschine
<bnagy>
oh yeah, a lot
KevinSjoberg has joined #ruby
<emanu>
I just can't even imagine...
<emanu>
<-- head asplode
<bnagy>
java is way easier to translate, cause of types etc
<emanu>
java --> ruby must be waaaay easier than ruby --> java
<bnagy>
well like anything, they started the easy way and optimised
<Hanmac>
emanu: "object.attribute += 2" did you see the sugar crystals :P
noyb has quit [Ping timeout: 255 seconds]
<bnagy>
which is more or less what matz did
<bnagy>
like a C interpreter is simply a tool that translates ruby into bytecode
mrdodo has quit [Remote host closed the connection]
<bnagy>
just that bytecode happens to be cpu opcodes
<bnagy>
AST blah blah
dhruvasagar has joined #ruby
<emanu>
so basically the disadvantage is that MRI would have to be translated to different platforms
<bnagy>
yeah, we call that 'compiling' ;)
<emanu>
whereas the jruby bytecode works in the jvm, across platforms.
<emanu>
hah, gotcha, thanks. ;)
<bnagy>
yep
a_a_g has quit [Quit: Leaving.]
<emanu>
( I just like to repeat when I'm learning )
<xsdg>
emanu: well, the jvm needs to be compiled for different platforms :o)
<emanu>
yea, but some java punk figured that out already
<bnagy>
no you still gotta build the jvm
<emanu>
(I should really learn java again...)
<Hanmac>
but this is not soo bad ... you normaly dont need the bytecode for yourself
<emanu>
gotcha
<emanu>
ok, so today I learned a ton
robbyoconnor has joined #ruby
<emanu>
and how much more performant is the jvm?
<emanu>
should I be running my rails apps on it?
<bnagy>
that depends a lot on the code
<emanu>
and is there a disadvantage? memory? cpu?
<Hanmac>
hm you can, but you dont need to
mistergibson has quit [Ping timeout: 276 seconds]
<bnagy>
I have NFI how rails performs on jruby plus every rails app is different
<xsdg>
emanu: the easy answer is "run it both ways and see"
<bnagy>
for 'pure' cpu bound stuff, I have had 3-10x speedup without even trying
robbyoconnor has quit [Read error: No route to host]
<emanu>
and to play locally, is it as simple as `rvm install jruby`?
<bnagy>
code that can be converted into native code once and then run many times gets the biggest gain
<emanu>
or do I now have to compile my ruby apps?
<bnagy>
should be
<bnagy>
you'll need a JRE
<emanu>
which I have
<bnagy>
dunno whether rvm gets that for you, would be surprised
<bnagy>
jruby 1.7 has a lot of big speed wins
<Hanmac>
emanu i think the bottle neck may be the ruby part, so switching to jruby may be faster but not much ...
<bnagy>
I would try out 1.7 preview 2 on a 1.7+ jdk
lolmaus has joined #ruby
<emanu>
hrmm, cool
<emanu>
don't know why I would even use MRI for my local dev?
Erfankam has quit [Ping timeout: 255 seconds]
<emanu>
I guess it's simpler, you don't have to worry about a JRE?
<bnagy>
MRI is the reference implementation
CoverSlide has joined #ruby
<emanu>
maybe running my specs would be faster in jruby as well?
<bnagy>
I run 99% jruby in prod, but there are still occasional gems that don't work properly
<bnagy>
but my 'prod' is research systems, so it's different
<emanu>
bnagy: why not run jruby locally then and never have to worry about it borking your app in prod?
<bnagy>
I check both, but I test predominantly in jruby
<emanu>
interesting… cool
stkowski has quit [Quit: stkowski]
<bnagy>
some c based stuff can still be a touch flaky though
Elico1 has quit [Ping timeout: 244 seconds]
<Hanmac>
emanu as example I only make C++ gems ... wich run on MRI and Rubinius but not on jRuby
djdb has joined #ruby
dhruvasagar has quit [Quit: leaving]
dhruvasagar has joined #ruby
mistergibson has joined #ruby
<bnagy>
ok I should go back to figuring out how gdi32 works
workmad3 has joined #ruby
justinmc_ has joined #ruby
Elico1 has joined #ruby
<emanu>
and I should finish this bloom filter
eldariof has joined #ruby
<emanu>
thanks for the lesson guys
<emanu>
this channel is always really informative and positive
<Hanmac>
xD thats because Banister is not online xD
djdb has quit [Client Quit]
djdb has joined #ruby
<shevy>
lol
rohit has quit [Ping timeout: 276 seconds]
justinmcp has quit [Ping timeout: 255 seconds]
fantazo has quit [Remote host closed the connection]
rohit has joined #ruby
mrdodo has joined #ruby
ken_barber has joined #ruby
aganov has joined #ruby
Erfankam has joined #ruby
ken_barber has quit [Read error: Operation timed out]
timonv has joined #ruby
haxrbyte has joined #ruby
luckyruby has quit [Remote host closed the connection]
Elico1 has quit [Ping timeout: 240 seconds]
thone_ has joined #ruby
capsule_toy has quit []
thone has quit [Ping timeout: 264 seconds]
Elico1 has joined #ruby
polysics has joined #ruby
Elico1 has quit [Client Quit]
Elico1 has joined #ruby
Criztian_ has joined #ruby
Elico1 has quit [Client Quit]
Criztian has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Takehiro has joined #ruby
Agis__ has joined #ruby
Agis__ has quit [Client Quit]
takamichi has quit [Ping timeout: 272 seconds]
takamichi has joined #ruby
Takehiro has quit [Remote host closed the connection]
busybox42 has quit [Ping timeout: 264 seconds]
nilg has joined #ruby
krion is now known as scostes
scostes is now known as krion
hoelzro|away is now known as hoelzro
g_rotbart has quit [Remote host closed the connection]
zommi has joined #ruby
Xeago has joined #ruby
Elico1 has joined #ruby
justinmc_ has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
arkiver has quit [Quit: Leaving]
und3f has joined #ruby
arkiver has joined #ruby
rakl has quit [Quit: sleeping]
cantonic_ has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
a_a_g has joined #ruby
Xeago has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
cezar has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
Elico1 has quit [Ping timeout: 260 seconds]
cantonic has quit [Ping timeout: 260 seconds]
cantonic_ is now known as cantonic
cezar has quit [Client Quit]
a_a_g has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
nucc has joined #ruby
hadees has quit [Quit: hadees]
Takehiro has joined #ruby
a_a_g has quit [Client Quit]
Nathandim has joined #ruby
Nathandim has quit [Excess Flood]
LouisGB has joined #ruby
<hoelzro>
does anyone have a good guide to creating a gemspec for a gem implemented as a C extension? The guide on guides.rubygems.org doesn't seem to want to work for me =(
Nathandim has joined #ruby
Nathandim has quit [Excess Flood]
progzer has joined #ruby
Elico1 has joined #ruby
<progzer>
Excuse me, where can I ask about upgrading rails (2.x o 3.x) ?
<Muz>
hoelzro: http://guides.rubygems.org/c-extensions/ was what I often referred to, specifically, s.files being edited, s.extensions pointing to extconf.rb and s.executables for the name of the output binary if necessary.
<Muz>
Which may ask the question, what isn't working for you, and what did you try.
mengu has quit [Quit: Konversation terminated!]
manizzle has joined #ruby
<hoelzro>
Muz: I've tried that guide; it creates an empty gem
<hoelzro>
I'll keep playing around with it
bigkevmcd has quit [Ping timeout: 244 seconds]
frogprince_mac has joined #ruby
c0rn_ has quit []
takamichi has quit [Ping timeout: 252 seconds]
takamichi has joined #ruby
<Muz>
hoelzro: empty, or non-compiled? It's not supposed to compile anything when building it, it's compiled when installed.
<hoelzro>
huh, now it's not empty
bigkevmcd has joined #ruby
<hoelzro>
either that, or I wasn't inspecting the contents correctly
znake has joined #ruby
lolmaus has quit [Ping timeout: 252 seconds]
<hoelzro>
yay, it worked!
znake has quit [Remote host closed the connection]
* hoelzro
doesn't know what he did
himsin has joined #ruby
Takehiro has quit [Remote host closed the connection]
znake has joined #ruby
matrixise has joined #ruby
lolmaus has joined #ruby
Elico1 has quit [Ping timeout: 252 seconds]
jastix has joined #ruby
a_a_g has joined #ruby
_JamieD_ has quit [Ping timeout: 260 seconds]
flype has joined #ruby
Elico1 has joined #ruby
jakob- has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
tonini has quit [Remote host closed the connection]
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
Takehiro has joined #ruby
tiripamwe has joined #ruby
timonv has quit [Remote host closed the connection]
Elico1 has joined #ruby
abionic has joined #ruby
abionic has quit [Remote host closed the connection]
nucc has quit [Quit: Leaving...]
ABK has quit [Ping timeout: 240 seconds]
Takehiro has quit [Ping timeout: 276 seconds]
Elico1 has quit [Ping timeout: 276 seconds]
elico has quit [Ping timeout: 276 seconds]
banseljaj is now known as imami|afk
mneorr has quit [Quit: Leaving.]
timonv has joined #ruby
mkr_ has quit [Ping timeout: 264 seconds]
tomask has left #ruby ["Leave"]
Shrink has quit [Ping timeout: 268 seconds]
sspiff has quit [Ping timeout: 260 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
bluOxigen has joined #ruby
Guedes_out is now known as Guedes
cakehero has joined #ruby
hemanth has quit [Ping timeout: 260 seconds]
Morkel has quit [Quit: Morkel]
seanstickle has joined #ruby
hbpoison has quit [Ping timeout: 244 seconds]
hemanth has joined #ruby
KevinSjoberg has joined #ruby
tobyo has quit [Read error: Connection reset by peer]
jastix has quit [Ping timeout: 276 seconds]
tobyo has joined #ruby
cakehero has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
fermion has joined #ruby
timonv has quit [Remote host closed the connection]
Foxandxss has joined #ruby
timonv has joined #ruby
sendoushi has joined #ruby
mistergibson has quit [Remote host closed the connection]
nari has quit [Ping timeout: 245 seconds]
mistergibson has joined #ruby
xbayrockx has joined #ruby
timonv has quit [Ping timeout: 246 seconds]
FlyingFoX has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
arturaz has joined #ruby
Xeago has quit [Remote host closed the connection]
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
br4ndon has joined #ruby
Erfankam has quit [Quit: Leaving.]
<shevy>
"Wajig is written in Python"
<shevy>
JonnieCache!!!
Xeago has joined #ruby
<Hanmac>
shevy you are right ... where is the ruby version?
tiripamwe has quit [Ping timeout: 264 seconds]
<shevy>
Hanmac I am working on it :)
fbernier has joined #ruby
sendoushi has quit [Remote host closed the connection]
Virunga has joined #ruby
risico has quit [Ping timeout: 276 seconds]
Nathandim has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
dpk has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
seanstickle has quit [Quit: seanstickle]
kitofr has joined #ruby
habib has joined #ruby
banisterfiend has joined #ruby
tiripamwe has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
risico has joined #ruby
ncamargo has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
BIGX333 has quit [Disconnected by services]
ncamargo is now known as BIGX333
Takehiro has joined #ruby
amaya_ has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
tiripamwe has quit [Ping timeout: 252 seconds]
atmosx has joined #ruby
Rochefort has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 272 seconds]
Rochefort has joined #ruby
cantonic_ has joined #ruby
cantonic has quit [Ping timeout: 260 seconds]
cantonic_ is now known as cantonic
ABK has joined #ruby
kitofr has left #ruby [#ruby]
setuid has joined #ruby
<habib>
hey everyone. i can't figure out. why gosu lib doesn't work. i have ruby 1.9.3. p194. installed. and i did sudo gem install gosu. and it worked ok but when i'm trying to require 'gosu' in irb it gives me error
<hoelzro>
habib: what kind of error?
<habib>
can not load such file
<habib>
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<whowantstolivefo>
maybe version problem ?
philcrissman has joined #ruby
<habib>
how to know?
<Hanmac>
habib what does gem env return?
sspiff has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
<habib>
i type ruby -v and it => ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
xkx has quit [Read error: Connection reset by peer]
<habib>
Hanmac, where to show u
xkx has joined #ruby
<Hanmac>
pastiebin.com
jbpros has quit [Ping timeout: 244 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
<LMolr>
Hello. I have a class wich implements a data generator. The class has a next() method wich changes the internal state and returns the next piece of data. To provide enumeration capabilities, should I include Enumerable or subclass Enumerator?
arkiver has quit [Client Quit]
philcrissman has quit [Remote host closed the connection]
beneggett has joined #ruby
GenghisKen has joined #ruby
GenghisKen has quit [Changing host]
GenghisKen has joined #ruby
timonv has quit [Remote host closed the connection]
lockweel has joined #ruby
GenghisKen has quit [Client Quit]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
theRoUS is now known as GenghisKen
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
answer_42 has joined #ruby
<JonnieCache>
LMolr: include Enumerable afaik
beneggett has quit [Client Quit]
ZachBeta has joined #ruby
<JonnieCache>
it has to implement the each method
BiHi has joined #ruby
<JonnieCache>
but obviously you can do that on top of your next() implementation
<banisterfiend>
LMolr why not just have a to_enum method
<JonnieCache>
although youd have to decide when to stop
<banisterfiend>
where you return a real Enumerator object
nari has joined #ruby
thunderstrike has quit [Ping timeout: 248 seconds]
beneggett has joined #ruby
bapa has quit [Ping timeout: 276 seconds]
EPIK has quit []
<LMolr>
i have tried by including Enumerable, but my enumerations are carried out with side effects and i cannot start two concurrent enumerations. When i do e1 = obj.each; e2 = obj.each; the results of e1.next and e2.next are different.
matrixise has quit [Ping timeout: 246 seconds]
thunderstrike has joined #ruby
<hoelzro>
LMolr: and that state is maintained in the object itself?
rohit has joined #ruby
<LMolr>
hoelzro: yes
<hoelzro>
LMolr: do you *need* to maintain the state in the object?
matrixise has joined #ruby
<hoelzro>
can you maintain it in closed-over values within the each method's body?
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
a_a_g has quit [Read error: Connection reset by peer]
flype has joined #ruby
a_a_g has joined #ruby
ABK has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
Takehiro has joined #ruby
mistergibson has joined #ruby
machty has quit [Quit: machty]
CodeFriar has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
lolmaus has joined #ruby
spopescu has joined #ruby
yshh has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
<shevy>
except for the RubyOS
Iszak has joined #ruby
nateberkopec has joined #ruby
<shevy>
habib you remove all the files
a_a_g has left #ruby [#ruby]
marcoshack has joined #ruby
jaylevitt has joined #ruby
marcoshack has quit [Client Quit]
<matti>
Hi shevy
BiHi has quit [Read error: Connection reset by peer]
<shevy>
heya matti
catphish has joined #ruby
<amaya_>
RubyOS , Do you mean a OS made by Ruby?
BiHi has joined #ruby
verto|off is now known as verto
fixl has quit [Ping timeout: 268 seconds]
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<catphish>
i'm struggling to understand something, i have a multithreaded app which has several connections to a mysql server (mysql2 gem), it also uses open4 to run another program, unfortunately netstat -p shows that the external program is acquiring the mysql connections
<pitty>
d
machty has joined #ruby
<pitty>
amaya_ ignore shevy, he just babbles nonsense continuously
<amaya_>
oh ...
<catphish>
now what i'm seeing may not actually be a problem, it may just be an issue with netstat showing the wrong side of the fork
<hoelzro>
open file handles are inherited by child processes
<catphish>
but it's causing odd results
<catphish>
hoelzro: i assumed that was the case, so both processes own the open file
<catphish>
which shouldn't be a big problem
jrist-afk is now known as jrist
jwbuurlage has joined #ruby
flagg0204 has quit [Quit: leaving]
<shevy>
amaya_ an OS written in as much ruby as possible yeah
mercwithamouth has joined #ruby
<shevy>
amaya_ it's in an extremely early stage however. there isn't even a serious shell that can replace bash or zsh in ruby right now
<amaya_>
shevy: Ruby is interpreted language.
<catphish>
i'm just getting upset because my app seems to be opening and closing mysql connections for no apparant reason :(
<shevy>
are you saying it is too slow amaya_ ;)
hbpoison_ has joined #ruby
jwbuurlage has left #ruby [#ruby]
hbpoison has quit [Read error: Connection reset by peer]
jwbuurlage has joined #ruby
<amaya_>
I can't image that.
elux has joined #ruby
Spooner has joined #ruby
<bnagy>
catphish: it's not going to be because of the child process
kvirani has quit [Remote host closed the connection]
johnlcox has joined #ruby
Choclo has quit [Quit: Leaving.]
saispo has quit [Ping timeout: 260 seconds]
<bnagy>
it's probably just because Threads Are Hard ™
<catphish>
bnagy: thanks, will look elsewhere :)
pu22l3r has joined #ruby
<hoelzro>
I think a RubyOS would be kinda neat
hbpoison_ has quit [Ping timeout: 240 seconds]
<amaya_>
shevy: It maybe need some real time interpret abilities. RTIA ...
hbpoison has joined #ruby
techhelp has joined #ruby
Virunga has joined #ruby
<catphish>
bnagy: do terminating threads pull down sockets with them?
<catphish>
maybe the MySQL gem is trying to be clever and do that
Virunga has quit [Remote host closed the connection]
<bnagy>
not by definition afaik
<bnagy>
I mean, their own threads, yeah
<catphish>
my app has no code to close mysql connections, yet it seems to be creating them continually
<Mon_Ouie>
There's no such thing as interpreted & compiled languages anyway; that is a propriety of the implementation, not the language. One could write a Ruby compiler that generates native code that doesn't need an external runtime to run.
<bnagy>
*their own sockets
sambio has joined #ruby
<bnagy>
catphish: sounds like your app is just broken :/
<hoelzro>
Mon_Ouie: well said.
<catphish>
bnagy: well it works, but i don't know why now :(
<bnagy>
although closing a conn is not a prerequisite to opening a new one
<catphish>
bnagy: the app is opening connections when none are available, something is closing the connections
<bnagy>
whatever you say
<catphish>
just a case of working out what :(
josh^ has quit [Remote host closed the connection]
Solnse has joined #ruby
<shevy>
bnagy will hold your hand and wish you only the best :)
<bnagy>
if you can't work out what your threads are doing, then rewrite from scratch
<shevy>
or he'll recommend postgresql
<bnagy>
threads are imho an antipattern for ruby anyway
<catphish>
bnagy: how so?
<bnagy>
they don't scale
otters has quit [Quit: WeeChat 0.3.8]
<catphish>
perhaps not, but they're much easier for small scale work than making my own socket polling code
<bnagy>
apparently not :)
<hoelzro>
if you like having the local stack, I would use select + fibers
pu22l3r has quit [Remote host closed the connection]
<catphish>
bnagy: you're quite annoying :)
fantazo has joined #ruby
pu22l3r has joined #ruby
hbpoison_ has joined #ruby
<bnagy>
you can get select + fibers .. ish with em-synchrony afaik
<bnagy>
looks easy to use
<bnagy>
I just use processes / actors
hbpoison has quit [Read error: Connection reset by peer]
<bnagy>
costs ram, but it's very easy to debug
elico has quit [Quit: elico]
mohits_ has joined #ruby
elico has joined #ruby
<bnagy>
shevy: I have no string opinion about pqsql vs mysql apart from the fact that pgsql is better in every measurable way
<bnagy>
but who uses sql these days anyways :D
<habib>
i solved problem with gosu
<shevy>
hehe
<bnagy>
ve vill use NO ESS Q ELL! Even iff it costs UBER RAM
<bnagy>
relations and unions are for arkansaw
dhruvasagar has quit [Ping timeout: 246 seconds]
hbpoison_ has quit [Ping timeout: 246 seconds]
haggen has quit [Quit: haggen]
hbpoison has joined #ruby
seanyo has joined #ruby
ltsstar has joined #ruby
spopescu has left #ruby ["Leaving"]
the_jeebster has joined #ruby
jgarvey has joined #ruby
v0n has joined #ruby
asteve has joined #ruby
Jake232 has joined #ruby
awarner has joined #ruby
Targen_ has quit [Ping timeout: 252 seconds]
tomask has joined #ruby
tomask has quit [Changing host]
tomask has joined #ruby
uris has joined #ruby
hbpoison has quit [Ping timeout: 248 seconds]
hbpoison has joined #ruby
<JonnieCache>
postgresql ftw
<JonnieCache>
it has key-value stores, you can run ruby/lua/js code inside it, you can do geospatial queryies, it has a full-text engine, it has bloody everything
<JonnieCache>
and its really fast and clean and never surprises you
<habib>
Hanmac, u here?
<habib>
i love this chanel
<habib>
haha
habib has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ltsstar has quit [Ping timeout: 255 seconds]
fmcgeough has joined #ruby
thaz has quit [Quit: thaz]
yshh has joined #ruby
<Muz>
Heh, yet to have a good play with PGsql 9.2 yet.
<catphish>
i've heard awesome things
sonkei has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
<shevy>
ld: cannot find -lcrypt
<shevy>
hmmmm
<shevy>
do I need to have a libcrypt.so file?
<hoelzro>
probably
<shevy>
I am in the ext/digest subdirectory of the extracted ruby source tarball
vegeek-ng has joined #ruby
<vegeek-ng>
what is the best gem to download files with resume support?
kvirani has joined #ruby
Xeago_ has joined #ruby
<JonnieCache>
maybe curb? its just a curl binding so it will be able to do that
jonatha__ has quit [Remote host closed the connection]
mohits_ has quit [Ping timeout: 276 seconds]
otters has joined #ruby
jonathanwallace has joined #ruby
<vegeek-ng>
JonnieCache, thanks!
Erfankam has joined #ruby
bapa has quit [Quit: No Ping reply in 180 seconds.]
Nisstyre-laptop has quit [Remote host closed the connection]
chussenot_ has joined #ruby
bapa has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
pu22l3r_ has joined #ruby
weeb1e has joined #ruby
stopbit has joined #ruby
BrokenCog has quit [Quit: leaving]
jonathanwallace has quit [Ping timeout: 276 seconds]
<shevy>
Xeago the problem with vim is that it takes too much of my brain
sspiff has quit [Remote host closed the connection]
Solnse has joined #ruby
<Xeago>
then use emacs
<Xeago>
:)
<workmad3>
amaya_: ary[x] = 'y' is syntax for ary.[]=(x, 'y')
<hoelzro>
Xeago: the guy next to me didn't know what it meant =)
<shevy>
nono I just need an editor, not an OS man :(
<amaya_>
workmad3: I see. It is weird.
<workmad3>
amaya_: not really
BrokenCog has quit [Quit: leaving]
gqlewis has quit [Remote host closed the connection]
<workmad3>
amaya_: the method is called []=, it takes two parameters
<shevy>
right now ... I could try... sublime... geany... hmm, forgot the third one...
<workmad3>
shevy: vim!
<Xeago>
emacs vim!
<Xeago>
2.2!
<Xeago>
of bluefish
<Xeago>
why not upgrade?
<Xeago>
btw hoelzro, how much do you pay for your .ro?
<Hanmac>
workmad3 not so right ... selfdefined []= can take more parameters
<hoelzro>
Xeago: $10 a year, I think
<hoelzro>
or $20
BrokenCog has joined #ruby
<workmad3>
shevy: or, if in doubt, how about the old reliable windows notepad? :P
<shevy>
hmm they changed so many things... the find widget is now on top rather than a popup... the default colours for files have changed too... dunno, I dont like the 2.2 much :(
<workmad3>
Hanmac: true :)
Erfankam has quit [Quit: Leaving.]
<shevy>
workmad3, yeah something like that! on windows I would probably use notepad++
austinbv has quit [Ping timeout: 244 seconds]
enroxorz-work has quit [Read error: Connection reset by peer]
<JonnieCache>
there are so many better ways to get nerd points though!
<bnagy>
then again if you're running linux on the desktop you're obviously brain damaged
g33k has quit [Remote host closed the connection]
<JonnieCache>
at least port it to the amiga or something fun like Bthat
<atmosx>
bnagy: lol
<workmad3>
JonnieCache: :D
<atmosx>
bnagy: hahaha or you just have time to looseee
<Xeago>
I remember my windows days, I ssh'd to get to a proper shell
<workmad3>
bnagy: depends what sort of desktop IMO
<atmosx>
although last time I was on an old laptop I made a perfectly working fluxbox-y enviroment
<workmad3>
bnagy: linux is a great desktop for developers
<bnagy>
pff
<shevy>
I like fluxbox
<Xeago>
got a linux laptop somewhere around that has no gui, only a terminal text gui, forgot what it was called
<bnagy>
developers who are working on a desktop
<bnagy>
and never travel
<bnagy>
or use any media
<bnagy>
or suspend
<shevy>
Xeago Pain 2.0?
<bnagy>
Xeago: screen?
<bnagy>
:P
<shevy>
scream
<workmad3>
bnagy: the alternatives are attempting to get sane build tools on windows, or forking out extortionate amounts for a mac
chussenot has quit [Remote host closed the connection]
<kaleido>
fork it out
<workmad3>
bnagy: or some cobbled together job with virtual machines
nucc has quit [Quit: Leaving...]
chussenot has joined #ruby
<hoelzro>
I use Linux on my laptop, and I don't have issues with media or suspend
g33k has joined #ruby
<hoelzro>
however, to be fair, I hardly travel with that laptop
lolmaus has quit [Ping timeout: 264 seconds]
<hoelzro>
and I can't say that everyone shares my pleasant experience with Linux on a laptop =)
<bnagy>
actually I have built crypto netbooks beforeusing alt+n
<atmosx>
alt+n?
<atmosx>
what's that?
baroquebobcat has joined #ruby
GoGoGarr_ has joined #ruby
chrishunt has joined #ruby
wuzzzzaah has joined #ruby
timonv has joined #ruby
<atmosx>
hoelzro: i'm pretty much comfortable with linux, with a mac I'm just more productive and enjoy the media way better
<atmosx>
but I don't depend on it
GoGoGarrett has quit [Read error: Connection reset by peer]
<shevy>
what media
<atmosx>
alghouth I prefer pages/numbers to any open source office suite
<hoelzro>
well, if that works for you, great!
<atmosx>
mass media
tommylommykins is now known as t0mmylommykins
<atmosx>
like the new york times
<atmosx>
shit...
<atmosx>
my phone won't stop today
<shevy>
hmm I dont read the new york times
Foxandxss has joined #ruby
Takehiro has joined #ruby
<atmosx>
shevy: washington post?
<Xeago>
atmosx: I got my colleagues so far that I don't accept any non-plain-text-readable format
t0mmylommykins is now known as h0mmylommykins
<Xeago>
mostly getting markdowns now, some insist on latex that's fine tho.
<bnagy>
workmad3: who gives a crap how much macs cost?
<shevy>
atmosx hmm no not really... there is so much assumptions and opinionated "news" in all those newspapers... I'd like to see one only stating facts and zero assumptions
<atmosx>
financial times? where quotes like "Miners in Venezuela were saved on a jet made by a private company! It's the win of privatization!" hehe awesome shit
<bnagy>
like.. they have *nix on them
<bnagy>
and they run VMs
<atmosx>
shevy: where you do you get that beauty?
rovar has joined #ruby
<atmosx>
I haven't read static news since I can't remember
<shevy>
atmosx I don't :(
<atmosx>
only reuters reports like that
<shevy>
nono
<atmosx>
reuters it is then
<shevy>
reuters is the same crap
elux has quit [Quit: Bye!]
<atmosx>
hm it's the most static news I know
<shevy>
they are trying to form a certain world view
h0mmylommykins is now known as tommylommykins
zommi has quit [Quit: Leaving.]
<bnagy>
shevy: you really are an idiot sometimes
<rovar>
I have a question about rubygems. I'm envisioning a system whereby a person iteratively installs gems as they need them, then, when they are happy with the state of their application, they create a snapshot, which captures all of their gems and creates a bundler gem
<atmosx>
bnagy: stop teasing my step-brother
<bnagy>
a) no journalist reports 'neutrally' because it doesn't exist
<rovar>
is this a common workflow? is there a toolset for this?
<bnagy>
b) if they did you wouldn't like it
<shevy>
bnagy sure not when they are paid
<bnagy>
lol it's even worse when they're not paid
pskosinski has joined #ruby
mmitchell has joined #ruby
peregrine81 has joined #ruby
<Xeago>
rovar: by install I will read add gem to Gemset
<Xeago>
and by snapshot, bundler lock
<atmosx>
bnagy: how do you know that I would not like it
<atmosx>
you're making fairy tales
<bnagy>
but if journalists can't report with opinion then you're going to get dead journalism
<Xeago>
rovar: look at bundler
dr_bob has quit []
<atmosx>
you're nothing like Isaac Newton, you silly Alchemist!
NiteRain has joined #ruby
<bnagy>
every great report ever in the history of the world has been passionate
<atmosx>
bnagy: says who?
<rovar>
Xeago, what is Gemset? and how do you install? 'gem install'? that installs into the system by default, correct?
vegeek-ng has quit [Quit: Leaving]
vital101 has joined #ruby
<Xeago>
rovar, look at bundler
zommi has joined #ruby
<atmosx>
bnagy: you're making assumptions again.
<bnagy>
atmosx: pick a pullitzer winner, as a vague start
<R3dy>
is there a gem to do ARC4 encryption?
<shevy>
some bloggers are quite ok. they are opinionated too, but at least it does not "feel" as if they have a paid and hidden agenda, for the most part, whereas for journalists, they can hardly write in ways that goes against the company rules
<atmosx>
shevy: come to think about it, there's this twitter guy @asteris a jurno, who reports sometimes unbiased although from ihs personal opinions when, issued you can see he is a leftist
<bnagy>
journalists who are not passionate don't excel
<rovar>
Xeago, I have been. I only see documentation for how to create a gemfile manually then run bundler install. The piece i'm missing is how to automagically generate the bundle, perhaps bundler lock is the ticket
<atmosx>
communist would say in USA 3 decades ago.
* atmosx
reads specific bloggers
<atmosx>
SPECIFIC
<atmosx>
lol
<R3dy>
I'm trying to convert a python tool to ruby
<atmosx>
cool I can install octopress now!
<shevy>
R3dy what does it do?
<shevy>
hmm never heard about ARC4
<R3dy>
I see it creates an object like rc4 = ARC4.new('data to encrypt')
maesbn has quit [Remote host closed the connection]
<shevy>
rovar yeah that usually happens... it's like... "either I keep on maintaining this project, and add more code to it... or I abandon it entirely"
<atmosx>
shevy: help!
<shevy>
atmosx go learn only short facts
<atmosx>
shevy: I won't pass but who cares
zommi has quit [Client Quit]
Bosma has joined #ruby
<shevy>
yeah, just learn 50 small facts
GoHuyGo has joined #ruby
adaro has joined #ruby
<atmosx>
shevy: nah, I'm bored, I'll have a really huge semester I'll just vacations and takes these Bernoulli's, Flick's and Newton's (fluids) next year…
<atmosx>
reading Quicksilver makes all this much more interesting and appealing I might even learn something, who knows
<shevy>
atmosx hehe
<atmosx>
shevy: I'll getup on 4 am and read a couple of subjects
austinbv has quit [Ping timeout: 244 seconds]
<shevy>
atmosx k learn 3 facts now
<atmosx>
I know a couple of things about light and sound and fluids, and HR and shit but the guy wants formulas and all small details...
<workmad3>
rovar: your 'workflow' sounds pretty much like what bundler just does
<bnagy>
R3dy: RC4 is seriously deprecated, just btw
<R3dy>
bnagy: I know but the tool I am trying to convert uses it
<R3dy>
it needs to be done for the task at hand
joshman_ has joined #ruby
<workmad3>
rovar: you have your Gemfile, you add gems to it, bundler handles making sure the dependency graph is worked out and doesn't conflict and captures it all in the Gemfile.lock
<R3dy>
I'm just wondering is there a differnce between RC4 and this ARC4 that Python is using
<bnagy>
R3dy: yeah I said
<rovar>
workmad3, bundle installs gems that are specified by the Gemfile or Gemfile.lock
sonkei has quit [Quit: Computer has gone to sleep.]
maesbn has quit [Ping timeout: 276 seconds]
<bnagy>
RubyRc4.new(key).encrypt( 'plaintext' )
Synthead has joined #ruby
<workmad3>
rovar: yes, so you just add new gems to the Gemfile
enroxorz-work has joined #ruby
<rovar>
workmad3, I am trying to come up with a system by which the Gemfile is auto generated based on what the user has installed to make their application work.
<Xeago>
and it auto locks now with install, so you're done right when you decide you've added all gems
<workmad3>
rovar: rather than directly with 'gem install <gem>'
<Xeago>
rovar: that is the wrong way around
<workmad3>
^^
<Xeago>
you should install gems via your Gemfile
<rovar>
why?
<Xeago>
so dependency's are calculated correctly
biesiad has quit [Quit: biesiad]
<rovar>
they still can be
<workmad3>
rovar: dependency resolution and environment isolation
<R3dy>
bnagy: is that RC4 or is it ARC4? Or is there no differnence?
frogprince_mac has joined #ruby
<R3dy>
this is what I am trying to understand
<bnagy>
R3dy: read the docs, I have explained twice already
<rovar>
environment isolation is painless if you do what modern package managers do and install only into the local directory. In addition, using this approach, bundler, or gem or something could also be tracking the entire set of dependencies for this project (as defined by the entire contents of the local directory)
DrShoggoth has joined #ruby
tommyvyo has joined #ruby
<rovar>
npm does this
khakimov has joined #ruby
<R3dy>
And what exactly did you explain?
<Xeago>
rovar: if you persist, parse sourcefiles
jjbohn has joined #ruby
<workmad3>
rovar: if you build your app dependencies by just randomly installing a bunch of gems and then going 'right, that's it, that's my dependencies'...
davidcelis has quit [Quit: K-Lined.]
<R3dy>
I see where you showed twice how to create a new rc4 object and use a key to encrypt/decrypt data
emanu has quit [Quit: emanu]
<rovar>
i don't want to make comparisons of different toolsets, but having to modify a Gemfile seems like repeating myself
<R3dy>
or did you explain somethign else?
<R3dy>
it's a busy room, forgive me if I missed it
<bnagy>
R3dy: that you can't use the ruby gem the way you said you were using it
<workmad3>
rovar: why is it repeating yourself?
<Xeago>
rovar: if you see it as repeating, you're doing a step before editing the gemfile
<Xeago>
which is wrong
<R3dy>
bnagy: oh yeah I can, differnt gem
<bnagy>
if you use it correctly and it's still wrong that's a different issue
<R3dy>
here look
<workmad3>
rovar: unless you're actually adding to the gemfile *and* manually installing the gem, and then running install
<workmad3>
rovar: you don't need to manually install the gems with bundler though :P
<R3dy>
obj = RC4.new(key)
<rovar>
why not gem install --local foo
<R3dy>
puts obj.encrypt("some stuff")
<R3dy>
that works just fine that's not my issue
<R3dy>
what I am sayign is the the encrypted/decrepted output is differnt then the exact same code in the pyton tool
icooba has joined #ruby
<R3dy>
I am porting over
<rovar>
ad infinitum.. then run something like bundler snapshot, which creates your gemfile from all locally installed gems.
<R3dy>
and I see Python uses ARC4 instead of RC4
<R3dy>
I am trying to ask are they differnt
<rovar>
i see no reason to modify a gemfile manually.
<R3dy>
and if so how do you use ARC4 in Ruby?
<bnagy>
23:02 < R3dy> when I try to do that using the ruby rc4 gem like this rc4 = RC4.new('data to encrypt')
<rovar>
except to make some tweaks like version dependencies.
<bnagy>
that is wrong
haggen has joined #ruby
<R3dy>
bnagy: that was me typing wrong
<R3dy>
forgive me
<R3dy>
your ar emissing the question
<workmad3>
rovar: because 'gem install' is *shit* for dependency resolution
<R3dy>
I am using the RC4 gem properly
<R3dy>
I can show you if you like
<rovar>
workmad3, so bundle snapshot can be the thing that validates the dependencies...
<bnagy>
you overestimate my interest
<R3dy>
what I am saying is it does not produce the same output is the ARC4 object in python
<rovar>
or perhaps bundle localinstall could do both steps
<workmad3>
rovar: and besides, why is typing out 'gem install' a load of times any better than writing 'gem <name>' in a file a load of times?
<R3dy>
Does Ruby have an 'ARC4' gem or library??
<bnagy>
ARC4 is RC4
<rovar>
workmad3, it's always two steps when you discover you have a new dependency.. edit file, type bundle install again
<workmad3>
rovar: guard-bundler
<rovar>
it's not horrible
<R3dy>
bnagy: thanks that was the quesiton I was originally asking
<workmad3>
rovar: and besides, your suggestion doesn't decrease the number of steps
<R3dy>
bnagy: thank you
fbernier has quit [Ping timeout: 276 seconds]
andrew_ has joined #ruby
<workmad3>
rovar: as your way is 'gem install, bundle snapshot'
flype has joined #ruby
<bnagy>
the libs are not the same, obviously, but those a synonyms, cryptowise
linoj has joined #ruby
<rovar>
workmad3, huh.. that's an interesting approach..
<bnagy>
if you google you'll be able to find rc4 test sets
<bnagy>
data and key and ciphertext
<bnagy>
that will probaby help
<R3dy>
kk thank you sir
<workmad3>
rovar: what? have something watch your Gemfile and run 'bundle install' for you when it changes? :)
<bnagy>
all implememtors should follow those, they should even be in the rfc
<rovar>
workmad3, yes. don't you see that as slightly rube-goldberg-ish?
Jellyg00se has joined #ruby
<adaro>
does anyone know how to do xml escaping in erb templates?
<workmad3>
rovar: not particularly
<rovar>
anyways.. in the context of normal usage.. i'm sure I sound a bit picky, however, I'm building a system that will bootstrap web services onto fresh VMs
<workmad3>
rovar: besides, it's a way to actually remove the step you're complaining about
<rovar>
and I'm working with 3 different app stacks.. node, java and ruby
<Xeago>
use their respective package manager
<workmad3>
^^
<rovar>
and I'm trying to come up with a generalized workflow that will allow a person to create a 'snapshot' of a running service to be reproduced later.. but its not an AMI type snapshot.
<Xeago>
all have a simple install from whatever file I by default should look at behaviour
arturaz has quit [Ping timeout: 240 seconds]
<Xeago>
dup the vm?
<workmad3>
rovar: it sounds like you're trying to write a provisioner
gaahrdner has joined #ruby
<rovar>
Xeago, not an option :)
cakehero has quit [Quit: Computer has gone to sleep.]
<Xeago>
how thorough is the snapshot supposed to be
<workmad3>
rovar: it also sounds like the sort of thing that vagrant with chef or puppet already does :P
<Xeago>
there was another one I saw recently workmad3.
<rovar>
workmad3, it is.. i am writing a very thin wrapper around the 3 defacto package managers.. I am just really liking the semantics of NPM over mvn or gems..
adeponte has joined #ruby
thunderstrike has quit [Read error: Connection reset by peer]
<workmad3>
rovar: bundle package your apps
<workmad3>
rovar: then you have npm-style dependencies
<rovar>
workmad3, the point is that the developer shouldn't have to do anything out of the ordinary, like create a chef/puppet script, for instance.
thunderstrike has joined #ruby
<rovar>
workmad3, yea.. at this point it seems that I won't be able to get away from manually editing the Gemfile, but if that's what rails coders expect, then that's what they'll get.
<Xeago>
rubyists*
<workmad3>
rovar: the developer doesn't have to create chef or puppet scripts
<workmad3>
rovar: you can write them
<rovar>
but I will still have my own config system that wraps them all, because the provisioning system also allows for service level dependencies.. so our orchestration system will actually ensure that dependent web services are also present in the environment.
<workmad3>
rovar: and they are the things that handle setting up the VM
<workmad3>
rovar: and again, that sounds chef and puppet-esque :P
<rovar>
workmad3, it doesn't really matter what it is, chef/puppet are a bit overkill when 99% of the functionality is already present in package managers.
<Xeago>
rovar: no
<rovar>
oui
<Xeago>
no, you clearly do not know what chef/puppet do
<workmad3>
rovar: the package managers don't provide 99% of the functionality
<workmad3>
rovar: you want provisioning and orchestration, which is what chef and puppet are for
<Xeago>
and also look at capistrano if you're interested in more similair things
<Xeago>
rubber!
CodeFriar has joined #ruby
<workmad3>
rovar: and what package manages *don't* provide
<workmad3>
*managers
haggen has quit [Quit: haggen]
<rovar>
orchestration is already taken care of
<workmad3>
rovar: on top of that, chef at least (I'm not sure about puppet or rubber, but I guess they are similar) actually use those package managers for what they are good for
<rovar>
provisioning, yes, puppet and chef can do that, but again, that's what package managers do.
<workmad3>
rovar: they don't reimplement it
<workmad3>
no, package managers are for installation, not provisioning
<Xeago>
rovar: no package managers provision packages
<Xeago>
puppet can provisions packet managers
<reactormonk>
workmad3: what about emerge?
<rovar>
that's done by apt
<rovar>
a package manager
<reactormonk>
rovar: the package manager is dpkg
<rovar>
reactormonk, correct.
<reactormonk>
and it can be used to solve sudoku
flagg0204 has joined #ruby
<bnagy>
I like ruby and all
<bnagy>
but I srsly wish you guys would stay the fuck away from unix until you know how it works
moted has joined #ruby
<bnagy>
chef..puppet...rvm..capistrano...
larissa has quit [Quit: Leaving]
<rovar>
bnagy, i'm curious to know where you're going with this? Are you suggesting that people write csh scripts to do all of this over rshell?
<rovar>
because that's old school unix
<bnagy>
more or less yeah
<bnagy>
ssh
<rovar>
:)
jasonkuhrt has joined #ruby
samflores has joined #ruby
<bnagy>
stupid agents and shell hooks and command overrides make me ill
<JonnieCache>
agreed
samflores has left #ruby [#ruby]
wuzzzzaah has quit [Ping timeout: 252 seconds]
<JonnieCache>
its ok in development but that stuff is not appropriate for production imo
wmoxam_ has joined #ruby
wuzzzzaah has joined #ruby
<JonnieCache>
chef obviously has its uses if youre doing a massive bloody server farm with a full SOA setup
a_a_g has quit [Quit: Leaving.]
<rovar>
JonnieCache, I'm still not convinced of that.. it has a space.. but it occupies a tiny space..
<rovar>
the way I see the world is something like : OS | Platform | Application
<JonnieCache>
which package manager can spin virtual servers up and down for you though?
<rovar>
where those bars exist is actually pretty fuzzy.. because the OS is provided by a VM image, which can actually provide some platform..
<Xeago>
rubber does it with ec2? not sure if it classifies as a packagemanager
<rovar>
then the platform might be fuzzy.. because one would call Ruby a platform..but how about Rails?
techhelp has joined #ruby
<Xeago>
framework
<rovar>
at any rate... the OS is a image, the platform is provided by dpkg/rpm
<JonnieCache>
rails is a dependency of the application
<rovar>
and the application is provided by bundles/npms/mvn/eggs/rocks/whatever
aganov has quit [Remote host closed the connection]
<JonnieCache>
the point is chef can talk to the level below the OS, which isnt on your diagram
<asteve>
ಠಠ
<rovar>
so chef's job is to call dpkg -i foo and fetch a Gemfile and run bundle install
<asteve>
"chef can talk to the level below the OS" how?
mistergibson has quit [Remote host closed the connection]
<Xeago>
by ssh'ing into the host of the vm which runs the os
<rovar>
asteve, I think he means that it can tell the orchestrator to spin up VMs
<JonnieCache>
yeah either that or talking to the ec2 api etc etc
<rovar>
in my case, Xeago, that's handled by open stack
cakehero has joined #ruby
nga4 has joined #ruby
<rovar>
there is an orchestrator pieces called Nova that handles that.
GoHuyGo has quit [Quit: Leaving]
<Xeago>
horrible use of double spaces
<Xeago>
hurts my eyes
khakimov has quit [Quit: Computer has gone to sleep.]
<JonnieCache>
so basically you dont like chef because it conflates too many roles which are better done by other scripts? that seems a fair viewpoint
<nga4>
Anyone have experience with Protocol Buffers?
<rovar>
so I guess I my point is I take a software engineering approach to system administration, ergo, chef doesn't do much for me..
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
jjbohn has joined #ruby
<rovar>
JonnieCache, yea.. i like my layers.. and chef can make things.. messy..
bapa has quit [Read error: Connection reset by peer]
<rovar>
nga4, a bit, what service are you wanting to call that requires PB?
<JonnieCache>
agreed there. some people like monolithic solutions that claim to solve all their problems.
<JonnieCache>
hence the continued popularity of shared hosts and the like
<JonnieCache>
and control panesl
<JonnieCache>
panels
<rovar>
yea.. i went to a devops meetup where one guy just talked for 1.5 hours about his chef recipes.
<rovar>
I was like !
<rovar>
....
<rovar>
zzzz
<bnagy>
a lot of devops is a hackers dream btw
<JonnieCache>
elaborate
<nga4>
rovar: Trying to send data over the wire from lua/c to a ruby service. I get the top layer of the protocol buffer just find but if anything extends the protocol the gem ruby_protobuf-0.4.11 doesn't seem to want to parse it. I can see the raw data in the message but i was curious if there was something special I had to do to get an extension out.
<bnagy>
no :)
<rovar>
it just smacks of over obsession about the wrong piece of your infrastructure.. if you find yourself writing a lot of chef/puppet, perhaps there is an intelligent web service to be written.
bluenemo has quit [Remote host closed the connection]
<JonnieCache>
rovar: surely some peoples infrastructure just needs to be that complex though?
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
superjoe has joined #ruby
<blazes816>
we use chef a lot for virtualization in IAAS
superjoe has left #ruby [#ruby]
<rovar>
JonnieCache, not sure.. to integrate with legacy systems.. perhaps..
<bnagy>
doing stuff in a predictable way on a schedule against hosts that might not be trusted
<JonnieCache>
people who have many many services and millions/billions of users
<JonnieCache>
i suppose if youre that much of a badass then you should be using your own scripts anyway
<JonnieCache>
you can afford people to do nothing but maintain your own chef-like system
ph^ has joined #ruby
<rovar>
JonnieCache, surely something else could manage the lifetimes of those services.. and be more responsive to things like server load, usage, and errors..
lessthanphil has joined #ruby
<Xeago>
god
<rovar>
he might help if you ask nicely
<rovar>
sacrifice a chicken.. or whatever..
<rovar>
depending on which god you're asking for help..
<nga4>
rovar: To put some context on it, the Person with Phone extension where they can have 10 phone numbers. I see the data going over the wire, but I can't get it out using person.phone[x]
eldariof has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
<rovar>
nga4, you need to specify in the protocol that there can be more than one extension
hbpoison_ has joined #ruby
lolmaus has joined #ruby
<reactormonk>
rovar: I'd prefer a goat
<rovar>
nga4, oh. I think you're using the Phone example
<rovar>
nga4, so 'repeated PhoneNumber phone'
bluenemo has quit [Read error: Operation timed out]
<nga4>
rovar: repeated Phone phones = 10; yeah
vital101 has quit [Remote host closed the connection]
alvaro_o has joined #ruby
dekroning has quit [Ping timeout: 240 seconds]
<rovar>
nga4, also, which ruby protobuf lib are you using? there's like 3
hbpoison has quit [Ping timeout: 246 seconds]
Takehiro has quit [Remote host closed the connection]
jocke12 has joined #ruby
<nga4>
rovar: ruby_protobuf-0.4.11
Yomero has joined #ruby
<rovar>
nga4, can you paste your generated ruby object?
await has joined #ruby
<nga4>
rovar: sure thing, one second
<rovar>
pastebin that is
<nga4>
rvoar: of course
<rovar>
:)
hbpoison_ has quit [Ping timeout: 276 seconds]
<JonnieCache>
GITHUB DOOOOOOOOWN!
<bnagy>
s/pastebin/pastie/gist/anything
<JonnieCache>
the error messages arent my fault! hooray/damn!
<rovar>
nga4, i'm not sure if that's valid syntax.. try what I wrote..
iamjarvo has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
iamjarvo has joined #ruby
reuf has joined #ruby
<nga4>
rover: rebuilding, one second
AlbireoX has quit [Remote host closed the connection]
moted has quit [Remote host closed the connection]
apok has quit [Quit: apok]
hoelzro is now known as hoelzro|away
Takehiro has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
nacengineer has joined #ruby
peregrine81 has quit [Quit: Goodbye.]
<shevy>
compiling ./missing/crypt.c
<shevy>
./missing/crypt.c:948:1: error: conflicting types for 'encrypt'
<shevy>
/usr/include/unistd.h:1138:13: note: previous declaration of 'encrypt' was here
<shevy>
waaaaaaaaah! :(
peregrine81 has joined #ruby
<nga4>
rovar: Yeah it gripes at me for trying that: "Person" does not declare 10 as an extension number. Let me look into the proto and make sure the syntax is right. it looks fine from a lua/c point of view but its possible someone is breaking convention
adaro has quit [Ping timeout: 245 seconds]
<nga4>
rovar: id10t, changed thw rong line, one second
bluenemo has joined #ruby
ianbrandt has joined #ruby
macmartine has joined #ruby
hbpoison_ has joined #ruby
Agis__ has quit [Ping timeout: 252 seconds]
jrajav has quit []
Agis__ has joined #ruby
ianbrandt has joined #ruby
amaya_ has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0.1/20120905151427]]
wuzzzzaah has quit [Remote host closed the connection]
zigomir has quit [Ping timeout: 264 seconds]
himsin has joined #ruby
<reashlin>
I believe it's suffering as part of the godaddy problem... could be mis-informed
timonv has quit [Remote host closed the connection]
<shevy>
reashlin :(
baroquebobcat has quit [Quit: baroquebobcat]
<reactormonk>
godaddy problem?
<shevy>
wanted to get mruby
hbpoison has quit [Ping timeout: 240 seconds]
<nga4>
rovar: Yeah looks like lua.c had me doing things slightly different, it works for them, let me try to redo my .proto and change that code and see what I can do. thanks for the help.
<davidcelis>
hahaha guys what
<davidcelis>
you really think github uses godaddy... for hosting.....
<davidcelis>
lolz
JonnieCache has quit [Ping timeout: 260 seconds]
<reashlin>
for hosting? no
ncr100 has joined #ruby
<reashlin>
for DNS, possibly
<Xeago>
no
<davidcelis>
doubtit
sneakyness_wk has joined #ruby
<davidcelis>
their status page says it's a DB cluster
Morkel has joined #ruby
<Xeago>
they use akamai
sneakyness_wk has quit [Client Quit]
hbpoison has joined #ruby
<reashlin>
could be, as i said, I was mis-informed
<Xeago>
also have aws
hbpoison_ has quit [Ping timeout: 264 seconds]
Jake232 has quit [Quit: Computer has gone to sleep.]
kvirani has quit [Remote host closed the connection]
tk__ has quit [Quit: ばいばい]
Spooner has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 248 seconds]
mrsolo has joined #ruby
baroquebobcat has quit [Ping timeout: 240 seconds]
baroquebobcat has joined #ruby
Xeago has quit [Remote host closed the connection]
scb has joined #ruby
MoZaHeM has joined #ruby
Iszak has quit [Quit: User has gone to sleep.]
seanwash has joined #ruby
shevy has quit [Ping timeout: 260 seconds]
uris has quit [Read error: Connection reset by peer]
uris has joined #ruby
benq has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
voodoofish430 has joined #ruby
mmitchell has joined #ruby
<await>
Is there an easy way to get the app's root path from a gem?I tried Rails.root, which gives me "uninitialized constant Heploy::Command::Deploy::Rails". Plus, I'd like it to be useful for Sinatra, too.
<MoZaHeM>
Is there an easy way to get the app's root path from a gem?I tried Rails.root, which gives me "uninitialized constant Heploy::Command::Deploy::Rails". Plus, I'd like it to be useful for Sinatra, too.
thunderstrike has quit [Read error: Connection reset by peer]
thunderstrike has joined #ruby
MoZaHeM has quit [Killed (idoru (Spam is off topic on freenode.))]
Choclo has quit [Quit: Leaving.]
cuci has joined #ruby
mbk has joined #ruby
GoHuyGo has joined #ruby
Markvilla has joined #ruby
gfontenot has joined #ruby
sebastorama has joined #ruby
qwerxy has quit [Quit: offski]
<cuci>
hi guys! I'm doing a select using sqlite3 into a db but I think I got the wrong encoding since I get these results: http://pastebin.com/eSJCLmhN
Nathandim has quit [Quit: Computer has gone to sleep.]
Gm4n has joined #ruby
mmitchell has quit [Remote host closed the connection]
BiHi has quit [Quit: Computer has gone to sleep]
nacengineer has quit [Quit: Leaving.]
Nathandim has joined #ruby
mikepack has quit [Remote host closed the connection]
Markvilla has quit [Quit: Computer has gone to sleep.]
<cuci>
GoHuyGo: but it's not
<cuci>
using sqlite I can see the chars just fine
<Mon_Ouie>
What are they supposed to be?
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
yshh has quit [Remote host closed the connection]
elico has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
elico has joined #ruby
maletor has joined #ruby
adamkittelson has joined #ruby
ephemerian has quit [Quit: Leaving.]
meskyanichi has quit [Ping timeout: 260 seconds]
sterNiX has joined #ruby
sterNiX has quit [Changing host]
sterNiX has joined #ruby
catphish has quit [Quit: Leaving]
bapa has joined #ruby
Nisstyre-laptop has quit [Remote host closed the connection]
tyfighter has joined #ruby
bluOxigen has joined #ruby
wallerdev has joined #ruby
zommi has joined #ruby
Solnse has quit [Ping timeout: 244 seconds]
Criztian has quit [Remote host closed the connection]
Markvilla has joined #ruby
CodeFriar has quit [Quit: Leaving...]
stepnem has quit [Ping timeout: 268 seconds]
apok has joined #ruby
stepnem has joined #ruby
cuci has quit [Quit: leaving]
sonkei has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
bluenemo has quit [Remote host closed the connection]
sonkei has quit [Client Quit]
mrsolo has joined #ruby
elaptics is now known as elaptics`away
yxhuvud has joined #ruby
jonathanwallace has joined #ruby
stopbit has quit [Read error: Connection reset by peer]
emmanuelux has quit [Ping timeout: 246 seconds]
mmitchell has joined #ruby
stopbit has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
chimkan has quit [Quit: chimkan]
matrixise has quit [Ping timeout: 260 seconds]
gen0cide_ has joined #ruby
robotmay has joined #ruby
Virunga has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
Markvilla has quit [Quit: Computer has gone to sleep.]
gkos has joined #ruby
pskosinski has quit [Ping timeout: 276 seconds]
Tuptus has joined #ruby
Choclo has joined #ruby
Tuptus has left #ruby [#ruby]
<gkos>
I have a ruby-gem installation which I want to remove, I have no previous knowledge about ruby... I try rake uninstall without sucess... also I try DESTDIR to some folder to get the file created during installation.. no success too... It was installed on /usr/local.. any idea?
rburton- has joined #ruby
rubious has joined #ruby
eldariof has joined #ruby
shadoi has joined #ruby
ncr100_ has joined #ruby
qwerxy has quit [Ping timeout: 260 seconds]
ncr100_ has quit [Client Quit]
LBRapid has joined #ruby
ncr100 has quit [Remote host closed the connection]
ncr100 has joined #ruby
<haggen>
you could use find . -name "gem" to find and delete every file and folder related to rubygem
mahmoudimus has joined #ruby
<haggen>
i meant `find / -name "gem"`
punkrawkR has joined #ruby
jgrevich has joined #ruby
<haggen>
gkos: forgot to mention you
<gkos>
haggen: thanks
<haggen>
gkos: anyway, you should totally use rvm
<gkos>
what is rvm?
carloslopes has quit [Read error: Connection reset by peer]
<haggen>
gkos: rvm is a version manager for ruby and rubygem
mmitchell has quit [Remote host closed the connection]
CodeFriar has joined #ruby
gaahrdner has quit [Ping timeout: 255 seconds]
<haggen>
gkos: its super easy to use and save a lot of trouble in case you want to update your ruby, remove it from the system or have multiple users wanting to use different versions
artOfWar has joined #ruby
denstark has left #ruby [#ruby]
<haggen>
gkos: go take a look, you won't regret it: http://rvm.io
<gkos>
haggen, it seems what I'm looking for, thanks²!
<haggen>
gkos: you're welcome
austinbv has joined #ruby
justinmcp has joined #ruby
bapa has quit [Read error: Connection reset by peer]
Agis__ has quit [Quit: Agis__]
sneakyness_wk has joined #ruby
byronb has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
mahmoudimus has quit [Ping timeout: 244 seconds]
bapa has joined #ruby
lessthanphil has quit [Quit: lessthanphil]
justinmcp has quit [Ping timeout: 246 seconds]
sspiff has quit [Remote host closed the connection]
arturaz has joined #ruby
joelsotherbeard has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
Solnse has joined #ruby
austinbv has quit [Ping timeout: 244 seconds]
Foxandxss has joined #ruby
hbpoison has quit [Quit: leaving]
hbpoison has joined #ruby
mahmoudimus has joined #ruby
c0rn_ has joined #ruby
mahmoudimus has quit [Read error: Connection reset by peer]
dmiller has quit [Remote host closed the connection]
<bricker88>
What good are class variables?
sailias has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
<bnagy>
what good is anything?
* bricker88
ponders
mahmoudimus has joined #ruby
hbpoison has quit [Quit: leaving]
jgrevich has quit [Quit: jgrevich]
dmiller has joined #ruby
<philcrissman>
bricker88: the canonical example is a counter, eg, a class might count how many times it's instantiated.
rippa has joined #ruby
<bnagy>
there is no canonical example because class vars are always wrong
ltsstar has joined #ruby
hbpoison has joined #ruby
<bricker88>
philcrissman: Some code I have (inherited) is storing stuff like a Faraday connection to an API and some configuration in class variables… It would be better just to store it in normal class instance variables, right?
<wmoxam_>
lol wat
<bnagy>
yes
<bnagy>
or not even
sspiff has quit [Ping timeout: 276 seconds]
<bricker88>
wmoxam_: lol wat at the code or my suggestion?
<philcrissman>
bricker88: ah... well. That depends. Or in a separate object, a config object of some sort.
mmitchell has joined #ruby
<wmoxam_>
bricker88: lolat "13:45 < bnagy> there is no canonical example because class vars are always wrong"
Jake232 has joined #ruby
<wmoxam_>
:p
<bricker88>
wmoxam_: oh
mahmoudimus has quit [Ping timeout: 272 seconds]
<bnagy>
connections should probably not attach to classes
dmiller has quit [Ping timeout: 252 seconds]
<bnagy>
configs can, but class ivars are better
<bnagy>
but that's still a bit risky imho
<bricker88>
what is?
<bnagy>
say you shared a config hash from a class ivar - you can still get pollution
Russell^^ has joined #ruby
<bricker88>
bnagy: What about just storing it in a constant? Asset::CONFIG
<bnagy>
you can store defaults in a class ivar and then merge the defaults into the local configs
havenn has joined #ruby
<bnagy>
constants are kind of equiv, except you shouldn't store stuff that's not constant in them
<bnagy>
eg configs
<bnagy>
and also they will whine like girls when you redefine them
bluOxigen has quit [Ping timeout: 255 seconds]
<bricker88>
bnagy: It's a configuration for an API (server and token for example), so it doesn't change
<bnagy>
why not just a regular ivar / accessor then?
<bricker88>
bnagy: Yes I could do that
RegEchse has joined #ruby
<bnagy>
if you're not subclassing and metawotsiting and being clever then that's probably simplest
<rtl>
Can you count instances of a class through ObjectSpace or somesuch? cc: philcrissman
<Hanmac>
rtl he could but its not the nice way
<rtl>
Can't believe I just "cc:"'d in IRC. Mid-90s me is so embarassed.
qwerxy has joined #ruby
fbernier has joined #ruby
hbpoison has quit [Quit: leaving]
seanwash has quit [Quit: Computer has gone to sleep.]
nohonor has joined #ruby
<bnagy>
ObjectSpace has direct support for instances of class X
eldar has joined #ruby
chimkan_ has quit [Quit: chimkan_]
<rtl>
Hanmac: IMO it'd be nicer, but not sure how.
himsin has quit [Ping timeout: 240 seconds]
chimkan has joined #ruby
a_a_g has joined #ruby
Spooner has joined #ruby
hbpoison has joined #ruby
pskosinski has joined #ruby
<Mon_Ouie>
ObjectSpace.each_object(X).count, but that's not the same thing as having a counter
<rtl>
Hanmac: where 'nicer' == 'I can mock it'
jwbuurlage has quit [Read error: Connection reset by peer]
jwbuurlage_ has joined #ruby
<Mon_Ouie>
Because dead instances won't appear in there
<shevy>
dead instances make me sad
eldariof has quit [Ping timeout: 264 seconds]
Eiam has joined #ruby
<rtl>
Mon_Ouie: tru.
<Hanmac>
Mon_Quie sometimes i want that the instances are forced alive: like class[:sym] returns allways the same object
<Mon_Ouie>
GC.disable # there, be happy :)
<rtl>
heh
<philcrissman>
rtl: I was just saying for class variables in general; the most common example I've seen for "what are these good for" is something like a class that counts its instances.
<bnagy>
whoaaaa ruby so fast naow!
Jellyg00se has quit [Read error: Connection reset by peer]
johnlcox_ has joined #ruby
<davidcelis>
>> GC.disable
<al2o3cr>
(FalseClass) false
<Mon_Ouie>
That's temporary, you need to do it all in one line
havenn has quit [Remote host closed the connection]
johnlcox has quit [Ping timeout: 240 seconds]
johnlcox_ is now known as johnlcox
<bnagy>
except that could be done better with a class ivar
fantazo has quit [Remote host closed the connection]
Goles has joined #ruby
bigkevmcd has quit [Ping timeout: 245 seconds]
jeff_sebring has joined #ruby
burgestrand has joined #ruby
<Mon_Ouie>
bnagy: But then as soon as you instanciate a subclass you get a separate counter, which you may not want (those instances are instances of the former class too, after all)
<bnagy>
uh
andrew_ has quit [Remote host closed the connection]
dr_bob has joined #ruby
Nisstyre-laptop has quit [Remote host closed the connection]
<bnagy>
oic if you have two generations, you mean?
<Spooner>
Mon_Ouie : Depends. If you have the instance-based accessor as def x; self.class.x; end or def x; BaseClass.x; end
<bricker88>
is private_class_method a bad idea? I just want to use it for the method that builds the Faraday object
bapa has quit [Read error: Connection reset by peer]
manizzle has quit [Ping timeout: 252 seconds]
a_a_g has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
a_a_g has joined #ruby
mohits_ has joined #ruby
seanyo has quit [Ping timeout: 276 seconds]
havenn has joined #ruby
timonv has quit [Remote host closed the connection]
seanwash has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
andrew_ has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
habib has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
CodeFriar has quit [Quit: Leaving...]
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
Xeago has quit [Remote host closed the connection]
elux has joined #ruby
mmitchel_ has joined #ruby
krawchyk_ has joined #ruby
johnlcox has quit [*.net *.split]
Criztian has quit [*.net *.split]
Eiam has quit [*.net *.split]
chimkan has quit [*.net *.split]
Markvilla has quit [*.net *.split]
mmitchell has quit [*.net *.split]
sailias has quit [*.net *.split]
kvirani has quit [*.net *.split]
Virunga has quit [*.net *.split]
Monie has quit [*.net *.split]
mbk has quit [*.net *.split]
reuf has quit [*.net *.split]
joshman_ has quit [*.net *.split]
cakehero has quit [*.net *.split]
pabloh has quit [*.net *.split]
geekbri has quit [*.net *.split]
awarner has quit [*.net *.split]
duard has quit [*.net *.split]
CoverSlide has quit [*.net *.split]
GeekOnCoffee has quit [*.net *.split]
mwilson` has quit [*.net *.split]
ping-pong has quit [*.net *.split]
Muz has quit [*.net *.split]
ninegrid has quit [*.net *.split]
phrame has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
Spaceghost|cloud has quit [*.net *.split]
examancer has quit [*.net *.split]
ionte has quit [*.net *.split]
ahuman has quit [*.net *.split]
dotemacs has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
madhatter has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
benatkin has quit [*.net *.split]
jhowarth has quit [*.net *.split]
spathi_ has quit [*.net *.split]
ViperMaul|_ has quit [*.net *.split]
Phibs has quit [*.net *.split]
kaneda_ has quit [*.net *.split]
jcooley has quit [*.net *.split]
methoddk has quit [*.net *.split]
Rizzle has joined #ruby
Criztian has joined #ruby
johnlcox has joined #ruby
Virunga has joined #ruby
sailias has joined #ruby
Markvilla has joined #ruby
Monie has joined #ruby
reuf has joined #ruby
joshman_ has joined #ruby
pabloh has joined #ruby
duard has joined #ruby
geekbri has joined #ruby
awarner has joined #ruby
GeekOnCoffee has joined #ruby
Muz has joined #ruby
CoverSlide has joined #ruby
Spaceghost|cloud has joined #ruby
ninegrid has joined #ruby
examancer has joined #ruby
Phibs has joined #ruby
madhatter has joined #ruby
jhowarth has joined #ruby
kaneda_ has joined #ruby
spathi_ has joined #ruby
dotemacs has joined #ruby
ping-pong has joined #ruby
ahuman has joined #ruby
TorpedoSkyline has joined #ruby
Sou|cutter has joined #ruby
ionte has joined #ruby
jcooley has joined #ruby
benatkin has joined #ruby
mwilson` has joined #ruby
phrame has joined #ruby
Goles has joined #ruby
clj_newb has quit [Read error: Connection reset by peer]
kvirani has joined #ruby
Spaceghost|cloud has quit [Max SendQ exceeded]
Markvilla has quit [Ping timeout: 248 seconds]
TorpedoSkyline has quit [Ping timeout: 248 seconds]
joshman_ has quit [Ping timeout: 248 seconds]
Tearan has joined #ruby
GeekOnCoffee has quit [Read error: Connection reset by peer]
clj_newb has joined #ruby
dotemacs has quit [Max SendQ exceeded]
yosafbridge has joined #ruby
Markvilla has joined #ruby
methoddk has joined #ruby
kjellski has quit [Quit: Leaving]
Xeago has joined #ruby
krawchyk has quit [Ping timeout: 240 seconds]
cakehero has joined #ruby
joshman_ has joined #ruby
mark_locklear has joined #ruby
GeekOnCoffee has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
apok has quit [Remote host closed the connection]
macmartine has joined #ruby
apok has joined #ruby
TorpedoSkyline has joined #ruby
Spaceghost|cloud has joined #ruby
passbe has quit [Ping timeout: 244 seconds]
chussenot has quit [Quit: chussenot]
lessthanphil has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
jastix has quit [Quit: Leaving]
ckrailo has joined #ruby
Choclo has quit [Quit: Leaving.]
a_a_g has quit [Read error: Connection reset by peer]
Tearan has quit [Quit: Sleepy Badger....]
erichmenge has joined #ruby
a_a_g has joined #ruby
maletor has joined #ruby
Jellyg00se has quit [Remote host closed the connection]
mikalv has joined #ruby
LBRapid has quit [Quit: Farewell.]
LBRapid has joined #ruby
lupine_85 has quit [Excess Flood]
Goles has quit [Ping timeout: 255 seconds]
jimeh has quit [Ping timeout: 252 seconds]
nga4 has quit [Remote host closed the connection]
araujo has quit [Ping timeout: 260 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
passbe has joined #ruby
Yomero has quit [Ping timeout: 248 seconds]
a_a_g has quit [Read error: Connection reset by peer]
lupine_85 has joined #ruby
a_a_g has joined #ruby
cakehero has joined #ruby
Targen has joined #ruby
ben_____ has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
jaylevitt has quit [Ping timeout: 260 seconds]
Solnse has quit []
<habib>
hey everyone
mohits_ has quit [Read error: Connection reset by peer]
mohits_ has joined #ruby
ben_____ has quit [Quit: leaving]
jasonkuhrt has quit [Quit: Leaving...]
sspiff has quit [Remote host closed the connection]
LBRapid has quit [Quit: Farewell.]
LBRapid has joined #ruby
krawchyk has joined #ruby
kayiinu has joined #ruby
timonv has quit [Remote host closed the connection]
LBRapid has quit [Client Quit]
krawchyk has quit [Remote host closed the connection]
LBRapid has joined #ruby
kayiinu has quit [Client Quit]
carloslopes has quit [Quit: Leaving.]
carloslopes has joined #ruby
timonv has joined #ruby
<habib>
i instaled ruby 1.9.3 but when i type ruby -v it gives me 1.8.7
haggen has quit [Quit: haggen]
jasonkuhrt has joined #ruby
Jellyg00se has joined #ruby
<habib>
does anyone know how to make 1.9.3. default version
<habib>
?
<asteve>
which ruby
<asteve>
`which ruby`
<await>
I'm having some problems with writing this gem when deploying to heroku. I add the gem to the load_path so I can require the CLI class from my executable. Then when I deploy, heroku is looking for the local path. Here's the gist: https://gist.github.com/3701361
timonv has quit [Remote host closed the connection]
samrose has joined #ruby
<await>
Trying to delete it from the loadpath after requiring doesn't work.
Choclo has joined #ruby
jimeh has joined #ruby
<habib>
asteve, what to do with this?
andrew_ is now known as andrewhl
<await>
When do a 'puts RUBY_VERSION', it shows 1.9.3, so I'm not sure what heroku is complaining about.
<Muz>
habib: what operating system, and how did you install ruby 1.9.3?
<metrix>
I have found that class variables (@@var) don't behave as I would expect them to behave. I have a few variables that need to be used in multiple instances of a class, is there a class variable best practice, or something else I should use instead of class variables?
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
bapa has joined #ruby
<burgestrand>
metrix: most often all you need are class instance variables (@var).
<burgestrand>
metrix: class variables (@@var) are inherited and shared amongst subclasses, and are usually avoided.
<metrix>
class instance variable.. I assume they are different from instance variables?
bapa has quit [Client Quit]
<burgestrand>
metrix: not so much, they’re attached to the class instead of an instance of a class. Kind of like a static variable in languages like java or php.
<trooney>
Class.to_json returns a json string. I want to override to_json, add an attribute to the object being to_json'd
<Muz>
>> class String; def to_json; puts "loldongs"; end; end; "This is a string".to_json
<al2o3cr>
(NilClass) nil, Console: loldongs
roadt has quit [Ping timeout: 276 seconds]
<shevy>
hmm
<Muz>
Overriding the function is trivial. ¬_¬
<shevy>
what must one do to have the .to_json method?
maletor has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie>
Just define in, and return a JSON representation of the object as a string
<trooney>
Muz: And when String already defines to_json? how call super class?
<Muz>
trooney: call super within the new definition.
<Mon_Ouie>
(or require 'json' if that's what you mean)
zommi has quit [Quit: Leaving.]
<Muz>
>> class A; def foo; puts 'your mum'; end; end; class B < A; def foo; super; puts 'moo'; end; end; A.new.foo; B.new.foo
<al2o3cr>
(NilClass) nil, Console: your mum, your mum, moo
GoGoGarr_ has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
ltsstar has quit [Quit: ltsstar]
rlomax has quit [Ping timeout: 246 seconds]
fbernier has joined #ruby
pskosinski has quit [Remote host closed the connection]
maletor has joined #ruby
pskosinski has joined #ruby
Goles has joined #ruby
jbw has quit [Read error: Connection reset by peer]
graft has joined #ruby
jbw has joined #ruby
mwilson` has quit [Excess Flood]
mwilson` has joined #ruby
<graft>
okay, so i'm trying to split a file into lines with ruby & zlib, and it is super slow. If i want to read a file and count the number of lines, ruby takes 2.5 minutes to do it, while zcat file | wc -l takes 25 s
geekbri has quit [Remote host closed the connection]
mwilson` has quit [Excess Flood]
<graft>
any recommendations?
<Hanmac>
graft whats your ruby version?
<graft>
1.9.3
mwilson` has joined #ruby
yxhuvud has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Ping timeout: 260 seconds]
<graft>
i suspect the problem is that zcat | wc is just counting bytes as they stream in, while ruby reads the whole file, then goes over it again to split it, etc., which is much slower
Faris has joined #ruby
Faris has left #ruby [#ruby]
<graft>
it would be nice if i could just split the stream into lines as it came in, but i'm not sure how to do that
<_xorgnak>
I'm only trying to manage a couple lines at the top of my terminal, but curses seems to always want to take control of the whole thing, even though it was initialized with the appropriate dimensions
<shevy>
_xorgnak only one issue
chrxn has quit [Ping timeout: 264 seconds]
<shevy>
curses is aptly named
<_xorgnak>
only one
<gverri>
Hi guys, does any1 knows a good way to write/read json in ruby?!
<shevy>
curses WANTS TO SEIZE CONTROL OF YOUR VERY SOUL OF EXISTENCE MAN
<gverri>
Or is it easier to ousel yaml?
fbernier has quit [Ping timeout: 260 seconds]
<gverri>
*use
<shevy>
I'd wish there would be a more fun API in ruby for the curses stuff
<lectrick>
Banistergalaxy: I want to backport refinements to 1.9 using your https://github.com/banister/remix idea, but that won't build on 1.9.3 :(
<shevy>
so like I can do a ruby nethack version without problem
<_xorgnak>
I prefere yaml to json by a long shot
<matti>
_xorgnak: YAML is fine as configuration files ;p
<matti>
_xorgnak: But net when you need it to fly throught a socket ;p
<matti>
_xorgnak: Then it sucks ;p
<_xorgnak>
it can handle object management too.
joelsotherbeard has quit [Ping timeout: 272 seconds]
<gverri>
Im writing a crawler and i need a place to store the values so I don't need to keep gathering the information every time I rerun the crawler
<_xorgnak>
That's what I've using it for right now actually
<matti>
;]
frogprince_mac has quit [Ping timeout: 260 seconds]
<_xorgnak>
shell extension, object management, and configuration.
haggen has joined #ruby
<canton7>
>> require 'json'; p JSON.parse('{"one": ["two", "three"]}'); p {:one => "two"}.to_json
<await>
Would anyone know an easy way to call a another application's (Rails, in this case) rake tasks from a gem? I'm doing ` Rake::Task["db:migrate"] ` but it gives me "Don't know how to build task 'db:migrate' (RuntimeError)".
<canton7>
>> require 'json'; p {:one => "two"}.to_json
<Ontolog>
>> "This island is beautiful".match(/\bis\b)
<al2o3cr>
-e:1:in `eval': (eval):1: unterminated regexp meets end of file (SyntaxError), (eval):1: syntax error, unexpected $end, expecting ')', "This island is beautiful".match(/\bis\b), ^, from -e:1:in `<main>'
<_xorgnak>
and just requireing json doesn't seem to give me access to JSON.parse.
<Ontolog>
>> "This island is beautiful".match(/\bis\b/)
<al2o3cr>
(MatchData) #<MatchData "is">
flagg0204 has joined #ruby
<Ontolog>
no space
<matti>
Quick.
<_xorgnak>
the yaml module just handled formatting. you read and write files just like any other file.
<matti>
Somebody throw XML parser.
<matti>
!!!
<matti>
;d
<_xorgnak>
may be a simpler solution
<_xorgnak>
...or xml
<matti>
Hahah
<_xorgnak>
json's not fun
<canton7>
json's fine!
joelsotherbeard has joined #ruby
<_xorgnak>
right you are. I didn't even see your solution there.
<_xorgnak>
that is quite nice.
zackattack has quit [Remote host closed the connection]
Choclo has quit [Quit: Leaving.]
love_color_text has joined #ruby
love_color_text has quit [Client Quit]
love_color_text has joined #ruby
Speed has quit [Remote host closed the connection]
elux has quit [Quit: Bye!]
Takehiro has joined #ruby
<trooney>
Is something like this possible? func(*args) super([:default => 'foo'].merge(*args)) How can I merge function paramaters, then pass them along to super?
<tbrock>
hey guys, whats up with bundler redefining methods
baroquebobcat_ has joined #ruby
Nisstyre has quit [Read error: Connection reset by peer]
<lectrick>
snorkdude: "set if nil" basically
<lectrick>
pronounced "or-equals"
hvq has joined #ruby
botspot_87 has joined #ruby
<tbrock>
do you guys have that same behavior when running tests
<tbrock>
?
<hvq>
hi, is there any good ruby resources for beginner?
<Mon_Ouie>
blazes816: As said on ruby-lang: a || a = b is the closest expansion but actually even that one is slightly different for variables because ||= also works when a isn't defined yet
baroquebobcat has quit [Ping timeout: 248 seconds]
baroquebobcat_ is now known as baroquebobcat
<botspot_87>
hi guys...a question: how is the best way to ensure an atomic transaction with ruby. I want to be sure, that everything that happens inside a block is all or nothing. For example, making something, writing sucess on two different files. If anything goes wrong, the routine rollsback.Do I get that by default when running my code inside a block?
bbttxu has quit [Quit: bbttxu]
stopbit has quit [Read error: Connection reset by peer]
sneakyness_wk has quit [Ping timeout: 244 seconds]
chimkan_ has quit [Quit: chimkan_]
kpshek has quit []
jclem has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
nilg has quit [Ping timeout: 252 seconds]
maxmmurphy has joined #ruby
<lectrick>
botspot_87: begin … rescue… ensure…. end
<blazes816>
Mon_Ouie: god forbid I ever say something that's just correct
sneakyness_wk has joined #ruby
<botspot_87>
lectrick: thanks
<lectrick>
botspot_87: the rescue would have to manually roll back changes, and the ensure would do what it has to do no matter what happens in the begin block. There are also transaction libraries out there.
levieraf has quit [Quit: Saliendo]
<lectrick>
botspot_87: You can't just use a block because code in a block can affect state outside the block
LouisGB has joined #ruby
<botspot_87>
lectrick: yeah but there is something that i am missin yet. Suppose that inside begin i start writing a file, suddenly the process hangs and someone shutsdown the computer....the rescue part wont get executed, therefore i wouldnt have a rollback manual process, I would like that the code inside begin would never been executed
hvq has quit [Ping timeout: 260 seconds]
<botspot_87>
lectrick: for example, a write to file, should leave the file in a inconsistent state (partially written)
<botspot_87>
lectrick: it should simply rollback what has been written
Choclo has joined #ruby
<lectrick>
botspot_87: there's no rollback if the computer is shut off, not sure if even "official" transactions can save that circumstance
<Mon_Ouie>
They you could just build the string to print, and only if that succeeds, print it to the file
<Mon_Ouie>
Unless I misunderstood you
sneakyness_wk has quit [Ping timeout: 268 seconds]
<lectrick>
botspot_87: you can write the file to a temp file and after it is written, do a unix file mv (rename) which is fairly atomic I think
Pip has joined #ruby
mwilson` has quit [Excess Flood]
<botspot_87>
lectrick: hummm, and what would be the benefit of writing it to a tempfile? Is it atomic?
mwilson` has joined #ruby
<botspot_87>
lectrick: I mean, what if the tempfile is also left inconsistent
recycle has joined #ruby
sneakyness_wk has joined #ruby
cascalheira has joined #ruby
Choclo has quit [Client Quit]
peregrine81 has quit [Quit: Computer sleeping.]
dangerousdave has quit [Ping timeout: 265 seconds]
haggen has joined #ruby
SegFault1X|work2 is now known as SegFaultAX
SegFaultAX is now known as SegFaultAX|work2
haggen has quit [Client Quit]
jso has quit []
Virunga has quit [Remote host closed the connection]
ngoldman has joined #ruby
sambio has quit [Read error: Connection reset by peer]
Goles has quit [Ping timeout: 260 seconds]
CarlB_the_great has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
ph^ has joined #ruby
fixl has quit [Ping timeout: 240 seconds]
jjbohn has quit [Quit: Leaving...]
gverri has quit [Quit: gverri]
workmad3 has quit [Ping timeout: 268 seconds]
jso has joined #ruby
mbk has quit [Ping timeout: 240 seconds]
byronb_ has joined #ruby
stopbit has quit [Quit: Leaving]
xorgnak has joined #ruby
<ged>
botspot_87: You wouldn't care, because it's just a tempfile. The target file would be consistent still because it wouldn't exist.
cakehero has quit [Quit: Computer has gone to sleep.]
rcloak has quit [Quit: rcloak]
ph^ has quit [Ping timeout: 248 seconds]
luckyruby has quit [Remote host closed the connection]
byronb has quit [Ping timeout: 276 seconds]
austinbv has joined #ruby
sailias has quit [Quit: Leaving.]
<botspot_87>
ged: got it....i understood now your strategy
<botspot_87>
ged: good idea guys!
swarley has joined #ruby
daniel_hinojosa1 has joined #ruby
<swarley>
So, i'm using Hpricot, and I have an element and i want the next element under it
gverri has joined #ruby
<swarley>
is that possible?
xorgnak_ has joined #ruby
<xorgnak>
it handy.
<xorgnak_>
the ||= means or equals
xorgnak has quit [Remote host closed the connection]
<xorgnak_>
as in @x = 3; def meth(x); @x ||= x; puts @x; end
awarner has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
<shevy>
but for the most part, ruby syntax and python syntax is quite similar. just you have to use "end" rather than indent, and using () is optional.
<shevy>
and there is usually more than one way to do things too. Both [] and Array.new create a new array, for instance... most prefer to use [] though
<F1skr>
what about the @ infront of a var in a function?
<shevy>
F1skr kind of. though in ruby self.foo would call a method, no?
<shevy>
self in ruby is always self
<blazes816>
F1sker: @a_var is like python's self.a_var
<shevy>
class Bla; def hi; x = self; puts x; end; end
<shevy>
hmm what is python self.a_var doing?
chendo_ has joined #ruby
<F1skr>
a variable
<Muz>
self.blah would only work in ruby if there's a blah method, or attr_* has been used for :blah.
<blazes816>
shevy: the same thing @a_var does in ruby ;)
<shevy>
ah... the name self can be another name right?
<F1skr>
self.fun() is a function in python
<F1skr>
method*
<blazes816>
shevy: yep, because it's explicit
<blazes816>
self.fun() is a method in ruby
<F1skr>
ok
<blazes816>
but self.fun could be a method or var
Spooner has joined #ruby
recycle has quit [Remote host closed the connection]
seanstickle has joined #ruby
<shevy>
ruby likes methods very much
<F1skr>
so self.var == @var ?
<Muz>
>> class Shevy; def initialize; @cocks = "moose"; end; def bar; self.cocks; end; end; a = Shevy.new; a.bar
<al2o3cr>
-e:1:in `eval': undefined method `cocks' for #<Shevy:0x0000000241b9d0 @cocks="moose"> (NoMethodError), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'