<eam>
ulimits are too low for me to hit it on eval_in
<eam>
I get a [bug] with 100k on linux and over 7080 on osx
sepp2k1 has joined #ruby
beef-wellington has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
lolmaus has quit [Ping timeout: 240 seconds]
St_Marx has quit [Ping timeout: 264 seconds]
arescorpio has joined #ruby
sepp2k has quit [Ping timeout: 244 seconds]
thagomizer has quit [Quit: Leaving.]
mary5030 has joined #ruby
nfk has quit [Quit: yawn]
<eam>
zenspider: ah, /usr/bin/ruby on osx doesn't repro
lukevinc has quit [Quit: ChatZilla 0.9.91 [Firefox 24.8.0/20000101000000]]
<eam>
but my rvm'd rubies do
hanjianwei has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
musl has joined #ruby
musl has quit [Client Quit]
cndiv has quit [Ping timeout: 260 seconds]
<zenspider>
interesting...
jottr has joined #ruby
Scotteh has quit [Ping timeout: 258 seconds]
tier has quit [Remote host closed the connection]
ldnunes has joined #ruby
x77686d has quit [Quit: x77686d]
jdj_dk has quit [Ping timeout: 255 seconds]
chrisseaton has left #ruby [#ruby]
GriffinHeart has quit [Remote host closed the connection]
Wolland_ has quit [Remote host closed the connection]
ldnunes has quit [Client Quit]
<apeiros>
toretore: you do
jottr has quit [Ping timeout: 245 seconds]
Wolland has joined #ruby
ldnunes has joined #ruby
MCDev has joined #ruby
<apeiros>
toretore: oh, wait, isbn - no, I wrote an iban lib
St_Marx has joined #ruby
<apeiros>
last time I had to do with isbn is >10y ago :D
<apeiros>
(and that was with perl)
axl_ has joined #ruby
stantona has quit [Ping timeout: 255 seconds]
mjwhitta has joined #ruby
brandonshowers has joined #ruby
Wolland has quit [Ping timeout: 240 seconds]
dx7_ has joined #ruby
brandonshowers has quit [Client Quit]
levisbakalinsky has joined #ruby
levisbakalinsky has quit [Max SendQ exceeded]
levisbakalinsky has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
larissa has joined #ruby
tokik has joined #ruby
danijoo has joined #ruby
cleopatra has joined #ruby
dx7 has quit [Ping timeout: 245 seconds]
dx7_ has quit [Ping timeout: 246 seconds]
musl has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
insaneinside has joined #ruby
doodlehaus has quit [Remote host closed the connection]
sarlalian has quit [Quit: WeeChat 0.4.2]
sarlalian has joined #ruby
<insaneinside>
How widely is dRuby (DRb) used? Anyone want to argue that it's a very useful utility?
i_s has quit [Remote host closed the connection]
wildharvest has quit []
i_s has joined #ruby
<volty>
is it possible & easy to define a lazy product enumerator ?
<volty>
s/define/code/
nonks has joined #ruby
carif has joined #ruby
<insaneinside>
volty: well, i was about to say "bored television salesman."
<insaneinside>
:P
<insaneinside>
volty: what do you mean by "product"?
freerobby has joined #ruby
<volty>
the same as Array#product
<volty>
I cannot do it with arrays since in ruby they are not lazy
i_s has quit [Ping timeout: 244 seconds]
lolmaus has joined #ruby
tjbiddle has joined #ruby
<volty>
i've done in the past similar things,just asking to see if something new & lazy is there
<insaneinside>
ah, i see what you mean -- you want deferred calculation/evaluation...
<cleopatra>
hello ruby people
<volty>
yes - for list comprehensions
oo_ has joined #ruby
hamakn has joined #ruby
sevenseacat has joined #ruby
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<insaneinside>
well, my take would be to look up the source code for Array#product and create an array subclass that yields instead of appending each sub-result to the output array...
<volty>
no, i want to pull from many arrays | enums
mjwhitta has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
charliesome_ has joined #ruby
<insaneinside>
what do you mean?
ghostmoth has joined #ruby
doodlehaus has joined #ruby
hamakn has quit [Ping timeout: 255 seconds]
<volty>
all of the args should be lazy --- lazy product of (lazy) enums // if you do it with arrays and the first one is very very big ...
charliesome has quit [Ping timeout: 255 seconds]
<toretore>
apeiros: ah right, iban != isbn :P
<toretore>
i ended up writing a simple ISBN class
<toretore>
it's not very complicated
<volty>
going to lay down over it, gn
volty has quit [Quit: Konversation terminated!]
ldnunes has quit [Quit: Leaving]
axl_ has quit [Quit: axl_]
<toretore>
i just found out the various parts of an isbn are variable in length .. :/
krisquigley has joined #ruby
<arrubin>
There is more than one type of ISBN.
<toretore>
there is only one, with 13 and 10 digit representations
<toretore>
the isbn itself is 9 digits
Lewix has joined #ruby
Lewix has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ki0 has joined #ruby
cirn0 has quit [Quit: Leaving]
krisquig_ has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
Chinaski has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
jespada has quit [Quit: Leaving]
Wolland has joined #ruby
justinmburrous has joined #ruby
reinaldob has quit [Remote host closed the connection]
oo_ has quit [Read error: Connection reset by peer]
krisquig_ has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<arrubin>
I see.
oo_ has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
_ixti_ has quit [Ping timeout: 272 seconds]
Wolland has joined #ruby
ki0 has quit [Ping timeout: 260 seconds]
lampd1_ has joined #ruby
x77686d has joined #ruby
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
Blizzy has quit [Ping timeout: 244 seconds]
krisquig_ has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adamnbowen has quit [Ping timeout: 244 seconds]
justinmburrous has quit [Ping timeout: 246 seconds]
livathinos has joined #ruby
BadQuanta1 has quit [Ping timeout: 272 seconds]
goodenough has joined #ruby
<toretore>
well, technically they're two types, but the 10-digit version can be converted to a 13-digit one
krisquigley has joined #ruby
linojon has joined #ruby
axl_ has joined #ruby
axl_ has quit [Client Quit]
krisquig_ has quit [Read error: Connection reset by peer]
GriffinHeart has joined #ruby
justin_pdx has joined #ruby
Kricir has joined #ruby
mary5030 has quit [Remote host closed the connection]
x77686d has quit [Client Quit]
livathin_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
lampd1_ has quit [Ping timeout: 258 seconds]
tylersmith has joined #ruby
livathin_ has quit [Client Quit]
krisquig_ has joined #ruby
xymbol has joined #ruby
tkuchiki has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
hanjianwei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cya]
Wolland has quit [Remote host closed the connection]
Wolland has joined #ruby
Asher has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
livathinos has quit [Ping timeout: 258 seconds]
jonr22 has quit [Remote host closed the connection]
krisquigley has joined #ruby
mary5030 has joined #ruby
GriffinHeart has quit [Ping timeout: 250 seconds]
<xymbol>
Quick question: is there a way to do mruby on ruby?
jasooon has joined #ruby
izzol has quit [Ping timeout: 245 seconds]
<xymbol>
-- i.e. calling an mruby interpreter from a host ruby app.
jonr22 has joined #ruby
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krisquigley has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
krisquigley has joined #ruby
troyready has quit [Ping timeout: 260 seconds]
Wolland has quit [Ping timeout: 255 seconds]
djbkd has quit [Quit: My people need me...]
monkeypatch has joined #ruby
reinaldob has joined #ruby
lw has quit [Quit: s]
krisquigley has quit [Read error: Connection reset by peer]
krisquig_ has joined #ruby
<benzrf>
xymbol: why
ghostmoth has quit [Quit: ghostmoth]
<benzrf>
fun fact: in haskell ALL THINGS ARE LAZY ALL THE TIME FOREVER
<benzrf>
toretore: iban
<benzrf>
isnt that a runescape dude
phutchins has quit [Ping timeout: 265 seconds]
<xymbol>
benzrf: In order to have user-supplied algorithms in Ruby that don't share the host app's context.
<benzrf>
i bet jruby would be good at that
<xymbol>
If the purpose of mruby is to be embeddable, why not within a ruby app? :-)
bricker`work has quit [Ping timeout: 240 seconds]
krisquigley has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
<benzrf>
heck if i know!!
thumpba_ has quit [Ping timeout: 260 seconds]
<xymbol>
Not having a "full" ruby would also be a plus.
<xymbol>
I mean, w/o the standard library and so on.
<xymbol>
Anyway, will keep asking.
<insaneinside>
xymbol: somehow I doubt the C-level data types are compatible -- so sharing data would be somewhat problematic unless you wanted to recreate it.
krisquig_ has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
xcyclist has quit [Quit: Page closed]
dvabr has quit [Ping timeout: 272 seconds]
thumpba has joined #ruby
<xymbol>
insaneinside: I'm fine recreating. There's johnson and therubyracer so I'm sure this is doable.
krisquig_ has quit [Read error: Connection reset by peer]
_whitelogger has joined #ruby
xenomorph has joined #ruby
drPoggs has joined #ruby
charliesome_ has quit [Ping timeout: 260 seconds]
machty_ has joined #ruby
SpaceKookie has joined #ruby
leslie has joined #ruby
krisquig_ has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
iaj_ has joined #ruby
_chs__ has joined #ruby
daxroc_ has joined #ruby
musicmatze1 has joined #ruby
ohcibi has joined #ruby
jasooon_ has joined #ruby
BraddBitt has joined #ruby
lemur_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
mayamai has joined #ruby
adambeynon_ has joined #ruby
n1ftyn8_ has joined #ruby
HashNuke_ has joined #ruby
casual_ has joined #ruby
krisquigley has joined #ruby
Tranquility____ has joined #ruby
patric100e99 has joined #ruby
ionelmc-not-here has joined #ruby
troter__ has joined #ruby
endash_ has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
Hightower_ has quit [Ping timeout: 272 seconds]
iamayam has quit [Ping timeout: 272 seconds]
iaj has quit [Read error: Connection reset by peer]
musicmatze has quit [Ping timeout: 272 seconds]
Nigel_ has joined #ruby
sparr_ has joined #ruby
samflores_ has joined #ruby
skmp_ has joined #ruby
bluehavana_ has joined #ruby
MiracleBlue_ has joined #ruby
poguez_ has joined #ruby
kalleth_ has joined #ruby
andrewstewart_ has joined #ruby
thesheff17_ has joined #ruby
charles81___ has joined #ruby
akitada___ has joined #ruby
blz37 has quit [Ping timeout: 272 seconds]
mayamai is now known as iamayam
BraddPitt has quit [Ping timeout: 272 seconds]
endash_ is now known as endash
pmarreck has joined #ruby
machty_ has joined #ruby
im0b has joined #ruby
kapowaz has joined #ruby
ckrailo_ has joined #ruby
Trieste has joined #ruby
leslie has joined #ruby
xenomorph has joined #ruby
pmarreck has quit [Changing host]
kapowaz has quit [Changing host]
machty_ has quit [Changing host]
im0b has quit [Changing host]
ckrailo_ has quit [Changing host]
xenomorph has quit [Changing host]
Trieste has quit [Changing host]
leslie has quit [Changing host]
ikanobori_ has joined #ruby
incomprehensibly has joined #ruby
heftig has joined #ruby
Hightower_ has joined #ruby
ndrst_ has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
HashNuke_ is now known as HashNuke
vcoinminer______ has joined #ruby
reprazent has joined #ruby
casual_ is now known as casual
jhass|off has joined #ruby
JStoker has joined #ruby
adambeynon_ is now known as adambeynon
krisquigley has quit [Read error: Connection reset by peer]
ceej has joined #ruby
freerobby has quit [Quit: Leaving.]
elektronaut has joined #ruby
troter__ is now known as troter_
daxroc_ is now known as daxroc
_chs__ is now known as _chs_
jhass|off is now known as jhass
Jello_Raptor has joined #ruby
tekacs has joined #ruby
phrozen77 has joined #ruby
krisquigley has joined #ruby
jokke has joined #ruby
n1ftyn8_ is now known as n1ftyn8
charliesome has joined #ruby
poguez_ is now known as poguez
skmp_ is now known as skmp
andrewstewart_ is now known as andrewstewart
Affix_ has joined #ruby
Tranquility____ is now known as Tranquility___
Affix_ is now known as Affix
gccostabr has quit [Ping timeout: 272 seconds]
bluehavana_ is now known as bluehavana
lele has joined #ruby
SegFaultAX has joined #ruby
az has joined #ruby
ionelmc-not-here is now known as ionelmc
reinaldob has quit [Ping timeout: 272 seconds]
ionelmc is now known as Guest75861
charles81___ is now known as charles81__
thesheff17_ is now known as thesheff17
echooo has quit [Ping timeout: 262 seconds]
echooo has joined #ruby
freerobby has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
heyimwill has joined #ruby
Mia has quit [Read error: Connection reset by peer]
MiracleBlue_ is now known as MiracleBlue
krisquigley has joined #ruby
gccostabr has joined #ruby
unclouded has joined #ruby
end_guy has quit [Remote host closed the connection]
phutchins has joined #ruby
justin_pdx has joined #ruby
_whitelogger_ has joined #ruby
Trieste has joined #ruby
snath has quit [Ping timeout: 260 seconds]
eval-in_ has quit [Ping timeout: 260 seconds]
nanoyak has quit [Ping timeout: 260 seconds]
_KaszpiR_ has quit [Ping timeout: 260 seconds]
matchaw has quit [Ping timeout: 260 seconds]
msx has quit [Ping timeout: 260 seconds]
tzero has quit [Ping timeout: 260 seconds]
Gnubie_ has quit [Ping timeout: 260 seconds]
rblackwe_ has quit [Ping timeout: 260 seconds]
frankS2 has joined #ruby
ruisantos has joined #ruby
teejar has joined #ruby
mclee has quit [Ping timeout: 260 seconds]
bbloom_ has joined #ruby
oinkon has joined #ruby
krisquig_ has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
<oinkon>
In ruby are classes themselves objects?
gccostabr has quit [Client Quit]
sepp2k has joined #ruby
<insaneinside>
oinkon: if you don't look too closely, yes.
Norrin has joined #ruby
Guest75861 has quit []
<benzrf>
oinkon: forget your primitive java notions of clsases
ckrailo__ has joined #ruby
hamakn has joined #ruby
<benzrf>
oinkon: ruby classes are just objects that are instances of Class
<benzrf>
and it so happens that there's a nice syntax for creating the
_KaszpiR__ has joined #ruby
maZtah_ has joined #ruby
<benzrf>
m
iiinzg has quit [Ping timeout: 255 seconds]
musl_ has joined #ruby
eval-in__ has joined #ruby
<insaneinside>
so what's a Class?
<insaneinside>
(THAT'S LOOKING TOO CLOSELY GO AWAY!)
ericwood_ has joined #ruby
im0b_ has joined #ruby
iinzg has joined #ruby
krisquigley has joined #ruby
vieq has quit [Ping timeout: 250 seconds]
queequeg2 has joined #ruby
cbetta_ has joined #ruby
<oinkon>
benzrf: i'm coming from javascript not java. there really is no such thing as a class. we fake it sometimes with objects and prototypes
ionelmc_ has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
SegFaultAX_ has joined #ruby
kapowaz_ has joined #ruby
end_guy has joined #ruby
Gnubie__ has joined #ruby
orionstein_ has joined #ruby
pmarreck_ has joined #ruby
benlakey_ has joined #ruby
flagg0204_ has joined #ruby
matchaw_ has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
gremax_ has joined #ruby
DanKnox_ has joined #ruby
napcae_ has joined #ruby
RaCx_ has joined #ruby
SirCmpwn_ has joined #ruby
nanoyak_ has joined #ruby
multi_io has joined #ruby
pasv has joined #ruby
duncan1 has joined #ruby
Maxdaman1us has joined #ruby
machty__ has joined #ruby
echooo has quit [Quit: echooo]
drjfreez1 has joined #ruby
<benzrf>
oh o k
kobain has quit [Ping timeout: 272 seconds]
rblackwe has joined #ruby
echooo has joined #ruby
mumblet has joined #ruby
frankS2 has joined #ruby
<benzrf>
>> Class.class.equal? Class
dr_toboggan has joined #ruby
karupas has joined #ruby
ballPointPenguin has quit [Ping timeout: 272 seconds]
<shevy>
you can also have both a class method and an instance (instantiable) method from a module, upon inclusing into a class; e. g. module Foo; def bar; puts 'bar'; end; module_function :bar; end; class Ble; include Foo; end
duncannz has quit [Ping timeout: 240 seconds]
<shevy>
*upon inclusion
<shevy>
it's way too early here to type :(
freezey has joined #ruby
badhatter has joined #ruby
Wolland has quit [Ping timeout: 260 seconds]
justinmburrous has quit [Remote host closed the connection]
neoxquick has quit [Read error: Connection reset by peer]
justinmburrous has joined #ruby
<twoshot_>
i didn't fully follow that
<twoshot_>
i would think that what you said would be intuitively true
<twoshot_>
but they all look like class methods
<twoshot_>
and i don't understand :bar or "def bar;" (specifically the semicolon)
mistermocha has quit [Ping timeout: 260 seconds]
bricker`work has joined #ruby
freezey has quit [Ping timeout: 246 seconds]
x77686d has joined #ruby
x77686d has quit [Client Quit]
<sinequanon>
:bar is a symbol, def bar; ...; end; is a one-line instance method
<sinequanon>
twoshot_: ^
Guest19507 has quit [Quit: Leaving]
<shevy>
twoshot_ well the thing is - there is not much difference between a class and a module in ruby. a module is basically a crippled class
MSY has joined #ruby
MSY is now known as Guest62689
doug1 has joined #ruby
insaneinside has quit [Ping timeout: 244 seconds]
<shevy>
twoshot_ all methods will return their names as a symbol, unless they can return something meaningful
<shevy>
well you said that you would not use a constant submodule
<shevy>
yet there are plenty of constants
<shevy>
so how would you use them?
<sinequanon>
right, i'm suggesting that'd I'd have MyModule::RPL_WELCOME
<tmoore>
IMO if you're putting all of your constants into one Contants module... that's not that good
<sinequanon>
vs. MyModule::Constants::RPL_WELCOME
<shevy>
k so you put them all into what file exactly?
<shevy>
nope
<shevy>
I don't have to type the above; I include it of course
<tmoore>
put each constant with the code that uses it
<sinequanon>
^
<shevy>
so if you have 100 .rb file
<tmoore>
if you have lots of code all over the place sharing a constant, that's a design problem
<shevy>
how do you solve that?
nheinrich has joined #ruby
<twoshot_>
what about database connection strings?
<twoshot_>
that's not a design problem, and lots of code all over the place will use it
<tmoore>
doesn't matter if it's 10 files, 100 files or 1000 files... you need some degree of modularity in your code or all hope is lost
<tmoore>
I challenge your assumption that code all over the place should be using a database connection string :-)
<shevy>
well you did not answer the question - if different files require different constants, how do you make use of that? do you put individual constants into separate .rb files and only load those constants?
<tmoore>
you want one class that manages your database connection
Macaveli has joined #ruby
<tmoore>
"4:56 PM <tmoore> put each constant with the code that uses it"
<sinequanon>
i'm sorta confused why you'd include constants, rather than just declaring them
bthesorceror has quit [Ping timeout: 255 seconds]
<shevy>
tmoore that does not solve the issue that different part of the code can require different and multiple constants
<twoshot_>
well, for instance, in c#, i suppose you could wrap creation of a database connection
<shevy>
sinequanon they are already "declared" - in their own namespace
<twoshot_>
ok, yeah, i think you're right
<twoshot_>
i think i've been looking at too much terrible asp code from the company that bought us :)
<tmoore>
shevy: I don't understand what the issue is
<sinequanon>
shevy: i'm not understanding either
<shevy>
k you guys show me your big projects?
<sinequanon>
pass
<sinequanon>
the size of the project is irrelevant
<shevy>
k so you don't have anything to show
<sinequanon>
haha
<shevy>
what is the maximum amount of constants you have used in any of your projects so far?
<sinequanon>
i think you're missing the point
<sevenseacat>
yeah shevy's kind of a troll.
<shevy>
i think you are like 5 constant guys
<tmoore>
shevy: don't be rude. I've worked on big projects.
<shevy>
ok link?
<tmoore>
Not open source
<shevy>
ohhhh ;-)
<sinequanon>
i'm at 7.5 constant guy
<sinequanon>
a*
<tmoore>
OK assuming that you're trolling and going back to work
<shevy>
you can assume all you want - as a factual statement: you don't have a big project to show where you use lots of constants.
<shevy>
those are all in: cinch-2.0.3/lib/cinch/constants.rb
<shevy>
that's not even many constants!
yfeldblum has quit [Remote host closed the connection]
<sinequanon>
i see the point of having a constants.rb -- they have to live somewhere afterall -- but i still don't understand the benefits of the Constants module
AlexRussia has quit [Remote host closed the connection]
<raddy>
Hello
<raddy>
Anybody uses sonarqube here?
jimbach has quit [Ping timeout: 260 seconds]
freezey has quit [Ping timeout: 245 seconds]
bricker`work has joined #ruby
<sevenseacat>
i mean, what is rails
<sevenseacat>
how is rails formed
AlexRussia has joined #ruby
<shevy>
by driving over some cats
<dave_1734>
Ah.. sorry.. that seems to do it.. I need auth to get into it.
kaspergrubbe_ has quit [Remote host closed the connection]
<dave_1734>
private as.
<shevy>
it's a channel for the elites, after all
Darryl has joined #ruby
<shevy>
unlike #ruby, which is free for all
it0a has quit [Ping timeout: 258 seconds]
ephemerian has joined #ruby
<dave_1734>
I'd argue the revers shevy
Macaveli has joined #ruby
<sevenseacat>
its not for elites, and never will be
<dave_1734>
but then I like c over the other nasty things that followed :)
<sevenseacat>
its to help keep out anonymous trolls and other wankers
<shevy>
because C like conquered the web
<dave_1734>
well you're using it right now.. so it didn't do to bad :)
<dave_1734>
Humm..
<dave_1734>
religion.. lets not go there :)
<shevy>
I'd argue I would be using machine code
<Hanmac>
sevenseacat: so that WE need to take care of the trolls because #rubyonrails is to "hippster" to do that?
gauke has joined #ruby
<dave_1734>
Ha ha..
<dave_1734>
Ha ha.. that was to hanmac.
<sevenseacat>
well if you to filter them out too, you can do that
<shevy>
#rubyonrails is more like a prison
<sevenseacat>
*if you want to
<dave_1734>
:)
<shevy>
they think they keep others away but in fact they have put themselves into a jail
<sevenseacat>
or just tell people to register, and send them there
<sevenseacat>
easy done
User458764 has joined #ruby
jdj_dk has joined #ruby
<dave_1734>
Anyone use resque-scheduler here?
<shevy>
not here but on #rubyonrails
<shevy>
:)
<dave_1734>
this is not the room for the argument is it?
<dave_1734>
Wait.. you already told me once.
<shevy>
dunno
<shevy>
as a rule of thumb, if it is part of the rails ecosystem, people on #rubyonrails should know. though some railsers like sevenseacat are also here on #ruby
<pontiki>
if you're creating the stream from StringIO, my guess is you don't want to use ZipInputStream, but i don't have any experience with that gem
freezey has joined #ruby
jimbach has joined #ruby
justinmburrous has joined #ruby
echooo has joined #ruby
lsmola has quit [Ping timeout: 250 seconds]
<vyrus001>
pontiki: hm, guess ill keep reading the manual then, i have zip data in a var
<vyrus001>
trying to unzip it to a file
freezey has quit [Read error: Connection reset by peer]
freezey has joined #ruby
<pontiki>
maybe look at zlib instead?
<pontiki>
idk
mercwithamouth has quit [Ping timeout: 258 seconds]
<pontiki>
Zlib::Deflate#deflate just reads a string
backsorry has quit [Remote host closed the connection]
Wolland_ has quit [Remote host closed the connection]
alem0lars has joined #ruby
<vyrus001>
pontiki: have to use zip/zip. long story
havenwood has quit [Remote host closed the connection]
Wolland has joined #ruby
jimbach has quit [Ping timeout: 265 seconds]
justinmburrous has quit [Ping timeout: 260 seconds]
<shevy>
unzip!
freezey has quit [Ping timeout: 245 seconds]
jheg has joined #ruby
<jheg>
o/
echooo has quit [Ping timeout: 272 seconds]
Snowstormer has quit [Ping timeout: 258 seconds]
jdj_dk has quit [Remote host closed the connection]
<jheg>
I’m trying to learn about OOP in ruby and the tutorial I’m following states ….
decoponio has joined #ruby
<jheg>
The second use case for modules we'll look at is using modules as a container for methods, called module methods. This involves using modules to house other methods. This is very useful for methods that seem out of place within your code. Let's use our Mammal module to demonstrate:
Wolland has quit [Ping timeout: 246 seconds]
<jheg>
the code they use to demonstrate is ....
<jheg>
module Mammal
<jheg>
...
<jheg>
def self.some_out_of_place_method(num)
<jheg>
num ** 2
<jheg>
end
<jheg>
end
<jheg>
which can be called like value = Mammal.some_out_of_place_method(4)
<jheg>
I don’t understand what the ‘self’ part in the method within the module is for
Snowstormer has joined #ruby
<jheg>
up until now my methods have been declared def method_name() … end
workmad3 has joined #ruby
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
jheg: define the method as singleton/class method on the Module
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<jheg>
so self is part of ruby standard ( class? )
jacobat has joined #ruby
arup_r has quit [Remote host closed the connection]
alem0lars has quit [Quit: AFK..]
lsmola has joined #ruby
threesixes has quit [Ping timeout: 258 seconds]
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nonks has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
<workmad3>
jheg: 'self' is part of the ruby syntax and obtains the current implicit object that methods will be called on
lolmaus has joined #ruby
Peter has joined #ruby
Peter is now known as Guest57702
kyb3r_ has quit [Read error: Connection reset by peer]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<workmad3>
jheg: in the context of a method definition, 'def self.method_name' means you define the method on the singleton class of 'self', which has the effect of defining a method you can call on the class or module itself, rather than on instances of a class or objects that have mixed the object in
<jheg>
thanks Hanmac workmad3
noop has joined #ruby
<workmad3>
jheg: you can replace 'self' with a constant or a local variable there and you'll define the method on the singleton class of that object
<jheg>
ok thanks think I get it. going from procedural to OOP is a bit of a jump ha
karupa is now known as zz_karupa
<workmad3>
;)
lolmaus has quit [Client Quit]
<jheg>
I’m sure it will sink in more once I written a few more examples - all of a sudden in the space of one page I now have
lolmaus has joined #ruby
<jheg>
modules, classes, objects, class instances, mixins :)
<jheg>
its just understanding how these all work together
<alex88>
I have an array of strings, each string should be used to get the class name and the parameter name in rails
<alex88>
I have now, @model = %w[team player tournament].detect { |model| model.classify.constantize.find_by_id(params["#{model}_id"]) }
<alex88>
problem is, that I need to get the first proc output that's not nil looping through the classes names
<alex88>
not the class name
noop has quit [Ping timeout: 260 seconds]
nfk has joined #ruby
kamilc__ has joined #ruby
nonks has joined #ruby
<workmad3>
alex88: I'd probably do it with [Team, Player, Tournament].detect{|model| model.find_by_id(params["#{model.name.underscore}_id"]} personally
Peter has joined #ruby
Peter is now known as Guest59365
<workmad3>
alex88: although I'd probably also do a check to see if the parameter is blank first too
gccostabr has joined #ruby
<pontiki>
alex88: do you want the model, or do you want the record found?
<workmad3>
alex88: so that you avoid queries for id IS NULL or other forms of blank id
<alex88>
workmad3: what's the difference? you basically just move the transformation from string to class to class to string
<alex88>
just asking out of curiosity
<Hanmac>
hm also using userinput with classify and constantize might be complicated ...
<workmad3>
alex88: class to string is reliable, string to class can throw exceptions
thsig has joined #ruby
<alex88>
pontiki: the record found
tadayoshi has joined #ruby
<alex88>
workmad3: good point, thanks
<pontiki>
alex88: .detect will return the model name
<apeiros>
with as little as 3 classes I'd probably not go all meta but just copy & paste. the whole thing seems smelly to me, but I don't know what you're doing.
<alex88>
pontiki: yup that's what I wanted to fix
<apeiros>
re no meta: @model = Team.find_by_id(params["team_id"]) || Player.find_by_id(params["player_id"]) || …
<alex88>
apeiros: was just to make it smaller, maybe I'm going to add more classes later in the project
<alex88>
that's nice too
<workmad3>
alex88: so clean it up at that point
<apeiros>
indirection adds a) complexity which turns into b) harder read- and maintainability and c) increased vulnerability
<workmad3>
alex88: i.e. once you know what it should look like, whether there's a better place to put the code, etc. ;)
anaeem___ has joined #ruby
chipotle has quit [Quit: cya]
* workmad3
waits for some english pedant to jump on him for using 'i.e.' and 'etc.' together ;)
<pontiki>
e.g.?
<alex88>
kk thanks for the advices, I'll go with the || ;)
Guest59365 has quit [Ping timeout: 240 seconds]
<workmad3>
pontiki: yeah, I probably should have used e.g. and dropped the etc ;)
<apeiros>
workmad3: why'd that be wrong?
<banister>
workmad3 sup workie
<pontiki>
workmad3: cf.
bMalum has joined #ruby
* apeiros
thinks "id est" is suitable in that sentence and sees no collision with etc.
anaeem1 has quit [Ping timeout: 245 seconds]
tokik has joined #ruby
<pontiki>
isn't the usual complaint about using e.g. and etc. ?
<workmad3>
apeiros: I suspect some pedant would dislike the use of the vaguaries of an open-ended 'etc.' with what should essentially be 'in other words'
<pontiki>
h8rs gonna h9
<apeiros>
workmad3: meh, pedant would be wrong imo.
reinaldob has joined #ruby
<workmad3>
apeiros: tbh, if anything is wrong, it's me using 'i.e.' there instead of 'e.g.'
Skeit__ has quit [Ping timeout: 258 seconds]
<apeiros>
e.g. means "given the example". I don't think that fits here
<workmad3>
apeiros: but meh, I was being somewhat flippant anyway
<naftilos76>
i am trying to run a ruby script as daemon but it does not seem to execute the code in the target .rb . I use this way of doing thing: ruby file.rb start . The file file.rb has a couple of lines of code like require 'rubygems' , require 'daemons' , Daemons.run(target_filename.rb) . Can anybody help?
anaeem___ has quit [Remote host closed the connection]
<apeiros>
you didn't give an example, you made a clarification. so <pedant mode>i.e. is a better fit. but whatever :)
anaeem1 has joined #ruby
<workmad3>
apeiros: yeah, ok... the pedant would probably have jumped on 'advices' before that anyway ;)
* workmad3
drags alex88 into the dispute :)
<shevy>
workmad3 I used to use i.e. a lot; in german it seems more prevalent than in english. When I write in english though, I adopted the e. g. - it's a bit strange because my brain has to switch different thinking modes
tadayoshi has quit []
<pontiki>
alex88: RUN!
<alex88>
workmad3: I'm italian, I would be even worse writing english :D if you want my opinion, we never use i.e., just etc. almost everywhere :D
<workmad3>
shevy: a problem I've never encountered :) I'm very mono-lingual
arup_r_ has quit []
<shevy>
italian are funny people with good cuisine arts
<workmad3>
but yeah, most people I've met don't really use i.e. and instead (mis-)use e.g. everywhere :)
arup_r has joined #ruby
<shevy>
e. g. like right now
patrick99e99 has joined #ruby
<workmad3>
shevy: that's a correct use ;)
<workmad3>
shevy: making it an incorrect example
<alex88>
shevy: thanks for the stereotipe :D we usually also talk very loud and gesticulate a lot while talking
<workmad3>
alex88: it's all the strong coffee :P
<shevy>
alex88 you do! I've heard a bunch of you lately in the subway, one guy was very loud
<apeiros>
alex88: and you live with your mothers until you're 40 and then your wife replace the mother :)
<shevy>
but at least it is italian and not northern germany german
<alex88>
btw, I'm trying to improve my english since I'm moving to US next year :)
* apeiros
wonders what other stereotypes exist about italian
<shevy>
apeiros hey at least they can cook! try self-cooking!
iamdoo2 has quit [Remote host closed the connection]
<alex88>
ahhha workmad3, could be, there are people having about 6 of them every day!
<alex88>
apeiros: mafia? :D
<alex88>
corrupted?
<shevy>
in northern italy they are not called mafia but business men
<workmad3>
alex88: just do what English speakers do instead... speak very slowly, very loudly in Italian at people who don't understand you and expect them to get it
<apeiros>
and now I wonder what stereotypes exist about swiss people. I guess we all eat chocolate and cheese all day, drinking milk to it with pockets full of money
iamdoo2 has joined #ruby
charliesome has quit [Quit: zzz]
<alex88>
shevy: yeah, when I was traveling abroad I identify italians very quickly
<shevy>
swiss are very much on time for a date
<shevy>
don't be late ever!
iamdoo2 has quit [Read error: Connection reset by peer]
<apeiros>
alex88: funny, yeah, mafia is a stereotype I guess, but I think it's become a far less dominant stereotype the last few years. which is good, I think :)
<shevy>
apeiros ah don't forget the swiss army knife
max96at|off is now known as max96at
<alex88>
apeiros: about the mother thing, yeah, but that's most in south of italy
iamdoo2 has joined #ruby
<shevy>
and I think part of the food-stuff in switzerland had to do with nestle
<alex88>
apeiros: just because of what shevy said, business just got to a next level, they don't need to kill someone anymore
<shevy>
northern italy really does not look like southern italy at all
phutchins has joined #ruby
<workmad3>
apeiros: I think my prevailing view of switzerland is that you guys are crazy-paranoid about your country's defence ;)
<alex88>
shevy: definitely, people are different, habits are different, working is different
<shevy>
yeah
tadayoshi has joined #ruby
patrick99e99 has quit [Ping timeout: 240 seconds]
<shevy>
workmad3 they have it easy - mountains everywhere for defence!
jheg has quit [Quit: jheg]
<alex88>
small example, my ex girlfriend, working in a gym, north italy she was getting 22€/hour, in Rome (middle italy), she was lucky getting 12€/hour and that's the best she found
Blizzy has joined #ruby
<shevy>
austria is open on its east side, only the west has mountains... so we made a clever thing, we gave up on military de-facto!
iamdoo2 has quit [Client Quit]
<ddv>
I don't like nationalism, stop it guys
mkaesz has joined #ruby
<shevy>
ddv from which country are you?
<alex88>
lol
<ddv>
north korea
<shevy>
nah
<workmad3>
shevy: aiui, pretty much every bridge, road and tunnel in switzerland is designed and built to be easily detonated in the case of invasion
<shevy>
workmad3 well that's easy if you got a mountain on top of you to collapse downwards!
<workmad3>
shevy: :)
danijoo has quit [Remote host closed the connection]
<shevy>
one of the more hilarious defence strategies here was "ok we don't defend the east if russia invades... we simply move westwards into the mountaineous area and defend that"
danijoo has joined #ruby
<banister>
apeiros is that true?
<workmad3>
shevy: time-tested defence strategy :D
<shevy>
workmad3 well your area is surrounded by water, which works almost as well as mountains!
anaeem___ has joined #ruby
<workmad3>
shevy: not really... water doesn't really restrict avenues of attack once the other side has boats :P
<thsig>
"For us, it’s really about scaling horizontally - to that end, Rails and Ruby haven’t been stumbling blocks, compared to any other language or framework. The performance boosts associated with a “faster” language would give us a 10-20% improvement, but thanks to architectural changes that Ruby and Rails happily accommodated, Twitter is 10000% faster than it was in January."
<Bacta>
So why is it that people blame it on Ruby and not MySQL?
bw_ has left #ruby [#ruby]
<banister>
Bacta and has some seriously messed up behaviour, default args are only evaluated once at function definition time (lol) - lambdas can only be one expression (lol), this/self argument is explicit (lol), useless ':' to signal the start of a method definition (lol), non-uniform access to object members, generators/methods using exactly the same syntax yet being semantically very different -- the only way you can identify one from teh
<banister>
other is to look for the presence of a 'yield' keyword somewhere in the code (lol)
<banister>
pythong^
tlarevo has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
<shevy>
Bacta why have they not been using python
tlarevo has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
<thsig>
Bacta: Dunno. Maybe it was "Twitter is showing the fail whale a lot" and "ruby/rails are relatively slow" => it's because of ruby/rails.
<Bacta>
Not a clue. Doesn't really bother me.
<Bacta>
My issue is with people like DHH who really enjoy blowing their own trumpet
<shevy>
wait a moment
<mikecmpbll>
my issue is with you.
<shevy>
you talk about rails
<Bacta>
Hipsters like him - a lot of Rails folk
<shevy>
in #ruby?
<mikecmpbll>
:'d
<shevy>
do you know that there is #rubyonrails?
Xeago_ has quit [Ping timeout: 265 seconds]
<Bacta>
Not going in there.
<mikecmpbll>
!troll
<Bacta>
Would lose brain cells
<helpa>
TROLL DETECTED!
<shevy>
well I don't understand it
<mikecmpbll>
quarantine this chat room.
<shevy>
is your argument against ruby or rails
* Bacta
has Ebola
p0sixpscl has joined #ruby
<banister>
Bacta too early in the morning for this stuff, pls stfu
<mikecmpbll>
lol @ a website that displays code in italics.
krz has joined #ruby
<thsig>
Bacta: Maybe this all comes back to the simplistic view that simple benchmarks are a good indicator of production performance in non-trivial setups, which they usually aren't. Systems written mainly in ruby can be quite performant, given the right algorithms, caching etc.
tadayoshi has joined #ruby
<Bacta>
lol at a website that gets hundreds of thousands of visitors
<shevy>
lol at randomly making numbers up
tlarevo has quit [Ping timeout: 250 seconds]
<mikecmpbll>
hundreds of thousands? lol.
<Bacta>
99% of statistics are made up
<shevy>
I think Bacta is an ad-bot
<Hanmac>
mikecmpbll: and with a ugly line spacing ... imo code should only be shown in some kind of blockquote or similar
<mikecmpbll>
Hanmac: no, italics is the best way
<shevy>
Bacta do you like TIOBE
<mikecmpbll>
how dare you
justinmburrous has joined #ruby
<mikecmpbll>
2*line spacing + arial + italics
<mikecmpbll>
it's industry standard.
tadayoshi has quit [Client Quit]
Blizzy has quit [Read error: Connection reset by peer]
<Bacta>
The rankings that show Ruby in 16th place?
<shevy>
was that an answer?
<Bacta>
Yep
<Bacta>
Wish it showed frameworks
<shevy>
I still don't know whether you like TIOBE or not
<Bacta>
Would be interesting to see Rails and Node side by side
Takle has quit [Remote host closed the connection]
<ddv>
TIOBE is bullshit
<Bacta>
The ranking site? I've got no issue with it
<Bacta>
I also don't have any issues with bukkake porn
krz has quit [Quit: WeeChat 1.0.1]
justinmburrous has quit [Ping timeout: 246 seconds]
<Wolland_>
can someone kick this thing
<shevy>
Bacta do you have a python repository?
tadayoshi has joined #ruby
<Bacta>
With my own code?
<shevy>
yeah
jimbach has joined #ruby
<Bacta>
I've got a Git server running on my RaspberryPi
<Bacta>
So yes, but it's not externally viewable
<mikecmpbll>
hooray for /ignore.
KC9YDN has quit [Ping timeout: 258 seconds]
<Bacta>
Honestly even if I did I wouldn't care if you thought my code was shit ;)
<shevy>
that is not the main point
<shevy>
you could be critical of xyz but have not written anything
<shevy>
or you could be critical of xyz but have written a lot
<shevy>
but I see the non-public part there, everybody is closed source these days
doodlehaus has quit [Remote host closed the connection]
noop has joined #ruby
<Bacta>
I write a lot of code that I don't deem polished enough for putting up on Github
<Bacta>
Some people say Github is like a resume
<shevy>
doesn't python have some thing like cpan or rubygems?
<Bacta>
PyPi
<Bacta>
aka "The Cheese Shop"
blackmesa has joined #ruby
top4o has joined #ruby
<Bacta>
But just to be clear
<Bacta>
I didn't come here to troll
<workmad3>
Bacta: #fail then? :P
<Bacta>
I just wanted perspectives on that article, it appeared on Slashdot so would be reasonably well read
<Wolland_>
yet here you are trolling
<Bacta>
But as for Rails I've met so many devs that swear by it and come across as being incredibly arrogant. Perhaps I've just had bad luck?
shlomo has joined #ruby
<shevy>
Bacta well the thing is - not all of the ruby community are part of the rails community
<Bacta>
I have no issue with Ruby and really respect the guy who wrote it
<workmad3>
Bacta: regarding that specific article - Twitter *repeatedly* said that ruby and rails *weren't* responsible for their scaling issues
<shevy>
so you could gain e. g. +25% in 4 years in rails, then suddenly it might drop by -40% there, whereas for those who use ruby the fluctuation is not similar to that
<Bacta>
I was in Tokyo recently and went to an electronics store. The book section was exclusively Ruby. He must be some kind of national hero over there.
<workmad3>
Bacta: their problems were entirely architectural, and the tools they ended up using to solve those issues ended up being best-written on a java stack
<ddv>
companies like Twitter, Facebook etc are pretty unique, most people (95%) don't even have to scale to that level
<shevy>
hey
<shevy>
are you saying I can't become as big as twitter ddv
<Bacta>
Yet the Rails community are constantly, consistently trying to sell it as the solution to everything.
<ddv>
yes!
<ddv>
:)
<shevy>
ddv I just need ONE great idea ...
<workmad3>
Bacta: err, as part of the rails community, I have to disagree :P
<ddv>
well it's not the idea alone right, it's the execution of it, before facebook you had myspace remember
<workmad3>
Bacta: dhh may constantly try that, but dhh is an overly loud, opinionated git, IMO :)
<Bacta>
DHH is a c--word I can't say
<shevy>
is ddh using irc?
<workmad3>
(and I doubt he'd necessarily disagree with that either, tbh...)
<shevy>
I mean DHH
<Wolland_>
every community is selling its thing as solution to everything, should rails community sell wordpress as a solution?
<Bacta>
He once wrote an article writing off *all* developers who don't code on a Mac
<Bacta>
Someone who says something like that is retarded
<shevy>
workmad3 is using a Mac :>
<shevy>
apeiros is using a Mac too!
<workmad3>
shevy: yeah, but I use it like a linux machine ;)
<arup_r>
I have issue with this regex ^\\d[\\d.]*$. It matches 12 or say 12.22.. Both is OK.. But it also matched with 12.22a something like this.. Which I don't want.. I want integers and floats...
<arup_r>
How to fix this ?
thsig_ has joined #ruby
<Bacta>
Err
<shevy>
I think linus is also using a mac
<workmad3>
arup_r: \. ;)
<Bacta>
I think the . matches anything in a regexp
startupality has joined #ruby
<ddv>
bram molenaar of vim fame uses a mac btw
<Bacta>
Well I use Linux
<workmad3>
Bacta: the rails community is larger than DHH though... please don't tar us all with the same brush ;)
<Bacta>
So I'm obviously a shitty developer according to DHH
<Wolland_>
true
<workmad3>
Bacta: and remember that the more moderate people in a community also tend to be less vocal :P
<Bacta>
But there are so *many* hipsters
<Bacta>
I was at a conference a few years back where some Rubyist got up on stage and declared that Ruby had won
<workmad3>
Bacta: yeah, but a good chunk of them jumped off into node.js projects ;)
<Bacta>
Won what? I still don't know
KC9YDN has joined #ruby
<Bacta>
It's not a competition.
<arup_r>
workmad3: still not correct
<workmad3>
Bacta: idiots say stupid stuff... doesn't matter what language they use ;)
Xeago has quit [Remote host closed the connection]
<maasha>
Wolland_: now that is elegant
Xeago has joined #ruby
<Wolland_>
hash.keys not hash, sorry
<waxjar>
[:a, :b].all? { |k| hash.key? k } is the best imo, doesn't create all those intermediate arrays
carif has quit [Ping timeout: 258 seconds]
Takle has joined #ruby
<shevy>
hmm how do I get Time.parse
<wm3|away>
shevy: require 'date' iirc
<shevy>
hmm
<shevy>
I thought so too
thsig_ has quit [Remote host closed the connection]
<shevy>
perhaps require 'time'
x77686d has joined #ruby
<waxjar>
that'd be most logical :p
x77686d has quit [Client Quit]
drawingthesun has joined #ruby
ki9a has joined #ruby
oinkon has joined #ruby
<shevy>
hehe
<shevy>
ok now I have ... 726110.937346173 seconds into the future
nettoweb_ has joined #ruby
<shevy>
how to most easily turn this into ... how many days is that again?
<ki9a>
How do I get the original filename of a file on windows? ie if I have c:\MyFile.txt but it's really called c:\MYFILE.txt, how do I get the latter out of it?
<shevy>
oh wait
<shevy>
I will simply divide by 24 * 60 * 60
<shevy>
oh cool
tokik has quit [Ping timeout: 260 seconds]
xymbol has joined #ruby
<shevy>
32888 days into the future
<shevy>
then I realized I typed 2104 rather than 2014 ...
havenwood has joined #ruby
paulfm has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
Wolland_ has quit [Ping timeout: 265 seconds]
Wolland__ has joined #ruby
oinkon has quit [Ping timeout: 246 seconds]
danijoo has quit [Remote host closed the connection]
danijoo has joined #ruby
tokik has joined #ruby
fsapo has quit [Remote host closed the connection]
<totimkopf>
anybody know of any good text-based RPGs written in ruby?
nonks has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
Vivekananda has joined #ruby
cleopatra has quit [Ping timeout: 258 seconds]
<shevy>
don't think there is any
<shevy>
I think writing games is very hard
codecop has joined #ruby
benzrf|offline is now known as benzrf
pu22l3r_ has quit [Remote host closed the connection]
nettoweb_ has quit [Ping timeout: 255 seconds]
<ddv>
I hate text based shit
<ddv>
make a real game
fsapo has joined #ruby
hellangel7 has joined #ruby
<totimkopf>
ddv: what's a *real* game?
<ddv>
something isn't entirely text based
<ddv>
+that
<totimkopf>
what if it had ansi graphics instead?
<ddv>
that's fine I guess
jasooon has joined #ruby
justinmburrous has joined #ruby
MasterPiece has quit [Quit: Leaving]
luckyruby has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
<shevy>
hehe
jzigmund has joined #ruby
<shevy>
well you could always design a game to be modular
<shevy>
and offer all of that - text based, graphics, web-based
<shevy>
but games are really a lot of work, I don't know why
autonomousdev has joined #ruby
alem0lars has joined #ruby
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<deepy>
That's becuase we're always re-inventing the wheel
jasooon has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
thoolihan has quit [Quit: out]
t_mmyv has joined #ruby
justinmburrous has quit [Ping timeout: 240 seconds]
anaeem1__ has quit [Remote host closed the connection]
_KaszpiR__ is now known as _KaszpiR_
sonOfRa has joined #ruby
p0sixpscl has quit [Ping timeout: 260 seconds]
aclearman037 has joined #ruby
freezey has joined #ruby
max96at|off is now known as max96at
naquad has left #ruby [#ruby]
brahmadpk has joined #ruby
freezey has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 272 seconds]
bMalum has quit [Ping timeout: 260 seconds]
freezey has joined #ruby
zarubin has joined #ruby
ki9a has left #ruby ["WeeChat 0.4.2"]
zarubin has quit [Client Quit]
<The_NetZ>
wat, I like this.
bMalum has joined #ruby
klmlfl has joined #ruby
zarubin has joined #ruby
coderdad has joined #ruby
patrick99e99 has joined #ruby
zarubin has quit [Client Quit]
wm3|away has joined #ruby
klmlfl has quit [Remote host closed the connection]
malcolmva has joined #ruby
tier has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tier has quit [Remote host closed the connection]
User458764 has joined #ruby
tier has joined #ruby
mistermocha has joined #ruby
roolo has joined #ruby
coderdad has quit [Ping timeout: 272 seconds]
taptapdan has quit [Quit: taptapdan]
Wolland__ is now known as Wolland
bMalum has quit [Quit: bMalum]
patrick99e99 has quit [Ping timeout: 260 seconds]
twohlix has joined #ruby
allcentu1 has joined #ruby
coderdad has joined #ruby
bMalum has joined #ruby
Trynemjoel2 has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
noop has quit [Quit: Leaving]
kamilc__ has quit [Quit: Leaving...]
Trynemjoel has quit [Ping timeout: 265 seconds]
coderdad has quit [Ping timeout: 250 seconds]
coderdad_ has joined #ruby
Hanmac has joined #ruby
bmurt has joined #ruby
it0a has joined #ruby
startupality has quit [Quit: startupality]
dblessing has joined #ruby
sevenseacat has left #ruby [#ruby]
spastorino has joined #ruby
coderdad has joined #ruby
coderdad_ has quit [Ping timeout: 250 seconds]
rshetty has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
mleone has joined #ruby
Xeago has quit [Remote host closed the connection]
aganov has quit [Quit: Leaving]
paulfm has quit []
jerius has joined #ruby
samflores_ is now known as samflores
timonv_ has joined #ruby
doodlehaus has joined #ruby
timonv_ has quit [Remote host closed the connection]
jasooon has joined #ruby
sysTemz- has joined #ruby
danijoo_ has joined #ruby
oleo has joined #ruby
paulfm has joined #ruby
Xeago has joined #ruby
freezey has joined #ruby
AFKGeek has quit [Quit: Leaving]
Xeago_ has joined #ruby
mleone_ has joined #ruby
danijoo has quit [Ping timeout: 250 seconds]
aCicloid is now known as cicloid
oinkon has joined #ruby
sailias has joined #ruby
davedev24_ has quit [Remote host closed the connection]
slap_stick has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
Takle has quit [Remote host closed the connection]
ad_boot has quit [Quit: ad_boot]
<slap_stick>
hi , i am trying to use rake and i pass it a pattern, (expecting it to glob), which worked on 3.0.4 but i've upgraded rspec and now the pattern doesn't seem to return the spec files. If i do a Dir.glob("**/*_spec.rb") they return yet not when the same glob pattern is passed to rake
mleone has quit [Ping timeout: 244 seconds]
Takle has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
blackmesa has quit [Quit: WeeChat 1.0.1]
oinkon has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
larissa has quit [Ping timeout: 272 seconds]
xymbol has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 260 seconds]
dp__ is now known as dp
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
GHemsley has joined #ruby
geekbri has joined #ruby
slap_stick has quit [Quit: This computer has gone to sleep]
<jheg>
both examples seem to do the same thing in restting the instance variable
<jheg>
*resetting
<DefV>
teotwaki: :-|
<slap_stick>
hi , i am trying to use rake and i pass it a pattern, (expecting it to glob), which worked on 3.0.4 but i've upgraded rspec and now the pattern doesn't seem to return the spec files. If i do a Dir.glob("**/*_spec.rb") they return yet not when the same glob pattern is passed to rake
<pontiki>
accessors allow you to give and get attribute information without requiring you to know how the attribute is implemented internally to the object
<slap_stick>
does anyone know why that might be?
<slap_stick>
it's almost like ** is no longer meaning recursive in rspec
doev2 has quit [Quit: Verlassend]
<pontiki>
how are you "giving" it to rake? on the command line?
ursooperduper has joined #ruby
_5kg has quit [Ping timeout: 260 seconds]
tlarevo has joined #ruby
<DefV>
jheg: it's not customary in rails to call your setter/getters set/get
<teotwaki>
jheg: if you blindly trust input from other objects, just use attr_writer
<slap_stick>
nope in the rakefile itself to the object created when i create a new task, wchih is |t| so t.pattern = "**/*_spec.rb" however reading the dogs it defaults to that anyway
<DefV>
We prefer def name; end, and def name=(name); end
Macaveli has quit [Ping timeout: 240 seconds]
<DefV>
and just calling dog.name and dog.name = "bad"
<slap_stick>
i haven't modified the file and it was working literally before i upgraded rspec to the latest versino, if i remove the latest version it works again
<jheg>
ah thanks for the tip DefV
<pontiki>
slap_stick: gist your rake task, pls
<teotwaki>
DefV: so attr_reader and attr_writer, attr_accessor?
<DefV>
when I said "rails" I meant "ruby"
<tobiasvl>
DefV: SHAME!!!
<DefV>
ik
<DefV>
teotwaki: sure, but that's the next step, i suppose
<olivier_bK>
but when i execute the script i get an error
<olivier_bK>
DefV, sorry
boombadaroomba has joined #ruby
zarubin has joined #ruby
crunk_bear has joined #ruby
Kricir has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
timonv_ has quit [Remote host closed the connection]
gregf has joined #ruby
zarubin has quit [Client Quit]
timonv_ has joined #ruby
crunk_bear is now known as flute_booth
<pontiki>
maybe you'd care to share the error?
alem0lars has quit [Quit: AFK..]
vt102 has quit [Quit: Leaving]
<xymbol>
olivier_bK: Maybe you can extract this into a separate gist.
allcentu1 has joined #ruby
lkba has joined #ruby
devdazed has quit [Ping timeout: 250 seconds]
timonv_ has quit [Remote host closed the connection]
tlarevo_ has quit [Ping timeout: 265 seconds]
boombadaroomba has quit [Ping timeout: 244 seconds]
devdazed has joined #ruby
max96at|off is now known as max96at
kaspertidemann has joined #ruby
sanguisdex has joined #ruby
weemsledeux has joined #ruby
oinkon has joined #ruby
devdazed has quit [Client Quit]
<olivier_bK>
/home/xxx/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/open-uri.rb:35:in `initialize': No such file or directory - http://www.xxxx.albea.com/xx)
drawingthesun has quit [Ping timeout: 260 seconds]
shortCircuit__ has quit [Remote host closed the connection]
<sanguisdex>
when referencing a (yaml) file inside of a gem/bin/FILE how do I refrence the path of the gem, as will be running the script for a location that has little to do with the actual location of the gem files
<sanguisdex>
?
<pontiki>
olivier_bK: is there such a url?
anaeem1 has quit [Read error: Connection reset by peer]
anaeem1__ has joined #ruby
<pontiki>
olivier_bK: gist up your whole script, not the irb session
<olivier_bK>
pontiki, give me 2s
djstorm has joined #ruby
<pontiki>
take your time
banister has quit [Ping timeout: 272 seconds]
<waxjar>
sanguisdex: just a relative path doesn't work?
<DefV>
jheg: no, I still use name=(name) quite often, when the implementation is more complex then setting a instance variable
<DefV>
for example def ttl=seconds; @expires_at = Time.now + seconds; end
justinmburrous has joined #ruby
nheinrich has joined #ruby
joonty1 has joined #ruby
thsig has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jheg>
so I guess as I learn more complex programs that will make more sense
jasooon has quit [Ping timeout: 260 seconds]
<DefV>
indeed
davedev24_ has joined #ruby
weemsledeux has joined #ruby
joonty has quit [Ping timeout: 272 seconds]
dx7 has joined #ruby
allcentu1 has quit [Ping timeout: 244 seconds]
paulfm has quit [Ping timeout: 260 seconds]
aclearman037 has quit [Ping timeout: 272 seconds]
justinmburrous has quit [Ping timeout: 250 seconds]
thsig has quit [Ping timeout: 255 seconds]
Pete_____ has joined #ruby
a_ has joined #ruby
Techguy305 has joined #ruby
aspiers has quit [Ping timeout: 260 seconds]
levisbakalinsky is now known as levisbakalinsky|
Pete_____ has quit [Read error: Connection reset by peer]
adac has joined #ruby
dx7 has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
jimmyy has quit [Ping timeout: 272 seconds]
dx7 has joined #ruby
Kricir has quit [Remote host closed the connection]
coderdad has quit [Remote host closed the connection]
Kricir has joined #ruby
coderdad has joined #ruby
aclearman037 has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
<adac>
Guys, this: "DateTime.strptime("10/09/2014 04:31 PM", "%m/%d/%Y %I:%M %p")" gets as a result: "2014-10-15T16:36:00+00:00". Now i'm wondering hos to do it vice versa so that I get the format "%m/%d/%Y %I:%M %p" out of "2014-10-15T16:36:00+00:00"?
bentanweihao has joined #ruby
Kricir has joined #ruby
levisbakalinsky| has quit [Ping timeout: 240 seconds]
gsd has joined #ruby
oinkon has quit [Ping timeout: 246 seconds]
brahmadpk has quit [Ping timeout: 255 seconds]
i_s has joined #ruby
<waxjar>
if that was possible, strptime was unneccesary
_5kg has joined #ruby
msmith_ has joined #ruby
kenneth has joined #ruby
alem0lars has joined #ruby
IceDragon has joined #ruby
startupality has joined #ruby
<ddv>
adac: convert it to a datetime object?
Pete_____ has joined #ruby
<waxjar>
without any context "2014-01-02" could both mean Jan, 2 and Feb, 2 for example
taptapdan has joined #ruby
oo_ has joined #ruby
Pete_____ has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: This computer has gone to sleep]
<sterns>
Hello, my model builds a hash based on an XML file and sorts by a date field. I am working on paginating using my view displaying 50 records per page. How can I do this without rebuilding my hash for each page view?
wallerdev has quit [Quit: wallerdev]
nonks has quit [Ping timeout: 260 seconds]
Kilo`byte has joined #ruby
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wasamasa has joined #ruby
wasamasa has quit [Changing host]
wasamasa is now known as {{{
{{{ is now known as wasamasa
_whitelogger_ has joined #ruby
wasamasa has quit [Client Quit]
wallerdev has joined #ruby
wasamasa has joined #ruby
Pete_____ has joined #ruby
sk87 has joined #ruby
Takle has joined #ruby
<sterns>
jhass: will do
rismoney1_ has quit [Remote host closed the connection]
chrishough has quit [Read error: Connection reset by peer]
freezey has joined #ruby
francisfish has quit [Remote host closed the connection]
<nrsk>
hi all! How to make a mock in rspec? I have class A. It calls C::B.method. I have tests for class A, and C::B.method here should return stubbed data
nanoyak has quit [Quit: Computer has gone to sleep.]
<nrsk>
2.3.1 v
User458764 has quit [Ping timeout: 260 seconds]
chrishough has joined #ruby
<jhass>
nrsk: that's a quite old version
<jhass>
why don't you update to 2.14 at least?
kireevco has joined #ruby
rdark has quit [Quit: leaving]
<nrsk>
sorry, it mistake, 2.1.3 of ruby)
tyll_ has quit [Ping timeout: 250 seconds]
<jhass>
is it C::B::method or C::B#method ?
<nrsk>
C::B.method
<jhass>
so a class/singleton method?
<jhass>
C::B is hardcoded into A?
<nrsk>
instance method
chrishou_ has joined #ruby
tyll has joined #ruby
<jhass>
so C::B#method ;)
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vyorkin has joined #ruby
_whitelogger__ has joined #ruby
<nrsk>
module SomeModule; class A; def foo; C::B.new.method
otherj has quit []
postmodern has joined #ruby
<wasamasa>
vyorkin: rbenv's job is to give you a recent ruby to work with (and optionally switching to a different one)
<jhass>
nrsk: you could do allow(C::B).to receive(:new).and_return(double(method: 'data')) then
alem0lars has joined #ruby
<havenwood>
vyorkin: shims. nasty brutish little shims
<nrsk>
thank you, I'll try it that now
Soda has joined #ruby
wallerdev has quit [Quit: wallerdev]
<jhass>
vyorkin: the first version is the namespace chosen by rbenv, the second version is the ABI version of that ruby, which is different from the interpreter version
<maasha>
I am looking to parse a huge table into a hash per row as fast as possible. Now, columns can be strings, floats or integers and I don't know beforehand. Ideas?
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tejas has joined #ruby
<havenwood>
maasha: Gist example input and desired output?
W0rmDr1nk has joined #ruby
<maasha>
I feel like testing a single row and generate a template for some scanf like method to process the remaining rows.
monkeypatch has joined #ruby
lw has quit [Read error: Connection reset by peer]
<havenwood>
maasha: Can you give an example of a single row?
<vyrus001>
please god tell me somebody here is familuar with zipinputstream
alem0lars has joined #ruby
renderful has quit [Remote host closed the connection]
lw has joined #ruby
<vyrus001>
the following line of code is breaking saying my "IOStream is not a string"
<vyrus001>
Zip::ZipInputStream.open(open(s3Link['url'])) do |io|
<havenwood>
vyrus001: try #jruby
<vyrus001>
havenwood: wait... its a jruby lib?
<vyrus001>
not a ruby lib?
WormDrink has quit [Ping timeout: 260 seconds]
<havenwood>
i don't know of the Ruby lib
<havenwood>
nvm me
<vyrus001>
havenwood: zip/zip
ursooperduper has joined #ruby
timonv_ has quit [Remote host closed the connection]
<vyrus001>
which is pretty much ripped off this chunk of code from... but it dosent work
<vyrus001>
it seems to expect a string (filename) not an iostream, even though im calling it in the way thats supposed to make it take an iostring as a param
banister has quit [Read error: Connection reset by peer]
banister has joined #ruby
ptrrr has quit [Remote host closed the connection]
<evvel2>
Hi all so im trying to do some work with ec2 and the aws-sdk gem. So what im having an issue with is that ive created a class which handles all the ec2 security groups, but onething that I need to be able todo is generate the ec2 call that creates the security group based on a hash(egree/ingress), but when I call the class i see the variable(ingress/egress) is not being placed in the line to complete the request. Sorry its so long. here is the code it
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
timonv_ has quit [Ping timeout: 260 seconds]
jbueza has joined #ruby
Techguy305 has joined #ruby
<evvel2>
Any insight on my the reason why I cant complete ec2_client_authorize_security_group_"#{value['type']}""(:group_id => #{group_id} :ip_permissions=>[ { :ip_protocol => #{value['proto']}, :from_port => #{k}, :to_port => #{k} }], :ip_ranges => [{:cidr_ip => #{ip} }] )", when Its ran it get: ec2_client_authorize_security_group_' for #<Amazon:0x0000010116a060> (NoMethodError)
<evvel2>
as you can see ec2_client_authorize_security_group_"ingress/egress" is missing
maletor has quit [Quit: Computer has gone to sleep.]
lw has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
levisbakalinsky| has quit [Ping timeout: 265 seconds]
alem0lars has quit [Ping timeout: 244 seconds]
alem0lars_ is now known as alem0lars
Ulrike_Rayne has joined #ruby
djbkd has joined #ruby
freezey has quit []
claymore has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crazydiamond has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gnarld_ is now known as nug
djbkd has quit [Remote host closed the connection]
ndrei has joined #ruby
djbkd has joined #ruby
Skeit has joined #ruby
Skeit_ has joined #ruby
emmesswhy has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
Eiam has joined #ruby
macberrypro has joined #ruby
macberrypro has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
Skeit has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
ivmx has joined #ruby
atmosx has quit [Max SendQ exceeded]
<banister>
apeiros sup
banister is now known as banisterfiend
<jheg>
I’ve hit a wall trying to understand some ruby syntax
<banisterfiend>
jheg ask
<jheg>
Its the self. method I’m not sure what it is/does
<banisterfiend>
jheg it's not a method, it's a keyword
<banisterfiend>
it just returns the current object that's in scope
AngryEgret has quit [Ping timeout: 272 seconds]
codecop has quit [Remote host closed the connection]
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justin_pdx has quit [Quit: justin_pdx]
<jheg>
so why would you use self.ivar rather than @ivar ?
wallerdev has joined #ruby
pu22l3r has quit [Ping timeout: 250 seconds]
jack_rabbit has joined #ruby
decoponio has quit [Quit: Leaving...]
pu22l3r has joined #ruby
<banisterfiend>
jheg well, you don't only use it for invoking methods, sometimes you have to pass the current object to a method belonging to another object
<banisterfiend>
in that case you'd go: other_object.method(self)
atma has joined #ruby
RaCx has quit [Ping timeout: 240 seconds]
atma is now known as atmosx
manzo has joined #ruby
aspires has joined #ruby
AngryEgret has joined #ruby
<crome>
jheg: in that specific case you can use self.ivar (or just ivar) if ivar is a) a public method that returns @ivar, or b) an accessor
<jheg>
thanks guys
<jheg>
this is the example used in the tutorial im following ...
<atmosx>
jheg: exactly, is there any hard-concept to grasp here? I wonder.
<atmosx>
People are so stupid it makes wanna scream.
<jheg>
sounds like madness to me
<atmosx>
A startup based on bitcoin payrol automation, as if there as thousand of lunatics paying their employees in a currency that might worth 1.000.000USD or nothing in 10 years, and the employees accepting that thing.
<atmosx>
blah
<crome>
jheg: quite often there are heated discussions about accessing instance variables directly vs accessing them through setters/getters/accessors
<crome>
jheg: I wouldn't care about it for now
<atmosx>
crome: what is the difference?
<jheg>
^ ha thats what i’ve been trying to grasp all afternoon atmosx :)
ki0 has joined #ruby
<crome>
from the end result's point of view, nothing really
<atmosx>
jheg: can you show me a code sample of technique one and two because I seriously don't know what you guys are talking about.
<jheg>
thanks crome I at least feel better about it being no so important
<atmosx>
using self.whatever you're accesing them directly
<atmosx>
?
User458764 has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 272 seconds]
<jheg>
@name is accessing directly I think
<atmosx>
ahahahaha
<atmosx>
cool, we totally don't know what we're talking about :-P
<jheg>
:)
<crome>
jheg: correct
<atmosx>
anyway, that's for people who wanna master the language deeply probably. I don't really care (until I hit a wall)
genta has quit [Quit: Quit]
GriffinHeart has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
mijicd has quit [Remote host closed the connection]
<crome>
for the purpose of learning ruby you can safely assume that @balls = 2, self.balls = 2 (if there is a getter or accessor defined) are the same
jdj_dk has quit [Ping timeout: 260 seconds]
<crome>
setter*
ocx has joined #ruby
x1337807x has joined #ruby
<jheg>
cool, ta
claymore has quit [Ping timeout: 265 seconds]
<atmosx>
I was confused when I saw the module_function :method_name approach in a Module
<atmosx>
so much that I never forgot it lol
x1337807x has quit [Max SendQ exceeded]
<atmosx>
I liked the style better than using self.method;blah;end
<atmosx>
ruby is full of this stuff
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
levisbakalinsky has joined #ruby
jdj_dk has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
ivmx has left #ruby [#ruby]
<ocx>
hi guys i am trying to send to sinatra a get request similar to http://test,com?keyField=1&valueField=A&keyFiled=2&valueField=Y&keyField=3&valuField=3 ; how can i accept all this in sinatra and store them in an hash
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
pu22l3r has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
<crome>
sinatra gives you the request parameters in the params hash
x1337807x has joined #ruby
<ocx>
crome: correct but i need to store the first 2 in 1 hash
Deejay_ has quit [Quit: Computer has gone to sleep.]
pu22l3r has joined #ruby
bklane has joined #ruby
<ocx>
and the next 2 in another jash
<crome>
first 2 what?
x1337807x has quit [Max SendQ exceeded]
teddyp1c_ has quit []
<ocx>
like for instance in the example i gave it should give you 1=A
<ocx>
2=Y
benzrf is now known as benzrf|offline
x1337807x has joined #ruby
danman has quit [Quit: danman]
claymore has joined #ruby
<ocx>
crome: in the end i want to write these in a yaml file
geekbri has quit []
<crome>
ah, so you want to match the keyfields with the valuefields?
<ocx>
the yaml file will contain: line1: 1=A line2: 2=Y line3: 3=3
<ocx>
yes sir
<crome>
sending different parameters with the same name is not a very smart idea
<ocx>
what would be smart?
<crome>
some web server simply overwrite the previous parameter with the same name when they process the request
<ocx>
ok but i mean how can i make it a couple of pairs
mrsolo has joined #ruby
Skeit_ has quit [Ping timeout: 250 seconds]
Haiiro is now known as Haiiro|Away
genta has joined #ruby
bklane has quit [Ping timeout: 260 seconds]
<crome>
I'm wondering, what does the params hash contain when you send that request to sinatra?
ixti has joined #ruby
VictorVR has joined #ruby
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crome>
Stalkr_: I'm pretty sure string doesn't have a split! method
jacobat has joined #ruby
<crome>
numbers = sqrd.split(//)
ad_boot has joined #ruby
Br0keN is now known as VictorVR
<Stalkr_>
rubie: You are not actually splitting it
<havenwood>
>> '42'.chars
Haiiro is now known as Haiiro|Away
<Stalkr_>
rubie: You should use split! instead
emmesswhy has joined #ruby
<havenwood>
numbers = sqrd.chars
VictorVR has quit [Disconnected by services]
nfk has quit [Quit: yawn]
pu22l3r has quit [Ping timeout: 255 seconds]
<rubie>
yes no split!
<Stalkr_>
crome: You are write, definitely thought it had. Then need to save to a new (or same) variable
<crome>
Stalkr_: split returns an array, it wouldn't make any sense to change the original object to the return value of split since it is a whole new object, which happens to be also a different type
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jdj_dk has quit [Remote host closed the connection]
max96at is now known as max96at|off
djbkd has joined #ruby
<j2p2>
inject?
b1nd has quit [Ping timeout: 255 seconds]
<j2p2>
is that basically reduce then?
<wallerdev>
yeah theyre aliases
<j2p2>
gotcha, thanks
beef-wellington has quit [Ping timeout: 258 seconds]
levisbakalinsky is now known as levisbakalinsky|
aspires has quit []
Azure has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
[stringy] has quit [Remote host closed the connection]
[stringy] has joined #ruby
levisbakalinsky| has quit [Read error: Connection reset by peer]
iamayam has joined #ruby
livingstn has quit []
levisbakalinsky has joined #ruby
timonv_ has joined #ruby
geggam has quit [Remote host closed the connection]
hmsimha has quit [Ping timeout: 258 seconds]
skolman_ has joined #ruby
tiguser has quit [Ping timeout: 250 seconds]
KC9YDN has quit [Quit: Windows 8.1 LoL]
sysTemz-_ has joined #ruby
tiguser has joined #ruby
x1337807x has joined #ruby
klaut_ has joined #ruby
pandaant has quit [Remote host closed the connection]
klaut has quit [Ping timeout: 258 seconds]
_whitelogger__ has quit [Excess Flood]
_whitelogger__ has joined #ruby
nanoyak has joined #ruby
aspires has joined #ruby
monkeypatch has joined #ruby
timonv_ has quit [Ping timeout: 255 seconds]
_whitelogger__ has joined #ruby
Notte has quit [Remote host closed the connection]
geggam has joined #ruby
b1nd has joined #ruby
claymore has quit [Ping timeout: 272 seconds]
VictorVR has quit [Quit: CyberScript - já pegou o seu? (www.cyberscript.org)]
iamjarvo has joined #ruby
drPoggs has quit [Ping timeout: 260 seconds]
drPoggs has joined #ruby
sailias has quit [Quit: Leaving.]
claymore has joined #ruby
St_Marx has joined #ruby
_whitelogger__ has joined #ruby
gvenkat has quit [Quit: This computer has gone to sleep]
kiely has joined #ruby
ki0 has quit [Remote host closed the connection]
badhatter has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
sysTemz-_ has quit [Quit: oooooh]
emocakes has quit []
sysTemz- has joined #ruby
klmlfl has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
_whitelogger__ has quit [Excess Flood]
_whitelogger__ has joined #ruby
adac has quit [Ping timeout: 260 seconds]
kantakt has quit []
crunk_bear has joined #ruby
startupality has joined #ruby
jheg has joined #ruby
flute_booth has quit [Read error: Connection reset by peer]
rubie has quit [Quit: Page closed]
crunk_bear has quit [Client Quit]
b1nd has quit [Ping timeout: 260 seconds]
claymore has quit [Quit: Leaving]
baash05 has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
<baash05>
Can someone here tell me how to join the rubyonrails channel?
geggam has quit [Remote host closed the connection]
RaCx_ has joined #ruby
sysTemz- has quit [Quit: oooooh]
mary5030 has quit [Remote host closed the connection]
ocx has joined #ruby
jheg has quit [Client Quit]
qmfnp has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
RaCx has quit [Ping timeout: 265 seconds]
RaCx_ is now known as RaCx
spyderman4g63 has joined #ruby
<ocx>
crome: File.open('/vaml', 'w+') { |f| params.to_a.each { |param| f.puts param.to_yaml } } <-- this writes key on a line and value on another line :/
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baash05>
No.. untill a few seconds ago I'd never considered registering my nic.
<[stringy]>
then you can't join that channel :(
_whitelogger__ has joined #ruby
<crome>
so you knew you had to register but you didn't want to but you kept asking how to join the channel. correct?
<baash05>
I started the registration.
<baash05>
I didn't know I had to register.. I didn't know how to register either.
jbueza has joined #ruby
timonv_ has joined #ruby
jbueza has quit [Read error: Connection reset by peer]
<ocx>
crome: should i wait or ?
goodenough has joined #ruby
<baash05>
I'm not a frequent IRC guy..
<crome>
ocx: no, you should definitely not wait. yo should figure out what you want to do and do a bit of reading
<[stringy]>
baash05: look up nickserv register
bMalum has quit [Quit: bMalum]
<baash05>
I only started a while ago.. when I managed to get work to let me use linux.
geggam has quit [Remote host closed the connection]
<zwischenzug>
hello. i'm trying to split a string into equal length blocks. something like "teststringgoesboom".split(/.{4}/) => ["test","string","goes","boom"]. can i use split to do this?
geggam__ has joined #ruby
<[stringy]>
baash05: once you register, you can identify, then join
dorei has quit []
<baash05>
Yeah.. I have to wait..
<baash05>
:)
ghr has quit [Ping timeout: 255 seconds]
<ocx>
crome: why teasing me? paste me what u suggested
iamayam has joined #ruby
<crome>
21:34:46 < crome> you could do something like File.open('somefile', 'w+') { |f| params.to_a.each { |param| f.puts param.join('=') } }
<ocx>
thanks
<baash05>
zwischenzug: that's not split into equal parts.
JoshGlzBrk has joined #ruby
<zwischenzug>
baash05, yea, i just realized that
<baash05>
the word string has 6 letters
stormy3 is now known as stormy98
msmith__ has quit [Remote host closed the connection]
<ocx>
crome: how did your code know to skip lines?
Blizzy has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coderdad_ has quit [Remote host closed the connection]
SpaceKookie has quit [Ping timeout: 260 seconds]
<crome>
um
<crome>
it doesn't skip any lines
<baash05>
each_slice doesn't work either..
iamayam has quit [Ping timeout: 272 seconds]
tiguser has quit [Ping timeout: 260 seconds]
<crome>
baash05: not on the string but on string.chars for example
* apeiros
wants a smack bot, which smacks people every time they say "X does not work"
tiguser has joined #ruby
top4o has quit [Quit: ChatZilla 0.9.91 [Firefox 32.0.3/20140923175406]]
Wolland_ has joined #ruby
SpaceKookie has joined #ruby
beowuff has joined #ruby
treehug88 has quit []
<last_staff>
the program I'm trying to make is not working. What do I do?
_whitelogger__ has joined #ruby
<apeiros>
last_staff: you fix it
<crome>
change the faulty lines of code to correct ones
anaeem1_ has quit [Remote host closed the connection]
<[stringy]>
na na na, you have to apply for government assistance
<apeiros>
you can also opt to just give up and throw it away
Kricir has quit [Remote host closed the connection]
<ocx>
crome: how this f.puts combines 2 by line and returned \n
Kricir has joined #ruby
<last_staff>
apeiros: Heh, that _would_ be cool; to literally crumble together code and actually throwing it away
<apeiros>
last_staff: there's this new invention, it's called "printers" :-p
Wolland has quit [Ping timeout: 272 seconds]
<last_staff>
(;-.-) .....you got me
monkeypatch has joined #ruby
fabrice31 has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
<last_staff>
but seriously: Hologram instead of a screen, put your hand in, then start crumbling away
<ocx>
crome: i am finding hard time understand your code
blackmes1 has joined #ruby
<crome>
ocx: break it down and see what the different parts do
ad_boot has quit [Quit: ad_boot]
wallerdev_ has joined #ruby
renderful has quit [Ping timeout: 258 seconds]
djstorm has quit [Ping timeout: 260 seconds]
wallerdev has quit [Ping timeout: 260 seconds]
wallerdev_ is now known as wallerdev
<ocx>
crome: for example ?name=test&age=20 ; in this case param = name for each l then param is test ; then it is age then 20 ; how did you combine name=test in your code it is really smart but not understandable for me
Kricir has quit [Ping timeout: 255 seconds]
jobewan has quit [Quit: Leaving]
<ocx>
the join worked on the first 2
aspires has quit []
Lucky__ has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
<ocx>
why didnt it go name=test=age=20
Zesty has joined #ruby
aspires has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renderful has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
lw has joined #ruby
lw has quit [Max SendQ exceeded]
fabrice31 has quit [Ping timeout: 272 seconds]
ocx has quit [Quit: Page closed]
<crome>
because param is ['name', 'test'] in the first iteration, ['age', '20'] in the second. join('=') then turns them into 'name=test' and 'age=20'
a_ has joined #ruby
lw has joined #ruby
Kricir has joined #ruby
tiguser has quit [Ping timeout: 260 seconds]
Takle has joined #ruby
<crome>
which are, btw, the entries in your params hash
renderful has quit [Remote host closed the connection]
tiguser has joined #ruby
[stringy] has quit []
jottr has joined #ruby
djbkd has quit [Remote host closed the connection]
nonks has quit [Ping timeout: 260 seconds]
MeMoCooL has joined #ruby
pu22l3r has joined #ruby
timonv_ has quit [Ping timeout: 250 seconds]
twohlix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
tiguser has quit [Ping timeout: 272 seconds]
KC9YDN has joined #ruby
jdj_dk has quit [Ping timeout: 250 seconds]
tiguser has joined #ruby
blackmes1 has quit [Ping timeout: 265 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
renderful has quit [Remote host closed the connection]
{xenomorph} has quit [Ping timeout: 260 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
_whitelogger__ has quit [Excess Flood]
_whitelogger__ has joined #ruby
Kricir has quit [Remote host closed the connection]
<baash05>
Ha ha..
<baash05>
x = "te\nststringgoesboom".chars.each_slice(4).map(&:join)
last_staff has quit [Quit: last_staff]
goodenough has quit [Remote host closed the connection]
tanema has joined #ruby
<baash05>
ugly.. but it works
tanema has quit [Remote host closed the connection]
Kricir has joined #ruby
tanema has joined #ruby
davidpk has joined #ruby
{xenomorph} has joined #ruby
<apeiros>
baash05: scan is more efficient
Wolland_ has quit [Remote host closed the connection]
<baash05>
but it doesn't seem to catch the pre \n characters
SCHAAP137 has quit [Remote host closed the connection]
<baash05>
x = "te\nststringgoesboom".scan(/(....)/)
AlSquire has joined #ruby
<apeiros>
I told you to use the m flag. I even showed you how to.
andrewlio has quit [Quit: Leaving.]
emmesswhy has quit [Quit: This computer has gone to sleep]
pu22l3r has quit [Remote host closed the connection]
aspires has quit []
<baash05>
Oh.. must have missed it..
beowuff has quit [Quit: leaving]
<apeiros>
I'd reread all four examples then.
spyderman4g63 has joined #ruby
<apeiros>
I explained all minutiae
timmmaaaayyy has joined #ruby
MuffinPimp has joined #ruby
i_s has quit [Remote host closed the connection]
stantona has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
<baash05>
Ah.. it drifted too high.
nanoyak has joined #ruby
<baash05>
cool
<banisterfiend>
apeiros wassup my swiss homie
emmesswhy has joined #ruby
JoshGlzBrk has quit [Read error: Connection reset by peer]
softaco_s has quit [Remote host closed the connection]
emmesswhy has quit [Client Quit]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
banisterfiend: not much, what are you up to?
<baash05>
x = "te\nststringgoesboom".scan(/(....)/m).flatten
<baash05>
cool.
<apeiros>
baash05: um, why? just drop the () and then you don't need flatten
<baash05>
Oh.. true.
<baash05>
I'm not to hot with regex.
phutchins has quit [Ping timeout: 265 seconds]
<banisterfiend>
apeiros watching deer hunter
<apeiros>
also .... --> .{4}. requires precisely 4 chars. which is where I said that it needs a precisely fitting string. .{1,4} instead of .{4} changes that.
<banisterfiend>
apeiros what other games do u have for wii u?
<banisterfiend>
it's just the normal tracks, which sucks
<mekhami>
listeners is a long list of area codes, in this case about 1100 area codes. it returns state, area code, latitude, and longitude value for those area codes
<apeiros>
banisterfiend: only wind waker. I just bought it recently.
_ylliad has left #ruby [#ruby]
<mekhami>
yes
<banisterfiend>
i can't get into pikmin 3 for some reason
<apeiros>
mekhami: AreaCodes an AR model?
<a_>
mekhami: how are you measuring what's taking so long?
<banisterfiend>
apeiros ah ok, i have pikmin 3, but i really wanna get super mario 3d world
<apeiros>
mekhami: also if you're using pg or another sufficiently advanced db, consider transforming the data to json in the db directly. alternatively, store json partials in the db if that's a common task.
<mekhami>
a_ did benchmarking?
<apeiros>
banisterfiend: sidekiq
Scotteh_ has joined #ruby
<banisterfiend>
apeiros but not using it for anything where it's not just an implementation detail?
<banisterfiend>
apeiros btw have you used redis for anything in production?
<mekhami>
apeiros, unfortunately using MySQL
djbkd has quit [Remote host closed the connection]
<a_>
mekhami: yes, was wondering how
<apeiros>
but our queue does not have lots to do, so I ponder switching to a pg based.
afhammad has joined #ruby
<apeiros>
banisterfiend: no, nothing where we explicitly wanted redis.
djbkd has joined #ruby
<apeiros>
we don't have the loads where it'd become interesting
<apeiros>
so our emphasis is on ease of maintenance, limiting complexity. hence pondering to switch to a pg based queue. we already use pg and I intend to replace all db related stuff with pg -> one db we have to know how to deal with instead of the current 5
<banisterfiend>
5, heh
<mekhami>
thanks apeiros
<apeiros>
banisterfiend: so you can't recommend pikmin?
<mekhami>
that link is great i'll work on that
Scotteh has quit [Ping timeout: 260 seconds]
nonks has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<banisterfiend>
apeiros i guess i can, it's a personal failing that i can't get into it
AlexRussia has joined #ruby
<apeiros>
banisterfiend: ok. because I considered buying it :)
<apeiros>
sm3d world i want to buy too
<banisterfiend>
i like to play it on the game pad, and unfortunately the resolution on that thing is pretty crappy
<banisterfiend>
i wish it was a little better
aspires has quit []
<banisterfiend>
how long have you had your wii u?
<DLSteve>
I have never played pikmin
<apeiros>
2 or 3 weeks I think
jottr has quit [Ping timeout: 272 seconds]
<banisterfiend>
apeiros haha, me too
boombadaroomba has quit [Remote host closed the connection]
<DLSteve>
I got the Wii U on launch :-(
<apeiros>
banisterfiend: nice :) so I still have a chance to beat you in mk8. I might be up for a game tomorrow (I'm still in holidays, but this week at home)
<DLSteve>
Should have waited.
_whitelogger__ has joined #ruby
_whitelogger__ has joined #ruby
ad_boot has joined #ruby
echevemaster has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thsig has quit [Remote host closed the connection]
* apeiros
is not sure whether the diff is only 8x for his gaming pc 0:-)
<DLSteve>
banisterfiend, but you can always justify a PC for other things :-D
mark06 has joined #ruby
ghr has joined #ruby
<apeiros>
anyway, time for me to go to bed. n8 boys & girls
thsig has joined #ruby
devdazed has joined #ruby
<mark06>
hi all, I published a gem yesterday and it has ~80 downloads already, why? I couldn't find anything like a new gems feed or something in rubygems.org
lw has joined #ruby
<banisterfiend>
i have a laptop that works for everything except gaming
monkeypatch has joined #ruby
<banisterfiend>
DLSteve like what? :)
mordocai has joined #ruby
ashdr0 has joined #ruby
softaco_s has joined #ruby
oinkon has quit [Ping timeout: 260 seconds]
_whitelogger__ has quit [Excess Flood]
_whitelogger__ has joined #ruby
<banisterfiend>
DLSteve do u have a rift?
<DLSteve>
well I justified it to myself by geting into 3D work and video as a hobby. Maybe some extra income down the road. With the Unity/UE4 asset stores you can make some good money just by modeling stuff or writing plug-ins.
emmesswhy has joined #ruby
nonks has joined #ruby
kobain has quit [Read error: Connection timed out]
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
_whitelogger__ has joined #ruby
thsig has quit [Ping timeout: 250 seconds]
<DLSteve>
banisterfiend, Not yet, I would like to get one though to mess around. I'd like to try one first as I'm partially blind in one eye so I get motion sick easy.
ghr has quit [Ping timeout: 260 seconds]
kobain has joined #ruby
mek_ has joined #ruby
mekhami has quit [Disconnected by services]
mek_ is now known as mekhami
matchaw has quit [Remote host closed the connection]
Pupeno_ has quit [Remote host closed the connection]
ghostmoth has quit [Quit: ghostmoth]
kobain has joined #ruby
mg^ has quit [Quit: Leaving]
matchaw has joined #ruby
tiguser has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
msmith_ has quit [Remote host closed the connection]
dx7_ has joined #ruby
kobain has quit [Max SendQ exceeded]
Eiam has joined #ruby
tiguser has quit [Ping timeout: 260 seconds]
kobain has joined #ruby
jordsmi has joined #ruby
aspires has joined #ruby
dx7 has quit [Ping timeout: 258 seconds]
jottr has quit [Ping timeout: 255 seconds]
RaCx has quit [Ping timeout: 272 seconds]
RaCx_ has joined #ruby
stunder has quit [Quit: Screw you guys I'm going home]
kobain has quit [Max SendQ exceeded]
nb_bez___ has quit [Quit: Connection closed for inactivity]
kobain has joined #ruby
dx7_ has quit [Ping timeout: 244 seconds]
tiguser has joined #ruby
goodenough has joined #ruby
lw has quit [Quit: s]
Spami has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
doodlehaus has joined #ruby
kobain has joined #ruby
Kricir has quit [Remote host closed the connection]
Kricir has joined #ruby
ph8 has quit [Ping timeout: 245 seconds]
Lewix has joined #ruby
kobain has quit [Max SendQ exceeded]
Kricir_ has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
tylersmith has quit [Remote host closed the connection]
xvq17 has quit [Ping timeout: 245 seconds]
aquatty has quit [Ping timeout: 244 seconds]
kobain has joined #ruby
mekhami has joined #ruby
tiguser has quit [Ping timeout: 240 seconds]
cndiv has joined #ruby
xvq17 has joined #ruby
<totimkopf>
http://pastebin.com/yxvju422 am I missing anything here? getting NameObject error...I've copied it from The Well-grounded Rubyist book, too :S
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
aquatty has joined #ruby
Tuxero has left #ruby [#ruby]
<shevy>
davidcelis bundler loves some gems more than others so this is why it has to repeat its loved family
marr has quit [Ping timeout: 272 seconds]
<davidcelis>
oh
larissa has joined #ruby
nonks has joined #ruby
lw has joined #ruby
mikecmpbll has quit [Quit: ciao.]
<shevy>
;P
<shevy>
it's funny that it repeats some lines without versions
Wolland has joined #ruby
goodenough has quit [Remote host closed the connection]
<shevy>
and then adds some more lines with versions
_whitelogger__ has quit [Excess Flood]
_whitelogger__ has joined #ruby
goodenough has joined #ruby
ph8 has joined #ruby
x77686d has quit [Quit: x77686d]
Wolland has quit [Read error: Connection reset by peer]