jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
cir0x has joined #ruby
<zenspider> Tarkers34: I saw your gist. your claims don't make sense in any iterator/enumerator system I've ever used
<zenspider> kb3ien: big pastes should use gist or something
<zenspider> path should point to the lib dir
KrzaQ has joined #ruby
<zenspider> usually bundler will do all this for you
roolo has joined #ruby
n008f4g_ has quit [Ping timeout: 256 seconds]
roolo_ has quit [Ping timeout: 246 seconds]
balazs has joined #ruby
idiocrash has quit [Remote host closed the connection]
cir0x has quit [Quit: Leaving.]
<jhass> kb3ien: /var/www/site/path/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4 and try actually removing the version from the .gemspec name
cir0x has joined #ruby
MatthewsFace has joined #ruby
sharpmachine has joined #ruby
thalassa has joined #ruby
nahtnam has joined #ruby
kkeuning_ has joined #ruby
balazs has quit [Ping timeout: 246 seconds]
kkeuning has quit [Quit: This computer has gone to sleep]
kkeuning_ has quit [Client Quit]
cir0x has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 264 seconds]
kkeuning has joined #ruby
kkeuning_ has joined #ruby
shazaum_ has joined #ruby
kkeuning has quit [Client Quit]
kkeuning_ is now known as kkeuning
sudoku has joined #ruby
sudoku has left #ruby [#ruby]
axsuul has joined #ruby
Musashi007 has quit [Quit: Musashi007]
kb3ien has quit [Ping timeout: 246 seconds]
marr has quit [Ping timeout: 246 seconds]
serivich has joined #ruby
Limix has quit [Quit: Limix]
drew0 has quit [Ping timeout: 255 seconds]
Akagi201 has quit [Remote host closed the connection]
bruno- has joined #ruby
serivich has quit [Ping timeout: 246 seconds]
EllisTAA has quit [Quit: EllisTAA]
kb3ien has joined #ruby
kb3ien has left #ruby [#ruby]
kb3ien has joined #ruby
<kb3ien> what will cause the re-reading of the Gemfile, do I need to just restart passenger, or is there more to it than that?
<zenspider> I wish Float had close_to?(n)
bruno- has quit [Ping timeout: 246 seconds]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Limix has joined #ruby
kkeuning has quit [Remote host closed the connection]
sharpmachine has joined #ruby
havenwood has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Musashi007 has joined #ruby
jhass has quit [Excess Flood]
roolo has quit [Ping timeout: 256 seconds]
icebourg has joined #ruby
jhass has joined #ruby
coffeeju1 has quit [Ping timeout: 265 seconds]
PaulePanter has quit [Ping timeout: 265 seconds]
zly has quit [Ping timeout: 248 seconds]
PaulePanter has joined #ruby
zly has joined #ruby
coffeeju1 has joined #ruby
djbkd has quit [Quit: My people need me...]
Lucky_ has joined #ruby
yfeldblum has joined #ruby
jlast has quit [Ping timeout: 246 seconds]
<Ox0dea> Is there a way to pluck the class itself out of a singleton class?
lordkryss has quit [Quit: Connection closed for inactivity]
<al2o3-cr> Ox0dea: if there is, it'll be you that finds out :P
<Ox0dea> Internally, it's carried around on an instance variable called "__attached__", no leading @, so I figure they thought it best not to expose it, but I can't imagine why.
<Ox0dea> al2o3-cr: Heh, I have an idea about how to get to it with Fiddle, but I was hoping for something a little less finicky.
<jhass> Ox0dea: .ancestors[1] ?
dgutierrez1287 has quit [Remote host closed the connection]
symm- has quit [Read error: Connection reset by peer]
<jhass> not 100% guaranteed though I guess
<Ox0dea> jhass: That'll be another singleton class.
<jhass> .superclass actually
<Ox0dea> >> IO.singleton_class.superclass
<ruboto> Ox0dea # => #<Class:Object> (https://eval.in/392105)
<jhass> and the other singleton_class is at [0]
<jhass> huh
wallerdev has quit [Quit: wallerdev]
sharpmachine has quit [Read error: Connection reset by peer]
<al2o3-cr> >> Class::Object
symm- has joined #ruby
<jhass> >> class Foo; end; Foo.new.singleton_class.superclass
<ruboto> al2o3-cr # => /tmp/execpad-4ae7f53f3575/source-4ae7f53f3575:2: warning: toplevel constant Object referenced by Cla ...check link for more (https://eval.in/392106)
<ruboto> jhass # => Foo (https://eval.in/392107)
wallerdev has joined #ruby
<Ox0dea> jhass: Foo.new.singleton_class != Foo.singleton_class
meph has quit [Quit: Leaving.]
<jhass> well, you didn't really specify which one :P
<Ox0dea> Fair enough.
chihhsin has quit [Quit: leaving]
<Ox0dea> IO.singleton_class.attached_class should be a thing, I reckon.
sharpmachine has joined #ruby
axsuul has quit [Ping timeout: 250 seconds]
kkeuning has joined #ruby
claptor has quit [Quit: this channel is bakas]
micalexander has joined #ruby
JDiPierro has joined #ruby
<jhass> ObjectSpace.each_object(Class).find {|c| c.singleton_class == IO.singleton_class } doesn't count I guess :P
arescorpio has joined #ruby
<Ox0dea> It's a one-liner in C, so I guess I'll propose it.
<Ox0dea> What's a better name than #attached_class, though?
<jhass> what would it return for a non-Class'es singleton class, the object I guess?
<Ox0dea> Yeah, that seems reasonable. #attached_object, perhaps?
<jhass> yeah
<jhass> my thinking
CustosLimen has quit [Read error: Connection reset by peer]
<toretore> well, it's a singleton class, so why not #instance ?
<Ox0dea> toretore: #instance is already a thing.
<toretore> >> IO.singleton_class.instance
<ruboto> toretore # => undefined method `instance' for #<Class:IO> (NoMethodError) ...check link for more (https://eval.in/392108)
<Ox0dea> Huh.
<Ox0dea> It's a thing in 2.3.
<toretore> what does it return?
chipotle has quit [Quit: cheerio]
<toretore> >>RUBY_VERSION
<ruboto> toretore # => "2.2.0" (https://eval.in/392109)
<Ox0dea> Wait, never mind. It seems that was irbtools bringing something in.
Musashi007 has quit [Quit: Musashi007]
icebourg has quit []
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sharpmachine has quit [Read error: Connection reset by peer]
kkeuning has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
adamski2600 has joined #ruby
sharpmachine has joined #ruby
genpaku has quit [Ping timeout: 264 seconds]
yokel has quit [Ping timeout: 250 seconds]
<zenspider> btw folks... #ruby-cooks has been (re-)formed
pgatt has quit [Quit: Connection closed for inactivity]
idiocrash has joined #ruby
genpaku has joined #ruby
yokel has joined #ruby
dgutierrez1287 has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.2]
sarkyniin has joined #ruby
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sarkyniin has quit [Client Quit]
craysiii has joined #ruby
cnngimenez has quit [Quit: Konversation terminated!]
eggoez has quit [Ping timeout: 246 seconds]
danielpclark has quit [Ping timeout: 265 seconds]
jamesaxl has quit [Remote host closed the connection]
cnngimenez has joined #ruby
nobitanobi has joined #ruby
eggoez has joined #ruby
cnngimenez is now known as soft_libre
elektronaut has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
elektronaut has quit [Ping timeout: 252 seconds]
sharpmachine has quit [Read error: Connection reset by peer]
fgo has joined #ruby
drPoggs has quit [Ping timeout: 252 seconds]
drPoggs has joined #ruby
mfranzwa has joined #ruby
MatthewsFace has joined #ruby
pontiki has joined #ruby
workmad3 has joined #ruby
<pontiki> hi folks
sharpmachine has joined #ruby
fgo has quit [Ping timeout: 246 seconds]
danielpclark has joined #ruby
wallerdev has quit [Quit: wallerdev]
jpfuentes2 has joined #ruby
atomiccreeper has joined #ruby
daas has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
GnuYawk has quit [Ping timeout: 252 seconds]
Guest42215 has quit [Ping timeout: 276 seconds]
Mohan has joined #ruby
t_ has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
Tarkers34 has quit [Ping timeout: 246 seconds]
t_ has joined #ruby
phutchins1 has quit [Ping timeout: 276 seconds]
jlast has joined #ruby
finisherr has joined #ruby
Muhannad has quit [Ping timeout: 246 seconds]
Pupeno has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
CatMartyn has quit [Quit: Textual IRC Client: www.textualapp.com]
m3_del has joined #ruby
ryba has joined #ruby
m3_del has quit [Remote host closed the connection]
<atomiccreeper> I doubt this is a thing, but if it is, please inform me. Would being able to dissect a ruby statement into OO (like Parser.parse("def foo bar; return x; end").methods (returning objects)) So what I'm asking is there an effective Ruby syntax parser for ruby, if i want to inspect logic represented in ruby?
<atomiccreeper> or would I have to cannibalize the MRI insides for this?
<sphex> atomiccreeper: maybe the 'ripper' module
<sphex> I'm not sure what it does TBH.
Pupeno has quit [Ping timeout: 246 seconds]
<atomiccreeper> sphex: looks nice. thank you
<pontiki> i think zenspider has one...
Tarkers34 has joined #ruby
<atomiccreeper> so this is a thing?
<Ox0dea> atomiccreeper: Of course it's a thing.
<atomiccreeper> If so, what would the terminology for it be?
sharpmachine has quit [Read error: Connection reset by peer]
<atomiccreeper> other than describing it as "Ruby parsings for ruby"
<pontiki> thanks, Ox0dea, you were faster
<Ox0dea> I mean, it's parsing no matter how you slice it.
<Ox0dea> You get back an abstract syntax tree representing the Ruby code.
<Ox0dea> It's still on you to interpret the S expressions as fits your needs.
<atomiccreeper> Thanks, i think i found what i need
A205B064 has joined #ruby
<Ox0dea> atomiccreeper: I think you're probably just looking for eval?
zachk has quit [Quit: WeeChat 0.4.2]
finisherr has quit [Quit: finisherr]
<atomiccreeper> 0x0dea: No
t_ has quit [Ping timeout: 255 seconds]
<sphex> Ox0dea: I was wondering... can ruby be parsed without executing it? I noticed it has BEGIN blocks...
<Ox0dea> sphex: Parsing is just transforming a big string of code into meaningful tokens.
t_ has joined #ruby
<Ox0dea> BEGIN and END have no bearing on that process.
<Nilium> Well, that's lexing/tokenizing
<Nilium> Parsing usually means getting meaning out of the token stream
<Ox0dea> Yes, I could've worded a bit better.
sharpmachine has joined #ruby
<sphex> Ox0dea: perl cannot be parsed without executing its BEGIN blocks, because they can modify the package symbol tables (e.g. when exporting subs), which in turns affects parsing. I guess ruby doesn't allow that to happen.
mfranzwa has quit [Quit: mfranzwa]
<Ox0dea> Aye, the running joke is that only Perl can parse Perl.
<atomiccreeper> 0x0dea: so, perl must be written in perl than
<Ox0dea> No, the joke is merely that.
<sphex> hehe.. yeah. ruby being sane must really help with having multiple implementations like that.
<Ox0dea> > ruby sane
micalexander has quit [Quit: Leaving...]
abyss has quit [Ping timeout: 256 seconds]
<Ox0dea> It's saner than Perl, to be sure, but that's not saying much. :P
havenwood has quit [Ping timeout: 256 seconds]
sarkyniin has joined #ruby
jlast has quit [Remote host closed the connection]
<atomiccreeper> I've actually been googling this question my self for quite a while. googled it this second and it was so obvious :(
ohaibbq has joined #ruby
atomiccreeper has quit [Quit: Page closed]
Limix has quit [Quit: Limix]
bootstrappm has joined #ruby
renderful has joined #ruby
<sphex> It's pretty neat how ruby's metaprogramming features are not macro/template-based, and do not seem to ever affect parsing. I'm still trying to understand them properly... :/
dgutierrez1287 has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
bf4 has joined #ruby
<Ox0dea> The elegance of the ancestor chain and how it influences method lookup is certainly something to behold.
nfk has quit [Quit: yawn]
mfranzwa has joined #ruby
tkuchiki has joined #ruby
<Ox0dea> It's arguably the best and worst part of Ruby; it gives you remarkable control over the behavior of your objects, but also gives you an overabundance of opportunities to invalidate the method cache and slow things way down.
<sphex> and how Kernel becomes "part of" objects. was that also a smalltalk thing? maybe reading up on smalltalk.
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 255 seconds]
<sphex> Ox0dea: oh yeah.. I'll always aim to not modify classes past a certain "setup" phase in my programs (assuming I'll even know when I'm modifying them, meh :/)
bf4 has quit [Ping timeout: 264 seconds]
jpfuentes2 has joined #ruby
Tarkers34 has quit [Ping timeout: 246 seconds]
idafyaid has joined #ruby
tno has quit [Remote host closed the connection]
jaygen has quit [Read error: Connection reset by peer]
bootstrappm has quit [Ping timeout: 252 seconds]
jaygen has joined #ruby
<Ox0dea> sphex: The open/closed principle *should* be followed religiously, but it needn't be the final say in all situations.
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
sharpmachine has quit [Read error: Connection reset by peer]
gambl0re has quit [Remote host closed the connection]
gambl0re has joined #ruby
tkuchiki has joined #ruby
abyss_ has joined #ruby
JDiPierro has joined #ruby
sharpmachine has joined #ruby
jenrzzz has joined #ruby
blue_deref has quit [Quit: bbn]
tkuchiki has quit [Remote host closed the connection]
micalexander has joined #ruby
hemanth has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
kkeuning has joined #ruby
pleiosaur has quit [Ping timeout: 250 seconds]
Jello_Raptor has quit [Ping timeout: 252 seconds]
peterhu has quit [Ping timeout: 252 seconds]
dik_dak has quit [Quit: Textual IRC Client: www.textualapp.com]
peterhu has joined #ruby
Tarkers34 has joined #ruby
tvw has quit []
csaunders has quit [Ping timeout: 252 seconds]
dfockler has joined #ruby
byroniczero has joined #ruby
chouhoulis has joined #ruby
Jello_Raptor has joined #ruby
brain_shim has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
csaunders has joined #ruby
Ox0dea has left #ruby ["WeeChat 1.2"]
pleiosaur has joined #ruby
dfockler has quit [Ping timeout: 256 seconds]
mfranzwa has quit [Quit: mfranzwa]
tkuchiki has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
nobitanobi has quit [Remote host closed the connection]
sharpmachine has joined #ruby
bruno- has joined #ruby
psy_ has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
ivanskie has joined #ruby
firebirds has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
tkuchiki has quit [Remote host closed the connection]
kkeuning has quit [Quit: Textual IRC Client: www.textualapp.com]
kkeuning has joined #ruby
senayar has quit [Remote host closed the connection]
firebirds has left #ruby [#ruby]
Indian has quit [Ping timeout: 246 seconds]
kkeuning has quit [Max SendQ exceeded]
rushed has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
kkeuning has joined #ruby
kkeuning has quit [Max SendQ exceeded]
arescorpio has quit [Ping timeout: 252 seconds]
sharpmachine has joined #ruby
nobitanobi has joined #ruby
icebourg has joined #ruby
sharpmachine has quit [Remote host closed the connection]
kkeuning has joined #ruby
kkeuning has quit [Client Quit]
j4cknewt has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
kkeuning has joined #ruby
kkeuning has quit [Client Quit]
Limix has joined #ruby
Limix has quit [Client Quit]
kkeuning has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
penzur has joined #ruby
Feyn has joined #ruby
Agoldfish378 has quit [Quit: G'Bye]
darkf has joined #ruby
scripore has joined #ruby
aphprentice_ has joined #ruby
yayfoxes has joined #ruby
devbug has joined #ruby
intyl has joined #ruby
Yzguy has joined #ruby
Channel6 has joined #ruby
braincras has quit [Quit: bye bye]
Wolland has joined #ruby
brain_shim has quit [Ping timeout: 265 seconds]
shazaum_ has quit [Quit: This computer has gone to sleep]
kies^ has joined #ruby
braincras has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Spami has joined #ruby
workmad3 has joined #ruby
lessless has joined #ruby
El3ktra has joined #ruby
<El3ktra> Hey I am preparing for an upcoming interview for a position that uses Ruby On RAils... any suggestions for how I should prepare?
tkuchiki has joined #ruby
jaygen_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
kies^ has quit [Read error: Connection reset by peer]
<wmoxam> El3ktra: Are you familiar with Ruby and/or Rails?
nobitanobi has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
yayfoxes has quit [Quit: WeeChat 1.2]
Hobogrammer_ has joined #ruby
<El3ktra> wmoxam, yes, but I am self-taught.
<wmoxam> El3ktra: as are most ;)
PlasmaStar has quit [Ping timeout: 246 seconds]
<El3ktra> that's good to hear then :)
byroniczero has quit [Quit: Textual IRC Client: www.textualapp.com]
Silent__ has joined #ruby
<El3ktra> I've been doing stuff with codewars, and looking at this page: http://samurails.com/interview/
jaygen has quit [Ping timeout: 244 seconds]
<El3ktra> I feel decently prepared, but I was wondering if there was anything that I should look at that people would suggest
Hobogrammer has quit [Ping timeout: 264 seconds]
<stoodfarback> El3ktra: Assuming you're good with both ruby and rails, maybe catch up on what's new in rails master. Could give you some impressive-sounding tidbit.
byroniczero has joined #ruby
yayfoxes has joined #ruby
<wmoxam> El3ktra: It's really dependant on the actual position. In my experience these sorts of positions range from backend heavy, to full stack, to front end focused with a little bit of backend
devbug_ has joined #ruby
ryba has quit [Ping timeout: 264 seconds]
<wmoxam> El3ktra: when I have interviewed people I haven't focused too much on Rails itself at all :p
<El3ktra> he he "splat"
<El3ktra> I am still giggling about the Object method "taint"
<El3ktra> wmoxam, yeah, I go get the feeling that they are going to be asking ruby questions
Hobogrammer_ has quit [Ping timeout: 264 seconds]
<El3ktra> it's a phone intervew, then I will get about 45m to work on a programming problem
fgo has joined #ruby
<El3ktra> have you guys played around on codewars?
serivich has joined #ruby
<wmoxam> El3ktra: nope
PlasmaStar has joined #ruby
ohaibbq has quit [Remote host closed the connection]
<El3ktra> wmoxam, highly recommend: http://www.codewars.com/dashboard
<wmoxam> programming questions can have a wide range of posibilities :p
shinnya has quit [Ping timeout: 276 seconds]
coffeecupp has joined #ruby
Yzguy has quit [Quit: Zzz...]
bullcitydev has quit [Quit: Textual IRC Client: www.textualapp.com]
<El3ktra> wmoxam, yeah, that's why I am asking here :P
aryaching has quit [Ping timeout: 248 seconds]
<coffeecupp> is anyone here using emacs??
<wmoxam> it can be 'do clever thing X that you would know if you went to the same school as me'
JDiPierro has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 255 seconds]
<El3ktra> yeah, I got a question like that during an interview
michael_mbp has quit [Excess Flood]
<wmoxam> and at the opposite end it can be "here's a problem that we often run across in this job"
<El3ktra> It was an algerba question that had a devide by zero in it, which apparently is covered in nearly every math class nowadays
nobitanobi has quit [Remote host closed the connection]
<stoodfarback> coffeecupp: Yep.
dik_dak has joined #ruby
<coffeecupp> You wouldn't happen to be using robe mode would you?
<El3ktra> the sucky thing is that I really want this job. The last two interviews I didn't get, but they were for jobs that I didn't really feel that I was a good fit for
<stoodfarback> coffeecupp: Nope.
<coffeecupp> gawd damn.
JDiPierro has joined #ruby
dik_dak has quit [Max SendQ exceeded]
<coffeecupp> Well could you think of any reason that ruby couldn't find bundler in the gem path
dik_dak has joined #ruby
michael_mbp has joined #ruby
karpuragauram has joined #ruby
JDiPierro has quit [Ping timeout: 250 seconds]
vivekananda has quit [Ping timeout: 246 seconds]
chihhsin has joined #ruby
Mia has quit [Read error: Connection reset by peer]
peteykun has quit [Quit: Leaving]
devbug has joined #ruby
* baweaver cackles madly
<baweaver> Test code that generates real code, working proof of concept at least
<baweaver> needs a lot of TLC for larger files and doing something other than skeletons though.
devbug_ has quit [Ping timeout: 246 seconds]
adamski2600 has quit [Ping timeout: 250 seconds]
ohaibbq has joined #ruby
Pupeno has joined #ruby
Ox0dea has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> baweaver: The first Malbolge program was divined by a computer running a beam search of all possible Malbolge programs.
<Ox0dea> You could try something similar for Clairvoyant, although you'd have to pare things down considerably.
coffeecupp has quit [Quit: Leaving]
* baweaver starts googling strange names he hasn't seen before
tkuchiki has joined #ruby
<baweaver> I'm thinking of making it more towards Rails generation for now
<pontiki> somewhere there is a list of extremely obscure languages
<baweaver> as it's extremely predictable
Hobogrammer has joined #ruby
Silent__ has quit [Ping timeout: 264 seconds]
<Ox0dea> Ah, but then there are already all kinds of scaffolding generators. :/
<Ox0dea> pontiki: Esolangs, they're often called.
tkuchiki has quit [Remote host closed the connection]
<pontiki> i have two friends that invent such things
<pontiki> they're also extremely wicked DMs as it turns out
<baweaver> There are.
Pupeno has quit [Ping timeout: 256 seconds]
<Ox0dea> baweaver: That anagram checker's a feckin' doozy, innit?
<baweaver> yeah, that and I put in a CFP that said I'd have this one done to a reasonable level
<baweaver> I'll be talking about how I made this thing work if they accept it
<baweaver> so I figured I should, you know
<baweaver> make it work somewhat
sharpmachine has joined #ruby
<pontiki> here's one: http://dangermouse.net/esoteric/
devbug_ has joined #ruby
<Ox0dea> pontiki: You're close with David?
<pontiki> i can't say close. he's in syd, i'm in minneapolis
<pontiki> friends, yeah
tjt263 has joined #ruby
<slash_nick> petrovich is neat
devbug has quit [Ping timeout: 276 seconds]
dik_dak has quit [Quit: Textual IRC Client: www.textualapp.com]
willharrison has quit [Read error: Connection reset by peer]
sharpmachine has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
bb010g has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
Asher has quit [Read error: No route to host]
<slash_nick> in ref to your link pontiki
Asher has joined #ruby
tjt263 has left #ruby ["Textual IRC Client: www.textualapp.com"]
devbug has joined #ruby
crdpink has quit [Ping timeout: 248 seconds]
crdpink2 has joined #ruby
chinmay_dd has joined #ruby
serivichi has joined #ruby
devbug_ has quit [Ping timeout: 256 seconds]
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apt-get_ has joined #ruby
sarkyniin has quit [Ping timeout: 246 seconds]
JDiPierro has joined #ruby
apt-get_ is now known as apt-get
apt-get is now known as sarkyniin
gix has quit [Ping timeout: 244 seconds]
serivichi has quit [Quit: Leaving]
maletor has joined #ruby
JDiPierro has quit [Ping timeout: 265 seconds]
gix has joined #ruby
<baweaver> Ox0dea: figured you'd like that idea. This is what happens when I'm too close to Lisp
penzur has quit [Quit: Leaving]
chinmay_dd has quit []
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> baweaver: Eep. I'm blanking on which idea that might be.
<baweaver> clairvoyant
<Ox0dea> It's an interesting notion, to be sure, but generalizing it is probably impossible.
<Ox0dea> Builder#grok "feels" terribly brittle, but I can't exactly say why.
howdoi has joined #ruby
<xxneolithicxx> happy in dependence day ppl
dgutierrez1287 has joined #ruby
<wmoxam> Happy 'Merica day
<baweaver> Oh I know
<baweaver> it's a proof of concept
MrJiks has joined #ruby
<baweaver> which will need quite a bit of work
<baweaver> question incoming
<Ox0dea> Answer pending.
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kkeuning has joined #ruby
<slash_nick> Wanna hear a tcp joke?
<wmoxam> slash_nick: never
<slash_nick> ruint.
<Ox0dea> slash_nick: I'd tell you a UDP joke...
<slash_nick> Ox0dea: i probably wouldn't get it
kkeuning has quit [Max SendQ exceeded]
<Ox0dea> slash_nick: Nah, you probably would, but you might not. :)
<slash_nick> Ox0dea: you'd not care either way
<Ox0dea> MrJiks: How goes?
jbw has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
dgutierrez1287 has quit [Ping timeout: 276 seconds]
hemanth has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
eggoez has quit [Ping timeout: 256 seconds]
thiagovsk has quit [Quit: Connection closed for inactivity]
Contigi has quit [Quit: Leaving]
rushed has left #ruby [#ruby]
grey_beard has quit [Ping timeout: 252 seconds]
grey_beard has joined #ruby
eggoez has joined #ruby
Ox0dea has quit [Ping timeout: 255 seconds]
devbug_ has joined #ruby
konsolebox has joined #ruby
vdamewood has joined #ruby
<konsolebox> any natural solution for matching globs with Ruby?
lavros has joined #ruby
<konsolebox> globs or wildcards
<konsolebox> this is one that uses simple escaping and replacing of \* with '.*?': http://stackoverflow.com/questions/6449373/wildcard-string-matching-in-ruby. is there a better solution?
devbug has quit [Ping timeout: 276 seconds]
jesterfraud has quit [Quit: Leaving]
<slash_nick> baweaver: how can I run your Foo#bar Foo#baz examples?
charliesome has joined #ruby
tkuchiki has joined #ruby
adamski2600 has joined #ruby
<baweaver> haven't pushed the gem yet
<baweaver> if you DL the source code, it's in spec/fixtures/basic_rpsec.rb
<slash_nick> baweaver: yeah, but i've cloned :)
<baweaver> pry --gem
<baweaver> then Clairvoyant::grok('spec/fixtures/basic_rspec.rb')
arescorpio has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<slash_nick> ok... yeah, i recognize that from your tweet. dur. thanks :)
konsolebox has quit [Quit: Leaving]
<baweaver> the grok method is going to be getting a major overhaul as is
<baweaver> I just wanted to see if I could get the basics
neanderslob has quit [Ping timeout: 256 seconds]
neanderslob has joined #ruby
sharpmachine has joined #ruby
<slash_nick> baweaver: it's pretty cool... i was mostly curious as to how you're going to test... i assume you'll have unit tests for #grok stuff... run unit tests, but also generate classes to cover your rspec fixture; then run all tests again, confirming your rspec fixture is indeed satisfied by the generated code
sevenseacat has joined #ruby
yeticry has joined #ruby
grey_beard has quit [Remote host closed the connection]
<slash_nick> baweaver: OH it doesn't fill in the methods?
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
sharpmachine has quit [Ping timeout: 264 seconds]
grey_beard has joined #ruby
<baweaver> not yet
<baweaver> proof of concept
<slash_nick> just a misunderstanding... it's still awesome. cool TDD tool in the making
<baweaver> yeah, I had a ping pong idea as well for it
idiocrash has quit [Ping timeout: 250 seconds]
<baweaver> bail out after 4-5 tries saying I have no idea, you fix it.
MrJiks_ has joined #ruby
<slash_nick> baweaver: i haven't seen this before... initialize(klass_name:)... is that valid? KV with no V?
grey_beard has quit [Remote host closed the connection]
<baweaver> yeah
<baweaver> named params
<slash_nick> (it must be, it runs)
<baweaver> means it's required
grey_beard has joined #ruby
<baweaver> kinda like def method(a) requires a
<baweaver> but def method(a=1) doesn't
<baweaver> In general I prefer named params
MrJiks has quit [Ping timeout: 248 seconds]
<baweaver> helps me remember what the heck I did a few weeks ago.
<slash_nick> ah... i thought it was named params, just looked funny to see "key:" without that " :value"... i actually haven't used named params, myself
<slash_nick> which now should be obvious :)
* baweaver shrugs
<baweaver> all at your own pace on some things
MrJiks has joined #ruby
<baweaver> it's more of a clarity thing honestly.
MrJiks_ has quit [Ping timeout: 264 seconds]
<baweaver> that, and args can be in whatever order
nahtnam has quit [Quit: Connection closed for inactivity]
<slash_nick> that's a niceity
djbkd has joined #ruby
<baweaver> it also deconstructs hashes for you as well.
senayar has joined #ruby
<toretore> and it means you can completely forego positional arguments
<slash_nick> toretore: is that the same as args can be in whatever order?
solocshaw has quit [Ping timeout: 255 seconds]
<slash_nick> baweaver: whatchu mean, deconstructs hashes?
workmad3 has joined #ruby
<slash_nick> supply named arguments in a hash, it'll pull the proper ones out?
<baweaver> yeah
<slash_nick> gotcha
nizmow has quit [Ping timeout: 252 seconds]
<slash_nick> so... if named arguments are foo & bar... and i supply a hash with foo,bar,baz as keys... does it retain baz?
yayfoxes has quit [Read error: Connection reset by peer]
<baweaver> >> def m(a:,b:) a + b end; m(a: 1, b: 2, c: 3)
<ruboto> baweaver # => unknown keyword: c (ArgumentError) ...check link for more (https://eval.in/392222)
<baweaver> nope
i8igmac has joined #ruby
davedev24_ has quit [Remote host closed the connection]
MrJiks_ has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
<toretore> slash_nick: it means you can use only keyword args
<slash_nick> ok.. so there's still a method signature/contract concept
adamski2600 has quit [Remote host closed the connection]
<baweaver> bingo
MrJiks has quit [Ping timeout: 246 seconds]
<toretore> without having to give defaults, like in 2.0
<toretore> aka, make kwargs required
nizmow has joined #ruby
MrJiks has joined #ruby
mikecmpbll has quit [Quit: ciao.]
frem has joined #ruby
MrJiks_ has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: zzz]
A205B064 has quit [Ping timeout: 252 seconds]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dagda1 has quit [Read error: Connection reset by peer]
dagda1 has joined #ruby
icebourg has quit []
codecop has joined #ruby
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
elektronaut has joined #ruby
drPoggs has joined #ruby
leonardoajim has joined #ruby
revath has quit [Quit: Leaving.]
revath has joined #ruby
ayonkhan has joined #ruby
michael_mbp has quit [Excess Flood]
soft_libre has quit [Quit: Konversation terminated!]
Spami has quit [Quit: This computer has gone to sleep]
bhuvanaurora has joined #ruby
fgo_ has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
michael_mbp has joined #ruby
agent_white has joined #ruby
<agent_white> >> {Kernel => 1, String => 2}["hello world".class]
<ruboto> agent_white # => 2 (https://eval.in/392291)
<agent_white> neet
vdamewood has quit [Quit: Life beckons.]
abuzze has joined #ruby
abuzze has quit [Remote host closed the connection]
uptownhr has joined #ruby
<[k-> >> Kernel.hash
<ruboto> [k- # => 975131362 (https://eval.in/392292)
<[k-> o_O
revath has quit [Ping timeout: 252 seconds]
revath has joined #ruby
i8igmac has quit [Ping timeout: 256 seconds]
<agent_white> [k-: http://blog.honeybadger.io/advanced-ruby-hash-techniques/ -- was peeking through this! Pretty kewl stuff I never thought about.
fgo_ has quit [Quit: WeeChat 1.1.1]
werelivinginthef has joined #ruby
bhuvan_aurora has joined #ruby
krz has joined #ruby
ayonkhan has quit [Read error: Connection reset by peer]
Ox0dea has joined #ruby
<Ox0dea> >> ObjectSpace.each_object.reject { |o| o.respond_to?(:hash) }
<ruboto> Ox0dea # => [] (https://eval.in/392293)
<Ox0dea> ^ [k- Everything is hashable except for instances of BasicObject.
<[k-> the reason why any object can be used as a hash key is because of the #hash method
<Ox0dea> >> BasicObject.new.respond_to?(:hash)
<ruboto> Ox0dea # => undefined method `respond_to?' for #<BasicObject:0x40f303a0> (NoMethodError) ...check link for more (https://eval.in/392294)
<Ox0dea> Heh, it doesn't even respond to #respond_to?.
<Ox0dea> >> foo = Hash.new { |h, k| h[k] = Hash.new &h.default_proc }; 10.times.reduce(foo, :[])
<ruboto> Ox0dea # => {} (https://eval.in/392295)
<slash_nick> >> BasicObject.new.kind_of?(SuperDuperBasic)
<ruboto> slash_nick # => uninitialized constant SuperDuperBasic (NameError) ...check link for more (https://eval.in/392296)
<Ox0dea> >> foo = Hash.new { |h, k| h[k] = Hash.new &h.default_proc }; 10.times.reduce(foo, :[]); foo
<ruboto> Ox0dea # => {0=>{1=>{2=>{3=>{4=>{5=>{6=>{7=>{8=>{9=>{}}}}}}}}}}} (https://eval.in/392297)
<Ox0dea> agent_white: ^ Autovivification is best vivification.
devbug_ has joined #ruby
<slash_nick> Ox0dea: reminds me of a gist
bhuvan_aurora has quit [Ping timeout: 256 seconds]
<Ox0dea> Hm?
bhuvanaurora has quit [Ping timeout: 265 seconds]
krz has quit [Read error: Connection reset by peer]
<agent_white> Ox0dea: I'll need to decypher that line to understand whatchu mean. I haven't coded in nearly have a year. :P
<agent_white> half even.
<Ox0dea> It's a hash trick that the article doesn't really cover.
<Ox0dea> It does demonstrate creating new hashes for missing keys, but it does it the way it might've been done in the bad old days before #default_proc.
devbug has quit [Ping timeout: 246 seconds]
ryba has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
Ox0dea has quit [Read error: No route to host]
<agent_white> Ox0dea: Interesting... that's pretty cool :D
arup_r has joined #ruby
lxsameer has joined #ruby
Ox0dea has joined #ruby
<Ox0dea> Mucking about with systemd's socket activation = fun fun.
war_pigs has quit [Quit: later... computer is sleeping]
<Ox0dea> >> foo = {}; foo[1] = foo; foo[1][1][1][1][1][1][1][1] == foo
<ruboto> Ox0dea # => true (https://eval.in/392298)
<Ox0dea> slash_nick: ^
abuzze has joined #ruby
<baweaver> I almost wish ruby hadn't used the same accessor syntax for arrays and hashes.
<[k-> my brain...
<arup_r> in Ruby how to parse a file say `resource.cgn` ?
<arup_r> `.cgn` is an extraction
<baweaver> extension
<baweaver> and for what?
<arup_r> extension *
_ht has joined #ruby
<baweaver> just file.open it
<baweaver> unless it's binary
<baweaver> then you have other issues
<agent_white> "CGT file extension is related to Gold Parsing System and used for files that contain compiled grammar table" ?
<arup_r> it is binary
<agent_white> WHOOPS
<Ox0dea> arup_r: File.binread, then.
<agent_white> That is not a T!
<arup_r> ok.. let me try
revath has left #ruby [#ruby]
MrJiks has joined #ruby
The_Phoenix has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
<Ox0dea> >> File.read('/proc/self/cmdline')
<ruboto> Ox0dea # => (https://eval.in/392304)
<Ox0dea> That's a little weird, right?
duncannz has quit [Remote host closed the connection]
<[k-> >> require 'anything'
<ruboto> [k- # => cannot load such file -- anything (LoadError) ...check link for more (https://eval.in/392305)
MrJiks_ has quit [Ping timeout: 252 seconds]
<[k-> I thought it forbid requiring anything...
<Ox0dea> Oh, never mind. The jail eval.in is using lets you list /proc/self, but not actually read any of the files.
<Ox0dea> [k-: You can require anything in the standard library.
<[k-> the Haskell eval.in doesn't allow you to import anything :(
<arup_r> binread is giving such thing "Q\xC5!\xDDJF3\xAD\xDF\x1D\b\v\xD4\x8En..." kinds of lots of conent
<Ox0dea> arup_r: Do you know what kind of file this is?
<arup_r> I have to do payment gateway integration..
niemcu has joined #ruby
<arup_r> this file is provided by PG authority..
<arup_r> I have a pHp code,, where they did something with this file.. but php I don't understand.. I need to write a Ruby wrapper
gianlucadv has joined #ruby
<Ox0dea> arup_r: God kills a kitten every time you say "a code"; why do you hate baby cats?
<arup_r> what do you mean ? :)
<[k-> a code snippet?
<Ox0dea> "Some code", even.
<arup_r> ok... in Php fine ?
howdoi has quit [Quit: Connection closed for inactivity]
<Ox0dea> arup_r: Ruby doesn't contain parsers for every possible file format, of course; you'll need to understand the file format before writing a parser for it.
<[k-> how do binary files even work
<arup_r> I am reading the code I have.. and trying to understand how to code it in Ruby
<arup_r> only the problem is to parse the .cgn file.. rest I can gandle
<arup_r> handle**
<Ox0dea> So you're here either to ask us to translate some PHP for you, or else to guide you in your journey to learn Ruby?
yayfoxes has quit [Quit: WeeChat 1.2]
<arup_r> guide.. hints
yayfoxes has joined #ruby
<Ox0dea> Hints on... how to learn Ruby?
<arup_r> I know Ruby
<arup_r> no i know this lang
<arup_r> I don't know PhP.. so ...
bhuvan_aurora has joined #ruby
<Ox0dea> Sounds like you might need to learn some PHP.
<arup_r> humm... it sounds like bell...
<arup_r> it seems the PG team.. encoded the xml file to a .cgn file
* Nilium isn't sure if this person is a troll
<arup_r> I need to decode it
<arup_r> No.. Nilium : I am not .. you probably not so frequent in this channel..
ta has joined #ruby
<Nilium> Yeah, only a few years.
lkba has quit [Quit: Bye]
bhuvanaurora has joined #ruby
<Ox0dea> arup_r: If you want to translate the code, you're obviously going to need to learn enough PHP to figure out what it's doing.
lkba has joined #ruby
<Ox0dea> Better would be to endeavor to understand the file format and write a fresh parser in Ruby.
tvw has joined #ruby
sarkyniin has quit [Quit: Quit]
sphex has quit [Ping timeout: 264 seconds]
<Nilium> Or just write it off as a dead format.
<Ox0dea> [k-: In Ruby, the only noteworthy difference is that line terminators aren't converted to those of the host OS.
<arup_r> i found one python code.. https://github.com/burhan/knet-client/blob/master/knet/api.py hope the php and pythom both will help me.. lets see
sharpmachine has joined #ruby
<Ox0dea> Christ.
marr has joined #ruby
micmus has joined #ruby
marr has quit [Client Quit]
Tarkers34|2 has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
Tarkers34 has quit [Ping timeout: 248 seconds]
<Ox0dea> arup_r: The .cgn file is just a .zip archive XOR'd with some Frederick Douglass quotation.
roolo has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
towski_ has joined #ruby
lavros has quit [Ping timeout: 244 seconds]
lavros has joined #ruby
adamski2600 has joined #ruby
krz has joined #ruby
yayfoxes has quit [Quit: gotta go to bed]
solocsha1 has joined #ruby
<arup_r> ok
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adamski2600 has quit [Ping timeout: 264 seconds]
<Ox0dea> arup_r: I trust you know how to XOR strings, and the rubyzip gem seems quite good.
solocsha1 has quit [Ping timeout: 255 seconds]
<arup_r> ok.. so I need to open the using rubyzip lib..
<arup_r> ?
sphex has joined #ruby
leonardoajim has quit [Quit: Be back later ...]
lessless has joined #ruby
khebbie has joined #ruby
<Ox0dea> You'll need to XOR the file's contents with that quotation first.
<Ox0dea> Wow, such encryption. Much secrets.
dgutierrez1287 has joined #ruby
<baweaver> Ox0dea: know any good ways to keep uninitialized constants from raising errors in class_eval?
<Ox0dea> Hmm...
<baweaver> is there some level of method missing I can tweak?
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> baweaver: There's const_missing.
* baweaver is googling it
<arup_r> a small hint about what is happening here ? https://github.com/burhan/knet-client/blob/master/knet/api.py#L96
<baweaver> python?
<baweaver> Aha, that works quite nicely then
<baweaver> Metaprogramming isn't something I embark on often, and I have a feeling this will be laden with it.
<Ox0dea> Oh,
<Ox0dea> I'd imagine so.
ryba has quit [Ping timeout: 265 seconds]
<[k-> metaprogramming is lisps domain!
<baweaver> that's macro
<baweaver> where do you think I got the idea from?
<[k-> I have no idea what you are talking about
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> Hm. I wonder if I can dynamically instantiate a class and get its entire source as a string
<baweaver> Lisp uses macros for extension of the language
serivich has joined #ruby
dgutierrez1287 has quit [Ping timeout: 264 seconds]
<Ox0dea> baweaver: You don't want to build up the class as a string and then eval it because you're wanting to bring in methods from elsewhere, right?
<baweaver> potentially
<baweaver> that, and it's more useful for the ping-pong approach of seeing if a defined method clears a test
<baweaver> I could just store the methods as objects
<Ox0dea> Well, I suppose you could combine the various #_methods methods with the method_source gem.
<baweaver> and whenever I want to re-eval the class I just "compile" the methods
<baweaver> most of this is not well thought out, so fair warning if I sound like I'm rambling on
<Ox0dea> I mean, it's a pretty crazy undertaking. :P
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MatthewsFace has joined #ruby
ta has quit [Remote host closed the connection]
<baweaver> I know, that's what makes it so dang fun :D
<Ox0dea> Hey, our smilies lined up!
ta has joined #ruby
<baweaver> heh
<Ox0dea> I don't doubt that it can be done to an acceptable level, but there are going to be so many edge cases.
ledestin has joined #ruby
ropeney has joined #ruby
Pupeno has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
devbug_ has quit [Read error: Connection reset by peer]
noethics has quit [Remote host closed the connection]
<Ox0dea> baweaver: To be clear, it's only meant to build skeletons, right? You don't intend to use heuristics to determine if some operation can be applied to turn the arguments into the expected value, for instance?
<baweaver> that's way down the road if ever
<baweaver> but sounds like a blast
<baweaver> it's far more effective in areas where code is predictable
<baweaver> read: Rails
abuzze has quit [Remote host closed the connection]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
lessless has joined #ruby
lordkryss has joined #ruby
jenrzzz has joined #ruby
towski_ has quit [Remote host closed the connection]
riotjones has joined #ruby
towski_ has joined #ruby
vdamewood has joined #ruby
ndrei has joined #ruby
iateadonut has joined #ruby
emma has joined #ruby
<emma> so why do people like ruby?
towski_ has quit [Ping timeout: 276 seconds]
riotjones has quit [Ping timeout: 276 seconds]
JohnBat26 has joined #ruby
bruno- has joined #ruby
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<Ox0dea> emma: Which is your favorite language?
Musashi007 has joined #ruby
shinnya has joined #ruby
<emma> im really not any kind of expert or even really advanced novice in any language but the languages I have 'played' with have been python, racket (a type of scheme), and javascript
bruno- has quit [Ping timeout: 250 seconds]
sdothum has quit [Ping timeout: 252 seconds]
ta has quit [Remote host closed the connection]
sharpmachine has joined #ruby
<baweaver> Imagine if Python let you have more freedom, while stealing parts of lisp and looking strangely like functional javascript in some cases
<baweaver> there's ruby
<baweaver> overly simplified, yeah
<agent_white> Yeah fuck whitespace meaning things.
<[k-> white space is good
<agent_white> I hate endings of methods/everything in python requiring a newline. It makes it hard to read... for me.
<agent_white> NO
<baweaver> Honestly if I have a big enough team that can't mind their whitespace I'll use Python every time
<agent_white> NONONOON
<baweaver> because I hate spending hours arguing stupid trite with Juniors who should be working on something more important than style arguments.
<agent_white> A definitive ending of a function/class/etc via a keyword is awesome I think. Newlines? hell naw.
<baweaver> really, it doesn't matter.
<agent_white> baweaver: I've heard that too... folks saying they would want juniors to use python just to learn code formatting.
<baweaver> It beats having them go crazy on code reviews being needless pedants over it
<agent_white> You mean the junior being a pedant?
<agent_white> ;P
sharpmachine has quit [Ping timeout: 252 seconds]
<baweaver> both sides in some cases.
<baweaver> I get the eagerness, just direct it towards something that has actual value
<[k-> haskell also whitespace
<[k-> you have to enter newlines twice anyway
DoubleMalt has joined #ruby
<[k-> \nend\n\ndef something
<baweaver> having to spell out lambda in Python is what annoys me
<agent_white> Oh god haskell. If someone even used it for scripting I'd be pissed.
<agent_white> ;P
<baweaver> they do
<baweaver> and it has its uses
MatthewsFace has quit [Read error: Connection reset by peer]
<baweaver> especially as a lexer.
<agent_white> They do when they work alone.
* baweaver sighs
<agent_white> Otherwise, common sense is a better programming language.
<agent_white> ;D
<baweaver> there are teams that do
ta has joined #ruby
<[k-> you have to spell out lambda in old Ruby too
nahtnam has joined #ruby
<agent_white> baweaver: Very true.
<baweaver> and they fixed that.
RegulationD has quit [Ping timeout: 252 seconds]
<baweaver> Honestly if someone were to give me a choice between a language fluency for a team, I would pick Haskell any day
<baweaver> Good Haskell programmers are worth their weight in gold
wallerdev has quit [Quit: wallerdev]
<[k-> haskell is pretty elegant
<agent_white> Programmers.
<[k-> programmars* :P
<agent_white> But if you're asking the support/sysadmins do to it, they'll tell you that you're using a jackhammer to get dirt from under your nails.
renderful has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white> s/do to/to do/
<baweaver> depends on what you want to do.
<agent_white> I'll just assume 'team' means programmers, not the rest...
<agent_white> Oh lawd noh.
<Ox0dea> Guis, it's okay! We can write Haskell in Ruby: https://gist.github.com/andkerosine/3356675
langlands has joined #ruby
<agent_white> I disagree. Cool to let the programmers do that. But hell if I'd suggest/recommend it to doing sysadmin stuffs.
<baweaver> that's more of a Python crack from initial direction
<baweaver> though yes, Haskell has list comps
bhuvanaurora has quit [Ping timeout: 244 seconds]
<baweaver> You do know I'm in DevOps right?
<[k-> cheating!
bhuvan_aurora has quit [Ping timeout: 252 seconds]
<baweaver> ...and I do write scripts in Haskell
serivich has quit [Ping timeout: 265 seconds]
<baweaver> When I need something to be stable and bulletproof, I'm using Haskell
<agent_white> baweaver: Then... you're doing good to ensure job security.
<agent_white> ;D
<baweaver> Not really
<baweaver> There are several of us here.
<baweaver> You just assume that it's some mythical language
serivich has joined #ruby
renderful has quit [Ping timeout: 256 seconds]
<agent_white> Nah, I just wonder why not write the scripts in C instead?
<baweaver> Too low level
<baweaver> ElasticSearch / Log Parsing lexers
<Ox0dea> Also the exact opposite of bullet-proof.
<agent_white> But compare that to readability? Say... if a dude walked in with only python knowledge, which would he pickup more easily?
<baweaver> I will slap the idiot who suggests using C for log parsing with a crowbar
MatthewsFace has joined #ruby
<Ox0dea> Uh-oh.
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white> As I would for suggesting Haskell for scripting.
<Ox0dea> This is gonna hurt.
<agent_white> ;D
<Ox0dea> In my defense, I need libalpm anyhow, and nobody's bothered to write bindings.
sevenseacat has joined #ruby
<baweaver> While the C programmer is segfaulting and corrupting memory, I'll be enjoying happy hour
<Ox0dea> *needed
houhouli_ has joined #ruby
<agent_white> True. But while the Haskell programmer is explaining what "side-effects" is, we'll have written the same script in ruby/python/lisp twice and be on our second round of drinks.
AlexAltea has joined #ruby
<baweaver> you assume there's a need to explain
<agent_white> You assume there isn't?
langland_ has joined #ruby
<agent_white> Without a need to explain, yes, why not.
<agent_white> But without a need to explain, why not the others?
<Ox0dea> agent_white: You're blubbing pretty hard, mate.
<agent_white> Ox0dea: I just hate haskell.
ohaibbq has quit [Quit: Leaving...]
<agent_white> So mach.
<agent_white> ;P
<[k-> have you tried it?
<agent_white> Yes.
<[k-> it's glorious!
Guest41698 has joined #ruby
<agent_white> It's cool. But cooler if I was a hipster.
<agent_white> I just want shit to work.
tomphp has joined #ruby
<[k-> I like it's syntax a lot more than Ruby
langlands has quit [Ping timeout: 248 seconds]
<[k-> haskell shit works if it compiles
<Ox0dea> [k-: Would you mind linking to some Haskell code that you think looks really nice?
<[k-> Ruby shit crashes on runtime :/
<agent_white> [k-: It's the first 'pure functional (excusing monads, or whatevah)' language I tried. And even still I found the syntax to be... not to my liking.
houhoulis has quit [Ping timeout: 264 seconds]
<[k-> Ox0dea beauty is in the eye of the beholder
<[k-> :s
<Ox0dea> [k-: Indeed, but I asked you specifically.
<Ox0dea> > functional excusing monads
<Ox0dea> I suspect you have no idea what you're talking about, bud.
<agent_white> I could care less performance of a language to be the most important: syntax is the first thing I see. Otherwise, why wouldn't all of us be programming in assembly?
<agent_white> Ox0dea: Don't monads allow side-effects?
<agent_white> Ox0dea: *haskell exusing monads. I didn't say all functional languages have monads, bud.
<shevy> long live ruby!
<agent_white> amen.
<agent_white> Get this haskell shit outta hurr.
<agent_white> bud.
khebbie has joined #ruby
<shevy> god that haskell code is awful
khebbie has quit [Client Quit]
MatthewsFace has quit [Remote host closed the connection]
Guest41698 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 40.0a2/20150629004008]]
MatthewsFace has joined #ruby
<agent_white> Terrible, guy. That's why I'm saying, friend.
* agent_white glares at Ox0dea
<[k-> beginner ;-;
<agent_white> [k-: Padowan!
khebbie has joined #ruby
<[k-> pada*wan
<agent_white> shiet. I need to renew my license of The Order.
tno has joined #ruby
houhouli_ has quit [Remote host closed the connection]
langland_ has quit [Ping timeout: 276 seconds]
<[k-> haskell is like math!
<[k-> if you hate math than you need to rethink your life
<[k-> you wasted your life learning math
<agent_white> I give up. Haskell is neat. I don't think it's viable for "devops" or whatever buzzword you choose... but it takes away from the "synergy" of the support/admin team, bruh.
kephra has joined #ruby
<kephra> moin - how to tell mkmf to recompile an extension if a header file changed?
<kephra> the header is outside of the gems tree
lkba has quit [Ping timeout: 264 seconds]
bhuvan_aurora has joined #ruby
bhuvanaurora has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 255 seconds]
pengin has joined #ruby
eGGsha has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
ryba has joined #ruby
pengin has quit [Remote host closed the connection]
<shevy> kephra headers usually are outside there anyway
n008f4g_ has joined #ruby
<shevy> somewhere in your extension, there should be a file like extconf.rb
<shevy> mkmf is just the ruby-internal way to generate or compile things through that; extconf.rb should generate a new Makefile when you invoke it (or use the older setup.rb, it should also work); once you have the new Makefile, "make" should be possible
solocshaw has joined #ruby
workmad3 has joined #ruby
lxsameer has joined #ruby
houhoulis has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 256 seconds]
<kephra> shevy, *ok* how to add a header to extconf.rb so the gem gets recompiled, if headers changes?
tomphp has joined #ruby
<shevy> you add a header to extconf.rb?
<kephra> its my gem
<shevy> ah I see what you mean
<apeiros> nice, somebody wrote down what I too say about postel's maxim: https://tools.ietf.org/html/draft-thomson-postel-was-wrong-00
<shevy> I think hanmac knows how to do that, he maintains the ruby bindings for the C++ wxwidget GUI toolkit kephra
Ilyas has joined #ruby
<kephra> ruby is just an other script language and frameworks to support (besides php, lua, qt, gnome, ...)
hubcaps has joined #ruby
<kephra> but the ruby gem does not recompile if my libraries header change
sharpmachine has joined #ruby
haroldwu has joined #ruby
intinig has joined #ruby
Wolland has quit []
sharpmachine has quit [Ping timeout: 246 seconds]
MatthewsFace has quit [Read error: Connection timed out]
el3k0n has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
Jackneill has joined #ruby
lkba has joined #ruby
el3k0n has quit [Read error: Connection reset by peer]
karpuragauram has quit [Quit: Leaving]
MatthewsFace has joined #ruby
DLSteve has joined #ruby
davedev24_ has joined #ruby
tomphp has joined #ruby
spider-mario has joined #ruby
davedev24_ has quit [Ping timeout: 248 seconds]
lessless has joined #ruby
khebbie has joined #ruby
el3k0n has joined #ruby
bosma is now known as bosnia
bosnia is now known as vosma
vosma is now known as bosma
MatthewsFace has quit [Remote host closed the connection]
ryba has quit [Ping timeout: 255 seconds]
MatthewsFace has joined #ruby
jud^ has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
jud has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
yfeldblum has joined #ruby
psy_ has quit [Ping timeout: 246 seconds]
intinig has quit [Ping timeout: 264 seconds]
intinig has joined #ruby
baweaver has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 248 seconds]
frem has quit [Quit: Connection closed for inactivity]
the_real_intinig has joined #ruby
brain_shim has joined #ruby
MatthewsFace has quit [Ping timeout: 276 seconds]
dgutierrez1287 has joined #ruby
intinig has quit [Ping timeout: 265 seconds]
jbw has joined #ruby
axsuul has quit [Ping timeout: 256 seconds]
lkba has quit [Ping timeout: 264 seconds]
<shevy> ruby defaults to US-ASCII if the encoding is unspecified, or UTF-8?
<[k-> Google will be better for this...
<Ox0dea> shevy: UTF-8 in 2.0+.
<shevy> aha ok
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgutierrez1287 has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
arup_r has quit [Ping timeout: 250 seconds]
nfk has joined #ruby
lxsameer has quit [Quit: Leaving]
MatthewsFace has joined #ruby
iateadonut has quit [Quit: Leaving.]
meph has joined #ruby
abuzze has joined #ruby
sharpmachine has joined #ruby
the_real_intinig has quit [Remote host closed the connection]
intinig has joined #ruby
MatthewsFace has quit [Ping timeout: 255 seconds]
<shevy> >> "Öko".downcase
<ruboto> shevy # => "Öko" (https://eval.in/392338)
<shevy> hmmmmm
sharpmachine has quit [Ping timeout: 255 seconds]
frekoya_ has joined #ruby
<adaedra> Language support
intinig has quit [Ping timeout: 246 seconds]
n008f4g_ has quit [Ping timeout: 246 seconds]
GBrawl has joined #ruby
<shevy> le french
<shevy> ¨~ü
allomov has joined #ruby
<[k-> it shows up as a question mark :(
<[k-> >> "�ko"
<ruboto> [k- # => "�ko" (https://eval.in/392340)
Spami has joined #ruby
<zenspider> [k-: why does your Dead player have playerHealth?
<[k-> I could see the downcased version :o
<[k-> so that it doesn't crash when people try to query the health
<zenspider> I think I'd rather code in ML, honestly. There's a lot less bullshit to ML's syntax than haskell's
<shevy> [k- which part shows up as a question mark? the output from ruboto or what I wrote afterwards?
<jhass> shevy: note default to means use if no system locale is set. It does still respect the system locale
frekoya_ has left #ruby ["Textual IRC Client: www.textualapp.com"]
<shevy> jhass oh I always anticipate the worst, such as no valid system locale was set :)))
<zenspider> why would you try to query the health of something that typechecks as dead?
<[k-> I dunno, i made a bad choice I guess
<zenspider> isn't that the whole point of having data Player branch into a Player and Dead? typechecking?
<jhass> [k-: I guess shevy send that in ISO-8bullshit
<shevy> jhass it works fine!
davedev24_ has joined #ruby
<jhass> shevy: for me, because my bouncer does some detection and conversion wizardy to UTF-8
<zenspider> also not so sure about just shoving in a tuple in weapon like > , weaponMetadata :: (String, Int, Int) -- (ActionString, Used, Durability)
<zenspider> seems like they should be regular fields
<[k-> at first I wanted to make it simple, and not care about those fields
<shevy> :D
bubbys has quit [Ping timeout: 246 seconds]
<zenspider> so you added a blob you have to access by index?
<[k-> that I did
<zenspider> "haskell shit works if it compiles" ... mmmmm no
codecop has quit [Remote host closed the connection]
<zenspider> not when you just start shoving shit in anonymous tuples
abuzze has quit [Remote host closed the connection]
eGGshke has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
eGGshke has joined #ruby
<zenspider> this is some UGLY syntax: a@(Player {}) `attack` b = do
<zenspider> damn. just... no. I'll stick to ML when I want to experiment with strong static typing.
arup_r has joined #ruby
<[k-> it can be solved using an extension ;-;
<[k-> but I didn't know about it 25 days ago
<zenspider> I'll stick to ruby or scheme when I want to experiment with strong dynamic typing
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> oh, I'm sure it can. more syntax for an already unreadable language is not an improvement
<[k-> it's called NameFieldPuns iirc
<zenspider> it's already hard to read... and I'm not bashing on your code specifically.
<[k-> named*
<zenspider> I can ONLY read this (to the extent I can) because I took that ML class and there's enough overlap
<zenspider> way way way fewer sigils and shit in ML tho
<[k-> I'm going to learn ocaml soon since I heard that it is nice
<zenspider> oddly... I thought I'd like that one, but I picked up the... practical ocaml (? I think--by that finance company that does everything in ocaml) and damn
<Ox0dea> Jane Street.
<zenspider> that one
<zenspider> neat idea. very neat idea.
<zenspider> and they seem to do very good work and the book looked really good
multi_io has quit [Ping timeout: 250 seconds]
<zenspider> but I just can't read the shit
<Ox0dea> Ruby leaves an indelible mark on one's tastes as a programmer.
<zenspider> my complex language of choice is ruby. I don't need much more than that (and mathematica)
<zenspider> my simple language of choice is racket (scheme)
<zenspider> between the three, I've got my needs fairly well covered
<zenspider> I drop to C when I have to, obvs... but I even try to do that in ruby
<Ox0dea> R !> Mathematica yet?
<zenspider> I can't handle R
<[k-> hmm, I don't think NamedFieldPuns can solve it :(
<[k-> I have to pattern match
<zenspider> it's got some great shit in it... but the design seems a mess
multi_io has joined #ruby
IanV0rn2341 has joined #ruby
<zenspider> pattern matching is great.
<Ox0dea> Julia too Python-like?
intinig has joined #ruby
<zenspider> whatever that blob above is... I can't read / understand... nor do I think I want to
<zenspider> haven't played with julia yet. I've heard good things
intinig has quit [Remote host closed the connection]
<[k-> but I commented it ;-;
<Ox0dea> zenspider: There's no way currently to get the attachee out of a singleton class, right?
<Ox0dea> Other than ObjectSpace, of course.
GitGud is now known as GitGod
khebbie has joined #ruby
<zenspider> I have no idea what those words mean
stamina has joined #ruby
<Ox0dea> It's the term used in MRI. :(
<zenspider> doesn't change the fact
<zenspider> why would you want to?
<zenspider> (whatever the atachee is... a briefcase?)
senayar has joined #ruby
<Ox0dea> A singleton class is said to be "attached" to some object, so the object is naturally the "attachee".
<shevy> lol
kies^ has joined #ruby
<zenspider> I like my version better
<shevy> atachee sounds so more noble than briefcase though
<zenspider> seems like a design smell if you're trying to go from class to instance
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> the only way to read Haskell is to learn Haskell, I understand your pain, zenspider
tomphp has joined #ruby
<zenspider> except... I've got better things to learn
<zenspider> I can go do typed/racket if I'm feeling masochistically typey
<[k-> I like the fact that the compiler has my back if I am wrong
<zenspider> you DO know it is more than possible to write incorrect code that compiles, right?
<zenspider> there is no safety net. it's a myth
<[k-> but I don't go that far :D
<[k-> this is no C
DexterLB has quit [Ping timeout: 252 seconds]
<zenspider> julia DOES look neat. I love mathematica's notebook concept much more than a repl. it's got great ideas in there, but yeah... ugly.
<zenspider> I think racket should probably steal the datasets that julia & R provide and package them up
lkba has joined #ruby
<zenspider> the graphing in racket is at least as good
abuzze has joined #ruby
<jhass> You should try Crystal for a bit, strong & statically typed but feels like duck typing for a large part
<arup_r> shevy: I am translating a big php code to Ruby... passing through a bad time :/
mandarinkin2 has quit [Ping timeout: 264 seconds]
<[k-> I'm still trying to determine if I should learn scala
<[k-> baweaver!
<zenspider> no point. just use phuby to embed php in ruby
<shevy> arup_r cool. I did that when I switched to ruby; all my old php code eventually became ruby code
<shevy> I can't tell whether tenderlove is serious
<arup_r> then I think you are a good point of contact..
<shevy> because he is making changes to phuby :\ https://github.com/tenderlove/phuby
<arup_r> php seems lots of code.. ruby is thin
<shevy> yeah
<arup_r> Oh.. really
<arup_r> never knew this gem
<jhass> and it was better that way
<shevy> well the readme is obviously a joke: "INSTALL: No."
<shevy> :)
<shevy> arup_r lol
<Mon_Ouie> Just the readme though, the rest is completely serious.
<zenspider> I'm sure it is used in production
<shevy> ohhhh
<shevy> Copyright (c) Aaron Patterson and Ryan Davis of Seattle.rb
<zenspider> I kept telling him that we needed to obfuscate and compile it down so we could make more money licensing it
DexterLB has joined #ruby
<shevy> people are having way too much fun on the internetz
r4j453v4n has joined #ruby
adamski2600 has joined #ruby
r4j453v4n has quit [Client Quit]
<zenspider> g'night all
<sevenseacat> someone call the fun police! people are having fun on the internet!
<jhass> you called?
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat> lol
adamski2600 has quit [Ping timeout: 265 seconds]
<agent_white> Do they vote IRC presence at local Ruby meetups?
cir0x has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white> There's some folks here I see time and time again I would vote for.
<sevenseacat> what, to be part of the fun police? >_>
<agent_white> Well... no. I am the fun pohleece. And unless you elbow-five then you cannot join.
<agent_white> But I think that those folks I think of would double-elbow-five me.
<shevy> sevenseacat you even have fun on the IRC!
cir0x1 has joined #ruby
* sevenseacat parties at home in front of the TV on a saturday night
<agent_white> sevenseacat: Don't you worry, lady! We double-triple-backflipped-in-a-pit-of-magma-fived... it's just those... you know.. who don't envy the volcanic sacrifices of the elbows.
khebbie has joined #ruby
lkba has quit [Remote host closed the connection]
<[k-> I only know of high-five...
mandarinkin2 has joined #ruby
<Ox0dea> ?ot Ox0dea
<ruboto> Ox0dea, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
cir0x has quit [Ping timeout: 276 seconds]
cir0x1 has quit [Client Quit]
<shevy> we just don't have enough ruby related problems here
arm_itsust has joined #ruby
<arm_itsust> oh i'm back!!
<[k-> it's that good or bad
<[k-> is*
<agent_white> [k- / Ox0dea: In searching for the reason of elbow-fives you will find there is not! For elbow-fives are impetuous in nature.
* agent_white elbow-fives shevy
<adaedra> .
<Ox0dea> adaedra: You've got a point.
<[k-> no one is writing Ruby shevy!
JDiPierro has joined #ruby
<shevy> [k- I am! though mostly struggling with encoding. never had encoding problems on 1.8.x
<agent_white> sevenseacat: Same here :) Though just watching "Guardians of the Galaxy" in repeat for the awesome soundtrack.
aryaching has joined #ruby
* agent_white elbow-fives Ox0dea and nods
<sevenseacat> have football on the tv here... my team and my fiances team are both playing tonight so lots of channel changing
<agent_white> We are brothers in elbows.
bruno- has joined #ruby
workmad3 has joined #ruby
<agent_white> sevenseacat: But the Broncos aren't on!!! ;) -- What 'soccer' team, as us folks here say?
<sevenseacat> by football, I mean australian rules football.
<mwlang> what’s with the uptick of asking folks to bounce to ruby-offtopic anyhow? I think I missed a whole conversation or two while out last week.
Alina-malina has quit [Quit: Leaving]
<shevy> mwlang The Enforces brought a new set of rules
<shevy> erm, *Enforcers
<mwlang> shevy: did something unpleasant hit the fan to prompt that?
<[k-> well there was this "this shows the Ruby community" thing
<shevy> mwlang dunno, I did not make up the channel rules :)
<jhass> it's just that we saw ruby related questions swallowed in OT talk more than once and that we finally got control over the channel
ht__ has joined #ruby
<agent_white> sevenseacat: Hehe I know! The girls from the US here are set to battle the ladies in Japan for the cup! Looking forward to that... sad to hear that England had an 'own-goal' that nixxed them.
workmad3 has quit [Ping timeout: 250 seconds]
<sevenseacat> o.O
<agent_white> mwlang: Offtopic chat is OK here until there are legitamate questions asked. Then the channel tends to go quiet to ensure these questions are answered.
<Ox0dea> >> $_=$$/$$;@_=->_,__{_==[]?[]:(__[_[$_-$_]]?[_[$_-$_]]:[])+@_[_[$_..-$_],__]};($__=->___{_,*__=*___;___==[]?[]:$__[@_[__,->__{__<_}]]+[_]+$__[@_[__,->__{__>=_}]]})[[8,6,7,5,3,0,9]]
<ruboto> Ox0dea # => [0, 3, 5, 6, 7, 8, 9] (https://eval.in/392343)
<agent_white> sevenseacat: Did you hear about that?
<jhass> agent_white: that's the ideal, but not quite happening
<[k-> plssssssss
<Ox0dea> I'm pretty sure that's the best way to implement Quicksort in Ruby.
<shevy> jhass demands a ruby question now!
<agent_white> jhass: Ah. Hope I'm not interrupting. Haven't heard a question asked yet to make us go silent! :P
<[k-> here it is: aren't U supposed to use _ for variables you won't use
<shevy> yes
<shevy> it's my favourite variable name
<jhass> agent_white: I mean in general
<shevy> because I don't have to give it a name
<[k-> but Ox0dea violated it!
<shevy> well
<shevy> he uses $_
<shevy> I don't like $_ as much as I do _
<agent_white> jhass: Oh... /me shrugs. We seem fine for now. :)
<mwlang> jhass: thanks. just curious since I’ve seen the ot rec popping up considerably frequently.
<[k-> look at his lambda
<Ox0dea> [k-: There are two. :)
<shevy> and __ and ___ is sort of weird... still better thatn $____
<agent_white> [k-: Is that true?
<shevy> the -> now ... -> and I can not become friends
<[k-> you can ask Ox0dea!
<agent_white> [k-: Prepend underscores for unmodified variables?
<Ox0dea> agent_white: Yes, Ruby treats underscore specially when used as an identifier.
<jhass> mwlang: well, it's also pushing it a bit atm so it actually becomes an attractive venue and it'll separate that way automatically ;)
kies^ has quit [Read error: Connection reset by peer]
davedev24_ has quit [Remote host closed the connection]
<shevy> we are getting more and more on topic by the second!!!
<agent_white> Ox0dea: Oh! So it's not just per the standard, but Ruby itself treads them different?
<Ox0dea> agent_white: Aye.
<Ox0dea> >> def foo a, a; end
<ruboto> Ox0dea # => /tmp/execpad-1161128b4762/source-1161128b4762:2: duplicated argument name ...check link for more (https://eval.in/392344)
<Ox0dea> >> def foo _a, _a; end
<ruboto> Ox0dea # => :foo (https://eval.in/392345)
<agent_white> Ox0dea: 'TIL'. Thank you :D
<shevy> hmm
<agent_white> That's pretty sweet.
<agent_white> Ox0dea: Though... not as sweet as the 'auto-vivication' you showed me earlier. :D
<Ox0dea> They're both very nice features.
<agent_white> Very crazy features! Never new of either till today.
<Ox0dea> agent_white: You're in for a treat: http://idiosyncratic-ruby.com/
<[k-> so, Ox0dea uses Scala for code golfing?
JDiPierro has quit [Remote host closed the connection]
<Ox0dea> Is Scala particularly good for golf?
<agent_white> Ox0dea: Whoa...
<agent_white> Thank you for that link. Checking it out now.
<Ox0dea> agent_white: There's some pretty great stuff in there.
arm_itsust has quit [Ping timeout: 246 seconds]
<Ox0dea> It's either awesome or god-awful that there are 207 ways to create a string literal in Ruby.
abuzze has quit [Remote host closed the connection]
<[k-> but you said Scala has more syntax than Ruby o_O
Papierkorb has joined #ruby
<[k-> and the blog states that Ruby is good for code golfing
pgatt has joined #ruby
<Ox0dea> [k-: Having a lot of syntax is not mutually inclusive with being good for golfing, of course.
<Ox0dea> Ruby is *great* for golfing, but that's not entirely to do with its having a lot of syntax.
<[k-> isn't that the point of the blog? :o
<Ox0dea> No.
<agent_white> Ox0dea: I like that, though... it's fun to see what different ways are available to do things in ruby!
<Ox0dea> >> % wtf .length
<ruboto> Ox0dea # => 3 (https://eval.in/392346)
jenrzzz has quit [Ping timeout: 252 seconds]
<agent_white> Though vivication/creating hashes for missing keys still is on my mind... without a blog poast needed. Haha.
* agent_white ponders what vivcation means
<Ox0dea> Well, "vivify" means to bring to life.
meph has quit [Quit: Leaving.]
<agent_white> Ohhh.
<arup_r> need a help!
<agent_white> I see!
<[k-> >> 'hello''world'
<ruboto> [k- # => "helloworld" (https://eval.in/392347)
<arup_r> >> "abbbbbxx".bytes
<shevy> aha!
<ruboto> arup_r # => [97, 98, 98, 98, 98, 98, 120, 120] (https://eval.in/392348)
<[k-> tada! I just learnt thT
<agent_white> [k-: wait... stawp.
<Ox0dea> agent_white: I don't know that it's the greatest term for it, but it's the one that stuck.
<[k-> that*
<arup_r> how do I get string from bytes ?
danielpclark has quit [Remote host closed the connection]
<Ox0dea> arup_r: .map(&:chr)
<shevy> I just found the culprit for my encoding issues... I did a File.readlines() without :encoding argument
<Ox0dea> arup_r: And then a .join.
<agent_white> Ox0dea: It wasn't but that term made it stick enough for it to become a stickynote on my desk :P
serivich has joined #ruby
<agent_white> [k-: What's the term for that?
<Ox0dea> arup_r: foo = [97, 98, 99]; [foo.map(&:chr).join, foo.pack('C*')]
<Ox0dea> >> foo = [97, 98, 99]; [foo.map(&:chr).join, foo.pack('C*')]
<ruboto> Ox0dea # => ["abc", "abc"] (https://eval.in/392349)
<Ox0dea> arup_r: Then you want 'C*'.
<[k-> >> Regexp.union "hello", " world", "fellas"
<agent_white> [k-: string interpolation?
<ruboto> [k- # => /hello|\ world|fellas/ (https://eval.in/392350)
<agent_white> Err... ?
<arup_r> woooww
<arup_r> thanks
* agent_white rummages for sticky notes in his desk
<[k-> it's just another form of string concatenation
stamina has quit [Quit: WeeChat 1.2]
<Ox0dea> [k-: Inherited from C, no less.
<[k-> :o
<agent_white> Ohhh
JDiPierro has joined #ruby
<agent_white> That's funky.
<arup_r> Ox0dea: why not `c*` ?
<arup_r> actually I don't really understand how these pack/unpack actually works ......
<arup_r> that's why asked
<shevy> there is some unpack table
<Ox0dea> arup_r: In your case, since the bytes have been XOR'd with other ASCII data (the Douglass quotation), the difference between 'C' and 'c' for #pack doesn't really matter.
<shevy> that tells which rules apply
<shevy> All bits are not created equal.
<Ox0dea> shevy: That's sort of the whole point. :)
<agent_white> But Mom said...
<shevy> Mom said: Eat your cake.
<darkf> but not have it too
<shevy> Dad said: Leave me alone and learn Ruby.
CustosLimen has joined #ruby
<Ox0dea> You can (have ^ eat) your cake.
khebbie has quit [Quit: Textual IRC Client: www.textualapp.com]
vyorkin has joined #ruby
niemcu has quit [Ping timeout: 264 seconds]
GBrawl has quit [Quit: (null)]
<Ox0dea> >> (-255..255).select { |x| [x].pack('C') != [x].pack('c') }
<ruboto> Ox0dea # => [] (https://eval.in/392351)
vyorkin has quit [Read error: Connection reset by peer]
dfockler has joined #ruby
<Ox0dea> There's no difference at all between 'C' and 'c' on modern systems, it seems.
<shevy> guys I have a formal question... let me first put up some example code
<Ox0dea> Or else that should be considered a bug.
lordkryss has quit [Quit: Connection closed for inactivity]
vyorkin has joined #ruby
<shevy> so I have a big module, which just has different array-constants; lots of them http://pastie.org/10272838
<shevy> I am wondering how to best access these
FernandoBasso has joined #ruby
<shevy> right now I sorta do: Foo:ARRAY1
<shevy> oops
<shevy> Foo::ARRAY1
<arup_r> shevy: that's a good blog.. I read it half, btw.. I'll read the later part at night
<shevy> now I am wondering, I could provide class methods there instead
<shevy> hmm
<Ox0dea> shevy: Are you doing language-aware case manipulation for the sake of learning?
<shevy> nah, it's just a lot of data gathered in one module here; 1.3 MB so far
dfockler has quit [Ping timeout: 248 seconds]
<mwlang> ugh…pack and unpack…takes me back to getting spreadsheet gem to work with Ruby 1.9
<shevy> I think I know what I'll do... I just define []
<Ox0dea> Well, I just meant that the unicode gem exists and provides "mostly correct" Unicode-aware case manipulation.
<shevy> I don't use unicode
<mwlang> (for Excel read/write)
nolic has joined #ruby
<mwlang> reading and writing binary files with Ruby is probably the hardest thing to get right in Ruby.
<Ox0dea> mwlang: But there's a gem?
<wasamasa> uh, yeah
<Ox0dea> It's been around for a long time.
<shevy> huh
<shevy> didn't bnagy also write something like bindata
<mwlang> Ox0dea: didn’t know about it at the time and ‘spreadsheet’ didn’t use it.
<Ox0dea> Yes, I remember using spreadsheet, but I also brought in bindata, because why not?
toiletlips has joined #ruby
kirun has joined #ruby
<mwlang> Ox0dea: yeah, this is a nice gem — bookmarked!
* Ox0dea has met his MINASWAN quota for the day.
<Ox0dea> I kid, of course.
<Ox0dea> >> minaswan_quota = [1].cycle; minaswan_quota.size
<ruboto> Ox0dea # => Infinity (https://eval.in/392352)
n008f4g_ has joined #ruby
codecodecode123 has joined #ruby
<[k-> quota is just a number at most...
<arup_r> I think I don't need to delete the file, as I am opening it in `wb` mode right ? this is an extra work https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L14 ?
<codecodecode123> hi, i am trying to require a file in the same folder the script is, but it cannot load the file. can somebody help me?
roolo has quit [Remote host closed the connection]
<Ox0dea> arup_r: Opening it in 'w'rite mode will remove the contents.
<arup_r> yup.. so no need to delete it...
<Ox0dea> codecodecode123: Either require './foo' or require_relative 'foo'.
<codecodecode123> okay, thank you very much!
<Ox0dea> codecodecode123: But it's better to modify $LOAD_PATH to contain the directories you need it to.
<codecodecode123> whats that?
<Ox0dea> What it says on the tin, really.
JDiPierro has quit [Remote host closed the connection]
vyorkin has quit [Ping timeout: 264 seconds]
<wasamasa> binary-parser supports looping for a specified size
<codecodecode123> okay
mwlang has quit [Quit: mwlang]
<wasamasa> which is actually a pretty important thing to have for asset files
Scroff has joined #ruby
<codecodecode123> okay, thank you!
<Ox0dea> arup_r: Well, an empty file is not the same as a non-existent one.
<Ox0dea> I take it the difference doesn't matter for your purposes just now, but it's worth keeping in mind.
Indian has joined #ruby
<codecodecode123> 0x0dea: $LOAD_PATH is a read-only variable (NameError)
<shevy> >> $LOAD_PATH.class
<ruboto> shevy # => Array (https://eval.in/392353)
<arup_r> yes.. you are right..
<arup_r> Ox0dea:
<arup_r> I got your point
<codecodecode123> thanks shevy
<[k-> Ox0dea did you write the blog :o
Ropeney_ has joined #ruby
<[k-> or did you get most of your ideas from it
<arup_r> I should delete it... bcoz php did it.. may be it is relevant to their code.. so let the delete file method be there
brendan-_ has joined #ruby
<codecodecode123> 0x0dea: but now it cannot load the module in the required file!
<codecodecode123> uninitialized constant
adamski2600 has joined #ruby
brendan-_ is now known as brendan-
<arup_r> Ox0dea: as you can see they are creating a file called `.cgz` ... I don't know why although.. i think I can create `.gz` file right?
<Ox0dea> codecodecode123: You cannot reassign $LOAD_PATH, but you can push into it.
<codecodecode123> no, i did that
<Ox0dea> arup_r: Deleting a file right before writing to it is indeed wasteful; you needn't copy the PHP code's mistakes.
<codecodecode123> but it wont load the module in it
<shevy> you still have to require or load the file; once it is loaded up that way, the module will be known
<Ox0dea> arup_r: Yes, the Ruby standard library provides gzip support; require 'zlib'.
<codecodecode123> ok, thanks
<Ox0dea> codecodecode123: $LOAD_PATH tells Ruby where all to look when you require 'foo'.
<arup_r> ok.. thanks
<shevy> you can test-try it in irb btw; just create a file foo.rb; with module Foo; end in it; then require that file from irb, then try to type: Foo
<shevy> in irb
solocshaw has quit [Ping timeout: 255 seconds]
<Ox0dea> [k-: No, I am not Jan Lelis, but Idiosyncratic Ruby did teach me quite a few things.
<_blizzy_> anyone know any relative time gems in ruby? like give it a unix time stamp, and it returns "5 hours ago" or something?
c355E3B has joined #ruby
<Ox0dea> _blizzy_: I'd be surprised if such a thing weren't in ActiveSupport somewhere.
<apeiros> _blizzy_: rails has that I think. might be in active_support
<codecodecode123> shevy: i required the file and pushed the load path, it still won't work!
<shevy> worked for me just now
<_blizzy_> apeiros, Ox0dea, thxs.
<shevy> did you require it like: require './foo.rb' ?
<codecodecode123> ohhh
<Ox0dea> No!
<shevy> at the least irb should give you an error message
<codecodecode123> now it works
<shevy> \o/
<Ox0dea> You shouldn't have to require it like that if you've modified $LOAD_PATH properly.
<codecodecode123> i did 0x0dea
<Ox0dea> Hm... must be the computer that's wrong.
<codecodecode123> whatever, it is solved
<shevy> :)
<Ox0dea> "Solved".
<codecodecode123> thanks
<shevy> \o/ !
tvw has quit []
<Ox0dea> You're proud of having given a man a poisoned fish.
Ropeney_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> he is a vegetarian
<Ox0dea> Ah, my bad.
<codecodecode123> umm, so it isn't solved
<shevy> but in irb it worked!
<codecodecode123> i am not a vegetarian
<Ox0dea> Then shevy's trying to kill you.
<codecodecode123> i didnt test in irb
<yorickpeterse> HAPPY BIRTHDAY AMERICA
<shevy> oh damn
<shevy> I thought he tried it in irb
<[k-> DUN-DUN DUN-DUN DADADADADA
Spami has quit [Quit: This computer has gone to sleep]
vyorkin has joined #ruby
<codecodecode123> oh, for god's sake, CANT I GET A WORKING BEST PRACTICE ANSWER FOR ONCE
<sevenseacat> WHY ARE WE SHOUTING
<shevy> best practice is to install into a gem-directory structure layout; then you can just do: require 'name_of_your_project' and everything works just fine
sepp2k has joined #ruby
<codecodecode123> oh
<codecodecode123> but where do i put it
<shevy> but as said above, for me it works in irb just fine as well; I also have a symlink towards all my ruby files, so I can do like: require 'x/tools/ascii_counter.rb'
JDiPierro has joined #ruby
<[k-> shevy replaced GNU utils with Ruby
<shevy> hmm nah
<shevy> have you looked at how many options they support?
<shevy> that's literally years of replacement-work!
<Ox0dea> grep's manpage was 20 lines long in the 70s.
<codecodecode123> good, it works!
<apeiros> Ox0dea: are you that old or do you just enjoy reading old manuals? :)
abuzze has joined #ruby
<Ox0dea> apeiros: I briefly skimmed a talk by Stephen Bourne in which he talked about the sorts of things they dealt with when writing the original sh.
<apeiros> ooooh
<apeiros> that sounds like an interesting talk!
<Ox0dea> He lamented the unfortunate "modernity" of today's tools.
vyorkin has quit [Ping timeout: 250 seconds]
vdamewood has quit [Quit: Life beckons.]
psy_ has joined #ruby
<apeiros> thx
<Ox0dea> Looks good. Your "simepl_xor" isn't correct, though.
sharpmachine has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_blizzy_> hmm
<_blizzy_> I can't require 'action_view'
<agent_white> shevy: What's a good link for a solid "gem-dir-struct-layout" ? I've been trying to follow it, but mostly have found 'older' articles to follow... though they mostly resemble the the most recent ones.
<arup_r> Ox0dea: why.. point me where it is wrong..
<shevy> agent_white I think the old articles cover like 90% of what is still used today
<shevy> I myself keep my yaml files in yaml/ :D
<Ox0dea> arup_r: You're XOR'ing every content byte with every byte of the key.
<arup_r> I am overwhelmed inside the php :/
<Ox0dea> arup_r: You're supposed to cycle the key.
<shevy> and I tend to have a test/ dir rather than a spec/ dir
<arup_r> that's why php did
<Ox0dea> No.
<arup_r> *how
<shevy> arup_r can't you just replace it step by step?
<shevy> yes this makes me sad
<arup_r> i am doing step by step only shevy :
<jhass> agent_white: the bundler gem template is fairly solid, I just disagree with the `git ls-files` stuff
<shevy> but I mean
<shevy> take other things there:
<shevy> function EndsWith($Haystack, $Needle) {
<Ox0dea> arup_r: They're cycling the key in that code.
<shevy> that's already solved in main ruby right? either .end_with? or if it's an array, you can apply .any? or .map
<agent_white> shevy: Ohhh.. okey doke! Just the... /bin/thing ... /lib/thing.rb... /lib/thing/{foo,bar,baz}.rb ?
<shevy> agent_white yeah!
<shevy> I rarely use bin/ - only when it's something larger
<shevy> and you need commandlets... like: foobar edit config or just foobar edit, where there is bin/foobar
<agent_white> The biggest issue I've found has been with requiring files... the "require" vs "require_relative" ... etc.
Akagi201 has joined #ruby
<Ox0dea> arup_r: Translating code line-by-line rather than making sure you understand what it's doing before you implement it is a recipe for, if not disaster, at least a headache or two.
<shevy> you only need require() if you have it structured like a gem
sharpmachine has quit [Ping timeout: 252 seconds]
<jhass> agent_white: if you got a Gemfile for your gem just bundle exec, else just ruby -Ilib
<jhass> and always use require "foo"
<Ox0dea> arup_r: Take a step back, mate. Do you know how to XOR two strings?
<arup_r> no.. and honestly I don't know why they are XORing there.. although :/
<Ox0dea> It's a cheap attempt at "encryption".
<Ox0dea> Do you, erm, know what XOR is?
yfeldblum has quit [Ping timeout: 248 seconds]
<jhass> a god of the vikings, obviously
<arup_r> yes.. it is boolean gate ops like AND, OR
<Ox0dea> arup_r: Right, but the thing about XOR is that it's reversible; XORing a with b will give you back a if you XOR it with b again.
dgutierrez1287 has joined #ruby
gix has quit [Ping timeout: 250 seconds]
<agent_white> The 'structuring like a gem' part is my issue I 'spose. No de-facto way of doing it... as in some say to modify the $LOAD_PATH, others say that if you need to do that, you're doing it wrong.
Akagi201 has quit [Ping timeout: 264 seconds]
solocsha1 has joined #ruby
<Ox0dea> arup_r: So, you know you have to perform that operation on the bytes of the two strings, but what do you do when the strings are not the same length?
phillipsimmonds has joined #ruby
<arup_r> no idea...
<Ox0dea> Then godspeed, mate.
jud^ is now known as jud
jud has quit [Changing host]
jud has joined #ruby
phillipsimmonds has left #ruby [#ruby]
dgutierrez1287 has quit [Ping timeout: 252 seconds]
gix has joined #ruby
<_blizzy_> could anyone help me figure out why I'm getting 'undefined method acts_like? for 0:Fixnum' https://gist.github.com/NotBlizzard/00a66bd2f43465d87bdf
ropeney has quit [Ping timeout: 246 seconds]
<[k-> probably the gem
<[k-> it requires active support hackery
<sevenseacat> with no error or backtrace? no.
The_Phoenix has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
<[k-> but he didn't call acts_like?
<agent_white> jhass: I found a few projects on github to get the gist of it. Thanks for the tip on "ruby -Ilib" though, never heard of it. :D
Alina-malina has joined #ruby
<_blizzy_> stacktrace. http://pastie.org/10272870
<_blizzy_> :/
<_blizzy_> anyone know a gem that can do relative time instead of action_viwe
<arup_r> Ox0dea: let me read in google.
<_blizzy_> *action_view
CatMartyn has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
<[k-> ?google _blizzy_
<ruboto> _blizzy_, I don't know anything about google
<[k-> :/
codecodecode123 has quit [Quit: Page closed]
<jhass> [k-: suggest a good one
<_blizzy_> [k-, ok.
<_blizzy_> thxs.
bhuvan_aurora has quit [Ping timeout: 246 seconds]
bhuvanaurora has quit [Ping timeout: 252 seconds]
<[k-> we all know I hardly use gems, and other Ruby tooling
Yzguy has joined #ruby
<[k-> I have this in my todo list: create a relative time logger
abuzze has quit [Remote host closed the connection]
<_blizzy_> my todo list is: make a todo list.
<[k-> you can use Time
<[k-> Time.now - (time)
<[k-> and then do some math
Alina-malina has joined #ruby
Yzguy has quit [Ping timeout: 264 seconds]
<_blizzy_> welp, guess I gotta do this from scratch.
<Ox0dea> _blizzy_: 86,400 seconds in a day.
abuzze has joined #ruby
<_blizzy_> Ox0dea, 525600 minutes in a year.
<Ox0dea> _blizzy_: I think you're ready.
pjsim has joined #ruby
<[k-> DUN-DUN, DUN-DUN, DADADADADADADA
abuzze has quit [Remote host closed the connection]
<[k-> _blizzy_ has graduated!
<Ox0dea> _blizzy_: Do you need precision to the femtosecond?
<Ox0dea> "4 femtoseconds ago"
<_blizzy_> Ox0dea, no.
<[k-> plank?
<_blizzy_> I need like minute precision
<[k-> Planck?
<Ox0dea> Oui.
<_blizzy_> planck is the shortest time possible
<Ox0dea> Where will you be 8 planck seconds from now?
<apeiros> Ox0dea: which now are you referring to?
<Ox0dea> apeiros: Is there really such a thing?
<apeiros> subatomically precise coordinates please :)
<Ox0dea> I'm afraid those would make the timings inaccurate.
<Ox0dea> I can only tell you where I am xor how fast I'm going. :(
<apeiros> damn you, heisenberg!
<_blizzy_> screw this I'll work on this when I come back from yugioh.
<sevenseacat> lol
<shevy> :D
sankaber has joined #ruby
<Ox0dea> _blizzy_: You should into modular division sometime.
ropeney has joined #ruby
<_blizzy_> Ox0dea, ok. :)
<Ox0dea> _blizzy_: I bet I could guess how you pronounce my nick.
<_blizzy_> I don't pronounce it
<[k-> :o
<Ox0dea> ...
<_blizzy_> O x zero d e a
<Ox0dea> Vile heathen.
<[k-> Zero-x-Idea
<Ox0dea> >> [:idea] * 0
<ruboto> Ox0dea # => [] (https://eval.in/392373)
<[k-> lel
IanV0rn2341 has quit []
serivich has quit [Ping timeout: 248 seconds]
pjsim has quit [Quit: leaving]
SCHAAP137 has joined #ruby
<shevy> does anyone know whether there was any important change between ruby 1.8.x and the current ruby version in regards
<shevy> to alias_method versus alias? For some reason, I seemed to use alias_method in the past, whereas more recently, I seem to confine myself towards just alias
nettoweb has joined #ruby
<[k-> alias_method is better
<[k-> some article said it
<[k-> so I believed it
<Ox0dea> That alias_method is a method call means it's more "powerful", but you probably shouldn't be doing anything too crazy with aliases anyway; alias works just fine.
<shevy> [k- yeah kinda
ramfjord has joined #ruby
Akagi201 has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest27732 has joined #ruby
<Guest27732> is there any machine learning library for ruby?
<[k-> there are a few
<[k-> awesomeruby.com lists a few
<Guest27732> oh then maybe its a great time devloping one and become a rockstar!
timonv has joined #ruby
A205B064 has joined #ruby
Akagi201_ has joined #ruby
howdoi has joined #ruby
shinnya has joined #ruby
<shevy> :P
Akagi201 has quit [Ping timeout: 244 seconds]
<Guest27732> ;)
Guest27732 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 41.0a2/20150703004018]]
yh has joined #ruby
weemsledeux has joined #ruby
gizmore has joined #ruby
OrbitalKitten has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3> Guest27732: that could be fun for you... how's your statistics and epistemology?
<Ox0dea> Vacant, vanished.
<workmad3> heh :)
<workmad3> had to run away for a bit... missed him leaving
serivich has joined #ruby
sharpmachine has joined #ruby
niemcu has joined #ruby
<[k-> Ox0dea is one of the most high levelled person I know
<Ox0dea> "High levelled"?
<jhass> skilled
<Ox0dea> Pfft.
<[k-> you used vacant instead of none
<Ox0dea> [k-: I was quoting V for Vendetta. :(
<[k-> and vanished instead of gone!
<jhass> oh
<Ox0dea> I do know some purdy fancy words, though.
<jhass> "British"
<jhass> not skilled
<shevy> workmad3 you had to run away from your computer?
<workmad3> shevy: yeah... amazon delivery
<shevy> he is buying more and more books to become cleverer by the day!
<Ox0dea> How best to "reduce with object"?
<workmad3> Ox0dea: do you want `each_with_object` by any chance?
<Ox0dea> Nope.
<Ox0dea> I want to combine #reduce and #with_object.
<jhass> yeah, that falls apart for some reason
<jhass> I noticed that too
sharpmachine has quit [Ping timeout: 252 seconds]
<Ox0dea> It's because #reduce can't do anything sensible without being given a block.
aldani has joined #ruby
<jhass> what's the object, array by chance?
krz has quit [Quit: WeeChat 1.0.1]
<Ox0dea> Oui.
<jhass> then you could fake it with .last
<jhass> perhaps
aldani has left #ruby [#ruby]
arup_r has quit [Ping timeout: 248 seconds]
dgutierrez1287 has joined #ruby
<Ox0dea> That it's nested might cause some trouble in the parameter list, but that should do.
* [k- goes back to reddit
<Ox0dea> [k-: What's left of it anyway.
davedev24_ has joined #ruby
<workmad3> Ox0dea: collection.each.with_object(blah).reduce { |acc, (value, object)| ... }
<[k-> Ox0dea: I don't visit those subreddits
<[k-> so I am fine
scripore has joined #ruby
<[k-> I don't have any other sources for programming news anyway
michael_mbp has quit [Excess Flood]
<Ox0dea> workmad3: Yep, that works nicely, but each_cons(2).with_object fits this particular problem a little better.
FernandoBasso has quit [Ping timeout: 256 seconds]
dstarh has joined #ruby
michael_mbp has joined #ruby
jesterfraud has joined #ruby
xcesariox has joined #ruby
krz has joined #ruby
<Tarkers34|2> is the most efficient way to update the last item of an array ' array[array.length] - :new_var ' ?
<adaedra> =, not -, no?
<Mon_Ouie> array[array.length] is not the last element of an array, it's one after the last element
houhoulis has quit [Remote host closed the connection]
<shevy> Tarkers34|2 array[-1] = 'bla' # should work
<Mon_Ouie> the last element can be referred to as array[-1]
<Ox0dea> Tarkers34|2: But hey, nice OBOE.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> OBOE?
<Ox0dea> Off-by-one error.
<adaedra> :)
<[k-> That is obsure ;-;
FernandoBasso has joined #ruby
<Tarkers34|2> haha thanks...I did google :P
jesterfraud has quit [Ping timeout: 246 seconds]
<Tarkers34|2> Ox0dea ^
<Ox0dea> Sure thing.
<adaedra> The one hardest problem in programming is concurrent access and off-by-one-errors.
<shevy> and documentation
<Mon_Ouie> Naming things!
<Ox0dea> ^
<adaedra> >_>
ndrei has quit [Ping timeout: 246 seconds]
<adaedra> <_<
<Ox0dea> Those are both valid Ruby.
<Ox0dea> I should do something with that. :)
<[k-> we don't even name things in haskell
<Ox0dea> ...
<adaedra> Ox0dea don't name things in Ruby
<[k-> >> >_>
<ruboto> [k- # => /tmp/execpad-c8ae86dc30ea/source-c8ae86dc30ea:2: syntax error, unexpected '>' ...check link for more (https://eval.in/392391)
ramfjord has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
<Ox0dea> [k-: I meant syntactically.
<[k-> valid Ruby?
<adaedra> >> _ = 2; 1 >_> 3
<ruboto> adaedra # => undefined method `>' for false:FalseClass (NoMethodError) ...check link for more (https://eval.in/392392)
<Mon_Ouie> >>  def  ;   end;  
<ruboto> Mon_Ouie # => /tmp/execpad-9c1e6ab2445e/source-9c1e6ab2445e:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/392393)
<Ox0dea> Poor ruboto.
jesterfraud has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<adaedra> yep.
<Ox0dea> Still valid syntax, just needs > defined on the booleans.
<Ox0dea> [k-: Like in Haskell!
_jesterfraud has joined #ruby
<adaedra> True, true.
<adaedra> jesterfraud is unstable today.
jesterfraud has quit [Disconnected by services]
_jesterfraud is now known as jesterfraud
<Ox0dea> Mon_Ouie: Yes!
_jesterfraud has joined #ruby
<Ox0dea> I made a thing that lets you chain the four prefix operators arbitrarily.
<Ox0dea> s/prefix/unary/
Indian has quit [Ping timeout: 255 seconds]
<[k-> in order to have > on booleans, you need to define the instance of Bool for the Ord typeclass
arup_r has joined #ruby
<shevy> guys
_blizzy_ has quit [Ping timeout: 246 seconds]
<Ox0dea> >> class FalseClass; include Comparable; def <=>; #...; end end
<ruboto> Ox0dea # => /tmp/execpad-3856b3dc1c57/source-3856b3dc1c57:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/392395)
<Mon_Ouie> ?guys
<ruboto> we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<shevy> this is craziness time again on #ruby
<Ox0dea> [k-: Stupid comment mucked things up, but you get the idea.
JDiPierro has joined #ruby
nfk has quit [Quit: yawn]
<[k-> huehuehue
<[k-> no 1line comments
<Ox0dea> No breakable one-line comments, rather.
<Ox0dea> A strange oversight, in my opinion.
<jesterfraud> adaedra, I was wondering why it told me that I authenticated as myself, then discovered I opened my IRC client twice, resulting my split personalities
<adaedra> :)
<[k-> >> /* hello */ 1
<ruboto> [k- # => /tmp/execpad-9aece28689ee/source-9aece28689ee:2: target of repeat operator is not specified: /* hell ...check link for more (https://eval.in/392396)
_jesterfraud has quit [Client Quit]
<[k-> wait we don't have /*?
<sevenseacat> no
<shevy> this is not C!
el3k0n has quit [Ping timeout: 264 seconds]
<[k-> what are multiline comments then?
<[k-> ==begin
<sevenseacat> =begin =end
<[k-> ==end?
<[k-> ah
<Mon_Ouie> Although people just use '#' at the beginning of each line
<sevenseacat> typically, yeah.
<Ox0dea> It's so weird that =begin and =end have to be the very first things on the line; it's pretty much the only thing Ruby nicked from Perl and made worse.
_blizzy_ has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmodlol has joined #ruby
<[k-> parse.c is complicated enough :p
Dominique_ has joined #ruby
<Ox0dea> parse.y, rather.
<Mon_Ouie> Well, parse.c is generated by a tool, not written by a human :p
aryaching has quit [Read error: Connection reset by peer]
<[k-> >> a=begin;'hi';end
<ruboto> [k- # => "hi" (https://eval.in/392397)
chouhoulis has joined #ruby
<Ox0dea> >> def foo; end if false
<ruboto> Ox0dea # => nil (https://eval.in/392398)
<shevy> if only eam would be awake to join the discussion about parse*
sdothum has joined #ruby
<Mon_Ouie> >> begin def foo; end end while false; foo
<ruboto> Mon_Ouie # => nil (https://eval.in/392406)
<arup_r> How can I uncompress a .gz file ? https://github.com/rubyzip/rubyzip wouldn't do that
<[k-> >> a =begin;'hi';end # this even
<ruboto> [k- # => "hi" (https://eval.in/392407)
<arup_r> the gem does work only with .zip files
<jhass> arup_r: with zlib in stdlib
<Ox0dea> [k-: Ruby could still support =begin not at the start of the line by checking that it's only preceded by whitespace.
aryaching has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
<arup_r> jhass: the lib doesn't have any extract to method
<[k-> that would make block comments cleaner I guess
dgutierrez1287 has quit [Remote host closed the connection]
ramfjord has joined #ruby
<Mon_Ouie> "any extract to method"? It has a GzipReader class
<arup_r> looking for a https://github.com/rubyzip/rubyzip#reading-a-zip-file method for .gz files
<Ox0dea> gzip is not an archive format.
yh has quit [Ping timeout: 276 seconds]
<Mon_Ouie> You may be confusing gzip and tar
symm- has joined #ruby
nfk has joined #ruby
Scroff has quit [Remote host closed the connection]
tkuchiki has joined #ruby
elia has joined #ruby
symbol has joined #ruby
<arup_r> nah...... i'm not getting it... how to do..
<symbol> j
<jhass> k
<symbol> heh, accidentally cleared my terminal
Scroff has joined #ruby
<symbol> I came across this example in the ruby docs
<symbol> "hello".gsub(/(?<foo>[aeiou])/, '{\k<foo>}') #=> "h{e}ll{o}"
<[k-> lel
<jhass> arup_r: be specific, do you have some gzipped data you want to read or do you have a gzipped tarball that you want to extract to some location or...
JDiPierro has quit [Remote host closed the connection]
<symbol> I'm having trouble understadning the relation between ? and \k - can someone explain?
<Mon_Ouie> (?<foo>...) in a regexp creates a captured group named foo
<jhass> symbol: (?<foo>...) assigns the name foo to the capture group, \k<foo> references the capture group with the name foo, like \1 references the first one
<[k-> \k refers to the named_capture whils ?<> defines it
<arup_r> I have created a .gz file like this https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L20 .. now I want to extract it
<arup_r> it contains a .xml file..
<arup_r> which I need
<jhass> arup_r: just use the GZipReader then
<Ox0dea> >> /(?<foo>\w+)/ =~ 'wtf'; foo
<ruboto> Ox0dea # => "wtf" (https://eval.in/392408)
<Ox0dea> symbol: ^ Beware.
<symbol> Ah that makes so much sense now! I wasn't able to understand that from the docs.
lordkryss has joined #ruby
Dominique_ has quit [Quit: Leaving]
<Mon_Ouie> Do notice the relpacement string is written with single quotes by the way, i.e. '\k' is a 2-character string (an actual backslash followed by the letter 'k')
<symbol> Why does the docs refer to it as //k?
<symbol> " \\k<n>, where n is a group name."
IanV0rn2341 has joined #ruby
<symbol> Whoops typo - meant \\k in my question
<Ox0dea> The documentation uses one backslash.
aryaching has quit []
<[k-> fun fact: there is also ?'foo' and ?"foo" which are also the same
<[k-> \k' and \k" exist too
<symbol> Very interesting - thanks for helping me out!
<[k-> should I /nick myself \k< :D
<symbol> Been working through code puzzles to prep for a job interview. Learning some cool things about Ruby I don't use on a daily basis
<[k-> more unclosed brackets!
ramfjord has joined #ruby
OrbitalKitten has joined #ruby
nofxx has quit [Ping timeout: 252 seconds]
failshell has joined #ruby
JDiPierro has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 246 seconds]
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
sharpmachine has joined #ruby
<jhass> but yeah, I never had an actual need for such stuff myself
lkba has joined #ruby
jesterfraud has quit [Quit: Leaving]
<exadeci> jhass: so I should call the class with the method_missing and have it send on the class ?
tkuchiki has joined #ruby
<jhass> real_thing = MyHooks.new(RealThing.new)
eGGshke has quit [Read error: No route to host]
symbol has quit [Ping timeout: 248 seconds]
eggoez has quit [Ping timeout: 256 seconds]
gix has quit [Ping timeout: 252 seconds]
<arup_r> jhass: I tried as you said https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L32 .. while printing the data in terminal to see if they are XML string or not, got some unreadble output
<arup_r> like `�d�s�X6"����v�;��`...
tkuchiki has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 265 seconds]
<jhass> arup_r: you didn't redo the xor yet
scripore has joined #ruby
yh has joined #ruby
<arup_r> ok.. I am trying to write as per https://gist.github.com/aruprakshit/ba7b0eb50c4c1ff418f3#file-e24-php-L554 .. Bu I don't see the redo there.. am I missing something ?
<jhass> it's right in line 580?!
jesterfraud has joined #ruby
jakobhans has joined #ruby
gix has joined #ruby
konsolebox has joined #ruby
<arup_r> umm.. thanks.
ixti has joined #ruby
<arup_r> what a eye you have ... :)
<jhass> what do I get for looking at PHP code for you?
kraljev11 has joined #ruby
abuzze has joined #ruby
<arup_r> I tried print simple_xor(gz.read.bytes).pack("C*") still.. the same unreable output...
endash has joined #ruby
<[k-> jhass: nothing :(
<[k-> you read vile code for nothing
<arup_r> jhass: only :) ;) :)
<[k-> poor you
<arup_r> indeed I am :/
<[k-> I didn't open that link at all
scripore has quit [Quit: This computer has gone to sleep]
ixti has quit [Ping timeout: 252 seconds]
tsou has joined #ruby
john__ has joined #ruby
<exadeci> jhass: the objective I had with this was to check if a bool was true before calling a method and if the changed values after were within the bounds, the fact that you said that you never needed such stuff made me wonder what you would have done in this case
abuzze has quit [Ping timeout: 246 seconds]
<jhass> I write tests to test my code
john__ has quit [Client Quit]
gizless has joined #ruby
<[k-> but do you write tests for the tests that you write?
kkeuning has joined #ruby
<Ox0dea> We simply rely on the fact that our test frameworks are themselves tested.
kkeuning has quit [Max SendQ exceeded]
<[k-> tests are simply Ruby code after all
<[k-> but did you use the framework correctly ;)
<Ox0dea> Green means go, right?
gizmore has quit [Ping timeout: 264 seconds]
iamninja has quit [Read error: Connection reset by peer]
<jesterfraud> test "my application works perfectly" do; true; end;
AndyBotwin has quit [Quit: Leaving]
<jesterfraud> there, I tested my app
krz has quit [Ping timeout: 256 seconds]
kkeuning has joined #ruby
<arup_r> jhass: if I manually unarchive the file .gz I can see lots of files and the .xml file also inside it..
<arup_r> may be my code is wrong.. I need to unarchive the .gz file..
ndrei has joined #ruby
<Ox0dea> That is a nonsensical venture; gzip is not an archive format.
<[k-> what is it?
<sevenseacat> its a compression format isnt it?
<Ox0dea> Yes.
<sevenseacat> right.
<sevenseacat> thats why you have .tar.gz - archive and compress
<Ox0dea> Precisely.
<[k-> so the term is to uncompress?
<jhass> arup_r: http://paste.mrzyx.de/phcmidpjb prints true, I guess your assumption that it's XML is simply wrong
<Ox0dea> Or "inflate".
<jesterfraud> decompress, yeah
<arup_r> jhass: Yes.. I just unarchived it manuall.. I find it has a lots of other files and with that one file is .xml
eggoez has joined #ruby
<Ox0dea> arup_r: If you can extract its contents, you're not dealing with a gzipped file.
lkba has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<jhass> well, a tarball is a file too after all
<Ox0dea> It's not "just" a gzipped file.
<arup_r> well.. so I need to create then a .tar.gz file and then extrat them using http://dracoater.blogspot.in/2013/10/extracting-files-from-targz-with-ruby.html
<Ox0dea> arup_r: Do you know how to determine a file's type?
imajes has quit [Ping timeout: 252 seconds]
<arup_r> yes
<arup_r> File.basname('f', File.extname('f'))
mary5030 has joined #ruby
ivanskie has joined #ruby
Jackneill has quit [Quit: Leaving]
Feyn has quit [Quit: Leaving]
<Ox0dea> arup_r: No, I meant with your file explorer.
<arup_r> ok..
tkuchiki has quit [Remote host closed the connection]
<arup_r> let me check it
dgutierrez1287 has joined #ruby
<arup_r> one min.. I know
<Ox0dea> A file's extension does not necessarily tell you what kind of file it is.
tkuchiki has joined #ruby
<[k-> it tells you what it is meant to be treated as
<[k-> so why not
<Ox0dea> Because people can name files whatever the hell they please?
<[k-> >.>
<arup_r> it is Gzip archive
closer has quit [Ping timeout: 272 seconds]
genpaku has quit [Ping timeout: 252 seconds]
<Ox0dea> What kind of archive?
konsolebox has quit [Ping timeout: 252 seconds]
imajes has joined #ruby
<arup_r> not mentioned
genpaku has joined #ruby
closer has joined #ruby
<jhass> arup_r: run the file utility on it
MyMind has joined #ruby
michael_mbp has quit [Excess Flood]
<jhass> file foo.whatever
Sembei has quit [Ping timeout: 244 seconds]
michael_mbp has joined #ruby
<arup_r> resource.gz: gzip compressed data, from Unix, last modified: Sat Jul 4 19:42:53 2015
DLSteve has joined #ruby
<Ox0dea> arup_r: Now `gunzip resource.gz` and `file resource`.
<arup_r> resource: Zip archive data, at least v2.0 to extract Zip archive data, at least v2.0 to extract
<Ox0dea> Ha!
<Ox0dea> You've got yourself a foo.zip.gz.
<Ox0dea> Brilliant.
<[k-> huh?
AndyBotwin has joined #ruby
<arup_r> Is this OS dependent.. ?
<arup_r> means If I run it in someone else some other OS... can be changed ?
<Ox0dea> It's just a weird combination is all.
<arup_r> I am runiing SUSE.. and producton is Ubuntu.. so chances to break ?
<Ox0dea> No, they're both standard formats, but combining them looks funny to me; I couldn't quite say why.
<arup_r> ok..
<Ox0dea> It does feel a bit like mixing Windows with *nix, in a way.
<arup_r> then the gem I said earlier will be useful I think
<arup_r> rubyzip gem
<Ox0dea> I advised you to use rubyzip quite some time ago, but yes, it wil be useful.
<Ox0dea> *will
<arup_r> humm...
<Ox0dea> As will zlib from the standard library.
<Ox0dea> We're back near the start.
<arup_r> I actually got in trap by seeing the extension of the filr
<arup_r> file
Jackneill has joined #ruby
<arup_r> yes we are
ramfjord has joined #ruby
mary5030 has quit [Remote host closed the connection]
<arup_r> ok.. so now I got my tool.. let me get back to my work..
<arup_r> but I have no idea if it will behave differently in production or not.. I'll see then.. thanks guys for your help
<Ox0dea> [k-: Don't you miss zipWith when you're doing Ruby?
<[k-> I don't even zipWith yet
konsolebox has joined #ruby
<[k-> that was like my second piece of haskell?
<[k-> (the repo I linked)
MrJiks has quit [Ping timeout: 264 seconds]
arup_r has quit [Ping timeout: 256 seconds]
krz has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
<[k-> my first piece was SkyBirdSoar/polynomial
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
gix has quit [Ping timeout: 244 seconds]
Rollabunna has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
konsolebox has quit [Remote host closed the connection]
xcesario_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gix has joined #ruby
bullcitydev has joined #ruby
riotjones has joined #ruby
DexterLB has quit [Read error: Connection reset by peer]
bullcitydev has quit [Client Quit]
Agoldfish has joined #ruby
brain_shim has quit [Ping timeout: 244 seconds]
havenwood has joined #ruby
bullcitydev has joined #ruby
sharpmachine has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
DexterLB has joined #ruby
jeramyRR has joined #ruby
TvL2386 has joined #ruby
Indian has joined #ruby
brain_shim has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
symbol has joined #ruby
symbol has quit [Client Quit]
<[k-> i could probably change |=| to this now that i have learnt about (,) https://eval.in/392444
lkba has joined #ruby
Channel6 has joined #ruby
jesterfraud has quit [Quit: Leaving]
gix has quit [Ping timeout: 256 seconds]
<shevy> haskell!!!!!!!
symm- has quit [Ping timeout: 256 seconds]
emma has quit [Ping timeout: 264 seconds]
<[k-> I got very dsl-like that I wanted it to look like sub x |=| 5 `into` polynomial
<shevy> this makes me sad
<[k-> it was written a month ago
solocsha1 has quit [Ping timeout: 255 seconds]
tkuchiki has quit [Remote host closed the connection]
lavros has quit [Ping timeout: 250 seconds]
solocshaw has joined #ruby
lavros has joined #ruby
gagrio_ has quit [Ping timeout: 255 seconds]
Pisuke has joined #ruby
cpruitt has joined #ruby
SCHAAP137 has quit [Ping timeout: 246 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
MyMind has quit [Ping timeout: 276 seconds]
endash has quit [Quit: endash]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TvL2386 has quit [Remote host closed the connection]
Yzguy has joined #ruby
ramfjord has joined #ruby
gix has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
kamichi has joined #ruby
tomphp has joined #ruby
darkf has quit [Quit: Leaving]
arup_r has joined #ruby
hubcaps has quit [Ping timeout: 252 seconds]
Nahra has quit [Remote host closed the connection]
yh has quit [Ping timeout: 255 seconds]
JDiPierro has joined #ruby
segmond has quit [Ping timeout: 246 seconds]
ndrei has quit [Ping timeout: 244 seconds]
swills has joined #ruby
<shevy> do you write more ruby code now?
swills has quit [Client Quit]
swills has joined #ruby
<[k-> no.
<[k-> I write much less than 100+ lines
<[k-> but this channel makes me write some Ruby code per day
GitGod is now known as GitGud
<pipework> Write it in your sleep.
intinig has joined #ruby
jesterfraud has joined #ruby
<[k-> never
<pipework> filthy casual. :p
gix has quit [Ping timeout: 246 seconds]
ramfjord has quit [Remote host closed the connection]
ramfjord has joined #ruby
lessless has joined #ruby
symm- has joined #ruby
ndrei has joined #ruby
jakobhans has quit []
ht__ has quit [Quit: Konversation terminated!]
dgutierrez1287 has quit [Remote host closed the connection]
gix has joined #ruby
vyorkin has joined #ruby
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
scripore has joined #ruby
jesterfraud has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 256 seconds]
segmond has joined #ruby
jaygen has joined #ruby
gix has quit [Ping timeout: 256 seconds]
<[k-> I am a casual rubyist
michael_mbp has quit [Excess Flood]
jaygen_ has quit [Ping timeout: 244 seconds]
DLSteve has joined #ruby
intinig has quit [Remote host closed the connection]
jesterfraud has joined #ruby
michael_mbp has joined #ruby
solocshaw has quit [Ping timeout: 255 seconds]
Ox0dea has quit [Ping timeout: 252 seconds]
balazs has joined #ruby
<shevy> better than a filthy rubyist!!!
<shevy> I'd like to move away from ruby but to which language?
neanderslob has quit [Ping timeout: 252 seconds]
neanderslob has joined #ruby
<[k-> something that appeals to yoi
<[k-> you*
<[k-> crystal, perhaps?
<arup_r> getting error as " Zip end of central directory signature not found (Zip::Error)" from this method.. https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L29
<shevy> dunno, crystal seems like ruby 0.0.1 :P
<[k-> OCaml?
boadie has joined #ruby
<[k-> clojure?
<[k-> do you like static typing?
<jhass> shevy: nah, it's further along than that ;)
<shevy> [k- I have no real experience with any of these
<jhass> arup_r: you have to deflate it with gzip before you can feed it into a zip reader
<[k-> which is why you will learn!
Obfuscate has quit [Ping timeout: 264 seconds]
<jhass> arup_r: despite their names zip and gzip have little to nothing to do witch each other
lavros has quit [Ping timeout: 250 seconds]
<workmad3> [k-: shevy always wants to change to a different language... the problem is that ruby is the language that he hates the least out of all the options he's tried
jesterfraud has quit [Quit: Leaving]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sharpmachine has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<[k-> racket? Rust? coffeescript? lua?
<[k-> elixir?
railsForDaiz has quit [Ping timeout: 264 seconds]
gix has joined #ruby
<jhass> I could imagine shevy to become a piet programmer with physical paint
<shevy> workmad3 well sorta, I just need to find a better language
weemsledeux has quit [Read error: Connection reset by peer]
<shevy> I wonder what would have happened if I would have picked python instead
cmisenas has joined #ruby
Bish_ is now known as Bish
<workmad3> shevy: plenty to complain about in python too... regexps are a PITA, string quoting can get weird, the OO system is all sorts of screwed up...
<jhass> you would ask #python this question now
mr_blue has joined #ruby
<shevy> they are biased!
<workmad3> shevy: you'd probably spend your days figuring out multiple inheritance ;)
<jhass> and we aren't?
sharpmachine has quit [Ping timeout: 265 seconds]
<shevy> workmad3 is not
<shevy> workmad3 python has multiple inheritance?
<workmad3> shevy: yup
<shevy> super(Third, self).__init__()
<shevy> that's like valid ruby isn't it?!
<workmad3> shevy: however, it has a deterministic algorithm for figuring out method resolution, which solves a lot of the problems that come up with C++'s MI
<shevy> aha
eggoez has joined #ruby
tomphp has quit [Quit: Textual IRC Client: www.textualapp.com]
<workmad3> shevy: however, there's no implicit `this` or `self` in python... if you write an instance method you always have to explicitly list the receiver as the first argument to the method
gix has quit [Ping timeout: 256 seconds]
<shevy> I know... this is one of the things I dislike the most
<shevy> I like that I could omit "end" though
<[k-> basically functional
<workmad3> [k-: it's closer to doing OO programming in C
<[k-> you can omit ends in Haskell!
balazs has quit [Remote host closed the connection]
<[k-> you just write an equal sign
<workmad3> [k-: python has whitespace-delimited blocks ;)
adamski2600 has quit [Remote host closed the connection]
cmisenas has quit [Ping timeout: 256 seconds]
<[k-> in Haskell, 1 space is enough
<[k-> although you get some stares
radialneon has joined #ruby
<shevy> [k- ok but what can you do in haskell
jeramyRR has joined #ruby
<workmad3> shevy: anything you want! (as long as you want no side effects>
<workmad3> </troll>
<mozzarella> shevy: you don't like ends?
<shevy> hehe
abuzze has joined #ruby
<jhass> shevy: why don't you write your own language?
<shevy> mozzarella not really
<shevy> jhass it would take a lot of time
<mozzarella> that's my favorite feature of ruby
<[k-> in Ruby you can type everything in one line
<jhass> shevy: not more than trying to retrofit a single tool to all problems one has
<shevy> jhass of course it would take a lot more time to create a new language, you didn't create one either
<[k-> jhass: shevy: xslt will solve the problem!
<mozzarella> yeah, ruby is flexible
<workmad3> shevy: you could learn APL...
<shevy> [k- ewww isn't that XML?
<[k-> hue hue hue
<workmad3> you just need something like a 1000-key keyboard with a large number of greek and mathematical symbols...
gix- has joined #ruby
<shevy> I struggled with docbook and sgml not long ago, that thing is so ugly
woodennails has joined #ruby
<workmad3> [k-: xslt doesn't solve your problems... it just hides them all behind the huge problem of XML
<[k-> haskell is ugly to non users too
vondruch has quit [Ping timeout: 246 seconds]
<shevy> <!ENTITY % dbpool
<shevy> I actually find haskell syntax not that bad
<shevy> I mean not your code [k-
<shevy> but in general :)
<workmad3> [k-: I'd also like to know which asylum the guy who thought "XML is awesome, lets turn it into a turing-complete functional programming language!" got committed to...
<[k-> my code is horrible ;-;
<workmad3> shevy: ooh, burn :D
<[k-> I tried with what I know a month ago ;-;
eggoez has quit [Ping timeout: 246 seconds]
<shevy> yeah no problem, early code is often not great
gix has joined #ruby
<shevy> we get back to you in 2 years [k-!
scripore has quit [Read error: Connection reset by peer]
<workmad3> shevy: s/early// <-- fixed it for you
<[k-> I think Polynomial looks much better than PlayerFight
abuzze has quit [Ping timeout: 246 seconds]
Muhannad has joined #ruby
<[k-> ;-;
gix_ has joined #ruby
luriv has joined #ruby
<shevy> Polynomial was your third try?
gix__ has joined #ruby
gix- has quit [Ping timeout: 265 seconds]
<[k-> it was my first
<[k-> PlayerFight was five days later
<shevy> you got worse? :)
<workmad3> [k-: tbh, if you can ever look back at code that's more than a year or so old and not find issues with it, it means either a) it was completely trivial or b) you've stopped learning things
<shevy> hmm
<[k-> can we turn Polynomial into monads ( ͡° ͜ʖ ͡°)
gix has quit [Ping timeout: 255 seconds]
Flcn has joined #ruby
gix_ has quit [Ping timeout: 256 seconds]
<[k-> that would be stupid tho
gix__ has quit [Ping timeout: 256 seconds]
eggoez has joined #ruby
vyorkin has quit [Ping timeout: 276 seconds]
GitGud has quit [Ping timeout: 248 seconds]
nobitanobi has joined #ruby
gix has joined #ruby
havenwood has quit [Ping timeout: 255 seconds]
bhuvanaurora has joined #ruby
vyorkin has joined #ruby
bhuvan_aurora has joined #ruby
doublemalt_ has joined #ruby
icebourg has joined #ruby
gix has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
Indian has quit [Ping timeout: 255 seconds]
bhuvan_aurora has quit [Ping timeout: 276 seconds]
eGGsha has joined #ruby
bhuvanaurora has quit [Ping timeout: 264 seconds]
<shevy> [k- any heat wave ongoing in Singapore la?
Joufflu has joined #ruby
yh has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
Papierkorb has joined #ruby
<[k-> it rained yesterday I think
<[k-> the temperature went down
gix has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
JDiPierro has joined #ruby
Indian has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
dfockler has joined #ruby
<[k-> it's much more bearable
JDiPierro has quit [Remote host closed the connection]
<shevy> lucky you!
lavros has joined #ruby
chouhoulis has joined #ruby
solocshaw has joined #ruby
Scroff has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfockler has quit [Ping timeout: 246 seconds]
radialneon has quit [Quit: Leaving]
GitGud has joined #ruby
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<arup_r> jhass: tried now different error : `stat': no implicit conversion of Zlib::GzipReader into String (TypeError)
Indian has quit [Ping timeout: 265 seconds]
Indian has joined #ruby
<jhass> arup_r: should I rephrase the error message for you or what do you expect?
<jhass> you can't pass an instance of Zlib::GZipReader to something that expects a string
iamvery has joined #ruby
iamvery has quit [Client Quit]
<arup_r> Yes,, I understand ,,, reading docs... to find out something else.. I thought the zlib is able to take IO object as an input
iamvery has joined #ruby
<arup_r> soryy not zlib.. i meany rubyzip
<arup_r> meant**
yokel has quit [Ping timeout: 246 seconds]
<shevy> arup_r still porting php code?
genpaku has quit [Ping timeout: 256 seconds]
mhib has joined #ruby
<arup_r> humm.. In between I did something else..
yokel has joined #ruby
genpaku has joined #ruby
solocshaw has quit [Ping timeout: 255 seconds]
stantonnet has joined #ruby
superspring has quit [Quit: No Ping reply in 180 seconds.]
<shevy> hehe
superspring has joined #ruby
joevandyk has quit [Remote host closed the connection]
<[k-> I hate ,,,
joevandyk has joined #ruby
stantonnet has quit [Client Quit]
stantonnet has joined #ruby
<shevy> where?
Scroff has quit [Ping timeout: 248 seconds]
<[k-> arup_r said it just now
<shevy> ah
<shevy> guess he mis-hit the key
dgutierrez1287 has joined #ruby
<[k-> 3x!
<[k-> oh
victortyau has quit [Quit: Leaving]
yh has quit [Ping timeout: 265 seconds]
<[k-> it was meant to be ...
<[k-> I thought he wanted a comma
<arup_r> I am frustated now
<shevy> that is understandable, you had to look at php code
havenwood has joined #ruby
Flcn has quit [Quit: Lingo: www.lingoirc.com]
sarkyniin has joined #ruby
<[k-> xD
hfp has quit [Ping timeout: 265 seconds]
hfp_ has joined #ruby
stantonnet has quit [Client Quit]
hfp_ is now known as hfp
hfp_work has quit [Ping timeout: 255 seconds]
blaines has joined #ruby
kobain has joined #ruby
GnuYawk has joined #ruby
<arup_r> shevy: I am reading https://github.com/rubyzip/rubyzip .. not php now.. bcoz what I understood from php till now I have to code those, and I got stuck in unzip :/
senayar has quit [Remote host closed the connection]
hfp_work has joined #ruby
<shevy> hmm hanmac has an libarchive binding I think, if that helps
<shevy> does rubyzip use << ?
stantonnet has joined #ruby
<shevy> so you can buildup your archive
<[k-> 010832 <vltz> I haven't used php for a long time now. My life has improved dramatically.
dostoyevsky has quit [Ping timeout: 276 seconds]
<shevy> :D
dostoyevsky has joined #ruby
sharpmachine has joined #ruby
micmus has quit [Ping timeout: 252 seconds]
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
stantonnet has quit [Client Quit]
ndrei has quit [Ping timeout: 252 seconds]
stantonnet has joined #ruby
stantonnet has quit [Client Quit]
fantazo has joined #ruby
stantonnet has joined #ruby
blaines has quit [Ping timeout: 276 seconds]
iamvery has quit [Quit: Leaving...]
stantonnet has quit [Client Quit]
davedev24_ has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
davedev24_ has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
Yzguy has quit [Ping timeout: 265 seconds]
solocsha1 has joined #ruby
wallerdev has joined #ruby
gianlucadv has joined #ruby
stantonnet has joined #ruby
Indian has quit [Ping timeout: 244 seconds]
cpruitt has quit [Quit: cpruitt]
vyorkin has quit [Ping timeout: 255 seconds]
railsForDaiz has joined #ruby
ohaibbq has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r> no body faced my issues before I can't believe it....... http://stackoverflow.com/tags/rubyzip/hot :/
<arup_r> **before me
Scroff has joined #ruby
lkba_ has joined #ruby
boadie has quit [Remote host closed the connection]
JDiPierro has joined #ruby
[k- has quit [Quit: AndroidIrc Disconnecting]
gizmore has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
jeramyRR has quit [Quit: Peace out!]
gizless has quit [Ping timeout: 255 seconds]
zz_Outlastsheep is now known as Outlastsheep
meatchicken has quit [Ping timeout: 264 seconds]
meatchicken has joined #ruby
kamichi has left #ruby [#ruby]
kies^ has joined #ruby
jeramyRR has joined #ruby
brain_shim has quit [Ping timeout: 265 seconds]
kraljev11 has quit [Ping timeout: 246 seconds]
brain_shim has joined #ruby
eGGshke has joined #ruby
codecop has joined #ruby
jbw_ has joined #ruby
eGGsha has quit [Ping timeout: 256 seconds]
jbw has quit [Ping timeout: 252 seconds]
eggoez has quit [Ping timeout: 246 seconds]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: bbl]
symm- has quit [Ping timeout: 264 seconds]
yh has joined #ruby
i8igmac has joined #ruby
Ilyas has quit [Read error: Connection reset by peer]
Joufflu has quit [Read error: Connection reset by peer]
renderfu_ has joined #ruby
eGGshke has quit [Ping timeout: 256 seconds]
<ght> Question: If I have two variables, test1 = "bob" and test2 = "jim", and I want to include the value of test1 in the name of new variable, what's the procedure?
leonardoajim has joined #ruby
<ght> For example, a new variable with a name that consists of the value of test1 followed by + "_lunch"
eggoez has joined #ruby
sarkyniin has quit [Ping timeout: 248 seconds]
renderfu_ has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
eGGshke has joined #ruby
thiagovsk has joined #ruby
adamski2600 has joined #ruby
stoodfarback has quit [Ping timeout: 250 seconds]
senayar has joined #ruby
<kb3ien> well I disapeared for a while, but my attempts to use path in the Gemfile are still fruitless.
endash has joined #ruby
sharpmachine has joined #ruby
adamski2600 has quit [Ping timeout: 256 seconds]
<havenwood> >> example = 'free'; TOPLEVEL_BINDING.local_variable_set :foo, "#{example}_lunch"; TOPLEVEL_BINDING.local_variable_get :foo
eGGshke has quit [Read error: Connection reset by peer]
<ruboto> havenwood # => "free_lunch" (https://eval.in/392522)
<havenwood> ght: Dynamically setting local variables and then getting at them isn't straight-forward. Consider using a Hash, instance variables, or tell us more about what you're doing and show some code!
senayar has quit [Ping timeout: 276 seconds]
<havenwood> kb3ien: What trouble are you having with it?
sharpmachine has quit [Ping timeout: 265 seconds]
<havenwood> kb3ien: Use PATH like `ENV['PATH']` or?
Jackneill has quit [Remote host closed the connection]
<havenwood> kb3ien: $LOAD_PATH? $GEM_PATH?
lkba has joined #ruby
<c355E3B> is it the gem 'name', path: '...' opt?
<Tarkers34|2> ght: define_method(:bob_lunch) { puts "I am from the bob_lunch dynamically defined method" }
j4cknewt has quit [Remote host closed the connection]
<ght> Interesting, thank you.
<Tarkers34|2> ght: no problem, I'll write a gist now :)
<kb3ien> Yesterday ( see logs) I went into /tmp and did `gem unpack ebsco-discovery-service-api` got the clean files from the upstream repo.
vyorkin has joined #ruby
<kb3ien> I copied them to a dir inside my project : /var/www/merge-dev-robin/bgctr-merge/merged/blacklight_with_eds/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4
The_Phoenix has joined #ruby
abuzze has joined #ruby
<kb3ien> this really only contains one file : lib/ebsco-discovery-service-api.rb
icebourg has quit []
<kb3ien> jhass suggested something with the .gemspec file. I'm not sure i put that in the right place.
<arup_r> stiil I couldn't make my code working
dgutierrez1287 has quit [Remote host closed the connection]
<havenwood> arup_r: Show the code!
lkba_ has quit [Ping timeout: 246 seconds]
<kb3ien> I change my Gemfile to " gem "ebsco-discover-service-api", :path => '/var/www/merge-dev-robin/bgctr-merge/merged/blacklight_with_eds/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4' " but rake routes says Could not find gem 'ebsco-discover-service-api (>= 0) ruby' in source at /var/www/merge-dev-robin/bgctr-merge/merged/blacklight_with_eds/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4.
<Tarkers34|2> ght: untested but you get the gist https://gist.github.com/anonymous/c3f946063d31cf6c0644
<Tarkers34|2> by god is that where gist comes from?
<arup_r> but getting error
<kb3ien> Where should the .gemspec file go?
<arup_r> `get_e_o_c_d': Zip end of central directory signature not found (Zip::Error)
<kb3ien> do I need 'gem generate_index' ?
vyorkin has quit [Ping timeout: 246 seconds]
<ght> Tarkers34|2: Got it, thank you.
<ght> Incidentally, it appeared I was missing a .to_sym decleration on the name as well.
abuzze has quit [Ping timeout: 256 seconds]
dgutierrez1287 has joined #ruby
<havenwood> kb3ien: Gems have a gemspec in their root dir. Take a look at any gem and you'll find it's gemspec. See: http://guides.rubygems.org/specification-reference/
<kb3ien> I'm not sure what level the :path => should even point to.
jaygen_ has joined #ruby
<Tarkers34|2> well according to api_dock it requires a sym...string might work too
<Tarkers34|2> ght ^
<arup_r> havenwood: I gave the link
<havenwood> Tarkers34|2: It will turn a String into a Symbol but do you really want to define all those methods?
railsraider has joined #ruby
<Tarkers34|2> havenwood: Could be a learing project, not sure what ght's endgame is :)
workmad3 has joined #ruby
<havenwood> Maybe I didn't see the whole question but if it's based on user input or such going oom on symbol clutter is possible.
wallerdev has quit [Ping timeout: 252 seconds]
jaygen has quit [Ping timeout: 246 seconds]
yh has quit [Ping timeout: 255 seconds]
<jhass> arup_r: stop saying that. we already established that you don't extract files from a .gz, you decompress a gz file, which in your case is a zip file which you can then extract files from
sarkyniin has joined #ruby
serivich has quit [Ping timeout: 248 seconds]
symm- has joined #ruby
<arup_r> jhass: I tried as you said defalting.. then also got some other error.. but now have no idea .... how to extract
Outlastsheep is now known as zz_Outlastsheep
<shevy> \o/ let's dance \o/ with arup_r \o/
workmad3 has quit [Ping timeout: 248 seconds]
<arup_r> :/ :/
IanV0rn2341 has quit []
wallerdev has joined #ruby
<kb3ien> Well i ran `bundle install --path vendor/bundle` and it installed copies of all the Gems in the gemfile. Anyway to get just the one I want to customise?
Spami has joined #ruby
<jhass> just nuke the rest?!
<kb3ien> I think a gz file is considered deflated. inflate ?
<jhass> kb3ien: hence I use compress/decompress :P
<kb3ien> that's the best option? I'm glad for good fibre on a day like this.
<jhass> well, you have it already installed, you just need to get the gemspec from somewhere
<jhass> that's a one time task
<jhass> if the source would be on github I had you clone the repo
<jhass> the --path vendor/bundle in my demo I only did to not pollute my system btw
<jhass> arup_r: how about you show us your attempt at decompressing the gz file prior treating it as zip, instead of the same code from 3 hours ago?
lordkryss has quit [Quit: Connection closed for inactivity]
endash has quit [Quit: endash]
IanV0rn2341 has joined #ruby
<jhass> arup_r: did you ever look at the docs?
<jhass> let's try together
abuzze has joined #ruby
<jhass> mmh, new, that's documented as #initialize, "#initialize(file_name
<jhass> mmh, no, we don't have a filename
<jhass> but!
<jhass> let's scroll down!
Channel6 has quit [Quit: Leaving]
<jhass> .open_buffer(io
<jhass> oooh
<jhass> ike #open, but reads zip archive contents from a String or open IO stream
<jhass> *like
<jhass> now that sounds promising, doesn't it!
abuzze has quit [Remote host closed the connection]
railsForDaiz has quit [Ping timeout: 252 seconds]
<arup_r> Yes it does.. I was spinning myself inside the github readme only.. :/
<arup_r> let me try
spider-mario has quit [Ping timeout: 265 seconds]
jimbeaudoin has joined #ruby
<kb3ien> where should the gemspec GO?
senayar has joined #ruby
<jhass> kb3ien: seriously?
eGGshke has joined #ruby
<kb3ien> yes. seriously. Why isn't there any better documentation on doing this ? I don't want to have to go through hoops everytime i checkout the project on a new machine.
<shevy> kb3ien this is part of your gem, at its base level; like where you have the dir/ library
JDiPierro has quit [Remote host closed the connection]
<arup_r> jhass: same error..
jeramyRR has joined #ruby
<jhass> which you never told...
claw has quit [Ping timeout: 256 seconds]
<kb3ien> So why do I ''need to get the gemspec from somewhere'' ?
claw has joined #ruby
claw has quit [Client Quit]
<shevy> you have to get a gemspec from somewhere?
<arup_r> Zip end of central directory signature not found (Zip::Error)
<jhass> kb3ien: so bundler can rebuilt the gem on the fly
claw has joined #ruby
Narzew has joined #ruby
<jhass> arup_r: updated code?
<jhass> arup_r: did you remember to redo the xor?
<arup_r> sorry
<jhass> kb3ien: I'm not sure I can help you anymore, I made you a step by step tutorial you can watch
ivanskie has joined #ruby
<kb3ien> I don't understand where is the somewhere I need to get it from, and where do I put it?
<jhass> arup_r: sigh, really?
<jhass> now you pass the filename as IO/data?
<arup_r> hummm... yes i sigh
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<jhass> kb3ien: at 0:50
<shevy> no idea, I don't use bundler; if it is a simple gem, with a simple .gemspec, you can do "gem build *.gemspec" and your .gem file is built
<arup_r> no luck!
A205B064 has quit [Ping timeout: 248 seconds]
axsuul has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sarkyniin has quit [Ping timeout: 256 seconds]
speaking1ode has quit [Ping timeout: 256 seconds]
<shevy> yay updated ranks!
<shevy> FROM TIOBE!!!!
eGGshke has quit [Read error: Connection reset by peer]
<shevy> kidding kidding
Lucky has joined #ruby
<havenwood> Erlang is edging up there. Nice it recently adopted Apache2 license.
<c355E3B> indeed
<shevy> SQL is very popular on stackoverflow
<c355E3B> and the new time stuff helps fix a lot of pain
<shevy> means many people have to ask questions there? :)
Jarboe has joined #ruby
<ytti> havenwood, how about elixir
<kb3ien> Your right, I got it now!
<arup_r> jhass: i passed as IO
<jhass> not in the code I see
<havenwood> ytti: There Erlang folk are embracing it, which I think bodes well. I guess we could just say "The BEAM."
nolic has quit [Ping timeout: 252 seconds]
radialneon has joined #ruby
<ytti> havenwood, aye
<c355E3B> Elixir and Erlang basically are the same language.
<c355E3B> One has better syntax
dagda1 has joined #ruby
<shevy> really?
j4cknewt has joined #ruby
<shevy> so sevenseacat is studying a fancier variant of erlang
<c355E3B> yep
<havenwood> shevy: sevenoceantiger
eGGshke has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
<arup_r> jhass: updated..
sarkyniin has joined #ruby
<c355E3B> e.g. To use some of the server stuff in elixir, the functions need to be exposed as they would be in erlang
<c355E3B> (at the bytecode level)
acke has joined #ruby
<kb3ien> okay. did the irb do anything to the project, or did it just confirm that we can load from the right place?
yh has joined #ruby
jamesaxl has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<jhass> arup_r: actually why do you mess with gzip at all? the PHP doesn't seem to
<jhass> it simply does XOR -> unzip
Carnage\ has joined #ruby
yh has quit [Ping timeout: 246 seconds]
<jhass> you do XOR -> gzip -> gunzip -> unzip
DLSteve has joined #ruby
<kb3ien> better make it 64 rounds of XOR. Why are you xoring a gzip file anyway ?
<jhass> kb3ien: that's just for confirming the right file will be loaded
leonardoajim has quit [Ping timeout: 265 seconds]
i8igmac has quit [Ping timeout: 246 seconds]
leonardoajim has joined #ruby
war_pigs has joined #ruby
Al3ks has joined #ruby
dseitz has joined #ruby
war_pigs has quit [Max SendQ exceeded]
Ilyas has joined #ruby
zachk has joined #ruby
yh has joined #ruby
war_pigs has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sharpmachine has joined #ruby
mary5030 has joined #ruby
i8igmac has joined #ruby
<arup_r> jhass: ok so It is https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L23 not needed.. you meant.. But I think it is needed
<jhass> why?
kb3ien has quit [Ping timeout: 246 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 276 seconds]
sepp2k has quit [Read error: Connection reset by peer]
<arup_r> otherwise how should I create the .gz file ?
<jhass> arup_r: file extensions are meaningless
<jhass> note that the php code uses .cgz and .cgn
<jhass> but it's completely meaningless
<arup_r> that's true..
<arup_r> ok
<jhass> it could be .yourmotherissexy and .yourdaddyistoo
<arup_r> :p :p
<arup_r> no no no dad and mom
<arup_r> only we .........
<arup_r> sp only IO.open("resource.gz") instead of the lib ?
<jhass> XOR -> unzip
<jhass> unzip(XOR("foo.cgn"))
<arup_r> ok
<arup_r> unzip using zlib ?
<jhass> no, rubyzip
<arup_r> hmm
<arup_r> ok..
<arup_r> going to do
dgutierrez1287 has joined #ruby
GitGud has quit [Ping timeout: 276 seconds]
kjones_ has joined #ruby
Al3ks has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
dgutierrez1287 has quit [Ping timeout: 252 seconds]
dagda1 has joined #ruby
Channel6 has joined #ruby
Carnage\ has quit [Ping timeout: 248 seconds]
ndrei has joined #ruby
AvidChronos has quit [Read error: Connection reset by peer]
matp has quit [Remote host closed the connection]
AvidChronos has joined #ruby
matp has joined #ruby
choke has joined #ruby
stoodfarback has joined #ruby
railsraider has quit [Quit: railsraider]
haxrbyte has quit [Client Quit]
bruno- has joined #ruby
ruby-lang988 has joined #ruby
ruby-lang988 has quit [Client Quit]
woodennails has joined #ruby
baweaver has joined #ruby
last_staff has joined #ruby
<arup_r> can I extract on the same folder where .gs resides ? currently I am getting error https://gist.github.com/aruprakshit/41e698c43a21e535a80e
<arup_r> gems/rubyzip-1.1.7/lib/zip/entry.rb:582:in `initialize': Is a directory @ rb_sysopen - /home/arup/Rails/gobgob-ror/lib/knet (Errno::EISDIR)
yh has quit [Ping timeout: 250 seconds]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solocsha1 has quit [Ping timeout: 255 seconds]
kadoppe has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
kadoppe has joined #ruby
i8igmac has quit [Ping timeout: 252 seconds]
jpfuentes2 has joined #ruby
AndyBotwin has quit [Ping timeout: 248 seconds]
jeramyRR has joined #ruby
AndyBotwin has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 248 seconds]
spider-mario has joined #ruby
Contigi has joined #ruby
<jhass> #extract(dest_path = @name
<jhass> what can we learn from this method signature?
sarkyniin has quit [Ping timeout: 246 seconds]
<jhass> I'll give you the description for free: "Extracts entry to file dest_path (defaults to @name)."
<jhass> (ain't I a good copy paste robot?)
<jhass> you have some assumption about the argument to extract, you get an error so that assumption must be wrong. What other interpretations of its signature are there?
Carnage\ has joined #ruby
AndyBotwin has quit [Max SendQ exceeded]
AndyBotwin has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 248 seconds]
Soda has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<arup_r> ok
<arup_r> if I don't give any argument, it creates file under rails root dir.. but I wanted to extract under the path as I have in my code..
<jhass> you completely dismissed my question
<jhass> answer it
swills has quit [Quit: leaving]
<arup_r> ok
<arup_r> it means dest_path is optional
Silent__ has joined #ruby
<arup_r> If I don't give any value.. it will take the value of @name
<jhass> okay, that's one thing
<jhass> what else?
Blaguvest has joined #ruby
<shevy> arup_r it hates directories!
Hobogrammer has quit [Ping timeout: 276 seconds]
<arup_r> ok got your point
<arup_r> jhass: it should be like
eggoez has joined #ruby
<arup_r> extract("#{my_dir}/entry.name") { true }
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> the block is optional
JDiPierro has joined #ruby
kraljev11 has joined #ruby
<jhass> my actual point is that you never question your assumptions
<arup_r> block is to overwrite
<jhass> you stick to them as long as you can
<arup_r> I got you...
kraljev11 has quit [Read error: Connection reset by peer]
<jhass> and that slows you down, roughly 4-6 hours per problem from my perspective
<arup_r> shevy: your line clicked actually.. with jhass method signature..
<arup_r> yes.. I destroyed my whole hours due to that.. assumptions
sarkyniin has joined #ruby
<arup_r> I should take care it now on wards as much as I can
kraljev11 has joined #ruby
Indian has joined #ruby
voxxit_ has quit [Read error: Connection reset by peer]
kraljev11 has quit [Client Quit]
Mon_Ouie has quit [Quit: WeeChat 1.2]
kraljev11 has joined #ruby
<arup_r> and the file extension made me fool... bullshit!!!! :/
<jhass> arup_r: don't think "why isn't this working", first think "where could I be wrong, what did I assume, how can I verify that I'm right"
<shevy> arup_r well the author could have provided a better error message, so the alternative explanation can still be that the software sucks :P
fantazo has quit [Quit: Verlassend]
<jhass> and actually writing reduced code to verify your assumptions is nothing wrong
<shevy> the fastest way is to look at working examples - lemme do that
<shevy> damn those examples are long
<shevy> am I missing something obvious or is that really how you create a .zip with it? https://gist.github.com/anonymous/38b8d5e233322a359501
postmodern has joined #ruby
<shevy> cool... there is password protection
Channel6 has quit [Quit: Leaving]
Sehryn has joined #ruby
Silent__ has quit [Ping timeout: 252 seconds]
kraljev11 has quit [Quit: kraljev11]
eGGshke has quit [Ping timeout: 246 seconds]
kjones_ has quit [Quit: Textual IRC Client: www.textualapp.com]
kraljev11 has joined #ruby
kjones_ has joined #ruby
KanyeBest has joined #ruby
mr_blue has quit [Ping timeout: 252 seconds]
mary5030 has quit [Remote host closed the connection]
KanyeBest has quit [Client Quit]
Hobogrammer has joined #ruby
<postmodern> do we have a naming convention for micro-gems
eGGshke has joined #ruby
<postmodern> i want to extract some wrapper code that auto-generates OptionParser stuff, but all the 'option' related names are taken
bruno- has quit [Ping timeout: 265 seconds]
<postmodern> kind of wish we had an acts_as_foo, but for micro-libs
KanyeBest has joined #ruby
KanyeBest has left #ruby [#ruby]
KanyeBest has joined #ruby
<apeiros> micro-option
sharpmachine has joined #ruby
<apeiros> do we have naming conventions for gems beyond the require-mapping and occasional framework-FOO or FOO-plugin?
eGGshke has quit [Remote host closed the connection]
NeverDie has joined #ruby
eGGshke has joined #ruby
kraljev11 has quit [Quit: kraljev11]
<postmodern> apeiros, not yet, but i think it's worth considering as available names disappear
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
kraljev11 has joined #ruby
<arup_r> jhass: and shevy : I reached to the .xml file which I really needed.. I hope by tomorrow I'll port the full PhP to Ruby :)
<arup_r> after that real rails code will start..
<shevy> ack
<shevy> XML
<arup_r> \0/
Vile` has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
senayar has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 255 seconds]
blue_deref has joined #ruby
yardenbar has quit [Quit: Leaving]
mr_blue has joined #ruby
navs_ has quit [Ping timeout: 256 seconds]
Muhannad has quit [Ping timeout: 255 seconds]
peter_paule has joined #ruby
nofxx has joined #ruby
kraljev11 has quit [Quit: kraljev11]
kraljev11 has joined #ruby
Vile` has joined #ruby
n008f4g_ has quit [Ping timeout: 244 seconds]
j4cknewt has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
noethics has joined #ruby
j4cknewt has quit [Remote host closed the connection]
revath has joined #ruby
hotpancakes has joined #ruby
sepp2k has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
peter_paule has quit [Ping timeout: 264 seconds]
navs_ has joined #ruby
mhib has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<adaedra> XML?
<adaedra> Do JSONx.
tuxaddicted has joined #ruby
<xxneolithicxx> mmm XML, graphs, trees, mmm, DOM, and XPATH goodness
shum has joined #ruby
revath has quit [Ping timeout: 255 seconds]
n008f4g_ has joined #ruby
sdothum has quit [Ping timeout: 255 seconds]
Indian has quit [Ping timeout: 244 seconds]
Obfuscate has joined #ruby
<arup_r> bye all.. no more code today.. I am exhausted... going to sleep
<xxneolithicxx> the joy of insanely slow eXistdb is one you must experience for yourself.
sarkyniin has quit [Quit: Quit]
<xxneolithicxx> bb
sarkyniin has joined #ruby
oylm has joined #ruby
<xxneolithicxx> i think it was existdb, i dunno i used it college years ago, was slow as shit XML db
kraljev11 has quit [Read error: Connection reset by peer]
kraljev11_ has joined #ruby
kraljev11_ has quit [Read error: Connection reset by peer]
kraljev11 has joined #ruby
<arup_r> adaedra: I am forced to XML Man!
kraljev11 is now known as kraljev11_
<arup_r> shevy: knows the story ... :)
<adaedra> I should begin to wrap my joke between <adaedra:joke> tags.
<arup_r> hahaha
<arup_r> anyway bye
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<adaedra> <adaedra:bye><adaedra:target name="arup_r" /><![CDATA[Bye]]></adaedra:bye>
cir0x has joined #ruby
elia has joined #ruby
elia has quit [Client Quit]
hanmac has quit [Ping timeout: 256 seconds]
sivoais has quit [Ping timeout: 264 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railsraider has joined #ruby
djbkd has quit [Quit: Leaving...]
j4cknewt has joined #ruby
Pupeno_ has joined #ruby
elia has joined #ruby
Pupeno has quit [Ping timeout: 252 seconds]
jbw__ has joined #ruby
sarkyniin has quit [Read error: No route to host]
jbw_ has quit [Ping timeout: 255 seconds]
boadie has joined #ruby
boadie has quit [Client Quit]
sarkyniin has joined #ruby
lavros has quit [Quit: leaving]
frem has joined #ruby
KanyeBest has quit [Quit: leaving]
rodfersou has joined #ruby
troydm has joined #ruby
KanyeBest has joined #ruby
hanmac has joined #ruby
<troydm> hey everyone! what is the underlying implementation of hashtable in ruby? is it open addressing or chaining?
jbw_ has joined #ruby
radialneon has quit [Quit: Leaving]
jeramyRR has joined #ruby
jbw__ has quit [Ping timeout: 252 seconds]
railsraider has quit [Quit: railsraider]
<havenwood> troydm: a doubly-circularly-linked list
<troydm> ic, thx apeiros and havenwood
krz has quit [Quit: WeeChat 1.0.1]
<apeiros> havenwood: that's for kv-pairs, not how buckets are organized ;-)
<apeiros> though… maybe that's not even what they asked
war_pigs has quit [Quit: later... computer is sleeping]
_ht has quit [Quit: Konversation terminated!]
Rollabunna has quit [Remote host closed the connection]
<havenwood> apeiros: i waffled then just hit enter
roolo has joined #ruby
Exuma has joined #ruby
Rollabunna has joined #ruby
<havenwood> apeiros: i just like typing doubly-circularly whenever i get the chance
<apeiros> why'd you like to type doubly-circularly?
<ljarvis> moin
yfeldblum has joined #ruby
<havenwood> for doubly-circularly reasons!
<havenwood> ljarvis: \o
<apeiros> moin ljarvis
chouhoulis has joined #ruby
roolo has quit [Ping timeout: 246 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
KanyeBest has quit [Quit: Lost terminal]
<havenwood> >> %w[POOM WHUMP THWIFF Fizz Crack Crackle Shhheeeeeee].sample(4).each { |sound| sleep rand; puts sound }
<ruboto> havenwood # => Crackle ...check link for more (https://eval.in/392606)
chouhoulis has quit [Ping timeout: 252 seconds]
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> gem install curses tty-fireworks && fireworks
sivoais has joined #ruby
enders has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
timonv has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
senayar has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elia has quit [Quit: Computer has gone to sleep.]
endersCA has joined #ruby
endersCA has quit [Remote host closed the connection]
sharpmachine has joined #ruby
claw has quit [Ping timeout: 246 seconds]
aphprentice_ has quit [Ping timeout: 252 seconds]
nofxx has quit [Ping timeout: 264 seconds]
solocsha1 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
arooni-mobile has joined #ruby
arooni-mobile has quit [Max SendQ exceeded]
arooni-mobile has joined #ruby
arooni-mobile has quit [Max SendQ exceeded]
arooni-mobile has joined #ruby
workmad3 has joined #ruby
j4cknewt has joined #ruby
sharpmachine has quit [Ping timeout: 255 seconds]
nahtnam has quit [Quit: Connection closed for inactivity]
dagda1 has joined #ruby
bradleyprice has quit []
<adaedra> Fireworks?
<adaedra> I have no fireworks planned before 10 days
musicmatze has joined #ruby
<musicmatze> Hey, #ruby!
mike-burns has joined #ruby
<adaedra> Hi musicmatze
<musicmatze> I have a really large array and I want to do ary.reverse.take(n) where n is really small ... I remember there is something similar which is much faster, but I don't know what to google...
<musicmatze> can you help me?
j4cknewt has quit [Remote host closed the connection]
<apeiros> musicmatze: ary[-n..-1].reverse
<ljarvis> ary.last(x)
<ljarvis> o
<apeiros> oh dear, of course, .last(n)
<apeiros> + .reverse
<ljarvis> .reverse
<ljarvis> aye
<adaedra> aïe
workmad3 has quit [Ping timeout: 276 seconds]
bb010g has joined #ruby
bronson has quit [Remote host closed the connection]
<mike-burns> Is it possible to get the fd as an int from an instance of Socket?
<mike-burns> Background: I'm trying to talk to a C library from Ruby using the ffi gem.
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> to_fd iirc
<mike-burns> undefined method, sadly.
<apeiros> ah, no, that's for the otherway round (IO.for_fd)
RobertBirnie has joined #ruby
<mike-burns> !
<mike-burns> toretore: thank you so much.
icebourg has joined #ruby
musicmatze has left #ruby ["WeeChat 0.4.3"]
roolo has joined #ruby
Scroff has quit [Remote host closed the connection]
jbw__ has joined #ruby
Scroff has joined #ruby
jbw_ has quit [Ping timeout: 246 seconds]
last_staff has quit [Ping timeout: 246 seconds]
acke has quit [Remote host closed the connection]
mike-burns has left #ruby ["WeeChat 1.1"]
Rollabunna has joined #ruby
bruno- has joined #ruby
Scroff has quit [Ping timeout: 276 seconds]
nofxx has joined #ruby
rehat has joined #ruby
arooni-mobile__ has joined #ruby
Fezzler has joined #ruby
zzor has joined #ruby
zzor has quit [Client Quit]
Rollabunna has quit [Ping timeout: 248 seconds]
cir0x1 has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
<rehat> new to programming what does 'literals' mean in this sentence 'String objects may be created using String::new or as literals.' reading string doc
<shevy> rehat I think this means 'foo' and "foo"
<mr_blue> rehat: this is a litteral : 'blabla'
<rehat> ahh
<rehat> thanks
cir0x has quit [Ping timeout: 255 seconds]
<rehat> so for numbers a 4 is a literal too?
<mr_blue> rehat: not sure if litteral apply to integer
<shevy> dunno... it's a number isn't it?
<shevy> >> 4
<ruboto> shevy # => 4 (https://eval.in/392607)
<shevy> oops
<shevy> >> 4.class
<ruboto> shevy # => Fixnum (https://eval.in/392608)
<shevy> not so many ways to create a Fixnum in ruby
<rehat> neat thanks
<shevy> >> Integer('4')
<ruboto> shevy # => 4 (https://eval.in/392609)
<shevy> not that in the above, we passed a string as argument, not a number
Gadgetoid has left #ruby [#ruby]
eggoez has quit [Ping timeout: 248 seconds]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
kraljev11_ has quit [Remote host closed the connection]
arooni-mobile__ has left #ruby ["Leaving"]
Scroff has joined #ruby
kb3ien has joined #ruby
workmad3 has joined #ruby
kkeuning has quit [Max SendQ exceeded]
micalexander has quit [Remote host closed the connection]
j4cknewt has joined #ruby
adamski2600 has joined #ruby
vyorkin has joined #ruby
eggoez has joined #ruby
Scroff has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
retornam has quit [Ping timeout: 244 seconds]
peter_paule has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
adamski2600 has quit [Ping timeout: 252 seconds]
senayar has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 248 seconds]
retornam has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> rehat: literals are values which are literally in the code. i.e. which are not created through reading user input, or the use of a method. the code itself directly represents the final object.
<rehat> apeiros: ahh thanks for the explanation
happymonday has joined #ruby
<happymonday> someone please help? I'm going through this steps on this webpage http://gitimmersion.com/lab_21.html and when i type "rake" i get error message "LoadError: cannot load such file -- ./lib/hello.rb
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eggoez has joined #ruby
Indian has joined #ruby
jwhite_ has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jwhite_ is now known as jhwhite
allomov has quit [Remote host closed the connection]
<rehat> I want to take in a bunch of strings and put them together to form a file name. Is there a better way of doing this then what I have https://gist.github.com/rehat/43fb498428656abe7202
<mr_blue> nmm
<mr_blue> NB
ivanskie has joined #ruby
<mr_blue> happymonday: you need to call rake from a dir where it exist ./lib/hello.rb
<workmad3> rehat: save_file_as = "#{ARGV[1..-1].join(" ")}.mp4"
Narzew has quit [Ping timeout: 248 seconds]
<rehat> wow nice
decoponio has quit [Read error: Connection reset by peer]
<rehat> workmad3: thanks, I need to look into that join method
renderful has joined #ruby
<rehat> does the -1 in the sequence just mean the end of the array?
<workmad3> rehat: also, arguments to ruby scripts start at ARGV[0], not ARGV[1] like in C... so you probably want just `save_file_as = "#{ARGV.join(" ")}.mp4"
<rehat> yeah I have 0 for something else
<happymonday> mr_blue, i am in the directory where the hello file exists and i call rake. still i get that error
<workmad3> ok then :) and yes, accessing an array with some_ary[1..-1] gives you a subarray from index 1 to the end of the array
allomov has joined #ruby
<rehat> awesome thanks
lewis has joined #ruby
lewis has quit [Changing host]
lewis has joined #ruby
<lewis> .hey guys
<lewis> Does anyone have the xps 2015?
JDiPierro has quit [Remote host closed the connection]
tuxaddicted has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
Narzew has joined #ruby
renderful has quit [Ping timeout: 255 seconds]
tuxaddicted has joined #ruby
jhwhite has quit [Ping timeout: 246 seconds]
Exuma has quit []
brain_shim has quit [Ping timeout: 265 seconds]
sarkyniin has quit [Ping timeout: 276 seconds]
elektronaut has quit [Ping timeout: 252 seconds]
cir0x1 has quit [Quit: Leaving.]
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
drPoggs has joined #ruby
GBrawl has joined #ruby
elektronaut has joined #ruby
bronson has joined #ruby
dfockler has joined #ruby
decoponio has joined #ruby
houhoulis has joined #ruby
sarkyniin has joined #ruby
allomov has quit [Remote host closed the connection]
Sehryn has quit [Ping timeout: 252 seconds]
sharpmachine has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
happymonday has quit [Remote host closed the connection]
davedev24_ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
davedev24_ has joined #ruby
dfockler has quit [Ping timeout: 264 seconds]
Muhannad has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
sharpmachine has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
Narzew has quit [Quit: Leaving]
senayar has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 256 seconds]
icebourg has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Ping timeout: 276 seconds]
derekv2 has quit [Ping timeout: 252 seconds]
Muhannad has quit [Read error: Connection reset by peer]
jbw__ has quit [Ping timeout: 246 seconds]
jbw__ has joined #ruby
icebourg has joined #ruby
sarkyniin has joined #ruby
yfeldblum has joined #ruby
matugm has quit [Ping timeout: 276 seconds]
Rollabunna has joined #ruby
hotpancakes has quit [Remote host closed the connection]
peter_paule has quit [Ping timeout: 246 seconds]
_blizzy_ has joined #ruby
sarkyniin has quit [Quit: Quit]
peter_paule has joined #ruby
acke has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
senayar has joined #ruby
senayar has joined #ruby
Carnage\ has quit []
hotpancakes has joined #ruby
war_pigs has joined #ruby
bruno- has joined #ruby
Pupeno has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Pupeno_ has quit [Ping timeout: 246 seconds]
acke has quit [Ping timeout: 264 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
hotpancakes has quit [Ping timeout: 244 seconds]
jhwhite has joined #ruby
lewis is now known as lewix
Fezzler has quit [Quit: Leaving]
cir0x has joined #ruby
Muhannad has joined #ruby
derekv has joined #ruby
kirun has quit [Quit: Client exiting]
peter_paule has quit [Ping timeout: 276 seconds]
Spami has joined #ruby
GBrawl has quit [Ping timeout: 252 seconds]
icebourg has quit []
thiagovsk has quit [Quit: Connection closed for inactivity]
hotpancakes has joined #ruby
lewix has quit [Remote host closed the connection]
jhwhite has quit [Quit: leaving]
roolo has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 248 seconds]
Musashi007 has joined #ruby
Steve_Jobs has quit [Read error: Connection reset by peer]
Steve_Jobs has joined #ruby
Musashi007 has quit [Client Quit]
axsuul has quit [Quit: Textual IRC Client: www.textualapp.com]
asmodlol has quit [Ping timeout: 276 seconds]
Musashi007 has joined #ruby
Scroff has joined #ruby
war_pigs has quit [Quit: later... computer is sleeping]
Ilyas has quit [Read error: Connection reset by peer]
Scroff has quit [Remote host closed the connection]
bakedb has joined #ruby
bakedb_ has quit [Ping timeout: 252 seconds]
stylus has quit [Ping timeout: 264 seconds]
elia has joined #ruby
chouhoulis has joined #ruby
j4cknewt has joined #ruby
Vile` has quit [Remote host closed the connection]
GPrime has joined #ruby
hahuang65 has quit [Read error: Network is unreachable]
chouhoulis has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby
Vile` has joined #ruby
whiteline has quit [Ping timeout: 276 seconds]
stylus has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sharpmachine has joined #ruby
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
bruno- has quit [Ping timeout: 252 seconds]
sharpmachine has quit [Ping timeout: 248 seconds]
arooni-mobile has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
brain_shim has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
ivanskie has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 264 seconds]
tmtwd has joined #ruby
<tmtwd> hello
<tmtwd> how can I turn ["1", "2", "3"] into [1,2,3] ?
vyorkin1 has joined #ruby
<pontiki> tmtwd: do you know how to turn "1" into 1 ?
<tmtwd> to_i?
eggoez has joined #ruby
<tmtwd> Integer?
<pontiki> either would work
adamski2600 has joined #ruby
vyorkin has quit [Ping timeout: 250 seconds]
<pontiki> tmtwd: look at Enumerable#map then
<tmtwd> map to_i ["1", "2"] gives me NoMethodError: undefined method `to_i' for main:Object
<pontiki> have you read the documentation?
<tmtwd> no
<tmtwd> I think I can figure it out though
<tmtwd> thanks
rodfersou has quit [Ping timeout: 255 seconds]
elia has quit [Quit: Computer has gone to sleep.]
adamski2600 has quit [Ping timeout: 250 seconds]
Pupeno has quit [Remote host closed the connection]
tno has quit [Remote host closed the connection]
xxneolithicxx has quit [Ping timeout: 255 seconds]
JDiPierro has joined #ruby
brain_shim has quit [Ping timeout: 246 seconds]
senayar has quit [Remote host closed the connection]
idafyaid has quit [Ping timeout: 264 seconds]
<baweaver> Is there a better way to define a local variable dynamically instead of using eval?
<baweaver> I could cheat and use an accessor method but that gets dangerous fast to internals
<baweaver> ha, binding saves the day again
<baweaver> nope
<baweaver> nevermind
<baweaver> hm.
hotpancakes has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
allomov has joined #ruby
<baweaver> accessor/class variable might be the way to swing this one then
brain_shim has joined #ruby
<pontiki> iunno. every time i think the only way to do something is eval, someone comes up with another way to do it
<postmodern> for abbreviations that start with a lowercase letter, how would you prefer they be constantized?
<postmodern> ex: pMAG -> PMAG or P_MAG
<pontiki> but i do see class_eval used at least somewhat
<baweaver> Oh trust me, this is anything but ordinary ruby
<baweaver> ordinarily I would not touch it
<pontiki> oh, sure, i wouldn't expect so
<baweaver> You saw my mad project last night right?
<pontiki> i've been rather preoccupied
<baweaver> Test code run under a different parser generates application code
<baweaver> debating how to rip variables from let and define them
gizmore has joined #ruby
Rutix has quit [Read error: Connection reset by peer]
<baweaver> mainly in the context of: expect(subject.method).to be(something)
<pontiki> hum
<baweaver> subject is easy to define consistently
<baweaver> Others I can just port an OpenStruct on it and method_missing it into behaving
<baweaver> If it notices the method being called is the same as the described name it'll assume the two are the same.
<baweaver> trippy stuff is trippy
<baweaver> I probably just need to map out the RSPEC code and figure out what makes it sing
<pontiki> can it generate algorithms yet?
<baweaver> nope
<baweaver> just basic structure
<pontiki> nod
<baweaver> other stuff is notoriously hard
<baweaver> and super-meta laden
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
<pontiki> these are theoreticals, but how would you write a test for, say, fibonacci sequence, or C/F conversions, that you could then generate the code.
<pontiki> i can't even stuff that into my head
<baweaver> parameter based tests
cir0x has quit [Quit: Leaving.]
<baweaver> when given x it always returns something that looks like y
<baweaver> or a formulatic proof of how you can tell
<baweaver> like a prime would be easy
<pontiki> given a set of parameters, how would you know *what* algorithm it's testing? any given set of parameters is finite