apeiros changed the topic of #ruby to: Ruby 2.1.3; 2.0.0-p576; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
oponder has joined #ruby
jay_ has joined #ruby
fsapo has joined #ruby
jay_ is now known as rubyonrailed
gccostab_ has joined #ruby
m8 has quit [Quit: Sto andando via]
jottr has quit [Ping timeout: 258 seconds]
klmlfl has joined #ruby
gccostabr has quit [Ping timeout: 260 seconds]
Tricon has quit [Ping timeout: 272 seconds]
oponder has quit [Ping timeout: 246 seconds]
RyanV has quit [Quit: Computer has gone to sleep.]
niklasb has joined #ruby
ixti has quit [Ping timeout: 246 seconds]
Spami has joined #ruby
bricker`LA has joined #ruby
klmlfl has quit [Ping timeout: 272 seconds]
hiall has quit [Ping timeout: 272 seconds]
gkra has quit [Ping timeout: 240 seconds]
Scotteh has quit [Ping timeout: 260 seconds]
SilkFox_ has quit [Ping timeout: 272 seconds]
gkra has joined #ruby
tylersmith has quit [Remote host closed the connection]
dc__ has quit [Remote host closed the connection]
sent-hil has quit [Quit: Connection closed for inactivity]
bricker`LA has quit [Ping timeout: 240 seconds]
GluonQuark has quit [Quit: Leaving]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
linojon has quit [Quit: linojon]
neonixcoder has joined #ruby
fabrice31 has joined #ruby
neonixcoder has left #ruby [#ruby]
doodlehaus has quit [Remote host closed the connection]
narcan has joined #ruby
mikepack has quit [Remote host closed the connection]
Wolland has joined #ruby
charliesome has quit [Quit: zzz]
linojon has joined #ruby
tokik has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
hiall has joined #ruby
phoo1234567 has quit [Quit: Leaving]
Kricir has joined #ruby
Wolland has quit [Ping timeout: 258 seconds]
benlieb has quit [Read error: Connection reset by peer]
corehook has joined #ruby
goshdarnyou has joined #ruby
coderhs has quit [Quit: Leaving]
krisquigley has joined #ruby
startupality has quit [Quit: startupality]
endash has quit [Quit: endash]
wjimenez5271 has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
nettoweb has quit [Ping timeout: 272 seconds]
drawingthesun has quit [Read error: Connection reset by peer]
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 272 seconds]
corehook has quit [Ping timeout: 260 seconds]
jonr22 has quit [Ping timeout: 240 seconds]
graydot has quit [Quit: graydot]
nettoweb has joined #ruby
mattstra_ has joined #ruby
kenneth has joined #ruby
<rubie> hi all i have a quick question -- https://gist.github.com/gabrie30/3e08de76ea36a8fe08d3
zz_karupa is now known as karupa
graydot has joined #ruby
mattstratton has quit [Ping timeout: 240 seconds]
melik has quit [Quit: Computer has gone to sleep.]
<rubie> no idea how to start this
mattstratton has joined #ruby
havenwood has quit [Remote host closed the connection]
hiyosi_ has quit [Ping timeout: 245 seconds]
mattstra_ has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
havenwood has quit [Remote host closed the connection]
osvico has joined #ruby
gmas has quit [Ping timeout: 258 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
karupa is now known as zz_karupa
blackmesa has quit [Ping timeout: 244 seconds]
felixjet has quit [Read error: Connection reset by peer]
<rubie> is there a more ruby way to do this?
hmsimha_ has quit [Ping timeout: 260 seconds]
ghostmoth has quit [Quit: ghostmoth]
agjacome has quit [Quit: leaving]
doodlehaus has joined #ruby
<benzrf> [3] * 5
<benzrf> >> [3] * 5
<eval-in_> benzrf => [3, 3, 3, 3, 3] (https://eval.in/198297)
gorelative has joined #ruby
<gorelative> need to set a variable equal to another variable if Another variable is == false
cndiv has quit [Ping timeout: 240 seconds]
<gorelative> message['auth'] = @auth_hash if body[:required_auth]
<gorelative> is this right?
xorax_ has joined #ruby
Sharker has quit [Ping timeout: 264 seconds]
_joelsmith has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubyonrailed has quit []
Sharker has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has joined #ruby
bmurt has joined #ruby
zz_karupa is now known as karupa
hiyosi_ has joined #ruby
<rubie> thank you
tkuchiki has quit [Remote host closed the connection]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
32NAAD356 has joined #ruby
cashnguns has joined #ruby
gsd has quit [Client Quit]
doodlehaus has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 260 seconds]
jyuan` has quit [Remote host closed the connection]
Wolland has joined #ruby
jyuan has joined #ruby
<rubie> what is the best way to learn how tocode more elegantly?
modernbob has quit [*.net *.split]
xorax has quit [*.net *.split]
joelsmith has quit [*.net *.split]
manacit has quit [*.net *.split]
<rubie> looking at other peoples work?
<rubie> memorizing it?
mrsolo has quit [Ping timeout: 244 seconds]
yacks has joined #ruby
<centrx> rubie, Looking at other people's work, and doing classic algorithms and interesting problems
ppinto has joined #ruby
<centrx> rubie, If you want to memorize something, memorize something timeless like that
<centrx> timeless and universally applicable
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
32NAAD356 is now known as cashnguns
Tricon has joined #ruby
nettoweb has joined #ruby
Sawbones has joined #ruby
<centrx> rubie, http://rosettacode.org/
sevenseacat has joined #ruby
nettoweb has quit [Max SendQ exceeded]
hellangel7 has joined #ruby
nettoweb has joined #ruby
Guest69740 is now known as magic
hellangel7 has quit [Read error: Connection reset by peer]
solo_ has joined #ruby
magic is now known as Guest20981
Guest20981 is now known as magic
<rubie> centrix: what are classic algorithm problems/.
<gorelative> question: i have a string ... str = '2.4.0' i need to grab the first two "versions" and drop the last
<rubie> like project euler?
magic has quit [Changing host]
magic has joined #ruby
fsapo has quit [Remote host closed the connection]
<gorelative> str.split('.') and then recombine them back in so ... 2.4.0 becomes 2.4
jyuan has quit [Read error: Connection reset by peer]
<rubie> centrx: thanks for that rosetta page!
<Wolland> split('.')[0..1].join('.')
geggam has joined #ruby
<gorelative> holy balls thats slick
Zesty has quit [Quit: Leaving...]
<centrx> rubie, yes project euler has a lot of those, it seems to have more mathematical ones as opposed to computer science ones but nevertheless interesting and relevant, and computer science really is mathematics.
nettoweb has quit [Client Quit]
Xuerian has quit [Read error: Connection reset by peer]
fsapo has joined #ruby
AndChat| has quit [Ping timeout: 272 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
<centrx> rubie, Data structures like a hash table, Search algorithms like Binary search, Sort algorithms like Quicksort
<solo_> Looking to create a cli app in ruby..haven't done any ruby and a quick google search lead me to thor, commander, or slop..does anyone have any recommendations on which to use?
postmodern has quit [Quit: Leaving]
<centrx> rubie, You'll notice Ruby has a native Hash data table, which is implemented using a hash table. Hash tables are used everywhere in computers
<centrx> rubie, *Hash data type
<centrx> rubie, And the Ruby native Array#sort uses QuickSort, because it is a fast all-purpose algorithm
<rubie> cool i'll look into those
<centrx> binary trees
alexherbo2 has quit [Ping timeout: 250 seconds]
klmlfl has joined #ruby
cndiv has joined #ruby
kireevco has quit [Quit: Leaving.]
dkam has joined #ruby
cirn0 has joined #ruby
Sharker has quit [Ping timeout: 264 seconds]
Sharker has joined #ruby
jasonzzz_ has joined #ruby
jasonzzz_ has left #ruby [#ruby]
mary5030 has joined #ruby
lampd1 has joined #ruby
mattstratton has quit [Read error: Connection reset by peer]
mattstratton has joined #ruby
tkuchiki has joined #ruby
klmlfl has quit [Ping timeout: 272 seconds]
mattstratton has quit [Max SendQ exceeded]
ursooperduper has joined #ruby
mattstratton has joined #ruby
brandonshowers has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
cirn0 has quit [Ping timeout: 258 seconds]
c107 has joined #ruby
deject3d has joined #ruby
jonr22 has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
TorpedoSkyline has joined #ruby
bruno- has joined #ruby
kireevco has joined #ruby
jhass is now known as jhass|off
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
lkba has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kenneth has joined #ruby
modernbob has joined #ruby
manacit has joined #ruby
alexherbo2 has joined #ruby
daynaskully has quit [Quit: quit]
jhass|off is now known as jhass
digifiv5e has joined #ruby
digifiv5e has quit [Changing host]
digifiv5e has joined #ruby
manacit has quit [Changing host]
manacit has joined #ruby
bruno- has quit [Ping timeout: 258 seconds]
<benzrf> solo_: i like thor
<solo_> benzrf: Just installed it.
digifiv5e is now known as daynaskully
jhass is now known as jhass|off
<solo_> benzrf: I think it will get the job done for now. Now I just need to figure out how to set this project up hah :x
geggam has quit [Ping timeout: 246 seconds]
thams has joined #ruby
IcyDragon has joined #ruby
moritzschaefer has joined #ruby
hmsimha_ has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
moritzs has quit [Ping timeout: 250 seconds]
axsuul has joined #ruby
omosoj_ has joined #ruby
thams has quit [Quit: thams]
bricker`work has quit [Ping timeout: 260 seconds]
j_mcnally has joined #ruby
kireevco has quit [Quit: Leaving.]
wjimenez5271 has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
AtumT has quit [Quit: AtumT]
nettoweb has joined #ruby
charliesome has joined #ruby
nettoweb has quit [Max SendQ exceeded]
niklasb has quit [Ping timeout: 245 seconds]
Sawbones has quit [Remote host closed the connection]
nettoweb has joined #ruby
IcyDragon has quit [Ping timeout: 245 seconds]
skolman_ has joined #ruby
IcyDragon has joined #ruby
Wolland_ has joined #ruby
wjimenez5271 has quit [Read error: Connection reset by peer]
wjimenez5271 has joined #ruby
Channel6 has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
Wolland_ has quit [Remote host closed the connection]
narcan has joined #ruby
Wolland has quit [Ping timeout: 240 seconds]
<omosoj_> what's the difference between a model generator and a migration generator? the model generator creates a corresponding model file as well?
boombadaroomba has joined #ruby
<sevenseacat> one creates a model, one creates a migration.
geggam has joined #ruby
<omosoj_> heh
<omosoj_> this guide says that model generators create migrations, http://guides.rubyonrails.org/migrations.html#model-generators
hamakn has joined #ruby
LudicrousMango has joined #ruby
echooo has joined #ruby
<sevenseacat> they do, they create a migration for the model.
boombadaroomba has quit [Ping timeout: 260 seconds]
cashnguns has quit [Remote host closed the connection]
<omosoj_> so the model generator creates 2 things, and the migration generator creates 1 thing, right?
<omosoj_> things = files
hmsimha_ has quit [Ping timeout: 272 seconds]
bricker`LA has joined #ruby
jrhe_ has quit [Quit: Connection closed for inactivity]
cndiv has quit [Ping timeout: 272 seconds]
_maes_ has joined #ruby
chrishough has joined #ruby
i8igmac has quit [Quit: Leaving]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bigmac has joined #ruby
tylersmith has joined #ruby
<chrishough> has anyone rcvd the update brew update
<chrishough> Library/Formula/omega.rb
<chrishough> error: The following untracked working tree files would be overwritten by merge:
<chrishough> error?
davasaurous has quit [Remote host closed the connection]
sepp2k has joined #ruby
lampd1 has quit [Remote host closed the connection]
davasaurous has joined #ruby
tectonic has joined #ruby
oo_ has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 244 seconds]
deject3d has quit [Read error: Connection reset by peer]
deject3d_ has joined #ruby
fgo has joined #ruby
lampd1 has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
Ankhers has quit [Ping timeout: 264 seconds]
baltazore has joined #ruby
ursooperduper has quit [Read error: Connection reset by peer]
RichardLitt has joined #ruby
fred-inRio has joined #ruby
nettoweb_ has joined #ruby
geggam_ has joined #ruby
jonr22 has quit [Ping timeout: 272 seconds]
nettoweb_ has quit [Max SendQ exceeded]
nettoweb_ has joined #ruby
deject3d has joined #ruby
xcv has quit [Remote host closed the connection]
snath has joined #ruby
deject3d_ has quit [Read error: Connection reset by peer]
xcv has joined #ruby
tyll has joined #ruby
lampd1 has quit [Ping timeout: 260 seconds]
nettoweb has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
baltazore has quit [Ping timeout: 250 seconds]
fabrice31 has joined #ruby
wallerdev has quit [Quit: wallerdev]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
tyll_ has quit [Ping timeout: 272 seconds]
tectonic has quit []
klmlfl has joined #ruby
echooo1 has joined #ruby
xcv has quit [Ping timeout: 258 seconds]
reset has quit [Quit: Leaving...]
Ankhers has joined #ruby
reset has joined #ruby
echooo has quit [Ping timeout: 258 seconds]
geggam has quit [Disconnected by services]
fabrice31 has quit [Ping timeout: 245 seconds]
bruno- has joined #ruby
geggam has joined #ruby
geggam has quit [Disconnected by services]
geggam_ is now known as geggam
geggam_ has joined #ruby
mocfive has joined #ruby
tectonic has joined #ruby
brandonshowers has joined #ruby
geggam_ has quit [Client Quit]
klmlfl has quit [Ping timeout: 240 seconds]
wjimenez5271 has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
reset has quit [Ping timeout: 245 seconds]
krz has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
krisquigley has joined #ruby
melik has joined #ruby
wjimenez5271 has quit [Ping timeout: 245 seconds]
alvaro_o has quit [Quit: Ex-Chat]
dorei has quit []
krz has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
wjimenez5271 has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
ppinto has quit [Ping timeout: 240 seconds]
Tricon has quit [Quit: Linkinus - http://linkinus.com]
AlexRussia has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 272 seconds]
AlexRussia has joined #ruby
krz has joined #ruby
omosoj_ has quit [Quit: leaving]
narcan has joined #ruby
corehook has joined #ruby
tectonic has quit []
angusiguess has quit [Ping timeout: 260 seconds]
Sawbones has joined #ruby
davasaurous has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
krz has quit [Ping timeout: 244 seconds]
mikepack has joined #ruby
Kricir has joined #ruby
Sawbones has quit [Remote host closed the connection]
yeticry has joined #ruby
wjimenez5271 has quit [Remote host closed the connection]
corehook has quit [Ping timeout: 260 seconds]
wjimenez5271 has joined #ruby
krz has joined #ruby
<solo_> wow
<solo_> learned ruby in one night and already pushed a gem out..nice job ruby community :)
<solo_> i like it
<gorelative> said ruby gem is?
Hobogrammer_ has joined #ruby
<sevenseacat> the whole language? nice
RyanV has joined #ruby
<sevenseacat> its taken me four years and i'm still not there yet
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
radic has joined #ruby
nanoyak has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
yeticry has quit [Remote host closed the connection]
tectonic has joined #ruby
<solo_> yes, the entire language
Mia has quit [Read error: Connection reset by peer]
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
wjimenez5271 has quit [Ping timeout: 272 seconds]
Eggie has joined #ruby
yeticry has joined #ruby
Eggie has left #ruby [#ruby]
skolman_ has quit [Remote host closed the connection]
Hobogrammer has quit [Ping timeout: 272 seconds]
skolman has joined #ruby
radic_ has quit [Ping timeout: 260 seconds]
Fire-Dragon-DoL has quit [Quit: Leaving.]
emmesswhy has joined #ruby
RyanV has quit [Quit: Lingo - http://www.lingoirc.com]
stormbytes has joined #ruby
<stormbytes> evening folks
yeticry has quit [Ping timeout: 260 seconds]
skolman has quit [Ping timeout: 245 seconds]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<stormbytes> question about structuring an app: lets say I need 2 similar objects --- like a "magazine" and a "book". They share some variables/methods and not others. Whats the best way to structure that in code?
tolo123 has quit [Read error: No route to host]
<stormbytes> different classes? mixins? super/child?
jalcine has quit [Quit: Quit]
krisquigley has quit [Remote host closed the connection]
postmodern has joined #ruby
felixjet has joined #ruby
<sevenseacat> well different classes for sure
krisquigley has joined #ruby
<shevy> class Penis
<stormbytes> so like.. superclass "Publication" with child classes "book" and "magazine" ?
awc737 has joined #ruby
<shevy> well
finitoo has joined #ruby
gsd has joined #ruby
tolo123 has joined #ruby
<shevy> most of the time you can simplify it - for instance, you can gather all specific constants in a module
tolo123 has quit [Client Quit]
<sevenseacat> composition over inheritance is the oft-touted rule of thumb
GriffinHeart has joined #ruby
InhalingPixels has quit []
<stormbytes> could you elaborate on that or point me to a resource?
<shevy> the traditional subclass approach should go to have the same logic in the parent class, and the subclass would then be a specialized variant of that
<shevy> for instance, the traditional parent would be:
<shevy> class Weapon
<shevy> and then the subclass is
<shevy> class Sword < Weapon
<shevy> I don't think a book is a magazine nor is a magazine really a book though
<stormbytes> shevy yes i understand that, but i'm not sure if it works in this scnerio
<stormbytes> but they are both publications
<shevy> then you'd need a third class
lyanchih has joined #ruby
<shevy> class Publication
<stormbytes> as a superclass
<shevy> yeah
deject3d has quit [Quit: Computer has gone to sleep.]
<stormbytes> yeah i was considering that.. thought maybe there was some better way i dunno
<shevy> sure
<shevy> just use modules
<sevenseacat> it could really be done either way.
<sevenseacat> most people would lead to the module in ruby though, i think.
<sevenseacat> *lean
<shevy> stormbytes I have a project called EasyCompile
<stormbytes> i was considering modules too
<stormbytes> though I didn't quite get how i'd set thing sup
<shevy> stormbytes in this I have one base class which will compile an archive into the /usr prefix
krisquigley has quit [Ping timeout: 245 seconds]
<sevenseacat> class Book; include Publication; end
<shevy> stormbytes I then also have a specialized class that is a subclass of this base class - it will use a different prefix (app-dir prefix)
<shevy> it also has to do some post-compile hooks, which are unique to that latter class only
tectonic has quit []
<stormbytes> sevenseacat the problem with that is Publication couldn't have state
speakingcode has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
<sevenseacat> why would it?>
<stormbytes> well a publication has a 'name', 'author', 'date published'. etc
<stormbytes> regardless of book or magazine
<stormbytes> it wouldn't make sense to repeat these in each subclass
<sevenseacat> thats okay, that state would be on both of the book and magazine
<stormbytes> but if publication is a module, its (to my knowledge) poor form to add variables to it
<sevenseacat> it can come from the module, but it would be stored in the classes it is included in
<sevenseacat> huh?
<shevy> stormbytes now you already described your preference so why don't you continue? class Publication; end; class Book < Publication; end
emmesswhy has quit [Quit: This computer has gone to sleep]
<sevenseacat> indeed, you seem to be leaning that way, so just go with it
<shevy> set your accessor methods in the parent class, call them in your subclass
<stormbytes> shevy : i'm considering different ways of doing it and have some pros/cons in mind, but haven't made any final decision yet
<shevy> yeah because your mind is weak
<stormbytes> lol
<shevy> you are not in the flow of coding
<sevenseacat> the decision isnt a big deal. try one way, if it doesnt work, change it.
<shevy> the difference between modules and classes in ruby is rather fuzzy
<stormbytes> yeah good point sevenseacat
<shevy> a module is basically like a crippled class - you don't get to have .new
<stormbytes> modules are for namespacing and essentially "macros"
<stormbytes> exactly
<shevy> you can use a class for namespacing as well :)
<stormbytes> you can
<shevy> people do that so they can do .new
<shevy> I did this for: class Exams
<shevy> class Exams; class AskQuestion
<shevy> hmm, singular... it is actually *class Exam
<shevy> Exam.new
<shevy> it's my trainer for exams so I don't get to fail them \o/
<stormbytes> ok settled
<stormbytes> i'll set it up as a base/sub class
<stormbytes> and mess around with it later if it doesn't seem quite right
nettoweb_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sawbones has joined #ruby
<stormbytes> ;) thx
kobain has joined #ruby
emmesswhy has joined #ruby
GriffinHeart has joined #ruby
rezzack has quit [Ping timeout: 272 seconds]
fred-inRio has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
echooo has joined #ruby
echooo1 has quit [Ping timeout: 245 seconds]
crdpink2 has joined #ruby
oo_ has joined #ruby
txdv has quit [Ping timeout: 246 seconds]
chrishough has quit [Read error: Connection reset by peer]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
geggam has quit [Remote host closed the connection]
crdpink has quit [Ping timeout: 272 seconds]
txdv has joined #ruby
geggam has joined #ruby
stormbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
bricker`work has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<shevy> env x='() { :;}; echo vulnerable' bash -c "echo test"
wallerdev has joined #ruby
dukz has joined #ruby
Spami has joined #ruby
klmlfl has joined #ruby
Scotteh has joined #ruby
braincrash has quit [Quit: bye bye]
bruno- has quit [Ping timeout: 272 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
<sevenseacat> no shellshock for you
cirn0 has joined #ruby
yacks has joined #ruby
klmlfl has quit [Ping timeout: 245 seconds]
fredInRio has joined #ruby
tanath has quit [Remote host closed the connection]
Scotteh has quit [Ping timeout: 260 seconds]
<shevy> shock the cat!
seitensei has quit [Ping timeout: 272 seconds]
braincrash has joined #ruby
tanath has joined #ruby
kenneth has joined #ruby
cirn0 has quit [Ping timeout: 240 seconds]
fgo has quit [Remote host closed the connection]
dukz has quit [Remote host closed the connection]
buto_ has joined #ruby
kireevco has joined #ruby
<pontiki> you don't monkey with the monkey
seitensei has joined #ruby
karupa has quit [Quit: ZNC - http://znc.in]
SpaceKookie has joined #ruby
karupa has joined #ruby
davasaurous has joined #ruby
kireevco has quit [Ping timeout: 245 seconds]
GriffinHeart has quit [Remote host closed the connection]
Relaxation___ has quit [Quit: Connection closed for inactivity]
crdpink has joined #ruby
pen has quit [Ping timeout: 250 seconds]
angusiguess has joined #ruby
fsapo has quit [Remote host closed the connection]
crdpink2 has quit [Ping timeout: 246 seconds]
chrishough has joined #ruby
bmurt has quit []
arup_r has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kil0byte has joined #ruby
arup_r has quit [Remote host closed the connection]
kireevco has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
corehook has joined #ruby
AlSquire has joined #ruby
buto_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> ay
mofai has quit [Quit: Bye]
bricker`work has quit [Ping timeout: 272 seconds]
angusiguess has quit [Ping timeout: 272 seconds]
finitoo has quit [Ping timeout: 260 seconds]
finitoo has joined #ruby
mrsolo has joined #ruby
gsd has joined #ruby
modernbob has quit [Ping timeout: 255 seconds]
yeticry has joined #ruby
kil0byte has quit [Read error: Connection reset by peer]
corehook has quit [Ping timeout: 260 seconds]
yacks has quit [Ping timeout: 250 seconds]
kireevco has quit [Quit: Leaving.]
kil0byte has joined #ruby
yacks has joined #ruby
Riking has quit [Quit: ZNC - http://znc.sourceforge.net]
mary5030 has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
Riking has joined #ruby
solo_ has quit [Quit: Leaving...]
tectonic has joined #ruby
Ankhers has quit [Ping timeout: 264 seconds]
axsuul has quit [Remote host closed the connection]
<gorelative> i need to write a small ruby "agent" that fires up an http server and listens for a get request at a specific url and does some stuff
<gorelative> sinatra and the like are way bloated for what i need
axsuul has joined #ruby
oo_ has quit [Remote host closed the connection]
tonybird has joined #ruby
tonybird has quit [Max SendQ exceeded]
<pontiki> build it on rack
kil0byte_ has joined #ruby
RichardLitt has quit [Quit: RichardLitt]
<pontiki> or just use TCPServer
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gorelative> hmm
skolman_ has joined #ruby
tonybird has joined #ruby
osvico has quit [Ping timeout: 272 seconds]
kil0byte has quit [Ping timeout: 245 seconds]
<gorelative> can i use webrick
skolman_ has quit [Remote host closed the connection]
<gorelative> or does it only serve up static assets?
skolman_ has joined #ruby
IcyDragon has quit [Quit: Space~~~]
<pontiki> i've never used webrick by itself, but i think it'd do
echooo1 has joined #ruby
<pontiki> is this something that will be exposed to the wilds of the Internet, or only internal?
echooo has quit [Ping timeout: 245 seconds]
dukz has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
<gorelative> nop only internal
<gorelative> going to use it as a post-receive hook for gitlab
kireevco has quit [Quit: Leaving.]
<gorelative> to run a git pull
mary5030 has quit [Remote host closed the connection]
angusiguess has joined #ruby
mary5030 has joined #ruby
AlexRussia has joined #ruby
skolman_ has quit [Ping timeout: 272 seconds]
emocakes has joined #ruby
<pontiki> yeah, prolly fine then
jbueza has joined #ruby
mary5030 has quit [Remote host closed the connection]
lukeholder has joined #ruby
gsd has quit [Read error: Connection reset by peer]
geggam has quit [Ping timeout: 250 seconds]
fabrice31 has joined #ruby
fgo has joined #ruby
emocakes__ has quit [Ping timeout: 272 seconds]
rubie has quit [Ping timeout: 246 seconds]
kil0byte_ has quit [Remote host closed the connection]
<pontiki> do take a peek at TCPServer, tho, as well
gsd has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
<pontiki> does the post-receive hook require a response?
krisquigley has joined #ruby
<pontiki> or is it just fire-and-forget?
oo_ has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
patrick99e99 has joined #ruby
karupa has quit [Quit: ZNC - http://znc.in]
chrishough has joined #ruby
pen has joined #ruby
chrishough has quit [Client Quit]
chrishough has joined #ruby
gsd has quit [Read error: Connection reset by peer]
zz_karupa has joined #ruby
gsd has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
zz_karupa is now known as karupa
fgo has quit [Ping timeout: 272 seconds]
krisquigley has quit [Ping timeout: 245 seconds]
lampd1 has joined #ruby
gsd_ has joined #ruby
patrick99e99 has quit [Ping timeout: 272 seconds]
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
gsd has quit [Ping timeout: 240 seconds]
narcan has joined #ruby
GriffinHeart has joined #ruby
emocakes has quit [Ping timeout: 245 seconds]
jerius has joined #ruby
lampd1 has quit [Ping timeout: 245 seconds]
brandonshowers has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zz_LoRdToLsToI has joined #ruby
osvico has joined #ruby
gsd_ has quit [Ping timeout: 240 seconds]
gsd has joined #ruby
diegoviola has joined #ruby
duncannz has joined #ruby
gsd has quit [Client Quit]
klmlfl has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
Spami has quit [Quit: This computer has gone to sleep]
fgo has joined #ruby
echevemaster_ has joined #ruby
lynxman has quit [Quit: leaving]
mattmcclure has joined #ruby
lynxman has joined #ruby
bluOxigen has joined #ruby
klmlfl has quit [Ping timeout: 258 seconds]
KC9YDN has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 246 seconds]
User458764 has joined #ruby
Axy has quit [Read error: Connection reset by peer]
thrasymachus has joined #ruby
tonybird has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moritzschaefer has quit [Ping timeout: 240 seconds]
techsethi has joined #ruby
mary5030 has joined #ruby
caesar_ has joined #ruby
corehook has joined #ruby
caesar_ has quit [Client Quit]
skolman has joined #ruby
gimpygoo has joined #ruby
corehook has quit [Ping timeout: 245 seconds]
davasaurous has quit [Remote host closed the connection]
Kabaka has quit [Ping timeout: 272 seconds]
AlexRussia has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ruby
RichardLitt has joined #ruby
skolman has quit [Remote host closed the connection]
kamilc__ has joined #ruby
JBreit has joined #ruby
skolman has joined #ruby
JBreit has left #ruby [#ruby]
lukeholder has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kabaka has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
Takle has joined #ruby
kireevco has joined #ruby
corehook has joined #ruby
skolman has quit [Ping timeout: 272 seconds]
j75 has joined #ruby
kireevco has quit [Client Quit]
Avahey has quit [Quit: Connection closed for inactivity]
Takle has quit [Ping timeout: 272 seconds]
<j75> when using a case statement is it possible to have multple regex matches in the same when statement, e.g. /match1/, /match2/
davasaurous has joined #ruby
ta has quit [Remote host closed the connection]
p0sixpscl has joined #ruby
kamilc__ has quit [Read error: Connection reset by peer]
kamilc__ has joined #ruby
<j75> ahh yes it is i see what i was doing wrong
benzrf is now known as benzrf|offline
AlexRussia has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
p0sixpscl has quit [Client Quit]
mocfive has quit [Remote host closed the connection]
<tectonic> Even something like `uname -a 2>/dev/null` is vulnerable.
mocfive has joined #ruby
Zesty has joined #ruby
MrBoolean has quit [Quit: Leaving...]
angusiguess has joined #ruby
mocfive has quit [Ping timeout: 272 seconds]
<eam> and that's why you never invoke a shell
roombadaboomba has joined #ruby
fgo has joined #ruby
roombadaboomba has quit [Client Quit]
<tectonic> But plenty of gems do. That's in the Stripe gem.
andrewjanssen has joined #ruby
<eam> oh yeah, this is a huge problem
techsethi has quit [Quit: techsethi]
<eam> and a great excuse for "I told you so"
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
angusiguess has quit [Ping timeout: 272 seconds]
willgo has quit [Remote host closed the connection]
klmlfl has joined #ruby
<pontiki> experience is the best teacher
lewix has quit [Remote host closed the connection]
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
oleo__ has quit [Quit: Verlassend]
fgo has quit [Ping timeout: 260 seconds]
lsmola has quit [Ping timeout: 272 seconds]
echevemaster_ has quit [Remote host closed the connection]
oso96_2000 is now known as oso|away
lewix_ has joined #ruby
lewix has quit [Read error: Connection reset by peer]
Takle has joined #ruby
j75 has quit []
tectonic has quit []
pushnell has joined #ruby
lukeholder has joined #ruby
dukz has quit [Remote host closed the connection]
MaciejCzyzewski has joined #ruby
klmlfl has quit [Remote host closed the connection]
almostworking has joined #ruby
almostworking has quit [Remote host closed the connection]
sh1ken has joined #ruby
lewix_ has quit [Remote host closed the connection]
lewix has joined #ruby
c107 has quit [Remote host closed the connection]
kireevco has joined #ruby
sepp2k has quit [Quit: Leaving.]
ghostmoth has joined #ruby
kireevco has quit [Max SendQ exceeded]
thomasxie has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
mr-foobar has quit [Quit: Leaving...]
kireevco has joined #ruby
almostworking has joined #ruby
cirn0 has joined #ruby
lsmola has joined #ruby
echooo1 has quit [Quit: echooo1]
lmickh has quit [Remote host closed the connection]
Spami has joined #ruby
lewix has quit [Ping timeout: 272 seconds]
buub has quit [Ping timeout: 272 seconds]
GriffinHeart has quit [Remote host closed the connection]
emmesswhy has quit [Quit: This computer has gone to sleep]
lukeholder has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Channel6 has quit [Quit: Leaving]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cirn0 has quit [Ping timeout: 244 seconds]
almostworking has left #ruby ["Leaving"]
klmlfl has joined #ruby
GriffinHeart has joined #ruby
chrishough has quit [Read error: Connection reset by peer]
duncan_bayne has joined #ruby
<agent_white> So. I have a 2d array for a grid I access via grid[y][x]. Someone said I would have to overload the "[]" operator to switch the coordinates so I can access it in normal coordinate form (grid[x][y]). Is that what I need to do?
* agent_white doesn't know how to explain in technical terms
<duncan_bayne> Hi, I'm trying to call a set accessor from C with 'rb_funcall(output, rb_intern("state"), 1, T_TRUE);'. It's failing silently :( Am I doing something obviously wrong here?
<duncan_bayne> That's intended to be equivalent to 'output.state = true' in Ruby
p0sixpscl has joined #ruby
<duncan_bayne> Ahah
<duncan_bayne> Qtrue
<duncan_bayne> Qfalse
tectonic has joined #ruby
<duncan_bayne> Correct code is: 'rb_funcall(output, rb_intern("state="), 1, Qtrue);'
duncan_bayne has left #ruby [#ruby]
p0sixpscl has quit [Client Quit]
chrishough has joined #ruby
charliesome has quit [Quit: zzz]
sepp2k has joined #ruby
sevvie has quit [Quit: leaving]
GriffinHeart has quit [Remote host closed the connection]
arup_r has joined #ruby
lewix has joined #ruby
GriffinHeart has joined #ruby
charliesome has joined #ruby
Zesty- has joined #ruby
Zesty- has quit [Client Quit]
modernbob has joined #ruby
mastr_bennett[x] has joined #ruby
fredInRio has quit [Ping timeout: 260 seconds]
klmlfl has quit [Remote host closed the connection]
Zesty has quit [Ping timeout: 250 seconds]
techsethi has joined #ruby
thrasymachus has quit [Quit: leaving]
freerobby has quit [Quit: Leaving.]
devboard has joined #ruby
statis has joined #ruby
mityaz_ has quit [Quit: See ya!]
gorelative has quit [Ping timeout: 250 seconds]
lukeholder has joined #ruby
bMalum has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby
bMalum has joined #ruby
devboard has quit []
fabrice31 has joined #ruby
krisquigley has joined #ruby
bruno- has joined #ruby
klmlfl has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
baltazore has joined #ruby
Mohd_ has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
MiracleBlue_ has quit [Ping timeout: 272 seconds]
cmaxw has quit [Ping timeout: 272 seconds]
callenb__ has quit [Ping timeout: 272 seconds]
blackjid has quit [Ping timeout: 272 seconds]
cmaxw has joined #ruby
bedouin has quit [Ping timeout: 272 seconds]
paulog__ has quit [Ping timeout: 272 seconds]
angusiguess has joined #ruby
Alina-malina has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
paulog__ has joined #ruby
MiracleBlue_ has joined #ruby
callenb__ has joined #ruby
klmlfl has quit [Ping timeout: 245 seconds]
computerex has quit [Ping timeout: 260 seconds]
dukz has joined #ruby
p0sixpscl has joined #ruby
codecop has joined #ruby
echooo has joined #ruby
bedouin_ has joined #ruby
blackjid has joined #ruby
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
dukz has quit [Remote host closed the connection]
fgo has joined #ruby
kireevco has quit [Quit: Leaving.]
kireevco has joined #ruby
angusiguess has quit [Ping timeout: 250 seconds]
grenierm has joined #ruby
kireevco has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
jackyalcine has joined #ruby
dopiee has quit [Ping timeout: 245 seconds]
speaking1ode-wor has joined #ruby
dopiee has joined #ruby
dopie has quit [Ping timeout: 260 seconds]
starkhalo has quit [Ping timeout: 244 seconds]
speakingcode-wor has quit [Ping timeout: 260 seconds]
jimmyy has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
MrBoolean has joined #ruby
gimpygoo has quit [Ping timeout: 272 seconds]
lampd1 has joined #ruby
klmlfl has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
klmlfl has quit [Read error: No route to host]
p0sixpscl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klmlfl has joined #ruby
tanath has quit [Remote host closed the connection]
tanath has joined #ruby
<certainty> moin
apeiros has joined #ruby
lampd1 has quit [Ping timeout: 260 seconds]
klmlfl has quit [Ping timeout: 258 seconds]
julian-delphiki has joined #ruby
bean has quit [Read error: Connection reset by peer]
User458764 has quit [Ping timeout: 260 seconds]
kenneth has joined #ruby
jerius has quit [Ping timeout: 245 seconds]
apeiros has quit [Ping timeout: 272 seconds]
echooo has quit [Quit: echooo]
anarang has joined #ruby
echooo has joined #ruby
codeurge has quit [Quit: Sleep.]
relix has joined #ruby
jerius has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
User458764 has joined #ruby
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
yxhuvud has quit [Remote host closed the connection]
echosystm has joined #ruby
dukz has joined #ruby
<agent_white> \o
<echosystm> when im redefining a class method eg. class X; def a; end; end;
<echosystm> is there any way to access a variable outside the scope of the method?
<echosystm> like this... http://pastebin.com/Vit9VNiC
<statis> Does the variable have to be outside the scope of the class?
bal has joined #ruby
<statis> if not, you could use a class or instance variable.
yxhuvud has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
zorak8 has quit [Ping timeout: 260 seconds]
<echosystm> it needs to be outside the class, yep
<statis> then you prolly want a global variable: http://www.rubyist.net/~slagell/ruby/globalvars.html
gimpygoo has joined #ruby
<echosystm> ok thanks
echosystm has quit [Quit: leaving]
mr-foobar has joined #ruby
<statis> np, gl.
bizarrosandwich has quit [Read error: Connection reset by peer]
davasaurous has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 240 seconds]
goshdarnyou has quit [Quit: Connection closed for inactivity]
User458764 has quit [Ping timeout: 246 seconds]
grenierm has quit [Quit: grenierm]
lewix has quit [Remote host closed the connection]
ta has joined #ruby
davasaurous has joined #ruby
lewix has joined #ruby
<mastr_bennett[x]> so is it possible to get terminal input from a script, in reponse to to CLI prompt and then redirect that back to stdout, to use in that CLI program via ruby. that value
<mastr_bennett[x]> I don't see how it would be possible, but I just asking in case there's anything better I can do than storing that value in the script.
ghostmoth has quit [Quit: ghostmoth]
spastorino has quit [Quit: Connection closed for inactivity]
hiyosi_ has quit [Ping timeout: 272 seconds]
User458764 has joined #ruby
aganov has joined #ruby
lewix has quit [Ping timeout: 272 seconds]
Morkel has joined #ruby
hmsimha_ has joined #ruby
HelperW_ has joined #ruby
lxsameer has joined #ruby
kaspergrubbe_ has joined #ruby
thomasxie has quit [Ping timeout: 260 seconds]
Scotteh has joined #ruby
hiall has quit [Quit: hiall]
Vile` has quit [Ping timeout: 246 seconds]
jackyalcine is now known as jalcin
jalcin is now known as jalcine
melik has quit [Quit: Computer has gone to sleep.]
emocakes has joined #ruby
Takle has quit [Remote host closed the connection]
RichardLitt has quit [Quit: RichardLitt]
rdark has joined #ruby
fabrice31 has joined #ruby
gauke has joined #ruby
arup_r has quit [Remote host closed the connection]
kaspergrubbe_ has quit [Remote host closed the connection]
techsethi has quit [Quit: techsethi]
ht__th has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
<pontiki> i have no idea what you're trying to do
arup_r has joined #ruby
LudicrousMango has quit [Remote host closed the connection]
<agent_white> mastr_bennett[x]: Yes, you can pipe stdin to a ruby script.
LudicrousMango has joined #ruby
adac has joined #ruby
<pontiki> i don't think that was the question
Vile` has joined #ruby
<mastr_bennett[x]> pontiki: i have a username stored in the script and I'm using system() to drop to the command line and run a program.
angusiguess has joined #ruby
<mastr_bennett[x]> that program needs a password.
maestrojed has joined #ruby
emocakes has quit []
<agent_white> mastr_bennett[x]: You mean like `echo "hello there" | capitalize.rb` => "HELLO THERE" ?
<agent_white> Heh...
<pontiki> does the called program request the password, or do you need to supply it when to use system()?
<mastr_bennett[x]> agent_white: no, like system('passwd')
<txdv> capitalize.rb, best script ever
<mastr_bennett[x]> pontiki: it requests the passwd.
<Hanmac> mastr_bennett[x]: hm you might look at open3 and popen
fgo has joined #ruby
<agent_white> txdv: Inorite? :D
<pontiki> probably not, Hanmac, if the called program needs to do IO with the user directly
<mastr_bennett[x]> well I actually am using those is the script instead of system. specifically popen...
<mastr_bennett[x]> IO.popen
timonv_ has joined #ruby
LudicrousMango has quit [Ping timeout: 272 seconds]
<mastr_bennett[x]> but I'm popen to other options :-)
sh1ken has quit [Quit: leaving]
<pontiki> is this actually the passwd program you're calling?
angusiguess has quit [Ping timeout: 272 seconds]
<mastr_bennett[x]> pontiki: no. it's git-svn
graydot has quit [Quit: graydot]
robbyoconnor has quit [Ping timeout: 260 seconds]
hiall has joined #ruby
wallerdev has quit [Quit: wallerdev]
techsethi has joined #ruby
<pontiki> does that have to ask for the password each time it's run? (i don't use it, obviously)
<pontiki> or can it use, say .netrc ?
klmlfl has joined #ruby
alex-i_ is now known as alex-i
<pontiki> it just seems crude. i don't have a ready answer to your original question, sadly.
<agent_white> So... is there a way for me to override Array's element reference operators for a 2d array? I would like to access this 2d array `Array.new(3) { Array.new(3) }` and set it's elements via `array[x][y]` instead the current reverse-cooordinates way of `array[y][x]`.
<agent_white> Notsure if I said that right... but yeah! :D
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
robbyoconnor has joined #ruby
charliesome has joined #ruby
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
Scotteh_ has joined #ruby
etqqkoiflwhb has joined #ruby
mindlessdemon has joined #ruby
klmlfl has quit [Ping timeout: 245 seconds]
p0sixpscl has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
kaspergrubbe_ has joined #ruby
Scotteh has quit [Ping timeout: 260 seconds]
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
andikr has joined #ruby
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
yeticry has joined #ruby
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
kaspergrubbe_ has quit [Read error: Connection reset by peer]
max06 has joined #ruby
kaspergrubbe_ has joined #ruby
mindlessdemon has joined #ruby
kaspergrubbe_ has quit [Read error: Connection reset by peer]
qpok has quit [Ping timeout: 260 seconds]
kaspergrubbe_ has joined #ruby
tectonic has quit []
mindlessdemon has left #ruby [#ruby]
<lxsameer> hey guys, Is there any solution to pack/unpack a binary data using bits ? ( unpack/pack method smallest template value is C which is 8bit)
tessi_zz is now known as tessi
davasaurous has quit [Remote host closed the connection]
cirn0 has joined #ruby
yeticry has quit [Remote host closed the connection]
<aech> lxsameer: You can just use the bitwise operators?
davasaurous has joined #ruby
fgo has quit [Remote host closed the connection]
kaspergrubbe_ has quit [Remote host closed the connection]
<lxsameer> aech: What do you mean, I need to generate a 38bytes long data which I have some 1bit flags in it too
Takle has joined #ruby
ta has quit [Remote host closed the connection]
noop has joined #ruby
kaspergrubbe_ has joined #ruby
<aech> lxsameer: you could also use the bindata gem
<lxsameer> aech: thanks let me take a look
cirn0 has quit [Ping timeout: 245 seconds]
graydot has joined #ruby
<mastr_bennett[x]> pontiki: i didn't know about .netrc. This is meant to be cross-platform though and as dumb as possible so I don't think that'll work
Sawbones has quit [Ping timeout: 244 seconds]
fgo has joined #ruby
Scotteh_ has quit [Quit: Later, folks]
BTRE has quit [Ping timeout: 245 seconds]
ktpri has joined #ruby
kaspergrubbe_ has quit [Ping timeout: 260 seconds]
tylersmith has quit [Remote host closed the connection]
<flughafen> when is it ok to use global variables?
<mastr_bennett[x]> i honestly didn't expect there to be a way to do this. i was just curious. popen seems to be able to do some fancy things once you start looking at the docs.
tylersmith has joined #ruby
Sawbones has joined #ruby
krisquigley has joined #ruby
ta has joined #ruby
graydot has quit [Quit: graydot]
mercwithamouth has joined #ruby
<ktpri> ruby uses pointers?
AlSquirrel has joined #ruby
AlSquire has quit [Ping timeout: 240 seconds]
davasaurous has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 258 seconds]
hiyosi_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
lukeholder has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1_ has joined #ruby
alex88 has joined #ruby
timonv_ has joined #ruby
krisquigley has quit [Ping timeout: 240 seconds]
<flughafen> i think all programming languages use pointers, but wether or not it's exposed to you, is something different
timonv^ has joined #ruby
lukeholder has joined #ruby
tessi is now known as tessi_zz
SOLDIERz has joined #ruby
<SOLDIERz> Hello everyone
W0rmDr1nk has joined #ruby
<SOLDIERz> I've just got a question about ruby and a way to handle multiple ruby versions.
hiyosi_ has quit [Ping timeout: 260 seconds]
<SOLDIERz> Is there somebody which already have achieved to handle multiple versions of ruby on an redhad-derviate?
kaspergrubbe_ has joined #ruby
timonv_ has quit [Ping timeout: 250 seconds]
<sevenseacat> on a... what?
<SOLDIERz> and I mean no solutions with rvm, rbenv or anything else
yeticry has joined #ruby
<SOLDIERz> I mean thorugh rpms
<SOLDIERz> through
toretore has joined #ruby
timonv^ has quit [Remote host closed the connection]
bruno- has joined #ruby
contradictioned_ is now known as contradictioned
kaspergrubbe_ has quit [Read error: No route to host]
kaspergr_ has joined #ruby
<sevenseacat> 'is there anyone who has come up with a way to do this, not including the people who have already come up with ways to do this'
ktpri has quit [Quit: Page closed]
Juanchito has joined #ruby
<SOLDIERz> sry I mean Red Hat version
<SOLDIERz> @sevenseacat ?
<SOLDIERz> sevenseacat ?
<sevenseacat> whats wrong with the existing solutions?
<SOLDIERz> which existing solutions do you mean
<SOLDIERz> ?
<sevenseacat> rvm, rbenv, etc.
<SOLDIERz> well this is pretty simple. I don't want tools like make and gcc on a production server
yeticry has quit [Ping timeout: 245 seconds]
<sevenseacat> have fun then
graydot has joined #ruby
<sevenseacat> theres a reason these tools exist
graydot has quit [Client Quit]
kaspergr_ has quit [Read error: Connection reset by peer]
<SOLDIERz> and the reason is?
kaspergrubbe_ has joined #ruby
corehook has quit [Remote host closed the connection]
Stalkr_ has joined #ruby
<sevenseacat> because theyre the simplest and best way to tackle such a problem
boombada_ has joined #ruby
<pontiki> you can certainly roll your own rpms
Takle has quit [Remote host closed the connection]
corehook has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
<SOLDIERz> pontiki then probably tell me the simplest way to do that
<sevenseacat> if you have multiple RPMs that try to install the same programs, you still need some way to handle switching between them
<pontiki> i've never done it
fgo has quit [Remote host closed the connection]
<Stalkr_> Is it possible to have sh in a Rakefile not echo the output or should I just write to a tmp file? Need to silent sh %{which brew}, would that just be sh ${which brew > /tmp/brew} or is Rake then not able to use the block?
pen has quit [Read error: Connection reset by peer]
<flughafen> is there an equivlant of if __name__ == "__main__" in pyton?
<flughafen> err
pen has joined #ruby
<flughafen> un ruby
jxs_ has joined #ruby
<sevenseacat> what does that do?
<SOLDIERz> because I'm running in a lot of issues. Because there are then running in version issues.
<sevenseacat> indeed.
corehook has quit [Read error: No route to host]
<sevenseacat> thats why we use these tools.
corehook has joined #ruby
<SOLDIERz> So I need to create special rpms for every version of ruby
yfeldblum has joined #ruby
<flughafen> sevenseacat: it allows a file to be used as a lib if it's imported, or it'll run as an app if you run the file directly
<flughafen> so everything under if ...."__main__" runs if you call python thatfile.py
Ghis_ has joined #ruby
<SOLDIERz> and call them with the specific package name
boombada_ has quit [Ping timeout: 250 seconds]
GriffinHeart has quit [Remote host closed the connection]
<SOLDIERz> so like name: ruby213 to deploy ruby-2.1.3 to dont run in any version issues with yum and rom
<SOLDIERz> rpm
maestrojed has quit [Quit: Computer has gone to sleep.]
charliesome has quit [Quit: zzz]
<sevenseacat> have fun with that
<SOLDIERz> sevenseacat have fun with that is your most common answer for everything I'm talking about ha?
<sevenseacat> well what youre talking about is i think a bit crazy
mkaesz has joined #ruby
<SOLDIERz> I'm mean seriously rvm and rbenv could not be a solution for a productionsystem
ki0 has joined #ruby
dukz has quit [Remote host closed the connection]
<sevenseacat> why?
qba73 has joined #ruby
BTRE has joined #ruby
<pontiki> having build tools on a system is a vector
<SOLDIERz> Well I got there than every tools deployed to build software from the source
<sevenseacat> having a system is a vector
<SOLDIERz> i don't want to having build tools installed on productionsystems
<pontiki> no, the system is the target
<SOLDIERz> it's a security issue
oponder has joined #ruby
GriffinHeart has joined #ruby
parduse has quit []
* sevenseacat shrugs
dukz has joined #ruby
apeiros has joined #ruby
<pontiki> but i don't think you're going to get any further answers here, SOLDIERz
<postmodern> SOLDIERz, if you don't want rvm/rbenv in production, just install the ruby packages or roll your own
oponder has quit [Client Quit]
a has joined #ruby
<SOLDIERz> pontiki I think also... and I find it terrifying ...
<pontiki> shivver yer timbers
a is now known as Guest2850
<SOLDIERz> Nobody is thinking about this out there in the wild
<sevenseacat> most people don't want multiple versions of ruby on production servers.
angusiguess has joined #ruby
<pontiki> well, then, you have a huge paycheck in front of you. have at it
bMalum has quit [Ping timeout: 245 seconds]
<SOLDIERz> sevensecat I dont want to have also multiple version of ruby on our production servers
<postmodern> SOLDIERz, build tools in production are not a security issue, as they are not part of the attack surface
<sevenseacat> (15:31:03) SOLDIERz: Is there somebody which already have achieved to handle multiple versions of ruby on an redhad-derviate?
<postmodern> SOLDIERz, although they can help an attacker
<SOLDIERz> but the dev-team wants it so what to do? force them to one ruby version?
<postmodern> SOLDIERz, although, most attackers will have ready made payloads to drop onto your system, build tools or not
<sevenseacat> give them more than one server?
<postmodern> SOLDIERz, forcing them to one ruby version really simplifies things
decoponio has joined #ruby
jxs_ has quit [Ping timeout: 272 seconds]
<Bish> can somebody tell me what class << self does?
<Bish> i seem to be unable to google it
parduse has joined #ruby
<postmodern> SOLDIERz, also i think i answered your previous question: https://github.com/bernd/fpm-cookery
corehook has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
corehook has joined #ruby
<postmodern> Bish, creates a class that extends self, which is an object
angusiguess has quit [Ping timeout: 245 seconds]
klmlfl has joined #ruby
parduse is now known as Guest73528
<postmodern> Bish, also called a meta-class
Guest73528 has quit [Client Quit]
<Bish> postmodern, thank you really much :)
parduse has joined #ruby
parduse is now known as Guest54656
oponder has joined #ruby
elaptics`away is now known as elaptics
oponder has quit [Client Quit]
qba73 has quit [Remote host closed the connection]
choke has quit [Ping timeout: 260 seconds]
<SOLDIERz> postmodern yeah well I know fpm... but there it's the same problem here... versioning... and also there are other issues with fpm that are creepy... I need a system where I first need to install the build tools... So i can not run the build in an chroot envrionement
<SOLDIERz> and that are thinks I really don't want to...
roolo has joined #ruby
patrick99e99 has quit [Ping timeout: 260 seconds]
klmlfl has quit [Ping timeout: 260 seconds]
qba73 has joined #ruby
<postmodern> SOLDIERz, use schroot
mikecmpbll has joined #ruby
<postmodern> SOLDIERz, also for versionsing, have your packages install into /opt/rubies, then your apps can do #!/opt/rubies/..../bin/ruby
LiohAu_ has joined #ruby
arup_r has quit [Remote host closed the connection]
<postmodern> SOLDIERz, or you could create a build server that spits out docker images
corehook_ has joined #ruby
emmesswhy has joined #ruby
ndrei has joined #ruby
anarang has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
<SOLDIERz> well schroot and fpm is probably one way not the best but one way
anarang has joined #ruby
<SOLDIERz> but I'm thinking to really force them probably to one version. Because I see there really a lot of issues upcoming
Pumukel has joined #ruby
AFKGeek has joined #ruby
<postmodern> SOLDIERz, have them dev off system ruby
corehook has quit [Ping timeout: 272 seconds]
AFKGeek has quit [Changing host]
AFKGeek has joined #ruby
<cHarNe2> is this definition bad? http://pastie.org/9592951
mengu has joined #ruby
mengu has joined #ruby
pwestlun1 has left #ruby ["WeeChat 1.0"]
<SOLDIERz> postmodern yeah well you are probably right. From the Administrationside (my side) I really don't want to run multiple Versions on productionsystem..
ki0 has quit []
kaspergrubbe_ has quit [Remote host closed the connection]
<SOLDIERz> probably I need a meeting with them and force them to one version. Because it already scares me that multiple version think.
<Bish> postmodern, i think i got it from the link u sent me, but what exactly does the << operator do now.. does it extend the class by the methods the instance has?
kaspergrubbe_ has joined #ruby
<SOLDIERz> I want clean systems easy to deploy easy to control not more
yeticry has quit [Remote host closed the connection]
fgo has joined #ruby
<SOLDIERz> I'm losing there the control when I'm doing this fancy stuff with multiple versions
AFKGeek has quit [Client Quit]
<SOLDIERz> and can not gurantee a stable system
sk87 has joined #ruby
AFKGeek has joined #ruby
<postmodern> Bish, it's special syntax, << is normally the append operator
kaspergrubbe_ has quit [Read error: No route to host]
kaspergrubbe_ has joined #ruby
anarang has quit [Ping timeout: 246 seconds]
cym has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
bbloom has quit [Ping timeout: 260 seconds]
pen has quit [Ping timeout: 240 seconds]
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nouranology has joined #ruby
bbloom has joined #ruby
Guest2850 has quit [Ping timeout: 260 seconds]
ki0 has joined #ruby
<SOLDIERz> postmodern nice article
<SOLDIERz> would make things easier.. probably I get them there
Tomme has joined #ruby
<Bish> postmodern, if i do def module.method, is that a singleton method of a module oO
max06 has quit [Ping timeout: 244 seconds]
bricker`LA has quit [Ping timeout: 260 seconds]
<postmodern> Bish, try it https://eval.in/ruby
maoko has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<Bish> i don't know what to try.. if i do def method end, Module will always respond to the method and i cannot create an instance of the module right?
Alina-malina has quit [Ping timeout: 240 seconds]
<postmodern> Bish, you can query singleton methods via Mod.singleton_methods
<Bish> ah cool
<Bish> so.. modules are objects!?
<tobiasvl> everything
<tobiasvl> is an object
<tobiasvl> EVERYTHING
max06 has joined #ruby
hiyosi_ has joined #ruby
<Bish> tobiasvl, classes are objects?
<tobiasvl> Bish: oh sure
<Bish> confusing
<tobiasvl> classes are objects of the class Class
mindlessdemon has joined #ruby
dumdedum has joined #ruby
ephemerian has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
pushnell has quit [Quit: pushnell]
p0sixpscl has quit [Read error: Connection reset by peer]
<Bish> >>p self
<eval-in_> Bish => main ... (https://eval.in/198343)
dANO has joined #ruby
<Bish> got it.
p0sixpscl has joined #ruby
p0sixpscl has quit [Max SendQ exceeded]
Xeago has joined #ruby
p0sixpscl has joined #ruby
p0sixpscl has quit [Max SendQ exceeded]
hiyosi_ has quit [Ping timeout: 245 seconds]
p0sixpscl has joined #ruby
max06 has quit [Ping timeout: 250 seconds]
Vivekananda has joined #ruby
kate_r has joined #ruby
<wasamasa> finitoo: you
andrewlio has joined #ruby
mr-foobar has quit [Ping timeout: 260 seconds]
francisfish has joined #ruby
Xeago has quit [Remote host closed the connection]
LudicrousMango has joined #ruby
kaspergrubbe_ has quit [Remote host closed the connection]
kaspergrubbe_ has joined #ruby
charliesome has joined #ruby
frenda has joined #ruby
<frenda> Hi
Alina-malina has joined #ruby
<frenda> I have a question about software development methods; (a ruby web application, can I ask here?)
krisquigley has joined #ruby
<Bish> how would you guys communicate with a thread? when having like a worker thread?
corehook_ has quit [Remote host closed the connection]
corehook has joined #ruby
<frenda> (Note: Let call the software 'OpenTilt'; We assume it does not have social features) --> we're going to add these features to it --> that means a service which allows people to have their profile with provided interactivity between users, ability to follow up others, Likes, etc.
<frenda> Method 1: Forking it and heavy changes in the core to add social features (img: http://i.stack.imgur.com/QaF1N.png)
<frenda> Method 2: Keeping the core untouched and working on an external Software for integration between different installation per user! (img: http://i.stack.imgur.com/lBTCI.png)
<frenda> Method 3: A plugin that makes crowdtiltopen to comunicate with another crowdtiltopen. (img: http://i.stack.imgur.com/pgSyc.png)
<frenda> The Question: Which method is recommended? (Developing with lower cost and Maintaining easier, Better security, etc)
Xeago has joined #ruby
hiyosi_ has joined #ruby
<frenda> Methods 2 and 3 need separated resource for each user: Ram, CPU and DB
joonty has joined #ruby
<frenda> But these 2 methods use the open source app which is developing by others; we should just develop our plugin/integrator!
kaspergrubbe_ has quit [Ping timeout: 260 seconds]
Aaaal has joined #ruby
osvico has joined #ruby
work_op has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
corehook has quit [Ping timeout: 260 seconds]
elstif has joined #ruby
guiguidoc has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
corehook has joined #ruby
kristofferR has joined #ruby
hiyosi_ has quit [Ping timeout: 272 seconds]
hellangel7 has joined #ruby
kaspergrubbe_ has joined #ruby
Xeago has quit [Remote host closed the connection]
angusiguess has joined #ruby
blackmesa has joined #ruby
fgo has joined #ruby
tkuchiki has joined #ruby
hellangel7 has quit [Read error: Connection reset by peer]
Takle has quit [Ping timeout: 245 seconds]
yeticry has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
Takle has joined #ruby
sevenseacat has quit [Remote host closed the connection]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
nettoweb has joined #ruby
klmlfl has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
mikepack has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 272 seconds]
nettoweb has quit [Client Quit]
jxs_ has joined #ruby
wpp has joined #ruby
jxs_ has quit [Remote host closed the connection]
St_Marx has quit [Remote host closed the connection]
hellangel7 has joined #ruby
St_Marx has joined #ruby
kaspergrubbe_ has quit [Remote host closed the connection]
kaspergrubbe_ has joined #ruby
hellangel7 has quit [Max SendQ exceeded]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
guiguidoc has joined #ruby
klmlfl has quit [Ping timeout: 258 seconds]
<bhaak> if I wanted to pass an IO object (representing a log file) to a method, but also wanting to only have that file being created if something's has been written to the IO object before it has been closed, is there a simple existing class to use for that behavior?
lkba has quit [Ping timeout: 272 seconds]
sk87 has joined #ruby
kaspergrubbe_ has quit [Ping timeout: 250 seconds]
wasamasa has quit [Quit: ZNC - http://znc.in]
decoponio has quit [Read error: Connection reset by peer]
hiall has quit [Ping timeout: 244 seconds]
skammer3 has joined #ruby
charliesome has quit [Quit: zzz]
andrewlio has quit [Ping timeout: 258 seconds]
wasamasa has joined #ruby
decoponio has joined #ruby
last_staff has joined #ruby
timonv_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
a_ has joined #ruby
timonv_ has joined #ruby
mengu has quit [Remote host closed the connection]
startupality has joined #ruby
Hobogrammer_ has quit [Ping timeout: 272 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Ludicrou_ has joined #ruby
jxs_ has joined #ruby
hellangel7 has joined #ruby
i8igmac has quit [Ping timeout: 260 seconds]
jxs_ has quit [Remote host closed the connection]
i8igmac has joined #ruby
LudicrousMango has quit [Ping timeout: 260 seconds]
corehook has quit [Remote host closed the connection]
andrewlio has joined #ruby
corehook has joined #ruby
workmad3 has joined #ruby
a_ has quit [Ping timeout: 245 seconds]
hiall has joined #ruby
thomasxie has joined #ruby
DaniG2k has joined #ruby
dANO_ has joined #ruby
<DaniG2k> ]hey guys, quick question. If I have some code that I keep using in my methods, like this: https://gist.github.com/DaniG2k/33e7a6d84f455dbec23
<DaniG2k> oops
dANO has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
<DaniG2k> whats the best way of refactoring that into another method?
ta has quit [Ping timeout: 272 seconds]
<DaniG2k> shold I just pu the if else in another method with a yield in the middle?
Mia has joined #ruby
<workmad3> DaniG2k: so... the condition is the same, the else is the same, it's just the true-case that changes?
a_ has joined #ruby
corehook has quit [Ping timeout: 260 seconds]
<workmad3> DaniG2k: and, also critically, they're *meant* to be the same, semantically... it's not just a quirk of implementation that they ended up the same at the moment?
<DaniG2k> well
<DaniG2k> workmad3: 3 of my methods are using this, for example: response = https_request; if response.kind_of? String; xml_doc = Nokogiri::XML(response)
<DaniG2k> with an identical else that just puts a different message in the event !response.kind_of? String
<DaniG2k> but the meat of the methods are actually quite different otherwise
<DaniG2k> I don't want to have to keep writing this whole response.kind_of? String
<DaniG2k> I mean: response = https_request; if response.kind_of? String; xml_doc = Nokogiri::XML(response)
<workmad3> DaniG2k: why not pull the XML construction out into an 'xml_https_request' method?
<workmad3> DaniG2k: and raise an exception you can handle in the case of it not being a String
tokik has quit [Ping timeout: 272 seconds]
corehook has joined #ruby
nettoweb has joined #ruby
<DaniG2k> workmad3: thats what I'm saying. If I put this boilerplate code in another method, whats the right way to make the rest of the method different?
<DaniG2k> yield?
<workmad3> DaniG2k: no... I'm not saying that
<DaniG2k> wait let me wite a short example
dANO has joined #ruby
einarj has joined #ruby
charliesome has joined #ruby
<mikecmpbll> heh
roolo_ has joined #ruby
Sht0 has quit [Ping timeout: 250 seconds]
Sht0 has joined #ruby
frenda has left #ruby [#ruby]
<workmad3> DaniG2k: I'm saying that you do something like this instead and don't need to yield: https://gist.github.com/workmad3/a1dc4a4e35b43908a3bf
<workmad3> DaniG2k: and then in 'method1' you do 'xml_doc = xml_https_request'
<workmad3> same in method 2
<DaniG2k> ooh i see
foooobear_ has joined #ruby
<DaniG2k> hmmm
<DaniG2k> but im wondering
<workmad3> DaniG2k: I mean, sure... you could also do 'yield' and then call with 'xml_https_request do |xml_doc|; ...; end'
<DaniG2k> is there another way to do this with yield? I think I basically just dont understand how to use yield too well
roolo has quit [Ping timeout: 246 seconds]
<DaniG2k> and I'd like to learn
foooobear has quit [Read error: Connection reset by peer]
<mikecmpbll> yield = run block
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
<AlexRussia> DaniG2k: yield means 'here be block of user code'
dANO_ has quit [Ping timeout: 272 seconds]
techsethi has quit [Quit: techsethi]
<workmad3> DaniG2k: reload
kaspergrubbe_ has joined #ruby
<workmad3> DaniG2k: that's a method that can be called either way ;)
<workmad3> DaniG2k: but essentially, as AlexRussia and mikecmpbll say, yield is pretty simple... all it does is go 'execute the block parameter passed to this method now, please'
<DaniG2k> ok let me have a look
<DaniG2k> workmad3: thanks :)
<DaniG2k> yes thats kind of what im looking for
<DaniG2k> I want to learn this
dANO_ has joined #ruby
<DaniG2k> so
<DaniG2k> yield xml_doc
<DaniG2k> its returning the Nokogiri element
<workmad3> DaniG2k: think of it like a method call
<DaniG2k> oooh i see
<DaniG2k> right
<DaniG2k> thats why i was conused
<DaniG2k> confused
<workmad3> :)
<DaniG2k> xml_doc = xml_https_request
<DaniG2k> and
<DaniG2k> xml_https_request do |xml_doc|
<DaniG2k> i was wondering, what if I dont want to pass anything to it
<DaniG2k> you can tell it what to yield
<workmad3> yeah... the first one doesn't pass a block, so the method doesn't yield
<workmad3> that's what 'block_given?' checks for
<DaniG2k> ok
<workmad3> if you yield and no block was provided, you get an exception
Pumukel has quit [Ping timeout: 272 seconds]
marr has joined #ruby
<DaniG2k> thats good
<DaniG2k> thanks for the explanation
<DaniG2k> very helpful
elstif has quit [Quit: Leaving.]
dANO has quit [Ping timeout: 245 seconds]
mindlessdemon has quit [Quit: Textual IRC Client: www.textualapp.com]
<workmad3> DaniG2k: digging into the code for gems that make use of blocks helps too
<DaniG2k> yes
mengu has joined #ruby
mengu has joined #ruby
sprihodko has joined #ruby
<mikecmpbll> or reading any of the billion websites that explains about blocks/procs/lambdas :p
Takle has quit [Remote host closed the connection]
<DaniG2k> i tried reading them in the past
hiyosi_ has joined #ruby
<DaniG2k> got super confused
<DaniG2k> I think I get lambdas
<DaniG2k> I'm still learning about blocks
<DaniG2k> and procs are a bit confusing
<mikecmpbll> you probably don't. they're all intertwined.
dangerousdave has joined #ruby
<workmad3> procs and lambdas are the same thing, just some minor differences in behaviour
<DaniG2k> ok
<mikecmpbll> ya, ones a closure or summit.
mmochan_ has joined #ruby
<workmad3> hell, if you look at a lambda, you see that 'lambda{}' creates a Proc object with 'lambdaness'
<workmad3> mikecmpbll: nah, they're both closures
ndrei has quit [Quit: Lost terminal]
<mikecmpbll> ok then, one will execute in the context it's defined?
ndrei has joined #ruby
<workmad3> the difference is that lambdas act slightly more like a 'normal' method... they throw an error if you don't provide all the arguments, and 'return' in a lambda just returns from the lambda, not the context you defined it in
<workmad3> mikecmpbll: again, they both execute in the context they're defined in ;)
m4rCsi_ has quit [Ping timeout: 260 seconds]
<workmad3> (unless overridden with an instance_eval(&blk) hack)
<mikecmpbll> how does the return behaviour differ then
<mikecmpbll> (not in which way, but how)
<DaniG2k> did you guys hear about the 20 year vulneravility in bash? lolz
Alina-malina has quit [Ping timeout: 246 seconds]
<mozzarella> I've known about it for 20 years
hiyosi_ has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
<workmad3> mikecmpbll: https://gist.github.com/workmad3/75c78dc66c052501e71c <-- that demonstrates the behaviour ;)
<workmad3> mikecmpbll: before running the code, have a think about what you expect to be the behaviour in each case
yfeldblum has quit [Quit: Leaving...]
flughafen has quit [Quit: WeeChat 0.4.1]
mengu has quit [Ping timeout: 240 seconds]
sk87 has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mikecmpbll> i understand the behaviour reasonably well, call_with_lambda will print all the lines (bar "in proc" obviously) and call_with_proc will return from execute_callable
etqqkoiflwhb has quit [Quit: Lingo - http://www.lingoirc.com]
fgo has joined #ruby
<mikecmpbll> just trying to understand what it is that makes them differ in that way.
mindlessdemon has joined #ruby
<workmad3> mikecmpbll: it's that one is a lambda and one is a proc ;)
angusiguess has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
<mikecmpbll> ya, but the behaviour of `return` has to have something to do with the context in which the block is being executed.
<mikecmpbll> that would have been my thought anyway.
dangerousdave has joined #ruby
<workmad3> mikecmpbll: however, the return in the proc in 'call_with_proc' doesn't return from 'execute_callable'
corehook has quit []
<workmad3> mikecmpbll: it returns from 'call_with_proc'
t_p has joined #ruby
<workmad3> mikecmpbll: it's essentially just aborted a bunch of the stack there ;)
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
a_ has quit [Ping timeout: 245 seconds]
elstif has joined #ruby
<workmad3> mikecmpbll: hence why you can have weirdnesses happening with a 'return' in a block or a proc... it typically happens when the proc has been saved for later use... and then when the proc executes, it tries to return from a context that has already finished executing
mindlessdemon has joined #ruby
mindlessdemon has quit [Max SendQ exceeded]
kaspergrubbe_ has quit [Read error: Connection reset by peer]
mindlessdemon has joined #ruby
emmesswhy has quit [Quit: Leaving]
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<mikecmpbll> maybe i didn't explain what i meant about context properly
<DaniG2k> workmad3: in your example
kaspergrubbe_ has joined #ruby
<DaniG2k> you have
<mikecmpbll> lambda's have their own context
mindlessdemon has quit [Max SendQ exceeded]
<mikecmpbll> proc's do not?
skaflem has joined #ruby
<mikecmpbll> a = proc { b = "foobar" }; a.call; b => "foobar"
<workmad3> mikecmpbll: no, they both have their own context nowadays, I believe
<mikecmpbll> so the proc is executed in the context it is defined
<DaniG2k> if block_give?; yield xml_block; end
<DaniG2k> is there a way to pass a variable to this method as well?
mindlessdemon has joined #ruby
<mikecmpbll> lamdas do not, if i define a variable in a lambda, it's not available outside the lambda
mindlessdemon has quit [Max SendQ exceeded]
rkalfane has joined #ruby
<workmad3> mikecmpbll: b isn't available outside that proc ;)
<mikecmpbll> yes it is
<workmad3> mikecmpbll: no it's not... not since about 1.9 :P
<workmad3> mikecmpbll: maybe even 1.8
patrick99e99 has joined #ruby
fgo has quit [Ping timeout: 258 seconds]
<mikecmpbll> argh, maybe i already had b defined outside
klmlfl has joined #ruby
<workmad3> mikecmpbll: ;)
angusiguess has quit [Ping timeout: 260 seconds]
ghr has quit []
qba73 has quit [Remote host closed the connection]
<mikecmpbll> my irb fu is so bad lately.
<workmad3> mikecmpbll: they both (now) define their own local scope (which is what I think you were meaning)
<workmad3> mikecmpbll: they both capture the outside context (this is the behaivour of a closure)
<mikecmpbll> yep, i'm completely wrong.
<workmad3> mikecmpbll: it used to be you weren't though ;)
<workmad3> mikecmpbll: that behaviour changed in either 1.8->1.9 or 1.6->1.8... can't remember which
qba73 has joined #ruby
<mikecmpbll> it still shows the difference in behaviour, lambda won't update the variable but define it's own
<workmad3> mikecmpbll: wrong again :P
a has joined #ruby
ghr has joined #ruby
rkalfane has quit [Client Quit]
<workmad3> mikecmpbll: seriously, it's only 'return' that behaves differently
a is now known as Guest58297
<mikecmpbll> a = lambda { b = "foobars" }; puts b => "foobar"
<workmad3> mikecmpbll: you forgot to call it ;)
<mikecmpbll> heuheueheuehefeaufbeagrghrhagargjarfeacea
yfeldblum has joined #ruby
rkalfane has joined #ruby
patrick99e99 has quit [Ping timeout: 260 seconds]
klmlfl has quit [Ping timeout: 246 seconds]
<mikecmpbll> DaniG2k: you know all those articles that i mentioned
<mikecmpbll> DaniG2k: if you find one send it my way
Xeago has joined #ruby
timgauthier has joined #ruby
agjacome has joined #ruby
skammer4 has joined #ruby
dANO has joined #ruby
<workmad3> mikecmpbll: :D
nfk has joined #ruby
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
dANO has quit [Read error: Connection reset by peer]
dANO has joined #ruby
dANO_ has quit [Read error: Connection reset by peer]
fabrice31 has quit [Remote host closed the connection]
<workmad3> mikecmpbll: btw, the reason for the difference is that a lambda is intended as an anonymous method, while a proc should behave as expected in something like this 'def my_find(i, ary); ary.each_with_idx{|item, idx| return idx if item == i}; return -1; end'
Guest58297 has quit [Quit: leaving]
skammer3 has quit [Ping timeout: 260 seconds]
Takle has quit [Remote host closed the connection]
<mikecmpbll> ic
postmodern has quit [Quit: Leaving]
<workmad3> mikecmpbll: hence a lambda acts more like a method, while a proc acts more like it's just part of the method you created it in
<mikecmpbll> yeah that makes sense.
Takle has joined #ruby
<workmad3> (which is probably where your confusion about the various scopes, etc. came from, I'm guessing? ;) )
<mikecmpbll> god knows where it came from.
<mikecmpbll> i think that's best left a mystery
fabrice31 has joined #ruby
<workmad3> mostly, it's best, IMO, to just avoid returns in anything that looks proc-like or block-like in ruby :)
bricker`LA has joined #ruby
blackmesa has quit [Quit: WeeChat 1.0]
Davedo has quit [Read error: Connection reset by peer]
<workmad3> the difference in argument-list behaviour can be mitigated nowadays too, as you can provide splat-args and defaults for block-params :)
<DaniG2k> workmad3: the code works brilliantly
<DaniG2k> thanks
<DaniG2k> :)
<DaniG2k> now i get it
angusiguess has joined #ruby
Davedo has joined #ruby
Advocation has joined #ruby
echooo has quit [Quit: echooo]
echooo has joined #ruby
<workmad3> DaniG2k: that style of detecting if a block was passed or not can be more useful with scoping some resource you want to clean up btw... such as with File.open... with a block, it passes the file object to the block and closes it afterwards, while without a block, it returns the file object and closing it is your responsibility
qba73 has quit []
<workmad3> DaniG2k: with 'block_given?' you can write other methods that act like that... such as transactions or locks :)
<workmad3> some of them, you may want to never provide a mechanism that leaves closing up to the caller (both of the above are candidates for that :) )
fabrice31 has quit [Ping timeout: 245 seconds]
banister has quit [Read error: Connection reset by peer]
banister_ has joined #ruby
<DaniG2k> workmad3: what was that &block thing you wrote before
bricker`LA has quit [Ping timeout: 246 seconds]
<workmad3> DaniG2k: that makes the block parameter explicit
<workmad3> DaniG2k: so you can pass it around, store it, etc.
<workmad3> DaniG2k: or rather, there are two meanings
<workmad3> DaniG2k: in a parameter list for a method definition, it makes the block parameter explicit
<DaniG2k> so mymethod(&block)
<workmad3> DaniG2k: when calling a method, it passes the argument as the block parameter
<DaniG2k> is the same asde mymethod;
<DaniG2k> as def mymethod; yield; end
<mikecmpbll> if you call it in the first one
<workmad3> ^^
<workmad3> def mymethod(&blk); blk.call; end == def mymethod; yield; end
<mikecmpbll> otherwise you're just accepting a block and not doing owt with it.
mengu has joined #ruby
<workmad3> and 'a = proc{puts "hi"}; mymethod(&a)' == 'mymethod {puts "hi"}'
bruno- has joined #ruby
<DaniG2k> oh ok
<DaniG2k> i see
<DaniG2k> so a proc is a function that can be stored in a variable
qba73 has joined #ruby
dANO_ has joined #ruby
<workmad3> proc{} creates a Proc object, which you can pass around like any other object
karupa is now known as zz_karupa
<mikecmpbll> can do Proc.new too.
<workmad3> yeah... and lambda{}, which also creates a Proc object
<workmad3> and ->
Takle has quit [Remote host closed the connection]
<workmad3> and if you look at 'def mymethod(&blk); blk.class; end', you'll also see that blk is a Proc
dANO has quit [Ping timeout: 245 seconds]
<workmad3> if you dig into the implementation details for MRI, you'll see that the block parameter is only turned into a Proc when it's explicit
bruno- has quit [Ping timeout: 272 seconds]
<DaniG2k> ok
<DaniG2k> I'll have to read more intot his
<DaniG2k> thanks :)
t_p has quit [Quit: Computer has gone to sleep.]
<workmad3> there's also some weirdness in there around what happens with 'some_method(&a_proc)' :)
sprihodko has quit [Quit: Lingo - http://www.lingoirc.com]
mkaesz has quit [Ping timeout: 272 seconds]
m4rCsi has joined #ruby
roolo_ has quit [Remote host closed the connection]
<workmad3> at the level of visible ruby though, if you compare the object_id of 'a_proc' outside that method, and an explicit block parameter's object_id inside that method, they'll be the same... so I personally think of procs and blocks as semantically the same thing
shanlar- has joined #ruby
roolo has joined #ruby
<workmad3> others don't, and think of them as separate entities, with '&' being a 'to_proc' operator
timgauthier has quit [Remote host closed the connection]
timgauthier has joined #ruby
timonv_ has quit [Remote host closed the connection]
shanlar has quit [Ping timeout: 260 seconds]
timonv_ has joined #ruby
roolo has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
himsin has joined #ruby
Advocation has quit [Quit: Advocation]
bruno- is now known as Guest95323
jgt has joined #ruby
<jgt> howdy
fsapo has joined #ruby
timonv_ has quit [Ping timeout: 272 seconds]
relix has quit [Ping timeout: 245 seconds]
relix has joined #ruby
dANO_ has quit [Read error: Connection reset by peer]
dANO has joined #ruby
techsethi has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jgt has quit [Read error: Connection reset by peer]
echooo has quit [Quit: echooo]
echooo has joined #ruby
echooo has quit [Client Quit]
tqkrfa has joined #ruby
fsapo has quit [Ping timeout: 272 seconds]
skolman has joined #ruby
ringarin has joined #ruby
vinleod has joined #ruby
roolo has joined #ruby
fsapo has joined #ruby
m4rCsi has quit [Ping timeout: 240 seconds]
hiyosi_ has joined #ruby
jottr has joined #ruby
jottr has quit [Client Quit]
Pumukel has joined #ruby
charliesome has quit [Quit: zzz]
mkaesz has joined #ruby
Advocation has joined #ruby
dANO has quit [Read error: Connection reset by peer]
dANO has joined #ruby
charliesome has joined #ruby
hiyosi_ has quit [Ping timeout: 272 seconds]
timonv_ has joined #ruby
lyanchih has quit [Quit: lyanchih]
fgo has joined #ruby
choke has joined #ruby
davasaurous has joined #ruby
osvico has quit [Ping timeout: 272 seconds]
<apeiros> workmad3: there is a GC/Memory implication in the difference between blocks and procs
<apeiros> a block is not an object, a proc is
timgauthier is now known as timgauthier_isaw
finitoo was banned on #ruby by apeiros [*!*@90.174.5.120]
finitoo was kicked from #ruby by apeiros [no spam.]
AlexRussia has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ruby
<apeiros> this is an implementation detail, though - any ruby implementation might choose to represent all blocks as objects.
krz has quit [Quit: WeeChat 1.0]
arup_r has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 260 seconds]
<wasamasa> apeiros: thanks
klmlfl has joined #ruby
m4rCsi has joined #ruby
phutchins has joined #ruby
Ludicrou_ has quit [Read error: Connection reset by peer]
yfeldblum has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
klmlfl has quit [Ping timeout: 272 seconds]
lolmaus has quit [Quit: Konversation terminated!]
timonv_ has quit [Remote host closed the connection]
LudicrousMango has joined #ruby
jottr has joined #ruby
fsapo has quit [Ping timeout: 246 seconds]
yeticry has joined #ruby
dANO_ has joined #ruby
dANO has quit [Read error: Connection reset by peer]
fgo has joined #ruby
mr-foobar has joined #ruby
ta has joined #ruby
nonmadden has joined #ruby
ta has quit [Client Quit]
ta has joined #ruby
osvico has joined #ruby
timgauthier_isaw is now known as timgauthier
tqkrfa has quit [Ping timeout: 260 seconds]
jhass|off is now known as jhass
andikr has quit [Remote host closed the connection]
ndrei has quit [Quit: Lost terminal]
yeticry has quit [Ping timeout: 240 seconds]
zybi1 has joined #ruby
ndrei has joined #ruby
m4rCsi has quit [Ping timeout: 272 seconds]
mkaesz has quit [Remote host closed the connection]
quazimodo has joined #ruby
vpnncn has joined #ruby
<quazimodo> hullo :D
ItSAN____ has quit [Quit: Leaving...]
yacks has quit [Ping timeout: 260 seconds]
Nahra has quit [Ping timeout: 260 seconds]
wchun has quit [Quit: Leaving]
angusiguess has quit [Ping timeout: 260 seconds]
<apeiros> wasamasa: hm? what for? finitoo?
<wasamasa> apeiros: yes, he bothered me in #lisp lately
<wasamasa> apeiros: it's still the same guy with the bot it seems
<shevy> haha
rocknrollmarc has joined #ruby
<shevy> aren't you the guy who was missing that troll dude
<shevy> who asked you to unban him
<wasamasa> yes, I miss web2fly
<shevy> finitoo just wants some of your love wasamasa
<wasamasa> shevy: that's someone entirely else
cirn0 has joined #ruby
<wasamasa> shevy: someone who does /query spam which promises you some free webcams but only links you to a goldfish webcam
dANO has joined #ruby
dANO_ has quit [Read error: Connection reset by peer]
<Pro|> can't convert Fixnum into Array org/jruby/RubyArray.java:3067:in `+'
<Pro|> why does this happen when i'm adding number to array
<wasamasa> you can't do that
kdeepak has joined #ruby
TorpedoSkyline has joined #ruby
<wasamasa> >> 1 + [2]
diegoviola has quit [Quit: WeeChat 1.0]
<eval-in_> wasamasa => Array can't be coerced into Fixnum (TypeError) ... (https://eval.in/198476)
kdeepak has left #ruby [#ruby]
sk87 has joined #ruby
AFKGeek has quit [Quit: Leaving]
<gregf_> >> Proc.new { |x| start, isprime = 2, true; while ( start < x ); begin; isprime=false; break; end if x %start == 0; start+=1;end; isprime }.call(5)
<eval-in_> gregf_ => true (https://eval.in/198477)
<wasamasa> >> [1] << 2
<eval-in_> wasamasa => [1, 2] (https://eval.in/198478)
<wasamasa> [1] + [2]
<gregf_> oops! *scrolls to the bottom*
<wasamasa> >> [1] + [2]
<eval-in_> wasamasa => [1, 2] (https://eval.in/198479)
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gregf_> >> lambda { |x| start, isprime = 2, true; while ( start < x ); begin; isprime=false; break; end if x %start == 0; start+=1;end; isprime }.call(5)
<eval-in_> gregf_ => true (https://eval.in/198481)
timonv_ has joined #ruby
moritzschaefer has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
dangerousdave has joined #ruby
ringarin has quit [Quit: Leaving]
TorpedoSkyline has quit [Client Quit]
cirn0 has quit [Ping timeout: 272 seconds]
TorpedoSkyline has joined #ruby
TorpedoSkyline has quit [Client Quit]
LudicrousMango has quit []
tvw has joined #ruby
Takle has joined #ruby
AlexRussia has quit [Remote host closed the connection]
AlexRussia has joined #ruby
lukeholder has quit [Ping timeout: 272 seconds]
LiohAu_ is now known as LiohAu
lkba has joined #ruby
angusiguess has joined #ruby
Takle has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
thomasxie has quit [Quit: Leaving.]
stef_204 has joined #ruby
Advocation has quit [Quit: Advocation]
nonmadden has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
m4rCsi has joined #ruby
boombada_ has joined #ruby
BBBThunda has quit [Ping timeout: 260 seconds]
codeurge has joined #ruby
duncannz has quit [Ping timeout: 272 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
LekeFly has joined #ruby
blackgoat has quit [Ping timeout: 250 seconds]
boombada_ has quit [Ping timeout: 258 seconds]
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
hiyosi_ has joined #ruby
iamjarvo has joined #ruby
hamakn has quit [Remote host closed the connection]
tanath has quit [Remote host closed the connection]
arup_r has joined #ruby
tanath has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiyosi_ has quit [Ping timeout: 245 seconds]
mengu has quit []
Ghis_ has quit [Ping timeout: 260 seconds]
mmochan_ has quit [Quit: Connection closed for inactivity]
yacks has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
yalue has joined #ruby
tkuchiki has quit [Remote host closed the connection]
BBBThunda has joined #ruby
dANO has quit [Ping timeout: 245 seconds]
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timgauthier is now known as timgauthier_isaw
codeurge has quit [Quit: Sleep.]
vt102 has joined #ruby
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klmlfl has joined #ruby
deject3d has joined #ruby
abuzze has quit [Ping timeout: 272 seconds]
xcv has joined #ruby
abuzze has joined #ruby
kate_r has joined #ruby
nonmadden has joined #ruby
<izzol> hm
<izzol> There is any module for generating trends?
<izzol> Let's say I have a lot of data and they are growing.
<izzol> And I will want to know what it will looks like in one month, one year etc.
claymore has joined #ruby
phoo1234567 has joined #ruby
klmlfl has quit [Ping timeout: 272 seconds]
fsapo has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
techsethi has quit [Ping timeout: 244 seconds]
danman has joined #ruby
pu22l3r_ has joined #ruby
speakingcode has quit [Quit: Lost terminal]
phoo1234567 has joined #ruby
timgauthier has joined #ruby
<shevy> izzol libreoffice .xls trendline!
<shevy> there is a checkbutton - calculate/show formula
codeurge has joined #ruby
<shevy> you take it, then you know what will happen anywhere
<shevy> there probably are online variants for that too, possibly even in google trends itself
emiemia has joined #ruby
Advocation has joined #ruby
emiemia has quit []
marlonan_ has joined #ruby
terlar has joined #ruby
pu22l3r has quit [Ping timeout: 246 seconds]
marlonan_ has quit [Client Quit]
skammer has joined #ruby
emiemia has joined #ruby
elstif has quit [Quit: Leaving.]
diegoviola has joined #ruby
Bish has quit [Excess Flood]
skammer4 has quit [Ping timeout: 272 seconds]
Bish has joined #ruby
dANO has joined #ruby
<Bish> how would you guys communicate with a thread?
quazimodo has quit [Quit: Page closed]
kate_r_ has joined #ruby
bal has quit [Quit: bal]
<ccooke> Bish: a Queue, usuallly
<Bish> but then i have to parse the stuff inside the queue
pu22l3r_ has quit [Remote host closed the connection]
<ccooke> That dosn't make sense
<Bish> which would me force to implement something like rpc, isn't there a beatyful way
<ccooke> you can put any object in a queue
bal has joined #ruby
<deject3d> a queue of events
kate_r has quit [Ping timeout: 272 seconds]
<deject3d> actually communicating with a thread is too broad
<Bish> in my case, i want to have http requests inside the worker thread, so they don't block the mainthread
gaussblurinc1 has joined #ruby
<gaussblurinc1> hi!
<ccooke> Bish: right. A number of worker threads all reading from one queue is a good model there, then
<deject3d> you want the workers to tell the main thread stuff?
<gaussblurinc1> how to call function from symbol in 'main' (::) scope?
tkuchiki has joined #ruby
<Bish> but how would the objects in the queue look like?
<ccooke> Bish: whatever you want them to look like
dangerousdave has joined #ruby
<deject3d> i think ccooke is prematurely answering the question without enough detail
<deject3d> do you have worker threads that are idle until you tell them to do something? is that what you are trying to communicate to the thread?
<deject3d> or do you have workers doing things in the background and must report back to the main thread with the result of a request?
<ccooke> Bish: Ah, I misread what you said
<deject3d> regardless of whatever bish is doing, a lot of async http clients utilize the Reactor pattern https://en.wikipedia.org/wiki/Reactor_pattern
<deject3d> maybe reading about it could help
bigkevmcd has quit [Quit: This computer has gone to sleep]
angusiguess has joined #ruby
cocotton has joined #ruby
abdulsattar has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
britneywright has joined #ruby
mastr_bennett[x] has joined #ruby
ndrei has quit [Remote host closed the connection]
ndrei has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
mastr_bennett[x] has quit [Client Quit]
dANO has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
nonmadden has quit [Remote host closed the connection]
dANO has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
nonmadden has joined #ruby
spyderman4g63 has joined #ruby
deject3d has quit [Remote host closed the connection]
govg has quit [Quit: leaving]
yeticry has joined #ruby
larissa has joined #ruby
benzrf|offline is now known as benzrf
AlexRussia has quit [Remote host closed the connection]
sk87 has joined #ruby
kate_r_ has quit [Read error: Connection reset by peer]
abuzze has quit [Remote host closed the connection]
AlexRussia has joined #ruby
kate_r has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
abuzze has joined #ruby
mrbubbles has quit [Quit: mrbubbles]
nonmadden has quit [Ping timeout: 260 seconds]
yeticry has quit [Ping timeout: 245 seconds]
hmsimha_ has quit [Ping timeout: 272 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chihhsin has quit [Quit: leaving]
chihhsin has joined #ruby
Xeago has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
kate_r has quit [Ping timeout: 245 seconds]
mattstratton has joined #ruby
Aaaal has quit [Quit: Aaaal]
tkuchiki has quit [Remote host closed the connection]
hellangel7 has quit [Remote host closed the connection]
yeticry has joined #ruby
Sawbones has quit [Remote host closed the connection]
<gaussblurinc1> how to create logger with 'formatter = Logger::Formatter. object'? My loggers are created only with instance value 'formatter => Logger::SimpleFormatter object'
codeurge has quit [Quit: Sleep.]
Aaaal has joined #ruby
ndrei has quit [Ping timeout: 258 seconds]
yeticry has quit [Remote host closed the connection]
davasaurous has quit [Remote host closed the connection]
ndrei has joined #ruby
<jhass> gaussblurinc1: simply call Logger#formatter=
hiyosi_ has joined #ruby
<gaussblurinc1> jhass: I did it: 'logger_instance.formatter = nil'
waltz has quit [Quit: quit]
<jhass> why?
<jhass> there's no Logger::SimpleFormatter in stdlib
<jhass> backtrace where it comes from
<jhass> that probably also sets it
<j416> what is the magic that allows e.g. Sequel gem to accept params on the class name like: class Foo < Sequel::Model(:here_be_param) ?
<gaussblurinc1> jhass: no-o-o-i
<gaussblurinc1> jhass: nooooo
wpp has quit [Quit: ZZZzzz…]
<gaussblurinc1> jhass: I use activesupport for object inspection :(
eat_multi has joined #ruby
<jhass> j416: they define a method with that name: class Foo; end; def Foo(*args); end
mastr_bennett[x] has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<jhass> guanophobic: so?
<jhass> gaussblurinc1: ^ sorry guanophobic
<j416> jhass: aah, thanks.
paulfm has joined #ruby
hiyosi_ has quit [Ping timeout: 246 seconds]
Advocation has quit [Quit: Advocation]
DaniG2k has quit [Ping timeout: 250 seconds]
<jhass> j416: same pattern can be found in core too, for example with Integer and Array
yeticry has joined #ruby
<dANO> Hi it's possible to simplify this : if number == 1 || number == 2 ||number == 3 ...etc ?
<dANO> sorry
arturhoo has joined #ruby
<jhass> dANO: if [1, 2, 3].include? number is a common pattern
<gaussblurinc1> jhass: and I am lazy to include only needed modules from activesupport, so, activesupport hack me, oh, I think
paulfm has quit [Remote host closed the connection]
wpp has joined #ruby
nonmadden has joined #ruby
<dANO> thank's
end_guy has quit [Remote host closed the connection]
<jhass> dANO: activesupport adds Object#in?: number.in? [1, 2, 3]
workmad3 has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sk87 has joined #ruby
dangerousdave has joined #ruby
freerobby has joined #ruby
<gaussblurinc1> dANO: you can use range class for continuous number ranges
paulfm has joined #ruby
SOLDIERz has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
grzywacz has quit [Quit: :wq]
danman has quit [Quit: danman]
livingstn has joined #ruby
danman has joined #ruby
oponder has joined #ruby
<jhass> gaussblurinc1: it's simply the default for AS::Logger, see source at http://api.rubyonrails.org/classes/ActiveSupport/Logger.html#method-c-new
Fusl has quit [Ping timeout: 245 seconds]
<jhass> gaussblurinc1: always include the full namespace in your questions, Logger:SimpleFormatter made it sound like you're just using stdlib
yeticry has quit [Ping timeout: 245 seconds]
arup_r has quit [Remote host closed the connection]
SOLDIERz has joined #ruby
ruber has joined #ruby
<jhass> gaussblurinc1: if you think so, activesupport is nothing you should use ;)
yeticry has joined #ruby
end_guy has joined #ruby
<gaussblurinc1> jhass: I like activesupport blank or instance_values methods
weems|mac has joined #ruby
weems|mac has joined #ruby
<jhass> gaussblurinc1: but AS doesn't seem to monkeypatch Logger: https://github.com/rails/rails/tree/master/activesupport/lib/active_support/core_ext
<ruber> Compiling Ruby 2.1.3 hangs on: linking miniruby ; ^Cmake: *** [.rbconfig.time] Illegal instruction: 4
klmlfl has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<ruber> Compiling on OSX 10.8
<ruber> Using ./configure --prefix=/Usersg/me/ruby
elstif has joined #ruby
<ruber> Sorry ./configure --prefix=/Users/<me>/ruby
himsin has quit [Quit: himsin]
Fusl has joined #ruby
agent_white has quit [Quit: gnight]
Morkel_ has joined #ruby
Morkel has quit [Ping timeout: 272 seconds]
Morkel_ is now known as Morkel
lxsameer has quit [Quit: Leaving]
Advocation has joined #ruby
klmlfl has quit [Ping timeout: 272 seconds]
ndrei has quit [Ping timeout: 260 seconds]
weems|mac has quit [Quit: bai]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> that shows you that OSX sucks compared to linux
tkuchiki has joined #ruby
<txdv> compared to linux everything sucks
silkfox has joined #ruby
<shevy> however had other people could compile OSX just fine so perhaps this is specific to 2.1.3 and perhaps your hardware. do earlier ruby versions compile on that machine?
<txdv> linux is the holy operating system
<txdv> used by the one and only
<shevy> linux sucks too though
<txdv> >> "shevy " * 2000
<eval-in_> txdv => "shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy shevy sh ... (https://eval.in/198518)
<shevy> just look at the recent bash vulnerability
AtumT has joined #ruby
<txdv> thats not linux
<txdv> thats bash
<shevy> I am sure linus uses bash
<txdv> What do you use? irb?
ndrei has joined #ruby
<shevy> bash :)
dangerousdave has joined #ruby
<txdv> that CVE is present on macosx bash version as well
<shevy> my shell ain't anywhere near ready to replace bash right now :(
<txdv> do you have a github repo for that?
<shevy> unfortunately no, I still haven't been able to integrate git properly into my workflow
<shevy> I think I need to write a ruby mapping to git so I don't have to remember how to use it
benzrf is now known as benzrf|offline
<shevy> right now I am back on readinging javascript tutorials :\
<shevy> onclick="history.back(-1)"
<shevy> awesome
<txdv> what?
<shevy> hehe
<txdv> you code ruby and you dont use git
<shevy> yeah
<txdv> its like you are christian but dont believe in jesus
<shevy> I am a minimalist
<shevy> I only use bash because it is easier than zsh
<txdv> tar balls and patches are not easier than git
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<txdv> arent you the shevy from ruby-de?
<shevy> actually tarballs are super easy!
<tobiasvl> lol
<shevy> I use ruby scripts just to extract and archive
klmlfl has joined #ruby
<shevy> txdv yeah but that channel does not have anything to do with ruby
<txdv> its about trolling and golang
<shevy> lol
<tobiasvl> I don't know shevy well but he seems like a competent programmer
<tobiasvl> but
<tobiasvl> no version control :psyduck:
<txdv> >> ["ruby-de"].unpack("u")
<eval-in_> txdv => undefined method `unpack' for ["ruby-de"]:Array (NoMethodError) ... (https://eval.in/198519)
<txdv> >> "ruby-de".unpack("u")
<eval-in_> txdv => [""] (https://eval.in/198520)
<shevy> oh I am not a programmer
oo_ has joined #ruby
<txdv> >> "ruby-de".pack("u")
<eval-in_> txdv => undefined method `pack' for "ruby-de":String (NoMethodError) ... (https://eval.in/198521)
<txdv> >> ["ruby-de"].pack("u")
<eval-in_> txdv => "'<G5B>2UD90``\n" (https://eval.in/198522)
<shevy> I only use ruby because I can be creative
<tobiasvl> sounds like programming!
<txdv> 5 2 9
<txdv> 5 - 2 = 3
<shevy> a programmer is someone who should understand algorithms
<txdv> 9/3 = 3
<txdv> half life 3 confirmed
threesixes has quit [Remote host closed the connection]
<shevy> and be multi-lingual
<shevy> one new language a year
<shevy> use vim or emacs
<tobiasvl> git
<txdv> :D
<shevy> yeah that too
yeticry has quit [Ping timeout: 272 seconds]
<shevy> programmers like people who contribute
<txdv> version control systems is the holy grail of software management
<tobiasvl> so true
<txdv> its funny that a technical guy like linus made the best one though
<txdv> well i guess mercurial isn't bad either
banister has joined #ruby
DaniG2k has joined #ruby
<shevy> he only made it because the old solution was no longer usable
<tobiasvl> haha. one look at git and you see it's made by a technical person
<txdv> yeah
antlong has joined #ruby
<txdv> that source code is ugly
<shevy> it uses perl
<tobiasvl> and the UI for that matter
<txdv> die() everywhere
arturhoo has quit [Quit: arturhoo]
<txdv> thank god libgit2 is out
emocakes has joined #ruby
<shevy> what is libgit2?
coderdad has joined #ruby
qmfnp has joined #ruby
silkfox has quit [Ping timeout: 272 seconds]
banister_ has quit [Ping timeout: 272 seconds]
Alina-malina has joined #ruby
<aech> git has perl as dependency
<last_staff> git version 2 library, perhaps?
<last_staff> @shevy
freerobby has quit [Quit: Leaving.]
<shevy> I am still at git-1.9.0
timgauthier is now known as timgauthier_isaw
yfeldblum has joined #ruby
<canton7> nah, it's orthogonal to the 'git' application
<canton7> it's a C library, with bindings in various languages, to work with git repos and remotes
angusigu1ss has joined #ruby
yeticry has joined #ruby
bluenemo has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ankhers has joined #ruby
klmlfl has quit [Remote host closed the connection]
oleo has joined #ruby
silkfox has joined #ruby
<shevy> ruby bindings?
yfeldblum has quit [Ping timeout: 250 seconds]
jakolehm has joined #ruby
DaniG2k has quit [Quit: leaving]
eivindml has joined #ruby
<shevy> "ruby bindings to libgit2" \o/
Channel6 has joined #ruby
snath has quit [Ping timeout: 244 seconds]
angusigu1ss has quit [Ping timeout: 260 seconds]
yeticry has quit [Ping timeout: 272 seconds]
starlord has joined #ruby
doodlehaus has joined #ruby
<starlord> How do you get the length of an array VALUE?
vt102 has quit [Quit: Leaving]
<abdulsattar> >> [1,2,3].length
<eval-in_> abdulsattar => 3 (https://eval.in/198524)
<abdulsattar> starlord: what do you mean array VALUE?
dukz has quit [Remote host closed the connection]
<starlord> VALUE a;
<Hanmac> starlord: use RARRAY_LEN(a)
jeremy04 has joined #ruby
<starlord> Is that the standard way? I thought R* functions were off-limits because they use low-level details?
ducklobster has joined #ruby
ItSANgo has joined #ruby
cocotton has quit [Remote host closed the connection]
<Hanmac> starlord: hm no for your usecase they are perfect because they also lookout for embedded and shared arrays
<starlord> Great.
<starlord> Most of my unknowns are now solved!
yeticry has joined #ruby
<starlord> Now to figure out how to get a VALUE for an implicitly passed block.
<starlord> rb_block_given_p() works, so does rb_need_block(), but they don't give it to me.
<starlord> Ahh, rb_block_lambda()
freerobby has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MaciejCzyzewski has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
<Hanmac> hm ok i prefer block_proc, but that is nearly the same
<starlord> What's the diff?
mark_locklear has joined #ruby
eivindml is now known as eivindml2
eivindml2 is now known as eivindml
dkam has quit [Quit: dkam]
eivindml is now known as eivindml2
cocotton has joined #ruby
<starlord> Anyway, the actual hard part is how to deal with storing this block for later, off the stack.
ixti has joined #ruby
<starlord> I'm not gonna mess around with rb_gc_register_address, I'm just gonna store it in a sekrit global Ruby array.
enebo has joined #ruby
slester has joined #ruby
sailias has joined #ruby
jerius has quit []
ta has quit [Remote host closed the connection]
pdoherty has joined #ruby
<Hanmac> starlord: for my projects if you want to remove the block or what ever from the global variable i does use a hash because an array did not work (removing element from array does result in allocation ... and that is not allowed while GC'ing) so the hash does store it like { object_id => object } so i can remove the object later without hurting
<starlord> blech
benzrf|offline is now known as benzrf
yeticry has quit [Ping timeout: 260 seconds]
Rollabunna has joined #ruby
<starlord> I don't want to manage IDs.
subopt has quit [Remote host closed the connection]
hiyosi_ has joined #ruby
skolman has quit [Remote host closed the connection]
skolman_ has joined #ruby
<Hanmac> i needed to do something like that because i needed to protect the objects from the GC without saving them forever ...
blackgoat has joined #ruby
subopt has joined #ruby
<starlord> I don't see the problem with just shoving it in an array and removing it later.
Aaaal has quit [Quit: Aaaal]
<starlord> Is GC really going to be happening while I try to remove it?
<starlord> Anyway, rb_gc_register_address() would be simpler, but it requires a static address, which is not easy to obtain for N values.
baltazore has quit [Remote host closed the connection]
chihhsin_cloud has joined #ruby
<starlord> I could store them in a CFMutableArrayRef I guess, but that would be so hard as to not be worthwhile.
<starlord> Ruby's GC is so dumb.
bricker`LA has joined #ruby
<starlord> If it weren't for Ruby being way better, I'd just be writing this thing in Lua, which has a so much nicer C API.
jheg_ has joined #ruby
davasaurous has joined #ruby
<starlord> But alas, popularity counts for something.
skrite has joined #ruby
<skrite> hey all
skolman_ has quit [Ping timeout: 260 seconds]
<skrite> is it possible to start my ruby install over by just removing my ~/.rvm folder and starting over?
msmith_ has joined #ruby
<workmad3> skrite: if you're using rvm, should be ok... but there's also 'rvm implode' I believe
hamakn has joined #ruby
oo_ has quit [Remote host closed the connection]
<workmad3> skrite: which just destroys the ruby installs without destroying the entire rvm directory
<starlord> skrite: just use chruby
abuzze has quit [Remote host closed the connection]
Takle has joined #ruby
<skrite> chruby?
<starlord> i used rvm for years
<starlord> then i switched to rbenv and used that for years
lmickh has joined #ruby
<starlord> a month ago i switched to chruby, and its way better than both of those
<skrite> starlord: ok, will check it out, thanks !
<starlord> no hacks, no shims, just easy.
vt102 has joined #ruby
<starlord> but, it has no gemsets
Channel6 has quit [Quit: Leaving]
ruber has quit [Quit: BitchX: the ONLY bug-free client]
<starlord> so get used to typing "bundle exec" all the time
<starlord> which you should be doing anyway, so...
bricker`LA has quit [Ping timeout: 245 seconds]
ndrei has joined #ruby
iamjarvo has joined #ruby
davasaurous has quit [Ping timeout: 240 seconds]
danman has quit [Quit: danman]
Avahey has joined #ruby
topolinux has joined #ruby
<starlord> oh man i wish for a stack-based api
GriffinHeart has quit [Remote host closed the connection]
<workmad3> starlord: I go for the shell-function approach to avoid 'bundle exec' (handily provided by oh-my-zsh) ;)
<starlord> IT FRICKEN WORKS YESSSSSS
<starlord> <3<3<3
momomomomo has joined #ruby
<starlord> workmad3: what
<workmad3> starlord: basically, common ruby tools are replaced with a shell function that checks for a Gemfile in the directory hierarchy... if it finds one, it uses 'bundle exec', otherwise it uses the original command
<starlord> Hmm, I am surprised that my struct thing stays on stack...
<starlord> ah
<starlord> workmad3: sounds too hackish
<starlord> for me
<starlord> So, I have two levels of things, and it's making this awful.
klmlfl has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
dkam has joined #ruby
<starlord> At the ObjC level, I have a Hotkey object which owns a Block/Function object which it can call as-needed.
<starlord> I have to wrap my ObjC Hotkey object in a Ruby Hotkey object.
<starlord> But I also have to wrap my ObjC Block with a Ruby Block.
klmlfl has quit [Read error: No route to host]
noop has quit [Ping timeout: 258 seconds]
<starlord> ... all without changing the internals of the ObjC stuff.
klmlfl has joined #ruby
<starlord> So, either I need to come up with a really clever solution, or deal with tons of duplicated logic on the Ruby side.
Spleeze has quit [Ping timeout: 245 seconds]
slester has quit [Quit: slester]
starkhalo has joined #ruby
last_staff has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
dkam has quit [Client Quit]
<starlord> Because right now I have to write special code for *every time* I have to wrap an ObjC object that contains {1..N} ObjC blocks
<starlord> That just won't do.
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
abuzze has joined #ruby
blackmesa has joined #ruby
kil0byte has joined #ruby
emocakes__ has joined #ruby
relix has joined #ruby
emocakes has quit [Ping timeout: 272 seconds]
jottr has joined #ruby
<Hanmac> yeah ... writing wrapping functions is crazy ... because of that i use macros and templates to reduce the work for me ...
last_staff has joined #ruby
timgauthier_isaw is now known as timgauthier
klmlfl has quit [Ping timeout: 244 seconds]
Spleeze has joined #ruby
<starlord> Good idea.
icebourg has joined #ruby
zeroNones has joined #ruby
chthon has joined #ruby
bricker`LA has joined #ruby
dangerousdave has joined #ruby
Envek has joined #ruby
patrick99e99 has quit [Ping timeout: 260 seconds]
aspires has joined #ruby
slester has joined #ruby
Aaaal has joined #ruby
sichardrtallman has joined #ruby
speakingcode has joined #ruby
mikesplain has joined #ruby
Sawbones has joined #ruby
emocakes__ has quit [Ping timeout: 260 seconds]
Kricir has joined #ruby
Envek|2 has joined #ruby
silkfox has quit [Quit: WeeChat 0.4.3]
shackleford has joined #ruby
Sawbones_ has joined #ruby
hiall_ has joined #ruby
shackleford has quit [Remote host closed the connection]
hiall has quit [Ping timeout: 250 seconds]
hiall_ is now known as hiall
Envek has quit [Ping timeout: 240 seconds]
shackleford has joined #ruby
yeticry has joined #ruby
kristofferR has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
sk87 has joined #ruby
skrite has quit [Quit: WeeChat 0.4.2]
emocakes has joined #ruby
<starlord> I'm surprised my VALUE v (where v = Data_Wrap_Struct(...)) stayed on the stack correctly in my ObjC block that captured it.
dukz has joined #ruby
<starlord> I was sure that wasn't going to work and that I was going to have to store some special numeric ID or something.
edwardly is now known as D
D is now known as edwardly
<starlord> Actually I probably still should, considering how hacky this is.
zeroNones has quit [Ping timeout: 272 seconds]
Sawbones has quit [Ping timeout: 272 seconds]
aspires has quit []
paulfm has quit []
aspires has joined #ruby
roolo_ has joined #ruby
<starlord> Can you splat before a final arg in a call?
roolo has quit [Read error: Connection reset by peer]
<starlord> >> p :test
<eval-in_> starlord => :test ... (https://eval.in/198536)
yeticry has quit [Remote host closed the connection]
<starlord> >> a = [1, 2]; p *a, 3
<eval-in_> starlord => 1 ... (https://eval.in/198537)
yfeldblum has joined #ruby
freerobby has quit [Quit: Leaving.]
jerius has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
epochwolf has quit [Quit: Uh no...]
dukz has quit [Remote host closed the connection]
<starlord> Sweet.
vinleod has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mbinder has joined #ruby
<starlord> So I can do: mash = ["cmd", "ctrl", "shift"]; Hotkey.new *mash, "d" do ... end
<starlord> Right?
sichardrtallman has left #ruby [#ruby]
pu22l3r has joined #ruby
mbinder has quit [Read error: No route to host]
mbinder has joined #ruby
<jhass> syntactically? sure
Rollabunna has quit [Read error: No route to host]
i8igmac has quit [Remote host closed the connection]
treehug88 has joined #ruby
<starlord> Is it bad practice?
yfeldblum has quit [Ping timeout: 240 seconds]
<starlord> I just think [...] is a bit verbose in Hotkey.new ["cmd", "shift"], "d" do ... end
<jhass> wouldn't say so
<jhass> though rare
<jhass> to have another arg after the splat
MrBoolean has quit [Ping timeout: 244 seconds]
epochwolf has joined #ruby
<starlord> oh
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Hanmac> starlord .. depending what Hotkey wants as parameters Hotkey.new ["cmd", "shift"], "d" and Hotkey.new *["cmd", "shift"], "d" are not the same for the Hotkey class
jakolehm has quit [Remote host closed the connection]
<starlord> Hotkey doesn't care right now what it gets.
<starlord> Hotkey is asking Rubyists what they want to give it, and Hotkey will form what it wants based on that.
<starlord> :)
angusigu1ss has joined #ruby
aspires has quit []
<jhass> I think I'd like to be able to give "cmd+shift+d" as well as %w(cmd shift d) as well as "cmd", "shift", "d" :Ü
<jhass> *:P
<starlord> ha
<starlord> this isnt rails
<starlord> lets just pick one and stick with it
<starlord> :P
Rollabunna has joined #ruby
TeresaP has joined #ruby
<Hanmac> hm i think that one would make sense too Hotkey.new "d", ["cmd", "shift"]
soulcake has quit [Quit: Quack.]
<starlord> it used to be that way, but it seemed backwards
<starlord> cuz you usually say the mods before the key (ctrl-alt-delete)
<starlord> so typing delete, ctrl, alt seems backwards
<jhass> def initialize(*keys); keys = keys.flatten.map {|k| k.split('+') }.flatten :P
apeiros_ has joined #ruby
epochwolf has quit [Client Quit]
<jhass> breaks on binding + but heh :P
soulcake has joined #ruby
mikesplain has quit [Ping timeout: 250 seconds]
<starlord> heh
<starlord> or what if they type "cmd-shift-d" instead?
<Hanmac> hm ok ps i would prefer :cmd and :shift to make it showing that it not the real translated meaning ... like one might have "ctrl" but i have "strg" on the keyboard ... so symbols might have more sense
<jhass> .split(/[+-]/)
<starlord> see, it gets too confusing for users
<starlord> they forget which thing they're allowed to use
<starlord> or maybe they think this is /all/ they can use, and they dont know about the array options
buub has joined #ruby
yeticry has joined #ruby
<starlord> too many options is bad for users who dont want to think.
<workmad3> jhass: 'k.split('+') unless k == '+' '? ;)
<starlord> and my users never want to think.
<starlord> oh yeah, :cmd is fine too
<starlord> i wrote this in lua before, which only has (immutable) strings (like python)
<jhass> workmad3: what about ctrl++
<starlord> but yeah, syms work better here
<workmad3> jhass: ah, good point
ppinto has joined #ruby
<starlord> ok we're all agreed you cant use this friggen syntax if you have punct keys, deal?
seanosaur has joined #ruby
<starlord> in that case you have to use [:cmd, :opt], "d"
<starlord> i would use constants instead, but thats not any clearer really, and its longer
<banister> Hanmac what do u think of this quote? "The Germans have an inhuman way of cutting up their verbs. Now a verb has a hard time enough of it in this world when it's all together. It's downright inhuman to split it up. But that's just what those Germans do. They take part of a verb and put it down here, like a stake, and they take the other part of it and put it away over yonder like another stake, and between these two limits they just
<banister> shovel in German."
<starlord> [Hotkey::Cmd, Hotkey::Ctrl]
<starlord> lol
emocakes has quit []
seanosaur has quit []
angusigu1ss has quit [Ping timeout: 240 seconds]
Takle has quit [Read error: Connection reset by peer]
<jhass> that's awful
Takle has joined #ruby
<workmad3> .split(/(?<=(ctrl|shift|alt|cmd))[+-]/) ? ;)
seanosaur has joined #ruby
skrite has joined #ruby
<starlord> overveth, thoust....
<starlord> i mean,
<starlord> look, you...
<starlord> lets just do this simply
<Hanmac> banister: i think its true but currently i need to find a nice sample with a split verb
<bhaak> banister: sounds like a bad imitation of mark twain's famous rant
epochwolf has joined #ruby
<starlord> cuz also, "opt" and "option" are allowed instead of "alt"
TeresaP has quit [Ping timeout: 245 seconds]
fennec has joined #ruby
<jhass> starlord: then stop talking and do it already
<starlord> so which one is the best of all these?
Wolland has joined #ruby
<fennec> >> "remind me which one is the bot"
<eval-in_> fennec => "remind me which one is the bot" (https://eval.in/198538)
AFKGeek has joined #ruby
<fennec> thanks eval-in_
<starlord> (1) [*mods], letter (2) *mods, letter, (3) letter, [*mods], (4) letter, *mods
<jhass> I'd do def initialize(*keys); keys = keys.flat_map(&:to_s)
yeticry has quit [Remote host closed the connection]
<workmad3> hmm... doesn't look like that lookbehind works very well anyway
<Hanmac> that makes the right array in 10 seconds flat ;P
<banister> bhaak that is mark twain
<jhass> workmad3: I think you need the skip the inner match group, just (?<=a|b|c)
<banister> bhaak it's a direct quote
Advocation has quit [Quit: Advocation]
<workmad3> jhass: yeah, that works
<workmad3> >> "ctrl+alt+opt-+".split(/(?<=ctrl|alt|shift|opt|cmd)[+-]/)
<eval-in_> workmad3 => ["ctrl", "alt", "opt", "+"] (https://eval.in/198539)
yeticry has joined #ruby
<jhass> and super! don't take me my super with your pesky cmd keys
<bhaak> banister: ha. you are right. but doesn't sound quite like him. I prefer the one with jumping into the atlantic and coming up on the other side with the verb.
RandyT has quit [Ping timeout: 244 seconds]
milkohol has joined #ruby
<starlord> oh yeah
<starlord> super too
<starlord> and 'option'
<starlord> etc
Sawbones_ has quit []
<starlord> okay this is what im going with: Hotkey.new :cmd, :alt, "d" do ... end
<starlord> brb using (transpose ...) a lot
IceDragon has joined #ruby
momomomomo has quit [Ping timeout: 244 seconds]
fgo has quit []
geggam has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
skolman_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kil0byte has quit [Remote host closed the connection]
momomomomo has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Advocation has joined #ruby
<Hanmac> starlord: hm what about Alt-Gr ? ;P
mijicd has joined #ruby
<starlord> wat
<Hanmac> the Right Alt Key does have diffent meaning than the left Alt key
mijicd has quit [Remote host closed the connection]
freerobby has joined #ruby
<starlord> not here.
<Hanmac> on my keyboard layout its called "Alt-Gr"
<starlord> sorry, not my limitation, osx's
abuzze has quit [Remote host closed the connection]
kil0byte has joined #ruby
ohcibi has quit [Quit: No Ping reply in 180 seconds.]
ohcibi has joined #ruby
joast has quit [Quit: Leaving.]
lmickh has quit [Remote host closed the connection]
hellangel7 has joined #ruby
hellangel7 has quit [Max SendQ exceeded]
mijicd has joined #ruby
abuzze has joined #ruby
jottr has joined #ruby
Pumukel has quit [Ping timeout: 272 seconds]
fsapo has quit [Ping timeout: 244 seconds]
Bish has quit [Ping timeout: 260 seconds]
gsd has joined #ruby
ursooperduper has joined #ruby
mkaesz has joined #ruby
Bish has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
cajone has joined #ruby
<starlord> any of you suckers use osx?
Trynemjoel has joined #ruby
<DefV> wow
abuzze has quit [Ping timeout: 260 seconds]
<DefV> you really know how to ask a q
<starlord> <3
abdulsattar has quit [Ping timeout: 272 seconds]
<DefV> but this sucker does
<starlord> did you buy Dash.app or Sublime Text or anything?
dangerousdave has joined #ruby
<starlord> did you by the latest iPhone too?
<DefV> no
<cajone> guys is there an elegant way of turning a string array into a hash, say I have a = %w(car transport bus transport fridge appliance) and i'm looking for car => transport etc ?
jottr has quit [Ping timeout: 245 seconds]
<jhass> cajone: recent ruby #to_h, not so recent ruby Hash[]
aspires has joined #ruby
<starlord> >> %{a b c d}.split(' ').to_h
<eval-in_> starlord => wrong element type String at 0 (expected array) (TypeError) ... (https://eval.in/198541)
<starlord> >> %{a b c d}.split(' ')
<eval-in_> starlord => ["a", "b", "c", "d"] (https://eval.in/198542)
<starlord> >> Hash[%{a b c d}.split(' ')]
<eval-in_> starlord => /tmp/execpad-afb7c2bf2c0e/source-afb7c2bf2c0e:2: warning: wrong element type String at 0 (expected array) ... (https://eval.in/198543)
<starlord> wth
<starlord> i dont care
<jhass> starlord: %{}.split -> %w{}
<starlord> >> Hash[*%w{a b c d}.split(' ')]
<eval-in_> starlord => undefined method `split' for ["a", "b", "c", "d"]:Array (NoMethodError) ... (https://eval.in/198544)
<starlord> >> Hash[*%w{a b c d}]
<eval-in_> starlord => {"a"=>"b", "c"=>"d"} (https://eval.in/198545)
<starlord> yay
benzrf is now known as benzrf|offline
<fennec> well mostly it is
momomomomo has quit [Quit: momomomomo]
<starlord> so anyway
<fennec> >> %{a b c d}.split(' ')
<eval-in_> fennec => ["a", "b", "c", "d"] (https://eval.in/198546)
<jhass> starlord: next time irb until you're sure about the answer ;)
<starlord> pfft
<starlord> >> == irb
<eval-in_> starlord => /tmp/execpad-7470c695c85a/source-7470c695c85a:2: syntax error, unexpected == ... (https://eval.in/198547)
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> starlord: no, eval-in is for demo purposes only, not for figuring stuff out, that's what your local irb/pry is for
<jhass> these 900 people here are not interested in your experiments
centrx has joined #ruby
kil0byte has quit [Remote host closed the connection]
az has quit [Quit: WeeChat 0.4.2]
<starlord> 890 of them just forgot that they have irssi running on a slicehost box somewhere and will never come back
oponder has quit [Remote host closed the connection]
gsd has joined #ruby
<starlord> the other 10 can help me figure out what im doing wrong.. like you did ;)
oponder has joined #ruby
oponder has quit [Remote host closed the connection]
az has joined #ruby
cym has quit [Ping timeout: 272 seconds]
Spami has joined #ruby
<jhass> okay, warned you
<jhass> op will be around soon enough
mary5030 has joined #ruby
momomomomo has joined #ruby
mityaz has quit [Quit: Leaving]
<tobiasvl> what a nice response starlord
snath has joined #ruby
<starlord> <3
apeiros_ is now known as apeiros
<starlord> yall so nice
klmlfl has joined #ruby
St_Marx has quit [Remote host closed the connection]
<starlord> jhass: why so serious?
bal has quit [Quit: bal]
<starlord> lifes too short bruh
<jhass> why so ignorant?
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arturhoo has joined #ruby
<starlord> am i really?
<starlord> my response is legit
<momomomomo> you both cool it, ruby is serious business
St_Marx has joined #ruby
<starlord> While I could have just used irb on my local machine to figure out the solution, nobody in here would have been able to benefit from my trials/errors.
<momomomomo> lol were you using >> a lot?
<momomomomo> don’t do that :P
<momomomomo> use it for examples
<momomomomo> >> p ‘like this’
<starlord> By using eval-in_ to test it, someone brought up several of my mistakes.
<starlord> Passers-by may have learned from those teaching opportunities.
<jhass> starlord: not to offend you, but those trials are very basic, those 10 persons you claim to listen learned nothing from them
endash has joined #ruby
abuzze has joined #ruby
<momomomomo> both of you, shh
<momomomomo> starlord: respect the channel, and don’t spam
mijicd has quit [Quit: leaving]
<jhass> starlord: we would have pointed them out in your final suggestion too
<momomomomo> ^
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<starlord> jhass: Look I'm just waxing philosophical because you accused me of being ignorant, and I ain't got no time for lack of respect.
starlord has quit [Quit: Leaving...]
kil0byte has joined #ruby
<jhass> kthx, bai
klmlfl has quit [Ping timeout: 250 seconds]
<cajone> so .. Hash[*w{a b c d}] is definitive? :{, jhass you mentioned .to_h
<jhass> cajone: it's the most portable one
<momomomomo> >> puts “hello"
<jhass> .to_h is fairly new
<momomomomo> what happened to you eval
abdulsattar has joined #ruby
<centrx> >> you used to be cool
<eval-in_> centrx => undefined local variable or method `cool' for main:Object (NameError) ... (https://eval.in/198554)
<centrx> figures
<jhass> it has its hiccups recently
kate_r has joined #ruby
<momomomomo> looool
<momomomomo> >> poop
<eval-in_> momomomomo => undefined local variable or method `poop' for main:Object (NameError) ... (https://eval.in/198555)
<jhass> >> "☃"
<jhass> ^ no more utf-8
<momomomomo> ~_~
IceDragon has quit [Ping timeout: 272 seconds]
joast has joined #ruby
aledovsky has quit [Read error: Connection reset by peer]
<Hanmac> charliesome: didnt fixed the utf8 problem yet ...
joast has quit [Client Quit]
aledovsky_ has joined #ruby
aledovsky_ is now known as aledovsky
Takle has quit [Remote host closed the connection]
IceDragon has joined #ruby
LekeFly_ has joined #ruby
hiall_ has joined #ruby
hiall has quit [Ping timeout: 250 seconds]
hiall_ is now known as hiall
cocotton has quit [Remote host closed the connection]
LekeFly has quit [Ping timeout: 245 seconds]
TeresaP has joined #ruby
cocotton has joined #ruby
starlord has joined #ruby
LekeFly_ has quit [Client Quit]
gregf has quit [Quit: WeeChat 1.0]
yfeldblum has joined #ruby
axsuul has joined #ruby
larissa has quit [Quit: Leaving]
rkalfane has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yeticry has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rkalfane has quit [Client Quit]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
gauke has quit [Quit: gauke]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
spacemud has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
kaspergrubbe_ has quit [Ping timeout: 245 seconds]
<mikecmpbll> from reading a little about SAX XML parsing it seems as though it's not appropriate for all XML structures
axsuul has quit [Read error: Connection reset by peer]
<mikecmpbll> would this be the case?
IceDragon has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
<mikecmpbll> because of it's sequential nature, if i had <User><ID>1</ID><LinkedUserID>2</LinkedUserID></User><User><ID>2</ID><LinkedUserID>1</LinkedUserID></User>
<mikecmpbll> that might be bad XML design, but never the less if i was parsing users in to objects i wouldn't be able to parse the association between from user 1 to user 2?
mattstratton has quit [Ping timeout: 272 seconds]
mattstratton has joined #ruby
rkalfane has joined #ruby
IceDragon has joined #ruby
snorkra_ has quit [Ping timeout: 245 seconds]
ixti has quit [Ping timeout: 260 seconds]
Jarboe has joined #ruby
Fire-Dragon-DoL has joined #ruby
spacemud has joined #ruby
last_staff has quit [Read error: No route to host]
starlord has quit [Quit: Leaving...]
wpp has quit [Quit: ZZZzzz…]
axsuul has joined #ruby
hiall has quit [Ping timeout: 272 seconds]
axsuul has quit [Max SendQ exceeded]
zeroNones has joined #ruby
axsuul has joined #ruby
cornfeedhobo has joined #ruby
mbinder has quit [Quit: Leaving...]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
Alina-malina has quit [Ping timeout: 260 seconds]
kireevco has joined #ruby
mordocai has joined #ruby
<cornfeedhobo> howdy. i have a string with a literal \n (because it is bash output grabbed with ``), and i want to split() on that, but when i do split('\n'), it just turns the string into an array, thinking that i want to split on newlines. is there *any* way to be literal?
kobain has joined #ruby
kobain_ has joined #ruby
kobain_ has quit [Client Quit]
<canton7> cornfeedhobo, escape the \ with another \
<mikecmpbll> \\n
<mikecmpbll> indeed.
cirn0 has joined #ruby
angusigu1ss has joined #ruby
<cornfeedhobo> fml
<cornfeedhobo> i thought i tried that
<cornfeedhobo> ya, no luck
apeiros has quit [Remote host closed the connection]
hiall has joined #ruby
<mikecmpbll> >> "blah\\nfoo\\nbar".split("\\n\)
<eval-in_> mikecmpbll => /tmp/execpad-f6a81b36fec9/source-f6a81b36fec9:5: syntax error, unexpected tGVAR, expecting ')' ... (https://eval.in/198586)
<mikecmpbll> >> "blah\\nfoo\\nbar".split("\\n")
<eval-in_> mikecmpbll => ["blah", "foo", "bar"] (https://eval.in/198587)
apeiros has joined #ruby
<mikecmpbll> cornfeedhobo: what's the prob?
<cornfeedhobo> one sec, gonna paste the output
jschmid has joined #ruby
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<mikecmpbll> be sure to include an inspect of the string.
Advocation has quit [Quit: Advocation]
<cornfeedhobo> oh
yakko has joined #ruby
Jarboe has quit [Ping timeout: 260 seconds]
jakolehm has joined #ruby
<cornfeedhobo> updated with inspects
jobewan has joined #ruby
cirn0 has quit [Ping timeout: 250 seconds]
jschmid has quit [Remote host closed the connection]
<cornfeedhobo> it appears to be identifying those as literal \n, so i dont know why the escape wouldnt work
zorak8 has joined #ruby
angusigu1ss has quit [Ping timeout: 240 seconds]
lmickh has joined #ruby
chrishough has joined #ruby
<cornfeedhobo> disclaimer: i am greener than green to ruby
<Hanmac> cornfeedhobo: hm what happen with split("\\n") ?
abdulsattar has quit [Ping timeout: 245 seconds]
<canton7> cornfeedhobo, split('\n') works for me
carraroj has joined #ruby
HelperW__ has joined #ruby
<cornfeedhobo> same output
<cornfeedhobo> Hanmac: ^
mrbubbles has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
<cornfeedhobo> canton7: hmmm. lame. why would we get different output?
gregf has joined #ruby
<mikecmpbll> split("\n") works for me
<cornfeedhobo> that awk command can be safely run for anyone that is running linux
<mikecmpbll> \\m*
<cornfeedhobo> if you want to test irb locally
<mikecmpbll> \\n* fml
<canton7> cornfeedhobo, https://eval.in/198592
ndrei has joined #ruby
Tricon has joined #ruby
<cornfeedhobo> well, thats no good.
ptrrr has joined #ruby
{xenomorph} is now known as xenomorph
nouranology has quit [Quit: ChatZilla 0.9.90.1 [Firefox 32.0.3/20140924083558]]
<canton7> what isn't?
<Hanmac> cornfeedhobo: hm you can also look at output.lines and see what does return
<cornfeedhobo> canton7: because our outputs dont match up :p
Jarboe has joined #ruby
<canton7> cornfeedhobo, you're using \\n, I'm using \n
<mikecmpbll> cornfeedhobo: yes the do
<mikecmpbll> they*
<mikecmpbll> look at output.inspect.
xenomorph is now known as {xenomorph}
aganov has quit [Quit: Leaving]
HelperW_ has quit [Ping timeout: 245 seconds]
<mikecmpbll> ack
<mikecmpbll> ignore me
starlord has joined #ruby
<cornfeedhobo> mikecmpbll: yeah, but then why does the exact same commands not produce the same output :(
arup_r has joined #ruby
<cornfeedhobo> ah
<cornfeedhobo> k
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
{xenomorph} is now known as xenomorph
gsd has joined #ruby
<starlord> the way i solved this before was just writing a single implementation and tightly coupling the scripting language wrapper to the underlying code, so that it wasnt really a wrapper anymore, it was the actual code.
<cornfeedhobo> Hanmac: updated
HelperW__ has quit [Ping timeout: 260 seconds]
<starlord> maybe i should do that again with ruby.
<mikecmpbll> cornfeedhobo: your `output`, contains new lines
<starlord> but theres something to be said for writing code once and never having to change it again.
<mikecmpbll> not "\\n"
<Hanmac> cornfeedhobo: ok lines.to_a ?
<mikecmpbll> so your original question is wrong, what are you trying to do?
carraroj has quit [Ping timeout: 240 seconds]
joast has joined #ruby
<mikecmpbll> cornfeedhobo: the reason your split on new line wasn't working, was because you were using single quotes
<mikecmpbll> so what you really want, is output.split("\n")
<starlord> how would you do it?
yakko has quit [Read error: Connection reset by peer]
<cornfeedhobo> okay, updated with what i think is everything everyone has suggested
<canton7> mikecmpbll, that's not what he wants
<mikecmpbll> canton7: what does he want?
<canton7> he doesn't want to split on a literla newline (I think?)
<mikecmpbll> he does
<canton7> he wants to split on a literal '\n'
<mikecmpbll> he doens't have a literal \n in his string
* mikecmpbll bashes head
<mikecmpbll> :p
rkalfane has joined #ruby
<cornfeedhobo> this turned a bit into learning about ruby, but my goal is to eventually create a hash (map?) of username => homedir
yakko has joined #ruby
<cornfeedhobo> that way i can iterate it easily later in puppet
ndrei has quit [Ping timeout: 260 seconds]
emmesswhy has joined #ruby
charliesome has quit [Quit: zzz]
ndrei has joined #ruby
<canton7> mikecmpbll, line 8 makes it look like he does?
<mikecmpbll> that's because it's an inspect
<cornfeedhobo> i was just using awk to print space deliminated user/dir pairs, and then thought i could split on ' ' and '\n'
<canton7> mikecmpbll, yes. inspect shows a newline as \n and a literal \n as \\n
<mikecmpbll> no it doesn't
hamakn has quit [Remote host closed the connection]
<mikecmpbll> pardon me, it does
<mikecmpbll> but its IRB so it's double inspected
<mikecmpbll> if you write `output` he'll get the inspected version printed.
<cornfeedhobo> ^^
<canton7> aha, that's what I hadn't appreciated
<canton7> yes, true
kireevco has quit [Ping timeout: 260 seconds]
MrBoolean has joined #ruby
<Hanmac> cornfeedhobo: oh a hash, that means everything more interesting and also more easy:
<Hanmac> >> "nobody /nonexistent\ncornfeedhobo /home/cornfeedhobo\n".scan((/(\w+) (.+)/)).to_h
<canton7> so, split on "\n", like others have said :P you've got a newline character, not a literal \n
<eval-in_> Hanmac => {"nobody"=>"/nonexistent", "cornfeedhobo"=>"/home/cornfeedhobo"} (https://eval.in/198598)
Takle has joined #ruby
<mikecmpbll> yep.
zarubin has joined #ruby
<cornfeedhobo> Hanmac: i... never would have... thank you :D
<mikecmpbll> cornfeedhobo: you can do it your way with split too but it not as nice as using scan
<Hanmac> ps. the to_h method might be missing ... in that case:
<Hanmac> >> Hash["nobody /nonexistent\ncornfeedhobo /home/cornfeedhobo\n".scan((/(\w+) (.+)/))]
<eval-in_> Hanmac => {"nobody"=>"/nonexistent", "cornfeedhobo"=>"/home/cornfeedhobo"} (https://eval.in/198599)
larissa has joined #ruby
<mikecmpbll> >> Hash["nobody /nonexistent\ncornfeedhobo /home/cornfeedhobo\n".split("\n").map{|s| s.split(" ")}]
<eval-in_> mikecmpbll => {"nobody"=>"/nonexistent", "cornfeedhobo"=>"/home/cornfeedhobo"} (https://eval.in/198600)
<mikecmpbll> for instance.
<cornfeedhobo> it is missing. how did you know? :p
<cornfeedhobo> interesting
<cornfeedhobo> i'll have to look up scan.
stunder has joined #ruby
<canton7> ruby version :P
<Hanmac> cornfeedhobo: because your lines still returns an Enumerator and no Array ... that was a change between 1.9.3 and 2.0
<Hanmac> in 2.0/2.1 there was also to_h added
momomomomo has quit [Quit: momomomomo]
<cornfeedhobo> yeah, dont even get me started about the out dated ruby
dh64 has joined #ruby
<cornfeedhobo> i just have to live with that right now
Takle has quit [Read error: Connection reset by peer]
mark_locklear has quit [Ping timeout: 246 seconds]
MaciejCzyzewski has joined #ruby
<Hanmac> cornfeedhobo: hm i need to look ... could that path have spaces? in that case it should be escaped with "" right?
Takle has joined #ruby
MrBoolean has quit [Quit: Leaving...]
qba73 has quit []
MaciejCzyzewski has quit [Client Quit]
<cornfeedhobo> no, afaik, *nix usernames dont allow spaces
iiiinzg has joined #ruby
<cornfeedhobo> hmm but the path could be diff, you are right
<cornfeedhobo> good catch
larissa has quit [Client Quit]
<cornfeedhobo> hmmm
<Hanmac> moment i make a regxp for you
<cornfeedhobo> let me make a test account and dir test against
<cornfeedhobo> aww, thanks :)
kaspergrubbe_ has joined #ruby
patrick99e99 has joined #ruby
tvw has quit []
Akagi201 has quit [Read error: Connection reset by peer]
Ankhers has quit [Remote host closed the connection]
tanath has quit [Remote host closed the connection]
yakko has quit [Read error: Connection reset by peer]
<Hanmac> there is an test with escaped path
<Hanmac> >> "nobody /nonexistent\ncornfeedhobo \"/home/of cornfeedhobo\"\n".scan((/^(\w+) "?(.+?)"?$/)).to_h
<eval-in_> Hanmac => {"nobody"=>"/nonexistent", "cornfeedhobo"=>"/home/of cornfeedhobo"} (https://eval.in/198601)
tanath has joined #ruby
Ankhers has joined #ruby
Akagi201 has joined #ruby
timonv_ has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 244 seconds]
<cornfeedhobo> yeah, works like a charm
mordocai has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
timonv_ has joined #ruby
<cornfeedhobo> thanks, everyone, i really appreciate the help this morning!
yakko has joined #ruby
iinzg has quit [Ping timeout: 260 seconds]
codeurge has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
lkba has quit [Ping timeout: 240 seconds]
patrick99e99 has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 250 seconds]
ndrei has joined #ruby
kireevco has joined #ruby
AFKGeek has quit [Quit: Leaving]
skammer has quit [Ping timeout: 260 seconds]
stunder has quit [Quit: Screw you guys I'm going home]
jcdesimp has joined #ruby
timonv_ has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 244 seconds]
buub has quit [Read error: Connection reset by peer]
foooobear__ has joined #ruby
buub has joined #ruby
klmlfl has joined #ruby
foooobear_ has quit [Ping timeout: 245 seconds]
Alina-malina has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
sdwrage_ has quit [Quit: This computer has gone to sleep]
sdwrage has quit [Quit: This computer has gone to sleep]
seanosaur has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 240 seconds]
seanosaur has joined #ruby
sdwrage has joined #ruby
yakko has quit [Read error: Connection reset by peer]
sdwrage_ has joined #ruby
kate_r has joined #ruby
yakko has joined #ruby
alex88 has quit [Quit: Leaving...]
apeiros has joined #ruby
cocotton has quit [Remote host closed the connection]
dangerousdave has joined #ruby
ndrei has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghostmoth has joined #ruby
klmlfl has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
seanosaur has quit [Remote host closed the connection]
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
dorei has joined #ruby
Igneous has joined #ruby
klmlfl has joined #ruby
Takle has quit [Remote host closed the connection]
hamakn has joined #ruby
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<timgauthier> shevy you here?
Avahey has quit [Quit: Connection closed for inactivity]
kireevco has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 258 seconds]
joonty has quit [Quit: Leaving]
tylersmith has joined #ruby
chihhsin_cloud has quit [Quit: Connection closed for inactivity]
<starlord> what is it with yall and regexps
cocotton has joined #ruby
<Igneous> if I wanted to dynamically retrieve a value from a hash of hashes, what would be an efficient way of doing that? I'm taking a string from the user for accessing the value in the hash like "app.nodegroup", and am expecting it to get the value of hash['app']['nodegroup']
MaciejCzyzewski has joined #ruby
JohnBat26 has joined #ruby
klmlfl has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
<Igneous> I'm sure I could build something with eval, but I have a feeling that's not the 'right' way
spyderman4g63 has joined #ruby
lsmola has quit [Ping timeout: 246 seconds]
<fennec> i dunno about efficient but
<fennec> >> a = {'foo' => { 'bar' => :baz }}; [a, *('foo.bar'.split(/./))].inject(:[])
<eval-in_> fennec => {"foo"=>{"bar"=>:baz}} (https://eval.in/198604)
bricker`work has joined #ruby
<fennec> wait, close
krisquigley has quit [Remote host closed the connection]
<fennec> >> a = {'foo' => { 'bar' => :baz }}; [a, *('foo.bar'.split('.'))].inject(:[])
<eval-in_> fennec => :baz (https://eval.in/198605)
<fennec> stupid regex ;)
krisquigley has joined #ruby
<Igneous> ah that's clean
wallerdev has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<Igneous> fennec: thank you sir
kireevco has joined #ruby
<fennec> no warranty is provided for when you look up something that's not there ;)
kireevco has quit [Max SendQ exceeded]
abdulsattar has joined #ruby
jcdesimp has quit [Remote host closed the connection]
aspires has quit []
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
jottr has joined #ruby
kireevco has joined #ruby
<Hanmac> fennec & Igneous why not:
<Hanmac> >> a = {'foo' => { 'bar' => :baz }}; 'foo.bar'.split('.').inject(a,:[])
<eval-in_> Hanmac => :baz (https://eval.in/198606)
Envek|2 has quit [Quit: Good bye, see you soon!/]
<fennec> not a bad idea either
tjr9898 has joined #ruby
tjr9898 has quit [Remote host closed the connection]
drawingthesun has joined #ruby
HelperW__ has joined #ruby
dANO_ has joined #ruby
phrozen77 has quit [Quit: my irc client is equipped with trout and i am not afraid to use them sir]
spyderman4g63 has quit [Ping timeout: 272 seconds]
<Igneous> that's actually what I ended up doing
<Igneous> didn't bother with the splat
jakolehm has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 272 seconds]
dANO has quit [Ping timeout: 272 seconds]
kaspergrubbe_ has quit [Remote host closed the connection]
jakolehm has joined #ruby
yakko has quit [Read error: Connection reset by peer]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ixti has joined #ruby
InhalingPixels has joined #ruby
yakko has joined #ruby
gmas has joined #ruby
rkalfane has joined #ruby
cndiv has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
Kricir has quit [Remote host closed the connection]
W0rmDr1nk has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
Kricir has joined #ruby
wpp has joined #ruby
phrozen77 has joined #ruby
ndrei has joined #ruby
jakolehm has quit [Ping timeout: 272 seconds]
wpp has quit [Client Quit]
aspires has joined #ruby
kireevco has quit [Quit: Leaving.]
jeremy04 has quit [Remote host closed the connection]
Xiti has quit [Quit: Leaving]
<Hanmac> Igneous: hm if you do not check the userinput before it might crash ... there is a more failproof version:
<Hanmac> >> a = {'foo' => { 'bar' => :baz }}; 'foz.bar'.split('.').inject(a) {|h, k| h ? h[k] : nil }
<eval-in_> Hanmac => nil (https://eval.in/198608)
angusigu1ss has joined #ruby
benzrf|offline is now known as benzrf
mocfive has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
aspires has quit [Client Quit]
<cornfeedhobo> starlord: regex is awesome!
Xiti has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<cornfeedhobo> when i learned about regex, i was all like, "Now, I can concur the world!"
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx> except HTML
<cornfeedhobo> conquer*
aspires has joined #ruby
<cornfeedhobo> centrx: truth
<Igneous> Hanmac: I'd rather an exception be thrown honestly
EminenceHC has joined #ruby
<Igneous> this is one of those scenarios where if that value doesn't exist, something is very wrong and things should stop right there
mkaesz has quit [Quit: Leaving...]
mikecmpbll has quit [Quit: i've nodded off.]
<soahccc> Best post ever... even better than not enough jquery
angusigu1ss has quit [Ping timeout: 240 seconds]
<EminenceHC> if a = [7,9] b = [9]... why does a.includes?(b) return false? What is the best way to write this?
osvico has quit [Ping timeout: 246 seconds]
<centrx> EminenceHC, b is an array, a includes no arrays
<EminenceHC> centrx: ahh
pushnell has joined #ruby
<jhass> it's hard to tell what you want from the example, maybe !(a & b).empty?
britneywright has quit [Remote host closed the connection]
Xiti has quit [Ping timeout: 246 seconds]
thagomizer has joined #ruby
thams has joined #ruby
patrick99e99 has joined #ruby
Xiti has joined #ruby
deric_skibotn has joined #ruby
ixti has quit [Ping timeout: 260 seconds]
ephemerian has quit [Quit: Leaving.]
gregtarnoff has joined #ruby
<starlord> woot
<starlord> just figured out how to use rb_gc_register_address
zorak8 has quit [Ping timeout: 260 seconds]
awc737 has joined #ruby
bricker`LA has quit [Ping timeout: 258 seconds]
<starlord> you make a struct to hold your data for Data_Make_Struct, and you give it a VALUE field
<starlord> then when you make your struct, you assign the VALUE field to the thing, and then you like, do stuff
<starlord> bam, done!
<momomomomo> :|
e^ipi has joined #ruby
<starlord> still suuuuper verbose though.
osvico has joined #ruby
<starlord> my c implementation is like 90 lines, this ruby wrapper c code is already just as long
yakko has quit [Read error: Connection reset by peer]
yakko has joined #ruby
<starlord> no wait, its longer than the implementation it's wrapping.
sdwrage_ has quit [Quit: This computer has gone to sleep]
sdwrage has quit [Quit: This computer has gone to sleep]
thumpba has joined #ruby
<yxhuvud> starlord: I trust you have found the FFI gem?
<starlord> im not writing any ruby code
xcv has quit [Remote host closed the connection]
<starlord> im writing c code that creates ruby classes/modules to wrap my c functions
<e^ipi> so, it appears that either nodejs or ruby are escaping urls wrong : https://gist.github.com/sonnens/8ce82d5a051ebabce9bb
<e^ipi> who’s right & who’s wrong here
<e^ipi> ?
<starlord> and i dont want it to be open source, since its a commercial app
blackmesa has quit [Ping timeout: 250 seconds]
<yxhuvud> starlord: FFI is a library to link dynamically against a c lib.
<starlord> yxhuvud: yes, and then i have to write ruby code, which is thus open source
<starlord> yxhuvud: plus im not sure how well it works with objc blocks
<jhass> e^ipi: I think neither is wrong, ruby is just a bit more careful
<starlord> (actually c blocks, but via an apple llvm extension)
wallerdev has quit [Quit: wallerdev]
<e^ipi> ruby’s also escaping the space character as + rather than %20
<yxhuvud> starlord: what? Why would using ffi make it open source? ffi is BSD licensed
<e^ipi> jhass: url escaping/encoding is a standard, no?
<starlord> yxhuvud: because if i write ruby code, then anyone can read it by inspecting my app's binary
<starlord> yxhuvud: ruby code is just ascii text, thus anyone can see it
<e^ipi> RFC 3986
<yxhuvud> well, they could read your public interface exposed in your .h file, yes.
rippa has joined #ruby
<jhass> e^ipi: the process is standard and what's allowed unescaped is standard, not what to escape or not
<starlord> i so vastly prefer lua's c api to ruby's :'(
<starlord> but lua is so horribly unpopular and batteries-not-included as to be useless
sdwrage_ has joined #ruby
sdwrage has joined #ruby
fsapo has joined #ruby
niklasb has joined #ruby
Sharker has quit [Ping timeout: 264 seconds]
axsuul has quit [Read error: No route to host]
chthon has quit [Ping timeout: 272 seconds]
axsuul has joined #ruby
Sharker has joined #ruby
<Hanmac> starlord if its because of that some part of your C code can be seen with investigate the compiled lib too
skammer has joined #ruby
<starlord> Hanmac: meh, thats way harder
<starlord> Hanmac: i dont care about that. i just dont want to write it all in plaintext ruby.
p0sixpscl has quit [Quit: bye]
aspires has quit []
dc__ has joined #ruby
<Hanmac> starlord: and will you ship it as gem? because then you might need to precompile it (normally gems have C code that is installed while runtime)
<starlord> no
<Hanmac> noo ... i mean its compiled as install time
jcdesimp has joined #ruby
<starlord> im shipping an .app
roolo_ has quit [Remote host closed the connection]
MaciejCzyzewski has joined #ruby
<starlord> it has no external dependencies, it is a self contained osx app
<starlord> it links against Ruby.framework
<Hanmac> ahh ok
maestrojed has joined #ruby
<starlord> right
roolo has joined #ruby
<Hanmac> its long time ago since i worked with OSX ...
gmas has quit [Ping timeout: 260 seconds]
IceDragon_ has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
a13x212 has joined #ruby
icarus has joined #ruby
arup_r has quit [Quit: Leaving.]
<starlord> oh nice, it works: Core::Hotkey.new(:cmd, :shift, "d") { p :hi }.enable
IceDragon_ is now known as IceDragon
dukz has joined #ruby
hiall has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
mocfive has quit [Remote host closed the connection]
pen has joined #ruby
moritzschaefer has quit [Ping timeout: 244 seconds]
mocfive has joined #ruby
<Hanmac> starlord: sugestion: make that enable as optional keyparameter or similar like Core::Hotkey.new(:cmd, :shift, "d", :enable => true) { p :hi } .... hm i need to investigate whats the best way to write that in C-API
gmas has joined #ruby
roolo has quit [Ping timeout: 260 seconds]
<starlord> well thats longhand
xcv has joined #ruby
thumpba has quit [Remote host closed the connection]
<starlord> shorthand is Core::Hotkey.bind(:cmd, :shift, "d") { p :hi }
blackmesa has joined #ruby
<wasamasa> starlord: I suggest using licenses and lawyers to protect against the threats plain-text sources give your commercial software
<starlord> its short for .new + #enable
<starlord> wasamasa: meh
mikepack has joined #ruby
<starlord> wasamasa: theres no compelling reason to write any of this in ruby
<wasamasa> starlord: works pretty well for all major players
<starlord> plus FFI gem is not guaranteed to work with objc blocks
<starlord> or objc classes, etc
ki0 has quit [Ping timeout: 272 seconds]
yakko has quit [Read error: Connection reset by peer]
<starlord> wasamasa: plus im not a major player and cant afford lawyers
Advocation has joined #ruby
<wasamasa> so you afford the next-best thing
Takle has joined #ruby
<wasamasa> wasting time
* centrx heats up the popcorn
<starlord> lol
yfeldblum has joined #ruby
yakko has joined #ruby
<starlord> Data_Make_Struct is weird
<starlord> i mean, i get why it works the way it does... just, weird.
yakko has quit [Read error: Connection reset by peer]
<starlord> hmm, i wonder how i should allow for a key-released lambda... you cant pass two blocks to a single method call, so ill have to take an optional last lambda arg or something
cocotton has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
klmlfl has joined #ruby
mocfive has quit [Ping timeout: 272 seconds]
pen has quit [Max SendQ exceeded]
yakko has joined #ruby
<starlord> also, rb_errinfo is non-obvious
phrozen77 has quit [Changing host]
phrozen77 has joined #ruby
cocotton has joined #ruby
spastorino has joined #ruby
<jhass> or a DSL: Hotkey.bind(...) do |key| key.on_press { } key.on_release { } end
pen has joined #ruby
mocfive has joined #ruby
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
pandaant has joined #ruby
cocotton has quit [Remote host closed the connection]
<starlord> i dunno, thats borderline overcomplicated
<starlord> i think my users would be like "wtf no"
soulcake has quit [Ping timeout: 260 seconds]
<starlord> its rare that they want a hotkey-up event, they usually just want hotkey-down
nanoyak has joined #ruby
<starlord> so ill make it be another method, like "hotkey.onkeyup do ... end"
boombadaroomba has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
<starlord> er, on_release is nicer
<starlord> i wonder what rb_proc_exec does
tonybird has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
benzrf is now known as benzrf|offline
kapowaz_ is now known as kapowaz
tonybird has quit [Max SendQ exceeded]
klmlfl has quit [Ping timeout: 272 seconds]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nanoyak has joined #ruby
himsin has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
dANO_ has quit []
IceDragon has joined #ruby
toretore has quit [Ping timeout: 244 seconds]
cocotton has joined #ruby
seanosaur has joined #ruby
troyready has joined #ruby
jeremy04 has joined #ruby
wallerdev has joined #ruby
<starlord> oh wow, i bet it's literally just a way of doing exec() in a ruby proc
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soulcake has joined #ruby
pen has quit [Read error: Connection reset by peer]
poguez_ has quit [Quit: Connection closed for inactivity]
ndrei has quit [Ping timeout: 258 seconds]
pen has joined #ruby
spyderman4g63 has joined #ruby
soulcake has quit [Client Quit]
skammer has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
ndrei has joined #ruby
dc__ has quit [Remote host closed the connection]
skammer has joined #ruby
soulcake has joined #ruby
<starlord> How do you call a proc and/or lambda safely and be able to know whether it had an exception without giving it a back-up VALUE to call in case of exception?
dohsan has joined #ruby
benzrf|offline is now known as benzrf
baltazore has joined #ruby
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
elstif has quit [Quit: Leaving.]
sepp2k has quit [Quit: Konversation terminated!]
choke has quit [Read error: Connection reset by peer]
hooper has joined #ruby
wldcordeiro_ has joined #ruby
lkba has joined #ruby
Ankhers has quit [Remote host closed the connection]
o2q has quit [Ping timeout: 240 seconds]
yakko has quit [Read error: Connection reset by peer]
bigkevmcd has quit [Quit: This computer has gone to sleep]
niklasb has quit [Ping timeout: 246 seconds]
niklasb_ has joined #ruby
Ankhers has joined #ruby
ndrei has quit [Ping timeout: 258 seconds]
pen has quit [Quit: Leaving]
yakko has joined #ruby
pen has joined #ruby
pen has quit [Read error: Connection reset by peer]
fennec has quit [Ping timeout: 244 seconds]
<soahccc> starlord: what do you mean? you can just wrap the block call in a begin..end
<soahccc> and rescue of course :)
ptrrr has quit [Quit: ptrrr]
<starlord> I'm using the C API.
lowandslow has joined #ruby
<starlord> I'm given a block to a method, and I save it for later, and I want to call it, and know if it had an exception (without crashing the whole app).
Tricon has quit [Quit: Leaving...]
<soahccc> no idea about the C API but where do you want to know if it had an exception? Where you saved it or where you called it?
workmad3 has quit [Ping timeout: 250 seconds]
emocakes has joined #ruby
Takle has quit [Remote host closed the connection]
starlord has quit [Quit: Leaving...]
ki0 has joined #ruby
fennec has joined #ruby
fennec has quit [Changing host]
fennec has joined #ruby
eivindml2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
m8 has joined #ruby
anarang has joined #ruby
BTRE has quit [Quit: Leaving]
swartwulf has quit [Remote host closed the connection]
krisquigley has joined #ruby
starlord has joined #ruby
pen has joined #ruby
zorak8 has joined #ruby
BTRE has joined #ruby
wjimenez5271 has joined #ruby
klmlfl has joined #ruby
pen has quit [Read error: Connection reset by peer]
<starlord> I'm given a block which I store as a VALUE and want to call later in C, but making sure to handle failure correctly.
abdulsattar has quit [Ping timeout: 260 seconds]
MaciejCzyzewski has joined #ruby
yxhuvud has quit [Remote host closed the connection]
magic is now known as Guest26178
Guest26178 has quit [Killed (morgan.freenode.net (Nickname regained by services))]
klmlfl has quit [Remote host closed the connection]
<starlord> I can do rb_funcall(blk, rb_intern("call"), 0); but then if it has an exception, the whole program crashes.
emocakes has quit [Ping timeout: 260 seconds]
mferrier has joined #ruby
klmlfl has joined #ruby
<starlord> Same with rb_proc_call(blk, Qnil);
wldcordeiro_ has quit [Ping timeout: 272 seconds]
yakko has quit [Read error: Connection reset by peer]
ursooperduper has joined #ruby
angusigu1ss has joined #ruby
thumpba has joined #ruby
yakko has joined #ruby
cirn0 has joined #ruby
ki0 has quit [Remote host closed the connection]
gmas has quit [Ping timeout: 260 seconds]
swartwulf has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
bMalum has joined #ruby
<starlord> er, rb_ary_new() as the last arg
Tricon has joined #ruby
cocotton_ has joined #ruby
teddyp1cker has joined #ruby
JohnBat26 has quit [Ping timeout: 260 seconds]
xcv has quit [Remote host closed the connection]
<starlord> I can't use rb_rescue since it's not a C function.
xcv has joined #ruby
HelperW__ has quit [Quit: Computer has gone to sleep.]
AlSquirrel has quit [Quit: This computer has gone to sleep]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HelperW__ has joined #ruby
angusigu1ss has quit [Ping timeout: 260 seconds]
cirn0 has quit [Ping timeout: 240 seconds]
oponder has joined #ruby
thumpba_ has joined #ruby
thumpba has quit [Read error: Connection reset by peer]
mattstratton has quit [Quit: Textual IRC Client: www.textualapp.com]
cocotton has quit [Ping timeout: 260 seconds]
dangerousdave has joined #ruby
ixti has joined #ruby
cocotton_ has quit [Remote host closed the connection]
HelperW__ has quit [Ping timeout: 250 seconds]
einarj has quit [Remote host closed the connection]
carraroj has joined #ruby
jxs_ has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilkFox_ has joined #ruby
cndiv has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> what, is it c++
TeresaP has quit [Quit: TeresaP]
snorkra has joined #ruby
rkalfane has joined #ruby
omosoj has joined #ruby
melik has joined #ruby
rocknrollmarc has quit [Quit: My damn controlling terminal disappeared!]
timonv_ has joined #ruby
Advocation has quit [Quit: Advocation]
kireevco has joined #ruby
<starlord> What? No.
<starlord> I'm using Ruby's C API.
skammer has quit [Ping timeout: 245 seconds]
michaeldeol has joined #ruby
ptrrr has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jle` has quit [Ping timeout: 272 seconds]
Trynemjoel has quit [Quit: Trynemjoel]
beneggett has joined #ruby
omosoj has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
xenomorph is now known as {xenomorph}
<apeiros> starlord: he means because you claimed rb_rescue was not a C function
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<starlord> Oh.
<starlord> I mean I have a VALUE that I obtained via rb_block_lambda() or rb_block_proc();
omosoj has joined #ruby
<starlord> And I want to call that VALUE itself.
cndiv has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
britneywright has joined #ruby
benzrf is now known as benzrf|offline
altamic has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
altamic has quit [Changing host]
altamic has joined #ruby
davasaurous has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
<starlord> yay 4300 github stars even
Trynemjoel has joined #ruby
<starlord> my ocd is now happy
klmlfl_ has joined #ruby
pdoherty has quit [Quit: pdoherty]
<mferrier> you truly are the lord of stars
davasaurous has quit [Ping timeout: 260 seconds]
ta has joined #ruby
freerobby has quit [Quit: Leaving.]
Hobogrammer has joined #ruby
freerobby has joined #ruby
benzrf|offline is now known as benzrf
topolinux has quit [Quit: Sto andando via]
Aaaal has quit [Quit: Aaaal]
boombadaroomba has quit [Remote host closed the connection]
klmlfl_ has quit [Ping timeout: 258 seconds]
atmosx has joined #ruby
mikecmpbll has joined #ruby
<starlord> ha
<starlord> well played sir
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
xcv_ has joined #ruby
Xeago has joined #ruby
jeremy04 has quit [Ping timeout: 250 seconds]
mikeg has joined #ruby
ndrei has joined #ruby
paulfm has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
pdoherty has joined #ruby
paulfm has quit [Remote host closed the connection]
paulfm has joined #ruby
xcv has quit [Ping timeout: 245 seconds]
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
zerowaitstate has joined #ruby
toretore has joined #ruby
lewix has quit [Read error: Connection reset by peer]
dx7 has joined #ruby
thumpba_ has quit []
thumpba has joined #ruby
reset has joined #ruby
xcv_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
agjacome has quit [Quit: leaving]
pskosinski has joined #ruby
<patrick99e99> Hi everyone... Does anyone here know what the best way to set the current time zone for testing purposes in irb (or rails console) ?
SilkFox_ has quit [Ping timeout: 272 seconds]
yetanotherdave has joined #ruby
pushnell has quit [Quit: pushnell]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> Time.now.zone I guess?
<patrick99e99> I thought I could just do ENV['TZ'] = ... but, for some bogus reason, if I set it to ENV['TZ'] = 'EST", then I see the correct offset-- but if I do 'PDT', 'PST', 'CST', 'CDT' it all results in UTC and the timezone gets lost
<patrick99e99> Time.now.zone gives me my current time zone..
<jhass> or read a get there :P
<patrick99e99> I want to set it to something else so that I can see the correct offsets in the time.0
<patrick99e99> "or read a get there" ? what does that mean?
axl_ has joined #ruby
Trynemjoel has quit [Quit: Trynemjoel]
Cheezebox has joined #ruby
<jhass> it means I should stop typing. s/or/oh,/
MaciejCzyzewski has joined #ruby
mofai has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
jeremy04 has joined #ruby
<jhass> anyway, man timezone has a description of valid values for TZ
yakko has quit [Read error: Connection reset by peer]
gsd has joined #ruby
yakko has joined #ruby
<starlord> so uh yeah
<starlord> ill figure this out on my own
starlord has quit [Quit: Leaving...]
tessi_zz has quit [Ping timeout: 272 seconds]
<patrick99e99> timezones are so annoying.. so you can apparently do Time.zone = 0 -> 13... but none of those values are UTC, PST, they are things like "Casablanca", "Amsterdam", etc
russt_ has joined #ruby
musicmatze has quit [Ping timeout: 260 seconds]
angusigu1ss has joined #ruby
l3kn has quit [Ping timeout: 272 seconds]
<jhass> >> ENV['TZ'] = ':America/Los_Angeles'; Time.now.zone # patrick99e99
<eval-in_> jhass => "PDT" (https://eval.in/198658)
<jhass> see man timezone
yxhuvud has joined #ruby
asuka has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
l3kn has joined #ruby
rezzack has joined #ruby
seph429 has quit [Quit: ZNC - http://znc.in]
cirn0 has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nanoyak has joined #ruby
stef_204 is now known as stef204
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
thams has quit [Quit: thams]
ramfjord has joined #ruby
<Hanmac> ya tzdata is a funny construct that cant get any smaller ;P
jakolehm has joined #ruby
pdoherty has quit [Quit: pdoherty]
SilkFox_ has joined #ruby
angusigu1ss has quit [Ping timeout: 272 seconds]
boombadaroomba has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
doodlehaus has joined #ruby
stef204 is now known as stef_204
cirn0 has quit [Ping timeout: 272 seconds]
koell has quit [Ping timeout: 272 seconds]
osvico has quit [Ping timeout: 260 seconds]
pdoherty has joined #ruby
NameNotFound has quit [Quit: ZNC - http://znc.in]
speakingcode is now known as THATasshole
sassygrody has joined #ruby
rippa has joined #ruby
gauke has joined #ruby
Rollabunna has quit [Remote host closed the connection]
axsuul has quit [Read error: No route to host]
sassygrody has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has quit [Read error: Connection reset by peer]
tjr9898 has joined #ruby
yxhuvud has quit [Remote host closed the connection]
bizarrosandwich has joined #ruby
MaciejCzyzewski has joined #ruby
axsuul has joined #ruby
HelperW__ has joined #ruby
kireevco has quit [Quit: Leaving.]
gauke has quit [Ping timeout: 245 seconds]
rkalfane has joined #ruby
jbueza has joined #ruby
kirun has joined #ruby
eat_multi has quit [Quit: leaving]
JohnBat26 has joined #ruby
alem0lars has joined #ruby
l3kn has quit [Read error: Connection timed out]
cndiv has quit [Ping timeout: 272 seconds]
NameNotFound has joined #ruby
HelperW__ has quit [Read error: No route to host]
HelperW___ has joined #ruby
koell has joined #ruby
tessi_zz has joined #ruby
yfeldblum has joined #ruby
l3kn has joined #ruby
asuka has joined #ruby
Fractional has joined #ruby
govg has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
THATasshole is now known as speakingcode
gauke has joined #ruby
arup_r has joined #ruby
ursooperduper has quit [Quit: Textual IRC Client: www.textualapp.com]
HelperW___ has quit [Client Quit]
timgauthier is now known as timgauthier_isaw
gmas has joined #ruby
HelperW___ has joined #ruby
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 272 seconds]
<Fractional> Question regarding SRP. Lets say I have a class called 'Map'. I need to randomly build/generate this map. Should I divide this task into a MapBuilder class which gets called from the PersonalIdentifier constructor?
dumdedum has quit [Quit: foo]
<Hanmac> yes
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elaptics is now known as elaptics`away
kaspertidemann has joined #ruby
<Fractional> So for instance:
<Fractional> class Map; def initialize; @map = MapBuilder.build; end; end?
axsuul has quit [Read error: No route to host]
<Hanmac> hm yes and no ... imo Map should be indipent from MapBuilder because you might want to have a map that is not generated ...
<apeiros> IMO both are valid choices. if map building is complex, I'd probably opt for the builder.
musicmatze has joined #ruby
<apeiros> but also IMO you shouldn't put the builder into initialize
<Hanmac> imo MapBuilder.build {|b| ... } #=> new Map instance
<Fractional> So am I thinking right or am I on the wrong track?
abdulsattar has joined #ruby
<apeiros> Map.build(*args) --> Map::Builder.new(*args).to_map
carraroj has quit [Quit: Konversation terminated!]
dc__ has joined #ruby
<Fractional> Oh, that makes perfect sense. Thank you Apeiros! :)
HelperW___ has quit [Ping timeout: 260 seconds]
agjacome has joined #ruby
dotrb has joined #ruby
<dotrb> hey ruby hackers
<apeiros> hey random person
<dotrb> I'm new to programming and learning ruby as my first language
robustus has quit [Ping timeout: 250 seconds]
<dotrb> as much as I'm enjoying it, I can't yet decide on which text editor to go with
<dotrb> for ruby/general programming
<dotrb> html/css etc.
<dotrb> what do you guys use??
<waxjar> vim, emacs and sublime text are the popular ones
<apeiros> dotrb: ^
<Hanmac> dotrb: do you want an IDE or a simple editor?
<apeiros> waxjar beat me to it
* apeiros prefers sublime
zoo-zed has joined #ruby
<canton7> sublime text here
* waxjar too
dukz has quit [Remote host closed the connection]
<Fractional> sublime text here
<dotrb> Hanmac: what's the difference??
carraroj has joined #ruby
end_guy has quit [Remote host closed the connection]
<apeiros> dotrb: one is huge and offers lots of functionality but has usually a rather big learning curve, the other is focused, doesn't have that much functionality and can be used easily
tjr9898_ has joined #ruby
<Hanmac> dotrb: a simple editor like gedit does not have project features like a IDE ... and IDE like eclipse does have that ones like version control, TestSuits, build tasks ... etc
<dotrb> in which category does vim/emacs/sublime fall?
lolmaus has joined #ruby
FracV has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
<waxjar> they are text editors
<dotrb> all of them?
<waxjar> but they all offer plugins
kenneth has joined #ruby
<waxjar> yes
<dotrb> okay
<boombadaroomba> i use aptana studio 3
<boombadaroomba> because i am a noob
spyderman4g63 has joined #ruby
klmlfl_ has joined #ruby
EminenceHC has quit [Remote host closed the connection]
gmas has quit [Ping timeout: 245 seconds]
tjr9898 has quit [Ping timeout: 272 seconds]
* wmoxam uses Atom
robustus has joined #ruby
cndiv has joined #ruby
<canton7> is aptana still going? I used that years ago for php dev
govg has quit [Quit: leaving]
<dotrb> all right, looks like the popular opinion is inclining towards sublime text
<dotrb> i'll check it
<dotrb> thanks everyone
mferrier has quit []
dotrb has left #ruby [#ruby]
kate_r has joined #ruby
mferrier has joined #ruby
end_guy has joined #ruby
seamon has joined #ruby
duncannz has joined #ruby
seamon has quit [Client Quit]
<Fractional> apeiros, if I don't need the constructor to take any arguments for Builder.new (Map.build(*args) --> Map::Builder.new(*args).to_map). Would it be 'better' to write: Map::generate(*args)?
havenwood has joined #ruby
JBreit has joined #ruby
<Fractional> Or is it prefered going through an object?
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
kireevco has joined #ruby
<apeiros> Fractional: I don't follow
cocotton has joined #ruby
klmlfl_ has quit [Ping timeout: 250 seconds]
claymore has quit [Quit: Leaving]
spyderman4g63 has quit [Ping timeout: 260 seconds]
<Fractional> apeiros, nevermind. Sorry :P
JBreit has left #ruby [#ruby]
cocotton has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
pen has joined #ruby
vhyg has joined #ruby
jakolehm has quit [Remote host closed the connection]
diegoviola has quit [Read error: Connection reset by peer]
vhyg has quit [Client Quit]
finitoo has quit [K-Lined]
MaciejCzyzewski has joined #ruby
wjimenez_ has joined #ruby
LiohAu has quit [Quit: LiohAu]
Xeago has joined #ruby
<Fractional> apeiros, Map::Builder.new.build(width, height, water_percent). Does this look alright?
altamic has quit [Quit: altamic]
mityaz has joined #ruby
gmas has joined #ruby
gigetoo_ has joined #ruby
gigetoo has quit [Read error: No route to host]
Junior_ has joined #ruby
Xiti` has joined #ruby
foooobear___ has joined #ruby
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
gigetoo_ is now known as gigetoo
wjimenez5271 has quit [Ping timeout: 260 seconds]
treehug88 has quit [Ping timeout: 260 seconds]
<apeiros> Fractional: no. move the arguments to Builder.new
kamilc__ has quit [Quit: Leaving...]
<apeiros> if you have the arguments in build, why have a class at all?
<Fractional> apeiros, ok. Thank you for helping :)
pen has quit [Read error: Connection reset by peer]
<Junior_> hello! I need your help guys! I want to make a API for a backend for mij angular JS application. The application is a simple webshop. How would you do it?
pen has joined #ruby
jeremy04 has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<apeiros> Fractional: in that code, Builder is an ephemeral class. it'll vanish after building a single map. that's its purpose. having the arguments in new allows you to not pass those values around and instead use ivars.
foooobear__ has quit [Ping timeout: 245 seconds]
pen has quit [Read error: Connection reset by peer]
mofai has quit [Quit: Leaving...]
Avahey has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Xiti has quit [Ping timeout: 245 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
krisquigley has joined #ruby
<apeiros> I'm curious how many passwords I'm now actually remembering. I think it's >30 12 digit passwords.
<apeiros> (so wow, I have a memory of a whooping ~400 bytes :D)
<havenwood> junior_: What do you mean by API for a backend? Don't AngularJS folk typically use MongoDB or something about mongeese?
<Fractional> apeiros, would the Map class be Map::Map?
<apeiros> Fractional: I'd just have it as Map
iamjarvo has quit [Client Quit]
boombadaroomba has quit [Remote host closed the connection]
kayloos has joined #ruby
<apeiros> shevy: ^ example of class as a namespace ;-)
Xiti` has quit [Quit: Leaving]
<jhass> apeiros: did you account mapping to where they (might) be used? :P
HelperW___ has joined #ruby
<Fractional> apeiros: Is it possible to have a map class and a namespace (module) called map? I am getting some error here saying it doesn't identify Map as a module.
Xiti has joined #ruby
<apeiros> brb
<jhass> Fractional: a Class is a Module
<jhass> thus can be used as a namespace
<Junior_> havenwood: yes, but i want to use a 'normal' MySQL database and a ruby (on rails?) backend API. So the Angular app can get data with $http from de API
<Fractional> jhass, solved it by doing 'class Map; Class Builder; end; end'
aspires has joined #ruby
yxhuvud has joined #ruby
jhc76 has joined #ruby
<havenwood> junior_: Typically for APIs we use Rack. There are a number of Rack adapters, Rails included. Sinatra is another that's a popular option for APIs. There's also Grape, which does a bit more handholding.
boombadaroomba has joined #ruby
<havenwood> junior_: A very minimalist option that's pretty nice is Hobbit. Or lotus-router looks kinda more like a pure Rack option but with routing.
vpnncn has quit [Remote host closed the connection]
thagomizer has quit [Quit: Leaving.]
ki0 has joined #ruby
<havenwood> junior_: here're some benchmarks of popular and more obscure Rack adapters: https://github.com/luislavena/bench-micro#readme
HelperW___ has quit [Ping timeout: 260 seconds]
HelperW___ has joined #ruby
dohsan has quit [Remote host closed the connection]
<Morkel> I have a problem with the asset pipline. I have a external js lib in the vendor/assets/stylsheets dir. It requires 3 images with the path /images/img.png. I dont know how i must put this files
<Morkel> sorry wrong channel
<havenwood> junior_: The Sequel gem is quite nice for SQL, whether you want to use it ORM style or not: https://github.com/jeremyevans/sequel#readme
benzrf is now known as benzrf|offline
mikeg has quit [Remote host closed the connection]
HelperW____ has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti! | http://www.ido.li]
SilkFox_ has quit [Ping timeout: 260 seconds]
Stalkr_ has joined #ruby
jeremy04 has joined #ruby
skaflem has quit [Quit: Leaving]
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
last_staff has joined #ruby
treehug88 has joined #ruby
tjr9898_ has quit [Remote host closed the connection]
emmesswhy has quit [Quit: This computer has gone to sleep]
bluenemo has quit [Quit: Verlassend]
gmas has quit [Ping timeout: 240 seconds]
HelperW___ has quit [Ping timeout: 260 seconds]
<Junior_> havenwood: you're amazing! thanks mate!
abdulsattar has quit [Ping timeout: 240 seconds]
gregtarnoff has quit [Quit: gregtarnoff]
tjr9898_ has joined #ruby
gmas has joined #ruby
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
paulfm has quit []
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
foooobear___ has quit [Ping timeout: 245 seconds]
HelperW____ has quit [Ping timeout: 260 seconds]
spyderman4g63 has joined #ruby
govg has joined #ruby
buub has quit [Ping timeout: 246 seconds]
endash has quit [Quit: endash]
beneggett has joined #ruby
momomomomo has joined #ruby
tjr9898_ has quit [Ping timeout: 272 seconds]
benzrf|offline is now known as benzrf
momomomomo has quit [Client Quit]
buub has joined #ruby
sargas has joined #ruby
mocfive has quit [Remote host closed the connection]
lolmaus_ has joined #ruby
benlieb has joined #ruby
graydot has joined #ruby
binaryhat has quit [Quit: Leaving]
mocfive has joined #ruby
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
mocfive_ has joined #ruby
oleo is now known as Guest72904
oleo__ has joined #ruby
mocfive has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
lolmaus has quit [Ping timeout: 272 seconds]
cndiv is now known as cndiv_afk
Xeago_ has joined #ruby
alem0lars has quit [Ping timeout: 244 seconds]
aspires has quit [Read error: Connection reset by peer]
aspires_ has joined #ruby
thams has joined #ruby
aspires_ is now known as aspires
momomomomo has joined #ruby
Guest72904 has quit [Ping timeout: 260 seconds]
Xeago has quit [Ping timeout: 260 seconds]
yakko has quit [Read error: Connection reset by peer]
krisquigley has quit [Remote host closed the connection]
gmas has quit [Ping timeout: 246 seconds]
yakko has joined #ruby
buub has quit [Ping timeout: 272 seconds]
zeroNones has quit [Quit: Textual IRC Client: www.textualapp.com]
mocfive_ has quit [Remote host closed the connection]
mark_locklear has joined #ruby
skammer has joined #ruby
benzrf is now known as benzrf|offline
tjr9898 has joined #ruby
mocfive has joined #ruby
centrx has joined #ruby
thagomizer has joined #ruby
nanoyak has joined #ruby
duncannz has quit [Ping timeout: 272 seconds]
tjr9898 has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving.]
tjr9898 has joined #ruby
gmas has joined #ruby
aspires has quit []
nanoyak has quit [Client Quit]
mocfive_ has joined #ruby
mocfive has quit [Ping timeout: 272 seconds]
nanoyak has joined #ruby
treehug88 has quit []
atmosx has quit [Ping timeout: 272 seconds]
cndiv_afk has quit [Ping timeout: 272 seconds]
atmosx has joined #ruby
emmesswhy has joined #ruby
britneywright has left #ruby ["Textual IRC Client: www.textualapp.com"]
dangerousdave has joined #ruby
phutchins has quit [Ping timeout: 260 seconds]
tjr9898 has quit [Remote host closed the connection]
lolmaus_ has quit [Quit: Konversation terminated!]
wallerdev has quit [Quit: wallerdev]
sevvie has joined #ruby
decoponio has quit [Quit: Leaving...]
treehug88 has joined #ruby
douglasssssss has joined #ruby
mocfive_ has quit [Remote host closed the connection]
douglasssssss has quit [Max SendQ exceeded]
mocfive has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
<Fractional> foo = '12345'; foo.split('').map! {|char| char.to_i}
lolmaus has joined #ruby
<Fractional> Undefined method 'map' for '12345':String
<Fractional> Why is this happening even though we split the string?
gregtarnoff has joined #ruby
<centrx> >> foo = '12345'; foo.split('').map! {|char| char.to_i}
<eval-in_> centrx => [1, 2, 3, 4, 5] (https://eval.in/198714)
<centrx> works
Sawbones has joined #ruby
jeremy04 has quit [Remote host closed the connection]
<mary5030> i had a question real quick if anyone available to answer: how can i convert this hash to an array of [blocks]? {"accountNumber1" => [block1, block2, ...], ...}
<centrx> mary5030, hash['accountNumber1']
baltazore has quit [Remote host closed the connection]
<centrx> mary5030, hash.values.flatten ?
<mary5030> ah
iamjarvo has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ankhers has quit [Ping timeout: 264 seconds]
<Fractional> centrx, even works in my IRB now but when running with rspec the .split does not split the string.
baltazore has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
gauke has quit [Quit: gauke]
IceDragon has joined #ruby
SilkFox_ has joined #ruby
* apeiros back
<apeiros> jhass: errr, what? :)
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
thagomizer has quit [Quit: Leaving.]
klmlfl_ has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
cocotton has joined #ruby
yfeldblum has joined #ruby
<jhass> remembering passwords without where they belong is rather useless ;)
anarang has quit [Quit: Leaving]
thagomizer has joined #ruby
tesaf has joined #ruby
omosoj has quit [Ping timeout: 245 seconds]
<shevy> "trust the cloud"
<tobiasvl> shevy: was that to me? pass isn't a cloud service
cocotton_ has joined #ruby
<miah> ive just used keepass for >10 years
W0rmDr1nk has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
himsin has quit [Quit: himsin]
<canton7> keepass is amazing
<miah> and there is http://kpcli.sourceforge.net/ if you want cli
<miah> sync? just syncthing and enjoy
klmlfl_ has quit [Ping timeout: 244 seconds]
cocotton has quit [Ping timeout: 244 seconds]
buub has joined #ruby
WormDr1nk has quit [Ping timeout: 272 seconds]
cocotton_ has quit [Ping timeout: 244 seconds]
wallerdev has joined #ruby
<apeiros> jhass: aah, that was with regards to passwords
<apeiros> jhass: my pw memory is contextual. I start to remember them when I need them :)
wallerdev has quit [Remote host closed the connection]
<apeiros> some is even partially muscle memory
<jhass> so there's associative data ;)
<jhass> it's more than just the pw's
<apeiros> somehow somewhere, yupp :D
<banister> jhass is german your native language?
yekta has joined #ruby
<apeiros> and in the worst case, I have my keychain
<jhass> banister: yep
<banister> jhass nice, same for apeiros
<apeiros> nope
<banister> apeiros really?
<apeiros> my mother tongue is swiss german, a quite distinct dialect ;-)
<shevy> tobiasvl no not to you, just in general
<shevy> don't say you don't trust amazon
<shevy> they bring you BOOKS all the time
milkohol has joined #ruby
tjr9898 has joined #ruby
ptrrr has quit [Quit: ptrrr]
<shevy> I solved the problem of passwords by having just one password
Xeago_ has quit [Remote host closed the connection]
ptrrr has joined #ruby
Xeago has joined #ruby
wallerdev has joined #ruby
KC9YDN has joined #ruby
<momomomomo> simple to do your own encryption to generate arbitrary length pw
<momomomomo> take a sentence like that, choose some random algorithm, and bam
<momomomomo> ie: take the every other letter, and for every prime n digit, insert a special char of your choosing
<momomomomo> sm*l ^
Tricon has quit [Quit: Leaving...]
bMalum has quit [Ping timeout: 246 seconds]
<apeiros> for new stuff I prefer to just use the sentences
<momomomomo> obviously failed ont he prime there
<apeiros> that way I don't need to visit the pw manager in like 90% of all cases
bMalum has joined #ruby
<momomomomo> aye
yacks has quit [Remote host closed the connection]
<apeiros> my biggest issue is forgetting obsolete pws :-(
<apeiros> it's even worse with pin codes
<momomomomo> lol apeiros that’s everyone’s issue
<momomomomo> I haven’t used the ATM in 2 months, since they sent me 4 letters with different pass codes, and I don’t know which one is the correct one
<momomomomo> plus, stops me from spending cash
<apeiros> like, when your whole body is ready to f'ing type that pin and on the 5th digit you notice it's the last one… 1 year after it got deprecated :-S
<momomomomo> ~_~
<shevy> I'd wish there was a ruby with automagic variables defined
<apeiros> momomomomo: just try them?
<shevy> without having to = them
<momomomomo> apeiros: 3 and you’re locked
<apeiros> I mean you have 3 tries free :D
ghostmoth has quit [Quit: ghostmoth]
osvico has joined #ruby
<momomomomo> I could just walk to the bank
<momomomomo> meh
<shevy> apeiros you use whole sentences as password?
<apeiros> oh you received 4 different codes?
<momomomomo> aye
<atmosx> apeiros: what's your arduino project about?
<apeiros> well, what are the chances… :D
MCDev has joined #ruby
<momomomomo> 4 choose 3
<momomomomo> or wait
<momomomomo> eh don’t feel like doing the probability
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
tjr9898 has quit [Read error: Connection reset by peer]
tjr9898_ has joined #ruby
<shevy> lazy man
michaeldeol has joined #ruby
<momomomomo> good engineer
kireevco has quit [Quit: Leaving.]
HelperW____ has joined #ruby
mark_locklear has quit [Ping timeout: 272 seconds]
Junior_ has quit [Quit: Page closed]
* apeiros bought a couple of domains…
<apeiros> lets see whether I do something with them :)
<apeiros> (it's ruby related)
dx7_ has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<momomomomo> my last domain purchase was kwux.com
francisfish has quit []
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<momomomomo> too dope to pass up
almostworking has joined #ruby
threesixes has joined #ruby
ht__th has quit [Read error: Connection reset by peer]
jxs_ has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
<shevy> I don't know what is kwux
<momomomomo> quux
kireevco has joined #ruby
<shevy> but it rhymes with sux?
kireevco has quit [Max SendQ exceeded]
<momomomomo> foo bar baaz quux
<shevy> oh
<shevy> I never reach the fourth place there
<shevy> actually, I use bla as the third one
<shevy> foo bar bla bas
<shevy> nah, bas was made up
<momomomomo> the more you know ** do doo do **
kireevco has joined #ruby
Cheezebox has quit []
<shevy> do be dobe do
alvaro_o has joined #ruby
Soda has joined #ruby
e^ipi has left #ruby [#ruby]
dx7 has quit [Ping timeout: 244 seconds]
HelperW_____ has joined #ruby
yakko has quit [Read error: Connection reset by peer]
fsapo has quit [Remote host closed the connection]
HelperW____ has quit [Ping timeout: 260 seconds]
ki0 has quit [Remote host closed the connection]
Pupeno has joined #ruby
niklasb_ has quit [Ping timeout: 272 seconds]
jheg has joined #ruby
<shevy> yeah
<shevy> MIT elitism
<shevy> down with them!
eivindml has joined #ruby
kireevco has quit [Client Quit]
yakko has joined #ruby
<shevy> lol
<shevy> foo bar grunt
<momomomomo> interesting centrx
<shevy> it misses swiss wording
<shevy> France got the titties at least
<shevy> I don't know what means the finish one
turtlesoup has joined #ruby
* momomomomo wonders why more women don’t chat here
almostworking has left #ruby ["Leaving"]
axsuul has joined #ruby
stunder has joined #ruby
HelperW_____ has quit [Ping timeout: 260 seconds]
skammer has quit [Read error: Connection reset by peer]
chrishough has joined #ruby
<wasamasa> they have better things to do I bet
skammer has joined #ruby
tkuchiki has joined #ruby
<havenwood> `ruby-install jruby 1.7.16` time!
choke has joined #ruby
boombadaroomba has quit [Remote host closed the connection]
Trynemjoel2 has joined #ruby
timonv_ has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 250 seconds]
<havenwood> or i guess is should say `ruby-install jruby` with head or `ruby-install jruby 1.7.16 --md5 92cb058d1a896257b5ac1c26dc433506` with any version ;)
speakingcode has quit [Ping timeout: 260 seconds]
lmickh has quit [Remote host closed the connection]
cirn0 has joined #ruby
* havenwood eagerly wonders when jruby-9000 will land
Trynemjoel2 is now known as Trynemjoel
ramfjord has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Ping timeout: 258 seconds]
jds has quit [Quit: Connection closed for inactivity]
chrishough has quit [Read error: Connection reset by peer]
chrishough has joined #ruby
ramfjord has joined #ruby
benzrf|offline is now known as benzrf
ppinto has quit [Quit: ppinto]
cirn0 has quit [Ping timeout: 245 seconds]
ghostmoth has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
mocfive has quit [Remote host closed the connection]
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pdoherty has quit [Quit: pdoherty]
mocfive has joined #ruby
yekta has quit [Quit: yekta]
niklasb_ has joined #ruby
Rollabunna has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
paulfm has joined #ruby
emmesswhy has joined #ruby
emmesswhy has quit [Client Quit]
paulfm has quit [Client Quit]
qmfnp has quit [Quit: Textual IRC Client: www.textualapp.com]
turtlesoup has quit [Ping timeout: 246 seconds]
nickjj has quit [Quit: WeeChat 1.0]
shinobi_one has joined #ruby
pdoherty has joined #ruby
codecop has quit [Remote host closed the connection]
mocfive_ has joined #ruby
emiemia has quit []
tjr9898_ has quit [Remote host closed the connection]
tjr9898 has joined #ruby
mocfive has quit [Ping timeout: 244 seconds]
thumpba has quit []
narcan has joined #ruby
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
Tricon has joined #ruby
Rollabunna has quit [Ping timeout: 260 seconds]
tjr9898 has quit [Remote host closed the connection]
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
spyderman4g63 has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
thumpba has joined #ruby
thumpba has quit [Remote host closed the connection]
jcdesimp has quit [Ping timeout: 246 seconds]
wjimenez_ has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
mikecmpbll has joined #ruby
SilkFox_ has quit [Ping timeout: 260 seconds]
TorpedoSkyline has joined #ruby
tjr9898 has joined #ruby
pu22l3r has quit [Ping timeout: 244 seconds]
Takle has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
IceDragon has quit [Ping timeout: 272 seconds]
IceDragon has joined #ruby
krisquigley has joined #ruby
mpistone has joined #ruby
boombadaroomba has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
omosoj has joined #ruby
danijoo has joined #ruby
timonv_ has joined #ruby
n_blownapart has joined #ruby
thumpba has joined #ruby
cndiv_afk has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
cndiv_afk has quit [Client Quit]
cndiv has joined #ruby
tesaf has quit [Quit: Lost terminal]
nickjj has joined #ruby
TeresaP has joined #ruby
Fractional has quit [Read error: Connection reset by peer]
davasaurous has joined #ruby
yalue has quit [Quit: Leaving]
shock_one has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
aspires has joined #ruby
klmlfl_ has joined #ruby
kate_r has joined #ruby
<shock_one> Hi. Is there a special context or something for define_method ? When I call the defined function (line 3), it works correctly, but when I call what this function executes (5), it behaves differently. https://gist.github.com/shockone/6dad216cede4e02313c4
<momomomomo> shock_one: you must eval
revoohc has quit [Quit: revoohc]
nanoyak has joined #ruby
<shock_one> Is it a joke?
carraroj has quit [Quit: Konversation terminated!]
Xeago has quit [Remote host closed the connection]
sinkensabe has joined #ruby
<momomomomo> no.
ptrrr has quit [Quit: ptrrr]
skrite has quit [Quit: WeeChat 0.4.2]
davasaurous has quit [Ping timeout: 244 seconds]
TeresaP has quit [Ping timeout: 250 seconds]
yakko has quit []
klmlfl_ has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baltazore has quit [Remote host closed the connection]
ELLIOTTCABLE is now known as uncomprehensibly
cndiv has quit [Ping timeout: 245 seconds]
apeiros has quit [Read error: Connection reset by peer]
maestrojed has joined #ruby
tjr9898 has quit [Remote host closed the connection]
baltazore has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
livingstn has quit []
n_blownapart has quit [Remote host closed the connection]
Beoran has quit [Ping timeout: 250 seconds]
cpruitt has joined #ruby
kaspergrubbe_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
GGMethos has quit [Ping timeout: 272 seconds]
baltazore has quit [Ping timeout: 245 seconds]
acl_ has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
shock_one_ has joined #ruby
pushnell has joined #ruby
benlieb has joined #ruby
HelperW_____ has joined #ruby
slester has quit [Quit: slester]
GGMethos has joined #ruby
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zrl has joined #ruby
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
<zrl> Is there any easy way to loop with an iteration every x increment of time?
<zrl> Ideally something like 5.minutes { puts "Hi!" }
shock_one has quit [Ping timeout: 250 seconds]
<zrl> And have that run every 5 minutes.
<zrl> Don't want a cronjob.
<Mia> Hello channel
benlieb has quit [Read error: Connection reset by peer]
aspires has quit []
<Mia> I'm a complete beginner to programming, I want to be able to build my web apps - I wantedto ask about a few ideas btw. ruby and node
<Mia> which one you would prefer, why, is it beginner friendly, and so on
<Mia> Google ofcourse helps with this but interactive feedback is always better :)
tjr9898 has joined #ruby
HelperW_____ has quit [Ping timeout: 250 seconds]
MaciejCzyzewski has joined #ruby
HelperW_____ has joined #ruby
ki0 has joined #ruby
codeurge has quit [Quit: Sleep.]
<banister> Mia ask a python programmer
<Mia> banister, hm interesting idea, why
eivindml has quit [Quit: Textual IRC Client: www.textualapp.com]
Soda has quit [Remote host closed the connection]
<banister> Mia because it's silly to ask a ruby or node programmer when those are the two you're evaluating
<banister> obvs a ruby programmer will recommend ruby and vice versa
<boombadaroomba> banister: go get an unbiased opinion bruh
Beoran has joined #ruby
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
aspires has joined #ruby
<Mia> banister, well even that is a reply to me, I'm also asking the same in node channel
<Mia> biased opinions are good too
HelperW_____ has quit [Ping timeout: 260 seconds]
m_3_ has quit [Remote host closed the connection]
klmlfl_ has joined #ruby
<boombadaroomba> i dunno, node and ruby are not exclusive though
ki0 has quit [Ping timeout: 258 seconds]
DarthGandalf has quit [Ping timeout: 260 seconds]
c107 has joined #ruby
seanosaur has quit [Remote host closed the connection]
kaspertidemann has quit []
Inhaling_ has joined #ruby
awc737 has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
hiyosi_ has quit [Ping timeout: 250 seconds]
<shevy> cool
<shevy> now we have miah and Mia
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DarthGandalf has joined #ruby
dc__ has quit [Remote host closed the connection]
chrishou_ has joined #ruby
jerius has quit []
<Mia> shevy :)
<shevy> Mia I guess if you can get away with javascript only and don't want to learn anything else than you could well stick to the javascript-node universe
klmlfl has quit [Ping timeout: 272 seconds]
<soahccc> Is raquo (») in the ascii table?
<jhass> soahccc: man ascii
<Mia> shevy, is it really that bad O_O
klmlfl_ has quit [Ping timeout: 260 seconds]
chrishough has quit [Ping timeout: 244 seconds]
<Mia> "get away" part specially :)
shock_one_ has quit [Quit: Computer has gone to sleep.]
<shevy> well you wrote build web apps
sinkensabe has quit [Remote host closed the connection]
<shevy> so you have a very limited use case
pushnell has quit [Ping timeout: 272 seconds]
Juanchito has quit [Quit: Connection closed for inactivity]
InhalingPixels has quit [Ping timeout: 272 seconds]
<shevy> even when you use rails you may often end up having to write or use javascript code
<fennec> Mia -- I wouldn't start by learning Node. It's... hmm.
aspires has quit []
narcan has joined #ruby
<Mia> fennec, hmm
<fennec> it's a very neat idea with a variety of pitfalls and its style is not necessarily intuitive for beginners.
doodlehaus has quit [Remote host closed the connection]
<Mia> fennec, I see
<centrx> aka callback hell
<jhass> am I the only one who finds it silly to compare a programming language to a framework?
<wasamasa> yes
Tricon has quit [Quit: Leaving...]
<jhass> ok, just wanted to check back
<soahccc> jhass: that is interesting... I have a string here "mo»ep".encoding == "ASCII-8BIT"
<shevy> javascript sucks
<fennec> it's a little silly but it has reasons.
Aaaal has joined #ruby
gmas has quit [Quit: WeeChat 0.4.3]
<Mia> jhass, excuse my lack of information. I'm a designer, I might be asking things that's not comparable
CaptainJet has joined #ruby
<Mia> Just using my googlefied mind right now
<Mia> if it makes sense
<jhass> soahccc: ascii-8bit == binary
<jhass> soahccc: not ascii
sailias has quit [Ping timeout: 245 seconds]
pushnell has joined #ruby
<fennec> there's a capable language buried under the warts of JavaScript :)
<shevy> yeah
<shevy> ruby
<jhass> Mia: no worries, I was more wondering why I'm the first to point out ;)
<fennec> no that's some place different
<shevy> in moments like this, I always remember the wat-video about javascript
kayloos has quit []
<shevy> Mia what about jquery by the way
<wasamasa> about javascript and ruby you mean
<soahccc> jhass: should I then be able to encode this symbol to ascii-8bit?
<shevy> ruby does not have many wat's
<wasamasa> hahaha
<wasamasa> it does
<shevy> wat
<shevy> like wat
<jhass> soahccc: ascii-8bit says "this is an array of bytes"
<wasamasa> it's right there, in the first demonstration of the wat-talk
kristoff_ has joined #ruby
<Mia> fennec, then let me ask you ---- I want to build a "dice" twitter bot that mentions back with the result -- So that -as an example- if someone mentions the bot and says D20, they will be mentioned back with ra random int from 20 ---------- how hard it is for a complete beginner to build someing like that in both options (ruby vs node)
<wasamasa> missing_method
milkohol has joined #ruby
<jhass> soahccc: it's not really an encoding
<shevy> man, missing_method is like eval
last_staff has quit [Read error: No route to host]
<wasamasa> I find it pretty mind-boggling people actually use it
<Mia> shevy, what about it?
<soahccc> jhass: well I can do "asd".encode("ascii-8bit")
<soahccc> but not with raquo
<wasamasa> I find it even more mind-boggling people use instance_eval
<shevy> Mia I used it about 3 days ago! just for drag and drop effects
kristoff_ has quit [Read error: Connection reset by peer]
kristoff_ has joined #ruby
<fennec> Mia- assuming you have a framework for each, i'd favor Ruby, slightly. probably fewer pitfalls.
<shevy> I felt really proud of myself - rather than writing javascript code, I simply did let ruby generate the javascript code in question. that makes me much happier than touch the taint that is javascript directly
<Mia> shevy, I can learn fornt end stuff right now I'm not too worried abotu it as css3 helps me more than enough for most of the stuff
<soahccc> jhass: apparently this isn't the problem even as it works on *nix but on windows it's broken but the "encoding" is the same
<jhass> soahccc: yes, because it's implemented as ascii-compatible encoding
postmodern has joined #ruby
CaptainJet has quit [Client Quit]
<fennec> speaking of node and irc bots, I was just doing some work on an irc bot framework for node in my spare time
<Mia> fennec, that's nice
<fennec> like, a proper bot framework with all the extras, not just the "here is an irc client class that you can use for things"
<jhass> soahccc: let's skip to your real issue: why do you get a (presumably) utf-8 string as ascii-8bit. How do you read it?
<Mia> I would love to dive into that really
timonv_ has quit [Remote host closed the connection]
kristofferR has quit [Ping timeout: 260 seconds]
timonv_ has joined #ruby
<soahccc> jhass: I read it from pastebin.com but the problem is I think when I pass a string from there to a process I'm controlling. On OS X it works and on Windows it works as well. It shows the correct character but it has a weird thing infront of ti
<jhass> soahccc: how exactly
russt_ has quit [Quit: russt_]
carif has joined #ruby
<fennec> the nice thing about node is that everything that's anything is all async. that helps you shuffle bits around for one connection without making latency happen in another. but simple low-traffic irc bots don't actually need that, and understanding your program logic enough to orchestrate callbacks in a way that doesn't melt your brain is a challenge even if you're experienced with programming elsewhere. :)
timonv^ has joined #ruby
Guest95323 has quit [Ping timeout: 245 seconds]
carif has quit [Remote host closed the connection]
kil0byte has quit [Remote host closed the connection]
carif has joined #ruby
skammer has quit [Ping timeout: 240 seconds]
<Mia> fennec, im
<Mia> check it
awc737_ has joined #ruby
TorpedoSkyline has joined #ruby
ixti has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cya]
timonv_ has quit [Ping timeout: 260 seconds]
enebo has quit [Quit: enebo]
<soahccc> jhass: http://imgur.com/ryloROm (I'm doing a minecraft server wrapper)
awc737 has quit [Ping timeout: 258 seconds]
<soahccc> jhass: but this only on windows with the same script
Morkel has quit [Quit: Morkel]
timonv^ has quit [Ping timeout: 260 seconds]
kaspertidemann has joined #ruby
<jhass> I still don't see how you get the data into your script
dx7_ has quit [Remote host closed the connection]
<jhass> open-uri, net/http, what?
<jhass> and what call exactly?
Inhaling_ has quit [Remote host closed the connection]
dx7 has joined #ruby
jle` has joined #ruby
InhalingPixels has joined #ruby
mikeg has joined #ruby
mferrier has quit [Remote host closed the connection]
<soahccc> jhass: hang on I gather it together (curiously it's the same on both systems)
tkuchiki has joined #ruby
mferrier has joined #ruby
tectonic has joined #ruby
tectonic has quit [Max SendQ exceeded]
m_3 has joined #ruby
<soahccc> jhass: This is the point where I do the http call => https://github.com/2called-chaos/mcl/blob/master/vendor/handlers/_buildin/__eval.rb#L38
<soahccc> but the problem occurs when invoke the command I guess
ItSANgo has quit [Quit: Leaving...]
dx7 has quit [Ping timeout: 244 seconds]
<bahar> hello.... how do i select records that have a certain characteristic... for example i have many users.... i want to select only those from washington state ?
Takle has quit [Remote host closed the connection]
beneggett has joined #ruby
kirun has quit [Quit: Client exiting]
beneggett has quit [Client Quit]
maniacal_ has joined #ruby
<soahccc> jhass: I'm debugging the problem this way but I get it even when directly using code and sending something to the process
chrishou_ has quit [Quit: Textual IRC Client: www.textualapp.com]
mferrier has quit [Ping timeout: 240 seconds]
chrishough has joined #ruby
cornfeedhobo has left #ruby ["when i leave, come together like butt cheeks"]
<jhass> soahccc: the Content-Type is set to utf8, so maybe net/http on windows fails to parse that correctly or so. I'd try .force_encoding('UTF-8')
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
j_mcnally has joined #ruby
<jhass> soahccc: on a side node rescuing Exception is considered bad practice, you should rescue the exceptions you expect to happen
hiyosi_ has joined #ruby
<jhass> and at most rescue StandardError (which is the default if you specify no class)
mikeg has quit [Ping timeout: 272 seconds]
zeroNones has joined #ruby
<jhass> rescuing Exception will prevent a SystemExit if stuck in that method for example
Tricon has joined #ruby
Takle has joined #ruby
<soahccc> jhass: it's failsafe to not let a "chat command" break the main loop in this case and tell it to the user...
<soahccc> the whole thing is evil as in eval :D
<jhass> None of that code will raise anything above StandardError, really
<soahccc> jhass: but yeah for the http block you're right
bMalum has quit [Quit: bMalum]
<jhass> not different in the later case
zeroNones has quit [Client Quit]
zeroNones has joined #ruby
ixti has joined #ruby
MaciejCzyzewski has joined #ruby
Kricir has joined #ruby
<soahccc> jhass: I tried to directly send data to the process with force_encoding utf-8 and windows-1252 still this weird A is appearing. But if the encoding is wrong the raquo wouldn't be there right? I think this is a windows issue or the way I opened the process maybe. With File.read I needed the (b)inary flag for everything.
hiyosi_ has quit [Ping timeout: 260 seconds]
Aaaal has quit [Read error: Connection reset by peer]
awc737_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aaaal has joined #ruby
Takle has quit [Remote host closed the connection]
adac has quit [Ping timeout: 260 seconds]
<jhass> you mean you have additional bytes on windows? I doubt that but compare .bytes
Pumukel has joined #ruby
maniacal_ has quit [Read error: Connection reset by peer]
klmlfl has joined #ruby
<jhass> if you really have I'd blame gzip or something and play with different Accept-Encoding headers
awc737 has joined #ruby
<soahccc> I know a similar thing from OS X where there is UTF-8 with wide character format or some sort of shit.
<jhass> maybe your IPC is messing up, so take to properly pass encoding there too
<jhass> *take care
<soahccc> jhass: it's not remote anymore, I directly do @process_stdin.write so no headers or anything conflicitng
sinkensabe has joined #ruby
<soahccc> jhass: there I start and send data to the process: https://github.com/2called-chaos/mcl/blob/master/lib/mcl/server/ipc.rb#L81-L89
<jhass> IO's may do encoding conversions which can mess stuff out of either end is opened with the wrong encoding or gets passed a string with the wrong encoding declaration
CorySimmons has joined #ruby
northfurr has joined #ruby
teddyp1cker has joined #ruby
havenwood has joined #ruby
jay_ has joined #ruby
klmlfl has quit [Ping timeout: 244 seconds]
<soahccc> jhass: apparently this is what is getting logged (you remember the ingame notation from the screen right?) »
jay_ is now known as rubyonrailed
<jhass> that can mean anything depending on the encoding
<soahccc> I couldn't find a way to define any sort of encoding for popen so I have no idea how to fix that
<jhass> look at the .bytes
<soahccc> okay
<jhass> I guess they get Encoding.default_external unless you turn on binmode
axsuul has joined #ruby
marr has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
stunder has quit [Quit: Screw you guys I'm going home]
<jhass> I'd try to define that string inline as close to the output method as possible and check if it's transmitted directly
<jhass> if it is check its encoding and .bytes
thams has quit [Quit: thams]
<jhass> then from either side, the output method and the http call, check encoding and .bytes and see where it changes/goes wrong
bMalum has joined #ruby
<jhass> I do not work with ruby on windows, so that's about the advice I can give you here
banister has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
teddyp1cker has quit [Ping timeout: 272 seconds]
osvico has quit [Ping timeout: 272 seconds]
timonv_ has joined #ruby
banister has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
<soahccc> jhass: at the point where I send the data the bytes are exactly the same so there is an issue while writing to the process' stdin. I tried to make this script windows compatible (and for the most part is now) but I can tell you: It was a big pain
bruno- is now known as Guest49778
IceDragon has joined #ruby
phutchins has joined #ruby
cndiv has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
axsuul has quit [Ping timeout: 250 seconds]
nanoyak has joined #ruby
devyn has quit [Remote host closed the connection]
iamjarvo has joined #ruby
Takle has joined #ruby
<jhass> soahccc: did you try to .encode(Encoding.default_external) ?
jobewan has quit [Quit: Leaving]
shackleford has quit [Remote host closed the connection]
devyn has joined #ruby
HelperW_____ has joined #ruby
wjimenez_ has joined #ruby
wjimenez_ has quit [Read error: Connection reset by peer]
maestrojed has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
<soahccc> well it's utf-8 so yeah I tried this with force_encoding before
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest49778 has quit [Ping timeout: 260 seconds]
wjimenez_ has joined #ruby
ki0 has joined #ruby
treehug88 has quit []
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> well, we know the data is in utf-8
Veidit_ has joined #ruby
<jhass> so .force_encoding('utf-8').encode(encoding_the_other_end_expects)
<jhass> .force_encoding simply changes the tag, .encode converts
Veidit has quit [Ping timeout: 260 seconds]
axsuul has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
krisp1 has joined #ruby
<soahccc> maybe I should write a script which is at the other end to see what's actually coming in
wjimenez5271 has quit [Ping timeout: 272 seconds]
MaciejCzyzewski has joined #ruby
maestrojed has joined #ruby
timonv_ has quit [Ping timeout: 272 seconds]
cpruitt has quit [Quit: cpruitt]
<soahccc> if just pry wouldn't suck so bad in the windows CMD :D
ursooperduper has joined #ruby
aZtec_ has joined #ruby
HelperW_____ has quit [Ping timeout: 240 seconds]
<aZtec_> hi all..i can't get to install Nokogiri on OSX 10.9.5
m8 has quit [Quit: Sto andando via]
HelperW_____ has joined #ruby
<soahccc> aZtec_: what's the error? I have it running on 10.9.4
nfk has quit [Quit: yawn]
skammer has joined #ruby
<aZtec_> soahccc it's the libiconv libraries that are giving me headache
<aZtec_> i managed to install nokogiri (installer passed without errors), but rake throws an exception
<soahccc> what does it say
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arturhoo has quit [Quit: arturhoo]
antlong has quit [Quit: Textual IRC Client: www.textualapp.com]
awc737 has joined #ruby
kaspergrubbe_ has quit [Remote host closed the connection]
msmith_ has quit [Read error: Connection reset by peer]
<aZtec_> soahccc i'm literally at the stage where I feel like I have tried every single possible combination of installing this sh** (please excuse)
axl_ has left #ruby [#ruby]
msmith_ has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zerowaitstate has quit [Quit: leaving]
HelperW_____ has quit [Ping timeout: 260 seconds]
CorySimmons has quit [Quit: Bye!]
bMalum has quit [Quit: bMalum]
dorei has quit [Ping timeout: 258 seconds]
msmith_ has quit [Remote host closed the connection]
blackmes1 has joined #ruby
icebourg has quit []
phoo1234567 has quit [Quit: Leaving]
thams has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tectonic has joined #ruby
yfeldblu_ has joined #ruby
jheg has quit [Quit: jheg]
<shevy> you could use linux :>
axl_ has joined #ruby
axl_ has left #ruby [#ruby]
ppinto has joined #ruby
<shevy> jhass did you just try to fix an encoding problem :P
<aZtec_> shevy unf. i couldn't
<jhass> shevy: which wouldn't happen if everything would just be utf-8!
<shevy> rake is pretty annoying
<shevy> gem works significantly better than rake does here for me
yfeldblum has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 244 seconds]
geggam has quit [Ping timeout: 250 seconds]
rubyonrailed has quit [Remote host closed the connection]
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmes1 has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
<shevy> aZtec_ is there a specific error that rake reports?
<shevy> though in general, it always reported lots of crap to me, in particular missing dependencies
<shevy> I don't know why there is this dichotomy between rake and gem
osvico has joined #ruby
<aZtec_> i don't know why there is dependency hell
<aZtec_> well ofc i do but it rids my of my last nerve
TeresaP has joined #ruby
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> with "gem" itself there rarely is
<shevy> also, if it is pure ruby stuff in gems, you can just install the .gem file in question
<shevy> Parsing documentation for nokogiri-1.5.5
<shevy> Installing ri documentation for nokogiri-1.5.5
<shevy> Done installing documentation for nokogiri after 3 seconds
<shevy> there
<shevy> hmm let's see if that is the latest...
<shevy> /Depot/jj/nokogiri-1.5.5/rake
<shevy> rake aborted!
<shevy> Unable to activate hoe-2.13.0, because rake-10.1.1 conflicts with rake (~> 0.8)
<shevy> yeah
ghostmoth has quit [Quit: ghostmoth]
havenwood has quit [Remote host closed the connection]
<shevy> rake is a piece of shit
<shevy> wtf is this "rake-10.1.1 conflicts with rake (~> 0.8)" why would I want to care with older rake versions
ItSANgo has joined #ruby
<boombadaroomba> I <3 rake
havenwood has joined #ruby
blackmes1 has joined #ruby
<shevy> it refuses to go on there
<shevy> good that gem install nokogiri works
bmurt has joined #ruby
<shevy> aZtec_
<shevy> cd /Depot/jj/nokogiri-1.5.5/ext/nokogiri/
<shevy> I can outsmart rake
<shevy> ruby extconf.rb
<shevy> checking for xmlSchemaSetValidStructuredErrors()... yes
<shevy> checking for xmlSchemaSetParserStructuredErrors()... yes
<shevy> creating Makefile
<shevy> and now "make" works \o/
<shevy> take that rake
<shevy> linking shared-object nokogiri/nokogiri.so
<fennec> that was 4 lines, should have been a gist ;)
<aZtec_> hm i'll give that a try next
ghostmoth has joined #ruby
andrewlio has quit [Remote host closed the connection]
krisquigley has joined #ruby
larissa has joined #ruby
<shevy> hey those were 3 lines and then 2 lines
angusiguess has joined #ruby
<shevy> aZtec_ if you are in the ext/ subdirectory and manually run extconf.rb, you will get the specific error message
pdoherty has quit [Quit: pdoherty]
<shevy> it's what I do even on linux, because as you can see above, rake stinks (I did not even need hoe at all, so why does it bother me with it)
<benzrf> shevy..
chrishough has quit [Read error: Connection reset by peer]
<benzrf> .
<benzrf> I’d just like to interject for a moment. What you’re refering to as Linux, is in fact, GNU/LInux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
<benzrf> Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called “Linux”, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.
<benzrf> There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine’s resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself;
<benzrf> it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called “Linux” distributions are really distributions of GNU/Linux.
sinkensabe has quit [Remote host closed the connection]
<shevy> wow
gregf has quit [Quit: WeeChat 1.0]
<shevy> fennec how many lines were that?
<shevy> benzrf I run quite a lot of non GNU stuff too
<hendricius> ruby question - why does my object not respond to send, despite an attr_accessor being there? https://gist.github.com/6b29c6374ca0dcda75a4
<hendricius> so doing object.send(:name) -> argument error
<shevy> is that rails
<shevy> by the way, .send is usually special
rkalfane has joined #ruby
<shevy> >> "abc".send :size
<eval-in_> shevy => 3 (https://eval.in/198736)
<fennec> shevy- benzrf doen't nead a gist, he just needs to /nick rms
* fennec teases
<hendricius> shevy: yep
rubyonrailed has joined #ruby
lolmaus has joined #ruby
shackleford has joined #ruby
shock_one_ has joined #ruby
<boombadaroomba> asked in rubyonrails. anyone recommend any good reading for javascript with embedded ruby?
<aZtec_> wow i got it to work
willgo has joined #ruby
<aZtec_> uninstalled all port and brew traces of libxml2, libxslt and finally libiconv and then reinstalled
<aZtec_> it seems to work now
momomomomo has joined #ruby
agjacome has quit [Quit: leaving]
jonr22 has joined #ruby
lolmaus has quit [Client Quit]
osvico has quit []
snath has quit [Ping timeout: 246 seconds]
icarus has quit [Remote host closed the connection]
<shevy> \o/
<shevy> aZtec_ IS THE MAN!
<shevy> it worked when you were ANGRY
<zrl> What's an easy way to get a block of code to run at a set interval? I'd like to the syntax to be something like 1.minutes { puts "Hello, world!" }
shackleford has quit [Remote host closed the connection]
lolmaus has joined #ruby
<shevy> <aZtec_> i don't know why there is dependency hell
<shevy> <aZtec_> well ofc i do but it rids my of my last nerve
<shevy> <aZtec_> soahccc i'm literally at the stage where I feel like I have tried every single possible combination of installing this sh** (please excuse)
<shevy> angriness works
<aZtec_> holy molly i thought i'd never see this day in my life
<shevy> zrl one way would be via Thread.new
<shevy> aZtec_ AND you are still on OSX
<omosoj> is there a time method to return the day (Thursday), like Time.now.day or something
<fennec> zrl- well the outside-of-Ruby way is called cron
<zrl> right
<havenwood> boombadaroomba: embedded Ruby in Javascript?
<havenwood> boombadaroomba: like mruby?
<aZtec_> zrl, standard way to do recurring tasks in unix environments is with cron
<fennec> zrl- other questions include whether you have guarantees the work will take less time than the time scheduled, and whether you want to block the process or not
<aZtec_> but in the case of 1 minute intervals that wouldn't be a good option, depending on how you execute the task
kaspertidemann has quit []
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> zrl thread = Thread.new { puts 'yo man'; sleep 60 }; thread.join
<havenwood> boombadaroomba: compile Ruby to Javascript with Opal :P maybe say more about what you're looking to do?
rkalfane has joined #ruby
<fennec> shevy- or, to be simpler, just.... while(true) { puts "yo"; sleep(60) }
<havenwood> zrl: for more complicated or precise timers checkout the timers gem: https://github.com/celluloid/timers#readme
<fennec> tends to drift, though, if the contents of the loop actually takes real time to execute
<havenwood> ^
<fennec> how fancy do you need it to be and how simple do you need it to be?
momomomomo_ has joined #ruby
milkohol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
momomomomo has quit [Ping timeout: 272 seconds]
momomomomo_ is now known as momomomomo
hiyosi_ has joined #ruby
shock_one_ has quit [Quit: Computer has gone to sleep.]
<boombadaroomba> havenwood: I mean like use @something.id in javascript
spyderma_ has joined #ruby
rostam has quit [Remote host closed the connection]
chrishough has joined #ruby
michaeldeol has joined #ruby
<aZtec_> boombadaroomba are we talking view files or asset pipeline files? in case of the former, just use ERB??
wallerdev has quit [Quit: wallerdev]
<boombadaroomba> aZtec_: its jquery and ERB. im new to javascript. intermediate ruby on rails
ramfjord has joined #ruby
arturhoo has joined #ruby
<aZtec_> as painfully bad as some of them are, at your stage the standard rails guides will serve you well
spyderma_ has quit [Remote host closed the connection]
aZtec_ has quit [Quit: Page closed]
tectonic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sawbones has quit []
aspires has joined #ruby
TeresaP has quit [Ping timeout: 250 seconds]
zeroNones has quit [Read error: Connection reset by peer]
hiyosi_ has quit [Ping timeout: 260 seconds]
Mia has quit [Read error: Connection reset by peer]
<Igneous> what in the actual.. https://github.com/eschleeper/brototype
zoo-zed has quit [Quit: Textual IRC Client: www.textualapp.com]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
klmlfl has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
<havenwood> boombadaroomba: Opal is pretty neat actually (http://opalrb.org/). Even has a JQuery wrapper: https://github.com/opal/opal-jquery#readme
tkuchiki has joined #ruby
freerobby has joined #ruby
alexherbo2 has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
arturhoo has quit [Quit: arturhoo]
danijoo has quit [Read error: Connection reset by peer]
yfeldblum has quit [Read error: Connection reset by peer]
zeroNones has joined #ruby
danijoo has joined #ruby
yfeldblum has joined #ruby
Kricir has quit [Remote host closed the connection]
wallerdev has joined #ruby
ki0 has quit [Remote host closed the connection]
klmlfl has quit [Read error: No route to host]
Kricir has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ixti has quit [Quit: WeeChat 1.0]
klmlfl has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
<havenwood> having fun playing with langs on exercism.io, but wondering if it wouldn't be nice for Ruby to add support for Elixir's alternate method calling sugar so `count_unequal_pairs(pairs_of_chars(sort_by_size([a, b])))` could alternatively be written as `[a b] |> sort_by_size |> pairs_of_chars |> count_unequal_pairs`
gr33n7007h has joined #ruby
nanoyak has joined #ruby
c107 has quit [Remote host closed the connection]
aspires has quit []
ndrei has quit [Ping timeout: 260 seconds]
krisp1 has left #ruby [#ruby]
troyready has quit [Quit: Leaving]
<havenwood> allows that nice method-chainy feel without monkeypatching the world
<wallerdev> how does that handle multiple params at different parts
<havenwood> wallerdev: i think you could mix and match maybe, like: sort_by_size(a, b) |> pairs_of_chars |> count_unequal_pairs
Kricir has quit [Ping timeout: 260 seconds]
krisquigley has quit [Remote host closed the connection]
<wallerdev> eh
timonv_ has joined #ruby
<havenwood> wallerdev: or maybe splat?
krisquigley has joined #ruby
<wallerdev> i dont think its neeeded too much, i dont find myself doing that that much anyways
n_blownapart has joined #ruby
<wallerdev> makes more sense for a language with lots of static functions
<havenwood> i think it makes sense for Ruby, in that you can get readability in cases where we now resort to variable assignment
klmlfl has quit []
boombadaroomba has quit [Remote host closed the connection]
tectonic has joined #ruby
<havenwood> i like the flexibility to say it in the order you want, without freedom patching or refinements
benzrf is now known as benzrf|offline
<havenwood> it's a sugar i think i'd use, dunno
HelperW_____ has joined #ruby
wldcordeiro_ has joined #ruby
troyready has joined #ruby
Aaaal has quit [Read error: Connection reset by peer]
nanoyak has quit [Read error: Connection reset by peer]
snath has joined #ruby
krisquigley has quit [Ping timeout: 260 seconds]
nanoyak has joined #ruby
timonv_ has quit [Ping timeout: 260 seconds]
hmsimha_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
HelperW_____ has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
HelperW_____ has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
<shevy> hmm is there a simple way to re-alias one hash key to another one? right now I use .delete for this
syva has joined #ruby
Apocalypse has quit [Ping timeout: 260 seconds]
<centrx> shevy, ActiveSupport has transform_keys
momomomomo has quit [Ping timeout: 260 seconds]
momomomomo has joined #ruby
<centrx> shevy, You can copy that code and be a bona-fide Rails hacker
<havenwood> he wants singular, transform_key
<havenwood> transform_keys is a terribad nake!
<havenwood> name*
<havenwood> #map_keys
IcyDragon has joined #ruby
HelperW_____ has quit [Ping timeout: 260 seconds]
<shevy> centrx you make me feel so dirty
<havenwood> or rather, map_key
<shevy> that rails ecosystem is huge
<syva> well map kay might be confusing since it returns the hash again
<centrx> shevy, huge like a sewer?
* crome waves a pint of rabid lemmings at shevy
<fennec> the thing that bugs me about Ruby, coming from Perl, is the boilerplate around a decent hashmap
<syva> map_keys i would maybe expect return of an array of the changed keys as return value
msmith_ has joined #ruby
<crome> fennec: what are you missing?
charliesome has joined #ruby
<shevy> fennec what is a decent hashmap?
IceDragon_ has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
<fennec> shevy: in Perl, using select third-party tools, it goes... my %transformed = hashmap { "transformed_$a" => "modified_$b" } %hash;
seanosaur has joined #ruby
<eam> fennec: amen
Apocalypse has joined #ruby
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
<eam> also the lack of distinction between a nested hash/array deref which makes proper auto-vivification impossible
<shevy> PERL TAKE OVER ATTEMPT DETECTED!!!
<eam> so much boilerplate code everywhere
axsuul has joined #ruby
<fennec> which returns a new hash with all your keys and values prepended with strings like transformed_ and modified_
<havenwood> syva: Hash#map_key, Hash#map_value and Hash#map_pair would return Hashes, at least as proposed
<eam> shevy: no we are talking about the perl aspects of ruby it's ok
shinobi_one has quit [Quit: shinobi_one]
tjr9898 has quit [Remote host closed the connection]
<eam> no one ever says "smalltalk takeover attempt detected"
<fennec> can't decide whether I prefer to map out hash.map {|a,b| {modify(a) => modify(b)}}.inject(:merge!)
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<fennec> or do it as an even-sized list I pass to a Hash constructor
<eam> probably because ruby doesn't have an inferiority complex relative to smalltalk :p
IcyDragon has quit [Ping timeout: 260 seconds]
<fennec> or do a monkey patch or a third module or what
Wolland_ has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.0]
<syva> havenwood: ah didnt know about this :}
<fennec> that sort of stuff is where the usually-annoying thing about Perl (naked lists slide into each other) gets to be Really Darned Handy
thams has quit [Quit: thams]
<eam> %val_key = reverse %key_val
gregtarnoff has quit [Quit: gregtarnoff]
emmesswhy has joined #ruby
<crome> I'm wondering when it came to programming languages being better when they require less bytes of code to achieve something
<ght> Question: With an if statement, does ruby support the follwing: if A == 1 || (B == 2 && C == 2)
<ght> ?
<ght> Because it doesn't appear so
<Paradox> is there a way to do feature detection in ruby, specifically, see if the users interpreter supports keyword args?
<Paradox> i dont want to just do if mri
<centrx> ght, what's wrong with it?
axsuul has quit [Read error: Connection reset by peer]
davasaurous has joined #ruby
<havenwood> syva: good question i guess whether map ought return an Array, always
<centrx> ght, A, B, C are not proper variable names, not sure if that's related
<centrx> ght, should be lowercase
<ght> but that syntax is supported, ok.
<centrx> yes
<ght> Thank you.
<syva> ght: you can use if RUBY_VERSION < ‘x.x’
<centrx> ght, although that's the default operator precedence as I recall
coderdad has quit [Remote host closed the connection]
<centrx> maybe not
<syva> sorry wrong person
<Paradox> lol
<syva> i meant paradox
<Paradox> i know that was addressed at me syva
seanosaur has quit [Ping timeout: 272 seconds]
<Paradox> i've settled on that
<Paradox> but was wondering if there was an in-ruby equivalent to something like modernize for browsers
hiyosi_ has joined #ruby
<Paradox> detect the "feature", regardless of "version"
wallerdev has quit [Quit: wallerdev]
<centrx> Paradox, Since many features are methods on objects, you can use respond_to?
<syva> paradox: browser feature detection is about testing for available standard libs
<syva> not syntactical
<syva> features
Wolland has quit [Ping timeout: 272 seconds]
<centrx> Paradox, e.g. my_array.respond_to?(:to_h)
thams has joined #ruby
<syva> keyword args specificially is very low level thing to be detecting for
<Paradox> yeah, i know of that one centrx, not sure how i'd handle keyword hashes though, since they're a little lower level, or no?
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> right
<Paradox> well i want to fall back to a hash argument in the event that they arent there
wallerdev has joined #ruby
<centrx> it's kind of already the same thing for passing in
<centrx> then use def method(options) for the params, or (options = {})
<Paradox> same syntax, but if you run a program written in 2x in 1.9, ruby screams and yells
<centrx> oh right kwarg syntax for hashes, not methodss
msmith_ has quit [Remote host closed the connection]
IceDragon_ has quit [Ping timeout: 272 seconds]
<Paradox> syva modernize doesn't always detect standard libs. Sometimes it does hacky shit, like the manner through which it detects input[type=color]
<syva> but if you have a lot of methods like this then its going to be a lot of conditionals for the ruby version, and using meta progamming to achieve it would be suboptimal
<syva> so this smells like overengineering
<syva> imo just go with hash args
<Paradox> yeah, i guess i can just do a if not 2x and wait for 3x to come out
<Paradox> or that
<Paradox> thanks
TorpedoSkyline has joined #ruby
IceDragon_ has joined #ruby
<havenwood> Paradox: February 23rd is coming up pretty soon. Buh bye 1.9!
seanosaur has joined #ruby
n_blownapart has quit []
Ulrike_Rayne is now known as Bubble_Covered_U
Bubble_Covered_U is now known as Bubbly_Ulrike
codeurge has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
<eam> crome: I think it's not so much less code, and more about the clarity and simplicity of the code necessary
Scotteh has joined #ruby
jcdesimp has joined #ruby
<crome> it's weird to talk about code simplicity when understanding said code requires quite a bit of knowlege about the language/framework
<crome> it's different in all programming language
seanosau_ has joined #ruby
seanosaur has quit [Client Quit]
seanosau_ has quit [Client Quit]
<crome> what might be an operator in a language might not be boilerplate in another only because it does not have that operator
seanosaur has joined #ruby
Takle has joined #ruby
St_Marx has quit [Remote host closed the connection]
<eam> yes, it's certainly a determination that changes depending on the experience level
<Paradox> havenwood i wish
<Paradox> the company im at is still on rails 2.3 :(
<fennec> well the other annoying thing about hashmaps in Ruby is that you end up with a lot of obnoxious intermediate objects
<eam> someone who learned java in school would find boilerplate more clear
<shevy> man
St_Marx has joined #ruby
<fennec> honestly it might just be better to take it to tap
<shevy> why do you hate people eam
<eam> someone who writes text manipulation scripts all day long would find it unnecessary
<Paradox> my favorite new pattern is the psuedo-decorator pattern
<shevy> do you know how boring it is to learn java in school
<Paradox> using 2.1's def return
gregf has joined #ruby
<eam> and obfuscating
<Paradox> shevy s/in school//
<eam> shevy: I wouldn't know, I went to school before java was a thing
banister has quit [Read error: Connection reset by peer]
ppinto has quit [Quit: ppinto]
mikecmpbll has quit [Quit: i've nodded off.]
<fennec> new_hash = {}.tap {|h| existing_hash.each {|k,v| h["#{k} plus"] = v + 1] }}
banister has joined #ruby
<shevy> eam ok then for your punishment
<shevy> you must go back to school
<shevy> for a full year
<shevy> and have plenty of java classes
<shevy> every
<shevy> single
charliesome has quit [Quit: zzz]
<shevy> day
<Paradox> that pattern
<crome> "obnoxious intermediate objects", especially when they are accessed as methods, raise the readability of your code by over 9000
<eam> shevy: I'd be happy to go back to school, do you know why?
Takle has quit [Ping timeout: 240 seconds]
skammer has quit [Ping timeout: 250 seconds]
benzrf|offline is now known as benzrf
<eam> crome: that's why I'm in favor of strict typing and casting all values explicitly
<eam> and semicolons ;-)
<eam> (no joke, I really am, you're preaching to the choir)
<crome> eam: semicolons have close to zero to do with this dicussion imo
<shevy> school is a lot of time lost
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crome> I used to drink a lot during my school years
<crome> good times
sargas has quit [Quit: Leaving]
mikecmpbll has joined #ruby
<eam> crome: it's just a way to be explicit about behavior
<eam> with a bit of boilerplate
dorei has joined #ruby
hooper has quit [Quit: Leaving.]
starless has joined #ruby
geggam has joined #ruby
mikecmpbll has quit [Client Quit]