jasonLaster has quit [Remote host closed the connection]
jasonLaster has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
digitalcakestudi has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
jasonLaster has quit [Read error: Connection reset by peer]
jasonLaster has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
locriani has quit [Remote host closed the connection]
digitalcakestudi has joined #ruby
cousine has joined #ruby
nixmaniack has quit [Ping timeout: 276 seconds]
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
uris has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 265 seconds]
element8 has joined #ruby
element8 has left #ruby [#ruby]
digitalcakestudi has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
savage- has joined #ruby
kyb3r has joined #ruby
freeayu__ has joined #ruby
freeayu has quit [Ping timeout: 272 seconds]
td123 has joined #ruby
seanstickle has quit [Quit: seanstickle]
digitalcakestudi has joined #ruby
digitalcakestudi has quit [Client Quit]
digitalcakestudi has joined #ruby
v0n has joined #ruby
infinitiguy has joined #ruby
blazes816 has quit [Quit: This computer has gone to sleep]
n_blownapart has joined #ruby
infinitiguy has quit [Quit: Leaving.]
<n_blownapart>
hi . so apparently ruby allocates memory for a variable even when the code isn't executed. I called object_id on this variable out of curiosity and it gave me 4. why was the object_id number a single digit? thanks: http://pastie.org/4553519
<banisterfiend>
n_blownapart: it just means it's nil
<banisterfiend>
4 => nil
<n_blownapart>
banisterfiend: thanks. you mean nil's object_id is always 4?
mohits has quit [Read error: Connection reset by peer]
<bluebie>
n_blownapart: It's always 4 in MRI (the normal version of ruby almost everyone uses)
<bperry>
ruby is arbitrary precision
<bluebie>
but it's an implementation detail - you shouldn't depend on it being that or your programs might stop working when everyone updates to ruby 3.0 or whatever
pricees has joined #ruby
n1x has joined #ruby
<bluebie>
that said, nil.object_id #=> 4 in macruby too :>
<n_blownapart>
bluebie: et al but most objects have id's that are what....6 or 7 characters?
<bluebie>
object id's are numbers, not strings. They don't have any characters
<bperry>
which is backwards from how C does things
<bperry>
float + int = int
<n_blownapart>
bluebie: whats this about negative id numbers?
Spooner has quit [Ping timeout: 276 seconds]
<bluebie>
n_blownapart: The way ruby stores objects in to variables is by putting the objects in to memory somewhere, then setting the variable to a number which corrosponds to the object's location in your computer's RAM somehow
macmartine has joined #ruby
<n_blownapart>
bluebie: so in RAM some locations are ascribed negative numbers?
banisterfiend has quit [Ping timeout: 240 seconds]
<bluebie>
n_blownapart: To make things faster though, if you're just using numbers it uses this tricky maths to store the numbers directly in the variables, so it doesn't need to reserve lots of memory for a lot of objects which are just representing numbers
<bluebie>
no, the numbers are actually binary addresses - it's just that the numbers are being understood using two's compliment or something like that
<bluebie>
it's a way of storing negative numbers as binary
<bluebie>
so certain addresses display as negative numbers when you play around in ruby
<n_blownapart>
bluebie: but not arbitrary?
freeayu__ has quit [Ping timeout: 246 seconds]
eko has quit [Read error: Connection reset by peer]
[eko] has joined #ruby
<bluebie>
sort of
philips_ has quit [Excess Flood]
<bluebie>
if it's not numbers or special things like nil, false, true, or undefined, then everything else is an object
digitalcakestudi has quit [Ping timeout: 245 seconds]
zeromodulus has quit [Read error: Connection reset by peer]
<bluebie>
so the 'numbers' are just a numeric representation of the binary address ruby is using to find those objects in memory
zeromodulus has joined #ruby
<bperry>
can you prove this with a quick one liner?
<bluebie>
how ruby and the particular operating system ruby is running on decide to fit the objects in to memory could be different from computer to computer
<bperry>
I believe you
pingfloyd has quit [Ping timeout: 248 seconds]
macer1 has quit [Quit: sleep...:<]
<bluebie>
bperry: What do you mean? prove which idea?
<bperry>
memory address holds value
* terrellt
blinks
hemanth has joined #ruby
<bperry>
unless I am misunderstanding what you are saying
<bluebie>
prove that numbers are stored directly in to object id's?
<bluebie>
as immediate values?
<bperry>
yes, i can't replicate this
<bluebie>
ObjectSpace._id2ref(-61) #=> -31
<bperry>
(8.9343).object_id and (89343).object_id return object_id's that re not the value
<bperry>
hmm
<bluebie>
that's true in MRI 1.9.3
<bperry>
I see
philips_ has joined #ruby
<Banistergalaxy>
Floats are different
<Banistergalaxy>
Floats are allocated
macer__ has quit [Read error: Connection reset by peer]
<n_blownapart>
bluebie: my friend was trying to explain how memory changes location when a prog. changes scope, say for the var. x. sorry I'm a noob but that was fascinating. even if x = 100 through all the various scopes of a prog. the memory shifts for milliseconds ever so slightly ...am I correct?
<bluebie>
but if you run that in macruby you'll get a range error, and if you run -62 in macruby it segfaults! fun!
<Banistergalaxy>
On the heap
answer_42 has joined #ruby
vitor-br has quit [Quit: Saindo]
<bluebie>
ObjectSpace._id2ref(61) #=> 15 in macruby though and 30 in MRI 1.9.3!
<bluebie>
n_blownapart: No not really
<bluebie>
Objects tend to stay in the same spot
<Banistergalaxy>
Bperry floats are not immediates, only fixnums
<bluebie>
100 is a special case - as it's an integer number and it's not a bignum, it can just go right in the variable itself
<bluebie>
but if it was something like, say "hello"
<bperry>
Banistergalaxy: I don't get what you mean
<bluebie>
then it's object_id would be the same regardless of scope, if you're talking about the same object
<Banistergalaxy>
Bperry what don't you understands
freeayu__ has joined #ruby
<bluebie>
on the other hand, "hello".object_id == "hello.object_id #=> false - those two strings are different objects even though their characters are the same, n_blownapart
<bperry>
the immediate part
<bluebie>
so sometimes it can seem like similar objects are going in to different spots in memory
hero has quit [Quit: leaving]
<bluebie>
n_blownapart: All of this stuff is pretty messy details which languages like ruby try to keep you from needing to think about. Languages like C (which matz's ruby is written in) use 'pointers' extensively though - a pointer is a variable which contains the address of something in memory somewhere else, much like ruby variables, but without these special cases where it can have immediate numbers and false and true and all of that
jarred has joined #ruby
<bluebie>
C can be fun to play with if you're at all curious
banisterfiend has joined #ruby
<bluebie>
n_blownapart: If you're curious about learning C, there's a course I did at uni which was really fun, and the videos are online at http://www.youtube.com/playlist?list=PL6B940F08B9773B9F - it goes in to pointers and heaps and stacks and all of that in more depth
<banisterfiend>
bperry: "immediate value" means it's embedded in the VALUE itself, it's not a pointer to another object on the heap
<banisterfiend>
bperry: do you know what a pointer is
<banisterfiend>
well an immediate value is not a pointer ;)
terrellt has quit [Quit: Few women admit their age. Few men act theirs.]
freeayu__ has quit [Read error: Connection reset by peer]
<n_blownapart>
bluebie: thanks for the link. still working on how scope works...
<bluebie>
n_blownapart: Is any particular part being tricky for you?
<T-Gunn>
does rails 3.1.3 work with ruby 1.8.7 ?
savage- has joined #ruby
digitalcakestudi has joined #ruby
c0rn_ has quit []
zeromodulus has quit [Remote host closed the connection]
<n_blownapart>
bluebie: I know it is a textbook example ...num was n before I changed it. I think the single letter names take any context out of it and makes one force oneself to follow the control-flow.
<bluebie>
oh yeah
cbuxton has joined #ruby
<n_blownapart>
but is this a good example to study scope? bluebie banisterfiend ?
<n_blownapart>
I was struggling with how line 11 works. ^^
<banisterfiend>
n_blownapart: not really
cbuxton has quit [Client Quit]
t47227 has quit [Remote host closed the connection]
locriani has quit [Remote host closed the connection]
t36663 has joined #ruby
<n_blownapart>
banisterfiend: because the method definition is named the same, does the method hold its own scope?
<bluebie>
n_blownapart: I imagine when you call c.num ruby thinks something like "this is allowed, but only if self.is_a?(c.class)"
<banisterfiend>
n_blownapart: named the same as what?
<bluebie>
basically checking if the class in which the code is running is a relative of the class of the object you're calling the protected method on
<banisterfiend>
n_blownapart: @num and num are not the same name
<banisterfiend>
one has an @ in front
<bluebie>
@anything means an instance variable, so they are completely different and ruby doesn't think about them in the same way - if a method and an instance variable are named the same aside from the @ this makes no difference to ruby - they are strictly not related
<n_blownapart>
banisterfiend: yeah, but I was thinking since the method merely holds a value, I thought that @num was basically changing scope.
<bluebie>
the method doesn't hold the value, the instance variable does
<bluebie>
the method just grabs the instance variable and returns it's contents
<banisterfiend>
n_blownapart: i dont know what u mean...:P you're using the word 'scope' in a really weird way
<bluebie>
the instance variable is held in the object
M- has joined #ruby
<bluebie>
so, when you go C.new, it makes a place in memory which stores all the instance variables, and also says what class it's for, and that's your instance
<bluebie>
A class contains methods, an instance contains instance variables and a pointer to the class they go with
<n_blownapart>
I guess I mean the scope when the method num is called on c (c2) banisterfiend
<banisterfiend>
n_blownapart: i really think you need to buy the book "learn to program" by chris pine
<bluebie>
an object never, however, has a unique method with it's own unique values - methods are always in classes
<banisterfiend>
n_blownapart: it'll help you get the right mindset, and after you've got that, you can move on to books like david a black's, etc
<n_blownapart>
banisterfiend: oh shit. ok I'll get a hard copy. I have the pdf but can't use it on a laptop.
sebicas has left #ruby [#ruby]
mparodi has joined #ruby
<banisterfiend>
n_blownapart: you'll probably just be able to skim it really quick
voodoofish has joined #ruby
<banisterfiend>
n_blownapart: just fill in a few gaps, wont take long to get up to speed i think
Monie has quit [Ping timeout: 244 seconds]
<n_blownapart>
yeah I did peter coopers book last year...most of it banisterfiend I was eager to get on to something tougher.
tomsthumb_ has joined #ruby
reactormonk_ has joined #ruby
mparodi_ has quit [Ping timeout: 240 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
reactormonk_ is now known as reactormonk
<n_blownapart>
but thanks. but really the problem with this prog (and the insight I got) was that it was typical to name a method def. the same as all the identifiers. I still don't see the wisdom of this.
<n_blownapart>
banisterfiend: bluebie ^^
v0n has quit [Ping timeout: 265 seconds]
lledet has left #ruby [#ruby]
<bluebie>
n_blownapart: Giving them both the same name makes it easy to see they're related when you read it, but you are right in thinking it makes it easier for a typo to give your program an entirely different meaning
<bluebie>
n_blownapart: I'd really recommend playing in irb all the time - it's great for figuring out stuff like this by experimenting and playing
<n_blownapart>
bluebie: yeah like on line eleven you have the method on one side of the operator and the argument on the other sharing the same name.
<bluebie>
n_blownapart: you can use semicolons instead of new lines to do stuff like classes all at once, creating little disposable ones and poking at them to see how they react in different situations
<reactormonk>
n_blownapart: or even use pry
<n_blownapart>
yeah thanks bluebie I use pry as per banisterfiend 's exortation
<banisterfiend>
hehe
<bluebie>
yeah, pry is a fancy alternative to irb with a bunch of great features
<bluebie>
I should use pry more :P
<bluebie>
always forget it exists!
<banisterfiend>
bluebie: which features do you use?
QKO_ has joined #ruby
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
<bluebie>
it should be the default in the next MRI I think!
<bluebie>
banisterfiend: none, because I keep forgetting about it :)
<T-Gunn>
#passenger hasnt been active for the past few hours.. im trying to make Passenger ignore a directory.. i added the PassengerEnabled off inside of a <Directory> to a conf file on my server that is included in the main httpd.conf (using cpanel) i have restarted apache and i still get the same error.. am i missing something?
<n_blownapart>
bluebie: what was it about this prog. that you learned from? maybe you could shed some light on it.
<bluebie>
I'd pretty much be happy with anything which doesn't freak out when I resize my terminal though
<banisterfiend>
bluebie: i dont really care too much about that, people have been telling me to get it made the default, but really having it as a 'gem' is easy enough
<bluebie>
maybe I should alias irb to pry in bash xD
<bluebie>
oh pry is your creation?
ameck has joined #ruby
<banisterfiend>
bluebie: yeah
gokul has quit [Quit: Leaving]
<bluebie>
n_blownapart: I never really knew how 'protected' worked, now I see it's usefulness
mohits has joined #ruby
<n_blownapart>
bluebie: oh cool. banisterfiend well pry's indenting is better, isn't it?
<bluebie>
I've never been particularly interested in protecting and privating methods tho so I never payed much attention
<bluebie>
everything in pry is better :P
havenn has joined #ruby
QKO has quit [Ping timeout: 240 seconds]
<n_blownapart>
pry is easier to read with colors/indenting , for one. banisterfiend bluebie
freeayu__ has quit [Ping timeout: 260 seconds]
locriani has quit [Ping timeout: 240 seconds]
gen0cide_ has quit [Quit: Computer has gone to sleep.]
<bluebie>
yay
<bluebie>
okay aliased irb to pry
<bluebie>
so now I can't forget and can get properly addicted!
MeTRaLHa__ has joined #ruby
randomau_ has quit [Read error: Connection reset by peer]
aantix has joined #ruby
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
andrewhl has quit [Remote host closed the connection]
freeayu has joined #ruby
adeponte has joined #ruby
jasonLaster has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
digitalcakestudi has quit [Ping timeout: 244 seconds]
Bosma has quit [Ping timeout: 272 seconds]
jarred has quit [Quit: jarred]
artOfWar has joined #ruby
cloud|droid has joined #ruby
Banistergalaxy has joined #ruby
artOfWar_ has joined #ruby
banisterfiend has quit [Ping timeout: 246 seconds]
gatortater has joined #ruby
<Axsuul>
Fundamental question: would 100 threads use the same memory imprint as 1 thread?
jgrevich has quit [Quit: jgrevich]
reactormonk has quit [Ping timeout: 276 seconds]
<bluebie>
Axsuul: No way
<Axsuul>
bluebie: is there any way to measure how much memory each thread consumes?
artOfWar_ has quit [Remote host closed the connection]
Tomasso has quit [Read error: Operation timed out]
<Axsuul>
bluebie: well, its close isnt it? the only thing that differs is each thread would have a different heap?
<bluebie>
graph ruby's memory usage with different numbers of threads?
<bluebie>
it depends on the host OS too (as of ruby 1.9)
Monie has joined #ruby
artOfWar has quit [Ping timeout: 240 seconds]
<Axsuul>
ubuntu
<bluebie>
IDK
<bluebie>
my undersanding is the reason threads are slow is a whole bunch of memory has to be allocated to them
n_blownapart has quit [Remote host closed the connection]
<bluebie>
as well as switching in and out registers and things when context switching
<bluebie>
event loop webservers have taken off recently because threads just aren't performant or efficient when speed or memory usage are important
<bluebie>
but I don't have any specific numbers or anything beyond speculation
<bluebie>
do some tests!
<burgestrand>
156 K on my system
<burgestrand>
No, that’s, hm. Probably way less.
<bluebie>
per thread?
<burgestrand>
28K for the first new thread
<burgestrand>
… and that’s measuring in irb so I’d expect it to be a bit lower
<Axsuul>
bluebie: hmm ok, arent webservers beginning to go back to concurrency? (i.e. puma)
<burgestrand>
When I did it in pry it became 156 :p
<Axsuul>
I know rails 4.0 will be threadsafe! by default
choffstein has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
AlbireoX_ is now known as AlbireoX
<bluebie>
just a shame iOS is turning out to be such a shit platform
banisterfiend has joined #ruby
chare has joined #ruby
<bnagy>
jruby y u no build?
<bnagy>
great - moved all my prod onto jruby, now gotta move it all back cause of dumb bugs :P
<arubin>
bluebie: How is it a shit platform?
Banistergalaxy has quit [Ping timeout: 260 seconds]
<eridani>
which bugs?
<bluebie>
I can't deal with how verbose objc is, or how apple seems to think these patchwork little language updates will fix what makes objective c so annoying to work in. Methods with named arguments are nice, but the order and presence of them is enforced, so it's just more typing - it's realistically unusable without an autocompleting IDE
<bluebie>
xcode crashes so often it has a special feature where it can catch a crash and offer to just keep running regardless
<bnagy>
intermittently, with 3 different ffi based gems
<bnagy>
trying to build off git but ant is failing
<bnagy>
ooh wait... maybe not that time :D
<bluebie>
apple seems to be making no moves to make the platform more developer friendly - they seem to be acting as control freaks just for the sake of personality even when there's no benefit to iOS users in them doing so
<bluebie>
playing with a Microsoft Surface tablet prototype was such a breath of fresh air
<bluebie>
it's as if microsoft doesn't hate their developers. Nothing in the docs felt oppositional
<gatortater>
sorry to interrupt. looking for some assistance with rvm. tried joining #rvm to no avail.
uris has quit [Quit: leaving]
noyb has joined #ruby
<banisterfiend>
bluebie: literals have made things easier in objc
<bluebie>
and the one glimmer of hope I had that they might fix at least some of the issues with iOS disapeared when Laurent Sansonetti left apple to found rubymotion. They should have made that product themselves, but instead they're dicking around with @[] operators and bullshit like that
<banisterfiend>
bluebie: object literals
reactormonk has joined #ruby
Takehiro has joined #ruby
ryanf has joined #ruby
\13k has quit [Quit: gg]
yasushi has joined #ruby
<bluebie>
objective c is to iOS what coffeescript is to node.js - it makes things a bit nicer, but the illusions of working in a nice dynamic language shatter frequently with painful results
<bnagy>
but go ahead, someone might know. I warn you now - I really dislike rvm compared to rbenv
<bnagy>
just my personal opinion though
<gatortater>
hm. first i've heard of rbenv
<banisterfiend>
bluebie: i just think ruby wouldn't be performant enough
yasushi has quit [Remote host closed the connection]
<banisterfiend>
bluebie: they need to use something like objc
<bluebie>
rubymotion is roughly as performant as objective c for a lot of stuff
<bluebie>
it compiles math very similarly
<bluebie>
it doesn't use GC, it's all ARC-style memory management
<bnagy>
gatortater: I don't respond in /query, sorry dude
<bluebie>
the object and class system in ruby is pretty similar to objective c - they're similarly dynamic
<bnagy>
it's for the best - gives other people a chance to jump in and help
<bluebie>
you can write physics engines in ruby and things like that just fine
<banisterfiend>
bluebie: we'd have to see benchmarks to know for sure, but my guess ruby could never be as fast as objc, and performance is important to them
<bluebie>
the only thing they're struggling a little with is cyclic loops in memory management, but @lrz says he has some ideas on how to fix that
<gatortater>
ok. still learning the do's and don'ts of irc. as well as figuring out cygwin and ruby on rails
<bluebie>
I disagree - I think user experience is important to apple, and performance is a part of that - but spend five minutes with a winmo 7 device and you see pretty quickly that architecture makes more different to smoothness than cpu speed or language choice
<bnagy>
cygwin...rails :<
SCommette has quit [Quit: SCommette]
<bluebie>
I think a language like ruby would make developers faster and happier, and give them more time to focus on the important stuff, the user experience stuff.
<banisterfiend>
bluebie: well 'macruby' already exists and a number of people are using it..
<bluebie>
macruby doesn't have a lot of the optimisations rubymotion has (yet)
<bluebie>
macruby for instance is garbage collected
<gatortater>
i find my face mimics that emoticon more and more diving into this
<bluebie>
lrz says he's going to try and backport some of the improvements though
<banisterfiend>
bluebie: then believe him :)
gatortater has quit []
<bluebie>
man, that surface tablet was really compelling
gatortater has joined #ruby
<bluebie>
I was shocked
<bluebie>
it's so rare for microsoft to make something good
reset has joined #ruby
scant has joined #ruby
banisterfiend has quit [Remote host closed the connection]
jarred has joined #ruby
<gatortater>
bnagy: cygwin no good for this ruby on rails?
<bluebie>
gatortater: y u no linux?
mike4_ has quit [Quit: bbl]
havenn has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<gatortater>
cygwin came recommended by a friend. however, he uses a macbook pro and only offered it as a suggestion
ananthakumaran has quit [Quit: Leaving.]
Jackneill has joined #ruby
Jackneill is now known as Guest42311
<gatortater>
some tutorials suggest cygwin as well
aantix has quit [Quit: aantix]
havenn has joined #ruby
reactormonk has quit [Ping timeout: 276 seconds]
yasushi has joined #ruby
<gatortater>
bluebie: should i look into a duel boot for linux?
<bnagy>
I thought rails ran natively
<bluebie>
if you're a windows person and you're having trouble running rails directly in windows, I'd be more inclined to setup a little linux VM than duel boot
<bnagy>
but I admit I have NFI I would never use it, even if I ever did webstuff :)
<bluebie>
you can bridge it across that way and use text editors in windows and access the webserver in the virtual machine
<bluebie>
another way you could do it which might be cute is to get a raspberry pi and make a mini devserver :)
<shaman42>
and very mini devserver it would be
<bluebie>
it runs ruby pretty well!
<bluebie>
and hey it's like $40 to setup so that's pretty cool
<bluebie>
I have one downstairs thinking about household chores :)
<bnagy>
dual boot is so last century
<shaman42>
40 + sdcard + case + charger + ...
<bluebie>
since the ffi guys patched their gem to work better on arm everything seems to be working great
mahmoudimus has joined #ruby
<bluebie>
the raspberry pi is $35
<bluebie>
a little sd card you probably already have, but if you don't five bucks would easily get you one
<gatortater>
hm. lots for me to research. duel booting is something i did first year of college. wild times they were.
<bluebie>
case? who needs one!
chare has left #ruby [#ruby]
zeromodulus has joined #ruby
<bluebie>
and charger is just a usb port on a tv or phone charger or something like that
<bluebie>
gatortater: It's a bit better these days - the linuxes have matured quite a bit
mahmoudimus has quit [Client Quit]
<bluebie>
sadly the only thing I really loved in linux was gnome 2
<shaman42>
thats the normal mantra bluebie ( i have rasberry pi too)
<bluebie>
so now I am a mac person
<bluebie>
mac's have plenty of unix to go around though, so it's a relatively happy safe space
stdev has joined #ruby
<shaman42>
I have 10 or something phone chargers in my household and only one is suitable for rasberry pi.
quazimodo has joined #ruby
<quazimodo>
how do I loop from 2012 to 1995
<quazimodo>
or from 52 to 1
<shaman42>
I didnt have sd-card big enough for rasberry pi as I dont play with toycameras
<bluebie>
I'm running my pi off a charger only rated for 500ma but it's worked fine
azm has quit [Ping timeout: 240 seconds]
<bluebie>
the pi is supposed to require 700ma, so, whatever, I guess the charger can do more than it's specs say
<bluebie>
or the pi is very tollerant
<bluebie>
quazimodo: how about (1995..2012).to_a.reverse.each
jorge has quit [Remote host closed the connection]
<quazimodo>
bluebie: oh ok. Also, how come 8.downto(1).each do |i| doesnt work?
<quazimodo>
also what does to_a do?
<bluebie>
converts the range to an array
<bluebie>
makes it easier to reverse it!
<quazimodo>
hrmm
<bluebie>
8.downto(1).each do |i| puts i end works for me?
<bluebie>
what's it not doing for you?
<quazimodo>
oh i was doing
<quazimodo>
8.downto(1).each do |i|
<quazimodo>
i
<quazimodo>
end
<bluebie>
oh you want it as an array?
<bluebie>
8.downto(1).to_a will give you that
<scant>
i'm looking for a library with a c version of all those handy ruby functions, e.g. gsub. does such a thing exist?
<bluebie>
or if you want to transform the numbers in to something else use map instead of each
<bluebie>
checkout the docs for Enumerator for info on all the neat stuff you can do with it
<quazimodo>
bluebie: im a ruby noob :(
<bluebie>
quazimodo: Enumerator is cool! You'll love it!
<bnagy>
Enumerable, probably
reactormonk has joined #ruby
banisterfiend has joined #ruby
<fowl>
scant: String#gsub() is a c function, what are you saying?
igotnolegs has quit [Quit: Computer has gone to sleep.]
locriani_ has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
thone has joined #ruby
joephelius has quit [Quit: WeeChat 0.3.8]
wobr has joined #ruby
thone_ has quit [Ping timeout: 276 seconds]
bluefish_ has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
xorigin has joined #ruby
_zxc__ has quit [Quit: Page closed]
jarred has quit [Quit: jarred]
Speed has joined #ruby
shadoi1 has quit [Quit: Leaving.]
Criztian has joined #ruby
mneorr has joined #ruby
ryanf has quit [Quit: leaving]
berserkr has joined #ruby
cloud|droid has quit [Quit: Leaving]
eldariof has joined #ruby
freeayu has joined #ruby
apeiros_ has joined #ruby
cirwin has quit [Ping timeout: 276 seconds]
lampe2 has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 244 seconds]
berserkr has quit [Quit: Leaving.]
berserkr has joined #ruby
<quazimodo>
guys
freeayu has quit [Read error: Connection reset by peer]
<quazimodo>
I did rvm use gemset global
<quazimodo>
how do I go back to what it was before that (i've no idea what it was)
lampe2 has quit [Client Quit]
lampe2 has joined #ruby
micha_ has joined #ruby
lampe2 has quit [Client Quit]
<tagrudev>
quazimodo, by default it should be global
cezar has joined #ruby
<quazimodo>
then why doesnt pry work anymore
freeayu has joined #ruby
mneorr has quit [Ping timeout: 276 seconds]
nilg has joined #ruby
<quazimodo>
nvm
ringotwo has joined #ruby
<tagrudev>
probably because you have installed it in a different gemset
greenysan has joined #ruby
haxrbyte has joined #ruby
micha_ has quit [Quit: Leaving]
M- has quit [Quit: This computer has gone to sleep]
lampe2 has joined #ruby
n1x has joined #ruby
cezar has quit [Quit: Leaving]
freeayu has quit [Read error: Connection reset by peer]
Beoran__ has joined #ruby
mneorr has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
Morkel has quit [Quit: Morkel]
ph^ has joined #ruby
freeayu has joined #ruby
peterhellberg has joined #ruby
mneorr has quit [Ping timeout: 244 seconds]
Vert has joined #ruby
ringotwo has quit [Remote host closed the connection]
lkba has quit [Quit: Bye]
n1x is now known as Guest35217
Speed is now known as Guest32434
elaptics`away is now known as elaptics
jastix has joined #ruby
CodeFriar has joined #ruby
charliesome has joined #ruby
CodeFriar has quit [Ping timeout: 272 seconds]
mneorr has joined #ruby
zii has quit [Read error: Connection reset by peer]
zii has joined #ruby
iori has quit [Remote host closed the connection]
Guest32434 is now known as Speed
Speed has quit [Changing host]
Speed has joined #ruby
xbayrockx has joined #ruby
mneorr has quit [Ping timeout: 276 seconds]
mklappstuhl has joined #ruby
lampe2 has quit [Quit: Leaving]
lampe2 has joined #ruby
qwerxy has joined #ruby
<fowl>
praise apeiros_ , grand liberator!
<apeiros_>
o0
<apeiros_>
just cleaning out the closet…
<Mon_Ouie>
What does it mean when someone is banned by barjavel.freenode.net?
<fowl>
they will speak of this day for generations, the day that hundreds were forgiven their exile
deryl has quit [Quit: deryl]
tech|survivor has joined #ruby
<heftig>
fowl: that doesn't make sense
<heftig>
fowl: you could say "their sins"
Banistergalaxy has quit [Ping timeout: 245 seconds]
<banisterfiend>
fowl: dont put up with your english being corrected by a german
<apeiros_>
Mon_Ouie: I think from time to time the banlists get reinstated by freenode
<apeiros_>
no idea why and when it happens and it's annoying as hell
Banistergalaxy has joined #ruby
<Muz>
Happens after outages of services like Nickserv, and netsplits iirc.
t80972 has quit [Remote host closed the connection]
<apeiros_>
also I'm totally missing a comment/reason to go with a ban
<fowl>
heftig: it doesnt have to make sense, it just has to sound like it could have happened for people to believe it
<Muz>
Along with a multitude of other edge cases in the IRCd.
t64168 has joined #ruby
<Muz>
s/Nick/Chan/
workmad3 has joined #ruby
freeayu has quit [Ping timeout: 240 seconds]
<fowl>
heftig: man lives in whales stomach for 3 days surviving on god's love, etc
Tobsn has joined #ruby
<quazimodo>
im surprised how little traffic there is in #rails
<Muz>
quazimodo: because you want #rubyonrails.
<apeiros_>
quazimodo: that's because it's the wrong channel…
<heftig>
fowl: no, i mean your sentence had a problem, not what you mean
<quazimodo>
im retarded
<heftig>
fowl: either "forgive" is the wrong verb or "exile" the wrong object
<quazimodo>
:/
<fowl>
your sentences have problems, go keep the EU afloat, kraut
<banisterfiend>
fowl: hehe
<apeiros_>
fowl: please, no insults
<quazimodo>
cant even speak in that one :/
qwerxy has quit [Quit: offski]
specialGuest has joined #ruby
zii has quit [Read error: Connection reset by peer]
<Mon_Ouie>
You need to register your nick for that
berserkr has quit [Ping timeout: 260 seconds]
markprovan has joined #ruby
freeayu has joined #ruby
<banisterfiend>
Mon_Ouie: do you care about your parentheses matcher or did you just do it on a dare
<Mon_Ouie>
I like having it
Banistergalaxy has quit [Ping timeout: 252 seconds]
<banisterfiend>
Mon_Ouie: do you think kyrylo has fully recovered or do you think he still holds a grudge against you (for doing it b4 him)
EddieS has joined #ruby
Banistergalaxy has joined #ruby
EddieS is now known as Guest78821
jenrzzz has joined #ruby
<apeiros_>
oh
<Mon_Ouie>
I think he's fine
mengu has joined #ruby
<banisterfiend>
Mon_Ouie: do you dare fully think kyrylo monkey puzzle tree goes back to the triassic grudge against you matcher fully
berserkr has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
Speed has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has joined #ruby
kaiwren has joined #ruby
Morkel has joined #ruby
<apeiros_>
o0
<apeiros_>
monkey puzzle tree? triassic grudge?
<matti>
;-)
<chare>
hi
<matti>
Monday.
<matti>
Sheesh.
<chare>
can you hear me?
<matti>
Hi, yes.
<matti>
Roger.
<banisterfiend>
chare: I doubt your masculinity now after your beautiful poem last night. Are you a dandy?
<matti>
LOL
<chare>
you've been drinking too much alcohol
<matti>
banisterfiend: ;p
<banisterfiend>
chare: do you remember that poem you write? it was very delicate, almost feminine
<banisterfiend>
wrote*
<matti>
There was a poem here?
<banisterfiend>
chare: Yeah, chare wrote a poem last night
<chare>
i need to know how to integrate accepting bitcoins into rails
<JonnieCache>
banisterfiend: come on this is the ruby channel. if there's anywhere on freenode where we dont have to compel people to fit themselves into static types its here
<JonnieCache>
;)
xorox90 has joined #ruby
<banisterfiend>
JonnieCache: hehe nice play on words
<banisterfiend>
matti: here was chare's poem: Ruby i love blocks they do |every| every.thing().and() end Ruby if "you and i".split() "then #{self} alone" else ["we", "will"].join end
iori has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
<matti>
banisterfiend: Oh nice!
<matti>
chare: I am touched ;-)
<chare>
bitcoins
freeayu__ has joined #ruby
<chare>
answer my question about bitcoins
fastred has joined #ruby
<matti>
Haha
<banisterfiend>
matti: he's being coy
<apeiros_>
…
m104 has joined #ruby
<matti>
banisterfiend: And needy ;)
Takehiro has quit [Remote host closed the connection]
<chare>
apeiros_ i know you know the answer to my bitcoin question
freeayu has quit [Ping timeout: 272 seconds]
<matti>
;-)
<fowl>
chare: bitcoins arent green no matter what you say
<chare>
how is color green relevant here
tatsuya_o has joined #ruby
<banisterfiend>
green oh how i love you green, horse on the hill, ship on the ocean
zz_chrismcg is now known as chrismcg
<matti>
chare: He was thinking about $$ green.
Speed has joined #ruby
<matti>
banisterfiend: Lol
<fowl>
chare: we are debating the color of bitcoins? its not a question, they're blau
haxrbyte_ has joined #ruby
<matti>
banisterfiend: I sprayed coffee all over my desk
<chare>
fowl: just tell me how to accept bitcoins in rails
m104 has quit [Client Quit]
<fowl>
chare: you must receive a Rails Revelation, do this by laying down on your local railroad tracks until you become Two, then you will Know.
<chare>
fowl: you know you can't out troll me
<banisterfiend>
chare: i'll tell you if you write another poem, this time about the color green
<fowl>
not trolling, srs suggestion for your life direction
<banisterfiend>
Over the face of the cistern the gypsy girl was swaying. Green flesh and green hair, with eyes of cold silver.
<chare>
i'm going to make my website that accepts bitcoins and i'm banning your ip fowl
<chare>
how do you like that
<fowl>
i dont want your ugly blue coins anyways
mengu_ has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
haxrbyte has quit [Ping timeout: 276 seconds]
* apeiros_
checks
<apeiros_>
no, not #kindergarten
t64168 has quit [Remote host closed the connection]
t72690 has joined #ruby
Takehiro has joined #ruby
eighty4 has quit [Excess Flood]
<fowl>
apeiros_: in kindergarten nobody gave you weird looks when you informed them that you have to use the restroom
<fowl>
someone will have written skynet in java by then
<Pip>
lol
<Pip>
chare, What will make them revivie successfully?
<chare>
need for speed
heftig has quit [Ping timeout: 240 seconds]
<Pip>
:D
<Pip>
You know what? 10 years from now on, quantum computing will be realized
<Pip>
By then, speed will be no problem at any time
<Muz>
Maybe then we'll have systems that can recognise people talking crap on the Internet before it happens, and pre-emptively silent them.
<apeiros_>
that day will be a silent day
freeayu has joined #ruby
<Pip>
haha
<fowl>
muz = the establishment
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
mengu_ has quit [Remote host closed the connection]
|ivan| has joined #ruby
jastix has quit [Quit: Leaving]
ProT-0-TypE has joined #ruby
zii has joined #ruby
<bnagy>
Pip: jruby 64 bit works on 7
<bnagy>
and afaik is still the only option for 64 bit
<apeiros_>
OO
<apeiros_>
ouch
<bnagy>
windowsinstaller / devkit work
<bnagy>
in wow32
<bnagy>
apeiros_: yeah it's the devkit bit that's hard, apparently
<apeiros_>
well, I don't feel sorry
<bnagy>
and the usual native stdlib suspects
<fowl>
devkit is simple to install
<fowl>
just read the directions
<Pip>
bnagy, Is jruby amazing?
socialist has quit [Ping timeout: 246 seconds]
<chare>
what exactly does jruby do?
<bnagy>
well it's unamazing me with some bugs at the moment, but I'm running of git
<JonnieCache>
chare: its a ruby interpreter implemented on the jvm
<bnagy>
fowl: it's the native 64 bit support that's the issue, not installing
<chare>
doesn't ruby already have an interpreter written in C, why does another one exist
<fowl>
o
<peterhellberg>
I was under the impression that JRuby is the Ruby VM with the least problems under Windows… But who am I to say, wiped my last Windows installation back in 2003
<JonnieCache>
well jruby gives seamless integration with java code
<peterhellberg>
chare: It’s just an alternative, that happens to leverage the impressive JVM
<Muz>
peterhellberg: well, other than the pain of setting up Java on Windows, and getting things into your path properly etc.
<bnagy>
chare: because it's faster, has better parallelism, access to java libs and better portability :>
t72690 has quit [Remote host closed the connection]
<JonnieCache>
and it also sidesteps several limitations of MRI, the standard C interpreter
<fowl>
mri works fine on windows
<JonnieCache>
arguably foremost amongst them the GIL
t21795 has joined #ruby
<bnagy>
Muz: there is 0 pain now, the jruby installer has a with jvm option
<chare>
so you're saying its faster than the original interpreter, guys working on original interpreter really dropped the ball on that one?
<Muz>
Faster at certain things and has the wonderful position of having forethought.
<JonnieCache>
its not really as simple as that
<bnagy>
yeah it's also soooper slow to start up
<Muz>
It has different features to the C interpreter though. Like the C interpreter allows for native extensions with C, jRuby allows for native interactions wtih Java.
<Muz>
bnagy: nailgun sorts that out mostly.
yuriy has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<bnagy>
but jruby is definitely the easiest install on windows atm
<Muz>
Never really had any problems with the Ruby Windows Installer
<Muz>
.
<Squarepy>
^
<bnagy>
and has a good ffi, which more or less covers everything I care about
<bnagy>
Muz: rubyinstaller + devkit is just more complicated to install, it's not a value judgement, just a statement of fact
<Muz>
bnagy: it is? It's a single Nullsoft installer executable last time I checked.
<bnagy>
the fact that I can do both without getting my dick caught in the ceiling fan doesn't mean the difference doesn't exist
fermion has joined #ruby
<Muz>
bnagy: what's actually more complicated about the Windows Installer?
socialist has joined #ruby
<bnagy>
the devkit install
<bnagy>
and some nitpicking about they way they do paths, but that's again only relevant for devkit
<Muz>
Isn't the devkit just extracting an archive file? Or have they managed to royally fuck that up.
<bnagy>
extract, run an init, run a setup
<Muz>
Although that said, whilst not complex, it's often confused me why this isn't just shipped and installed via the Windows Installer.
<bnagy>
indeed
<chare>
OMG INSTALLING RUBY ON LINUX...
<chare>
nothing could be more painful
<ccooke>
chare: what's so hard about apt-get install? ;-)
<bnagy>
the fact that it doesn't work?
<ccooke>
(</troll>)
<bnagy>
for sensible definitions of work
<chare>
uhh apt-get install doesn't work for ruby
<chare>
you gotta go through rvm shit
* bnagy
looks around for Hanmac
<hoelzro>
chare: what do you mean "apt-get install doesn't work for ruby?"
<ccooke>
chare: there's an argument to be had over what sensible should be defined as, in this case.
<hoelzro>
what about it doesn't work for you?
<ccooke>
hoelzro: indeed.
<chare>
you explain to me why ruby has this rvm shittery
apeiros_ has quit [Ping timeout: 245 seconds]
freeayu has quit [Ping timeout: 245 seconds]
<ccooke>
I use the system ruby for pretty much everything I do. It's perfectly adequate for my needs
<bnagy>
as long as your needs don't involve, like, professionally coding in ruby
<ccooke>
bnagy: Incorrect
<bnagy>
or as long as you're running quantal
<ccooke>
I do, in fact, do professional coding in ruby. And I'm running precise.
<hoelzro>
chare: rvm exists so that a) people can try out different versions/implementations of ruby, and b) so people can use a consistent version of Ruby for application development without worrying out the vendor's Ruby
<fowl>
if you dont believe a woman should have the right (and be encouraged) to `abort mission' take a long hard look at chare
<chare>
another way of saying that they fucked up the language so now you have multiple incompatible versions of the language
<hoelzro>
chare: out of curiosity, what's your programming background?
<ccooke>
the issues with ruby pckaging are mostly problems with the ruby community being too dev-centric and not actually caring about end users (Okay, that *is* a trollish statement. It's one that I believe is true when I'm irritated,though)
khakimov has quit [Quit: Computer has gone to sleep.]
sspiff has quit [Remote host closed the connection]
perryh is now known as perryh_away
kaiwren has quit [Quit: kaiwren]
<JonnieCache>
nah i reckon thats pretty much true, depending on who you define as the end users
<hoelzro>
chare: it's not just for Ruby versions; it's also for dependencies
<JonnieCache>
and if you add the word "enough" between "caring" and "about"
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
<ccooke>
JonnieCache: yeah
<ccooke>
I've found a lot of developers in language communities - not just ruby - fundamentally don't get why distro packaging exists and is good for users
ph^ has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
<chare>
ccooke: thats why they also make shitty user interfaces
freeayu has joined #ruby
cloud_droid has joined #ruby
cloud|droid has joined #ruby
cloud|droid has quit [Remote host closed the connection]
fish_ has joined #ruby
<fish_>
hi
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
maesbn has quit [Remote host closed the connection]
Foxandxss has joined #ruby
mrdodo has quit [Remote host closed the connection]
<chare>
conversation died
nazty has joined #ruby
mrdodo has joined #ruby
diegoviola has joined #ruby
specialGuest has quit [Ping timeout: 244 seconds]
<diegoviola>
hi
<bnagy>
everyone decided everyone else was trolling, all at the same time
<diegoviola>
what's the difference with executing a rake task from your code in order to process a background job versus using something like resque for background processing? I understand that resque uses fork() to fork a child process and rake will create a new process, but what's the difference?
<JonnieCache>
resque is a whole queueing system which can manage fleets of workers and stuff
ph^ has joined #ruby
AxonetBE has joined #ruby
locriani has quit [Ping timeout: 272 seconds]
<JonnieCache>
github built it, its the full works.
<AxonetBE>
I have an anoying issue because when I do this Date.new(2008, 02, 29).change(:year => 2011), I got invalid date because of the 28/29 days of february, how to fix this?, I thought ruby was taking this in account
mklappstuhl has quit [Ping timeout: 268 seconds]
<JonnieCache>
spawning a rake task is, well, just spawning a rake task
LouisGB has joined #ruby
<JonnieCache>
youre just using the convenient rake system to define and fire the task, everything else you have to do yourself
t21795 has quit [Remote host closed the connection]
<JonnieCache>
so theyre suitable for different scenarios
t36891 has joined #ruby
<diegoviola>
right, thanks
graspee has quit [Quit: leaving]
<bnagy>
AxonetBE: that's not ruby, it's probably rails retardedness
mrdodo has quit [Ping timeout: 245 seconds]
<JonnieCache>
AxonetBE: surely thats correct though because there was no 29th of feb 2011
<JonnieCache>
it is an invalid date
Squee- has joined #ruby
<AxonetBE>
JonnieCache: Yes I know, but how to do it then?
<AxonetBE>
add a rescue and add −1 date?
gregorg has quit [Read error: Connection reset by peer]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<bnagy>
well it depends what you want to actually do
<JonnieCache>
give it a valid date basically? i dont really understant
<bnagy>
what does changing a year mean?
<bnagy>
that's why I think it's a stupid API
<JonnieCache>
its just mutating a date object whats stupid about that
<bnagy>
adding 365.25 * 3 to it?
<bnagy>
it's stupid because you _can't_ just change the year part of a date and expect to always get a valid date
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<bnagy>
and the guys that wrote the API can't predict how you want to handle that error
<fowl>
cant you add days
cantonic has joined #ruby
<fowl>
to a date
<bnagy>
that's what I'd probably do
specialGuest has joined #ruby
<bnagy>
but I dunno what the logic is being used for
<JonnieCache>
bnagy: its kind of fair enough of them though. dates are notoriously rife with edge cases and its unfair to expect the api designers to handle them
<JonnieCache>
because they are potentially infinite
Guest42311 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<bnagy>
soooo... don't write an api like that then?
Banistergalaxy has quit [Ping timeout: 276 seconds]
<fowl>
question: i get errors when I do X solution: try to avoid doing X
<JonnieCache>
doctor doctor it hurts when i raise my arm!
nazty has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
mklappstuhl has joined #ruby
<matti>
Hm.
<banisterfiend>
matti: ;]
<matti>
banisterfiend: :)
<matti>
banisterfiend: We should have #rubypoems ;]
<shevy>
Pip also I don't think it will work for you
Seich has joined #ruby
<quazimodo>
so i need to use DAYNAMES eh
<shevy>
quazimodo well convert that number
Axsuul has quit [Ping timeout: 244 seconds]
<Pip>
shevy, What do you mean?
answer_42 has quit [Quit: WeeChat 0.3.8]
<shevy>
Pip it follows a scheme that is not common
<Pip>
D:\Program Files\jruby-1.7.0.preview2
Seich has quit [Client Quit]
<shevy>
ok so you use windows
<Pip>
this is my desired path, is that okay?
<Pip>
Yep, Win 7
<shevy>
I suppose so
<quazimodo>
shevy: i get it
<bnagy>
shevy: u r genious! how u kno?
<shevy>
I don't use windows often anymore, I usually use linux
<shevy>
bnagy in the past I thought I could memorize everything
<Apathetic>
what distro shevy
<shevy>
these days... I don't memorize anything and only write down stuff so I dont have to remember
rizzy_work has quit [Ping timeout: 246 seconds]
<shevy>
Apathetic Gobolinux! but it kinda died :(
<Apathetic>
for development shevy?
<shevy>
Apathetic yeah
<shevy>
well
<bnagy>
shevy: in the past I thought I could memoize everything
<shevy>
I used windows only because of the games
<bnagy>
but then I ran out of RAM :(
answer_42 has joined #ruby
Jake232 has joined #ruby
<answer_42>
lisp
<shevy>
but the games all seem to be similar these days... who has the better 3D engine
<JonnieCache>
Pip: try and avoid a path with spaces in it
<JonnieCache>
that causes problems i hear
<shevy>
note that Pip's path follows the gobolinux convention pretty much
<shevy>
where hardcoded /Programs could be replaced by $PROGRAMS, pointing to "Program Files", and the program_name-program_version jruby-1.7.0.preview2 could be split into an array with two components ["jruby","1.7.0.preview2"]
<Apathetic>
ah yeah, it says WEBrick/1.3.1 on the header
Seich has joined #ruby
<shevy>
"This will fire up an instance of the WEBrick web server by default (Rails can also use several other web servers). "
Squarepy has quit [Read error: Connection reset by peer]
<chare>
uh how do I connect rails to the outside world where my web app isn't just a sql database
Squarepy has joined #ruby
sspiff has joined #ruby
<chare>
rails feels like as soon as you try to do something outside of the norm its impossible to figure out how to do it
<shevy>
oh no chare can talk again :(
<JonnieCache>
chare: how would you normally do it?
clocKwize has joined #ruby
heftig has quit [Read error: Connection reset by peer]
<chare>
so if i have a graph database
<chare>
how do i hook up to it
<chare>
i've asked this before
<chare>
and no one could answer
heftig has joined #ruby
<JonnieCache>
depends what graph database
<JonnieCache>
remember you can throw whatever code you like into app/models it doenst have to be activerecord classes
<workmad3>
chare: not only does it depend what graph database, it depends on how you want to hook up to it...
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
<chare>
rails normally does this magic mapping of the model to the database, what syntax do i use if i don't use sql then
<workmad3>
chare: for example, if you used neo4j, you can either use it through the REST api, or you can have it embedded directly in your app (requires jruby)
<workmad3>
chare: that's a completely different question
<chare>
oh fuck i need to understand REST?
Squarepy has quit [Read error: Connection reset by peer]
<ccooke>
chare: REST is pretty easy
<workmad3>
chare: are you even using neo4j? remember I was just giving an example
cloud_droid has quit [Quit: Leaving]
<chare>
in my views i reference variables that are in fact part of the model class and map to sql data, you're saying if i use neo4j through REST that this magic mapping will still work?
<workmad3>
chare: there are other grapd dbs out there after all, and they have different mechanisms for communication
<JonnieCache>
chare: all that mapping stuff is the preserve of activerecord. if youre not using activerecord it doesnt come into it
<workmad3>
chare: hell, you can class RDF triplestores as graph DBs and they're typically queried through SPARQL
<workmad3>
(or you can use the RDF.rb stuff for it)
pskosinski has joined #ruby
<chare>
if magic mapping is coming from activerecord, then does that mean the controller class should just wing the rpc code to neo4j and populate instance variables for the view to use and do this all unmagically?
<workmad3>
chare: and please stop talking about 'magic mapping'
<JonnieCache>
chare: pretty much
<workmad3>
chare: it's not 'magic'... it's just a bit of table introspection
<chare>
MAGIC THE GATHERING
specialGuest has quit [Ping timeout: 244 seconds]
karakedi has quit [Ping timeout: 252 seconds]
<CodeFriar>
If I have class A include Module B, shouldn't the Constants defined in class A be available to Module B ?
<hoelzro>
CodeFriar: no, unless you explicitly say A::CONSTANT
<banisterfiend>
CodeFriar: yes they should
<CodeFriar>
ok, well thats one for and one against ...
<CodeFriar>
they're working in my rspec tests
<CodeFriar>
just not in my functional tests
<banisterfiend>
CodeFriar: are you using class_eval at all?
<CodeFriar>
no
cloud|droid has joined #ruby
jaylevitt has joined #ruby
<banisterfiend>
they wont be available through a class_eval
<banisterfiend>
well, they should def. be available because constants are looked up in the ancestor chain
<banisterfiend>
CodeFriar: so stick a binding.pry in there and see what's going on
<banisterfiend>
in your test where they're not being looked up
<CodeFriar>
yeah, when i throw pry into the mix I definately do not have the constants
<hoelzro>
oh, I see. I read the problem wrong.
<banisterfiend>
CodeFriar: well first it's spelt *DEFINITELY*
<banisterfiend>
for fuck sake
<banisterfiend>
CodeFriar: second, do a bunch of YourClass.ancestors
<banisterfiend>
to see if it's actually mixed in
<banisterfiend>
and check whether the constants are in fact defined on the module
rohit has joined #ruby
<CodeFriar>
banisterfiend: sorry for the spelling, still on my first cup o' coffee.
<banisterfiend>
:)
<CodeFriar>
the constants are defined in class A
<CodeFriar>
and referenced in Module B that *is* mixed in.
<banisterfiend>
CodeFriar: can you gist your session proving that? and proving that you cant access it, etc, and proving that the constants are defined on module u'r emixing in
<CodeFriar>
banisterfiend: sure, I can post my session showing the ancestor chain, and that the class is defining the constants referenced in the module
<banisterfiend>
CodeFriar: k00
<fowl>
Apathetic: thats hella docs
<Apathetic>
fowl, i only did gem install rails
<banisterfiend>
Apathetic: do htis --no-ri --no-rdoc
<fowl>
rails is huge lulz
<Apathetic>
around 1gb?
<Pip>
shevy, :D
adeponte has quit [Remote host closed the connection]
<JonnieCache>
put the line "gem: --no-rdoc --no-ri" into ~/.gemrc and you'll never have to see that bullshit again
<JonnieCache>
there was SO MUCH drama on this one github issue where the rubygems devs were refusing to make that the default
k_89 has quit [Ping timeout: 244 seconds]
<shevy>
because they are girls
<JonnieCache>
*rolleyes*
<fowl>
JonnieCache: if it was the default, would the option to enable it be gem: --yes-rdoc --yes-ri ?
<JonnieCache>
no it would obviously be --rdoc --ri
<Pip>
Is there x64 version of RubyInstaller
<bnagy>
no
<bnagy>
did we not just cover this? :)
dpk has joined #ruby
<Pip>
Oh, right :-)
<bnagy>
if you need native 64 bit then use jruby
<fowl>
Pip: im high too, dont worry (;
<bnagy>
but tbh you probably don't
<JonnieCache>
fowl: that gem: line in .gemrc just gets passed as arguments to every execution of the gem binary. --no-rdoc and so on are normal flags to that bin
<banisterfiend>
CodeFriar: what is f.all ? and also the constant it's complaining about not finding is defined on User itself, not on the mixin, no?
chare has quit [Quit: Leaving]
<CodeFriar>
banisterfiend: yes, it's defined on the User class not hte mixin. thats what i've been saying
<bnagy>
hahah f.all
<Pip>
I just had dinner, the brain lacks of oxygen
<bnagy>
Math.sqrt( f.all? )
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<CodeFriar>
f.all is is just calling all on the f (user) object
linoj has joined #ruby
<fowl>
JonnieCache: its hella useful btw, i tried to look through gems doc to find how to do that but as I looked around me at the text on the wall i became incredibly bored and forgot where I was.
<fowl>
tl;dr thats a gem
<Apathetic>
i can't find gemrc on my windows installation,
swair has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Client Quit]
bluenemo has quit [Read error: Connection reset by peer]
<banisterfiend>
CodeFriar: oh, i got it round the wrong way, not the constants are not available :)
<banisterfiend>
no the*
liluo has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<CodeFriar>
anything I can do to make that pattern work ?
sepp2k1 has quit [Quit: Leaving.]
<banisterfiend>
CodeFriar: self::Constant
<fowl>
CodeFriar: write an included? that uses const_get/set
<CodeFriar>
fowl: could you say more ?
radic has quit [Disconnected by services]
radic_ has joined #ruby
<banisterfiend>
CodeFriar: self.class::Const i mean
<Apathetic>
ah it's located elsewhere
radic_ is now known as radic
<JonnieCache>
Apathetic: you have to make the file
<JonnieCache>
Apathetic: dont know where it should be under windows though
<fowl>
CodeFriar: i would iterate over the constants when its included and copy them, but i've been told that my code is perl-ish
nwest has quit [Quit: Computer has gone to sleep.]
<shevy>
your code is not perlish
<shevy>
you omit the ()
<shevy>
def foo arg
graspee_ has quit [Read error: Connection reset by peer]
cantonic has quit [Read error: Connection reset by peer]
<fowl>
only on occasion, you need the ()s to do one liners
Banistergalaxy has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
<CodeFriar>
banisterfiend: thanks! self.class::CONST works. Rspec whines about it being accessed as a top-level constant but ... it works.
<banisterfiend>
that's ruby not rspec whining, right?
<Apathetic>
JonnieCache, how do I check if that gemrc was loaded mate?
<Apathetic>
I placed it in ~/.gemrc
<JonnieCache>
check that the options you put in there are being honored I guess?
<JonnieCache>
i dont think theres an explicit way to check
hamstar has joined #ruby
<Apathetic>
hmm okie.
<JonnieCache>
if youve put that `gem: --no-rdoc --no-ri` line in there then just install a gem and you shouldnt see all that stuff about documentation
<JonnieCache>
Belieber: the method is called empty? there is no method empty without the ?
<rking>
fowl: Yeah, that's why it's odd.
<Mon_Ouie>
Well, yeah; the #empty? method exists, no the #empty method
<JonnieCache>
in ruby methods that return true or false generally end in a ? but its not enforced
<fowl>
Belieber: when this question comes up and im in pry, i think "ok, wtf is this `empty` method?" then like the l33t haxor i am i type "show-source fox.empty" and all my questions are answered (usually)
<fowl>
(pryrepl.org)
<rking>
Belieber: The trick here is that "?" is part of the method name. Imagine if it was a "q". ".emptyq" would not be weird. Now don't think of ".empty?" as weird.
andrewhl has quit [Remote host closed the connection]
<Belieber>
ah .empty?() works
<fowl>
also of value: show-doc String#empty?
<JonnieCache>
the () is optional
Tobsn has joined #ruby
<rking>
Optional and also uncool.
<Belieber>
thanks guys
awarner has joined #ruby
<Belieber>
ruby is for lazy typers eh?
<fearoffish>
can't be bothered to answer that
<rking>
Not about laziness. About omitting needless elements.
<JonnieCache>
yeah thats it. it even does the routes automatically, which is probably half the work facing peterhellberg if hes doing an api
specialGuest has quit [Changing host]
specialGuest has joined #ruby
erichmenge has joined #ruby
mklappstuhl has joined #ruby
<peterhellberg>
Yep, I’m using that plugin… Life would be even more miserable without it :)
RegEchse has joined #ruby
tomsthumb_ has quit [Quit: Leaving.]
bradhe has joined #ruby
<banisterfiend>
move this bs to #railsfags4life
radic has quit [Read error: Connection reset by peer]
v0n has joined #ruby
revans has joined #ruby
jasond has joined #ruby
digitalcakestudi has quit [Ping timeout: 240 seconds]
xbayrockx has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
* any-key
throws up rails gang sign
xbayrockx has joined #ruby
banisterfiend has joined #ruby
obryan has quit [Read error: Operation timed out]
* JonnieCache
imagines the rails crew inventing gang signs for themselves, thinking its really funny then all getting stabbed at sxsw
<rking>
Haha
obryan has joined #ruby
<any-key>
Austin rails devs, unite!
<fowl>
hlol
<any-key>
no other austin ruby bros in here?
bbttxu has quit [Quit: bbttxu]
* rking
= Lubbock.
<rking>
And I'll actually be in Austin this weekend.
<rcassidy>
b-austin (boston.)
<any-key>
rking: woot!
nilg has quit [Remote host closed the connection]
<any-key>
all the ruby action in texas is happening here
<tcopp>
transplated from austin.
<shevy>
rails ate ruby
<shevy>
it's official now
Apathetic has quit [Ping timeout: 244 seconds]
anybody has joined #ruby
<fowl>
>> ruby = Rails
<al2o3cr>
-e:1:in `eval': uninitialized constant Rails (NameError), from -e:1:in `eval', from -e:1:in `<main>'
companion has quit [Ping timeout: 276 seconds]
<any-key>
don't worry they fixed that in ruby 3.0
jorge_ has joined #ruby
gogiel has joined #ruby
imami|afk is now known as banseljaj
mklappstuhl has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
axl_ has quit [Quit: axl_]
deryl has quit [Quit: deryl]
k_89 has joined #ruby
macer1 has quit [Remote host closed the connection]
wargasm has quit [Read error: Connection reset by peer]
macer1 has joined #ruby
radic has joined #ruby
axl_ has joined #ruby
<any-key>
my new favorite thing is codepen.io
andrewhl has joined #ruby
<any-key>
jsfiddle is neat too, but I like codepen's UI
\13k has joined #ruby
digitalcakestudi has joined #ruby
<any-key>
also, I'd like to wtf @ jruby's RAM needs
<any-key>
I'd be screwed had my employer not given me 8GB of RAM
radic has quit [Disconnected by services]
radic_ has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<anybody>
is anybody there?
radic_ is now known as radic
BlakeRG has left #ruby [#ruby]
<peterhellberg>
any-key: But to be fair, the JVM use all the memory you give it… right?
<any-key>
basically
<any-key>
it's fast, I can't deny that
<any-key>
BUT it has a ridiculous startup time
banisterfiend has quit [Read error: Connection reset by peer]
<any-key>
great in production, a PITA for local dev
Araxia has joined #ruby
banisterfiend has joined #ruby
areil has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
ctp_ has joined #ruby
davidroy has joined #ruby
wargasm has joined #ruby
<davidroy>
someone know whats wrong with my syntax here… sports.map{|sport| [sport.id, sport.children.map{|ch| ch.map(&:id), ch.name.map(&:id)}} . or know of a better way to get all id values from a 3d object
<hoelzro>
davidroy: what error do you get when you execute that?
ctp has quit [Ping timeout: 240 seconds]
verto is now known as verto|off
<peterhellberg>
any-key: You can use NailGun for faster startup time
<davidroy>
varies between needing a extra ] which i don't know where. Or 1.9.2p290 :001 > sports.map{|sport| [sport.id, sport.children.map{|ch| ch.map(&:id), ch.name.map(&:id)}}
lianoshana_ has quit [Quit: This computer has gone to sleep]
<ridgehkr>
OS X 10.7.4
wvms has quit [Quit: wvms]
<ridgehkr>
anyone able to help?
<any-key>
"You have to install development tools first."
mohits has quit [Remote host closed the connection]
<any-key>
have you done that?
<ridgehkr>
thank you, @any-key. Yes, i have installed Xcode and command line tools
<any-key>
okay cool
<ridgehkr>
using Xcode 4.4.1
<any-key>
looks like you need ffi.h
<ridgehkr>
how can i get that?
<any-key>
do you have macports or homebrew installed?
<ridgehkr>
i have homebrew
<ridgehkr>
and rvm
<any-key>
brew install ffi
<any-key>
try that
<ridgehkr>
ran that, got "Error: No available formula for ffi "
<any-key>
or libffi
<any-key>
I'm just guessing lol
<any-key>
yeah libffi is what you want
<ridgehkr>
i actually already have macports, ran that command, and got this. do i need to be concerned, or are things okay? http://hastebin.com/gisigokinu.pl
<mmitchell>
anyone here feel like helping me out with rvm issues? :)
<ridgehkr>
but i can't find mkmf.log
<any-key>
mmitchell: #rvm
sazboom has quit [Ping timeout: 246 seconds]
<mmitchell>
any-key: are you in that room now? I can't seem to join, instead get an error "#rvm Cannot join channel (+r) - you need to be identified with services"
mklappstuhl has quit [Ping timeout: 276 seconds]
peterhellberg has quit [Remote host closed the connection]
<Mon_Ouie>
You need to register your nick and identify
<Mon_Ouie>
See NickServ
<mmitchell>
ahh ok
<adac>
>> "a/b/c/d".split(/\/(.?+)\Z/)[0]
<al2o3cr>
(String) "a/b/c"
aaroncm has joined #ruby
<adac>
>> "a/b/c/d".split(/\/(.?+)\Z/)[1]
<al2o3cr>
(String) "d"
wobr has quit [Ping timeout: 252 seconds]
<mmitchell>
info mmitchell
radic has quit [Ping timeout: 245 seconds]
<mmitchell>
oops, Mon_Ouie how do I send the "info" command to the irc server?
<mmitchell>
or "register" etc.
<rcassidy>
adac: there is also rpartition
<JonnieCache>
type /msg nickserv help
<rcassidy>
>> "a/b/c/d".rpartition("/")
<mmitchell>
JonnieCache: cool thanks
<al2o3cr>
(Array) ["a/b/c", "/", "d"]
RichGuk has left #ruby ["WeeChat 0.3.3-dev"]
carloslopes has quit [Ping timeout: 240 seconds]
<adac>
rcassidy, looks cleaner :)
hadees has quit [Quit: hadees]
t73865 has quit [Remote host closed the connection]
t35494 has joined #ruby
erichmenge has quit [Quit: Be back later]
wargasm has quit [Ping timeout: 276 seconds]
<rcassidy>
adac: are you using it to get a filename or something from a path?
zeromodulus has joined #ruby
savage- has quit [Remote host closed the connection]
<adac>
actually it is a path, and i wnated to get back the last folder
<rcassidy>
cos then the File module might have some more responsible utilities
<JonnieCache>
for when you really need a string literal with lots of quotes in it
Muz has joined #ruby
<circlicious>
ok
rcj_ has joined #ruby
ddouglas has joined #ruby
n1x has quit [Remote host closed the connection]
xorigin has quit [Quit: leaving]
<ddouglas>
excuse me folks, where might I find the rails production log file?
<JonnieCache>
in the log directory of your rails app
<JonnieCache>
RAILS_ROOT/log/production.log
<ddouglas>
thanks
<JonnieCache>
if it isnt there something is wrong
hynkle has quit [Quit: Computer has gone to sleep.]
recycle has joined #ruby
<Hanmac>
and otherwise he should ask in a better channel
mahmoudimus has joined #ruby
mklappstuhl has quit [Ping timeout: 276 seconds]
<fearoffish>
wait, Ruby and Rails are the same thing, aren't they????
<Muz>
No.
<Muz>
Ruby is a langauage. Rails is a framework built using the Ruby language.
<fearoffish>
</sarcasm>
<fearoffish>
I thought the multiple ??? would have shown that ;-)
<Muz>
It's often hard to tell the idiots, trolls, noobs, and serious questions apart in here.
<fearoffish>
understood, my apologies :)
randomautomator has joined #ruby
krusty_ar has joined #ruby
qwerxy has quit [Quit: offski]
<Hanmac>
fearoffish it happends often that rails users wonder why some methods are not exist on plain-ruby too
shevy has quit [Ping timeout: 240 seconds]
<fearoffish>
yeah, that I've seen
<fearoffish>
which is why I teach my students Ruby first
ephemerian has joined #ruby
rking has quit [Ping timeout: 256 seconds]
adam__ has joined #ruby
benson has left #ruby ["Leaving"]
QKO has quit [Ping timeout: 240 seconds]
ProT-0-TypE has quit [Quit: Leaving]
qwerxy has joined #ruby
randomautomator has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
<Hanmac>
fearoffish: teach them C first ... then C++, then Ruby
<Hanmac>
and see how happy they are when they learned an "higher" language :P
<fearoffish>
hehe
randomautomator has joined #ruby
<fearoffish>
make them feel inadequate first, I get it
<fearoffish>
;)
<JonnieCache>
if i was teaching programming to noobs i'd alternate between lessons using rails and lessons using ARM assembly on an embedded board
QKO has joined #ruby
<JonnieCache>
i think that would give them a rounded view of the field :)
joast has quit [Quit: Leaving.]
<fearoffish>
you'd collect any sharp objects when they enter the room, obviously
<JonnieCache>
haha
savage- has joined #ruby
<JonnieCache>
arm assembly is much easier than x86 assembly
tomsthumb_ has quit [Quit: Leaving.]
<JonnieCache>
im not a bastard
<fearoffish>
haha
<Hanmac>
you mean any C# objects? XD
<fearoffish>
:)
aspiers has quit [Ping timeout: 252 seconds]
<JonnieCache>
seriously though i think thats a good idea. at the end of the course you could get the arm chips talking to the rails apps through json
<JonnieCache>
obviously the students would have to be fairly smart
<Hanmac>
ARM is cool, rails is not :P
<JonnieCache>
alright, sinatra, whatever
mohits has joined #ruby
whalesalad has joined #ruby
<whalesalad>
hey guys how do you do inline if/else? this is not working, "Admin" if user.admin? else "---"
lianoshana_ has quit [Quit: This computer has gone to sleep]
<JonnieCache>
condition ? trueval : falseval
<whalesalad>
is that the only way to do it?
<JonnieCache>
its called a ternery conditional
<whalesalad>
i've seen blah if x before
radic has joined #ruby
<whalesalad>
like the human readable variant
<JonnieCache>
i think you can do `if cond then foo else bar` perhaps
<JonnieCache>
its the `then` thats the weird bit
<fearoffish>
but 99% of debs understand ternary, so I'd use that
<fearoffish>
devs*
<JonnieCache>
also you can do `blahblah() if foo`
maletor has joined #ruby
<JonnieCache>
but you dont get an else
greenysan has quit [Ping timeout: 240 seconds]
<whalesalad>
dammit. I understand it as well but I am from the python world where you write sentences of code basically
<Hanmac>
whalesalad you could do "x if y" but in that form you cant use else
<whalesalad>
okay
<whalesalad>
cool, thanks guys
<fearoffish>
no need to 'dammit' me, jesus!
<whalesalad>
haha
und3f has joined #ruby
<JonnieCache>
`if x then y else z` is as close to a sentence as your going to get surely?
mneorr has left #ruby [#ruby]
yoklov has joined #ruby
<JonnieCache>
omg i just used to wrong form of you're
adeponte has joined #ruby
artOfWar has joined #ruby
<fearoffish>
yes you did, shame on you
<JonnieCache>
whats the name of that japanese thing called where you stick your sword through your stomach again?
<fearoffish>
you also failed to apostrophe the dont
<JonnieCache>
jesus that sentence wasnt up to much either was it?
<heftig>
harakiri
<whalesalad>
this works fine, user.admin? ? 'Admin' : ''
<whalesalad>
this does not work, if user.admin? then 'Admin' else ''
deryl has quit [Quit: deryl]
<whalesalad>
the sentence thing is not working hehe
<heftig>
or seppuku
<Hanmac>
JonnieCache if i had an ARM chip/system i would test my c++ gems :P
azm has quit [Ping timeout: 276 seconds]
<fearoffish>
sure it is: 'Admin' if user.admin?
<whalesalad>
fearoffish: the else bit.
<whalesalad>
i specifically need that empty string
<JonnieCache>
Hanmac: you have a phone, right?
<JonnieCache>
everyone has an arm system
luxurymode has joined #ruby
<fearoffish>
'' ||= 'Admin' if user.admin? maybe?
<JonnieCache>
ick
<Hanmac>
yeah ... but imo its not good enough to develop ruby stuff on it ...
<fearoffish>
haha
Agis__ has joined #ruby
<JonnieCache>
look
<JonnieCache>
fuck conditionals
<fearoffish>
okay, so it wasn't syntactically correct or pretty
<JonnieCache>
user.role.title_case
<Agis__>
hey, anyone here that's subscribed on DestroyAllSoftware screencasts?
<JonnieCache>
there we are
<davidcelis>
Agis__: plenty
<fearoffish>
JonnieCache: ++
<Agis__>
I was thinking to subscribe either in this or railscasts...
apok has quit [Quit: apok]
shevy has joined #ruby
<Agis__>
what do you think?
lianoshana_ has joined #ruby
<fearoffish>
I respect RailsCasts a lot
<JonnieCache>
the railscasts are great
Progster has joined #ruby
<JonnieCache>
if you get paid to do rails $9 a month is nothing for what you get
<davidcelis>
Agis__: both
<fearoffish>
if you want just rails, that is
<Agis__>
sure
deo_ has quit [Quit: Leaving]
xorox90 has quit [Quit: 전 이만 갑니다.]
<fearoffish>
PeepCode is good also
<fearoffish>
s/good/great
<davidcelis>
Agis__: Railscasts will help you get better at Rails. Destroy All Software will help you get better at software and architecting it
<JonnieCache>
yes peepcode is very indepth
Eldariof-ru has joined #ruby
rking has joined #ruby
urbann has joined #ruby
qwerxy has quit [Quit: offski]
mmitchell has quit [Remote host closed the connection]
artOfWar has quit [Remote host closed the connection]
tewecske has quit [Read error: Connection timed out]
artOfWar has joined #ruby
jasonLaster has joined #ruby
workmad3 has joined #ruby
mmitchell has joined #ruby
fuleo has quit []
choffstein has joined #ruby
<Agis__>
I see
m_3_ has quit [Read error: Connection reset by peer]
vitoravelino is now known as vitoravelino`afk
reactormonk has quit [Ping timeout: 245 seconds]
lampe2 has joined #ruby
kenichi has joined #ruby
pdtpatrick has joined #ruby
insecurlex has joined #ruby
joast has joined #ruby
yoklov has quit [Quit: computer sleeping]
m_3 has joined #ruby
adamkittelson has joined #ruby
geggam has joined #ruby
mramaizng has joined #ruby
<lampe2>
hey i wanne write a gem for a Learning Metadata Object short LOM. this are just some metadata fields like mp3tags but i wanne write them so that everybody how uses this can use it with there database. should i write a activedata, datamapper extension ?
digitalcakestudi has quit [Ping timeout: 265 seconds]
apeiros_ has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
havenn has quit [Remote host closed the connection]
deryl has joined #ruby
insecurlex has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
havenn has joined #ruby
bluenemo has joined #ruby
iori has joined #ruby
lurch_ has joined #ruby
apeiros_ has quit [Ping timeout: 265 seconds]
<lurch_>
hi, after doing a "bundle install --path vendor", how do i tell "bundle exec" to load gems from the "vendor" subdir?
pdtpatrick has quit [Remote host closed the connection]
reactormonk has joined #ruby
adac has quit [Ping timeout: 248 seconds]
ringotwo has joined #ruby
<fearoffish>
it should automatically
t35494 has quit [Remote host closed the connection]
<fearoffish>
it writes a .bundle file
Criztian has joined #ruby
bricker88 has joined #ruby
<fearoffish>
which it loads in
t90197 has joined #ruby
Guest93734 has quit [Remote host closed the connection]
<Paradox>
booobs!
Jackneill has quit [Read error: Connection reset by peer]
<shevy>
yes!
<lurch_>
fearoffish: thanks
hynkle has joined #ruby
vitoravelino`afk is now known as vitoravelino
tatsuya_o has quit [Remote host closed the connection]
mrsrikanth has joined #ruby
butblack has joined #ruby
qwerxy has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
butblack has left #ruby [#ruby]
bbttxu has joined #ruby
havenn has quit [Remote host closed the connection]
MarGarina has quit [Ping timeout: 244 seconds]
<devdazed>
hi all, im using net/smtp to send a message and in the message body I have something like "#{my_array.join('\n')" when the message is sent the line breaks seem to have been escaped. is there any way around this?
haxrbyte has quit [Remote host closed the connection]
carloslopes has joined #ruby
<workmad3>
devdazed: join("\n"), not join('\n')
carloslopes has quit [Client Quit]
carloslopes has joined #ruby
cirwin has joined #ruby
havenn has joined #ruby
davidroy has quit [Quit: davidroy]
<devdazed>
jesus, total brain fart. thanks workmad3
<workmad3>
devdazed: :)
mohits has quit [Ping timeout: 276 seconds]
_sazboom_ has joined #ruby
locriani has joined #ruby
apok has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
Niamkik has joined #ruby
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
havenn has joined #ruby
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
hadees has joined #ruby
alvaro_o has joined #ruby
andrewhl_ has joined #ruby
mrsolo has joined #ruby
<doherty>
This application uses ActiveRecord. I have an object with subnet_id, which is a foreign key. I need to search the foreign table for that item, get squid_proxy_id, which is also a foreign key, and get the object that squid_proxy_id refers to. I've never used ActiveRecord before - how can I do that?
mramaizng has left #ruby [#ruby]
elhu has quit [Ping timeout: 244 seconds]
<Hanmac>
doherty i think you are in the wrong channel ... try #rubyonrails
<davidcelis>
was about to answer, realized this is #ruby
elaptics is now known as elaptics`away
<doherty>
alrighty
andrewhl has quit [Ping timeout: 265 seconds]
havenn has quit [Ping timeout: 268 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<luckyruby>
heh, both of yours didn't work
<davidcelis>
honestly bro just do the split-map-join :P
<luckyruby>
so i combined both of what you guys had and ended up with http_response = http.response.gsub(/^\s+|\s+$/,'')
<Hanmac>
doherty: the problem is that there are ruby users that not uses ActiveRecord before ... but mostly rails users did
<doherty>
It's no problem. Thanks for the pointer
<cirwin>
luckyruby: gsub! is designed for this case
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
sdfasdf has joined #ruby
stkowski has joined #ruby
sdfasdf has left #ruby [#ruby]
v0n has joined #ruby
macmartine has joined #ruby
cj3kim has quit [Client Quit]
deryl has quit [Quit: deryl]
codabrink has joined #ruby
<codabrink>
What is the best way to convert a number to a string of that length of a specific character?
<wendallsan>
anyone have any experience with watir? I'm trying to navigate a site with some hidden elements that appear as you interact with a form on the page, but interacting with the form via watir doesn't seem to make the element visible, even though doing this manually does make the element visible.
<iamjarvo>
is there a way you can make it not headless and look at what its doing? also im guessing this is a javascript test did you specify that it is a js test
mklappstuhl has joined #ruby
greenysan has joined #ruby
<wendallsan>
iamjarvo: sure thing, let me just set the browser to something other than xvfb and try again
juarlex has quit [Read error: Connection reset by peer]
juarlex has joined #ruby
<macer1>
LOL
gmci has joined #ruby
<davidcelis>
>> print "ಠ_ಠ"
<davidcelis>
oh cmon
<davidcelis>
ಠ_ಠ
<macer1>
(ノಥ益ಥ)ノ ┻━┻
<macer1>
also I dont think print works
<macer1>
ruby have puts
<Hanmac>
"
<macer1>
>> puts "(ノಥ益ಥ)ノ ┻━┻"
<macer1>
o.O
<wendallsan>
iamjarvo: aha, you hit it on the head, there was a popup modal window thing coming up that wasn't happening when I was going through it manually as I'd proably already set a sesison cookie or something
<wendallsan>
iamjarvo: huge thanks
<fowl>
(づ。◕‿‿◕。)づ
cj3kim has joined #ruby
<iamjarvo>
wendallsan: anytime
<fearoffish>
awwwe, peek at you!
Jake232 has joined #ruby
qwerxy has joined #ruby
<davidcelis>
macer1: Of course Ruby has print
<davidcelis>
macer1: I used it above
ajones_ has joined #ruby
ltrujillo has joined #ruby
amiddleton has joined #ruby
tclayton_ has joined #ruby
<macer1>
>> print "srsly?"
<al2o3cr>
srsly?(NilClass) nil
<macer1>
>> puts "test"
<al2o3cr>
(NilClass) nil, Console: test
workmad3 has quit [Ping timeout: 248 seconds]
fastred has quit [Quit: fastred]
DuoSRX has quit [Remote host closed the connection]
\13k has quit [Quit: gg]
Agis__ has quit [Quit: Agis__]
insecurlex has joined #ruby
insecurlex has quit [Read error: Connection reset by peer]
<Hanmac>
fowl i have found an sexy fanart with holly short XD
banisterfiend has quit [Read error: Connection reset by peer]
<macer1>
...
<macer1>
cmon
fermion has quit [Quit: Computer has gone to sleep.]
<macer1>
bad bot
peregrine81 has joined #ruby
banisterfiend has joined #ruby
iori has quit [Ping timeout: 240 seconds]
voodoofish430 has joined #ruby
<lampe2>
hey i code a main file with a class lom and i got a subdirectory with a file called general.rb now i wanne use the methods in the lom class how can i do that?
<fearoffish>
require '../lom.rb' would do it
Squarepy has quit [Ping timeout: 240 seconds]
luxurymode has joined #ruby
havenn has joined #ruby
gen0cide_ has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
<Hanmac>
lampe2 no ... use require_relative "../lom.rb"
banisterfiend has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
<lampe2>
i got a LOM object this has for example a General object in it and Educational object. now i wanne say LOM.General.Title and this puts the title
rump has quit [Quit: rump]
haxrbyte has joined #ruby
havenn has joined #ruby
<shevy>
lol Hanmac
banisterfiend has joined #ruby
<doherty>
What does the nil method mean in "if @thing.nil?"
<shevy>
lampe2, usually what follows behind the . is the name of the method
monobit_ is now known as asteve
<shevy>
lampe2, so when you do foo.General then General() is a method. def General
sebicas has left #ruby [#ruby]
<shevy>
it's ugly to use upcase method name however
<shevy>
doherty, "if @thing is nil"
<shevy>
@thing = nil
johnlcox has quit [Ping timeout: 268 seconds]
<shevy>
or uninitialized
Araxia has quit [Quit: Araxia]
<shevy>
@thing = "some value" # @thing is not nil
<lampe2>
okay shevy but how i can than do lom.general.title ?
SeySayux has joined #ruby
<lampe2>
just def general.title ?
havenn has quit [Remote host closed the connection]
<doherty>
okay, I didn't recognize the word "nil" :P
haxrbyte has quit [Remote host closed the connection]
<shevy>
doherty it means nothing, or "does not exist", null, nada
<shevy>
niente
<shevy>
non existerano
<shevy>
hmm I am outta words now
<lampe2>
ohhhhhh
<lampe2>
thx shevy :D
GoGoGarrett has joined #ruby
fris has joined #ruby
<patient>
hey guys, i'm creating a ruby project and was wondering if it's a good practice to name both the class file on 'lib/' and the main file on 'bin/' after the project
<shevy>
how many "class files" do you have
<patient>
for now one
<patient>
it's a small project
<shevy>
if your project is called patient_likes_ruby
<shevy>
and you have a class called PatientLikesRuby
echobravo has quit [Ping timeout: 246 seconds]
<shevy>
then you have a directory called lib/ first
<shevy>
and inside that lib/ directory you will have a
<shevy>
patient_likes_ruby.rb files
<shevy>
and a
<shevy>
patient_likes_ruby/ directory
<Sou|cutter>
What's the right way to serialize and deserialize from a file with Marshal.dump ? I'm getting a Encoding::UndefinedConversionError Exception: "\xE8" from ASCII-8BIT to UTF-8 when I try to write a Marshal.dump of a hash that AFAICT contains all utf-8 strings and Time objects
<patient>
hm shevy :/ and what goes under the 'patient_likes_ruby/' dir?
<fris>
trying to use a gem to create github repos, it worked fine before, but now im getting an error http://pastie.org/4557678
<shevy>
patient the file with your class
hoelzro|away is now known as hoelzro
dhruvasagar has joined #ruby
<shevy>
damn freenode spam!
<patient>
for what i was peeking at github, i thought 'lib/patient_likes_ruby.rb' and 'bin/patient_likes_ruby.rb' was more the "ruby way" to do it
rump has joined #ruby
<shevy>
bin/ is simple
<patient>
the file on bin/ being what i call on terminal
hynkle has quit [Ping timeout: 256 seconds]
<shevy>
yes
<shevy>
patient, well I suppose if your project really just has one .rb file, you can put it into lib/
<shevy>
but for more than one, people will create a directory
<patient>
i see
cantonic has quit [Ping timeout: 260 seconds]
Takehiro has quit [Remote host closed the connection]
<patient>
if the project starts to grow, i should create a 'name_of_project/' dir and move my lib/ files there, then?
ras0ir has joined #ruby
<davidcelis>
patient: lib/file.rb should do one of two things. Declare a top-level class named after the file, or declare a module named after the file.
<patient>
right right
<shevy>
patient, yes, except for one base .rb file loading your other files
<davidcelis>
patient: If it declares a module and you'll be nesting classes or other modules inside of it, you should also make lib/module_name/ to declare nested shit.
<davidcelis>
patient: And this is recurisve, so if a nested module has other nested modules, continue making directories as needed.
t45105 has quit [Remote host closed the connection]
t36288 has joined #ruby
<patient>
thanks for the tip davidcelis, but my question is more where to put my "executable" file, the file responsible for instantiating stuff on 'lib/'
<patient>
the interface with the user, so to speak
und3f has quit [Ping timeout: 276 seconds]
<davidcelis>
patient: Executables go in bin/
<davidcelis>
name them whatever you want.
<davidcelis>
but you should exclude the .rb extension
<patient>
and there's nothing against having a project named 'test', a 'lib/test.rb' containing a Test class and a 'bin/test.rb' responsible for instantiating a Test object and doing it's business?
<davidcelis>
instead, have the top-line of the ruby file be a ruby shebang: #!/usr/bin/env ruby
<patient>
oh i see
bluenemo has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 265 seconds]
<davidcelis>
having a file extension on executables that you run from the command line is not typical
<patient>
right
<patient>
that was pretty helpful, thanks a lot davidcelis and shevy
<davidcelis>
and no, there is nothing against what you just described
<shevy>
yeah once you wrote two or three projects on your own, you'll understand it intuitively
<patient>
just moving from compiled languages, so it's still a bit weird to me
zemanel has quit [Quit: Remote hottie closed the connection]
rippa has joined #ruby
hynkle has joined #ruby
reset has joined #ruby
joephelius has quit [Ping timeout: 260 seconds]
brianpWins has joined #ruby
SCommette has quit [Quit: SCommette]
wallerdev has quit [Quit: wallerdev]
fris has quit [Quit: .]
arvidkahl has joined #ruby
s1n4 has quit [Quit: leaving]
<Sou|cutter>
maybe I have to File.open('foo', 'wb') instead of 'w'...
qwerxy has quit [Quit: offski]
ackz has quit [Read error: Connection reset by peer]
<doherty>
I have an array of objects, each with an attribute called name. How do I say "If none of the objects are named 'Bacon', then flip the pancakes"?
llaskin has joined #ruby
<llaskin>
anyone have experience with the ruby mysql class?
khakimov has joined #ruby
jimpsson has joined #ruby
broerd has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
<hoelzro>
doherty: you could probably use Enumerable#none?
<hoelzro>
ex. if objects.none? { |o| o.name == 'Bacon' } then flip_pancakes end
SeySayux has joined #ruby
SeySayux has quit [Changing host]
rump has quit [Changing host]
rump has joined #ruby
jgrevich has joined #ruby
apeiros_ has joined #ruby
azm is now known as Guest89825
dhruvasagar is now known as Guest5934
und3f has joined #ruby
kryptek_ has quit [Quit: changing servers]
<doherty>
So, that block will set o to each element in turn (that's what |o| means), and then runs the test "o.name=='Bacon'"
<hoelzro>
yup
johnlcox has joined #ruby
<doherty>
sweet
banisterfiend has quit [Read error: Connection reset by peer]
Axsuul has joined #ruby
Bosma has joined #ruby
<doherty>
Are the question and exclamation marks at the end of methods part of the method name, or is that a method modifier or operator or something?
broerd has left #ruby [#ruby]
banisterfiend has joined #ruby
<hoelzro>
doherty: part of the name
joephelius has joined #ruby
<hoelzro>
? means a predicate
<doherty>
Is there a convention for their use?
<hoelzro>
! means something "dangerous"
havenn has joined #ruby
<hoelzro>
which can range from mutating the given object
<hoelzro>
(ex. string.sub vs string.sub!)
<hoelzro>
or doing something "radical"
<hoelzro>
(ex. exit vs exit!)
hynkle has joined #ruby
<doherty>
okay, thanks
zburt has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
<zburt>
I have a method called "add_contact". I have a variable, foo, whose value is "add_contact". How can I use foo to call add_contact() (and pass in params)?
<hoelzro>
zburt: you can accomplish that with the send method
lurch_ has joined #ruby
<rcassidy>
ruby 1.8.5 makes me sad :(
<zburt>
hoelzro: send(foo, params) ?
Takehiro has joined #ruby
<hoelzro>
ex. obj.send 'foo'.to_sym, *params
Takehiro has quit [Remote host closed the connection]
t36288 has quit [Remote host closed the connection]
elhu has joined #ruby
<apeiros_>
no need for to_sym
ph^ has joined #ruby
t94086 has joined #ruby
<apeiros_>
but if you use a literal, use a symbol straight away.
<hoelzro>
oh? I wasn't aware of that!
<hoelzro>
awesome =)
<zburt>
Does send need to be called on an object
<apeiros_>
zburt: of course
<apeiros_>
zburt: *all* methods must be called on an object
havenn has quit [Ping timeout: 256 seconds]
<apeiros_>
methods without an explicit receiver are called on self
<apeiros_>
lampe2: line 10 should probably go into initialize?
<hoelzro>
also, your def general method definition is redundant
<hoelzro>
attr_accessor supplies that for you
rippa has joined #ruby
Speed has joined #ruby
erichmenge has joined #ruby
<lampe2>
if have updatet it still nilclassmethod when i do: l = Lom.new; l.general ??? the code: https://gist.github.com/3406631
<hoelzro>
lampe2: try l = Lom::Lom.new
stopbit has quit [Read error: Connection reset by peer]
<Speed>
How does one get the number after the decimal point without rounding on a float? For instance 2.4 -> 0.4. My solution was to do "n - n.to_i" or divmod(1), but that isn't accurate
<Speed>
or should I use big Decimal
erichmenge has quit [Client Quit]
<lampe2>
hoelzro, in my main i got includeed lom so this is not the error the nilclasserror comes when i call general
kenichi has quit [Remote host closed the connection]
t94086 has quit [Remote host closed the connection]
rlb3 has joined #ruby
t95477 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
Speed is now known as Guest61094
mikepack has joined #ruby
coyo has quit [Changing host]
coyo has joined #ruby
k_89 has quit [Ping timeout: 272 seconds]
banseljaj is now known as imami|afk
fermion has quit [Quit: P]
n1x has joined #ruby
ringotwo has quit [Remote host closed the connection]
tomsthumb_ has joined #ruby
echobravo has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
cj3kim has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
tommyvyo has quit [Read error: Connection reset by peer]
Sgeo_ has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
tommyvyo_ is now known as tommyvyo
burgestrand has joined #ruby
havenn has joined #ruby
hemanth has joined #ruby
wargasm1 has joined #ruby
Guest61094 is now known as Speed
lianoshana_ has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
tomsthumb_ has quit [Client Quit]
wargasm has quit [Ping timeout: 276 seconds]
Sgeo has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
burgestrand has quit [Ping timeout: 240 seconds]
graspee has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
havenn has quit [Ping timeout: 245 seconds]
ringotwo has joined #ruby
Bosma has quit [Ping timeout: 240 seconds]
qwerxy has joined #ruby
PapaSierra has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
maletor has joined #ruby
verto is now known as verto|off
Jake232 has quit [Read error: Connection reset by peer]
Bosma has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
seich_ has joined #ruby
mike4_ has joined #ruby
mrsrikanth has quit [Quit: Leaving]
banisterfiend has quit [Read error: Connection reset by peer]
<atmosx>
aloha
banisterfiend has joined #ruby
wallerdev has joined #ruby
kenichi has joined #ruby
elux has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
<davidcelis>
atmosx: not sure if saying hello, or goodbye
<atmosx>
well hello :-)
shadoi has quit [Quit: Leaving.]
<shevy>
aloha is the traditional greeting of the sugar daddies
<atmosx>
I lost almost a week reading about SQLite3 design to end up with 3 tables in 1 sqlite3 db.
<shevy>
then comes the hip swinging
<shevy>
yay!
Jake232 has joined #ruby
adac has joined #ruby
<atmosx>
add the festivities I've written 0 lines in almost 6 days… and if you had asked me when I created mr_sqlite.rb I was sure that it will be ready in aprox 3 hours
<atmosx>
sugar daddies?
paolooo has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<shevy>
atmosx, I think you have the sugar daddy shape already
<shevy>
lots of beer
erichmenge has joined #ruby
Stalkr_ is now known as Stalkr_brb
erichmenge has quit [Client Quit]
<atmosx>
hehe I don't drink beers
<atmosx>
I drink coca-cola
specialGuest has quit [Changing host]
specialGuest has joined #ruby
macer1 has quit [Remote host closed the connection]
erichmenge has joined #ruby
<atmosx>
I seriously want some goodies
<shevy>
what kind of goodies
<atmosx>
goodies is something like macdonalds
Stalkr_brb is now known as Stalkr_
t95477 has quit [Remote host closed the connection]
t25904 has joined #ruby
<atmosx>
only 5 times more tasty
<atmosx>
It's a Greek chain of fast food.
<atmosx>
Since pizza in Greece sucks big time, while in Chech Republic is comparable only with South Italian pizza
<atmosx>
I'll go junk-food
<atmosx>
and I finnished my db design which is *normalizatoin read&
SQLStud has joined #ruby
kenichi has quit [Ping timeout: 256 seconds]
rasbonics has joined #ruby
jrajav has joined #ruby
rasbonics has quit [Client Quit]
rasbonics has joined #ruby
johnlcox has joined #ruby
mikepack has quit [Remote host closed the connection]
JStoker has quit [Excess Flood]
banisterfiend has quit [Read error: Connection reset by peer]
pzol has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
Guest89825 has quit [Ping timeout: 268 seconds]
banisterfiend has joined #ruby
mikepack has joined #ruby
<diegoviola>
i'm iterating on a method like this: obj.some_method.each ... but sometimes that method would return nil so it will get me an error, what's a good way to workaround that?
<diegoviola>
sorry for the n00b question
<hoelzro>
(obj.some_method || []).each, perhaps?
und3f has quit [Ping timeout: 276 seconds]
ras0ir has left #ruby [#ruby]
opus has quit [Quit:]
<savage->
Array(obj.some_method).each { |x| ... }
<savage->
if obj.some_method returns nil, then Array(nil) => []
Progster has joined #ruby
berserkr has quit [Quit: Leaving.]
<diegoviola>
what will that do?
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
bradhe has joined #ruby
macmartine has joined #ruby
locriani has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
blazed has joined #ruby
wargasm1 has quit [Ping timeout: 245 seconds]
<diegoviola>
Array(obj.some_method).each <-- each will be run only if what returns is an array?
Tomasso has joined #ruby
bradhe has quit [Remote host closed the connection]
<hoelzro>
diegoviola: no, it'll convert the argument to an array
<hoelzro>
Array(nil) happens to return []
mikepack has quit [Remote host closed the connection]
<diegoviola>
oh
<diegoviola>
ty
<diegoviola>
very nice
<diegoviola>
thanks
qwerxy has quit [Quit: offski]
moshee has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
mikepack has joined #ruby
stopbit has quit [Read error: Connection reset by peer]
stopbit has joined #ruby
elhu has joined #ruby
Niamkik has quit [Remote host closed the connection]
yekta has joined #ruby
JStoker has joined #ruby
naz has quit [Read error: Connection reset by peer]
tchebb has joined #ruby
und3f has joined #ruby
QKO has joined #ruby
Guest5934 has quit [Ping timeout: 240 seconds]
jblack has joined #ruby
forrest has quit [Quit: forrest]
QKO_ has quit [Ping timeout: 245 seconds]
rlb3 has quit [Quit: rlb3]
rizzy has quit [Quit: Leaving]
IPGlider has joined #ruby
lianoshana_ has quit [Quit: This computer has gone to sleep]
tomsthumb_ has joined #ruby
atmosx has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
paolooo has quit [Ping timeout: 245 seconds]
obryan1 is now known as obryan
kenichi has joined #ruby
banisterfiend has joined #ruby
wpaulson has joined #ruby
johnlcox has quit [Quit: Computer has gone to sleep.]
cesurasean has joined #ruby
nilg has joined #ruby
macer1 has joined #ruby
macer1 has joined #ruby
macer1 has quit [Changing host]
<cesurasean>
where do i post to for this chan? is pastebin.com ok?
<apeiros_>
gist.github.com, pastie.org are the preferred
<otters>
"okay" is the perfect way to describe pastebin.com
<apeiros_>
pastebin still add riddled?
<otters>
yes
<shevy>
long live pastie.org!
<shevy>
and the otter. long live all the cuddly otters
blazed has quit []
<shevy>
whoa almost 700 folks here
tvw has joined #ruby
<shevy>
#python still leading on us... 1024 something there
* Hanmac
cross its fingers
cj3kim has quit [Quit: This computer has gone to sleep]
<Hanmac>
nooo :(
<lampe2>
hmpffffffffffffff
<shevy>
#perl at 640
<shevy>
hah!
<lampe2>
i cant get this thing to work...
<shevy>
surprising to see python having so many more people tho
<shevy>
lampe2 why not
<shevy>
lampe2 do you have CLARITY IN YOUR MIND what you want
Eldariof59-ru has joined #ruby
<Hanmac>
ruby it more "cute" then python ... but its "mean"er too :P
v0n has quit [Ping timeout: 246 seconds]
<otters>
ruby is less shit than python
<lampe2>
shevy, what i want is this: when i do l = Lom.new than i can do something like that l.general.title = " title" and if i only do l.general.title it return the title
<diegoviola>
ruby <3
lianoshana_ has joined #ruby
<diegoviola>
do you guys like rubinius?
<diegoviola>
:D
<Mon_Ouie>
Then make l.general return some object (it's vague what it's supposed to represent) that has a title accessor
gentz has quit [Ping timeout: 272 seconds]
<diegoviola>
what do you think of it, do you use it?
<cesurasean>
im trying to find out how to fix this error with an app im trying to install; http://pastie.org/4558176
<Mon_Ouie>
It's funny they abbreviated tons of things (to_str, to_sym, dup, …) but not that
<cesurasean>
can someone assist me real quick??
johnlcox has joined #ruby
<lampe2>
OMG it works
<lampe2>
thx Mon_Ouie
Guedes is now known as Guedes_out
mklappstuhl has quit [Ping timeout: 276 seconds]
cool has joined #ruby
cool has joined #ruby
cool has quit [Changing host]
cool has joined #ruby
sepp2k has joined #ruby
<Mon_Ouie>
cesurasean: There's a version conflict. rake/tasklib.rb has been loaded from the gem and rake.rb from stdlib
hynkle has quit [Ping timeout: 252 seconds]
cantonic has joined #ruby
Morkel has joined #ruby
carloslopes has quit [Quit: Leaving.]
jasonkuhrt has joined #ruby
Juul has joined #ruby
Chryson has quit [Quit: Leaving]
gentz has joined #ruby
coyo has quit [Quit: Heaven is not a place, it's being with people who love you.]
banisterfiend has quit [Read error: Connection reset by peer]
<macer1>
matti: hey
davidcelis has quit [Quit: K-Lined.]
<jasonkuhrt>
Hi, I have a problem with heroku-mongo-sync, a plugin for the heroku cli, when the ruby script a rescue LoadError occures indicating that require 'mongo' failed, but when I try the same thing (require 'mongo') in irb, it seems to work, any help is much appreciated
<matti>
Hi macer1
banisterfiend has joined #ruby
<macer1>
can you try to help me with EM and bindata :D?
chriskk has joined #ruby
kristopolous has joined #ruby
hynkle has joined #ruby
jeff_sebring has quit [Quit: Leaving]
wpaulson_ has joined #ruby
<kristopolous>
so I want to do something like "module A; require 'file'; end" ... is there a way?
elhu has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
<apeiros_>
kristopolous: you can do just that. but it makes little to no sense.
<apeiros_>
what problem are you trying to solve?
jrajav has quit []
<kristopolous>
I have some solution where people can pull together multiple arbitrary ruby files
<kristopolous>
and it works ok so long as they don't contain the same class names
workmad3 has joined #ruby
<apeiros_>
that's what namespacing exists for
<apeiros_>
you namespace classes to avoid name collisions
<kristopolous>
right, but I don't want to transfer the problem to the users
katherinem13 has quit [Quit: katherinem13]
<kristopolous>
I would like to be able to wrap their code cleanly
<kristopolous>
and transparently
<cirwin>
kristopolous: you could eval the string loaded from the file
<cesurasean>
Mon_Ouie, how do i fix the version conflict then?
<cirwin>
that's what rackup files do
<apeiros_>
you won't make it easier for the user by coming up with an intransparent, non-idiomatic solution.
<kristopolous>
I've thought of that
<apeiros_>
use proper and tried ruby idioms.
<apeiros_>
reinventing the wheel here will lead to a worse solution.
<kristopolous>
right, but my users aren't necessarily rubyists
<kristopolous>
they just want to get things done
hynkle has quit [Ping timeout: 252 seconds]
wpaulson has quit [Ping timeout: 272 seconds]
<kristopolous>
so I want to make their lives as easy as possible
<TTilus>
kristopolous: what is your usecase?
wpaulson_ is now known as wpaulson
<cirwin>
kristopolous: give your users what they need, not what they want :
<cirwin>
:)
<kristopolous>
well this solution is a web-stack that enables people to build front-ends to large applications that run on custom rigs ... most of the people going in are EE or C/C++ people
mklappstuhl has joined #ruby
<kristopolous>
they probably are quite shaky with html/js/ruby etc
<cirwin>
EE?
<kristopolous>
electrical engineers
<cirwin>
cool
<TTilus>
kristopolous: what you are asking for, or rather what it sounds like, is not an easy one at all
johnlcox has quit [Quit: Computer has gone to sleep.]
<kristopolous>
for many of them, OOP would be a bit too much of a burden
<kristopolous>
or a hassle
<kristopolous>
or should I say, the smart ones don't have the problem I just described
<kristopolous>
I need to solve it for the other ones
cantonic has quit [Quit: cantonic]
yoklov has joined #ruby
<kristopolous>
anyway, eval is the thing in question
<TTilus>
kristopolous: how complex are the "front ends"?
<kristopolous>
is there much of a penalty?
<cirwin>
kristopolous: pry won't work unless you set the __FILE__ and __LINE__ right
mneorr has quit [Read error: Connection reset by peer]
BlakeRG has joined #ruby
axl__ has joined #ruby
<BlakeRG>
how do i check if a pattern matches in a regex? like this? if /MyRegEx/ =~ string
<SquirrelPoop>
Hi. new RoR (.NET converted) dev here. I would like to ask if there is anyone would be willing to share with me a chat-based resource where I could ask for assistance on some RoR-related issues?
recycle has quit [Remote host closed the connection]
<BlakeRG>
SquirrelPoop: join #rubyonrails
<SquirrelPoop>
Thank you BlakeRG.
<shevy>
BlakeRG that is reversed
<shevy>
x = "foo bar"
<shevy>
x =~ /a/
<shevy>
or in a conditional
SquirrelPoop has left #ruby [#ruby]
<shevy>
if (x =~ /a/)
<shevy>
or without () I suppose
<davidcelis>
~=
<davidcelis>
FTFY
<davidcelis>
er
Xpl01t has joined #ruby
<BlakeRG>
it looks like ~= is returning an integer
<davidcelis>
damn
<davidcelis>
i am totally off my game today
<shevy>
if x =~ /a/
<shevy>
I think you can omit the ()
<davidcelis>
BlakeRG: the integer returned is the index of the match
<Hanmac>
shevy: "string =~ regex" and "regex =~ string" both exist
<BlakeRG>
that equates to true though ?
<shevy>
hmmm
<shevy>
regex first?????
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
<shevy>
ok
<Hanmac>
>> /e/ =~ "abcde"
<al2o3cr>
(Fixnum) 4
<shevy>
this makes me want to slay kittens
answer_42 has quit [Remote host closed the connection]
Jake232 has quit [Read error: Connection reset by peer]
<davidcelis>
so "foo bar"["foo bar" =~ a] == "foo bar" =~ a
<shevy>
ready the sacrifice!
<Hanmac>
you mean that i was right again? :P
t39302 has quit [Remote host closed the connection]
<shevy>
it's a bug
<davidcelis>
well, i wrote that out wrong, but you get the idea
t79418 has joined #ruby
<shevy>
I swear the pickaxe never mentioned this
<Hanmac>
"foo bar".match(regex) is better when you want the currect matches
<davidcelis>
shevy: ?
<davidcelis>
shevy: =~ returns the index of the first match, or nil if no matches are found
<Hanmac>
dvidcelis: he means that he is confused because "string =~ regex" and "regex =~ string" both exist
<davidcelis>
ah
<shevy>
davidcelis, I am fine with the string =~ /regex/
<shevy>
but I hate the /regex/ =~ string thing
<Speed>
How does one subclass Integer/Fixnum? In essence I want to make a subclass where I could use the .new method to parse a specific string into a number
<shevy>
Must.Find.Kitten.Now
punkrawkR has joined #ruby
<macer1>
>> "abcde" =~ /e/
<al2o3cr>
(Fixnum) 4
<macer1>
404 kitten not found
<shevy>
lol
hoelzro is now known as hoelzro|away
<shevy>
I am content with just one
<shevy>
Speed, good question. Aren't Integers not real objects in ruby?
<Speed>
Integer is just a base for Bignum and Fixnum
<infinitiguy>
Hiya, I'm trying to build a gem into an RPM. I used gem fetch to get the source, used gem2rpm to build my spec, and when I run rpmbuild against the spec I get ruby-gems >= 1.3.7 is needed by ruby-gems-softlayer_api-1.0.5-1.noarch however rpm -qa shows me that it is already installed - rubygems-1.3.7-3.el5.kb.1
<infinitiguy>
anyone have any ideas as to where I might search next to find out what is holding things up? I'd think this shouldve worked.
<apeiros_>
(I'm generally much in favor of early raise, but this method is specifically to query the validity… only getting true in return and otherwise an exception is wrong IMO)
Seich has joined #ruby
cesurasean has left #ruby [#ruby]
bricker88 has quit [Ping timeout: 265 seconds]
_sazboom_ has joined #ruby
ringotwo has quit [Remote host closed the connection]
<machty_>
download it again, and it has new permissions
<RubyPanther>
permissions are in the file's metadata
<davidcelis>
WHAT DOES THIS SCRIPT DO
<machty_>
it puts "SHIT"
<machty_>
i'm juvenile with my filler
<davidcelis>
machty_: nice
sirecote_ has quit []
<machty_>
RubyPanther: where is metadata stored? not with the file, right? just as extra data in the filesystem right?
NightMonkey has joined #ruby
<RubyPanther>
in some filesystems this metadata exists in a different part of the filesystem and is opaque. Usually it is physically stored as part of the file.
<davidcelis>
pretty sure OSX handles it with the file
<eam>
it's stored with the inode
<shevy>
I store it in my pants
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
greenysan has quit [Ping timeout: 256 seconds]
<RubyPanther>
You're shouldn't have to worry about it beyond the abstract concept that files have metadata. And it is stored somewhere for you. By some command line tool or permissions dialog.
<eam>
tar only records basic permissions, not things like extended file ACLs
Squee- has joined #ruby
<NightMonkey>
Howdy. Is there a way to turn up verbosity in curb, when curb is called from Savon?
<machty_>
RubyPanther: right, but i think there's no guarantee that uploading and downloading the file will preserve those perms
<apeiros_>
mac os' classic os had a resource fork
<apeiros_>
and it's a shame that nobody copied the idea
<apeiros_>
it was way better than what we have now.
<eam>
apeiros_: they did - many filesystems have them
<machty_>
ANYWAY, the point is I don't think i can chmod the perms on a ruby file and expect it to be the same when my client downloads it
<RubyPanther>
machty_: that depends on the client. In my world, yes, metadata is always preserved.
<apeiros_>
eam: they put it into the file system, not the file
<eam>
apeiros_: I know
<eam>
as I said, the feature exists on many other filesystems
<apeiros_>
which is fine for metadata related to the filesystem, but not fine for metadata related to the file itself
bbttxu has quit [Quit: bbttxu]
<BlakeRG>
machty_: try gzipping the file before sending it up to s3
kuzushi has joined #ruby
<machty_>
BlakeRG: ah ha, that might do it
<RubyPanther>
There was a time, in the age of MS-DOS, when I would sometimes lose permissions during a file transfer and restore them by hand.
the_jeebster has joined #ruby
<davidcelis>
with your BEAR HANDS??
ackz has quit [Quit: Leaving.]
<shevy>
with his paws
<RubyPanther>
And CD-ROM disk can be rather annoying precisely because of preserved permissions.
<the_jeebster>
crazy. anyone seen this github binary visual diff addition?
<davidcelis>
the_jeebster: ?
<eam>
apeiros_: as I said, several filesystems provide unstructured storage for implementing things like resource forks
<eam>
xfs is one such example
<the_jeebster>
davidcelis: say you commit an image change, github has transitional sliders to visually differentiate the two files
<RubyPanther>
In the days when you had to set your modem's COM port and IRQ... by setting unmarked jumpers on various pin blocks
<the_jeebster>
pretty epic
<davidcelis>
the_jeebster: damn i hadnt noticed. that's pretty cool
<RubyPanther>
It only takes one long night of trial and error if you don't have the manual.
<davidcelis>
the_jeebster: now if only they'd make the news feed remotely fucking useful again
<the_jeebster>
yeah, newsfeed looks whack now
<machty_>
ok, thanks, i have a solution. but now even on my own mac with chmod +x, i can't just double click the .rb in Finder and ahve it run the script. it just opens XCode. even with chmod +x and shebang
<davidcelis>
the_jeebster: it's redundant with the notification center now. only watched repos show up there
<davidcelis>
or followed users
workmad3 has quit [Ping timeout: 240 seconds]
<davidcelis>
the_jeebster: there's no point in starring repos now other than popularity points
aaroncm has quit [Quit: Computer has gone to sleep.]
_sazboom_ has quit [Quit: EPIC5-1.1.4[1667] - amnesiac : jedi knights do it with force]
<lampe2>
my problem is i that i got a method that must take 1..10 parameter but if i give the method something like this ["test","test2"],"test","test","test","test","test","test",{:h => {:a => "test", :b => "test"}} it counts the h as 1 not as 2
<atmosx>
yes
<atmosx>
that's the good with flatten that returns an array
<Mon_Ouie>
lampe2: You can build a new hash, adding every pair in the initial hash, unless the value is a hash, in which case you merge on the result of the method called recursively
cantonic has joined #ruby
alanp has joined #ruby
nixmaniack has joined #ruby
krz has joined #ruby
pskosinski has joined #ruby
<lampe2>
my problem is i that i got a method that must take 1..10 parameter but if i give the method something like this ["test","test2"],"test","test","test","test","test","test",{:h => {:a => "test", :b => "test"}} it counts the h as 1 not as 2
<lampe2>
hups sry
asteve has quit []
_bart has quit [Quit: _bart]
dagnachewa has joined #ruby
jblack_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<atmosx>
y should it count h as 2?
n1x has quit [Ping timeout: 272 seconds]
alanp_ has quit [Ping timeout: 276 seconds]
<atmosx>
I'd count it as 8
<patient>
just curious, you guys use vim + terminal to run the test suite or a dedicated vim command/plugin? (the vim users ofc)
<atmosx>
err 7 if I strat from 0
<atmosx>
patient: I don't run a test suite
<patient>
that's a possibility too :)
jblack has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
x0F has quit [Read error: Connection reset by peer]
<atmosx>
patient: I just use vim, so I can't understand what are you reffering to. I didn't do any test-driven dev yet :-P
stkowski has quit [Quit: stkowski]
micha_ has joined #ruby
x0F has joined #ruby
tech|survivor has quit [Quit: WeeChat 0.3.8]
techsurvivor has joined #ruby
jenrzzz has quit [Quit: leaving]
<davidcelis>
patient: use vim to run your test suite? what?
jenrzzz has joined #ruby
<davidcelis>
why not just Rake::TestTask
jenrzzz has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
<patient>
hm, haven't learn about rakefiles yet
t47735 has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 240 seconds]
<patient>
i'm using 'rspec' in the terminal for now
ringotwo has quit [Remote host closed the connection]
t53084 has joined #ruby
<patient>
but you call 'rake' on terminal too, right?
<waxjar>
just copy paste the examples, really :P
ringotwo has joined #ruby
stopbit has quit [Quit: Leaving]
infinitiguy has quit [Quit: Leaving.]
<patient>
waxjar i never feel right with myself when i do it :P i need to understand it, at least the basics
lampe2 has quit [Ping timeout: 276 seconds]
ringotwo_ has joined #ruby
ringotwo has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
<Mon_Ouie>
I don't use vim, but surely you can just run the command that runs the tests without installing any plugin?
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
<patient>
sure Mon_Ouie, that's what i'm doing now ;) i was thinking if the fellow vimmers had a more integrated/optimized way of doing it
jenrzzz has joined #ruby
ladder4 has quit [Max SendQ exceeded]
jorge_ has joined #ruby
luxurymode has quit [Quit: Computer has gone to sleep.]
ladder4 has joined #ruby
qwerxy has joined #ruby
<lectrick>
Does stabby lambda allow -> do instead of ->{ ?
fantazo has joined #ruby
<lectrick>
ok seems it does based on my simple irb test case of "-> do end"
avalarion has quit [Quit: No Ping reply in 180 seconds.]
Johanna_Meszoros has joined #ruby
Jay_Levitt has quit [Ping timeout: 246 seconds]
dagnachewa has quit [Quit: Leaving]
Johanna_Meszoros is now known as avalarion
<davidcelis>
i love it when people answer their own questions
wereHamster has quit [Ping timeout: 245 seconds]
greenysan has quit [Ping timeout: 256 seconds]
krusty_ar has quit [Read error: Connection reset by peer]
ccooke has quit [Ping timeout: 240 seconds]
wereHamster has joined #ruby
mneorr has joined #ruby
micha_ has quit [Quit: Leaving]
cesurasean has joined #ruby
robbyoconnor has joined #ruby
<cesurasean>
How would I go about fixing this? - /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- json/add/rails (LoadError)
cantonic has quit [Quit: cantonic]
lampe2 has joined #ruby
dekz has quit [Ping timeout: 240 seconds]
ccooke has joined #ruby
krusty_ar has joined #ruby
krz has quit [Quit: krz]
juha_ has quit [Read error: Connection reset by peer]
dekz has joined #ruby
krz has joined #ruby
<lampe2>
Mon_Ouie, thx for your help
krz has quit [Client Quit]
krz has joined #ruby
Squee- has quit [Quit: This computer has gone to sleep]
opus has quit [Quit:]
<lampe2>
Mon_Ouie, thx for your help
<lampe2>
hups sry
jenrzzz has quit [Quit: brb uninstalling]
<Synthead>
is there a ruby builtin that will percent-escape ' ?
<Synthead>
sorry, ampersand (&) escape
jenrzzz has joined #ruby
Seich has quit [Ping timeout: 260 seconds]
t53084 has quit [Remote host closed the connection]
opus has joined #ruby
t51823 has joined #ruby
apeiros_ has quit [Remote host closed the connection]
mmitchel_ has quit [Remote host closed the connection]
<Hanmac>
or with "
<Hanmac>
>> puts "test'ing".gsub("'","\\\\'")
<al2o3cr>
(NilClass) nil, Console: test\'ing
<Mon_Ouie>
macer1: You realize / has no special meaning whatsoever?
<macer1>
ah
erichmenge has quit [Quit: Be back later]
<macer1>
my bad
tommyvyo has quit [Quit: Computer has gone to sleep.]
ged__ is now known as ged
<macer1>
>> require 'active_support'
<al2o3cr>
-e:1:in `eval': cannot load such file -- active_support (LoadError), from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<macer1>
>> `gem install active_support`
<al2o3cr>
/usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':, It seems your ruby installation is missing psych (for YAML output)., To eliminate this warning, please install libyaml and reinstall your ruby., ERROR: While executing gem ... (Errno::ENOENT), No such file or directory - /home/jrajav
rovalent has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
urbann has quit [Remote host closed the connection]
<macer1>
>> fork while true
<al2o3cr>
[FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno..., [FATAL] Failed to create timer thread (errno: 11)
<macer1>
damn :D
andrewhl_ has quit [Remote host closed the connection]
<Mon_Ouie>
You can try anything you want, it's pretty safe ;)
Stalkr_ has quit [Quit: Leaving...]
<macer1>
the problem is old version was easy to crash :/
<macer1>
now it is written in node.js
<Mon_Ouie>
It is? The github version, updated 3 days ago, is in Ruby
FunnyLookinHat has quit [Quit: Leaving]
banisterfiend has quit [Read error: Connection reset by peer]
<macer1>
oh the old was node.js?
<Hanmac>
macer1 yeah ... its now safe, forced by evolution :P
<macer1>
anyway
<macer1>
it is spawning new process
<macer1>
and crashing the process doesnt crash the bot ;/
syamajala has joined #ruby
<macer1>
Hanmac: yup :D
justinmcp has joined #ruby
<macer1>
I have a super cool way to crash ruby
<macer1>
but the parent process cant crash this way
* Hanmac
feels good because he was an evolutional factor
<macer1>
I was too :D
jorge_ has joined #ruby
awarner has quit [Remote host closed the connection]
<al2o3cr>
/usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':, It seems your ruby installation is missing psych (for YAML output)., To eliminate this warning, please install libyaml and reinstall your ruby., ERROR: While executing gem ... (Errno::ENOENT), No such file or directory - /home/jrajav
<al2o3cr>
/usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':, It seems your ruby installation is missing psych (for YAML output)., To eliminate this warning, please install libyaml and reinstall your ruby., ERROR: While executing gem ... (Errno::ENOENT), No such file or directory - /home/jrajav
<macer1>
what the..?
justinmcp has quit [Remote host closed the connection]
lampe2 has quit [Quit: Leaving]
<Hanmac>
macer1 its not build with yaml support ... you cant change that :P
<macer1>
damn -_-
SegFaultAX has joined #ruby
<macer1>
crashing ruby is fun
<macer1>
but the parent can't crash
<macer1>
hmm...
kvirani has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<machty_>
hey, in rails console, if i type 2.weeks, it yields => 14 days, but 2.weeks.to_s yields "1209600"… where is the 14 days coming from? how do i get it to explicitly to yield "14 days" in my rails app?
<al2o3cr>
-e:1:in `eval': Permission denied - fail (Errno::EACCES), from (eval):1:in `open', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<machty_>
i'm also just curious about the mechanics behind what's happening
imami|afk has quit [Ping timeout: 246 seconds]
jgrevich has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
kvirani has joined #ruby
<macer1>
the 1209600 is number of seconds
jgrevich has joined #ruby
<Hanmac>
machty_ you are in the wrong channel :(
<machty_>
BALLS
SegFaultAX has quit [Ping timeout: 272 seconds]
SQLStud has quit [Read error: Connection reset by peer]
Vendethiel has joined #ruby
banseljaj has joined #ruby
Squee- has quit [Quit: This computer has gone to sleep]
<ged>
>> IO.read( '|-' ) or exec 'usr/bin/sudo', 'ps', 'aux'
<al2o3cr>
, [FATAL] Failed to create timer thread (errno: 11)
<macer1>
who want to see a cool trick to segfault ruby :D?
recycle has joined #ruby
<ged>
>> File.read( __FILE__ )
<al2o3cr>
-e:1:in `eval': No such file or directory - (eval) (Errno::ENOENT), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<Mon_Ouie>
It's run using ruby -e
<macer1>
and sudo
<ged>
Heh.
bowlowni has quit [Remote host closed the connection]
<Mon_Ouie>
And the only two binaries you can use are sudo and ruby
cj3kim has quit [Quit: This computer has gone to sleep]
rodasc is now known as crodas
<matti>
macer1: Sorry, I was busy. I am on-call today.
<heftig>
ps isn't there, either
<heftig>
so sudo is useless
<macer1>
matti: oh, no problem.
<macer1>
ping me when you have time
aoeuhtnsid has joined #ruby
overclucker has quit [Quit: bye bye]
SegFaultAX has joined #ruby
<macer1>
the bot will be a lot better if it just ran code using ruby sandbox
<macer1>
a lot easier to crash :/
<aoeuhtnsid>
hi I want to use https://github.com/perrym5/mumble-ruby to create a mumble bot. I can connect and do things, but then my script reaches the end and my bot leaves. How do I keep the script running so that my bot doesn't die?
kvirani has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 276 seconds]
<aoeuhtnsid>
macer1, ah that may also be something I have to worry about, but my question is more basic. What's the best way to prevent the ruby interpreter from reaching the end of my script and stopping the script? i.e. do I put some sort of infinite loop at the end?
Progster has joined #ruby
<macer1>
while true
<aoeuhtnsid>
macer1: thanks!
the_jeebster has quit [Quit: Leaving.]
<macer1>
but its not a good idea as any while true will be using all cpu if you dont sleep a little
<macer1>
i.e loop { 1 } is using all cpu
QKO_ has quit [Ping timeout: 252 seconds]
jgarvey has quit [Quit: Leaving]
Hama has joined #ruby
Takehiro has joined #ruby
<macer1>
>> sleep until false
<macer1>
>> puts "hi"
<al2o3cr>
(NilClass) nil, Console: hi
<macer1>
damn
<ged>
>> require 'dl'
<al2o3cr>
, [FATAL] Failed to create timer thread (errno: 11)
<ged>
Awww... ;)
yoklov_ has joined #ruby
<macer1>
>> puts "hi"
<al2o3cr>
, [FATAL] Failed to create timer thread (errno: 11)
<macer1>
pwnd :D?
<macer1>
^^
<macer1>
epic win
<Hanmac>
:P
yoklov has quit [Read error: Connection reset by peer]
<macer1>
>> puts "am I dead :(?"
<al2o3cr>
, [FATAL] Failed to create timer thread (errno: 11)
<macer1>
jrajav have a new bug to fix, hehe
fbernier has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
Tarellel has joined #ruby
zeromodulus has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
adac has quit [Ping timeout: 246 seconds]
Hama has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
TheLZA has quit [Ping timeout: 245 seconds]
berserkr has joined #ruby
cassianoleal has joined #ruby
lkba has joined #ruby
Vendethiel has quit []
SegFaultAX has quit [Ping timeout: 244 seconds]
cassianoleal has quit [Quit: Leaving.]
SegFaultAX has joined #ruby
macer1 has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
recycle has quit [Remote host closed the connection]
Squee- has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
M- has joined #ruby
cassianoleal has joined #ruby
Takehiro has quit [Remote host closed the connection]
QKO has quit [Ping timeout: 245 seconds]
tomsthumb_ has quit [Quit: Leaving.]
virunga has quit [Quit: Sto andando via]
emmanuelux has joined #ruby
yoklov_ has quit [Ping timeout: 245 seconds]
tewecske has joined #ruby
tewecske has quit [Max SendQ exceeded]
fbernier has quit [Ping timeout: 240 seconds]
aoeuhtnsid has quit [Quit: Page closed]
machty has joined #ruby
Tarellel has quit [Quit: Tarellel]
machty_ has quit [Read error: Connection reset by peer]
iamjarvo has quit [Ping timeout: 244 seconds]
jasonLas_ has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
jasonLaster has joined #ruby
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
Takehiro has joined #ruby
jjang has joined #ruby
pu22l3r has joined #ruby
berserkr has quit [Quit: Leaving.]
uris has quit [Quit: leaving]
jarred has joined #ruby
jasonLaster has quit [Ping timeout: 256 seconds]
Squee- has quit [Quit: This computer has gone to sleep]
cassianoleal has quit [Quit: Leaving.]
jjbohn has joined #ruby
tommyvyo has joined #ruby
Progster has quit [Ping timeout: 260 seconds]
macer1 has joined #ruby
macer1 has joined #ruby
macer1 has quit [Changing host]
eywu has joined #ruby
eywu has quit [Client Quit]
zodiak has quit [Quit: Leaving]
eywu has joined #ruby
<macer1>
executing "fork while true" in irb wasn't good idea...x.X
Takehiro has quit [Remote host closed the connection]
paulovittor23 has quit [Remote host closed the connection]
tomsthumb_ has joined #ruby
QKO has joined #ruby
Vert has joined #ruby
hamstar has quit [Quit: Leaving]
JustinCampbell has quit [Remote host closed the connection]
Speed has quit [Remote host closed the connection]