<doug1>
Morrolan: Ugh.. according to the docs, putting 'foo' in there should cause the fact to have a value of 'foo'
arya__ has joined #ruby
pskosinski has quit [Ping timeout: 240 seconds]
huoxito has joined #ruby
<doug1>
Morrolan: and it was working momentarily for a more complex value
heftig has quit [Ping timeout: 264 seconds]
<Morrolan>
doug1: Oh, if Puppet captures the return value of the block then you can disregard what I said earlier.
<Morrolan>
I assumed you were somehow interested in the return value of calling Facter.add
redramires has quit [Read error: No route to host]
<doug1>
Morrolan: I don't think so...
nouitfvf has quit [Ping timeout: 240 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arya_ has quit [Ping timeout: 248 seconds]
<doug1>
but anyway, the last literal in the function should be what's returned right?
<Morrolan>
The last anything in the block will get returned to the part of Puppet's code which called the block.
vlad_starkov has quit [Remote host closed the connection]
* Morrolan
scratches head
<Pholey>
allrighty morrolan:
<Morrolan>
It might be a good idea to ask in Puppet's IRC channel, if it has one.
sross has joined #ruby
pitzips has quit [Read error: Operation timed out]
sross07 has quit [Read error: Connection reset by peer]
<Pholey>
start(args) returns 'puts "hello world"'
[Rickmasta] has joined #ruby
<Pholey>
however,
<Pholey>
eval(start(args)) returns nil
viszu has joined #ruby
<Morrolan>
doug1: I'm quite tired, don't know anything about Puppet, and am not a Ruby expert . Feel free to stick around here, there's other people besides me who might have an idea. :)
<doug1>
pholey: well I am getting nil from facter...
<doug1>
Morrolan: thanks
<Morrolan>
pholey: put's return value is 'nil', so that is to be expected.
<Pholey>
i meant i get an error saying it cannot eval it because it is nil
rickmasta has quit [Ping timeout: 264 seconds]
<Pholey>
`eval': can't convert nil into String (TypeError)
yashshah has quit [Read error: No route to host]
reset has quit [Quit: Leaving...]
yashshah has joined #ruby
<Morrolan>
Assign the return value of start(args) to a variable and print that one to stdout before evaluating it.
<Morrolan>
Should help you figure out why it blows up.
CaptainJet_ has joined #ruby
CaptainJet has quit [Disconnected by services]
<Pholey>
i did
<Pholey>
it didn't help
<Pholey>
because it returned what i expected it to
<Morrolan>
Call `puts code.inspect`, what does it print?
<Pholey>
gah
<Morrolan>
(With 'code' being the variable which you pass in to eval)
nbouscal has joined #ruby
saarinen has joined #ruby
<Pholey>
ok
ntus1017 has joined #ruby
ntus1017 has quit [Remote host closed the connection]
<Pholey>
so for some reason unbeknownst to me
ntus1017 has joined #ruby
<Pholey>
its doing "code"nil
<Pholey>
in my attempts to remove the 0
<Pholey>
so a question then morrolan
matthalliday has joined #ruby
<Morrolan>
Is this the exact output which it shows to you?
<Pholey>
how do i remove anything trying to append itself to my string? ie "code"0
cjsarette has joined #ruby
<IcyDragon>
pholey: puts returns nil
<Pholey>
nono
<Pholey>
we went over this already lol
<IcyDragon>
really?
devoldmx has joined #ruby
<IcyDragon>
O: I just got back
<Pholey>
i can't eval because there is a 0 integer appended to my string
<IcyDragon>
chomp it?
braincrash has joined #ruby
<Pholey>
how so?
<IcyDragon>
literally chomp
matthalliday has quit [Client Quit]
<IcyDragon>
string.chomp
<Pholey>
ah
<Pholey>
i should of thought of that
<alainus>
How do I set a timer on a separate process? (I want to make a progress bar that adds a "." on each second that passes while executing a particular process)
<IcyDragon>
have you tired using just a thread?
<Pholey>
oh wait
<IcyDragon>
*tried
<Pholey>
i can't because of the fixnum
<Morrolan>
pholey: What on earth, "string"0 is not a valid Ruby construct. What is the *exact* value which `puts code.inspect` returns to you?
braincra- has quit [Ping timeout: 276 seconds]
<Pholey>
when i put it to a string, the integer vanishes...
<IcyDragon>
O:
<IcyDragon>
Its a NULL
<Pholey>
yes
<Pholey>
^
<IcyDragon>
"\0"
devoldmx27 has quit [Ping timeout: 264 seconds]
<IcyDragon>
string.delete("\0")
<Morrolan>
evaluating one of those shouldn't throw an exception, however.
<Pholey>
: undefined method `delete' for 0:Fixnum (NoMethodError)
freerobby has joined #ruby
<IcyDragon>
!
<IcyDragon>
O:
<IcyDragon>
so
<Pholey>
morrolan, this is exactly what i get back: 'puts "hello world"'0
yashshah has quit [Ping timeout: 264 seconds]
* Morrolan
scratches head
<Pholey>
from inspect
cburyta_ has joined #ruby
<Morrolan>
Do you have more than one print / puts statement in your code?
<IcyDragon>
pholey, use .class on it and what do you get?
nomenkun has joined #ruby
<Pholey>
its a fixnum
<IcyDragon>
L:
<Pholey>
morrolan i have a couple
<Morrolan>
Slap a few "\n" around your .inspect
<Morrolan>
e.g. `puts "\n\n#{code.inspect}\n\n"`
<IcyDragon>
pholey: n = start(args); p [n, n.class] # can you do that
<Pholey>
yeah
subbyyy has quit [Read error: Connection reset by peer]
rickruby has quit [Remote host closed the connection]
sepp2k1 has quit [Quit: Leaving.]
<IceDragon>
ruby bf.rb --to-rb `cat testing.bf`
<IceDragon>
L:
<Pholey>
when "-r", "--to-rb" # read ruby file
<Pholey>
but does it not read the file right there?
<IceDragon>
nope
<IceDragon>
imme a sec
<IceDragon>
fully commenting the code
<Pholey>
because i get a "filename too long" error
CaptainJet has joined #ruby
<IceDragon>
yeah
<IceDragon>
:x
<Pholey>
but if it does not read a file....
<Pholey>
then why is it telling me that :p
<Pholey>
bf = File.read(filename)
CaptainJet_ has quit [Ping timeout: 276 seconds]
freerobby has quit [Ping timeout: 256 seconds]
heftig has joined #ruby
wsterling has joined #ruby
Davey has joined #ruby
lys has quit [Quit: lys]
<Pholey>
ah
wsterling has quit [Ping timeout: 264 seconds]
<Pholey>
icedragon: what does .shift do?
<IceDragon>
removes the first element in the array and returns it
<IceDragon>
Okay so I updated the gist
<IceDragon>
:) check it out
<epitron>
pholey: shift and pop are named because of their performance characteristics
<epitron>
pop is fast (removing from the end of the array), shift is slow (copying all the array elements one position to the left)
<epitron>
although, maybe ruby's optimized that by now :)
pitzips has joined #ruby
<IceDragon>
I still think its slow
<IceDragon>
but it doesn't mean crap if your not doing any time crucial processing
micah` has quit [Read error: Operation timed out]
<IceDragon>
like gaming or web dev
<Pholey>
only one thing however icedragon
<IceDragon>
it bugged?
sambao21 has quit [Quit: Computer has gone to sleep.]
<Pholey>
you only read the first word of the file
<IceDragon>
o.o !
<Pholey>
yeah
<Pholey>
.shift i see
* IceDragon
tries a larger program
<Pholey>
.join is better methinks
<IceDragon>
I didn't test the file side
<IceDragon>
oh right
<IceDragon>
:x
<IceDragon>
compile only works for the next arg
<IceDragon>
not files!
<epitron>
IceDragon: ruby's string slices have been accelerated...
troker has joined #ruby
<epitron>
perhaps shift is just a way of slicing now
fomatin has joined #ruby
<epitron>
(lazy slicing)
jericon_ has quit [Ping timeout: 245 seconds]
<epitron>
(that's not what they call it... that's just what i'm calling it :)
<IceDragon>
:)
<IceDragon>
I rarely play around strings
<Pholey>
while argv.shift works great for the actual calling of the file name
jericon has joined #ruby
<epitron>
IceDragon: what? really? :) what do you do?
micah` has joined #ruby
<IceDragon>
game
<IceDragon>
s
<IceDragon>
>,> But I mess mostly with graphics
<IceDragon>
so its all number this and number that
<IceDragon>
and probably a few filenames in between
cjsarette has quit [Max SendQ exceeded]
cjsarette has joined #ruby
Spaceghost|cloud has joined #ruby
cjsarette has quit [Max SendQ exceeded]
<IceDragon>
ukay pholey, check the gist I updated the example
<IceDragon>
and added the -e flag
cjsarette has joined #ruby
<IceDragon>
:) so you can now read files and brainfuck em
cofin has joined #ruby
lys has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
lys has quit [Client Quit]
lethjakman has quit [Ping timeout: 276 seconds]
<mickeyd>
why doesn't this --- puts element.inner_html[\d{9},1] --- print out my regex match to my terminal? (if its something stupid sorry im new to this regex stuff)
robustus has joined #ruby
lys has joined #ruby
<IceDragon>
that looks broken mickeyd
<IceDragon>
try this: /d{9}/
<mickeyd>
ok thanks one sec
<IceDragon>
exactly 9 digits.
<IceDragon>
is that what you wanted?
<popl>
backslash
<popl>
:)
* IceDragon
pulls katana on popl
CaptainJet_ has joined #ruby
CaptainJet has quit [Disconnected by services]
<Pholey>
checking it out now
freerobby has joined #ruby
<epitron>
IceDragon: ah, cool. what libraries are you using?
<mickeyd>
IceDragon, seems to be working although something else is messed up im guess so im gonna keep looking around, thanks!
<epitron>
i tried using ruby for games a while back, but it sucked at that time
<mickeyd>
and yes 9 digits from a string
<epitron>
(btw, the lazy slices apply to arrays as well, i believe)
<IceDragon>
Jet (points at CaptainJet_) found a lib some time ago called StarRuby
<IceDragon>
:P I've been editing the hell out of that ever since
Yakko has quit [Remote host closed the connection]
<CaptainJet_>
The most popular library is Gosu
<IceDragon>
Its pretty simple, and doesn't offer any extravagant features like Gosu
<Pholey>
ruby stringtobf.rb -d hello.bf
<Pholey>
puts
<IceDragon>
Its quick to get into and thats what matters
<Pholey>
T.T
<IceDragon>
o,o you are salted like peanuts my friend
<IceDragon>
./bf.rb -e cache.rb >> cache.bf
<IceDragon>
./bf.rb -d cache.bf
<epitron>
hah
<IceDragon>
<insert the code from my cache.rb>
<epitron>
when i google starruby, i get some WoW rare item
ntus1017 has quit [Remote host closed the connection]
<IceDragon>
>:
<Pholey>
it does for me too
<Pholey>
good job
<Pholey>
and thanks
vlad_starkov has joined #ruby
<Pholey>
just had some troubles
radic_ has joined #ruby
Mr_Pepper has joined #ruby
xavier23 has joined #ruby
* IceDragon
derps
<IceDragon>
at least Im up to date now?
<CaptainJet_>
you now have fixed security vulnerabilties you'd never have actually worried about anyways!
<xavier23>
Anyone here use winrm?
nycjv321 has joined #ruby
nycjv321 has quit [Changing host]
nycjv321 has joined #ruby
<IceDragon>
... WAIT THOSE 247 PATCHES ARE SECURITY PATCHES!?
<IceDragon>
DAFUQ DID I UPDATE 4!?
<CaptainJet_>
some of them might not be
<nycjv321>
what is proper way of "importing" multiple classes into another module? e.g. I am in Module A and in Module B::C::D I have some classes I want to directly instantiate in module A
<IceDragon>
orz
<CaptainJet_>
i honestly don't really keep up
<CaptainJet_>
I just check for new updates every month or so
radic__ has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
<IceDragon>
nycjv321: module A ; include A::B::C::D ; end
<IceDragon>
A::DClassThing
<nycjv321>
Also this is a preference question: is RubyMine worth it?
<nycjv321>
IceDragon: Let me try that... I thought I actually wrote that same statement haha
<IceDragon>
in terms of a ruby IDE, never used one
<IceDragon>
:O All of them where too bulky for my liking
<IceDragon>
I rather tap away in Sublime and hit F7
<CaptainJet_>
I'd rather tap away in Scite and hit F5
<bnagy>
almost nobody uses IDEs
<bnagy>
as in 'long term ruby devs'
<CaptainJet_>
IDEs are for Java users
<nycjv321>
lol I see
<CaptainJet_>
And C# I guess
<bnagy>
unless you count sublime or vim or emacs
<nycjv321>
I used to use Vim alot and got used to Eclipse when doing some Java stuff and wanna see what else people use RubyMine looks pretty sweet
<IceDragon>
o.o do I see a "buy" button...
<IceDragon>
:x Man I haven't seen those in eons since switching to Linux
lys has quit [Quit: lys]
<nycjv321>
IceDragon: Its free for open source but yea there is a "Buy" button on it
<IceDragon>
Jet, nobody will accept it, but I still think C# is just Java exclusive for MS
<nycjv321>
I just wish the ruby plugin in Eclipse did better with Formatting and some other things
<nycjv321>
IceDragon: I agree with that statement :)
[Rickmasta] has quit [Quit: Leaving...]
<IceDragon>
Or more like, eval("Java - Multiplatform + MoreFeatures + MS") # => #<NotVertPortableAreWe>
<CaptainJet_>
That's why Mono is there
<nycjv321>
Mono? eh
<IceDragon>
but yeah, alsmot every single C# programmer I've spoken with begs to differ
<IceDragon>
Used C# for 3 days, and it still felt like Java hell...
<nycjv321>
IceDragon: But yet I can always read their code and its barely distinguishable from Java..........
<IceDragon>
MY POINT
<IceDragon>
ITS JUST C# = MS.Java
<CaptainJet_>
I tried C# for a day
<CaptainJet_>
And decided to wait for ruby to catch on some more
<IceDragon>
I'd rather hack away at C++ than spend a day with C# or Python..
<CaptainJet_>
But you have C now
freerobby has joined #ruby
<CaptainJet_>
Ultra-fast, very portable C
<nycjv321>
I never learned C :) Started with Perl/PHP been doing Java/Ruby now
<IceDragon>
C is godly, once you get around the Pointer madness and your compiler spitting out spaghetti when you miss a semicolon
<nycjv321>
I wish I had the time to learn it
<CaptainJet_>
I started with Ruby
<IceDragon>
Its quite easy
<nycjv321>
Ruby is #soboss!
<CaptainJet_>
I also ended with Ruby
<IceDragon>
everyone knows that >,>
<CaptainJet_>
Ruby is all I have D:
<CaptainJet_>
5 years, just Ruby-ing
julweber_ has quit [Remote host closed the connection]
<IceDragon>
>,> while me on the other hand can't settle down
<IceDragon>
Went from Basic >> Pascal >> Java >> Ruby >> C >> anything else I get my hands on
<IceDragon>
I wanna tackle C++, I just don't feel like learning yet another OOP language..
<CaptainJet_>
Speaking of stuff
<CaptainJet_>
Have you been keeping up with mruby?
<IceDragon>
Speed has
<IceDragon>
>.> He's embedding it in a Secrut game engine
<CaptainJet_>
Oh?
<IceDragon>
But you hate Speed so
<IceDragon>
meh.
<CaptainJet_>
I'm just glad I can actually build mruby on Windows
<CaptainJet_>
:D
<IceDragon>
NonMS.build + Windows == YouAreLucky
<IceDragon>
>.>
freerobby has quit [Ping timeout: 256 seconds]
laitances14 has quit [Ping timeout: 264 seconds]
Deele has quit [Ping timeout: 240 seconds]
saigas83 has joined #ruby
queston has joined #ruby
reset has quit [Quit: Leaving...]
rickruby has joined #ruby
rickmasta has joined #ruby
<nycjv321>
IceDragon: it works now! I actually had the require statements switched. See I have a series of page objects for Cucumber and am converting some of the test cases for RSpec to demo it for my boss and the require call for the world_extensions and env file was switched
<IceDragon>
:O
fixl has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
<nycjv321>
I would prefer cucumber fyi ;)
<nycjv321>
Anyone use Roo I had an issue with it last night I got it working. Its a pretty slick Gem
n_blownapart has joined #ruby
<epitron>
ICEDRAGON HOW IS THE NEW RUBY
<IceDragon>
>,>
<IceDragon>
still broke!
<epitron>
oic
<IceDragon>
irb, erb, gem
<IceDragon>
;_________;
* IceDragon
bawls again
<epitron>
how are you managing your ruby?
<IceDragon>
Arch's package system
<epitron>
o_O
<IceDragon>
I run Arch Linux
<epitron>
arch has the latest ruby
<epitron>
that should be easy to update
* IceDragon
nods
queston has quit [Ping timeout: 252 seconds]
<IceDragon>
But I manually installed the ruby 2.0.0 preview before
<epitron>
oh dear
<IceDragon>
and never removed it
<IceDragon>
;__;
<epitron>
better remove ruby, then nuke the preview
<epitron>
kill everything in usr/bin and /var/lib/ruby or whatever
n_blownapart has quit [Remote host closed the connection]
<epitron>
(everything related to ruby)
<IceDragon>
;_;
<IceDragon>
I dun wanna!
<IceDragon>
I like my ruby!
<epitron>
*shrug*
<IceDragon>
lol
<epitron>
your install sounds kinda fucked
<IceDragon>
:D I'm uninstalling again
<CaptainJet_>
That's what happens when you listen to a jet and strangers
<IceDragon>
I've been through worst
<IceDragon>
f***ed my /home partition once
<IceDragon>
screwed up my kernel once
<IceDragon>
almost wiped my root using dd once
mary5030 has joined #ruby
havenwood has quit [Remote host closed the connection]
<CaptainJet_>
All of those sound like user error to me
<eval-in_>
IceDragon => /tmp/execpad-9a25b7aeaa88/source-9a25b7aeaa88:2: no .<digit> floating literal anymore; put 0 before dot ... (https://eval.in/36674)
<IceDragon>
:x
<IceDragon>
I forgot about that
<CaptainJet_>
if it makes you feel better
<IceDragon>
Arch is great
sambao21 has joined #ruby
<CaptainJet_>
i just broke my mingw
<IceDragon>
except when they pull the rug from under your feet
<IceDragon>
like the /bin update
<IceDragon>
;x so many broken things...
<CaptainJet_>
I can't build stuff ;__:
<IceDragon>
HA
osvico has quit [Ping timeout: 256 seconds]
* IceDragon
points and laughs
<IceDragon>
FEEL MY PAIN
<IceDragon>
feels good to have the GCC toolchain under my belt
<CaptainJet_>
my gcc is being pointed towards a non-existant directory
<CaptainJet_>
and at the moment i don't know how to fix it :X
RichardBaker has quit [Quit: RichardBaker]
<nycjv321>
Let time asking this.. but no one uses an IDE when programming? Anyone have experience using RubyMine or Eclipse + Ruby plugin?
<nycjv321>
last*
<CaptainJet_>
Not I
rickruby has quit [Remote host closed the connection]
RichardBaker has joined #ruby
RichardBaker has quit [Client Quit]
subbyyy has quit [Ping timeout: 252 seconds]
<bnagy>
nycjv321: I have heard this question on here many times over a long time, and the answer has always been 'no'
reset has joined #ruby
<bnagy>
so it's not just the set of people here right now, it's a pretty big sample
<bnagy>
also eclipse is s teaming pile of shit in any language
<IceDragon>
IDE + Ruby == What are you doing!?
<IceDragon>
ruby is made to be fun and easy?
<IceDragon>
!!.gsub("?", "")
<IceDragon>
>,>
zacts has joined #ruby
stkowski has quit [Quit: stkowski]
<nycjv321>
bnagy: I guess I've gotten used to the IDE since I've been doing alot of development in VB/Java I used to use VIM way back when
r0bby is now known as robbyoconnor
<bnagy>
I'm not judging you, dude ( even if you _do_ code VB and Java )
<nycjv321>
bnagy: hahahaha
<bnagy>
just giving you the facts
<nycjv321>
bnagy: don't get me wrong if I could I would program Ruby/Perl all day
CaptainJet_ has quit []
serp` has quit [Quit: serp`]
Komish has joined #ruby
<nycjv321>
I couldn't find any work in my area for entry level that wants that
<nycjv321>
bnagy: I'm just a scrub right now
freerobby has joined #ruby
CaptainJet has joined #ruby
devoldmx has joined #ruby
nomenkun has joined #ruby
julweber has joined #ruby
devoldmx3 has quit [Ping timeout: 256 seconds]
kofno has joined #ruby
Mars^ has quit [Ping timeout: 252 seconds]
freerobby has quit [Ping timeout: 264 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Michae___ has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 252 seconds]
Michae___ has joined #ruby
threesome has quit [Ping timeout: 264 seconds]
mary5030 has quit [Remote host closed the connection]
Komish has quit []
Komish has joined #ruby
sambao21 has joined #ruby
julweber has quit [Ping timeout: 256 seconds]
sambao21 has quit [Client Quit]
fgo has joined #ruby
Michae___ has quit [Remote host closed the connection]
Michae___ has joined #ruby
doug1 has joined #ruby
Mars^ has joined #ruby
pkrnj has quit [Ping timeout: 256 seconds]
<IceDragon>
=,= man reinstalling gems is a pain in the ass
pkrnj has joined #ruby
<CaptainJet>
i keep a file with all the commands written in it
<CaptainJet>
so i just c/p them
doug1 has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
<fryguy>
or just use bundler
DanKnox_away is now known as DanKnox
<nycjv321>
bundler => nice
pkrnj has quit [Client Quit]
<IceDragon>
thats the thing
<IceDragon>
everything is borked
<IceDragon>
including bundler
<IceDragon>
;_;
hogeo has joined #ruby
diegoviola has joined #ruby
vlad_starkov has quit [Ping timeout: 276 seconds]
Komish has quit []
nari has quit [Ping timeout: 276 seconds]
reset has quit [Ping timeout: 256 seconds]
CaptainJet has quit []
noop has joined #ruby
hogeo_ has joined #ruby
fomatin has joined #ruby
kofno has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
LucidDreamZzZ has quit [Ping timeout: 240 seconds]
CaptainJet has joined #ruby
subbyyy has joined #ruby
cofin has quit [Quit: cofin]
freerobby has quit [Ping timeout: 248 seconds]
devoldmx has quit [Ping timeout: 276 seconds]
devoldmx has joined #ruby
nycjv321 has quit [Quit: leaving]
serp` has joined #ruby
echevemaster has quit [Remote host closed the connection]
anay has joined #ruby
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
hogeo_ has quit [Remote host closed the connection]
<mickeyd>
if i have an empty array... and have another populated array how to i assign the populated one to the empty one?
freerobby has joined #ruby
<mickeyd>
ive tried like 3 different ways ive seen on google but nothing
Matip has quit [Remote host closed the connection]
animali has quit [Remote host closed the connection]
thebastl has quit [Remote host closed the connection]
dross has quit [Ping timeout: 248 seconds]
pmmu has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
bricker`LA has joined #ruby
<bricker`LA>
Hello, all, I come baring a puzzle to solve
x1337807x has quit [Client Quit]
<bnagy>
bearing
<bnagy>
what do I win?
<bricker`LA>
hehe
<bricker`LA>
thanks
<bricker`LA>
Here's the situation: I have an array of events which have a start/end date. I want to loop through those and remove any events which take place inside of another. So kind of a `uniq` but for a date range, if that makes sense. Here's my crappy attempt: https://gist.github.com/bricker/5942497
<bricker`LA>
I don't like my attempt but it was more just to illustrate the problem
<Mon_Ouie>
Well the first problem is it's going to reject the event because it happens inside itself
<bnagy>
so wait, any event that takes place fully inside any other?
<bnagy>
first thing that springs to mind is a greedy reduction
<bnagy>
sort by total duration, then iterate through those in order, stripping any event occuring inside this one
<bricker`LA>
hm
<bricker`LA>
Mon_Ouie: you're right, thanks for pointing that out
<bnagy>
only hard question is tiebreaks
<bricker`LA>
bnagy: tiebreaking is no problem - this is dealing with two different types of events (recurring and one-off), so in that case the one-off should always win.
<bnagy>
which is related to Mon_Ouie's point. It's an issue with any pairs of identical start end as well
<bnagy>
what about two recurring events with identical start and end?
<bnagy>
and if you say 'there aren't any' I cut u
brennanMKE has quit [Remote host closed the connection]
<bricker`LA>
bnagy: in that case, I would just choose the second one I guess, but that is something that would have to be handled when the event is being made (make sure it doesn't have the same start/end as another)
<bnagy>
ok well if it's random then fine - my alg would choose the first
<bnagy>
but you'll have to manually tiebreak if you want to cope with the recurring thingy
banjara has joined #ruby
xavier23 has quit [Quit: xavier23]
CaptainJet has quit [Ping timeout: 276 seconds]
ananthakumaran has quit [Ping timeout: 256 seconds]
cj3kim_ has joined #ruby
anay has joined #ruby
cj3kim has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
ffio_ has joined #ruby
bricker`LA has quit [Quit: leaving]
ffio has quit [Ping timeout: 256 seconds]
nomenkun has quit [Ping timeout: 264 seconds]
DanKnox_away is now known as DanKnox
Mars^ has joined #ruby
saarinen has joined #ruby
cha1tanya has joined #ruby
DanKnox is now known as DanKnox_away
huttan_ has joined #ruby
robert__ has joined #ruby
robert__ has quit [Changing host]
robert__ has joined #ruby
yebyen has joined #ruby
veer has joined #ruby
yebyen is now known as Guest88115
veer is now known as Guest35681
icecandy_ has joined #ruby
_veer has quit [Disconnected by services]
Guest35681 is now known as _veer
fuleo has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
zets2 has joined #ruby
kil0byte_ has joined #ruby
Mars1 has joined #ruby
eliasp_ has joined #ruby
adrian1 has joined #ruby
KRF_ has joined #ruby
Hensley has quit [Quit: Hensley]
saarinen has quit [Ping timeout: 276 seconds]
Guest46529 has joined #ruby
slash_ni1k has joined #ruby
poseidon_ has joined #ruby
kvodlecks has joined #ruby
dwirc_ has joined #ruby
thibauts_ has joined #ruby
DefV has joined #ruby
<pmmu>
i have a ruby site that I am trying to authenticate while curling. i can curl the login page and get a authenticity_token and a cookie, but when i try to curl another controller with the cookie and authenticity token passed in , i get the redirect to login page
erry_ has joined #ruby
denken has joined #ruby
<pmmu>
is there a good tutorial on how to set up curl authentication?
<pmmu>
i have tried many many and no luck so far
emdub has joined #ruby
s00pcan_ has joined #ruby
Myconix has joined #ruby
Tobarja_yikes has joined #ruby
mumblet has joined #ruby
DandyPandy_ has joined #ruby
ryotarai_ has joined #ruby
Freeaqingme_ has joined #ruby
PLejeck has joined #ruby
xargoon_ has joined #ruby
patsToms_ has joined #ruby
otters has joined #ruby
mumblet is now known as Guest91865
Freeaqingme_ is now known as Guest72299
ainame_ has joined #ruby
Guest94239 has quit [Quit: Guest94239]
DonVitoCorleone has joined #ruby
Mars^ has quit [*.net *.split]
nari has quit [*.net *.split]
kil0byte has quit [*.net *.split]
_Andres has quit [*.net *.split]
atno has quit [*.net *.split]
icecandy has quit [*.net *.split]
echevemaster has quit [*.net *.split]
jericon has quit [*.net *.split]
zets has quit [*.net *.split]
`p has quit [*.net *.split]
dwirc has quit [*.net *.split]
thibauts has quit [*.net *.split]
suporte85 has quit [*.net *.split]
wchun has quit [*.net *.split]
erry has quit [*.net *.split]
s00pcan has quit [*.net *.split]
deallocate has quit [*.net *.split]
eliasp has quit [*.net *.split]
Anarch has quit [*.net *.split]
joelteon has quit [*.net *.split]
DandyPandy has quit [*.net *.split]
swarmhost has quit [*.net *.split]
huttan has quit [*.net *.split]
Tobarja has quit [*.net *.split]
slash_nick has quit [*.net *.split]
fuleo2 has quit [*.net *.split]
Freeaqingme has quit [*.net *.split]
pentameter has quit [*.net *.split]
poseidon has quit [*.net *.split]
DonVitoC- has quit [*.net *.split]
patsToms has quit [*.net *.split]
denken_ has quit [*.net *.split]
robert_ has quit [*.net *.split]
Qwadlex has quit [*.net *.split]
emdub_ has quit [*.net *.split]
DefV_ has quit [*.net *.split]
mephux_ has quit [*.net *.split]
MrZYX|off has quit [*.net *.split]
defrag has quit [*.net *.split]
mumblerit has quit [*.net *.split]
ayonix has quit [*.net *.split]
ryotarai has quit [*.net *.split]
xargoon has quit [*.net *.split]
Guest22480 has quit [*.net *.split]
test_a has quit [*.net *.split]
KRF has quit [*.net *.split]
is_null has quit [*.net *.split]
ainame has quit [*.net *.split]
nuckrophilia has quit [*.net *.split]
Daemoen has quit [*.net *.split]
al3xnull has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
xargoon_ is now known as xargoon
Guest91865 is now known as mumblerit
patsToms_ is now known as patsToms
Tobarja_yikes is now known as Tobarja
jericon_ has joined #ruby
mumblerit is now known as Guest21524
colonolGron has joined #ruby
ainame_ is now known as ainame
DonRichie has quit [Write error: Connection reset by peer]
ananthakumaran has joined #ruby
swarmhost has joined #ruby
nettoweb has quit [Quit: nettoweb]
otters is now known as joelteon
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
DonRichie has joined #ruby
jonahR has joined #ruby
vamonster has joined #ruby
is_null has joined #ruby
MrZYX|off has joined #ruby
MrZYX|off is now known as MrZYX
Anarch has joined #ruby
colonolGron has quit [Client Quit]
_Andres has joined #ruby
kofno has joined #ruby
wallerdev has quit [Quit: wallerdev]
brennanMKE has joined #ruby
axeman- has joined #ruby
antn has joined #ruby
Heero` has quit [Read error: Connection reset by peer]
deallocate has joined #ruby
test_a has joined #ruby
suporte85 has joined #ruby
defrag has joined #ruby
atno has joined #ruby
swordsmanz has joined #ruby
pentameter has joined #ruby
`p has joined #ruby
Daemoen has joined #ruby
nari has joined #ruby
ananthakumaran1 has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
ananthakumaran has quit [Ping timeout: 276 seconds]
_Andres has quit [Ping timeout: 256 seconds]
erry_ is now known as erry
yugui_zzz has joined #ruby
akashj87 has joined #ruby
DanKnox_away is now known as DanKnox
sambao21 has joined #ruby
brennanMKE has quit [Ping timeout: 256 seconds]
DanKnox is now known as DanKnox_away
rickmasta has quit [Quit: Leaving...]
wu_lmao has quit [Ping timeout: 246 seconds]
leonid__ has joined #ruby
EPIK has quit [Ping timeout: 264 seconds]
jonahR has quit [Quit: jonahR]
zmike has joined #ruby
banjara has quit [Ping timeout: 264 seconds]
banjara has joined #ruby
freerobby has quit [Quit: Leaving.]
dayepa has quit [Quit: dayepa]
kofno has quit [Remote host closed the connection]
dayepa has joined #ruby
thebastl has joined #ruby
havenwood has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
axeman- has quit [Remote host closed the connection]
wu_lmao has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
cha1tanya has quit [Ping timeout: 264 seconds]
fgo has quit [Remote host closed the connection]
mogsy has joined #ruby
Mars1 has quit [Ping timeout: 264 seconds]
kofno has joined #ruby
AlHafoudh has joined #ruby
queston has joined #ruby
ssvo has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
queston has quit [Ping timeout: 252 seconds]
PLejeck has quit [Changing host]
PLejeck has joined #ruby
PLejeck is now known as nuck
antn has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 251 seconds]
cha1tanya has joined #ruby
cads has quit [Ping timeout: 256 seconds]
relix has joined #ruby
cjsarette has joined #ruby
akashj87_ has joined #ruby
wincent has joined #ruby
anay has quit [Remote host closed the connection]
wincent has left #ruby [#ruby]
akashj87 has quit [Ping timeout: 276 seconds]
akashj87__ has joined #ruby
osvico has quit [Ping timeout: 248 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lkba has quit [Ping timeout: 276 seconds]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
akashj87_ has quit [Ping timeout: 276 seconds]
binw has quit [Ping timeout: 264 seconds]
whowantstolivefo has joined #ruby
kofno has joined #ruby
Bry8Star{T2 has joined #ruby
whowantstolivefo has quit [Client Quit]
tjbiddle has joined #ruby
banjara1 has joined #ruby
banjara has quit [Read error: Connection reset by peer]
anay has joined #ruby
akashj87__ has quit [Ping timeout: 276 seconds]
pmmu has quit [Ping timeout: 250 seconds]
jonahR has joined #ruby
kofno has quit [Ping timeout: 256 seconds]
ananthakumaran1 has quit [Ping timeout: 256 seconds]
danslo has quit [Ping timeout: 248 seconds]
Shirakawasuna has quit [Quit: Leaving]
danslo has joined #ruby
zarubin has quit [Ping timeout: 264 seconds]
chxane has quit [Quit: Leaving]
kil0byte_ has quit [Remote host closed the connection]
marr has joined #ruby
cj3kim has joined #ruby
vlad_starkov has joined #ruby
zigomir has joined #ruby
Axsuul has joined #ruby
ananthakumaran has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
brennanMKE has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
rickruby has joined #ruby
Guest89789 is now known as v2px
v2px has quit [Changing host]
v2px has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 252 seconds]
cha1tanya has quit [Ping timeout: 264 seconds]
tonini has joined #ruby
Xeago has joined #ruby
freeayu__ has quit [Quit: This computer has gone to sleep]
lethjakm1 has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
arietis has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
jds has joined #ruby
blackmesa has joined #ruby
krisfremen is now known as krisfremen-home
vlad_starkov has joined #ruby
poseid has joined #ruby
cjsarette has joined #ruby
Deele has joined #ruby
thebastl_ has joined #ruby
poseid has quit [Client Quit]
<patsToms>
morning, I want to extend object with attribute. That object is in module. Any ideas?
thebastl has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 240 seconds]
<apeiros>
what?
thebastl_ is now known as thebastl
berkes has joined #ruby
berkes has quit [Read error: Connection reset by peer]
k610 has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
julweber has joined #ruby
AlHafoudh has quit [Quit: Computer has gone to sleep.]
ptman has left #ruby [#ruby]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
that `what?` was directed at you, patsToms
<patsToms>
apeiros, thanks about answer haha
<patsToms>
Seems like I am missing something. I want to make new attribute to object. I mean - I am already created it
<patsToms>
internet is saying that I need to use mixins to achive that
choobie has joined #ruby
choobie has quit [Changing host]
choobie has joined #ruby
<patsToms>
and seems like they are true...
relix has joined #ruby
<patsToms>
apeiros, that what I want to extend is just a something like - thatultracoolobject.theattribute
anay has quit [Remote host closed the connection]
fgo has joined #ruby
poseid has joined #ruby
LennyLinux has joined #ruby
yashshah has joined #ruby
<apeiros>
patsToms: can you show some example code? from your explanation I'm not sure I understand what you want
<patsToms>
yeah, seems like I need to take it to something simple and try then. Momento will make one...
<apeiros>
it seems to me that you want this:https://gist.github.com/apeiros/08ba078a7c95bb48c557
<AliRezaTaleghani>
it's my main parallel function...
<AliRezaTaleghani>
is there any problem? :-/
<waxjar>
ruby uses native threads since 1.9, no?
tonini has joined #ruby
<apeiros>
waxjar: yes, with a gil, and only one running natively at once.
yashshah has quit [Read error: Operation timed out]
<apeiros>
so effectively still green threads
<bnagy>
yes, but it's not a useful disctinction with gil
<waxjar>
fair enough
<apeiros>
AliRezaTaleghani: green threads means threads do not run in parallel, they run interleaved, allowing for concurrency, but not parallelism
noop has quit [Remote host closed the connection]
<bnagy>
basically to light up all your cores with ruby use processes or use jruby and Threads
<AliRezaTaleghani>
so :-/ which gem lib I can use for parallel! if there is any?
jds has quit [Remote host closed the connection]
<bnagy>
there is one called parallel
<bnagy>
I think it's github grosser/parallel from memory
nomenkun has quit [Ping timeout: 264 seconds]
<apeiros>
you can use forks
<apeiros>
I think peach has a functionality to use forks instead of threads, not sure
<apeiros>
else you can check my `fork` gem
<apeiros>
or as bnagy and I already said: use jruby
vdandre has joined #ruby
<bnagy>
imho if you can jruby is the easiest, but I find parallel easy to use
<apeiros>
gah, why is it that windows is too stupid to change speakers with a running exe? I must quit and restart the exe for it to pick up the new speaker
<AliRezaTaleghani>
tnx all
queston has joined #ruby
gildo has quit [Ping timeout: 256 seconds]
<Banistergalaxy>
Apeiros what game are you playing ?
<apeiros>
fez
DrCode has quit [Remote host closed the connection]
atmosx has joined #ruby
shadoi has joined #ruby
DrCode has joined #ruby
Zolo has joined #ruby
shadoi1 has quit [Ping timeout: 245 seconds]
queston has quit [Ping timeout: 256 seconds]
jds has joined #ruby
ToApolytoXaos has joined #ruby
anay has joined #ruby
swarmhost has quit []
krainbol_ has joined #ruby
threesome has joined #ruby
krainbol_ has quit [Client Quit]
krainbol_ has joined #ruby
krainboltgreene has quit [Ping timeout: 248 seconds]
Spooner has joined #ruby
charliesome has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
Meatant has quit [Quit: a heavy mist sets in, and you can no longer see the creepy man across the street that was pointing at you. a wave of cold air sweeps in as the solitary light flickers then goes out]
lkba has joined #ruby
Myconix has quit [Quit: no reason]
Zolo has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 264 seconds]
saigas83 has quit [Ping timeout: 251 seconds]
blackmesa has joined #ruby
saigas83 has joined #ruby
Emmanuel_Chanel has joined #ruby
<apeiros>
you know the game, Banistergalaxy?
jonahR has quit [Quit: jonahR]
<tobiasvl>
FEZ <3
<tobiasvl>
by god
<tobiasvl>
GOTY 2012
Neomex has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacts has quit [Quit: leaving]
subbyyy has quit [Ping timeout: 248 seconds]
Neomex has quit [Quit: Neomex]
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
tkuchiki has quit [Remote host closed the connection]
alichherawalla has joined #ruby
<alichherawalla>
any site for beginner examples in ruby?
thebastl has quit [Ping timeout: 264 seconds]
relix has joined #ruby
browndawg has left #ruby [#ruby]
anay has quit [Remote host closed the connection]
philipe1 has joined #ruby
icecandy_ has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
anay has joined #ruby
troker has quit [Quit: troker]
fphilipe has joined #ruby
eval-in_ has quit [Remote host closed the connection]
eval-in has joined #ruby
<alichherawalla>
any site for ruby solved problems
<alichherawalla>
?
yashshah has joined #ruby
alichherawalla has left #ruby [#ruby]
Guest21524 is now known as mumblerit
cj3kim has joined #ruby
tkuchiki has joined #ruby
krainbol_ has quit [Ping timeout: 256 seconds]
niklasb has joined #ruby
<LennyLinux>
github
lys has joined #ruby
unstable has left #ruby [#ruby]
cj3kim has quit [Ping timeout: 245 seconds]
codecop has joined #ruby
AliRezaTaleghani has quit [Quit: AliRezaTaleghani]
anay has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
AlHafoudh has joined #ruby
kofno has joined #ruby
yashshah has quit [Ping timeout: 256 seconds]
DestinyAwaits has joined #ruby
arietis has joined #ruby
arya_ has joined #ruby
x1337807x has joined #ruby
Xeago has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 264 seconds]
philipe1 has quit [Ping timeout: 264 seconds]
AlHafoudh has quit [Quit: Computer has gone to sleep.]
arya_ has quit [Ping timeout: 248 seconds]
cantonic has joined #ruby
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby
nomenkun has joined #ruby
end_guy has quit [Remote host closed the connection]
end_guy has joined #ruby
Xeago has joined #ruby
anay has joined #ruby
arya_ has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
nomenkun has quit [Ping timeout: 252 seconds]
<patsToms>
I really liked screencasts about ruby on tutsplus
<patsToms>
fast and clear
rickruby has joined #ruby
x1337807x has quit [Ping timeout: 256 seconds]
NsOmNiAc has quit [Ping timeout: 264 seconds]
jds has quit [Remote host closed the connection]
anay has quit [Remote host closed the connection]
NsOmNiAc has joined #ruby
workmad3 has joined #ruby
jmimi has quit [Ping timeout: 248 seconds]
wsterling has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
anay has joined #ruby
alichherawalla has joined #ruby
alichherawalla has left #ruby [#ruby]
LennyLinux has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
pskosinski has joined #ruby
kofno has quit [Remote host closed the connection]
AlHafoudh has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
AlHafoudh has quit [Client Quit]
DestinyAwaits has left #ruby ["Leaving"]
arya_ has joined #ruby
BizarreCake has joined #ruby
jefflyne has joined #ruby
lewix has quit [Remote host closed the connection]
xardas has joined #ruby
queston has joined #ruby
decoponio has joined #ruby
tobolobo13 has joined #ruby
jds has joined #ruby
Xeago has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 264 seconds]
ForSpareParts has quit [Read error: Connection reset by peer]
ForSpareParts has joined #ruby
tonini has joined #ruby
tobolobo13 has quit []
anay has quit [Remote host closed the connection]
cj3kim has joined #ruby
lys has quit [Quit: lys]
jds has quit [Ping timeout: 256 seconds]
arya_ has quit [Ping timeout: 248 seconds]
fgo has quit [Remote host closed the connection]
tonini has quit [Ping timeout: 248 seconds]
poseid has quit [Quit: poseid]
emmanuelux has joined #ruby
danslo has quit [Quit: danslo]
blackmesa has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 276 seconds]
end_guy has quit [Write error: Connection reset by peer]
tacos1de has quit [Write error: Connection reset by peer]
peta_ has joined #ruby
arya_ has joined #ruby
blackmesa has joined #ruby
Guga_ has joined #ruby
end_guy has joined #ruby
rickruby has joined #ruby
tacos1de has joined #ruby
banjara1 has quit [Ping timeout: 256 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has joined #ruby
decoponio has quit [Quit: Leaving...]
nomenkun has joined #ruby
relix has joined #ruby
relix has quit [Client Quit]
alem0lars has joined #ruby
lewix has joined #ruby
nomenkun has quit [Ping timeout: 248 seconds]
rickruby has quit [Ping timeout: 276 seconds]
haxrbyte has joined #ruby
banjara has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
lewix has quit [Ping timeout: 248 seconds]
haxrbyte has quit [Ping timeout: 256 seconds]
poseid has joined #ruby
workmad3 has quit [Read error: Operation timed out]
Zeeraw has quit [Quit: Computer has gone to sleep.]
nicoulaj has joined #ruby
jds has joined #ruby
haxrbyte has joined #ruby
jimg has quit [Remote host closed the connection]
AlHafoudh has joined #ruby
codecop has quit [Remote host closed the connection]
<alem0lars>
How can I mmap in ruby without using external libraries? Thanks
codecop has joined #ruby
<alem0lars>
I have the file descriptor. I just need to mmap
yacks has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
<apeiros>
I don't think you can mmap without external libs.
ntus1017 has joined #ruby
arya_ has joined #ruby
postmodern has quit [Quit: Leaving]
_Andres has joined #ruby
Kabaka has quit [Ping timeout: 240 seconds]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
leonid__ has quit [Ping timeout: 248 seconds]
<alem0lars>
using syscall(9,...) i can but then it will return the memory address
<alem0lars>
i need to dereference it
mityaz has joined #ruby
<alem0lars>
but i don't know how
<MrZYX>
I've the feeling ruby is the wrong tool for whatever you try to achieve...
zets2 is now known as zets
tk_ has joined #ruby
Kabaka has joined #ruby
<apeiros>
or the arbitrary limitation of "no external libs" is making it the wrong tool…
cj3kim has joined #ruby
freeayu has joined #ruby
workmad3 has joined #ruby
anay has joined #ruby
cj3kim has quit [Ping timeout: 252 seconds]
binw has joined #ruby
<MrZYX>
or he's trying to apply a C-style solution to his problem (whatever it really is)
<bnagy>
alem0lars: read about FFI
<alem0lars>
apeiros, MrZYX: I know, it's a bad style. But this isn't a software. It's just a challenge
<bnagy>
not really sure you can call that an external lib
_serial_ has joined #ruby
<apeiros>
alem0lars: why are you cheating then? :-p
<MrZYX>
alem0lars: you still didn't tell the actual problem. You described the solution you think you need
workmad3 has quit [Ping timeout: 252 seconds]
moos3 has joined #ruby
sepp2k has joined #ruby
Xeago has joined #ruby
lunarjar has joined #ruby
<alem0lars>
I need to read the content for an opened file only having the mmap and brk system calls available (so File.open or File.read would fail)
anay has quit [Remote host closed the connection]
_serial_ has quit [Quit: Ex-Chat]
<MrZYX>
and you have to do that in ruby?
bondar has quit [Ping timeout: 248 seconds]
<alem0lars>
MyZYX: Yes, i cannot even call a C program because I should fork() and this would call the clone() syscall which is forbidden
nomenkun has joined #ruby
<alem0lars>
MrZYX: I cannot only write ruby code
<MrZYX>
weird challenge :P
<alem0lars>
yeah :p
AlHafoudh has quit [Quit: Computer has gone to sleep.]
nomenkun has quit [Ping timeout: 252 seconds]
Trynemjoel has quit [Ping timeout: 245 seconds]
emergion has joined #ruby
jimg has joined #ruby
lewix has joined #ruby
haxrbyte has quit [Remote host closed the connection]
jimg_ has joined #ruby
jimg has quit [Read error: Connection reset by peer]
mityaz has quit [Quit: See ya!]
lunarjar has quit [Quit: Bye]
julweber has joined #ruby
Trynemjoel has joined #ruby
lunarjar has joined #ruby
gildo has joined #ruby
osvico has joined #ruby
lunarjar has quit [Client Quit]
lunarjar has joined #ruby
lewix has quit [Ping timeout: 264 seconds]
lunarjar has quit [Client Quit]
lunarjar has joined #ruby
zmike has quit [Ping timeout: 256 seconds]
madb055 has joined #ruby
nimor has joined #ruby
arietis has joined #ruby
bcarrell has joined #ruby
AlHafoudh has joined #ruby
LennyLinux has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
spider-mario has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
cburyta_ has quit [Remote host closed the connection]
icco has quit [Ping timeout: 240 seconds]
julweber has quit [Remote host closed the connection]
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
icco has joined #ruby
pitzips has quit [Ping timeout: 256 seconds]
sambao21 has joined #ruby
danslo has quit [Read error: Connection reset by peer]
danslo has joined #ruby
emergion has joined #ruby
jbpros has quit [Quit: jbpros]
jmimi has joined #ruby
emergion has quit [Client Quit]
ntus1017 has quit [Remote host closed the connection]
pskosinski has quit [Quit: Til rivido Idisti!]
jbpros has joined #ruby
_ffio_ has joined #ruby
ffio_ has quit [Ping timeout: 264 seconds]
pitzips has joined #ruby
icco has quit [Ping timeout: 256 seconds]
icco has joined #ruby
hogeo has joined #ruby
seejohnrun has joined #ruby
jefflyne has joined #ruby
vlad_starkov has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
yashshah has quit [Ping timeout: 256 seconds]
jimg_ has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 276 seconds]
cj3kim has quit [Ping timeout: 248 seconds]
jbpros has quit [Quit: jbpros]
vlad_starkov has joined #ruby
ninp0 has quit [Ping timeout: 248 seconds]
ntus1017 has joined #ruby
icco has quit [Ping timeout: 252 seconds]
poseid has joined #ruby
icco has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
dv__ is now known as dv_
nimor has quit [Read error: Operation timed out]
zets has quit [Ping timeout: 252 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
emmanuelux has joined #ruby
workmad3 has joined #ruby
seejohnrun has quit [Ping timeout: 252 seconds]
ashleyis_ has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
haxrbyte has joined #ruby
Michael__ has joined #ruby
maxmanders has joined #ruby
lkba has joined #ruby
nomenkun has quit [Ping timeout: 276 seconds]
cj3kim has joined #ruby
echevemaster has quit [Quit: Leaving]
cj3kim has quit [Read error: Connection reset by peer]
jimg has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
tacos1de has joined #ruby
zets has joined #ruby
poseid has quit [Quit: poseid]
subbyyy has joined #ruby
nouitfvf has joined #ruby
jimg has quit [Ping timeout: 252 seconds]
Michael__ has quit [Remote host closed the connection]
nomenkun has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby
workmad3 has joined #ruby
xavier23 has joined #ruby
razi has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Remote host closed the connection]
Zeeraw has joined #ruby
Michael__ has joined #ruby
razi has quit [Quit: Leaving.]
<pontiki>
vasilakisFiL: the other way is in the initialize method
<pontiki>
but if it's always going to be initialized to the same value, Banistergalaxy's way it best, i think
axeman- has joined #ruby
<vasilakisFiL>
do you initialize all your class instance variables?
Faris14 has joined #ruby
Faris14 has quit [Write error: Connection reset by peer]
<pontiki>
no
browndawg has quit [Ping timeout: 264 seconds]
<pontiki>
it very much depends on use
<mickeyd>
how can I initialize an object if I have a hash like so {attribute_name, value} ? I've tried some ways I've seen after googling but I keep getting "method_missing" errors. also of note my "attribute_name" isn't preceeded by a colon... maybe thats the issue?
spider-mario has joined #ruby
<pontiki>
they're in braces like that, mickeyd?
<pontiki>
and is that data or code?
devoldmx has joined #ruby
goshakkk has joined #ruby
<mickeyd>
pontiki, one second I'll post the code snippet...
<pontiki>
ta
<pontiki>
post code with question usually helps quite a bit
<vasilakisFiL>
I would like to have somewhere all my class instance and class variables like C++ or Java
<pontiki>
why vasilakisFiL ? ruby is neither C++ nor Java
<apeiros>
pontiki: also here in irc. and FYI, I'm here for like what? 8 years?
Ortuna has joined #ruby
erry has quit [Read error: Connection reset by peer]
<pontiki>
also smalltolk has the same meaning
<apeiros>
ruby is not smalltalk.
<pontiki>
but it's based a lot on small talk
workmad3 has joined #ruby
Inside has joined #ruby
Inside has quit [Changing host]
Inside has joined #ruby
<apeiros>
sure. but that doesn't make "but language X uses the term for Y" a valid argument.
<mickeyd>
pontiki, tmp_basic_info & t.rows has my information -- but t.combined_columns contains my attributes but not in the correct "names" so I use the hash_map to locate the right "name" for the attribute based on what the value is of t.combined_columns
Akuma has quit [Quit: So long sukkas!]
<apeiros>
it's got a good chance for being the same thing. but it isn't necessarily.
vlad_starkov has quit [Ping timeout: 256 seconds]
erry_ has joined #ruby
<mickeyd>
pontiki, basically what my issue now is though is I have the array "attributes" that has my information I want to initialize my ImportPlayerScrape object with. "attributes" is composed of my "attribute_name" => "value" -- but I don't know how to get that to initialize my object
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
<pontiki>
apeiros: my apologies
alem0lars has quit [Ping timeout: 256 seconds]
yashshah has joined #ruby
<apeiros>
oh, wow. accepted pontiki :)
alem0lars has joined #ruby
DanKnox_away is now known as DanKnox
diabel232 has left #ruby ["discontected"]
<pontiki>
in which case, you are absolutely correct that if vasilakisFiL meant class instance variables, and not just instance variables, then you can't put them in the initialize method
fomatin has quit [Quit: Computer has gone to sleep.]
Guest88115 is now known as yebyen
<pontiki>
mickeyd: is there any reason at all to build up the associations array and not just call ImportPlayerScrape.new with tmp_basic_info and t ?
<pontiki>
i.e. do you use that array anywhere else?
<pontiki>
or is it just to make a single data object to pass in?
<pontiki>
also, is there anywhere else you new up ImportPlayerScrape?
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
<pontiki>
also, the var tmp_basic_info makes me suspicious
cofin has quit [Quit: cofin]
<pontiki>
but i'm bigoted about temporary variables
<mickeyd>
pontiki, well the reason i didn't was t.rows does contain values for the object but I never know which values they're tied to until I scrape the record. For instance, ImportPlayerScrape has like 50 attributes, but on a given scrape I might only use ~25 of them. t.combined_columns is an array that holds which attributes are being pulled into t.rows, but those are not in the correct names that my
<mickeyd>
attributes are so I used hash_map to get the actual attribute name (ex entry in hash_map: "Player.Name" => "player_name")
<mickeyd>
pontiki, i imagine my explanation might be very poorly explained ;/
erry_ is now known as erry
<pontiki>
i see..
<pontiki>
even so, you are pulling that info from t, no?
<pontiki>
do you use t for anything else?
<mickeyd>
t contains combined_columns & my values yes
darth_chatri has joined #ruby
<mickeyd>
t is just "tables.each do |t|" I use it to build up information about a data-table
<mickeyd>
in the instance I'm testing there are 4 data tables on the page so I'm iterating through 4 datatables
<pontiki>
that's from nokogiri?
<mickeyd>
pontiki, yes
<mickeyd>
well im using nokogiri
colonolGron has joined #ruby
<pontiki>
ok, how do you get t.combined_columns?
jmimi has left #ruby [#ruby]
Hensley has joined #ruby
<mickeyd>
pontiki, ok so the datatable that I'm parsing has two header rows... combined_columns combines the two so that I know which cell goes to what attribute. (does that make since?) -- so t.combined_columns is populated by iterating through a "primary_columns" & "secondary_columns" array. By getting the "colspan" attribute of the "th" I was able to determine which secondary_column needed to be prefixed
<mickeyd>
by which primary_column
<pontiki>
here's where i'm driving: you can probably make the datastructure you need to pass into ImportPlayerScrape (which is an odd class name, since it looks like VerbAdjectiveNoun to me)
<mickeyd>
pontiki, haha it probably is I'm fairly new to this xD
danslo has quit [Quit: danslo]
<pontiki>
ah, i think i see
<pontiki>
edit your first gist, and add the table header rows in a new file, please?
darth_chatri has quit [Quit: Leaving.]
<mickeyd>
pontiki, ok
<pontiki>
don't create a new gist for each file, just add them to the first, please?
darth_chatri has joined #ruby
<mickeyd>
ok
<mickeyd>
i'm guessing i need to make an account to add to the first gist?
jimg has joined #ruby
Akuma has joined #ruby
<pontiki>
you don't see an Edit button?
<mickeyd>
pontiki, nope
<pontiki>
i don't know, i'm always logged into github
<mickeyd>
pontiki, i just logged into an account too and nothing im gonna repaste maybe it's because it doesn't know im the author
darth_chatri has quit [Remote host closed the connection]
<pontiki>
is what we're talking about illegal or unethical?
<mickeyd>
??
<pontiki>
nm
fomatin has joined #ruby
geggam has joined #ruby
<mickeyd>
pontiki, when you say you want the table header rows, do you mean the code that builds them or an example of what the rows are?
<pontiki>
the actualy HTML in this case
<mickeyd>
ahh ok
haxrbyte has quit [Remote host closed the connection]
jimg has quit [Ping timeout: 256 seconds]
haxrbyte has joined #ruby
atno has quit [Quit: Leaving]
<pontiki>
also, i guess maybe this is the fundamental question, do you need have an Array of single element Hashes?
<pontiki>
is there a reason associations couldn't be a Hash itself?
Pholey has quit [Remote host closed the connection]
darth_chatri has joined #ruby
julweber has joined #ruby
chxane has joined #ruby
takezawa has quit [Remote host closed the connection]
<pontiki>
s/associations/attributes/
takezawa has joined #ruby
arubin has joined #ruby
tomzx_mac has joined #ruby
<mickeyd>
pontiki, not sure i understand. which object are we talking about
darth_chatri has quit [Client Quit]
jefflyne has joined #ruby
darth_chatri has joined #ruby
blackmesa has joined #ruby
workmad3 has quit [Read error: Operation timed out]
julweber has quit [Remote host closed the connection]
Zolo has joined #ruby
Zolo has quit [Remote host closed the connection]
<pontiki>
mickeyd: so attrubutes is the huge long Array
<pontiki>
each element of that Array is a single element Hash
suporte85 has quit [Remote host closed the connection]
Akuma has joined #ruby
atno has joined #ruby
vlad_starkov has joined #ruby
lethjakm1 has joined #ruby
irmbrady has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
peta_ has quit [Quit: peta_]
ravster has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 256 seconds]
animali has joined #ruby
<animali>
hello hello
<animali>
quick question for the sublime text 2 users
voglster has joined #ruby
<animali>
how can i assign a shortcut key to create <%= %> ?? I don't want to use the git SublimeERB
cj3kim has joined #ruby
<voglster>
hey im a newbie to ruby and im trying to setup guard and rspec but im missing something... anyone have a sec to help me out with my guardfile?
cads has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
tobym has joined #ruby
<voglster>
link to guardfile... the 2nd watch works just fine... but if i edit spec_helper or any of my ruby files in lib it doesnt rerun rspec link to guardfile: http://pastebin.com/vFefYRTv
<mickeyd>
pontiki, those headers that i sent you btw wont alwasy be the same. sometimes there will be more or less, and sometimes there will be different ones
Michael__ has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<pmmu>
I am having trouble with the authenticity_token when calling a controller using curl. First I call the login and get back and authenticity_token and a session cookie. After that when i try to curl a controller directly with the parameters to create a new item (which works without authentication), passing in the authenticity_token and the cookie, I get redirected to the login page. Is there a good tutorial out there for setting up authe
<pmmu>
curl?
nezumi has joined #ruby
gildo has quit [Read error: Operation timed out]
cads has joined #ruby
jimg has joined #ruby
<apeiros>
#rubyonrails ?
darth_chatri has joined #ruby
fridim_ has joined #ruby
atno has quit [Remote host closed the connection]
Ry0_ has joined #ruby
cha1tanya has quit [Ping timeout: 276 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
Steven__ has joined #ruby
jimg has quit [Ping timeout: 276 seconds]
irmbrady has quit [Quit: WeeChat 0.4.0]
cj3kim has quit [Read error: Connection reset by peer]
alainus has joined #ruby
AlHafoudh has quit [Quit: Computer has gone to sleep.]
Michael__ has quit [Remote host closed the connection]
cj3kim has joined #ruby
DanKnox is now known as DanKnox_away
<alainus>
Is there a way I can have the docs of a particular gem for offline reference? I mean, without actually wget-ting the docs web page?
<alainus>
Better yet if it's ruby docs as well
Zolo has joined #ruby
<MrZYX>
I like yard server --gems
Zolo has quit [Read error: Connection reset by peer]
<apeiros>
or just plain ri/yri
ssvo has quit [Ping timeout: 264 seconds]
<mickeyd>
pontiki, thanks for all the help i made a very minor tweak and it's all working now. Thanks for all your help!
Hensley has quit [Quit: Hensley]
rehat has joined #ruby
gildo has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
anay has quit [Remote host closed the connection]
nezumi has quit [Read error: Connection reset by peer]
<alainus>
MrZYX, wow, cool!
pmmu has quit [Ping timeout: 250 seconds]
nezumi has joined #ruby
<alainus>
it doesn't grab the project's gems though. It only worked when using yard server --gems (all the installed gems)
matematikaadit has joined #ruby
<alainus>
do I have to use require "yard" in the project for it to grab that particular project's code?
haxrbyte has quit [Read error: Connection reset by peer]
<alainus>
yardoc shows 0.00% documented
<MrZYX>
a plain yard server should serve the current folder
Zolo has joined #ruby
<MrZYX>
it doesn't parse your Gemfile/gemspec and adds those
cads has quit [Read error: Operation timed out]
<MrZYX>
hm actually there's a -G option
kpwz has quit [Ping timeout: 245 seconds]
ryanhirsch has quit [Quit: Computer has gone to sleep.]
<alainus>
Ahh. It uses Gemfile
<alainus>
no?
<alainus>
this is a plain project not a rails project
<MrZYX>
-G does, yeah
haxrbyte has joined #ruby
<alainus>
oh, so no
Zolo has quit [Ping timeout: 264 seconds]
<alainus>
:P
<MrZYX>
what do you want? only the deps of your gem? or the gem itself?
<alainus>
well no matter. I'll just use yard server --gems
<alainus>
It's even better
<alainus>
and the Ruby docs, can those be offline as well ?
agjacome has joined #ruby
<MrZYX>
sure
<MrZYX>
ri gives man style access
leonid__ has joined #ruby
<MrZYX>
there was some rdoc command to generate html documentation
haxrbyte_ has joined #ruby
<MrZYX>
yard doesn't do offline stdlib documentation yet afaik
nbouscal has joined #ruby
Guga_ has quit [Quit: ~]
tonini has joined #ruby
<MrZYX>
how did you install ruby?
havenwood has quit [Remote host closed the connection]
<alainus>
MrZYX,
<alainus>
using RVM
<MrZYX>
then checkout rvm help doc or something like that
ssvo has joined #ruby
haxrbyte has quit [Ping timeout: 276 seconds]
cburyta_ has quit [Remote host closed the connection]
zmike has quit [Quit: ~]
Desert_eagle has quit [Read error: Connection reset by peer]
<alainus>
yep. rvm docs generate it seems
<alainus>
thanks
mityaz has joined #ruby
DanKnox_away is now known as DanKnox
nezumi has quit [Ping timeout: 264 seconds]
LennyLinux is now known as Virunga
Desert_eagle has joined #ruby
havenwood has joined #ruby
havenwood has quit [Remote host closed the connection]
axeman- has quit [Remote host closed the connection]
marcdel has joined #ruby
leonid__ has quit [Ping timeout: 276 seconds]
jeremy_c has quit [Read error: Connection reset by peer]
JZTech101 has quit [Read error: Connection reset by peer]
jeremy_c has joined #ruby
tonini has quit [Ping timeout: 248 seconds]
tobym has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
tobym has joined #ruby
_seanc_ has joined #ruby
procrastubator has joined #ruby
dysth has joined #ruby
ryanhirsch has joined #ruby
ryanhirsch has quit [Max SendQ exceeded]
ryanhirsch has joined #ruby
brennanMKE has joined #ruby
ezkl has joined #ruby
braincrash has joined #ruby
bcarrell has quit [Quit: bcarrell]
ananthakumaran has quit [Quit: Leaving.]
tobym_ has joined #ruby
ashleyis_ has quit [Quit: WooChat 0.4.2-dev]
alem0lars has quit [Quit: Leaving]
fomatin has quit [Quit: Computer has gone to sleep.]
tobym has quit [Ping timeout: 276 seconds]
Virunga is now known as Notte
haxrbyte_ has quit [Read error: Connection reset by peer]
braincrash has quit [Ping timeout: 276 seconds]
_seanc_ has quit [Quit: _seanc_]
freerobby has quit [Quit: Leaving.]
matematikaadit has quit [Quit: Leaving]
poga has quit [Remote host closed the connection]
cburyta_ has joined #ruby
tonini has joined #ruby
devoldmx3 has joined #ruby
rehat has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 252 seconds]
cburyta_ has quit [Ping timeout: 246 seconds]
nezumi has joined #ruby
flaritycat has joined #ruby
kevinykchan has joined #ruby
<flaritycat>
Hi, anyone who could help me with a simple problem? I have Ubuntu 12.04 , Ruby installed and Rubygame(with all packages req) , still get this error described in 3.1 here http://docs.rubygems.org/read/chapter/19
peta_ has joined #ruby
Ry0_ has quit [Remote host closed the connection]
pipework has quit [Remote host closed the connection]
<popl>
flaritycat: What's the error that *you* are getting? There's a pastebin URL in the topic.
cj3kim has quit [Read error: Connection reset by peer]
<popl>
flaritycat: when you run those commands from the rubygems site do you have conflicting results?
marcdel has quit [Read error: Connection reset by peer]
whowantstolivefo has quit [Remote host closed the connection]
matematikaadit has joined #ruby
atmosx has joined #ruby
jimg has joined #ruby
matematikaadit has quit [Max SendQ exceeded]
matematikaadit has joined #ruby
<flaritycat>
popl: Ive tried them all, still the same.
<popl>
the same what?
greenarrow|2 has quit [Read error: Connection reset by peer]
tobym has joined #ruby
marcdel has joined #ruby
<flaritycat>
Hm, I problably didnt understand you. I have tried the "fix" at rubygems but no luck
yashshah has joined #ruby
jimg has quit [Ping timeout: 256 seconds]
poseid has quit [Quit: poseid]
tobym_ has quit [Ping timeout: 264 seconds]
NeilCarvalho has quit [Quit: NeilCarvalho]
<flaritycat>
I think I have figured it out though.. The installation is off.
v0n has joined #ruby
<popl>
that is vague :P
NsOmNiAc has quit [Ping timeout: 276 seconds]
NeilCarvalho has joined #ruby
fomatin has joined #ruby
<popl>
by off do you mean you don't have rubygame installed?
NsOmNiAc has joined #ruby
procrastubator has quit [Ping timeout: 250 seconds]
Mon_Ouie has quit [Ping timeout: 256 seconds]
Michael__ has quit [Remote host closed the connection]
Michael__ has joined #ruby
nezumi has quit [Read error: Connection reset by peer]
Michael__ has quit [Read error: Connection reset by peer]
nezumi has joined #ruby
Michael__ has joined #ruby
_seanc_ has quit [Quit: _seanc_]
Nisstyre has joined #ruby
Steven__ has quit [Remote host closed the connection]
tonini_ has joined #ruby
tonini has quit [Quit: Lost terminal]
tonini_ has quit [Remote host closed the connection]
tonini has joined #ruby
thebastl has joined #ruby
Ry0_ has joined #ruby
krainboltgreene has quit [Ping timeout: 256 seconds]
reset has joined #ruby
m8 has joined #ruby
erikgj has joined #ruby
lewix has joined #ruby
BizarreCake has quit [Read error: Operation timed out]
freerobby has quit [Quit: Leaving.]
tonini has quit [Remote host closed the connection]
krainboltgreene has joined #ruby
<flaritycat>
popl: Well, yeah I have them installed. But they are not in the right folder :)
<flaritycat>
So my ruby cant find the files.
Notte has quit [Remote host closed the connection]
wu_lmao has quit [Read error: Operation timed out]
thebastl has quit [Remote host closed the connection]
rickmasta has joined #ruby
vasilakisFiL has joined #ruby
gildo has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
atno has joined #ruby
erikgj has quit [Remote host closed the connection]
tonini has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
erikgj has joined #ruby
erikgj has quit [Client Quit]
Steven__ has joined #ruby
thebastl has joined #ruby
tkuchiki has joined #ruby
nezumi has quit [Ping timeout: 248 seconds]
Jork1 has joined #ruby
flaritycat has quit [Remote host closed the connection]
danslo has joined #ruby
tkuchiki has quit [Ping timeout: 248 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
gildo has joined #ruby
Alina-malina has joined #ruby
osvico has quit [Ping timeout: 248 seconds]
jonahR has quit [Ping timeout: 256 seconds]
Squarepy has joined #ruby
tobym has quit [Remote host closed the connection]
jds has quit [Remote host closed the connection]
wu_lmao has joined #ruby
jonahR has joined #ruby
havenwood has joined #ruby
sventon has joined #ruby
bcarrell has joined #ruby
jds has joined #ruby
CaptainJet has joined #ruby
poseid has joined #ruby
_serial_ has joined #ruby
xavier23 has quit [Quit: xavier23]
sepp2k1 has joined #ruby
flaritycat has joined #ruby
kindjal has joined #ruby
ntus1017 has quit [Remote host closed the connection]
sventon has quit [Ping timeout: 256 seconds]
sepp2k has quit [Ping timeout: 276 seconds]
sventon has joined #ruby
kindjal has quit [Client Quit]
jbpros has joined #ruby
cburyta_ has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
NeilCarvalho has quit [Quit: NeilCarvalho]
viszu has quit [Quit: Leaving.]
_Andres has quit [Quit: jazz]
jimg has joined #ruby
ryanhirsch has quit [Quit: Computer has gone to sleep.]
freerobby has joined #ruby
prophile has quit [Changing host]
prophile has joined #ruby
jds has quit [Remote host closed the connection]
mickeyd has left #ruby [#ruby]
relix has joined #ruby
jbpros has quit [Ping timeout: 256 seconds]
<krainboltgreene>
More gems need to be made with objects in mind.
youngnico has left #ruby [#ruby]
jimg has quit [Ping timeout: 264 seconds]
DaniG2k has joined #ruby
sventon has quit [Remote host closed the connection]
sventon has joined #ruby
fomatin has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
Rolenun has joined #ruby
<apeiros>
krainboltgreene: what leads you to this conclusion?
tonini has quit [Remote host closed the connection]
<krainboltgreene>
apeiros: Which part?
DrCode has joined #ruby
<apeiros>
the whole
<krainboltgreene>
I'm making two assertions: Gems aren't made with objects in mind, and that making an gem with objects in mind is good.
ehaliewicz has joined #ruby
Mars1 has joined #ruby
<krainboltgreene>
We have a whole host of tools that are used because the underlying structure of a lot of gems don't allow for reflection and introspection of their objects. Either they're things like singleton methods on modules or the objects are huge hulking beasts.
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Notte has joined #ruby
kindjal has joined #ruby
<krainboltgreene>
I look at my rails app and see lots of small reasonable objects that do one thing and see other apps that have monolithic controllers, models, and helpers and see the same thing.
kindjal has quit [Client Quit]
<Rolenun>
does anyone have a good reference for implementing multidimensional arrays?
<krainboltgreene>
I'm writing an add-on for a gem, where the gem's main datastore is Redis. I'd like to use Postgres, but I have to essentially rewrite the gem because they don't use a detached object architecture for me to overwrite or push in my own objects.
<apeiros>
Rolenun: nested arrays not good enough?
<apeiros>
krainboltgreene: I see
<krainboltgreene>
It should be as simple as "Here, use my object instead of the original object".
<sventon>
hi all
<sventon>
I have a small problem with how to write regular expressions
<sventon>
want to match both "" and ''
<krainboltgreene>
I also see a ton of gems with fancy block dsls, where instead of the block DSLs just being a wrapper for a host of objects, it's a mangled mess of instance_exec(&block)
<Rolenun>
apelros: they would be my last choice, if given an option. I've been tinkering with matrix and vector for better code readability
<sventon>
like:
<sventon>
"\'bb\'".match(/('|")(.*)('|")/)
freerobby has quit [Quit: Leaving.]
nomenkun has quit [Remote host closed the connection]
freerobby has joined #ruby
<krainboltgreene>
Rolenun: Check the std lib, there are some very unused classes available.
<krainboltgreene>
Like, did you know Ruby has a linda (distributed code network) implementation in std lib? No one uses it of course.
<krainboltgreene>
sventon: Regex can be complicated for matching pairs.
<krainboltgreene>
sventon: Use a scanner instead.
<krainboltgreene>
You CAN do it in Regex, it's just the next time you look at that regex you'll be like "What the fuck is this?"
marcdel has joined #ruby
takezawa has quit [Remote host closed the connection]
Michael__ has quit [Remote host closed the connection]
Myconix has joined #ruby
jalcine has quit [Excess Flood]
Michael__ has joined #ruby
sventon has quit [Ping timeout: 256 seconds]
leonid__ has joined #ruby
kleinerdrache has quit [Quit: Ex-Chat]
atmosx has quit [Quit: Computer has gone to sleep.]
Steven__ has quit [Remote host closed the connection]
Michael__ has quit [Ping timeout: 276 seconds]
dash_ has joined #ruby
rsahae has joined #ruby
Ry0_ has quit [Ping timeout: 246 seconds]
jhn has joined #ruby
flaritycat has quit [Remote host closed the connection]
danslo has quit [Quit: danslo]
staafl_alt has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
pipework has quit [Quit: Fucking off to play League of Legends :(]
nycjv321 has joined #ruby
jds has joined #ruby
poseid has quit [Quit: poseid]
sventon has joined #ruby
<nycjv321>
hello. I have one 2 .rb files that both include a module. My question is does the state of the module change between each file during the run of the application if the first .rb calls the second .rb ?
jalcine has joined #ruby
<nycjv321>
In the module I have methods such as def blah; @blah ||= Blah.new; end; and it seems that although I instantiate a new instance of blah in the first .rb when I call the second .rb from the first blah is @blah is reintialized
staafl has quit [Ping timeout: 276 seconds]
<nycjv321>
reinstantiated* is this expected?
freerobby has quit [Quit: Leaving.]
x1337807x has joined #ruby
rsahae has quit [Quit: rsahae]
rickmasta has quit [Quit: Leaving...]
rsahae has joined #ruby
dash_ has quit [Quit: Time to beer :)]
chridal has quit [Quit: WeeChat 0.4.0]
tommylommykins has quit [Quit: leaving]
takezawa has joined #ruby
sventon has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
asgardBSD has joined #ruby
ssvo has quit [Ping timeout: 246 seconds]
colonolGron has joined #ruby
postmodern has joined #ruby
asgardBSD has quit [Remote host closed the connection]
troker has quit [Quit: troker]
Speed has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
kevinykchan has joined #ruby
<apeiros>
nycjv321: "I have one 2"? - do you have one or two? :)
alyi has joined #ruby
<apeiros>
and files can't call files. you can require or load files.
DaniG2k has quit [Quit: Leaving.]
bcarrell has quit [Quit: bcarrell]
thebastl has quit [Remote host closed the connection]
leonid__ has quit [Ping timeout: 256 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darth_chatri has quit [Quit: Leaving.]
Jork1 has quit [Ping timeout: 246 seconds]
Squarepy has quit [Quit: Leaving]
pootler__ has quit [Remote host closed the connection]
pootler_ has quit [Remote host closed the connection]
pootler has quit [Remote host closed the connection]
Guest72299 is now known as Freeaqingme
rsahae has quit [Quit: rsahae]
jonahR has quit [Quit: jonahR]
zeromodulus has quit [Remote host closed the connection]
poseid has joined #ruby
pootler has joined #ruby
jimg has joined #ruby
tommylommykins has joined #ruby
x1337807x has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
<nycjv321>
apeiros: 2 sorry. So the first .rb is the driver and the second is a utility method class. I'm not sure why the state of the instance variable of the module changes that is my question. The first and second module include the same module where the object state seems to change
<nycjv321>
They are interacting with another module.... So file 1 is an RSpec test. File 2 is a utility module. The third file is the module that they both include
thesheff17 has quit [Ping timeout: 264 seconds]
<nycjv321>
The state of the included module seems to differ between the RSpec test and the Utility module
jimg has quit [Ping timeout: 246 seconds]
kirun has quit [Quit: Client exiting]
sayd has quit [Ping timeout: 260 seconds]
yankov has joined #ruby
yankov has left #ruby [#ruby]
gerty_ has quit [Quit: leaving]
atmosx has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
eldariof has quit [Ping timeout: 246 seconds]
nbouscal has quit [Ping timeout: 256 seconds]
<nycjv321>
I think I see whats wrong
<nycjv321>
basic OO
* nycjv321
is a noob!
alyi has quit [Remote host closed the connection]
snearch has joined #ruby
xardas has quit [Ping timeout: 276 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has quit [Read error: Connection reset by peer]