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/
olas has joined #ruby
<pontiki> i bet you're thinking of Kon Tiki, the modern day raft trip
<Ox0dea> Well, "pon" is a very common word in Jamaican English, and "tiki" just screams "islands".
senayar has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 264 seconds]
<pontiki> ah
<pontiki> what's it mean in jamaican?
<Ox0dea> On.
<pontiki> well, i would be an island girl if i could, so that fits :D
ddarkpassenger has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Casty has joined #ruby
olas has quit [Client Quit]
<slash_nick> upon... 'pon?
mcclurmc has joined #ruby
tkuchiki has joined #ruby
<pontiki> slash_nick: that sorta makes sense
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olas has joined #ruby
fgo has joined #ruby
j4cknewt has joined #ruby
dgutierrez1287 has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
volty has quit [Quit: Konversation terminated!]
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
tkuchiki has quit [Remote host closed the connection]
slackbotgz has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
Spleeze has joined #ruby
giuseppesolinas has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
Rollabunna has joined #ruby
Musashi007 has quit [Quit: Musashi007]
tubuliferous_ has joined #ruby
j4cknewt has quit [Remote host closed the connection]
xtsee has quit [Remote host closed the connection]
marr has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
JoshGlzBrk has joined #ruby
tubuliferous_ has quit [Ping timeout: 248 seconds]
ItSANgo has joined #ruby
dgutierrez1287 has joined #ruby
GETOUT has joined #ruby
GETOUT has left #ruby ["Leaving"]
chinmay_dd has joined #ruby
ddarkpassenger has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
havenwood has joined #ruby
chinmay_dd has quit [Ping timeout: 276 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
RegulationD has joined #ruby
simplyianm has quit [Remote host closed the connection]
aphprentice has quit [Ping timeout: 246 seconds]
mandarinkin has quit [Ping timeout: 246 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
sandstrom has quit [Quit: My computer has gone to sleep.]
RegulationD has quit [Ping timeout: 246 seconds]
dik_dak has quit [Quit: Textual IRC Client: www.textualapp.com]
Deele has joined #ruby
ddarkpassenger has joined #ruby
iamninja has joined #ruby
Pupeno_ has joined #ruby
charliesome has quit [Quit: zzz]
Casty has joined #ruby
<Ox0dea> How to require everything?
balazs has quit [Remote host closed the connection]
giuseppesolinas has joined #ruby
bf4 has joined #ruby
vasilakisfil_ has quit [Ping timeout: 256 seconds]
<sphex> Ox0dea: seriously?
Pupeno has quit [Ping timeout: 246 seconds]
<Ox0dea> sphex: For very reality.
mandarinkin has joined #ruby
<Ox0dea> Pleasure to bescuse my phrases. English not my mother's tongue.
<Jeff__> could someone tell me what's wrong with my puppet syntax, https://bpaste.net/show/287216d12676, specifically why the definition for the mysql::client is incorrect?
bkxd has joined #ruby
dgutierrez1287 has joined #ruby
mdw has joined #ruby
russt has quit [Quit: That's all, folks!]
Royalb15 has joined #ruby
<pontiki> everything?? that would take some time at startup, i imagine
bf4 has quit [Ping timeout: 265 seconds]
<Ox0dea> It would, but then it's all there close at hand.
<pontiki> true, but it's hard to imagine one app would need to require *everything*
<Ox0dea> This app is such a one.
datacatalyst has joined #ruby
<sphex> Ox0dea: I don't want to tell you what to do.. but please don't do that? :p
<pontiki> maybe i'm misunderstanding what "everything" means?
russt has joined #ruby
<Ox0dea> Every require-able file in $LOAD_PATH.
findaway has quit [Ping timeout: 256 seconds]
<sphex> there are "require_all" helpers, but looks like they need to be given at least one path component. you could always traverse $LOAD_PATH and require everything I guess. there are prolly some shenanigans for gem paths though.
<Ox0dea> sphex: Aye, except that some files must be required before others.
<Ox0dea> >> require 'remote-tk'
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruboto> Ox0dea # => cannot load such file -- remote-tk (LoadError) ...check link for more (https://eval.in/388609)
<Ox0dea> Well, that one relies on 'multi-tk' having already been required. Does Gem provide a way to resolve these sorts of dependencies?
<pontiki> i'm not sure how that would work, exactly, for require; how does it check if it's already loaded something? just be path name?
<sphex> Ox0dea: hrm. well, usually, each file should require the file it needs, and if you require them again it'll be ignored if they're already loaded, so it should be fine.
datanoise has joined #ruby
cashnguns has quit [Ping timeout: 248 seconds]
<pontiki> any given package should require it's own dependencies
<Ox0dea> pontiki: It checks $LOADED_FEATURES to determine whether or not something's already in.
vyorkin has quit [Ping timeout: 252 seconds]
<Ox0dea> sphex: Alas, that is not the case, as demonstrated with 'remote-tk'. It fails upon require if 'multi-tk' hasn't yet been required.
<Ox0dea> That directory listing is non-deterministic is the crux of the problem.
<Ox0dea> Erm, not quite the crux, but definitely a hurdle.
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
datanoise has quit [Ping timeout: 256 seconds]
mcclurmc has quit [Ping timeout: 272 seconds]
<pontiki> ah
<slash_nick> >> class SwissArmyKnife;ObjectSpace.each_object(Module) do |mod|; include mod if !mod.is_a?(Class); end;end
<ruboto> slash_nick # => 298 (https://eval.in/388612)
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Agoldfish has quit [Quit: G'Bye]
Oka has quit [Remote host closed the connection]
<pontiki> if you ran all the way through $LOAD_PATH, requiring every file below each of them, would it be possible to end up reloading something of a different version or mixing versions of things?
datacatalyst has quit [Ping timeout: 264 seconds]
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
giuseppesolinas has quit [Quit: Leaving]
choke has joined #ruby
choke has quit [Client Quit]
<Ox0dea> pontiki: To be sure, collisions would abound, but I could use the two-argument form of Kernel.load to bring everything in under anonymous modules.
<pontiki> yeah
TheHodge has quit [Quit: Connection closed for inactivity]
<Diabolik> what up mi hombres
tkuchiki has joined #ruby
<Ox0dea> s/s/s y mujeres/
tkuchiki has quit [Remote host closed the connection]
armyriad has quit [Quit: Leaving]
casadei has joined #ruby
fgo has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
Rollabunna has joined #ruby
Pupeno_ has quit [Remote host closed the connection]
Pupeno has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<slash_nick> s/mi/mis/
<slash_nick> because plurality
Rollabunna has quit [Ping timeout: 248 seconds]
fgo has quit [Ping timeout: 246 seconds]
Pupeno_ has joined #ruby
slackbotgz has quit [Remote host closed the connection]
Pupeno has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
kahuna_ has quit [Quit: Lost terminal]
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jfarmer has joined #ruby
x1337807x has joined #ruby
blue_deref has joined #ruby
<nofxx> is there some Thread.disable! or something that I can debug a code easily? Got some threads I'm commenting.. kinda boring need comment the end too heh
x1337807x has quit [Client Quit]
<nofxx> disable all threads I mean, as if is wasn't there
<nofxx> ok, ruby to the rescue, I've joined all the calls in a single one to comment or not. duplication gonne.
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
bking39116 has left #ruby [#ruby]
<jfarmer> nofxx Mind sharing the code? I don't really understand the idea of "disabling all threads."
<jfarmer> The semantics of a program w/ threads is fundamentally different than one without.
blue_deref has quit [Client Quit]
abuzze_ has joined #ruby
yayfoxes_ has joined #ruby
ddarkpassenger has quit [Quit: Textual IRC Client: www.textualapp.com]
tsvenson has joined #ruby
abuzze has quit [Ping timeout: 250 seconds]
millerti has joined #ruby
yayfoxes_ has quit [Client Quit]
<Ox0dea> >> ObjectSpace.each_object(Thread, &:kill)
<ruboto> Ox0dea # => exit (SystemExit) (https://eval.in/388613)
<Ox0dea> nofxx: ^ I think that does what you want.
yayfoxes_ has joined #ruby
shoutsid has quit []
meph has quit [Quit: Leaving.]
bigmac__ has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
chipotle has quit [Quit: cheerio]
freerobby has joined #ruby
bubbys has quit [Ping timeout: 265 seconds]
freerobby has quit [Client Quit]
balazs has joined #ruby
duncannz has quit [Ping timeout: 248 seconds]
<nofxx> jfarmer, not in this case, it's a media export: from 1 svg or png icon I'm generating about 350 pngs
<nofxx> the imagemagick/rsvg calls are, of course, 400% faster using threads, but annoying to test
<nofxx> Ox0dea, ty, gonna try later
<jfarmer> Are you using rmagick or mini_magick to interact with imagemagick?
balazs has quit [Ping timeout: 246 seconds]
simplyianm has quit [Remote host closed the connection]
<nofxx> jfarmer, mini... was everything going fine so far, but now the last thing I need looks like mini doesnt do: create a new canvas hehe
havenwood has quit [Ping timeout: 276 seconds]
<jfarmer> nofxx Threads are likely not getting you much benefit here; mini_magick works by forking a process running ImageMagick's `convert` command
<jfarmer> So if you're doing the work in each thread, you're effectively creating a thread that then creates a fork
<nofxx> jfarmer, hm, trying to understand but, what gives the 30s to 7s change ?
simplyianm has joined #ruby
Versality has joined #ruby
<jfarmer> nofxx It's sort of a cheat because Ruby's threads aren't really threads, but a new thread will get scheduled if another thread starts doing I/O
<jfarmer> In this case, the I/O is the work done by the external process.
casadei has quit [Remote host closed the connection]
<jfarmer> You'd likely see a much bigger speed up if you were able to handle the forking yourself and not use threads at all
<jfarmer> (I'm not familiar enough with mini_magick to say exactly how you'd do that.)
<nofxx> btw, imagemagick support to SVG is really slow and you need to calculate a lot of stuff by hand. So in the SVG -> PNG case there's no imagemagick. Just calling rsvg-convert directly
<jfarmer> That's fair and I'm not sure how rsvg-convert works. If it's CPU bound, your threads will block.
<nofxx> it's very fast, even w/o threads. But the results (30s down to 7s) where PNG -> PNG with mini
Oka has joined #ruby
mcclurmc has joined #ruby
mcclurmc has quit [Remote host closed the connection]
<nofxx> in the any case rsvg is a dependency of imagemagick for SVG, so I guess it's a feature not using IM for this job
<nofxx> only need raster*
CowboyCoder has joined #ruby
Versality has quit [Ping timeout: 264 seconds]
datanoise has joined #ruby
<nofxx> jfarmer, but forking is good idea
<nofxx> is a*
Indian has quit [Ping timeout: 265 seconds]
<jfarmer> nofxx My point was more that the forking is already happening and it'd be "best" if you could piggy-back off that.
<jfarmer> And just forget about threads entirely
<jfarmer> Looking through the minimagick docs, though,it's not immediately obvious if this is possible let alone officially supported in the API
freerobby has joined #ruby
datanoise has quit [Ping timeout: 265 seconds]
freerobby has quit [Client Quit]
dented42 has joined #ruby
ryba has quit [Ping timeout: 256 seconds]
<jfarmer> Here's where MiniMagick is eventually farming out to ImageMagick: https://github.com/minimagick/minimagick/blob/master/lib/mini_magick/shell.rb#L32-L56
Pupeno_ has quit [Remote host closed the connection]
<CowboyCoder> can anybody suggest a way to list the classes/modules available in a gem from the cli?
freerobby has joined #ruby
<pontiki> grep
finisherr has joined #ruby
<CowboyCoder> ;)
<jfarmer> CowboyCoder gems are free to define any classes or modules they want, so this is a _little_ tricky
<Ox0dea> CowboyCoder: cls = ->{ObjectSpace.each_object(Class).to_a}; had = cls[]; require 'thing'; have = cls[] - had
<jfarmer> Yeah, you'd have to resort to a hack like that.
<Ox0dea> Here, `have` will contain the classes which were introduced by requiring 'thing'.
<jfarmer> CowboyCoder It's also not so black and white because classes and modules can be re-opened in Ruby.
Musashi007 has quit [Quit: Musashi007]
<CowboyCoder> yea, why I'm stuggling w/ it...looking to explore gems at a high level
<CowboyCoder> ty for the info!
<Ox0dea> CowboyCoder: If you're just wanting to spelunk around in some gem, use Pry to `cd` into the "main" module, then `ls` to list all the things.
tubuliferous_ has joined #ruby
Rollabunna has joined #ruby
<Ox0dea> You can, of course, `cd` into any of those things to deepen your dive.
<CowboyCoder> Ox0dea: cool, I'll give it a shot!
bkxd has joined #ruby
freerobby has quit [Client Quit]
<nofxx> jfarmer, that's a nice open3 shell.rb, no? heh give me the idea for a new gem: rsvg-mini
<nofxx> mini_rsvg? Anyway, run rsvg-convert in a more sane way than my system(comm)
<jfarmer> CowboyCoder Most gems come w/ auto-generated documentation that lists the available classes and modules
finisherr has quit [Client Quit]
<jfarmer> (Not always with good commentary, but at least w/ the names of the classes and methods.)
<jfarmer> nofxx Hah, yes.
<nofxx> jfarmer, there's a ext one: rsvg2, from gnome2... scary
finisherr has joined #ruby
<CowboyCoder> jfarmer: ri or something else?
karols has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
<jfarmer> CowboyCoder Whether the docs are available on your computer depend on whether you installed them alongside the gem. If so, yes, ri is one tool to do that.
serivich has joined #ruby
<nofxx> might give a try, not sure it's much os friendly... cairo, glib, gdb_pixbuf2....
Rollabunna has quit [Ping timeout: 248 seconds]
<jfarmer> But there are also services like http://apidock.com/ that scan gems and do the auto-generation themselves
alotofnoodles has joined #ruby
Blaguvest has quit []
finisherr has quit [Client Quit]
_blizzy_ has joined #ruby
<CowboyCoder> just looking for something offline and ideally cli to explore and reference
SpikeMaster has joined #ruby
<jfarmer> Yep, then ri will work
fgo has joined #ruby
nfk has quit [Quit: yawn]
Musashi007 has joined #ruby
<CowboyCoder> ok, i'll dig more on using ri, thanks again!
<jfarmer> CowboyCoder Try it in irb: > ri Array#map
<jfarmer> >> ri Array#map
<ruboto> jfarmer # => undefined method `ri' for main:Object (NoMethodError) ...check link for more (https://eval.in/388623)
<jfarmer> (was half expecting that to work)
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
<CowboyCoder> jfarmer: how about something that shows per gem, not class?
dorei has quit []
<CowboyCoder> so I do a "gem list" then what to view what's in the gem?
finisherr has joined #ruby
malconis_ has joined #ruby
<jfarmer> CowboyCoder run "gem server" and visit http://localhost:8808
<SpikeMaster> what is faster? ruby or javascript?
malconis has quit [Ping timeout: 244 seconds]
<CowboyCoder> jfarmer: exactly what i'm looking for, but is there a cli version? or am I stuck w/ browser?
<jfarmer> links http://localhost:8808
finisherr has quit [Client Quit]
<jfarmer> But seriously, I don't know. Not sure what you're looking for in a CLI version. Just a text dump?
<CowboyCoder> jfarmer: :) sure!
<jfarmer> You can probably tell rdoc to generate the docs in a format other than HTML.
fgo has quit [Ping timeout: 252 seconds]
<CowboyCoder> will see what I can see :)
bkxd has quit [Ping timeout: 244 seconds]
alotofnoodles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jfarmer> Also, looking at "ri --help" it appears you can tell ri to list the docs for a specific gem
rgb-one has joined #ruby
finisherr has joined #ruby
alotofnoodles has joined #ruby
<jfarmer> > Usage: ri [options] [names...]
<jfarmer> > Where name can be: ... gem_name: | gem_name:README | gem_name:History
<jfarmer> > If the gem name is followed by a ':' all files in the gem will be shown.
<Ox0dea> CowboyCoder: $EDITOR $(dirname `gem which foo`)
<jfarmer> So, try something like ri rails:
<jfarmer> and see what happens
<pontiki> maybe not rails :D
<Ox0dea> ".rails not found"
finisherr has quit [Client Quit]
<jfarmer> Ox0dea With a colon after rails?
<jfarmer> "ri rails:
<jfarmer> "
<Ox0dea> Well, how about that.
<CowboyCoder> hmm.... ri thor:
<Ox0dea> jfarmer: It's just a pager, though.
<CowboyCoder> blank...
<CowboyCoder> maybe need to generate docs?
<jfarmer> Ox0dea I can't see it myself because I don't install docs alongside gems.
<jfarmer> CowboyCoder Maybe. They're installed by default.
RegulationD has joined #ruby
<jfarmer> A lot of people disable it, though, because generating the docs is often the longest part of the gem installation process. Haha.
<jfarmer> 2 seconds to download + install Ruby files, 10 seconds to generate + install docs
j4cknewt has joined #ruby
<Ox0dea> jfarmer: Do you impose some sort of arbitrary limit on the number of terminals you keep open?
<CowboyCoder> ri -l .... that's handy :)
ledestin has joined #ruby
<Ox0dea> CowboyCoder: That seems exactly the thing you were looking for. :)
SCHAAP137 has quit [Remote host closed the connection]
<CowboyCoder> yup...with good tips along the way!
rgb-one has quit [Read error: Connection reset by peer]
finisherr has joined #ruby
<jfarmer> ri -l doesn't associate each class w/ the gem it came from, at least not for me
<baweaver> TMUX \o/
<CowboyCoder> jfarmer: yea, don't know where it came from, but I can dig around in what's available...
<jfarmer> Ox0dea Well, when I'm cloning someone else's project to help them debug it, I don't want "bundle install" to take 30-40 seconds longer than it has to.
<jfarmer> While we just sit there looking at the screen, talking about the weather, whatever.
<baweaver> parallel
<jfarmer> ?
finisherr has quit [Client Quit]
<baweaver> --jobs
<baweaver> done
eggoez has quit [Ping timeout: 272 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
<jfarmer> :)
<baweaver> ah
<baweaver> already got it then
armyriad has joined #ruby
<jfarmer> I literally never use the local docs; there's no good reason for me to add 30-50% to the install time of my gems.
<baweaver> well, useful for any lurkers that didn't know that was a thing.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<baweaver> for all other things you can just use Dash on it to auto-doc
<baweaver> though it costs a bit.
SpikeMaster has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<baweaver> well off I go, cheers
flughafe1 has quit [Remote host closed the connection]
<jfarmer> cheers
eggoez has joined #ruby
CowboyCoder has quit [Quit: WeeChat 0.4.2]
baweaver has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 246 seconds]
fenjamin has quit [Ping timeout: 246 seconds]
fenjamin has joined #ruby
ashleyis has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
alotofnoodles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
mcclurmc has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Changing host]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
darkf has joined #ruby
troulouliou_dev has joined #ruby
neanderslob has joined #ruby
sevenseacat has joined #ruby
konsolebox has joined #ruby
charliesome has joined #ruby
JoshGlzBrk has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
bf4 has joined #ruby
chickenBox has joined #ruby
chickenBox has left #ruby [#ruby]
bf4 has quit [Ping timeout: 255 seconds]
[k- has joined #ruby
mcclurmc has quit [Remote host closed the connection]
jfarmer has quit []
balazs has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
sankaber has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
Musashi007 has quit [Quit: Musashi007]
balazs has quit [Ping timeout: 252 seconds]
datanoise has joined #ruby
sankaber has quit [Ping timeout: 250 seconds]
scx has quit [Ping timeout: 246 seconds]
scx_ has joined #ruby
Rollabunna has joined #ruby
braincrash has quit [Quit: bye bye]
Rollabunna has quit [Ping timeout: 248 seconds]
aphprentice has joined #ruby
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
lkba has joined #ruby
Asher has quit [Quit: Leaving.]
datanoise has quit [Ping timeout: 256 seconds]
Scroff has joined #ruby
bigmac__ has joined #ruby
lkba_ has quit [Ping timeout: 250 seconds]
Asher has joined #ruby
Asher has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
Asher has joined #ruby
CloCkWeRX has joined #ruby
Rakunh0 has joined #ruby
linc01n has joined #ruby
kabukabu has quit [Quit: Leaving]
michael_mbp has joined #ruby
fgo has joined #ruby
Scrofff has joined #ruby
cb__ has joined #ruby
hagabaka has joined #ruby
braincrash has joined #ruby
drzel has quit [Ping timeout: 264 seconds]
<zacts> was smalltalk the main inspiration for Ruby's OOPish way of coding?
charliesome has quit [Quit: zzz]
<zacts> or what were the main influences on Ruby?
Scroff has quit [Ping timeout: 265 seconds]
<zacts> I see smalltalk, perhaps Common Lisp's CLOS too?
<zacts> I do see how Perl influenced the scripting / syntax of Ruby (either to be much different from perl, or to borrow ideas from the arguably expressive creative side of Perl syntax)
mcclurmc has joined #ruby
RobertBirnie has joined #ruby
cb__ has quit [Remote host closed the connection]
linc01n has quit [Quit: ZNC - http://znc.in]
fgo has quit [Ping timeout: 252 seconds]
linc01n has joined #ruby
mhb has joined #ruby
drzel has joined #ruby
hagabaka has quit [Quit: No Ping reply in 210 seconds.]
RobertBirnie has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
hagabaka has joined #ruby
mcclurmc has quit [Ping timeout: 276 seconds]
mcclurmc has joined #ruby
frem has joined #ruby
linc01n has quit [Quit: ZNC - http://znc.in]
linc01n has joined #ruby
<sphex> zacts: seems to be mostly smalltalk. CLOS was more "generic methods"-based. lisp packages were the primary way of organizing them, not classes.
gix has quit [Ping timeout: 252 seconds]
Scrofff has quit [Ping timeout: 244 seconds]
<sphex> zacts: smalltalk had a "everything is done by sending messages to objects" approach. even conditionals were done by passing a block to an object just for that. ruby doesn't go as far.
yayfoxes_ has quit [Quit: WeeChat 1.0.1]
<zacts> oh cool interesting
bigmac__ has quit [Ping timeout: 256 seconds]
iamninja has quit [Ping timeout: 246 seconds]
sarkyniin has joined #ruby
gix has joined #ruby
fenjamin has quit [Ping timeout: 248 seconds]
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
<Ox0dea> sphex: But it can! :)
_blizzy_ has quit [Ping timeout: 248 seconds]
<Ox0dea> zacts: I think you're right that Smalltalk + Perl + Lisp is a pretty good distillation of Ruby's ancestry.
fenjamin has joined #ruby
hagabaka has joined #ruby
fenjamin has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
Scrofff has joined #ruby
sevvie has joined #ruby
cb__ has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wldcordeiro has quit [Remote host closed the connection]
cb__ has quit [Read error: Connection reset by peer]
cb__ has joined #ruby
cb__ has quit [Changing host]
cb__ has joined #ruby
wldcordeiro has joined #ruby
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
Scrofff has quit [Ping timeout: 264 seconds]
fantazo has joined #ruby
RobertBirnie has quit [Ping timeout: 255 seconds]
<pontiki> and Emacs :)
wldcordeiro has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
towski_ has joined #ruby
Musashi007 has joined #ruby
<pontiki> anyway, you can get it straight from Matz: https://www.ruby-lang.org/en/about/
bkxd has joined #ruby
Pupeno has joined #ruby
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cb__ has quit [Ping timeout: 265 seconds]
datanoise has joined #ruby
tubuliferous_ has joined #ruby
Rollabunna has joined #ruby
Pupeno has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Ping timeout: 255 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
tubuliferous_ has quit [Read error: Connection timed out]
bf4 has joined #ruby
hagabaka has joined #ruby
bf4 has quit [Ping timeout: 252 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
darkf_ has joined #ruby
darkf has quit [Ping timeout: 248 seconds]
towski_ has quit [Remote host closed the connection]
TinkerTyper has quit [Ping timeout: 276 seconds]
TinkerTyper has joined #ruby
Scrofff has joined #ruby
baweaver has joined #ruby
Zamyatin has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkf_ is now known as darkf
renderfu_ has joined #ruby
<zenspider> sphex: pretty much sums up why I don't like CLOS
tflat has quit []
Channel6 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
RegulationD has joined #ruby
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
NeverDie has joined #ruby
vdamewood has joined #ruby
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
hagabaka has joined #ruby
icebourg has joined #ruby
renderfu_ has quit [Ping timeout: 250 seconds]
cb_ has quit []
RegulationD has quit [Ping timeout: 248 seconds]
braincra- has joined #ruby
bigmac__ has joined #ruby
hagabaka has quit [Client Quit]
knite has quit [Read error: Connection reset by peer]
knite has joined #ruby
drzel has quit [Ping timeout: 248 seconds]
braincrash has quit [Ping timeout: 265 seconds]
tflat has joined #ruby
drzel has joined #ruby
AlexAltea has quit [Ping timeout: 265 seconds]
Yiota has joined #ruby
knite has quit [Read error: Connection reset by peer]
abderian has joined #ruby
eggoez has quit [Ping timeout: 272 seconds]
knite has joined #ruby
<abderian> any experts on sinatra here? :)
<zenspider> just ask, don't ask to ask
<[k-> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
hagabaka has joined #ruby
Yiota has quit [Client Quit]
<abderian> got it. I'm a beginner when it comes to backend web development, and understand CRUD apps just fine. Recently I've been working on a simple project that scrapes data off of a website and enables users to search through that data
<abderian> problem is, I don't know where to put the code that scrapes the data
bruno-_ has joined #ruby
<abderian> say if I need it run once a week
<Ox0dea> abderian: Are you on Windows?
<abderian> so far code only gets executed when a user loads a page
<abderian> no on a mac and deving in ubuntu
<Ox0dea> Then a cron job is just what you need.
bruno- has quit [Read error: Connection reset by peer]
<zenspider> so, really nothing to do with sinatra, more to do with "how do I run out-of-band jobs for my website"
<zenspider> make a script that does what you want on the cmdline. it needs to run standalone. hook it up with cron to run at a specified time
<abderian> oh my mistake then, I'm still trying to wrap my head around backend development in general > <
<abderian> I see
<abderian> This whole time I was trying to somehow link it with sinatra
<zenspider> that "run standalone" part is important. cron runs in a very limited env
<zenspider> it still prolly needs whatever ORM code you have for your app, so it still needs it, it just isn't related to an http request/response
<abderian> That makes a lot of sense
hagabaka has quit [Client Quit]
kies has joined #ruby
<abderian> Up until now I haven't programmed outside of that so I thought I was confined to writing all my code in there
<abderian> Thanks a lot!
eggoez has joined #ruby
<Nilium> Particularly important, for cron at least, is that you'll likely want to set some of the environment variables you normally always have
chinmay_dd has joined #ruby
hagabaka has joined #ruby
kies has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<abderian> hmm, I see
Zamyatin has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
arescorpio has quit [Quit: Leaving.]
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
chinmay_dd has quit [Ping timeout: 252 seconds]
hanmac has quit [Ping timeout: 246 seconds]
malconis_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Ping timeout: 246 seconds]
hagabaka has joined #ruby
j4cknewt has quit [Remote host closed the connection]
linc01n has quit [Quit: ZNC - http://znc.in]
Musashi007 has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
linc01n has joined #ruby
Scrofff has quit [Ping timeout: 244 seconds]
Marisa has joined #ruby
<Marisa> hi all
<al2o3-cr> o/
<sevenseacat> afternoon
<Marisa> anybody know of a good resource that explains how to parse a string so it can be split up via spaces and new lines? I'm finding the official documentation hard to follow
linc01n has quit [Quit: ZNC - http://znc.in]
<Ox0dea> Marisa: String#split splits on whitespace by default.
<Ox0dea> >> "foo bar \n baz".split
<ruboto> Ox0dea # => ["foo", "bar", "baz"] (https://eval.in/388630)
<zenspider> I love it when the answer is in the question
linc01n has joined #ruby
<sevenseacat> zenspider: makes it easy, doesnt it
<zenspider> yup yup.
hagabaka has quit [Quit: No Ping reply in 180 seconds.]
<zenspider> Marisa: `ri String.split` in your terminal for the doco
<zenspider> even just `ri split`
<nofxx> Marisa, split(/\s/) ... nice name, portuguese/spanish?
Rollabunna has joined #ruby
s2013 has joined #ruby
<Marisa> American actually ;)
<Marisa> thanks for the help
<Ox0dea> >> "foo bar \n baz".split(/\s/)
<ruboto> Ox0dea # => ["foo", "", "", "bar", "", "", "", "", "baz"] (https://eval.in/388631)
<Ox0dea> nofxx: ^
<Ox0dea> Please don't offer advice willy-nilly.
<Ox0dea> There is the potential to do more harm than good.
linc01n has quit [Remote host closed the connection]
<nofxx> Ox0dea, she wants new lines, easy to fix anyway
hagabaka has joined #ruby
<Marisa> well i'm trying to split up a string by both new lines and spaces
linc01n has joined #ruby
<Marisa> i'm at the point where i know more about how to solve my problem than the syntax to do it...
linc01n has quit [Client Quit]
<zenspider> my general advice: think about your types, formulate your question, take the keywords and the types and try to look for it with ri
<Ox0dea> All my objects are ducks.
<zenspider> in your question, you mentioned Strings and split. boom: ri String.split
linc01n has joined #ruby
<nofxx> but yeah, taught split's default was only for spaces... Marisa no need for the parameters. Me too, south america ;)
keen___________4 has joined #ruby
<zenspider> taught -> thought ?
<nofxx> zenspider, sorry, sleepy today
<Marisa> zenspider: thanks for the tip, I appreciate it
<zenspider> no prob
Rollabunna has quit [Ping timeout: 248 seconds]
<zenspider> (both)
Rickmasta has joined #ruby
freerobby has quit [Quit: Leaving.]
hanmac has joined #ruby
keen___________3 has quit [Ping timeout: 252 seconds]
ducklobster has quit [Ping timeout: 246 seconds]
<Marisa> nofxx: lol yeah, I forget that american can mean more than one continent
Sinami has joined #ruby
othernick has joined #ruby
balazs has joined #ruby
<Marisa> so, any general recommendations on books/websites to learn Ruby comprehensively? I've been doing learn ruby the hard way but I'm about 2/3rds through and starting to realize it's not very good about teaching "the ruby way" of coding
<zenspider> it's not very good imo
<zenspider> I'm partial to the pickaxe book, but I'm biased
<Ox0dea> "Zed's dead, baby. Zed's dead."
<mhb> The Well Grounded Rubyist + Pick Axe + Eloquent Ruby
<Marisa> lol
<Ox0dea> Really can't go wrong with those.
<Marisa> thanks :)
Sin90 has quit [Ping timeout: 246 seconds]
<Ox0dea> Metaprogramming Ruby is pretty good once you've got the hang of things.
<mhb> just get them all, really
<mhb> @_@
abderian has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hotpancakes has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Remote host closed the connection]
balazs has quit [Ping timeout: 248 seconds]
RickHull has left #ruby [#ruby]
mujou has joined #ruby
hotpancakes has joined #ruby
framling has joined #ruby
<Marisa> hmm, this is being annoying...i'm using cloud 9 as my ide and when i run ri (which does work), it can't find anything about any function
michael_mbp has quit [Excess Flood]
hotpancakes has quit [Remote host closed the connection]
<Marisa> just keep getting "nothing know about .foo"
alotofnoodles has joined #ruby
Yiota has joined #ruby
<zenspider> I don't know anything about cloud 9... but it sounds like you installed ruby w/o rdoc/ri info
<zenspider> if you used rvm (ugh) there should be a command to generate it
<konsolebox> Readline.readline breaks completion on filenames that have spaces on them. Is there a common configuration for it? e.g. Readline.readline('abc: '), then enter a pathname with a space. Pressing the next would no longer yield anything.
<konsolebox> *next tab
<framling> zenspider: is rvm no good?
<Marisa> i didn't install it myself, basically, they use a virtual machine (or something like it)
<al2o3-cr> Marisa: they use ubuntu right?
michael_mbp has joined #ruby
<Marisa> believe so
<Ox0dea> konsolebox: Works fine here?
icebourg has quit []
<konsolebox> Ox0dea: works on a directory with a space? tab yields filenames within?
<al2o3-cr> Marisa: apt-get install ri
<Marisa> i figured out how to get rvm to download the documentation
j4cknewt has joined #ruby
<Ox0dea> konsolebox: Oui.
michael_mbp has quit [Excess Flood]
<[k-> ^ he means yes
<konsolebox> yes saw the translation quick :)
<Ox0dea> konsolebox: Ah, scratch that. Space files in space directories = not good.
<[k-> look at the top def
michael_mbp has joined #ruby
<[k-> pretty funny
Versality has joined #ruby
<al2o3-cr> good ol' ud :)
<konsolebox> [k-: yeah that's what i saw :)
<Ox0dea> Y'all need some culture.
<[k-> hehehe
Oka has quit []
xtsee has joined #ruby
<konsolebox> Ox0dea: i wonder if there's a tweak for it, or else i would end up reimplementing
<konsolebox> brb
sarkyniin has quit [Ping timeout: 276 seconds]
<Ox0dea> konsolebox: Other readline implementations seem to handle this tricky case by inserting backslashes where appropriate.
<Ox0dea> Disambiguation is necessary, and that's the most logical way to do it.
<[k-> %20
<Ox0dea> I have little trouble believing there's some system out there that uses percent-encoding at the shell.
simplyianm has quit [Remote host closed the connection]
Scroff has joined #ruby
Musashi007 has quit [Quit: Musashi007]
psyprus has quit [Ping timeout: 248 seconds]
psyprus has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<konsolebox> Ox0dea: you mean other non-Ruby readlines?
<Ox0dea> konsolebox: Bash's, to be precise.
<Ox0dea> But they're both using GNU readline.
<Ox0dea> So it must be that Bash is using its own rl_filename_completion_function.
<konsolebox> Ox0dea: well, readline is bash's i think
bkxd has quit [Ping timeout: 265 seconds]
s2013 has joined #ruby
Xiti has quit [Quit: Xiti]
hotpancakes has joined #ruby
kies has joined #ruby
finisherr has joined #ruby
Pupeno has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
finisherr has quit [Client Quit]
Versality has quit [Quit: Be back later ...]
simplyianm has quit [Remote host closed the connection]
lxsameer has joined #ruby
tubuliferous_ has joined #ruby
Pupeno has quit [Ping timeout: 246 seconds]
dented42 has joined #ruby
Rollabunna has joined #ruby
Rakunh0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j4cknewt has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 252 seconds]
hotpancakes has quit [Ping timeout: 264 seconds]
<Ox0dea> konsolebox: Bash uses so thoroughly customized a readline that the file is called "bashline.c". :)
<Ox0dea> $ stat -c '%s' Downloads/bash-4.3/bashline.c dev/ruby-trunk/ext/readline/readline.c
Rollabunna has quit [Ping timeout: 256 seconds]
IanV0rn has joined #ruby
<Ox0dea> 116288
<Ox0dea> 55277
<Ox0dea> That doesn't tell anywhere near the whole story, of course, but handling space files in space directories is definitely not a stock readline feature.
j4cknewt has joined #ruby
mcclurmc has joined #ruby
Dopagod has joined #ruby
IanV0rn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
IanV0rn has joined #ruby
simplyianm has joined #ruby
<konsolebox> Ox0dea: wow, thank you for investigating. that's bad news :)
mcclurmc has quit [Ping timeout: 250 seconds]
<konsolebox> Ox0dea: i think i'll try to hack it with a callback to a completion function
Rakunh0 has joined #ruby
simplyianm has quit [Remote host closed the connection]
<Ox0dea> konsolebox: Happy to help. Be warned: it can get pretty gnarly.
<Ox0dea> There's an /* XXX */ comment on a free() call right next to where I suspect the magic is happening.
abuzze_ has quit [Remote host closed the connection]
<Ox0dea> How much would you hate shelling out to `read`?
abuzze has joined #ruby
abuzze has quit [Remote host closed the connection]
RegulationD has joined #ruby
fgo has joined #ruby
abuzze has joined #ruby
Pupeno has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has joined #ruby
finisherr has joined #ruby
yayfoxes has quit [Disconnected by services]
RegulationD has quit [Ping timeout: 264 seconds]
finisherr has quit [Client Quit]
yayfoxes_ has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
Pupeno has quit [Ping timeout: 272 seconds]
swgillespie has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
Scroff has joined #ruby
Musashi007 has joined #ruby
IanV0rn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies has quit [Ping timeout: 256 seconds]
simplyianm has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Soda has quit [Remote host closed the connection]
BrianBoyko has quit [Quit: Leaving]
Xiti has joined #ruby
bkxd has joined #ruby
_blizzy_ has joined #ruby
Rollabunna has joined #ruby
fantasticsid has joined #ruby
_ht has joined #ruby
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
roolo has joined #ruby
jfarmer has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
<Ox0dea> The Greeks had 256-core processing units: http://i.imgur.com/Uazphhf.jpg
_blizzy_ has quit [Ping timeout: 248 seconds]
amclain has quit [Quit: Leaving]
ndrei has joined #ruby
bf4 has joined #ruby
simplyianm has quit [Remote host closed the connection]
abuzze has quit [Ping timeout: 264 seconds]
simplyianm has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ashleyis has joined #ruby
fantasticsid has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
fantasticsid has joined #ruby
vdamewood has quit [Quit: Life beckons.]
davedev24_ has quit [Ping timeout: 246 seconds]
GPrime has joined #ruby
Oka has joined #ruby
yardenbar has joined #ruby
simplyianm has quit [Remote host closed the connection]
Rollabunna has joined #ruby
A205B064 has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 248 seconds]
bkxd has quit [Ping timeout: 246 seconds]
mcclurmc has joined #ruby
baweaver has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 256 seconds]
konsolebox has quit [Quit: Leaving]
konsolebox has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
User458764 has joined #ruby
peter_paule has joined #ruby
mcclurmc has quit [Ping timeout: 264 seconds]
sinkensabe has quit [Remote host closed the connection]
balazs has joined #ruby
wildroman2 has joined #ruby
Channel6 has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
celly has joined #ruby
fantazo has quit [Ping timeout: 256 seconds]
doodleha_ has joined #ruby
celly has quit [Client Quit]
wildroman2 has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
wildroman2 has joined #ruby
balazs has quit [Ping timeout: 244 seconds]
yardenbar has joined #ruby
doodleha_ has quit [Ping timeout: 246 seconds]
<Marisa> have a question about variable scope...i have 3 variables that I want to use, and i am using a loop to parse their values from my input...would best practice to use a @instancevariable when I call them in the loop and then later in the program or should i just initialize them before the loop?
wildroman2 has quit [Ping timeout: 250 seconds]
chinmay_dd has quit [Ping timeout: 272 seconds]
<[k-> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
doodleha_ has joined #ruby
<shevy> ruboto don't be so pessimistic a bot!
<[k-> :<
<shevy> Marisa if you work within a class, I recommend to initialize all your variables right at creation-time (when you call .new; so in other words, within "def initialize"; I use a common method for that, which I then call "def reset")
doodleha_ has quit [Read error: Connection reset by peer]
<Marisa> it's more like, since i'm initializing them inside a loop, i can't call them later (they're local to the loop), so should i make them instance variables (by using @name) or should i just initialize the variables before i assign them values
<Marisa> not really a code question, more of a style question, if you dig
sameerynho has joined #ruby
<shevy> if you require them to be persistent, then use @ivars; or initialize them outside the loop
<Marisa> this is a pretty simple program, i'm not even using a class
<shevy> sadly
<shevy> :-)
<shevy> actually you answered your own question there
<shevy> you want to use local variables, which you initialize outside the loop
lxsameer has quit [Ping timeout: 246 seconds]
doodleha_ has joined #ruby
<shevy> ruby is an OOP language though, the whole point of using a class is that you can re-use it neatly structured through a class
Scroff has quit [Read error: Connection reset by peer]
<Marisa> totally, but it's not needed for what I'm doing
<[k-> I still have no clue about what she wants
Carnage\ has joined #ruby
<[k-> does that variable need to be global?
<[k-> or does it need to be local to a method only
doodleha_ has quit [Read error: Connection reset by peer]
<Marisa> i think initializing the variables before the loop is the way to go for this
datanoise has quit [Ping timeout: 256 seconds]
<[k-> in general, choose the smallest scope possible
lavros has joined #ruby
doodleha_ has joined #ruby
vyorkin has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
<shevy> I sort of ended up using classes almost all the time; or at the least modules
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Ox0dea> It just feels "cleaner" somehow.
khebbie has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
vyorkin has quit [Ping timeout: 256 seconds]
doodleha_ has joined #ruby
Dopagod has quit [Ping timeout: 264 seconds]
doodleha_ has quit [Read error: Connection reset by peer]
bnizzle has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
Carnage\ has quit []
tubuliferous_ has joined #ruby
doodleha_ has joined #ruby
<Marisa> woohoo, I got it to parse my data inputs and assign variables correctly. Thanks guys for your help :)
fgo has joined #ruby
<Ox0dea> Marisa: May we see?
doodleha_ has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<[k-> so you only need the first two lines?
tubuliferous_ has quit [Ping timeout: 256 seconds]
<Marisa> the data is always formatted the same, on line 1 there are 3 numbers separated by spaces and on line 2 there are up to 10 numbers separated by spaces
<Marisa> yeah, the loop is a bit overkill, no?
<[k-> yeah
fgo has quit [Ping timeout: 246 seconds]
khebbie_ has joined #ruby
<[k-> you could also break after 2, but the resources are already wasted
<Marisa> any suggestions for cleaning it up? I was having trouble getting data using ARGF
<jfarmer> Marisa You're only ever receiving 2 lines?
<Marisa> yes
<[k-> as in the file is max 2 lines?
<Ox0dea> Marisa: Splitting on ' ' is unnecessarily brittle; your code will malfunction in the presence of extraneous spaces.
<Ox0dea> Never mind.
<Marisa> I can just use split()?
peter_paule has quit [Ping timeout: 246 seconds]
<jfarmer> [k- Seems like the assumption/guarantee is that there will only ever be two lines on STDIN
<Ox0dea> Marisa: Oui, and even without the parentheses.
<jfarmer> Marisa What does each line represent?
<Ox0dea> jfarmer: The variable names make it reasonably clear, I should think.
bluOxigen has joined #ruby
khebbie has quit [Ping timeout: 244 seconds]
<jfarmer> Ox0dea Marisa said that "on line 2 there are up to 10 numbers separated by spaces"
doodleha_ has joined #ruby
<[k-> let's over engineer the solution!
<jfarmer> Unclear what each number there represents
<Marisa> the hit points of each enemy
<jfarmer> Ok, up to 10 enemies?
<[k-> ah, so this is the first step?
<Marisa> this is for a code challenge so i'm not trying to get tooooo specific on what exactly i'm trying to do
<[k-> so u aren't finished?
quazimodo has joined #ruby
Versality has joined #ruby
<[k-> ah its a challenge
<[k-> no tips for you then
<[k-> :>
<Marisa> no, this is just parsing the data, i still have to write the actual logic to give me the answer
datanoise has joined #ruby
mujou has quit [Read error: Connection reset by peer]
joshbamboo1 has quit [Read error: Connection reset by peer]
NeverDie has quit [Read error: Connection reset by peer]
doodleha_ has quit [Read error: Connection reset by peer]
<[k-> they are all the data you need?
doodleh__ has joined #ruby
<jfarmer> How you structure this depends on how it'll be used, so it's hard (IMO) to give specific recommendations.
peter_paule has joined #ruby
joshbamboo1 has joined #ruby
mujou has joined #ruby
jschoolcraft has quit [Read error: Connection reset by peer]
<[k-> we should use json frankly
othernick has left #ruby ["Leaving"]
<jfarmer> Marisa As a rule, you should have some concrete object of some kind that represents each entity you care about
<[k-> json > yml
<Ox0dea> JSON
<Marisa> but basically, line 1 has 3 numbers, the first is the number of enemies, second is amount of spell damage on first enemy, third is amount that the spell damage reduces for each subsequent enemy
NeverDie has joined #ruby
<[k-> JSON*
<Ox0dea> [k-: Heh, no, sorry, I accidentally sent that.
<Ox0dea> I was going to say that it's a strict subset of YAML.
khebbie_ has quit [Ping timeout: 264 seconds]
<zenspider> Marisa: a, b, c, ... = string.split
<Marisa> and then line 2 has the hit points of the enemies (and the number will vary)
<[k-> so you mean technically, json < yml
<zenspider> so you don't have to keep using it like an array
ndrei has joined #ruby
<zenspider> and use_snake_case notCamelCase in ruby
<Ox0dea> [k-: That was the intended implication, yes.
doodleh__ has quit [Read error: Connection reset by peer]
<Marisa> ah okay :)
<Marisa> well, i wasn't sure how to get data using ARGF line by line and then split it up without using an array
<bnagy> a,b,c = ARGF.readline.split
<Ox0dea> Marisa: String#split gives you the array in question, but you don't need to index into it one-by-one.
<Marisa> well i only want to split the first line, it will work better for line 2 to keep it in an array
duoi has quit [Ping timeout: 248 seconds]
<[k-> you can use _ for variables you don't need, as in a, b, _, c, d = array
<Marisa> let me rephrase
yeticry has quit [Ping timeout: 244 seconds]
peter_paule has quit [Ping timeout: 248 seconds]
<zenspider> you can use splat w/ masgn like so: first, *rest = ARGF.readlines
<bnagy> I think it's only two lines
<jfarmer> Marisa Do you have to handle invalid input?
<zenspider> ah, then stop overthinking this
unshadow has joined #ruby
<Marisa> i want the data from line 2 to be in an array (so I can manipulate it later) and but for line 1, i want each item to be assigned to a variable
yeticry has joined #ruby
<zenspider> if you know that the first line has 3 numbers then just do that
<zenspider> a, b, c, *rest = ARGF.read.split
<bnagy> a,b,c = ARGF.readline.split; rest = ARGF.readline.split
<Marisa> jfarmer: asaik, no
<jfarmer> Ok.
<Ox0dea> data = 'Alice 20 programmer'.split; name = data[0]; age = data[1]; prof = data[2]
<Marisa> bnagy: that's super helpful, thanks
<Ox0dea> name, age, prof = 'Alice 20 programmer'.split
duoi has joined #ruby
<zenspider> do the simplest thing that can possibly work. read a bunch of numbers, grab the first 3
<jfarmer> Then you can ignore the first number on the first line
<[k-> it would be poor practice to keep numbers with special meanings in a areay
<Ox0dea> Marisa: The two lines I pasted are essentially equivalent, but surely you see that one is much nicer than the other?
RegulationD has joined #ruby
<bnagy> Marisa: zenspider's is arguably cleaner, but it will run on if there's more than two lines for some reason
<zenspider> poor practice. bah. Marisa just needs to get shit done. not get shit done perfectly.
tesuji has joined #ruby
<zenspider> bnagy: absolutely
<Marisa> no, i'm trying to learn, i appreciate it
<[k-> that's what all programmers say ;-;
<zenspider> assuming they have the same # of columns for lines 2-, then each_slice is king
<[k-> and we have to maintain those codebase ;-;
<bnagy> imho if there are more than 10 numbers I don't want to name them individually
<zenspider> [k-: nice way to set up a bullshit us vs them dichotomy
chishiki has left #ruby ["WeeChat 1.2"]
<zenspider> bnagy: preferably, you wrap it up in a nice object/struct and pass them in to initialize into named fields.
<Ox0dea> zenspider: Or #zip + #to_h.
<bnagy> Marisa: using the readline approach you also don't need the loop, which means you also don't have the ugly variable initialisation
<zenspider> Ox0dea: don't recommend that. I'd rather use purposeful methods
<bnagy> same with the read.split approach
rubie has joined #ruby
<Ox0dea> Pfft.
<Marisa> Ox0dea: definitely nicer, i'm just too new at this to know all the syntax especially the pretty stuff ;)
<Ox0dea> Marisa: All in good time.
datanoise has quit [Ping timeout: 256 seconds]
<Marisa> thanks for all your help though...might need to refactor it tomorrow though, it's getting late here
joshbamboo2 has joined #ruby
<zenspider> Marisa: what is this for?
joshbamboo2 has quit [Read error: Connection reset by peer]
<Ox0dea> Knowledge acquisition.
frem has quit [Quit: Connection closed for inactivity]
mcclurmc has joined #ruby
<Marisa> devdraft.com
joshbamboo2 has joined #ruby
doodleha_ has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
Pupeno has joined #ruby
<Ox0dea> Is that... a Big O joke?
<zenspider> Marisa: interesting. thanks.
<Marisa> i'm not sure i can get through all 3 programs though, this was supposed to be the easy one and it's taken me like 3 hours to just parse the data (to be fair, i've never done anything like that in my previous studies)
<zenspider> http://devdraft.com/employers kinda scary
<zenspider> Marisa: that's fine. failure is how we learn and improve
<Marisa> because of the companies listed?
joshbamboo1 has quit [Ping timeout: 256 seconds]
doodleha_ has quit [Read error: Connection reset by peer]
al2o3-cr has quit [Ping timeout: 246 seconds]
<Ox0dea> Not to mention the tacky SEO grubbing in the footer.
<Marisa> i'm not realistically trying to get a job out of this, i just thought it would be a good learning experience as a worst case scenario, and best case, you never know...
<zenspider> just... not the way I like companies thinking about me, nor vice versa I guess.
rubie has quit [Ping timeout: 265 seconds]
<zenspider> Marisa: *nod* might want to try exercism.io as well.
<zenspider> and codecombat is fun and dorky
<Marisa> i have both of those bookmarked
<zenspider> good. they're fun. I do exercism once in a while. good stuff.
mcclurmc has quit [Ping timeout: 246 seconds]
doodleha_ has joined #ruby
<Marisa> i've been going through the Odin Project, but I was getting bored with the HTML/CSS stuff (as I already know a fair bit about that), so I started going through learn ruby the hard way, but I feel like it's just a bad translation of learn perl the hard way and not really that useful
sinkensabe has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
<zenspider> I have a biased opinion about it, so... I'll just say that. :)
<Marisa> really just trying to make steady progress on stuff, but i've done too many super simple programs and not enough "sink or swim" type challenges, which is where i tend to learn the most
<zenspider> the nice thing about exercism is it has crowdsourced code reviews
<zenspider> not the best in the world, but much more human
<zenspider> *nod* you might prefer codecombat over exercism then
<Marisa> i think the best thing i've done so far was make a simple calendar generating program...learned a lot from that
<Marisa> like how much syntax i really don't know, for one....
<Marisa> i'll definitely check them both out soon
<zenspider> *nod* and there's a lot of syntax in ruby
<[k-> quick, write all these down
IanV0rn has joined #ruby
<[k-> all good testimonials!
sinkensabe has quit [Remote host closed the connection]
doodleha_ has joined #ruby
<Marisa> out of curiosity, is anyone here in devops?
<Ox0dea> I develop operators, but I've never operated on a developer.
doodleh__ has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
<[k-> huehuehue
<Marisa> lol
<zenspider> I have. it was a bloody mess in the end.
CloCkWeRX has quit [Ping timeout: 256 seconds]
bf4 has quit [Ping timeout: 264 seconds]
<Marisa> )xxxxx[;;;;;;;;;>
IanV0rn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Marisa> ;)
<Ox0dea> "Stick 'em with the pointy end."
doodleh__ has quit [Read error: Connection reset by peer]
<Ox0dea> >> ")#{?x*5}[#{?;*9}>"
vyorkin has joined #ruby
<ruboto> Ox0dea # => ")xxxxx[;;;;;;;;;>" (https://eval.in/388672)
<shevy> a twohander
<[k-> pls
baweaver has joined #ruby
doodleha_ has joined #ruby
CloCkWeRX has joined #ruby
<[k-> >> ")" << 5.times { ?x }.reduce(&:<<) << 9.times { ?; }.reduce(&:<<) << ">"
<ruboto> [k- # => undefined method `reduce' for 5:Fixnum (NoMethodError) ...check link for more (https://eval.in/388673)
<[k-> :(
roqo has quit [Read error: Connection reset by peer]
doodleha_ has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<Ox0dea> What is the opposite of code golf?
peter_paule has joined #ruby
<[k-> there is no end
al2o3-cr has joined #ruby
<jhass> uh, code speer throwing?
<[k-> we could implement a factory to process the string
toretore has quit [Quit: This computer has gone to sleep]
<Ox0dea> We Java yet?
<[k-> we could have a brain fuck interpreter to print it
<[k-> we could implement java in Ruby to print it
<Ox0dea> I could totally write and fully optimize that program by hand.
<zenspider> good code?
<Ox0dea> >> 'good' > 'golf'
<ruboto> Ox0dea # => true (https://eval.in/388676)
<Ox0dea> Dammit.
doodleha_ has joined #ruby
<[k-> lel
<Ox0dea> zenspider: Is it okay to use the variable-defining powers of Regexp#match?
bruno-_ has quit [Read error: Connection reset by peer]
doodleha_ has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 246 seconds]
<Ox0dea> This is my favorite thing from Endo-san: https://github.com/mame/piet-misc/blob/master/bf2piet.rb
<Ox0dea> *Endoh-san
bruno- has joined #ruby
<Ox0dea> There's a C-to-brainfuck thing out there somewhere, so you can turn any program into an executable PNG.
<Marisa> hasta luego, muchas gracias amigos
<shevy> ack, alien tongue
<Ox0dea> Racist.
<Marisa> c u l8r, tyvm
<Marisa> >_>
<Marisa> i'll try to visit using a real IRC client next time
<jfarmer> It's hard to use IRC with a fake client, I'd say.
Versality has quit [Quit: Be back later ...]
Versality has joined #ruby
peter_paule has quit [Ping timeout: 264 seconds]
Versality has quit [Client Quit]
kraljev11 has joined #ruby
Rakunh0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Marisa has quit [Ping timeout: 246 seconds]
sankaber has joined #ruby
<jfarmer> tin can IRC
wildroman2 has joined #ruby
peter_paule has joined #ruby
<Ox0dea> TCP => Tin Can Protocol.
<Ox0dea> We got a Haskeller.
Scroff has joined #ruby
<jfarmer> yeah was going to say, that's like some twisted version of bind/return
merqlove has joined #ruby
<Ox0dea> [k-: What did you do with the guard?!
<[k-> this is disgraceful!
<[k-> I usually try not to use it
GitGud has quit [Read error: Connection reset by peer]
<[k-> pattern matching best way
<Ox0dea> No, I meant your blade just suddenly becomes the grip.
ndrei has quit [Ping timeout: 246 seconds]
<[k-> I don't get you
<Ox0dea> You're missing the [ from the original.
sankaber has quit [Ping timeout: 272 seconds]
<[k-> ;-; it was a pain to write
<Ox0dea> Using yours would potentially cause the wielder to donate blood involuntarily.
doodleha_ has joined #ruby
hotpancakes has joined #ruby
<jfarmer> Needs more unicode variable names
peter_paule has quit [Ping timeout: 252 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doodleha_ has quit [Read error: Connection reset by peer]
woodruffw has quit [Ping timeout: 264 seconds]
<jfarmer> ......
s2013 has joined #ruby
<[k-> this one is better: http://carc.in/#/r/5rq
<Ox0dea> This one is a syntax error: http://carc.in/#/r/5ro
peter_paule has joined #ruby
doodleha_ has joined #ruby
<[k-> :(
<Ox0dea> Sorry. I compulsively look for interesting happenstances in random URLs.
<Ox0dea> I realize carc.in's just auto-increment, but the point remains.
<Ox0dea> Blame imgur.
mgorbach has quit [Ping timeout: 246 seconds]
Scroff has quit [Read error: Connection reset by peer]
<[k-> I like cat photos from imgur
redlegion has quit [Ping timeout: 246 seconds]
doodleha_ has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
GitGud has joined #ruby
<shevy> one day cats will rule this world
<shevy> nah
doodleha_ has joined #ruby
<shevy> dogs are not as sneaky as cats are
redlegion has joined #ruby
<ytti> that kid has terrible combover
<ytti> he should just accept the problem
vyorkin has quit [Ping timeout: 272 seconds]
peter_paule has quit [Ping timeout: 255 seconds]
mandarinkin has quit [Ping timeout: 248 seconds]
<shevy> lol
doodleha_ has quit [Read error: Connection reset by peer]
mandarinkin has joined #ruby
doodleha_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
mdw has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doodleha_ has quit [Read error: Connection reset by peer]
lxsameer_ has joined #ruby
doodleha_ has joined #ruby
yfeldbl__ has quit [Ping timeout: 248 seconds]
jas02 has joined #ruby
Al3ks has joined #ruby
wildroman3 has joined #ruby
wildroman3 has quit [Remote host closed the connection]
sameerynho has quit [Ping timeout: 248 seconds]
jesterfraud has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
ItSAN____ has joined #ruby
wildroman2 has joined #ruby
Rakunh0 has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
fgo has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
tesuji has joined #ruby
fantazo has joined #ruby
ItSANgo has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ruby
bkxd has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vyorkin has joined #ruby
lavros has quit [Ping timeout: 264 seconds]
vyorkin has quit [Client Quit]
mcclurmc has quit [Ping timeout: 265 seconds]
hotpancakes has joined #ruby
lavros has joined #ruby
doodleha_ has joined #ruby
fantasticsid has quit [Read error: Connection reset by peer]
hotpancakes has quit [Remote host closed the connection]
doodleha_ has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
bf4 has joined #ruby
balazs has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
Rakunh0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doodleha_ has joined #ruby
bkxd has quit [Ping timeout: 272 seconds]
ozzloy has quit [Ping timeout: 252 seconds]
mesamoo has quit [Quit: Konversation terminated!]
lavros has quit [Ping timeout: 246 seconds]
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
k3asd` has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
choke has joined #ruby
simplyianm has quit [Ping timeout: 272 seconds]
lavros has joined #ruby
bf4 has quit [Ping timeout: 244 seconds]
balazs has quit [Ping timeout: 252 seconds]
mengu has quit [Ping timeout: 256 seconds]
jimms has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
doodleha_ has joined #ruby
bruno- has joined #ruby
allomov has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
lavros has quit [Ping timeout: 255 seconds]
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allomov has quit [Ping timeout: 264 seconds]
simplyianm has joined #ruby
konsolebox has quit [Ping timeout: 264 seconds]
doodleha_ has joined #ruby
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
doodleha_ has quit [Read error: Connection reset by peer]
tubuliferous_ has joined #ruby
nfk has joined #ruby
unshadow has quit [Quit: leaving]
lkba has quit [Remote host closed the connection]
wildroman3 has joined #ruby
wildroman3 has quit [Remote host closed the connection]
wildroman2 has quit [Read error: No route to host]
jimms has quit [Remote host closed the connection]
doodleha_ has joined #ruby
wildroman2 has joined #ruby
tubuliferous_ has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
GitGud has quit [Ping timeout: 252 seconds]
doodleha_ has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has joined #ruby
doodleha_ has quit [Read error: Connection reset by peer]
wildroman2 has quit [Read error: No route to host]
wildroman3 has joined #ruby
allomov has joined #ruby
scx_ is now known as scx
knite has quit [Quit: knite]
sbhatore has quit [Ping timeout: 264 seconds]
Scroff has joined #ruby
wildroman3 has quit [Client Quit]
peter_paule has joined #ruby
kraljev11 has quit [Ping timeout: 248 seconds]
RegulationD has joined #ruby
sandstrom has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 248 seconds]
<shevy> hmmm
<shevy> $.fn.scrollView = function () {
<shevy> I find javascript/jquery syntax somewhat weird
k3asd` has quit [Ping timeout: 246 seconds]
OrbitalKitten has joined #ruby
senayar has joined #ruby
<apeiros> J.fn.scroll_view = -> () {
senayar has quit [Changing host]
senayar has joined #ruby
<apeiros> not that much different from ruby
<[k-> coffee: (a) -> iirc
Rutix has joined #ruby
<shevy> ewww the ->
<apeiros> shevy: well, you can do: J.fn.scroll_view = lambda { || # too, but that's more different :)
<apeiros> oh, actually proc
platzhirsch has joined #ruby
<apeiros> since JS functions don't care how many args you pass in
platzhirsch has left #ruby [#ruby]
<shevy> I like that a little more
<shevy> the || trip me off though
mcclurmc has joined #ruby
<[k-> why do you need ||
lavros has joined #ruby
<al2o3-cr> declaring variables inside the block
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<[k-> but there are no params
peter_paule has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
darkf_ has joined #ruby
[k- has quit [Remote host closed the connection]
Scroff has joined #ruby
darkf has quit [Ping timeout: 248 seconds]
bf4 has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
Jackneill has joined #ruby
<shevy> they are invisible
hectortrope has quit [Read error: Connection reset by peer]
hectortrope has joined #ruby
bf4 has quit [Ping timeout: 255 seconds]
anjen has joined #ruby
michael_mbp has joined #ruby
jfarmer has quit []
sdothum has joined #ruby
<apeiros> I think there are cases where with/without || makes a difference. but I think that was in an older ruby.
<apeiros> zenspider: where's that table of yours showing the differences in Proc/proc/lambda/-> ?
[k- has joined #ruby
peter_paule has joined #ruby
<apeiros> hm, probably still sleepytime over there :)
tesuji has quit [Ping timeout: 255 seconds]
<shevy> apeiros hmm by the way, did you not at one time create your own webframework?
<shevy> or was that the php past
<apeiros> that was php. but I'm now working on one again.
<[k-> for your work?
<apeiros> not sure whether the term webframework cuts it, though. it's geared towards webapps specifically.
MacDaddy has joined #ruby
<apeiros> not for the company I work at, no.
<apeiros> that'd be too expensive for them :)
<[k-> for other companies?
<apeiros> for myself
<apeiros> private work
<[k-> ah
Scroff has joined #ruby
langlands has joined #ruby
<apeiros> I hope to opensource it around end of year. though I made much less progress than expected.
Scroff has quit [Read error: Connection reset by peer]
<[k-> what will it be called?
<apeiros> jacob
<apeiros> that's the working name at least
<[k-> well that is an ...interesting... choice
<apeiros> hehe, that sounds enthusiastic ;-)
<[k-> politeness :>
langlands has quit [Client Quit]
al2o3-cr has quit [Quit: WeeChat 1.2]
chipotle has joined #ruby
<apeiros> a good name is difficult, and it's not my main focus. well possible that I'll rename it before release.
<pontiki> jacob is a find name for a framework
<pontiki> fine*
mengu has joined #ruby
al2o3-cr has joined #ruby
kong0 has joined #ruby
chipotle has quit [Ping timeout: 255 seconds]
<kong0> ruby is ABSOLUTE FOOKING gobshite
<apeiros> huh? sloccount reports 250kLoc ruby code… that… sounds like way more than I expected
simplyianm has quit [Remote host closed the connection]
Squarepy has joined #ruby
decoponio has quit [Quit: Leaving...]
<kong0> motherFUNKAZ
<apeiros> !mute kong0
kong0 has left #ruby [#ruby]
yfeldblum has quit [Ping timeout: 248 seconds]
<baweaver> you'd think they'd get bored after a while
<apeiros> wow, even has a cloak
nofxx has quit [Ping timeout: 264 seconds]
<[k-> what is sloc?
<apeiros> sloccount is a program which counts source code lines
<pontiki> source lines of code
<Ox0dea> >> require 'date'; Date::MONTHNAMES.join.delete('a-z').include?('JASON')
<ruboto> Ox0dea # => true (https://eval.in/388719)
<baweaver> Ah, working on some big data exercises if anyone's interested for later.
<pontiki> i.e., does not include blank lines or comment-only lines
Scroff has joined #ruby
<wasamasa> I like `cloc` more
<baweaver> Fake bookstore data for finding customers who haven't bought anything in a while or are big spenders only during sales / etc
<[k-> cloc?
<apeiros> ooooh, lol
<wasamasa> count lines of code
<apeiros> I know why
allomov has quit [Remote host closed the connection]
<wasamasa> because it doesn't have that advertising displaying every time you use it
<apeiros> there's a single file which is contains generated code from the english dict
<apeiros> for the password strength validator
meph has joined #ruby
mengu has quit [Ping timeout: 250 seconds]
stamina has joined #ruby
<[k-> Ox0dea, sneaky :)
<baweaver> pontiki: up late?
<baweaver> ah, early
<baweaver> jeez
sbhatore has joined #ruby
<pontiki> yesh
JoL1hAHN has joined #ruby
<pontiki> late for you, baweaver?
<baweaver> 3:40am
datanoise has joined #ruby
<baweaver> Got a little to wrapped up in Apache Kafka and Spark Streaming stuffs.
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki> yeah, but the question is really: have you been to bed yet :)
<baweaver> ....nope
<pontiki> then late it is :D
<baweaver> I should probably do it.
decoponio has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
mengu has joined #ruby
vyorkin has joined #ruby
lkba_ has joined #ruby
datanoise has quit [Ping timeout: 246 seconds]
rho45dium has joined #ruby
TinkerTyper has quit [Ping timeout: 244 seconds]
mengu has quit [Client Quit]
lkba has quit [Ping timeout: 264 seconds]
TinkerTyper has joined #ruby
simplyianm has joined #ruby
allomov has joined #ruby
OrbitalKitten has joined #ruby
simplyianm has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
OrbitalKitten has quit [Ping timeout: 265 seconds]
simplyianm has joined #ruby
mcclurmc has joined #ruby
merqlove has quit [Quit: Connection closed for inactivity]
peter_paule has quit [Ping timeout: 272 seconds]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
araujo has quit [Quit: Leaving]
mcclurmc has quit [Ping timeout: 255 seconds]
robbyoconnor has quit [Ping timeout: 246 seconds]
peter_paule has joined #ruby
allomov has quit [Remote host closed the connection]
kirun has joined #ruby
tubuliferous_ has joined #ruby
vdamewood has joined #ruby
peter_paule has quit [Ping timeout: 252 seconds]
ryba has joined #ruby
tubuliferous_ has quit [Ping timeout: 248 seconds]
chinmay_dd has joined #ruby
rubie has joined #ruby
hotpancakes has joined #ruby
sbhatore has quit [Ping timeout: 246 seconds]
ragingcake_ has joined #ruby
simplyianm has quit [Remote host closed the connection]
wildroman2 has joined #ruby
Scroff has joined #ruby
xxneolithicxx has quit [Ping timeout: 255 seconds]
rubie has quit [Ping timeout: 265 seconds]
hotpancakes has quit [Ping timeout: 255 seconds]
simplyianm has joined #ruby
FernandoBasso has joined #ruby
startupality has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
meph has quit [Quit: Leaving.]
ragingcake_ has left #ruby [#ruby]
troulouliou_dev has joined #ruby
vdamewood has quit [Quit: Life beckons.]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
RegulationD has joined #ruby
chipotle has joined #ruby
icebourg has joined #ruby
Oka has quit []
xxneolithicxx has joined #ruby
SCHAAP137 has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
RegulationD has quit [Ping timeout: 255 seconds]
sbhatore has joined #ruby
vyorkin has quit [Ping timeout: 256 seconds]
Scroff has quit [Read error: Connection reset by peer]
Scroff has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
icebourg has quit []
nveselinov has quit [Quit: Connection closed for inactivity]
yqt has joined #ruby
bubbys has joined #ruby
[k-_ has joined #ruby
cashnguns has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.3-dev]
troulouliou_dev has quit [Quit: Leaving]
shellie_ has quit [Quit: leaving]
havenwood has joined #ruby
ta has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SCHAAP137 has quit [Remote host closed the connection]
hotpancakes has joined #ruby
chinmay_dd has quit [Ping timeout: 246 seconds]
hotpancakes has quit [Ping timeout: 256 seconds]
startupality has quit [Quit: startupality]
lavros has quit [Quit: leaving]
SCHAAP137 has joined #ruby
ndrei has joined #ruby
quazimodo has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
darkf_ is now known as darkf
Indian has joined #ruby
yqt has quit [Ping timeout: 272 seconds]
ndrei has quit [Ping timeout: 252 seconds]
Pupeno has quit [Remote host closed the connection]
bf4 has joined #ruby
nateberkopec has joined #ruby
michaelreid has quit [Quit: WeeChat 0.4.2]
Deele has joined #ruby
pengin has joined #ruby
lessless has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
bf4 has quit [Ping timeout: 246 seconds]
phale has joined #ruby
<phale> hello rubyists
chinmay_dd has joined #ruby
CustosLimen has joined #ruby
<[k-_> hello
RegulationD has joined #ruby
sandstrom has quit [Ping timeout: 252 seconds]
skade has joined #ruby
pengin has quit [Remote host closed the connection]
chinmay_dd has quit [Ping timeout: 276 seconds]
Versality has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
wildroman2 has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
tubuliferous_ has joined #ruby
BTRE has quit [Ping timeout: 256 seconds]
chinmay__ has joined #ruby
Indian has quit [Ping timeout: 244 seconds]
tubuliferous_ has quit [Ping timeout: 264 seconds]
chinmay_dd has quit [Ping timeout: 264 seconds]
The_Phoenix has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has joined #ruby
Yiota has joined #ruby
chinmay__ has quit [Ping timeout: 252 seconds]
TheBrayn has quit [Ping timeout: 252 seconds]
rubie has quit [Ping timeout: 265 seconds]
BTRE has joined #ruby
BrianBoyko has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
ruv has joined #ruby
Casty has joined #ruby
renderfu_ has joined #ruby
Scroff has joined #ruby
dgutierrez1287 has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
skade has joined #ruby
TheBrayn has joined #ruby
renderfu_ has quit [Ping timeout: 244 seconds]
bruno-_ has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
phutchins has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> more ruby code people!
<apeiros> code more ruby people!
<apeiros> code more, ruby people!
<apeiros> code more ruby, people!
charliesome has joined #ruby
<apeiros> o/ charlie
<[k-_> :/
<shevy> are you on your medications again apeiros :P
<apeiros> shevy: lol, no
<apeiros> elbow is finally getting better
wildroman2 has joined #ruby
Scroff has joined #ruby
<apeiros> I hope I can do sports again next week
loechel has joined #ruby
<[k-_> i'm slowly shifting away from ruby
<[k-_> shift shift
hotpancakes has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
<[k-_> the last piece of code i wrote in ruby was this: http://repl.it/s0a
<[k-_> a less than spectacular piece of work
<[k-_> (i was porting my haskell)
skade has quit [Quit: Computer has gone to sleep.]
<sevenseacat> i've been writing elixir all weekend
<[k-_> ah yes im going to learn that too
<[k-_> i should keep a list
<[k-_> because i forgot
<shevy> [k-_ you are writing more haskell code?
millerti has joined #ruby
<[k-_> no, busy with homework and surfing internets
<[k-_> i still need to read a haskell book
hotpancakes has quit [Ping timeout: 252 seconds]
ruby-lang590 has joined #ruby
unshadow has joined #ruby
<shevy> cool... I can create errors unknown to me so far, from my own code :)
<shevy> module.rb:91:in `write': deadlock; recursive locking (ThreadError)
bf4 has joined #ruby
<ruby-lang590> Hello. I'm new here, so sorry if this isn't a great question. Can anyone tell me how to insert a new row into a database using the 'pg' gem without having to interpolate the exec string?
legitler__ has joined #ruby
RandyT has quit [Quit: ZNC - http://znc.in]
<[k-_> is it some sort of prepared statements
simplyianm has quit [Remote host closed the connection]
<[k-_> i havent touched sql at all
lxsameer_ has quit [Quit: Leaving]
RandyT has joined #ruby
<ruby-lang590> I can figure out how to di it using interpolation, but I'd rather not do that for security reasons.
<ruby-lang590> I can figure out how to d it using interpolation, but I'd rather not do that for security reasons.
bf4 has quit [Ping timeout: 265 seconds]
<ruby-lang590> I can figure out how to do it using interpolation, but I'd rather not do that for security reasons.* blargh, getting used to irc, sorry
rbennacer has joined #ruby
<[k-_> i think i read somewhere that there is "?" placeholders that you can use for prepared statements
<ruby-lang590> There are $ placeholders I can use in SELECT, but I haven't figured out how to use them for INSERT.
<ruby-lang590> That looks like what I need. Thx.
rippa has joined #ruby
RegulationD has joined #ruby
Muhannad has joined #ruby
<[k-_> how's my code, nice? >.>
albatross1 has joined #ruby
ryba has quit [Ping timeout: 244 seconds]
simplyianm has joined #ruby
ruby-lang590 has quit [Ping timeout: 246 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
legitler__ has quit [Quit: Lost terminal]
<Yiota> hey folks, employer has asked me to learn ruby for the job. now this is because the website is built on rails. is the transition from python to ruby easier or harder than vice versa?
RegulationD has quit [Ping timeout: 244 seconds]
<[k-_> the two languages are similar
<[k-_> but you dont have decorators
<[k-_> or those __cmp__ stuff
<apeiros> Yiota: I think nobody has done a transition in both directions, so I doubt anybody can answer this ;-)
<[k-_> we can define < immediately
<apeiros> Yiota: but the two languages are quite similar. the transition should not be hard.
<[k-_> we also do not have the ugly __init__
<[k-_> we have def initialize!
<Yiota> I see. would you say ruby is more or less abstracted?
<[k-_> hehehehehehehehehe
<apeiros> yeah, the OO is less bolted-on.
<apeiros> otoh we don't have list comprehensions. we use methods for that.
<Yiota> as in higher-leveled
<[k-_> ruby would be less
<apeiros> Yiota: entirely irrelevant ;-p
<Yiota> cool
bf4 has joined #ruby
simplyianm has quit [Remote host closed the connection]
albatross1 has left #ruby [#ruby]
albatross1 has joined #ruby
TheHodge has joined #ruby
unshadow has quit [Quit: leaving]
rdark has joined #ruby
Scroff has joined #ruby
djellemah has joined #ruby
iamninja has joined #ruby
kubunto has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
<kubunto> is there an easy way to convert julian to and from hebrew dates?
simplyianm has joined #ruby
Aryasam has joined #ruby
<[k-_> i dont think the stdlib has anything for you
<[k-_> the stdlib supports Julian but I cant find hebrew
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kubunto> i meant standard dates to hebrew
<[k-_> "Hebruby is a Ruby library to convert julian dates to hebrew dates, and vice-versa."
pothibo has joined #ruby
<[k-_> keywords searched: ruby hebrew calender
<kubunto> thank you, looks promising
sankaber has joined #ruby
phale has left #ruby ["Leaving"]
j4cknewt has quit [Remote host closed the connection]
datanoise has joined #ruby
<shevy> does anyone of you know why descriptions such as at https://rubygems.org/gems/rack do not allow for <br> tags and thus newlines? for longer descriptions of a program, it makes it hard to read
BigRonnieRon has joined #ruby
lessless has joined #ruby
<[k-_> what do you mean by do not allow
<[k-_> there were no <br> tags found
datanoise has quit [Client Quit]
Pumukel has quit [Remote host closed the connection]
<shevy> I am pretty sure you can add <br> tags but it won't be honoured
<apeiros> kubunto: sure you want julian and not gregorian?
<[k-_> why dont you try :>
<[k-_> apeiros: i think the fact that a library exists means that it's pretty common :>
<apeiros> (julian is not in use by any country atm)
idafyaid has joined #ruby
<shevy> [k-_ nono we can skip ahead, I am absolutely sure
<[k-_> but you have no proof that you cant
<kubunto> apeiros: i do
<shevy> [k-_ do you have?
<[k-_> anyway, im sure apeiros is skilled in the arts of html and css and stuff
FernandoBasso has quit [Quit: WeeChat 1.2]
<kubunto> if there is a direct conversion from hebrew to gregorian i woudl take it
<[k-_> i also dont have proof that it can, but im not the one asking ^^
<shevy> ok so you have no clue
<[k-_> :(
sankaber has quit [Ping timeout: 276 seconds]
<shevy> on github, their readmes are often much easier to read
unshadow has joined #ruby
hotpancakes has joined #ruby
micmus has joined #ruby
<kubunto> apeiros: any ideas on how to get the julian number to a gregorian date
Versality has quit [Quit: Be back later ...]
konsolebox has joined #ruby
dcarmich has joined #ruby
<apeiros> kubunto: Date might do that
<kubunto> looks liike it would
<albatross1> hello
Hien_ has quit [Quit: leaving]
simplyianm has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 252 seconds]
Hien has joined #ruby
albatross1 has left #ruby [#ruby]
<apeiros> yeah, Date.new with proper 4th arg should
<[k-_> ruby Date?
<kubunto> Date.jd(julian_number)
<kubunto> that does it
Hien has quit [Client Quit]
Aryasam has quit [Ping timeout: 246 seconds]
<apeiros> funny, I was looking for that method, but missed it
Hien has joined #ruby
<[k-_> i linked that method o_O
Ox0dea has joined #ruby
pothibo has quit [Quit: pothibo]
<Ox0dea> apeiros: Wish me luck: https://bugs.ruby-lang.org/issues/11315
<quazimodo> anyone using celluloid:io and/or reel?
* apeiros crosses fingers for Ox0dea
<apeiros> 'anyone quazimodo
<apeiros> ?anyone quazimodo
<ruboto> quazimodo, Just ask your question, if anyone has or can, they will respond.
<apeiros> plerp
<Ox0dea> I think it's quite strange that Array#^ might just now be getting in.
<ytti> Ox0dea, seems like nobrainer, good luck
<Ox0dea> Danke.
<[k-_> Ox0dea: arent you sleeping?
<apeiros> [k-_: he is. he's sleep-typing
<[k-_> :o
<Ox0dea> [k-_: I tried, but I ended up making breakfast (and thus coffee) instead.
<apeiros> Ox0dea: are you a "he"?
<Ox0dea> More or less.
<apeiros> ok. they are. they're sleep-typing.
<shevy> haha slightly offtopic; any gento users https://web.archive.org/web/20150401202403/https://www.gentoo.org/
<shevy> *gentoo rather
<Ox0dea> shevy: Are you a Gentoo user?
<shevy> they use python
<shevy> I can not use python
<Ox0dea> Ah, I think we've discussed this.
* Ox0dea le tired
Versality has joined #ruby
<quazimodo> apeiros: no real question
<quazimodo> apeiros: is it any performant?
<apeiros> quazimodo: ok then: yes, *someone* uses both, celluloid:io and reel.
<quazimodo> i don't mind stepping away from rails, but I do enjoy doing the ruies
<quazimodo> *rubies
charliesome has quit [Quit: zzz]
balazs has joined #ruby
mase-chatter has joined #ruby
<quazimodo> also, is rubinius's JIT starting to speed ruby up at all?
<Ox0dea> It's speeding up Rubinius.
davedev24_ has joined #ruby
<[k-_> isnt rubinius faster than mri?
<Ox0dea> No.
<[k-_> :o
athos_diddy has quit []
<apeiros> jruby is
greedo has joined #ruby
<apeiros> for long running things
<apeiros> or *longer
<Ox0dea> Do we consider Crystal a "Ruby"?
<apeiros> no
<[k-_> no
<[k-_> the about page lists implementations of ruby
<quazimodo> hrm
<quazimodo> i dream of a day when ruby is nil-free, and a bit fater
<quazimodo> *faster
<quazimodo> i really, really don't want to do nodejs programmering
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k-_> volt?
<quazimodo> actually i'm looking at some monadic constructs
<[k-_> elm?
<quazimodo> ?
<apeiros> nil-free?
<Ox0dea> quazimodo: What is a "monadic construct"?
<apeiros> nullpattern everywhere?
greenbagels has quit [Ping timeout: 272 seconds]
<sevenseacat> how can a language be nil-free?
<[k-_> im sure nil doesnt exist in elm
<Ox0dea> sevenseacat: Runtime errors everywhere.
<shevy> quazimodo when ruby is a bit fater? how much fat shall it have? :D
<[k-_> I think it exists as Nothing
<Ox0dea> [][0] # => RuntimeError
<sevenseacat> awesome.
<quazimodo> Just(whatever) and Nothing
<quazimodo> so
<sevenseacat> [k-_: thats still a nil-like thing
<Ox0dea> But it's in a box!
<[k-_> ^
<sevenseacat> nil, null, nothing, etc.
<quazimodo> User.last.suburb returns a Maybe that could be Just(suburb) or Nothing
ryba has joined #ruby
<quazimodo> and the semantics of Nothing are very different to nil
<quazimodo> Maybe is to Boolean what Just(something) is to true and Nothing is to false (or vice versa)
<quazimodo> anyway
<quazimodo> we use deterministic gem a bit
Yiota has joined #ruby
<sevenseacat> i thought you were kidding when you said Maybe
Scroff has joined #ruby
<quazimodo> it gives us nifty stuff like Success(result) or Failure(raised class)
<quazimodo> nope
darkf has quit [Quit: Leaving]
<quazimodo> it's a brilliant idea
Al3ks has quit [Remote host closed the connection]
<quazimodo> heavily, heavily used in haskell
<sevenseacat> i dont remember it from haskell, but its been a long time
<Ox0dea> I didn't know parrots enjoyed Kool-Aid.
<shevy> sevenseacat I tell you, the Schroedinger cat is a Maybe Monad
<quazimodo> and being monadic ( a monad is a mathematical concept ) means its bullet proof
<[k-_> turrduurrr
<quazimodo> lol
<quazimodo> ya
<Ox0dea> quazimodo: ELI5 monads?
balazs has quit [Ping timeout: 256 seconds]
<quazimodo> Ox0dea: ELIS?
<Ox0dea> Explain like I'm five.
<Ox0dea> (And get a better font.)
<[k-_> lol
<shevy> lol
<shevy> 5 and S look very similar here as well on "Monospace"
<sevenseacat> the features on the elm homepage talk a big talk
<[k-_> ah it is different from haskell in terms of type annotations
<[k-_> you use : instead of ::
<[k-_> shevy: you have not seen ELI5 before?
simplyianm has joined #ruby
<quazimodo> Ox0dea: hrm . Monads are hard to explain without you knowing some category theory
<quazimodo> long story short
<Ox0dea> quazimodo: Why do monads get compared to burritos and spacesuits and monoids in the category of endofunctors?
<quazimodo> heh
<quazimodo> because they are just like both of that
<shevy> never heard of ELI5
<Ox0dea> How so?
<quazimodo> all 3
<shevy> isn't elm from the muppet show?
<[k-_> lel shevy doesnt reddit
<Ox0dea> English needs a "both" for three, I've always said.
<[k-_> triboth
<shevy> I read mostly a few articles linked from reddit, not everything
<quazimodo> they are wrappers around interesting stuff, they protect you from outside world craziness (kinda) and they are monoids in the category of endofunctors - nfi how to describe that any better
<Ox0dea> [k-_: Troth?
<[k-_> :o
<quazimodo> intuitively
<quazimodo> think of them like a wrapper
<quazimodo> or a box
<Ox0dea> quazimodo: That doesn't sound mathematical or category-theoretical at all.
<quazimodo> inside is 1 or more lovely things
<[k-_> bi-oth, tri-oth, remove the i, get troth!
tubuliferous_ has joined #ruby
<Ox0dea> Case closed.
<quazimodo> Ox0dea: do you know category theory?
<Ox0dea> quazimodo: Is it not the case that there are zero or more things inside?
<sevenseacat> Ox0dea knows everything.
* Ox0dea knows nothing, like Jon Targaryen.
<quazimodo> Ox0dea: sure, but you already seem to know what they are
<Ox0dea> quazimodo: Yes, I'm poking fun.
<quazimodo> i wish I could explain them better
<quazimodo> it's hard
<Ox0dea> They're burritos, mate.
<quazimodo> i dno who made that stupid analogy honestly
<quazimodo> so useless to help someone understand
<Ox0dea> You were totally for it a moment ago.
<sevenseacat> i see what you did there.
<Ox0dea> quazimodo: You should familiarize yourself with the monad laws.
Ropeney has quit [Quit: Leaving]
<[k-_> what are the laws again? :o
<Ox0dea> They differ between monads.
<sevenseacat> do not talk about monad.... what.
<quazimodo> Ox0dea: endofunctor + 2 natural transforms yes yada yada
<havenwood> The first rule of Monad club?
<quazimodo> i even know how bind can be built from join and i know what return is
<Ox0dea> quazimodo: You should work on condensing your understanding of those operations into something much less technical.
<[k-_> m a >>= id = return
<Ox0dea> That is, if it's your intention to explain them to people who don't do a lot of math.
<[k-_> \o/
<quazimodo> Ox0dea: tbh i wish i did understand them better, i won't be able to explain it till i understand it better
tubuliferous_ has quit [Ping timeout: 248 seconds]
<quazimodo> i don't yet know how a dude figured that an action could happen during the ??creation?? of a monad
<quazimodo> wel
<quazimodo> you know what i mean ( i think )
<[k-_> Ox0dea knows all
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> hey [k-_ do you think that this is a valid mode of action for ruby gems to pursue: http://shevegen.square7.ch/LOAD_ALL_THE_THINGS.jpg
<Ox0dea> Tom Stuart gave a talk where he implemented a few monads in idiomatic Ruby, and that really helped cement my grokking.
<[k-_> what do you mean by all
<shevy> all gems!
bf4 has quit [Ping timeout: 244 seconds]
<shevy> everything
nateberkopec has quit [Quit: Leaving...]
<[k-_> what do you mean?!
<[k-_> loading all the files at once?
<[k-_> loading all the gems you depend on at once?
simplyianm has quit [Remote host closed the connection]
<shevy> damn it... searching on youtube for "ruby" brings up a lot of useless stuff... apparently there is even a singer with that name
<Ox0dea> They really ought to have made that load the entire standard library. :/
alotofnoodles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pontiki> Ox0dea: have you tried doing that yet?
<shevy> lol a Banana Piano with ruby https://www.youtube.com/watch?v=t2jL0OrpILw
<quazimodo> Ox0dea: to me a monad is an endofunctor and 2 natural transformations. So i don't really get how Maybe is a monad. Perhaps Maybe + join + return == monad
<shevy> [k-_ nono just load aaaaall the things. all of them. load all of them. all. :)
<quazimodo> Maybe, fmap, join and return
<shevy> Maybe this will work
<[k-_> install all the gems, and load them all?
<shevy> yeah!
<[k-_> that will take forever
<shevy> aww that talk is fun. "We believe it is time to bring Ruby and Robots together." he pronounced it in a funny way though, "Ruby and Rubots"
scruple has joined #ruby
fantazo has quit [Quit: Verlassend]
simplyianm has joined #ruby
<quazimodo> does Volt use event machine or similar?
<quazimodo> how does it keep all the webosckets connection alive?
hotpancakes has joined #ruby
rubie has joined #ruby
kobain has joined #ruby
pothibo has joined #ruby
freerobby has joined #ruby
simplyianm has quit [Ping timeout: 248 seconds]
pothibo has quit [Client Quit]
hotpancakes has quit [Ping timeout: 250 seconds]
Soda has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
<quazimodo> seriousy
<quazimodo> how does volt work
<quazimodo> i can't find
<[k-_> quazimodo: i think there are youtube videos
BigRonnieRon has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-_> its in one of the conf videos
<[k-_> the presenter does a little demonstration
<[k-_> or did i mess that up with jubilee
Zackio has quit [Ping timeout: 244 seconds]
dorei has joined #ruby
<cashnguns> quazimodo I liked Rick Carlino's explanations of volt https://www.youtube.com/watch?v=th0UKrSFdo0
<cashnguns> hes got a couple videos
athos_diddy has joined #ruby
roolo has quit [Remote host closed the connection]
ItSAN____ has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
ItSANgo_ has joined #ruby
rbennacer has joined #ruby
BLuEGoD has quit [Remote host closed the connection]
<quazimodo> jubilee looks very promising
Zackio has joined #ruby
<quazimodo> volt.. i dont know
<quazimodo> they chose mongo over postgres :/
peter_paule has joined #ruby
BLuEGoD has joined #ruby
<quazimodo> i just wanna know if volt's using reactor pattern concurrency or not
<havenwood> quazimodo: Oh, it wasn't [k- asking... It was you!
<[k-_> yes havenwood?
<havenwood> quazimodo: It uses the concurrent-ruby gem.
<quazimodo> right
<havenwood> [k-: Never mind, I haven't had coffee. Fixing that now!
<quazimodo> i never heard of it
<quazimodo> damn
<quazimodo> somany gems/ideas
doertedev has joined #ruby
ItSANgo has joined #ruby
dcarmich has joined #ruby
<quazimodo> i wonder why i'd never heard of concurrent-ruby
ItSAN____ has joined #ruby
<pontiki> of the hundreds of thousands of gems on rubygems, have you heard of most of them? :D
blue_deref has joined #ruby
<quazimodo> pontiki: lol no but, for example, celluloid pops up *all the time*
<quazimodo> and yet if concurrent-ruby exists and does actors...
<quazimodo> just never heard of it is all
RegulationD has joined #ruby
<pontiki> it doesn't show up in ruby-toolbox under concurrent programming
ItSANgo_ has quit [Ping timeout: 250 seconds]
yardenbar has quit [Quit: Leaving]
Scroff has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
simplyianm has joined #ruby
<pontiki> it's listed in background-jobs
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kubunto has quit [Quit: life moves pretty fast. If you dont stop and look around once in a while you could miss it]
ItSANgo has quit [Ping timeout: 264 seconds]
Muhannad has quit [Ping timeout: 276 seconds]
_blizzy_ has quit [Ping timeout: 248 seconds]
<havenwood> pontiki: There's a proposed change to put it in the proper category.
RegulationD has quit [Ping timeout: 244 seconds]
<pontiki> yay
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> pontiki: Singular.
psy_ has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 272 seconds]
antgel has joined #ruby
<quazimodo> havenwood: you use it?
<quazimodo> it it going to be the next rails :P
<havenwood> quazimodo: Volt?
<[k-_> havenwood is just very good at searching through codebases and documentation
<havenwood> quazimodo: Or concurrent-ruby?
<pontiki> rails 5 is going to be the next rails :>
<pontiki> put on your backpack
Al3ks has joined #ruby
<shevy> lol
<shevy> pontik is having a great day
<shevy> *pontiki
bf4 has joined #ruby
mase-chatter has quit [Ping timeout: 256 seconds]
polysics has joined #ruby
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
millerti has joined #ruby
<athos_diddy> ok so this tutorial is recommending three db's on the server, dev, prod and test. one for each enviroment. when saying enviroment they mean three seperate vm's or maybe three versions of the same app?
<[k-_> athos_diddy: i think it means 3 versions
<Rutix> athos_diddy: Depends on how many isolation you want but if it's only a server for db's then 3 db's on the server is fine.
<Rutix> much*
<apeiros> athos_diddy: if you can, then 3 servers
<apeiros> the more separation the better. it's simple.
woodruffw has joined #ruby
<athos_diddy> so then maybe i make one server just for db's?
<Rutix> Well yes.
<Rutix> 3 enviorments for the app on the same server is useless
<athos_diddy> that makes sense
<Rutix> Especially prod
freerobby has quit [Quit: Leaving.]
<Rutix> that one has to be played with as less as possible since well its production ;p
<apeiros> Rutix: it's not useless. but it's less isolation than on different servers.
bf4 has quit [Ping timeout: 256 seconds]
<athos_diddy> so i got cloud vm's with one unique ip
<athos_diddy> i can do it with this right
pothibo has joined #ruby
freerobby has joined #ruby
<athos_diddy> just setup another vm with ubuntu just for the db's
eggoez has quit [Ping timeout: 246 seconds]
<Rutix> apeiros: Well yes. But I can't think of any situation where you want 3 enviroments AND have them run on the same server
<athos_diddy> so one ip maybe 4 vm's, one for db's and three for test, dev, prod
diegoviola has joined #ruby
<apeiros> Rutix: we have test, acceptance and staging for smaller apps on the same server
<apeiros> that's 3 envs
<pothibo> I’m trying to install gems on a docker container using a non-root user and I get this Errno::EACCES: Permission denied @ rb_sysopen - /usr/local/bundle/config I am not sure why it needs to look at config file, any idea?
<apeiros> and it's defnitively useful
Casty has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> *definitively
<Rutix> apeiros: Well but you atleast have them seperate from prod ;)
<apeiros> sure
<apeiros> if you can, you always want prod as isolated as possible
<Rutix> Exactly
<apeiros> all other envs it's just a question of convenience.
<apeiros> and/or risks in specific cases.
<Rutix> I was mostly basing it on the fact he said test, dev, prod
<Rutix> :p
<athos_diddy> so what should i do
<athos_diddy> lol
<apeiros> but if you lack the resources, it still makes sense to have separate envs for test/dev/prod, even on the same machine
<apeiros> for private projects I usually have staging & prod on the same machine
<apeiros> and dev/test on my local machine
<apeiros> (ok, I admit, for private projects I usually don't have a test at all :D)
<athos_diddy> staging and prod on the same server and dev/test local
<Rutix> for private projects I usually don't have a test
<Rutix> :D
<athos_diddy> haha
<apeiros> ^5
<Rutix> And the projects i do at work don't really work well when ran on the same server. :p
<athos_diddy> ok so dev is local then i just need a production database lol
hotpancakes has joined #ruby
<Rutix> but then again Ruby is not my main language so maybe its easier with ruby
<apeiros> rails apps are pretty self contained
<apeiros> and with ruby version managers you can even have different envs run on different ruby versions
<Rutix> athos_diddy: I would just start small and expand when the need is there
<Rutix> arises*
<Rutix> apeiros: True
<athos_diddy> my problem today is a rails problem with deployment
<apeiros> so the only trouble really comes from external dependencies. and even those you can solve on sane OSes
<athos_diddy> that's why i'm into db's today i'm having a problem with permissions somehow
<apeiros> stuff like proper version of libxml or imagemagick
<Rutix> I guess some of my private projects just get directly deployed from github
<Rutix> so not even really have a staging ;p
gambl0re has quit []
bruno-_ has quit [Quit: Lost terminal]
Sirupsen has joined #ruby
Sirupsen has quit [Client Quit]
Sirupsen has joined #ruby
babykosh has joined #ruby
<apeiros> I have a project which has production and staging branches and deploy on post-receive
<apeiros> so has staging but still deploys on push :D
<Rutix> Ye that's what i meant ;)
hotpancakes has quit [Ping timeout: 272 seconds]
<apeiros> *sob*
<apeiros> back to valaptor
<apeiros> only ~2h left to bring it to usable state today. which is the target.
<apeiros> but I doubt I reach it :-/
Yiota has joined #ruby
<Rutix> What's valaptor :p
diegoviola has quit [Quit: WeeChat 1.2]
bruno- has joined #ruby
<apeiros> a library with VALue VALidators, adAPTORs and processORs
hdrv has quit [Quit: ZNC - http://znc.in]
<Rutix> Ohhh nice name :D
<babykosh> since rss feeds come in many variations is there such s thing as an rss feed service where you can enter multiple rss feeds and get a normalized rss output?
<apeiros> don't steal it! :D
<[k-_> it's better than Jacob XD
Yiota has quit [Client Quit]
peter_paule has quit [Ping timeout: 246 seconds]
eggoez has joined #ruby
FernandoBasso has joined #ruby
micmus has quit [Ping timeout: 252 seconds]
<Rutix> [k-_: Wth does jacob stand for :P
Yiota has joined #ruby
psy_ has joined #ruby
<[k-_> apeiros: ^
<apeiros> Rutix: nothing anymore. it used to stand for something when it was a JS only framework. but lost its meaning.
Rickmasta has joined #ruby
<Rutix> Oh
aspiers has quit [Ping timeout: 246 seconds]
sfarley has joined #ruby
<Rutix> apeiros: Javascript Central Offline Bullshit ;3?
<Rutix> :D
<Rutix> Which doesn't even make sense
<Rutix> but w/e
<apeiros> yes. that's precisely what it meant.
symm- has joined #ruby
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
<apeiros> how did you figure?!? :-O
<Rutix> :O
<Rutix> Magic!
<Rutix> Glad you dropped it ;d
pothibo has quit [Quit: pothibo]
<babykosh> since rss feeds come in many variations is there such s thing as an rss feed service where you can enter multiple rss feeds and get a normalized rss output?
Royalb has joined #ruby
<Rutix> plenty of those if you google
<Ox0dea> >> require 'corn_flakes'; Data.cerealize!
<Rutix> babykosh: You mean a RSS Aggregator?
<ruboto> Ox0dea # => cannot load such file -- corn_flakes (LoadError) ...check link for more (https://eval.in/388754)
peter_paule has joined #ruby
<Rutix> babykosh: Also that question could have been answered with one query on google js.
bking39116 has joined #ruby
<babykosh> @Rutix nope…
gambl0re has joined #ruby
<Rutix> Uh yes.
[k- has quit [Quit: AndroidIrc Disconnecting]
<babykosh> @Rutix not a reader
jpfuentes2 has joined #ruby
<babykosh> @Rutix I’m looking for something that will normalize the feeds so I can use them in a project
<Rutix> Oh.
<Rutix> That was not really clear from your question sorry ;p
Royalb15 has quit [Ping timeout: 264 seconds]
<babykosh> @Rutix it’s ok
<Rutix> babykosh: Can't you just use the feed-normalizer gem?
<babykosh> does this marvel handle all rss veriations? @Rutix
<babykosh> if so where might I find this wonderful item? @Rutix
micmus has joined #ruby
peter_paule has quit [Ping timeout: 264 seconds]
Channel6 has joined #ruby
<Rutix> babykosh: It did in the past but i see it hasnt been updated in ages
<Rutix> :p
hyperdrive has joined #ruby
bking39116 has quit [Quit: bking39116]
facebook has joined #ruby
facebook is now known as Guest73614
<babykosh> @rutix ah…yes, that 3 years ago last update seems troubling
Guest73614 has quit [Client Quit]
Guest73614 has joined #ruby
<Ox0dea> How to XOR two arrays using only a single pass through each?
<Ox0dea> I can't quite see how not to do a third pass of one kind or another.
bking39116 has joined #ruby
sfarley has quit [Remote host closed the connection]
MrJiks has joined #ruby
<Ox0dea> Hash arrays a and b, and then check that each key either satisfies (a && !b) or (b && !a), but that's a third pass.
<apeiros> have two hashes. result and already_seen
<apeiros> check in all from a into result and already_seen
CustosLimen has quit [Ping timeout: 265 seconds]
tubuliferous_ has joined #ruby
<apeiros> errr… wait
<apeiros> sorry. BAC is too high.
<apeiros> but I think the answer lies somewhere there :)
symm- has quit [Ping timeout: 252 seconds]
<Ox0dea> I vaguely considered just doing (a | b) - (a & b), but that wouldn't look very good in a proposal.
<Ox0dea> It's essentially three walks given how efficiently rb_ary_and and rb_ary_or are implemented, but it still feels cheap.
<apeiros> let me see whether I can answer that question after a bottle of 25% vodka :)
<Ox0dea> I like my odds.
<Ox0dea> I'd like to fix my patch before Japan wakes up. :X
antgel has quit [Ping timeout: 276 seconds]
ashleyis has quit [Ping timeout: 256 seconds]
<Ox0dea> It's broken for even counts of repeated elements in the second array. :(
rbennacer has quit [Remote host closed the connection]
etqqkoiflwhb has joined #ruby
pothibo has joined #ruby
Pupeno has joined #ruby
pothibo has quit [Client Quit]
<apeiros> yupp, solution was somewhere there
rbennacer has joined #ruby
<apeiros> but you have to translate it to C :)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has quit [Ping timeout: 255 seconds]
<apeiros> let me check whether what I did works. but it only .each'es a & b once each.
Muhannad has joined #ruby
<Ox0dea> That certainly sounds like a solution. Of course, diffing the keys at the end would be a third pass.
<apeiros> there's no diffing
<apeiros> do you consider Hash#keys to be a pass?
<apeiros> if so, that'd be a second
<Ox0dea> a.each, b.each, result.keys is three passes.
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> (I conder a.each + b.each to be a single pass - one pass through all elements)
<Ox0dea> It's not, though.
<apeiros> then I doubt it can be done with less than 3 passes
<Ox0dea> Yep, I think that might be the case.
<apeiros> note that a | b alone is 3 passes per your def
<apeiros> so (a | b) - (a & b) is 9 passes
<Ox0dea> Eh, I guess #keys oughtn't really count as a pass.
<apeiros> `TypeError: Enumerable is not a class` lelele
simplyianm has quit [Remote host closed the connection]
<Ox0dea> Heh.
<apeiros> Ox0dea: it might. depending on how Hash is implemented, it has to traverse to extract the keys.
KetaPan has joined #ruby
<Ox0dea> Right, I just mean under the semantics I'm using to force myself to write this function as similarly to the existing set-likes as possible.
<apeiros> hm, it works, but due to an optimization fails to keep order
<apeiros> undoing opt.
<Ox0dea> They all convert one of the arrays to a hash immediately, traverse the other, store the necessary info in a single hash, and then return that hash's keys at the end.
<Ox0dea> It really feels like that contract can't be met for XOR, but it's hard to say exactly why.
<Ox0dea> Something about the exclusivity of the thing.
<apeiros> oh
<apeiros> fail
<apeiros> use .key? in the conditions instead of []
peter_paule has joined #ruby
<Ox0dea> No need for Ruby details; I've gotta use these crazy st.h macros.
lkba has joined #ruby
enebo has joined #ruby
<Ox0dea> But yes, this does do the trick. My many thanks!
* apeiros drunk code champion :D
mcclurmc has joined #ruby
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
GitGud has joined #ruby
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
enebo has quit [Client Quit]
lkba_ has quit [Ping timeout: 252 seconds]
babykosh has quit [Quit: babykosh]
Muhannad has quit [Ping timeout: 272 seconds]
mcclurmc has quit [Ping timeout: 256 seconds]
yardenbar has joined #ruby
peter_paule has quit [Ping timeout: 248 seconds]
simplyianm has joined #ruby
haroldwu has joined #ruby
bf4 has joined #ruby
<shevy> what the...
bking39116 has quit [Quit: bking39116]
jas02_ has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
jas02 has quit [Ping timeout: 256 seconds]
jas02_ is now known as jas02
Guest79385 has joined #ruby
<Guest79385> Hello!
<havenwood> Guest79385: hi
Guest79385 is now known as stanalanmcm
stanalanmcm has quit [Read error: No route to host]
stamina has quit [Remote host closed the connection]
stanalanmcm has joined #ruby
stanalanmcm has quit [Max SendQ exceeded]
<Ox0dea> apeiros: Mind if I cite @apeiros?
<apeiros> no
<apeiros> but not sure whether you should say it's drunk code :D
stanalanmcm has joined #ruby
<Ox0dea> I was going to. ^_^
<apeiros> well then
<apeiros> go ahead :-D
<stanalanmcm> I'm trying to learn more about Ruby. I figure this is the place to ask questions that google hasn't been able to help with.
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
varunwachaspati has joined #ruby
<apeiros> stanalanmcm: yupp
<shevy> \o/
<manveru> yo
<apeiros> o/ manveru
<apeiros> long time no see :D
<shevy> ack, manveru is alive and not a zombie!
<apeiros> shevy: we can't be sure yet!
<apeiros> manveru: do you crave brains? o0
<manveru> :P
<shevy> he smiles like a zombie!
<manveru> i still have my own, no thanks
<manveru> maybe later
shazaum_ has joined #ruby
<apeiros> ok, maybe he's a smart zombie.
<stanalanmcm> I have two classes. I want each class to access the same array. I don't know how to do this. The goal is to have a method in each class which iterates through the same array. Does that make sense?
hotpancakes has joined #ruby
<apeiros> stanalanmcm: just pass the same array to both classes in the constructor
<apeiros> but it's hard to say what to do best without knowing what you ultimately try to achieve
<shevy> you could actually put the array into a module; or you could use a constant in one class, and access to that content. or as apeiros wrote. lots of ways
<manveru> anyone familiar with url templates? trying to figure out how to write a template that matches both http and https
sarkyniin has joined #ruby
<stanalanmcm> hmm. What if the array is a list of objects made from one of the two classes?
xxneolithicxx has joined #ruby
<apeiros> stanalanmcm: how about you don't feed us tiny bits?
<apeiros> and instead show us what you want to do
<stanalanmcm> I'm sorry.
bking39116 has joined #ruby
<stanalanmcm> I'm not trying to feed you tiny bits. I don't really understand what I'm trying to do. I could show you my source and attempt to explain the goal. Would that help?
<apeiros> yes. tremendously even :)
* havenwood chants "Show the code! Show the code!"
rbennacer has quit [Remote host closed the connection]
<manveru> code the show!
charliesome has joined #ruby
GitGud has quit [Ping timeout: 250 seconds]
<havenwood> What do we want? Code! When do we want it? Time.now!
diegoviola has joined #ruby
<apeiros> I get the feeling I'm not the only drunk. good.
<manveru> :D
<apeiros> code must go n!
<apeiros> *on
<stanalanmcm> Ok, this is my repo. Only the classes have code. Everything is is disjointed testing that I need to clean up. lolz. https://github.com/mcmillanator/2.4-Zwitter/tree/dev/classes
snsei has quit [Remote host closed the connection]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
jas02_ has joined #ruby
<stanalanmcm> The goal is to create a twitter like program. Zombies are our users.
<apeiros> stanalanmcm: easy. we're decent people. we will wait with laughing until you're gone.
<Ox0dea> >> Time.now.to_a
<ruboto> Ox0dea # => [42, 10, 17, 28, 6, 2015, 0, 179, false, "UTC"] (https://eval.in/388792)
<Ox0dea> Name the elements without cheating.
<stanalanmcm> XD
<bougyman> confused manveru. what does a template have to do with the uri scheme?
allomov has joined #ruby
<manveru> fun fact: `puts zombies` is usually the same as `zombies.each{|zombie| puts zombie }`
ItSANgo_ has joined #ruby
<apeiros> fun fact: I like p *zombies
<apeiros> but nowadays it needs an additional ;0
<apeiros> which is annoying as hell :(
lavros has joined #ruby
<manveru> bougyman: well, i'm trying to avoid having to specify both interpolation format string and a matching regex
<shevy> zombies ... hell ...
marr has joined #ruby
<stanalanmcm> The part I'm stuck on is creating a following for each zombie. So, zombie bob wants to follow zombie joe. I have all zombies in an array of objects. I was thinking I could iterate through that array to get all of joe's tweets for bob. Makes sense?
<bougyman> i guess I don't understand the problem space.
<manveru> using a url template would allow me to do that... but looks like i'd have to write 3-4 versions for each url
<manveru> well, easy: trying to provide users a way to give me urls for social networks
<bougyman> ok
jas02 has quit [Ping timeout: 276 seconds]
jas02_ is now known as jas02
<manveru> i'm classifying the url, allowing them to give me only the username, https/http/plain host, etd
<manveru> *etc
<bougyman> why don't you leverage URI for this?
<stanalanmcm> It's ok if you want to make fun. :D I'm a student and this is my homework project. My instructor encourages us to seek help.
<manveru> hm, yeah
<Ox0dea> >> %w[json yaml].each(&method(:require)); [JSON, YAML]
<ruboto> Ox0dea # => [JSON, Psych] (https://eval.in/388796)
<bougyman> we have similar inputs for integrations and i just let URI do the work.
<bougyman> validation and formatting and such.
_blizzy_ has joined #ruby
<Ox0dea> apeiros: Does Valaptors handle URIs out of the box?
<manveru> i'm using Addressable::URI and Addressable::Template :)
<manveru> but yeah, i can normalize them before parsing them
<apeiros> Ox0dea: not in the first iteration.
ItSAN____ has quit [Ping timeout: 264 seconds]
<apeiros> Ox0dea: there's a resolver for domain names in it already for email addresses, though.
AlphaAtom has joined #ruby
<apeiros> and a domain name validator (for the same purpose)
<apeiros> and I'll probably only ever add http/https uri validators
NomePadrao has joined #ruby
<Ox0dea> apeiros: Validating the domain isn't sufficient for email addresses.
<apeiros> Ox0dea: orly?
peter_paule has joined #ruby
<apeiros> damn! now I have to throw away all of it!
<apeiros> ;-)
Axy has joined #ruby
Axy has joined #ruby
<Ox0dea> I mean, don't you have to verify the MX record to actually ensure a mailbox can be delivered to?
NomePadrao has quit [Remote host closed the connection]
<apeiros> you can't ensure you can deliver to a mailbox
Rollabunna has quit [Remote host closed the connection]
RegulationD has joined #ruby
<Ox0dea> This I did not know.
<apeiros> I verify the presence of an MX, A or AAAA record (those are used for delivery)
AlphaAtom has quit [Client Quit]
<apeiros> and I verify that the email address is syntactically valid, but actually disallowing a couple of technically valid notations
zenguy_pc has quit [Read error: Connection reset by peer]
<Ox0dea> I don't think the A and AAAA records have any bearing on mail delivery.
snsei has joined #ruby
<apeiros> they do. MX record is not mandatory.
_blizzy_ has quit [Ping timeout: 248 seconds]
jas02_ has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
jas02_ has quit [Client Quit]
Mia has quit [Ping timeout: 248 seconds]
<Ox0dea> A => Address, MX => Mail eXchange.
snsei has quit [Remote host closed the connection]
<Ox0dea> TCP/IP is hard; let's go shopping.
<shevy> lol
rbennacer has joined #ruby
<apeiros> yes. still, the MTA is not resolved through MX alone. If an MX is present, it is used. but as said, it is not necessary.
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<manveru> while there may be some that bail on missing MX... i'm quite sure that's not required...
<jhass> apeiros: you resolve CNAME chains prior I hope
MilleJamille has joined #ruby
jas02 has quit [Ping timeout: 264 seconds]
mcclurmc has joined #ruby
peter_paule has quit [Ping timeout: 250 seconds]
Scroff has joined #ruby
rbennacer has quit [Remote host closed the connection]
<Ox0dea> apeiros: You're not planning on disqualifying email addresses with comments in, are you?!
<Ox0dea> That's, like, one of the best things CERN ever gave us.
<apeiros> „Only resolvable, fully-qualified, domain names (FQDNs) are permitted when domain names are used in SMTP. In other words, names that can be resolved to MX RRs or A RRs“
<apeiros> @ jhass
MilleJamille has quit [Remote host closed the connection]
<apeiros> no CNAMEs
<apeiros> somewhere that's updated to also include AAAA iirc
<apeiros> don't make me look that shit up again :D
RegulationD has quit [Ping timeout: 256 seconds]
<apeiros> I'm pretty sure end result was "domain must have MX, A or AAAA"
<jhass> nah, CNAME is valid and then the target must have either of those
<jhass> note a CNAME allows no other records besides it
<apeiros> ah fuck me. make a pull request if you use valaptor and need that :-p
<apeiros> or open a ticket and quote sources.
<jhass> well, a good resolver should resolve the CNAME chain for you if you ask it for an A, AAAA, MX
konsolebox has quit [Quit: Leaving]
<apeiros> is stdlib Resolv a good resolver?
IanV0rn has joined #ruby
<jhass> I have no idea
s2013 has joined #ruby
MilleJamille has joined #ruby
<manveru> is resolv anything more than a resolv.h wrapper?
<apeiros> no idea
mcclurmc has quit [Ping timeout: 244 seconds]
<manveru> can we talk about something more fun than mail?
<Ox0dea> >> % wtf .length
<ruboto> Ox0dea # => 3 (https://eval.in/388799)
<manveru> :)
<apeiros> manveru: impossibru, nothing is more fun than smtp
<jhass> mmh
<jhass> telnet perhaps
<apeiros> gopher
<manveru> i was trying so hard _not_ to say it :(
<manveru> how's the gopherization of the interweb going?
rbennacer has joined #ruby
<Ox0dea> manveru: Surely you mean JavaScribbling?
<manveru> you can now even use gopher on your PDAs
<Ox0dea> >> Time.now.year
<ruboto> Ox0dea # => 2015 (https://eval.in/388800)
<Ox0dea> Just making sure.
KetaPan has left #ruby [#ruby]
gregf has quit [Quit: WeeChat 1.1.1]
charliesome has quit [Ping timeout: 256 seconds]
<manveru> gopher://gopher.floodgap.com/1/overbite/install/android
<manveru> there you go
* pontiki wonders what Ox0dea was preparing to do if it came back with something else....
<apeiros> Ox0dea: https://gist.github.com/apeiros/0ae1cafa570c977068c0 that's the current validator for email addresses. non-final, mind you.
vyorkin has joined #ruby
* Ox0dea glares at Line 13.
Agoldfish has joined #ruby
<apeiros> Ox0dea: why? you love email addresses with comments in them? :)
havenwood has joined #ruby
<Ox0dea> I think they're a great idea. :P
allomov has quit [Ping timeout: 255 seconds]
<Ox0dea> apeiros: Surely the spec doesn't say that a domain is any sequence of one or more non-asperands?
<apeiros> yeah… when I read the email bnf I wanted to get my bat and find the author…
zenguy_pc has joined #ruby
<Ox0dea> That might well be TBL.
<apeiros> huh?
<apeiros> non-asperands?
j4cknewt has joined #ruby
<Ox0dea> Scratch that; I did not in my sleepless stupor immediately realize that these constituent parts are eventually glued together.
gregf has joined #ruby
<apeiros> AddrSpec is the relevant resulting regex ;-)
Scroff has quit [Read error: Connection reset by peer]
toretore has joined #ruby
<apeiros> but the Domain part is verified seperately
hotpancakes has quit [Remote host closed the connection]
<Ox0dea> Any reason to explode match.captures on L84?
<apeiros> I prefer to be explicit. even if ruby does it implicitly.
<apeiros> (a feature I actually dislike)
Scroff has joined #ruby
michael_mbp has quit [Excess Flood]
<Ox0dea> In that case, where are the square brackets? ;P
<apeiros> I think you need sleep
<Ox0dea> Also, you most definitely want #bytesize down there.
<apeiros> I'm not sure. I think I scanned the spec and didn't see whether it was characters or bytes. and non-ascii is allowed iirc.
<apeiros> so if it's characters, it's .size, not .bytesize
<Ox0dea> It's a very old spec, is it not?
<apeiros> it has been updated
<apeiros> Utf8Tail was not in the original spec f.ex.
<apeiros> also there had been errata. really annoying to check all errata and figure whether they apply to anything you use…
charliesome has joined #ruby
<apeiros> as nice as it is that rfc's exist at all, their presentation is *horrible*.
Scroff has quit [Read error: Connection reset by peer]
<Ox0dea> They're like the unpleasant spawn of office memorandums and man pages.
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> it'd be much less horrible if there was an up-to-date document where all errata have been applied to.
RobertBirnie has joined #ruby
RobertBirnie has quit [Max SendQ exceeded]
michael_mbp has joined #ruby
antgel has joined #ruby
_blizzy_ has joined #ruby
<Ox0dea> Heh. 2549 has errata.
<Ox0dea> (I had to check.)
<Ox0dea> Is there really no central errata file?
<apeiros> I didn't find it
<Ox0dea> It seems an easy enough thing to scrape together.
<apeiros> but tbh, I didn't really spend time looking
last_staff has joined #ruby
<apeiros> there's also https://pretty-rfc.herokuapp.com
rbennacer has quit [Remote host closed the connection]
Scroff has joined #ruby
wildroman2 has quit [Remote host closed the connection]
peter_paule has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
JoshGlzBrk has joined #ruby
JoshGlzBrk has quit [Client Quit]
RobertBirnie has joined #ruby
pothibo has joined #ruby
troulouliou_dev has joined #ruby
hotpancakes has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pothibo> In what circumstances does bundler needs to check for /usr/local/bundle/config ? I have an issue with Bundler in Docker and it looks at that file and I want it not to
yayfoxes_ has quit [Ping timeout: 252 seconds]
bf4 has quit [Ping timeout: 252 seconds]
WeZZard has joined #ruby
<apeiros> oh dear, I should parametrize DNS resolving if I move it to utilities. atm it is hard-coded for MX, A and AAAA…
Yiota has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
DLSteve has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
pothibo has quit [Client Quit]
<Cyclohexane> How do I get more output from this system('mysql', *mysql_args, config['database'], in: db_file_name) ?
hotpancakes has quit [Ping timeout: 265 seconds]
hyperdrive has quit [Changing host]
hyperdrive has joined #ruby
hyperdrive is now known as hdrv
<Cyclohexane> well then, turns out 'mysql' isn't installed
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yiota has quit [Client Quit]
WeZZard has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> apeiros: For what it's worth, I was unable to find anything about AAAA being a valid fallback in the absence of an MX record.
<Ox0dea> Do you happen to vaguely recall the source on that?
vyorkin has quit [Read error: Connection reset by peer]
lkba_ has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Scroff has joined #ruby
<jhass> Ox0dea: I could imagine it's somewhere in some RFC errata, but the fallback to A definitely exists and then the fallback to AAAA is implied for IPv6 capable systems
hotpancakes has joined #ruby
<apeiros> Ox0dea: no idea. it might even be in some documents how actual MTAs behave.
<Ox0dea> Makes perfect sense.
<apeiros> because - sadly - not everything follows specs :(
<apeiros> (cf IRC, huehuehue)
Scroff has quit [Remote host closed the connection]
Rollabunna has joined #ruby
IanV0rn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Yiota has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
MilleJamille has quit [Remote host closed the connection]
rbennacer has joined #ruby
sfarley has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
simplyianm has quit [Remote host closed the connection]
diego1 has joined #ruby
djellemah has quit [Ping timeout: 250 seconds]
MasterPiece has joined #ruby
diegoviola has quit [Ping timeout: 256 seconds]
simplyianm has joined #ruby
fantazo has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diego1 has quit [Changing host]
diego1 has joined #ruby
craysiii has joined #ruby
mcclurmc has joined #ruby
memph1s has joined #ruby
simplyianm has quit [Remote host closed the connection]
diego2 has joined #ruby
foureight84 has joined #ruby
Scroff has joined #ruby
diego2 has quit [Client Quit]
jamesaxl has joined #ruby
<sphex> Ox0dea: didn't follow the whole conversation, but nowadays it's a good idea to follow getaddrinfo()-like behavior (that is, try to connect to all the record types for the supported address families) for pretty much everything, including SMTP prolly. after resolving the MX, existing MTAs follow this behavior (and prolly do the same thing if there's no MX).
Scroff has quit [Read error: Connection reset by peer]
Scroff has joined #ruby
Yiota has joined #ruby
<zacts> ruby my dear
<zacts> you are so fabulous ruby, let me tell you. you rock
diego1 has quit [Ping timeout: 250 seconds]
mcclurmc has quit [Ping timeout: 244 seconds]
roolo has joined #ruby
<sphex> zacts: I know I know, but.. let's not.. make this weird :p
NeverDie has joined #ruby
<Ox0dea> sphex: Sure, "be liberal with what you accept" and all that. It still "feels" off, but I know it's these little bendings of the rules that're holding the madness together.
<Ox0dea> zacts: Favorite Ruby feature, go!
bubbys has quit [Ping timeout: 264 seconds]
<zacts> alright
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> Your answer should've been instinctual; you do not yet have a favorite Ruby feature, padawan.
bubbys has joined #ruby
Carnage\ has joined #ruby
* sphex points at zacts and screeches
* zacts cries
<zacts> I was just trying to say ruby is cool
Rickmasta has joined #ruby
foureight84 has quit [Quit: Be back later ...]
antgel has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
AlphaAtom has joined #ruby
bubbys has quit [Ping timeout: 265 seconds]
Yiota has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
bubbys has joined #ruby
AlphaAtom has joined #ruby
stanalanmcm has quit [Quit: Leaving]
s2013 has joined #ruby
<shevy> lol
sankaber has joined #ruby
<shevy> what is with sundays
<shevy> are people in general more drunk then?
<zacts> shevy: I just woke up
<shevy> ok so it's saturday night alcohol leftover :)
tubuliferous_ has quit [Ping timeout: 272 seconds]
yqt has joined #ruby
<wasamasa> night fever!
<wasamasa> that argumentation wouldn't work if you were a cat BTW
cashnguns has quit [Remote host closed the connection]
bubbys has quit [Ping timeout: 244 seconds]
bubbys has joined #ruby
Scroff has quit [Remote host closed the connection]
* wasamasa has a very sleepy one between his legs
jcoe has joined #ruby
Al3ks has quit [Remote host closed the connection]
DLSteve has quit [Quit: Leaving]
Versality has quit [Quit: Be back later ...]
yqt has quit [Ping timeout: 276 seconds]
sarkyniin has quit [Ping timeout: 256 seconds]
<shevy> well
<shevy> yesterday was caturday
learath has left #ruby [#ruby]
yqt has joined #ruby
Scroff has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
GitGud has joined #ruby
craysiii has quit [Ping timeout: 248 seconds]
stryek has quit [Quit: leaving]
phutchins has quit [Ping timeout: 250 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cache_Money has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
multi_io has quit [Ping timeout: 252 seconds]
renderful has joined #ruby
Yiota has joined #ruby
charliesome has joined #ruby
sarkyniin has joined #ruby
craysiii has joined #ruby
<zacts> I don't drink alchohol
multi_io has joined #ruby
<zacts> but I did wake up to my cat who pissed in my closet
AlphaAtom has joined #ruby
ruv has quit [Ping timeout: 256 seconds]
<shevy> lol
<zacts> anyway, got to eat so bbl
<shevy> isn't that a happy way to wake up
<zacts> shevy: not my cats, trust me
Muhannad has joined #ruby
<zacts> but my mum has a wild ferral cat or whatever she got as a stray
AlphaAtom has quit [Max SendQ exceeded]
<zacts> and no-one else will take them
Muhannad has quit [Remote host closed the connection]
<shevy> teach it some ruby
<shevy> to make it a better cat... one that won't piss into the closet
<Ox0dea> Cats should learn LOLCODE.
varunwachaspati has quit [Remote host closed the connection]
<bougyman> cats invented lolcode
<Ox0dea> It follows naturally that dogs should be taught how to program in Dogescript.
AlphaAtom has joined #ruby
<Ox0dea> bougyman: It is known.
Muhannad has joined #ruby
Muhannad has quit [Max SendQ exceeded]
renderful has quit [Ping timeout: 255 seconds]
Muhannad has joined #ruby
startupality has joined #ruby
craysiii has quit [Ping timeout: 248 seconds]
AlphaAtom has quit [Remote host closed the connection]
fantazo has quit [Ping timeout: 272 seconds]
Scroff has quit [Remote host closed the connection]
Muhannad has quit [Max SendQ exceeded]
Muhannad has joined #ruby
Omilun has joined #ruby
AlphaAtom has joined #ruby
wildroman2 has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
blue_deref has quit [Quit: bbn]
<Omilun> hello i have a problem ... i can not use irb ... initialize
drewo has joined #ruby
shazaum_ has quit [Quit: Leaving]
Rollabunna has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
<Ox0dea> Omilun: Just `irb` to start, then you'll be at an interactive prompt into which you type code to be evaluated.
Guest73614 has quit [Ping timeout: 264 seconds]
<Omilun> Ox0dea: for ammm ... can u say exampel?
idafyaid has quit [K-Lined]
peter_paule has quit [Ping timeout: 252 seconds]
idafyaid has joined #ruby
AlphaAtom has joined #ruby
anjen has quit [Quit: anjen]
<Omilun> Ox0dea: thx
charliesome has quit [Quit: zzz]
troulouliou_dev has quit [Quit: Leaving]
AlphaAtom has quit [Remote host closed the connection]
toretore has quit [Quit: This computer has gone to sleep]
lavros has quit [Quit: leaving]
sfarley has quit [Remote host closed the connection]
charliesome has joined #ruby
<SCHAAP137> Omilun: it looks like you were already in irb
<SCHAAP137> ah, nm
sfarley has joined #ruby
RegulationD has joined #ruby
knite has joined #ruby
hardye has joined #ruby
ubuntu_ has joined #ruby
<ubuntu_> Hey guys, I'm getting a `step': UNIQUE constraint failed: words.word (SQLite3::ConstraintException) error even though all I am doing is a select statement
<ubuntu_> Also, I'm running this through ruby-sqlite3 and when the exact same query is ran directly through sqlite3, it works
hotpancakes has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 264 seconds]
Channel6 has quit [Quit: Leaving]
nofxx has joined #ruby
kraljev11 has joined #ruby
Versality has joined #ruby
eggoez has quit [Ping timeout: 272 seconds]
drewo has quit [Ping timeout: 264 seconds]
Al3ks has joined #ruby
hardye is now known as subsonik
bf4 has joined #ruby
drewo has joined #ruby
pwnz0r has joined #ruby
havenwood has joined #ruby
peter_paule has joined #ruby
pwnz0r has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
Rollabunna has joined #ruby
eggoez has joined #ruby
mcclurmc has joined #ruby
<Ox0dea> ubuntu_: The two operations are obviously not being run on the same data.
<Ox0dea> ubuntu_: That error means you're trying to add a word to the words column that already exists there, thus breaking the uniqueness constraint, which I would assume you placed there on purpose.
<Ox0dea> The words table, rather.
Omilun has left #ruby [#ruby]
dgutierrez1287 has quit [Remote host closed the connection]
allomov has joined #ruby
mrmargolis has joined #ruby
drewo has quit [Ping timeout: 256 seconds]
yqt has quit [Ping timeout: 264 seconds]
kraljev11 has quit [Read error: Connection reset by peer]
Rollabunna has quit [Ping timeout: 248 seconds]
j4cknewt has quit [Remote host closed the connection]
lavros has joined #ruby
mcclurmc has quit [Ping timeout: 265 seconds]
charliesome has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
dseitz has joined #ruby
kraljev11 has joined #ruby
hotpancakes has joined #ruby
IanV0rn has joined #ruby
peter_paule has quit [Ping timeout: 244 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GitGud has quit [Ping timeout: 256 seconds]
hotpancakes has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
yqt has joined #ruby
hotpancakes has joined #ruby
Guest73614 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
hololeap has joined #ruby
<hololeap> is there a shorthand for `if obj.respond_to? :a_method and obj.a_method` ?
iamninja has joined #ruby
AlphaAtom has joined #ruby
Squarepy has quit [Quit: Leaving]
<Ox0dea> hololeap: Nothing you should actually use.
<apeiros> hololeap: you do know that `if obj.respond_to? :a_method and obj.a_method` does not do what you think it does?
<apeiros> and no, there's no shorthand for it in plain ruby.
<hololeap> apeiros: ok, but what do you mean about the first part?
<Ox0dea> hololeap: `and` is not the same as `&&`.
Azure has joined #ruby
<Ox0dea> It is, in fact, very different.
<hololeap> i understand that
<Ox0dea> Nuh-uh.
zenguy_pc has quit [Read error: Connection reset by peer]
<apeiros> oh, actually it parses in the order you expected it
<apeiros> ah right, in assignment it'll not.
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has joined #ruby
s2013 has joined #ruby
fantazo has joined #ruby
casadei has joined #ruby
<Ox0dea> hololeap: Have you considered nicking Object#try from ActiveSupport?
armyriad has quit [Quit: Leaving]
<hololeap> Ox0dea: that's kind of what i was looking for (and i am using that in my current project), but i need to check if the object responds to a method before calling it, but i in this line of code the i know with certainty that the object won't be nil
senayar has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 250 seconds]
<Ox0dea> Famous last words. :)
<hololeap> so i don't see how i would use .try in this case. it was silly of me to think there woiuld be a shorthand for it :)
snsei has joined #ruby
armyriad has joined #ruby
YamakasY has quit [Disconnected by services]
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
<nofxx> Object#methods is not ruby core is it? Got so many debug gems
<Ox0dea> Of course it is.
kraljev11 has quit [Ping timeout: 250 seconds]
CustosLimen has joined #ruby
<Ox0dea> >> Object.methods.grep(/methods/)
<ruboto> Ox0dea # => [:instance_methods, :public_instance_methods, :protected_instance_methods, :private_instance_methods ...check link for more (https://eval.in/388809)
<havenwood> >> method(:methods).owner
<ruboto> havenwood # => Kernel (https://eval.in/388810)
<nofxx> you could do obj.methods.include? ahh.. nevermind
<Ox0dea> nofxx: Ctrl-A+K in future. ^_^
hectortrope is now known as noobQ
_ht has quit [Quit: Konversation terminated!]
<nofxx> Ox0dea, what's that? erc ?
<Ox0dea> nofxx: I was being unnecessarily mean. I apologize.
drewo has joined #ruby
<nofxx> Ox0dea, no, ok, just curiosity of the K to clean
subsonik has left #ruby ["Leaving"]
<nofxx> irc client
pwnz0r has joined #ruby
<Ox0dea> Ctrl-A goes to the beginning of the line, Ctrl-K kills to the end.
<Ox0dea> It was a poorly timed joke, though, as you seem to be at a very important stage of your Ruby learning.
sandstrom has joined #ruby
<nofxx> Ox0dea, pardon my french... was just curiosity if you're using erc. I use emacs (and ctrl+a and k's every minute)
abderian has joined #ruby
<nofxx> but I dont use erc
<Ox0dea> Yes, you can ask objects all sorts of things about themselves, and they (tend to) give you the results in plain ol' Ruby objects, on which you can apply what you already know to deepen your understanding.
<Ox0dea> nofxx: Ah, I use WeeChat, which does use a lot of Emacs' bindings by default.
Scroff has joined #ruby
idafyaid has quit [Remote host closed the connection]
Scroff has quit [Read error: Connection reset by peer]
<nofxx> Ox0dea, hehe, thanks, sorry all the misunderstanding ;)
<Ox0dea> No worries, the fault is entirely mine.
idafyaid has joined #ruby
idafyaid has quit [Changing host]
idafyaid has joined #ruby
<Ox0dea> >> ObjectSpace.each_object(Class).select { |c| c.instance_methods.include?(:to_a) }
<ruboto> Ox0dea # => [Process::Tms, RubyVM::InstructionSequence, Enumerator::Generator, Enumerator::Lazy, Enumerator, Obj ...check link for more (https://eval.in/388812)
acke has joined #ruby
<Ox0dea> >> ObjectSpace.each_object(Class).select { |c| c.instance_methods.include?(:to_a) }.size
<ruboto> Ox0dea # => 18 (https://eval.in/388813)
Scroff has joined #ruby
symm- has joined #ruby
zenguy_pc has joined #ruby
sfarley has quit [Remote host closed the connection]
<abderian> Anyone know why when you create an array like this a = Array.new(10, "#" * 10). Changing the first string's first character changes all of strings in the array? For example a[0][0] = "X" will modify all of the strings in the array
blackmesa has quit [Ping timeout: 256 seconds]
Scroff has quit [Read error: Connection reset by peer]
acke_ has joined #ruby
<Ox0dea> abderian: Strings are mutable references in Ruby.
<Ox0dea> >> a = 'foo'; b = a; b[0] = 'b'; a
<ruboto> Ox0dea # => "boo" (https://eval.in/388817)
phutchins has joined #ruby
<havenwood> abderian: a = Array.new(10) { "#" * 10 }
Scroff has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
<Ox0dea> abderian: Enjoy your fish.
<havenwood> abderian: As an argument it will be one String ten times but in a block it will be ten different Strings.
blackmesa has joined #ruby
<abderian> oh interesting
zenguy_pc has quit [Read error: Connection reset by peer]
kraljev11 has joined #ruby
Scroff has joined #ruby
<nofxx> abderian, to verify this: 'a'.object_id == 'a'.object_id ... try the same with a var, you got it.
pwnz0r has quit [Remote host closed the connection]
s2013 has quit [Ping timeout: 256 seconds]
revoohc has joined #ruby
tubuliferous_ has joined #ruby
pwnz0r has joined #ruby
acke has quit [Ping timeout: 265 seconds]
<abderian> I just would have assumed that the array would be created more along the lines of a[0] = '#' * 10, a[1] = '#' * 10, etc
<nofxx> ah, havenwood gave a better explanation ;)
s2013 has joined #ruby
<nofxx> abderian, yeah, but now that you know you see ruby is actually being smart. You gave it one object.
<Ox0dea> abderian: That would be wasteful in the event that the programmer did in fact want ten references to the same string.
<nofxx> it's the least surprise that often surprises (of how cool) ;)
<abderian> yeah that makes sense
<havenwood> >> [Array.new(3, rand(1..10)), Array.new(3) { rand(1..10) }]
Scroff has quit [Read error: Connection reset by peer]
<ruboto> havenwood # => [[1, 1, 1], [3, 10, 4]] (https://eval.in/388818)
phutchins has quit [Ping timeout: 252 seconds]
<Ox0dea> abderian: Ruby uses references all over the place in order to avoid unnecessarily copying things around, which helps your program execute more quickly.
<havenwood> >> [Array.new(3, rand(1..10)), Array.new(3) { rand(1..10) }]
<ruboto> havenwood # => [[2, 2, 2], [8, 4, 5]] (https://eval.in/388819)
<havenwood> abderian: ^ the first will always be three of the same
Scroff has joined #ruby
<havenwood> abderian: because it's being run once and that one result goes in three times
<abderian> ahh seems like I still have a lot to learn, thanks haven!
acke_ has quit [Remote host closed the connection]
<havenwood> ada2358: no prob, you're welcome
pwnz0r has quit [Ping timeout: 276 seconds]
kraljev11 has quit [Ping timeout: 276 seconds]
tubuliferous_ has quit [Ping timeout: 265 seconds]
peter_paule has joined #ruby
<havenwood> abderian: ^
<havenwood> ada2358: Oops misstell. Sry.
<havenwood> d != b
<adaedra> how did you do this reversed b
Carnage\ has quit []
<havenwood> adaedra: special custom keyboard
<adaedra> oh
<Ox0dea> >> Array.new(3, 'foo').each { |f| f << rand(10).to_s }
<ruboto> Ox0dea # => ["foo684", "foo684", "foo684"] (https://eval.in/388820)
<Ox0dea> Wait, what?! I said rand(10).
<Ox0dea> That's duper-spooky.
Scroff has quit [Read error: Connection reset by peer]
<Ox0dea> abderian: What do you reckon happened there?
<havenwood> Ox0dea: 6, 8, 4
AlphaAtom has quit [Ping timeout: 265 seconds]
drewo has quit [Ping timeout: 264 seconds]
GitGud has joined #ruby
<havenwood> Ox0dea: Oh, you're just demonstrating not wondering?
<Ox0dea> I think I should be insulted?
rbennacer has quit [Remote host closed the connection]
<abderian> lol
amclain has joined #ruby
Jackneill has quit [Remote host closed the connection]
<abderian> I get what happened there :p
<havenwood> Ox0dea: Hey, I'm getting nicks confused left and right here. I knew you should have known. :P
rbennacer has joined #ruby
snsei has quit [Remote host closed the connection]
<Ox0dea> "Duper-spooky" is not the sort of thing one tends to say under genuine consternation.
* havenwood goes back to drinking coffee
<havenwood> I'll wake up eventually!
gregf has quit [Quit: WeeChat 1.1.1]
Rollabunna has joined #ruby
zacts has quit [Quit: leaving]
simplyianm has joined #ruby
yardenbar has quit [Quit: Leaving]
j4cknewt has joined #ruby
vickleton has joined #ruby
zenguy_pc has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
Scroff has joined #ruby
Azure has quit [Ping timeout: 246 seconds]
luzidco has quit [Ping timeout: 250 seconds]
bartj3_ has quit [Ping timeout: 250 seconds]
jinie has quit [Ping timeout: 250 seconds]
mathie has quit [Ping timeout: 250 seconds]
Channel6 has joined #ruby
simplyianm has quit [Ping timeout: 255 seconds]
luzidco has joined #ruby
mcclurmc has joined #ruby
jinie has joined #ruby
Versality has quit [Quit: Lingo: www.lingoirc.com]
charliesome has quit [Quit: zzz]
AlphaAtom has joined #ruby
bartj3 has joined #ruby
mathie has joined #ruby
memph1s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
memph1s has joined #ruby
memph1s has quit [Client Quit]
gix has quit [Ping timeout: 248 seconds]
pwnz0r has joined #ruby
mcclurmc has quit [Ping timeout: 248 seconds]
revoohc has quit [Quit: revoohc]
unshadow has quit [Quit: leaving]
allomov has quit [Remote host closed the connection]
pwnz0r has quit [Remote host closed the connection]
sandelius has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
zacts has joined #ruby
gix has joined #ruby
Scroff has joined #ruby
zenguy_pc has quit [Read error: No route to host]
snsei has joined #ruby
j4cknewt has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
Scroff has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 250 seconds]
__butch__ has joined #ruby
blackmesa has joined #ruby
j4cknewt has joined #ruby
Papierkorb has joined #ruby
<weaksauce> crossposting from #vim anyone gotten macvim to work well with chruby? If I chruby to a version of ruby that vim was not compiled against it will crash the ruby interpreter every time the mouse hovers over an identifier. I aliased vi to chruby 2.1.5 && /path/to/macvim but that has the undesirable effect of changing the version of ruby for that terminal session too.
Cache_Money has quit [Quit: Cache_Money]
gregf has joined #ruby
sarkyniin has quit [Ping timeout: 276 seconds]
peter_paule has quit [Ping timeout: 256 seconds]
Asher has quit [Quit: Leaving.]
eggoez has quit [Ping timeout: 246 seconds]
Eiam has joined #ruby
peter_paule has joined #ruby
hotpancakes has joined #ruby
Cache_Money has joined #ruby
mrmargolis has quit [Remote host closed the connection]
Asher has joined #ruby
eggoez has joined #ruby
doertedev has quit [Quit: leaving]
Marisa has joined #ruby
yfeldblum has joined #ruby
<Marisa> Happy Tau Day everyone
<havenwood> weaksauce: If so: make install prefix="..." STRIP="/usr/bin/true"
<Marisa> Ruby needs a tau constant in it's Math module
<Marisa> *its
<havenwood> Marisa: Happy Tau day!
bf4 has quit [Ping timeout: 264 seconds]
<weaksauce> curious. I ran that command :ruby p RUBY_VERSION and it says "2.0.0" when I had chruby 2.1.5 selected. and it constantly crashes with chruby 2.2.2
<havenwood>
<yorickpeterse> it's tau day?
zenguy_pc has joined #ruby
<yorickpeterse> isn't Pi better? :>
* yorickpeterse runs
<havenwood> yorickpeterse: Noooo
<ljarvis> mm pi
* havenwood grabs a pitchfork
* ljarvis grabs a fork
<yorickpeterse> pi is better because its name is 33% more compact
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<ljarvis> hurrr
Cache_Money has quit [Client Quit]
<havenwood> yorickpeterse: Both one letter. But Pi has an extra down-stem.
simplyianm has joined #ruby
<yorickpeterse> havenwood: nobody uses unicode
Cache_Money has joined #ruby
<yorickpeterse> ok enough lame trolling for the day
<_blizzy_> could anyone help why https://gist.github.com/NotBlizzard/51b15c7c1c501f3474a8#file-battle-parser-rb-L44 it returns the correct hash, but at line 51 in battle.rb, it returns an empty hash?
<Marisa> Tau Day is celebrated with twice the pie
<ljarvis> gripping conversation in here today
Cache_Money has quit [Client Quit]
<Marisa> :D
<yorickpeterse> I have typing practise to do
<havenwood> ♉️
simplyianm has quit [Client Quit]
<yorickpeterse> errr
<yorickpeterse> practice
<weaksauce> havenwood actually it seems to always print out 2.0.0. the ruby interpreter works in the crashing version but it fails when I hover over an identifier in a ruby file. any idea how to shut off the popup definition thing?
* yorickpeterse is learning Colemak
Cache_Money has joined #ruby
<Ox0dea> yorickpeterse: What didn't you like about Dvorak?
<havenwood> weaksauce: 2.0? Sounds like system Ruby.
Cache_Money has quit [Client Quit]
RegulationD has joined #ruby
abderian has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<yorickpeterse> Ox0dea: it puts the N and S on an annoying spot
<havenwood> weaksauce: Hem, nope I dunno.
<yorickpeterse> plus it's so radically different from QWERTY
<weaksauce> havenwood I compiled it with homebrew so it's whatever that is.
mrmargolis has joined #ruby
Cache_Money has joined #ruby
last_staff has quit [Quit: last_staff]
<weaksauce> havenwood this thing happens when you hover the mouse over an identifier: http://i.imgur.com/U24x0Em.png
<yorickpeterse> I haven't really decided yet, but so far Colemak has been the most pleasant
<weaksauce> I don't need that.
Cache_Money has quit [Client Quit]
Cache_Money has joined #ruby
Cache_Money has quit [Client Quit]
<_blizzy_> nvm.
Cache_Money has joined #ruby
Cache_Money has quit [Client Quit]
yokel has quit [Ping timeout: 250 seconds]
genpaku has quit [Ping timeout: 272 seconds]
Cache_Money has joined #ruby
sp4rrow_ has joined #ruby
<havenwood> _blizzy_: Get rid of all those `return`s. Move your constants inside the class.
rbennacer has quit [Remote host closed the connection]
<_blizzy_> havenwood, ok.
Cache_Money has quit [Client Quit]
<yorickpeterse> Ox0dea: I'm actually learning Dvorak, Colemak and Workman at the same time
<yorickpeterse> because my brain wasn't full of fuck enough already
<Ox0dea> yorickpeterse: Christ, man.
Cache_Money has joined #ruby
<Ox0dea> Your hands will not thank you for some time.
Cache_Money has quit [Client Quit]
fantazo has quit [Ping timeout: 256 seconds]
sarkyniin has joined #ruby
RegulationD has quit [Ping timeout: 272 seconds]
yaw has joined #ruby
<ljarvis> you'll look like you've perpetually giving the bloods gang sign
Cache_Money has joined #ruby
sinkensabe has joined #ruby
Cache_Money has quit [Client Quit]
genpaku has joined #ruby
yokel has joined #ruby
<yorickpeterse> Ox0dea: actually the reason I'm doing all this is to prevent my hands from hating me
<_blizzy_> yorickpeterse, learn Brainfuck and Perl while you're at it
<yorickpeterse> as in, QWERTY gives my hands a bad time
<ljarvis> brainfuck is too easy
Cache_Money has joined #ruby
<ljarvis> and perl is <3
<yorickpeterse> already know Perl
<Ox0dea> ljarvis: Aren't there about fifty of those?
Cache_Money has quit [Client Quit]
<ljarvis> Ox0dea: shades of grey?
<_blizzy_> IDK if I should learn Perl
<Ox0dea> _blizzy_: Learn LOLCODE.
<ljarvis> _blizzy_: you're "learning" like 7 languages, you could try and master one
Cache_Money has joined #ruby
<_blizzy_> Ox0dea, lol.
Cache_Money has quit [Client Quit]
<Ox0dea> You're too young to have learned a BASIC, so why not pick up a modern spin?
<_blizzy_> ljarvis, I never said now.
<_blizzy_> I meant like after I 'master' a few
renderful has joined #ruby
<ljarvis> fwiw though perl is awesome
<ljarvis> but cecept perl 6
Cache_Money has joined #ruby
<yorickpeterse> I was going to ask "what about perl 6"
<ljarvis> which is awful
sinkensabe has quit [Remote host closed the connection]
<yorickpeterse> Perl 6 really looks like Larry did too much acid
<_blizzy_> but I'm already 'strong' in ruby, python, and js
Cache_Money has quit [Client Quit]
<ljarvis> larry was replaced by an evil twin
Cache_Money has joined #ruby
<Ox0dea> _blizzy_: The amount of square brackets in your code does not suggest 'strong' Ruby knowledge, if I may say so.
Cache_Money has quit [Client Quit]
<_blizzy_> Ox0dea, ok.
sinkensabe has joined #ruby
<_blizzy_> medium then
<ljarvis> medium-well
<_blizzy_> heh
<_blizzy_> I would consider myself strong in ruby however
<_blizzy_> really
<Ox0dea> "Give it a few good kicks and walk it by a fire."
Cache_Money has joined #ruby
<ljarvis> I would disagree but don't want to seem like a dick
Cache_Money has quit [Client Quit]
<ljarvis> yorickpeterse: how's the aeon brah
<_blizzy_> this isn't the only project I've made in ruby
<_blizzy_> I've made a few rails apps also.
<yorickpeterse> ljarvis: I added a goto today
micmus has quit [Ping timeout: 265 seconds]
<ljarvis> yorickpeterse: so, badly?
<yorickpeterse> haha
<ljarvis> nice one
<jhass> call it jump, nobody will notice
<_blizzy_> also how does square brackets == bad
<_blizzy_> well, *not strong
Cache_Money has joined #ruby
<ljarvis> jhass: :D
<yorickpeterse> jhass: I already have goto_if_undef/goto_if_def, cbf renaming those
Cache_Money has quit [Client Quit]
<yorickpeterse> funny enough the VM does already have an object model, method dispatch and multi-threading
<yorickpeterse> it just lacks everything else
<ljarvis> so, the important stuff?
<yorickpeterse> (e.g. a GC, kinda crucial)
mrmargolis has quit [Remote host closed the connection]
<ljarvis> looking good though
<yorickpeterse> Yeah it's coming along nicely
<ljarvis> you're way ahead of my progress on my vm which was started at around the same time
<ljarvis> (not in rust.. ft)
<yorickpeterse> it took me about 2 years to get here
<Ox0dea> _blizzy_: Brackets everywhere is often indicative of a failure to truly understand your data and how best to structure your program around it.
<ljarvis> yorickpeterse: 5 and a half for me
<yorickpeterse> heh
<yaw> defining a private method in a subclass will override a similarly named private method in the parent class?
<ljarvis> ?try
<ruboto> Why don't you try it and see for yourself?
<_blizzy_> Ox0dea, oh. I disagree, but ok.
<Ox0dea> _blizzy_: Please defend.
<yorickpeterse> For me one of the most difficult parts was setting up the object model
vyorkin has joined #ruby
<_blizzy_> Ox0dea, I'd rather not.
<yaw> ljarvis I tried, and looks like that's the case
<yaw> but Rails is making me think otherwise
<yorickpeterse> e.g. the language is OO, so you need to represent a class and instance in the VM. But since a Class is also an instance this gets super confusing
<ljarvis> yaw: yeah rails will do that
<_blizzy_> rails is cool.
<ljarvis> yorickpeterse: sounds complex
<yorickpeterse> because you'll have a Class struct and an Object struct, and a Class is just the layout in the VM (methods, etc) and an Object can wrap it to represent a Class instance in the language and my brain explodes at this point
<yorickpeterse> so I just made it prototype based
<yaw> I'd go ahead and ask the question in #rubyonrails then
<yorickpeterse> problem solved
<yaw> thanks :)
bking39116 has left #ruby [#ruby]
sinkensabe has quit [Remote host closed the connection]
<yorickpeterse> (the language is still class based)
<yorickpeterse> Plus the bootstrapping of core types has been moved out of the VM
<ljarvis> yorickpeterse: sounds like that's how javascript was built /s
<yorickpeterse> e.g. there will be basically very little code for, say, String, written in Rust
<ljarvis> yorickpeterse: you gonna boostrap this thing? :D
<_blizzy_> on line 50, shouldn't @opponent be updated with the hash? https://gist.github.com/NotBlizzard/5ab1c92cc8b345e3857b
<yorickpeterse> ljarvis: yes
<yorickpeterse> well I can't re-write the VM in itself, but everything else will be done in the language
<ljarvis> nice one
drewo has joined #ruby
<yorickpeterse> The VM just defines some helper instructions for opening files, sockets, etc
<Ox0dea> yorickpeterse: Are there no self-hosted VMs?
<yorickpeterse> For an interpreter that's pretty hard
<_blizzy_> however, it's returning at {} instead of having the values in get_bot_switch
<yorickpeterse> if not downright impossible
swgillespie has joined #ruby
<Ox0dea> I bet they were doing it on their Lisp machines in the seventies.
<yorickpeterse> So my goal is to make the VM as small as possible, do the rest in the language itself a la Smalltalk
<ljarvis> yorickpeterse: what's the % sigil for?
<yorickpeterse> unlike Smalltalk there are no primitives (= methods defined in the host language)
Rollabunna has joined #ruby
<yorickpeterse> ljarvis: VM instructions
<ljarvis> ah right
<yorickpeterse> syntax might change, it's just a placeholder
<ljarvis> makes sense
Pupeno has quit [Remote host closed the connection]
<yorickpeterse> once I figure out what parsing toolkit to use for Rust I'll spend some time actually working on the syntax
<ljarvis> look down at your fingers
<ljarvis> that's what you should use
<yorickpeterse> was probably going to use https://github.com/Geal/nom
kraljev11 has joined #ruby
<yorickpeterse> though if the syntax is simple enough I can indeed just write it by hand
<ljarvis> looks like it could be, but probably a lot of code
dgutierr_ has joined #ruby
peter_paule has quit [Ping timeout: 272 seconds]
drewo has quit [Ping timeout: 244 seconds]
<yorickpeterse> one thing I'll also need to look into is efficient storing of native stuff in an object
Rollabunna has quit [Ping timeout: 248 seconds]
<yorickpeterse> e.g. right now I use an enum (https://github.com/YorickPeterse/aeon/blob/master/src/object.rs#L14-L21) but that's not going to scale very well
roolo has quit [Remote host closed the connection]
<yorickpeterse> add variants for files, sockets, bla bla bla, and you'll quickly have pretty bloated objects
<yorickpeterse> probably have to use some sort of void pointer and unsafe code for that though :/
kraljev11 has quit [Client Quit]
kraljev11 has joined #ruby
CpuID has quit [Ping timeout: 246 seconds]
<yorickpeterse> Now that I think of it, it's kinda fun how I've progressed knowledge wise
<yorickpeterse> e.g. 3-4 years ago I was writing some CMS in Ruby
micmus has joined #ruby
<yorickpeterse> now I'm writing compilers and doing all kinds of crazy shit
drewo has joined #ruby
<ljarvis> are you basing this project on any type of research paper or such?
<yorickpeterse> Not any in particular, though I've skimmed/read a whole bunch of articles
<yorickpeterse> I've so far avoided most technical papers because I fall asleep reading them
<Ox0dea> τ cheers for Yorick!
<yorickpeterse> thinking of it my notes however have been the most useful
<ljarvis> I found a lack of good material on this when i first got into building vms and compilers
<yorickpeterse> e.g. I'd write down what I was thinking on paper, try to describe the problem and then sorta rubber duck my way through
<yorickpeterse> oh yeah
<yorickpeterse> a lot of resources assume you're already some sort of compiler Hercules
<ljarvis> most of the stuff i found was in some kind of pseudo pascal and just assumed you already knew everything
<ljarvis> this was about 2 years ago, but not much seems to have changed
<yorickpeterse> I've pieced things together from the most random resources
uber has quit [Ping timeout: 255 seconds]
<yorickpeterse> http://wiki.luajit.org/New-Garbage-Collector <- was actually pretty helpful
<ljarvis> yeah I have a lot of notes but i wasn't very organised and it's a bit of a mess
<yorickpeterse> I probably should've bookmarked more along the way
<ljarvis> lua/luajit is one of my favourite projects
<havenwood> yorickpeterse: enjoy Rust?
<yorickpeterse> The biggest problem with VMs is that the core of it is not that hard
<yorickpeterse> As in, not harder than usual projects
<yorickpeterse> it's just that getting started requires reading a ton of academic shit
<yorickpeterse> (because they're so abstract and such)
snsei has quit [Remote host closed the connection]
<yorickpeterse> havenwood: it's ok so far
<yorickpeterse> like most systems languages it's verbose as heck
<yorickpeterse> but not as bad as Java
snsei has joined #ruby
<yorickpeterse> if it wasn't for the Rust IRC channel I would've dropped it by now probably
urbanmonk has joined #ruby
mcclurmc has joined #ruby
<ljarvis> that didn't stop me :(
<ljarvis> i just don't have the patience anymore
allomov has joined #ruby
<yorickpeterse> I'm single and no hobbies, I have plenty of time :P
<yorickpeterse> * and have no
<ljarvis> heh
Scroff has joined #ruby
<apeiros> it seems to me you have a hobby
Scroff has quit [Read error: Connection reset by peer]
<yorickpeterse> Also no plans for children, so that should cover it for the next 60 years
<yorickpeterse> apeiros: No, that's my life
<yorickpeterse> as odd as that may sound
<ljarvis> no "plans"
<ljarvis> heh
snsei has quit [Remote host closed the connection]
<yorickpeterse> ljarvis: well yeah, accidents can happen, but I'm hoping it won't
Scroff has joined #ruby
<ljarvis> :D
hotpancakes has quit [Remote host closed the connection]
<yorickpeterse> Not looking forward to sacrificing 20 years of my life racing some ugly bag of water
<apeiros> having life as a hobby sounds nice
<ljarvis> i would get so much done
k3asd` has joined #ruby
<yorickpeterse> and well I'm starting martial arts again, so I guess that counts as a hobby
<ljarvis> all i do is work
<ljarvis> fml
hotpancakes has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
<yorickpeterse> honestly I wouldn't be surprised if I die behind my computer at age 95 or something
mcclurmc has quit [Remote host closed the connection]
<yorickpeterse> "Yeah we found Yorick, he died while writing an angry bug report"
snsei has joined #ruby
Scroff has joined #ruby
<ljarvis> 95?
<ljarvis> that's impressive
<yorickpeterse> most of my family gets stupid old
<ljarvis> ah
<ljarvis> mine not so much
<yorickpeterse> e.g. my father's parents are in their 90s (though his mother died a while back), from my mother's side they also turned pretty old IIRC
vasilakisfil_ has joined #ruby
<Ox0dea> It's theorized that the first person who'll live to 150 has already been born.
AlexAltea has joined #ruby
<Ox0dea> Also, you were once the youngest person in the world.
<ljarvis> deep
<yorickpeterse> I hope we invent cloning before then
<yorickpeterse> so I can just clone myself, copy my brain, live on
snsei has quit [Remote host closed the connection]
<Ox0dea> yorickpeterse: #clone or #dup?
Aryasam has joined #ruby
Scroff has quit [Read error: Connection reset by peer]
<ljarvis> deep clone
<yorickpeterse> "Name and date of birth" "Yorick, 1992" "what, that's 300 years ago"
<yorickpeterse> "u mad?"
uber has joined #ruby
<yorickpeterse> also if you think of it, getting super old is probably super depressing
<yorickpeterse> because everybody you know will be gone (assuming they're not cloned too)
<yorickpeterse> Hm, I also wonder how long the brain would be able to remember things
<yorickpeterse> e.g. would it just forget, say, your first 50 years after 300 years of living?
Marisa has quit [Ping timeout: 246 seconds]
<ljarvis> na
<ljarvis> i say that with absolutely no certaintly of this fictional scenario we're in
ytti has quit [Ping timeout: 258 seconds]
<Ox0dea> I don't think recall follows any particular curve.
<Ox0dea> Certain memories are just indelible.
Scroff has joined #ruby
<yorickpeterse> that's the thing though, nobody has ever reached such an age so we can't really know
<yorickpeterse> unless there's ways to test how much you can cram in the human brain
<ljarvis> i hope i don't live that long
Scroff has quit [Read error: Connection reset by peer]
fantazo has joined #ruby
<ljarvis> c has been full of lots of noobs lately, i wonder where everyone is coming from
<Ox0dea> Zed Shaw was in the news again.
<ljarvis> has he been helping old ladies cross roads again?
<shevy> was he involved in a gun fight
<Ox0dea> He finally seceded the fight against K&R.
<ljarvis> heh
charliesome has joined #ruby
<ljarvis> the c code in his book is dogshit anyway imo
<Ox0dea> I guess I wanted "ceded" there.
<Ox0dea> Ugly word.
<Ox0dea> >> 0xceded
<ruboto> Ox0dea # => 847341 (https://eval.in/388849)
<ljarvis> quite.
<weaksauce> havenwood my hack code solution was just to make a zsh function and call it directly: https://gist.github.com/anonymous/eeb38a8a64ffe3859975
lundell has joined #ruby
<weaksauce> works well enough for my purposes.
Scroff has joined #ruby
<Ox0dea> weaksauce: You're gonna need a bigger shovel.
<yorickpeterse> ljarvis: so ideally you'd "freeze" your body's age, or clone it at a young age
<weaksauce> Ox0dea say what?
<yorickpeterse> I can't imagine living in the body of an 80 year old for 100s of years
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> right yeah
<Ox0dea> weaksauce: If you're fine with that result, you're liable to dig yourself into all sorts of other holes.
<ljarvis> that'd suck
<weaksauce> you have a suggestion on how to fix it?
<lundell> Hello! I'm new to Ruby and just want to know if there is any way to iterate through an array without .each because I want to decide myself when it should iterate. Anyone who can point me in the right direction? Not too familiar with the syntax yet, but I really like it so far,
Scroff has quit [Read error: Connection reset by peer]
<Ox0dea> weaksauce: Blow it all away and begin anew; it's often quite therapeutic.
<yorickpeterse> lundell: you can use an Enumerator
Guest73614 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
<yorickpeterse> e.g.
<Ox0dea> lundell: Aye, you want Enumerator#next.
<yorickpeterse> >> enum = [10, 20, 30].to_enum; p enum.next
<ruboto> yorickpeterse # => 10 ...check link for more (https://eval.in/388850)
<ljarvis> >> foo = [1,2,3]; p foo.each.next
<ruboto> ljarvis # => 1 ...check link for more (https://eval.in/388851)
<weaksauce> Ox0dea got any actionable advice other than "throwing it all away"?
<weaksauce> otherwise I have to assume you are a troll.
<ljarvis> lundell: fwiw enumerable methods without blocks often return Enumator objects
<ljarvis> Enumator
<ljarvis> new class
mcclurmc has joined #ruby
<Ox0dea> They're a little heavier, though.
<lundell> sweet! Thanks! I'm learning Ruby and I set up my own project to merge two log files to one big log file based on the timestamps.
lfox has joined #ruby
<Ox0dea> lundell: That sounds like a really good beginner project.
<ljarvis> :)
kirun has quit [Quit: Client exiting]
<ljarvis> glad to see you're caring about memory
<Ox0dea> Ha.
SCHAAP137 has quit [Remote host closed the connection]
_ixti_ has joined #ruby
<yorickpeterse> "memory is cheap!"
<lundell> I want it linear and not exponential growth the bigger the logs are.
<Ox0dea> lundell: So... insertion sort?
<Ox0dea> Ah, never mind, you didn't specify that the logs are live.
<lundell> Nah they are not up and running, it's for my own sake I'm doing this to make my job a little bit easier.
<ljarvis> nice one
kraljev11 has quit [Quit: kraljev11]
kraljev11 has joined #ruby
snsei has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
bf4 has joined #ruby
iamninja has joined #ruby
<Ox0dea> lundell: Are your timestamps uniform and at the beginnings of lines?
<lundell> Yes I already got the regex down and I can parse the log to an output :)
<Ox0dea> lundell: Do you know about lexicographical ordering?
<lundell> It's just that I need to get two logs in to each array and make sure I put the earliest timestamp first and iterate in a way that it's not going to be exponential.
dgutierr_ has quit [Remote host closed the connection]
<Ox0dea> I shall refrain from spoiling your fun.
<lundell> Ox0dea no, my math is kinda basic and so is my programming skills. I'm trying to learn as best as I can :)
sinkensabe has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
<lundell> Please spoil if you want :) It's informative and thats a good thing.
kraljev11_ has joined #ruby
Aryasam has joined #ruby
dgutierrez1287 has joined #ruby
<Ox0dea> >> 'cats' > 'bears'
<ruboto> Ox0dea # => true (https://eval.in/388854)
<shevy> spoil and spank us
<Ox0dea> lundell: Do you see why that is?
blackmesa has quit [Ping timeout: 265 seconds]
wildroman2 has quit [Remote host closed the connection]
blackmes1 has joined #ruby
<shevy> that's easy. cats are the more noble race
<lundell> less memory because it's only 4 letters?
<Ox0dea> >> 'cats' > 'b'
bf4 has quit [Ping timeout: 264 seconds]
<ruboto> Ox0dea # => true (https://eval.in/388855)
<shevy> cats are great \o/
tubuliferous_ has joined #ruby
<Ox0dea> Cats *are* great, but Ruby doesn't know that.
<lundell> haha
<ljarvis> they're not better than bears...
<Ox0dea> Ruby said so.
<lundell> I have no idea why cats > b is true.
<ljarvis> I know when I know better than ruby
<Ox0dea> >> 'a' < 'z'
<ruboto> Ox0dea # => true (https://eval.in/388856)
<ljarvis> >> 'c' > 'b' # spoiler
<ruboto> ljarvis # => true (https://eval.in/388857)
yfeldblum has quit [Ping timeout: 248 seconds]
<Ox0dea> lundell: Starting to see it?
<lundell> oh, greater number the further up in the alphabet?
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kraljev11 has quit [Ping timeout: 276 seconds]
<Ox0dea> Right, but the strings are being compared one character at a time.
<lundell> ah ok. basicly like in C, where the strings are char arrays?
<Ox0dea> As soon as Ruby has determined that one string is "less than" or "greater than" the other, it stops processing, because no later character can change its mind.
<Ox0dea> lundell: Yes, mostly like that. In C, characters are really just integers, and we can expose that truth in Ruby as well.
hotpancakes has quit [Remote host closed the connection]
<Ox0dea> >> ['c'.ord, 'b'.ord]
pwnz0r has joined #ruby
<ruboto> Ox0dea # => [99, 98] (https://eval.in/388858)
<ljarvis> >> '50' < '100'
<ruboto> ljarvis # => false (https://eval.in/388859)
<Ox0dea> ljarvis: Stahp!
<ljarvis> sorrew
arescorpio has joined #ruby
<lundell> so it's the ascii number you get when you write .ord?
tubuliferous_ has quit [Ping timeout: 244 seconds]
<Ox0dea> Well, it's the ordinal value given to that character by the current encoding, but we can call it ASCII and be just fine.
decoponio has quit [Read error: Connection reset by peer]
<Ox0dea> So, strings can be sorted just like numbers (or anything else, really), and it's done based on the values of the characters.
sinkensabe has quit [Remote host closed the connection]
rbennacer has joined #ruby
<Ox0dea> Well, you said you've got uniform timestamps.
snsei has quit [Remote host closed the connection]
<Ox0dea> >> '08:14:22' < '09:16:18'
<ruboto> Ox0dea # => true (https://eval.in/388860)
decoponio has joined #ruby
<Ox0dea> >> ['09:16:18', '04:12:21'].sort
<ruboto> Ox0dea # => ["04:12:21", "09:16:18"] (https://eval.in/388861)
snsei has joined #ruby
rdark has quit [Quit: leaving]
pwnz0r has quit [Remote host closed the connection]
<lundell> '2015-06-25 09:20:25,654 text text1' < '2015-06-25 09:20:27,654 text text2'
<lundell> oh forgot >>
<Ox0dea> Yep, you've got the idea!
<lundell> >> '2015-06-25 09:20:25,654 text text1' < '2015-06-25 09:20:27,654 text text2'
<ruboto> lundell # => true (https://eval.in/388862)
<Ox0dea> Since all the hyphens and colons are in the same places, only the figures will matter in the sorting.
<Ox0dea> And since Ruby stops bothering as soon as it has determined the "winner", the rest of the line doesn't matter.
<lundell> ah ok, so I can basicly just parse out that time stamp? I don't have to make a date object for that? This is great!
niemcu has quit [Quit: Leaving]
<Ox0dea> You needn't even do any parsing, my friend.
Xiti has quit [Quit: Xiti]
vickleton has quit [Quit: Ex-Chat]
<ljarvis> this is what a project would boast as zero allocations
<ljarvis> aka herp derp sizzurp
sinkensabe has joined #ruby
Xiti has joined #ruby
rbennacer has quit [Ping timeout: 248 seconds]
sinkensabe has quit [Read error: Connection reset by peer]
* ljarvis back to pretending to code
<lundell> doesn't ruby parse that string? Isn't parsing reading a specific part of a string?
sinkensabe has joined #ruby
<Ox0dea> lundell: Parsing is breaking a string up into meaningful pieces.
<lundell> So you say that I can just iterate through the whole line and if it differs on the time stamp it wont bother checking the text?
<Ox0dea> What you've got are a bunch of lines that, by virtue of being properly timestamped, can all be compared naturally with each other, exactly as they are.
snsei has quit [Ping timeout: 248 seconds]
<lundell> This is awesome. But is this only for ruby that it checks character for character?
<Ox0dea> Many languages do lexicographical ordering.
<Ox0dea> Python and JavaScript immediately spring to mind.
<Ox0dea> But you didn't hear that.
<lundell> :d
mcclurmc has quit [Remote host closed the connection]
pwnz0r has joined #ruby
<Ox0dea> >> yester = ['06:21 foo', '14:55 bar']; today = ['19:44 baz', '16:20 quux']; (yester + today).sort
<ruboto> Ox0dea # => ["06:21 foo", "14:55 bar", "16:20 quux", "19:44 baz"] (https://eval.in/388863)
<Ox0dea> >> @Ruby == @magic
<ruboto> Ox0dea # => true (https://eval.in/388864)
Rollabunna has joined #ruby
<lundell> HAHA
Rollabunna has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<lundell> Amazing, thank you so much!
<Ox0dea> I do advise you carry on with your line-by-line approach; if nothing else, it'll be much more educational.
<Ox0dea> Truth be told, I've been spewing nonsense and none of that is actually valid Ruby.
nateberkopec has joined #ruby
Rollabun_ has joined #ruby
Rollabun_ has quit [Read error: Connection reset by peer]
<lundell> I still need to do the line by line so the time it takes to merge is linear depending on how big the logs are.
hotpancakes has joined #ruby
renderful has quit [Remote host closed the connection]
micmus has quit [Quit: Leaving]
Rollabun_ has joined #ruby
allomov has quit [Remote host closed the connection]
<Ox0dea> Ruby's #sort is essentially O(n), but it's certainly the case that a cleverer approach could save on both time and memory.
<lundell> The thing is that in file1.log it can print 20 things in a min but in file2.log it might be empty so that iterator needs to remember it's place so I dont have to iterate through file2 everytime file1 goes to the next step.
startupality has quit [Quit: startupality]
Rollabu__ has joined #ruby
<lundell> or not empty, but a hole in the log for 20 min*
<Ox0dea> lundell: Are you passing these files in on the command line?
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lundell> Right now I just name them a special way isntead of going *-log.* so I just name it e.g. x.log and y.log
greenbagels has joined #ruby
Rollab___ has joined #ruby
<lundell> and put them in the same folder.
Rollabunna has quit [Ping timeout: 248 seconds]
yaw has joined #ruby
Rollab___ has quit [Read error: Connection reset by peer]
yaw has quit [Max SendQ exceeded]
Rollabunna has joined #ruby
matp has quit [Excess Flood]
thebastl has joined #ruby
GPrime has joined #ruby
Rollab___ has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
riotjone_ has joined #ruby
<Ox0dea> $ ruby -e 'puts ARGF.sort' *.log
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Rollab___ has quit [Read error: Connection reset by peer]
<Ox0dea> lundell: I shit you not, that tiny little command would output your whole collection in timestamp-order.
Rollabun_ has joined #ruby
<Ox0dea> But your box will explode if you actually run it!
Rollabu__ has quit [Ping timeout: 248 seconds]
<Ox0dea> So do the line-by-line thing instead.
<lundell> wtf, how?
<lundell> oh ok
<Ox0dea> I am so serious right now.
thebastl has quit [Client Quit]
<Ox0dea> Do not run that command, mate.
<lundell> I wont
<Ox0dea> Phew.
<lundell> And right now I don't sit on the 800mb logs either since I'm on my vacation. :)
Rollabu__ has joined #ruby
<Ox0dea> Are megabytes those things people hand out to children during All Hallow's Eve?
riotjones has quit [Ping timeout: 250 seconds]
<Ox0dea> Nah, I'm only poking fun.
<lundell> But another thing, should I just open two file streams and go from there, or first just put all lines in one array per file? How would you do it?
Rollabu__ has quit [Read error: Connection reset by peer]
Rollabu__ has joined #ruby
<Ox0dea> I'd use ARGF and shell globs.
<Ox0dea> But that's only because I fire-proofed my machine!
Channel6 has quit [Quit: Leaving]
Rollabunna has quit [Ping timeout: 248 seconds]
<Ox0dea> Really, though, if you want to build up a sorted array little by little, insertion sort is a good first brush.
Rollabunna has joined #ruby
<lundell> Like right now when I was trying to get my regex to work I just opened one file and iterated through it.
GnuYawk has quit [Read error: No route to host]
<Ox0dea> Well, it's been established that regular expressions are overkill for sorting timestamped data. Do you still feel you need to parse your lines?
jfarmer has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
drewo has quit [Ping timeout: 248 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snsei has joined #ruby
Azure has joined #ruby
Rollabun_ has joined #ruby
vasilakisfil_ has quit [Ping timeout: 256 seconds]
<lundell> But is it faster to read the file to an array and then use the two arrays to write to the output file? Or should I just keep the files open and iterate through and copying the line I need to the output file?
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
baweaver has joined #ruby
Rollabun_ has quit [Read error: Connection reset by peer]
<Ox0dea> It wouldn't make sense to write out to a file until you had a sorted collection, right?
Rollabun_ has joined #ruby
<Ox0dea> What happens if you've been printing, only to discover that this line should go before one you've already printed.
<lundell> Well I just remembered that sometimes info is printed on several rows so I do actually need the regex. If the next or isn't a timestamp it should put it in the file too.
<Ox0dea> Oh, excellent! Then yes, you'll need to parse your input. ;)
kraljev11_ has quit [Quit: kraljev11_]
kraljev11 has joined #ruby
Rollab___ has joined #ruby
kraljev11 is now known as kraljev11_
Rollabu__ has quit [Ping timeout: 248 seconds]
<Ox0dea> Note well that that doesn't mean you'll need to bother with converting it into an actual Date object.
Rollabu__ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
<lundell> True. But what I thought was if I have 20 rows in each file as an example. and the first 10 rows in file2 is earlier than file1, so fileone is still on row 0 but file2 is on row9. I'm just thinking that I could do if row 0 in file1 < row 9 in file2 then output.puts row 0 in file 1
Rollabunna has joined #ruby
<Ox0dea> lundell: Insertion sort.
<Ox0dea> Insertion sort is basically how you, as a human being, would put a deck of cards in order.
<Ox0dea> You take each card, figure out where it should go, and drop it in.
<lundell> But wouldn't that take longer? Alot longer?
<lundell> the bigger deck the longer it takes to check if it's going in the last spot.
Rolla____ has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
Aryasam has quit [Quit: Bye]
<weaksauce> lundell your logs are all sorted individually by the nature of them being append only logs
Rollabun_ has joined #ruby
<weaksauce> just read a line at a time from each and insert the lowest timestamp of the bunch into a new file.
Rollab___ has quit [Ping timeout: 248 seconds]
<baweaver> if array.length < 1000 then selection_sort else quick_sort end
<baweaver> insertion*
Rollab___ has joined #ruby
Rollabu__ has quit [Ping timeout: 248 seconds]
Rollab___ has quit [Read error: Connection reset by peer]
Rollabu__ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
al2o3-cr has quit [Quit: WeeChat 1.2]
Rollabunna has joined #ruby
IanV0rn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lundell> weaksauce thats what I will do. But I had not figure out a way for me to tell the program to iterate :) But I learned about enumerator just now
quazimodo has quit [Ping timeout: 246 seconds]
k3asd` has quit [Ping timeout: 246 seconds]
Rolla____ has quit [Ping timeout: 248 seconds]
quazimodo has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
Rollab___ has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
Rollab___ has quit [Read error: Connection reset by peer]
ruv has joined #ruby
Rollabun_ has joined #ruby
Rollabun_ has quit [Read error: Connection reset by peer]
Rollabun_ has joined #ruby
Rollabu__ has quit [Ping timeout: 248 seconds]
EasyCo has joined #ruby
humd1ng3r has joined #ruby
Rollabun_ has quit [Read error: Connection reset by peer]
Rollabun_ has joined #ruby
snsei has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 248 seconds]
al2o3-cr has joined #ruby
Rollabunna has joined #ruby
towski_ has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rollabu__ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
mcclurmc has joined #ruby
millerti has joined #ruby
eggoez has joined #ruby
Rollab___ has joined #ruby
quazimodo has quit [Ping timeout: 252 seconds]
snsei has joined #ruby
pwnz0r has quit [Remote host closed the connection]
Rollabun_ has quit [Ping timeout: 248 seconds]
Pupeno has joined #ruby
Rollabun_ has joined #ruby
urbanmonk has quit [Quit: urbanmonk]
Rolla____ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
Rollabunna has joined #ruby
Rollabu__ has quit [Ping timeout: 248 seconds]
RegulationD has joined #ruby
Rollabu__ has joined #ruby
Rollab___ has quit [Ping timeout: 248 seconds]
eggoez has quit [Ping timeout: 248 seconds]
Pupeno has quit [Ping timeout: 256 seconds]
cvtsx has joined #ruby
Rollab___ has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
Rollab___ has quit [Read error: Connection reset by peer]
Rollabun_ has joined #ruby
Rolla____ has quit [Ping timeout: 248 seconds]
cvtsx1 has quit [Ping timeout: 248 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollab___ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
Igorshp has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
Rollabunna has joined #ruby
Rickmasta has joined #ruby
Rollabu__ has quit [Ping timeout: 248 seconds]
Rollabu__ has joined #ruby
kraljev11_ has quit [Quit: kraljev11_]
kraljev11 has joined #ruby
kraljev11 is now known as kraljev11_
Muhannad has quit [Ping timeout: 276 seconds]
Rolla____ has joined #ruby
drewo has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
Pupeno has joined #ruby
Rollab___ has quit [Ping timeout: 248 seconds]
Rollabun_ has joined #ruby
Rollab___ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
Rollabu__ has quit [Ping timeout: 248 seconds]
Rollabunna has joined #ruby
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
Rollabunna has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
Rolla____ has quit [Ping timeout: 248 seconds]
mrmargolis has joined #ruby
fantazo has quit [Quit: Verlassend]
Rollabu__ has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
loechel has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253]]
Rollab___ has quit [Ping timeout: 248 seconds]
Rollabun_ has joined #ruby
urbanmonk has joined #ruby
Rollab___ has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
Igorshp_ has joined #ruby
Rollab___ has quit [Read error: Connection reset by peer]
nateberkopec has quit [Quit: Leaving...]
pragmatism has joined #ruby
Rollab___ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
mrmargolis has quit [Ping timeout: 250 seconds]
Rollabunna has joined #ruby
Rollab___ has quit [Read error: Connection reset by peer]
Rollabu__ has quit [Ping timeout: 248 seconds]
CloCkWeRX has joined #ruby
Rollabu__ has joined #ruby
Rollabun_ has quit [Ping timeout: 248 seconds]
pragmati_ has joined #ruby
hellschreiber_ is now known as hellschreiber
Rollabu__ has quit [Read error: Connection reset by peer]
spider-mario has quit [Read error: Connection reset by peer]
eggoez has joined #ruby
Rollabun_ has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
yaw has joined #ruby
Hobogrammer has joined #ruby
yaw has left #ruby [#ruby]
Rollabu__ has joined #ruby
Rollabu__ has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
Rollabu__ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
Rollabunna has joined #ruby
pragmati_ has quit [Client Quit]
snsei has quit [Remote host closed the connection]
Rollabun_ has quit [Ping timeout: 248 seconds]
lundell has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Rollabu__ has quit [Ping timeout: 248 seconds]
Ropeney has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
lavros has quit [Quit: leaving]
kraljev11_ has quit [Quit: kraljev11_]
Muhannad has joined #ruby
kraljev11 has joined #ruby
kraljev11 is now known as kraljev11_
snsei has joined #ruby
hotpancakes has quit [Remote host closed the connection]
Oka has joined #ruby
mcclurmc has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
kraljev11 has joined #ruby
lfox has quit [Quit: Textual IRC Client: www.textualapp.com]
hotpancakes has joined #ruby
aryaching has quit [Ping timeout: 255 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei has quit [Remote host closed the connection]
kraljev11_ has quit [Ping timeout: 276 seconds]
mcclurmc has joined #ruby
othernick has joined #ruby
mcclurmc has quit [Remote host closed the connection]
pwnz0r has joined #ruby
Raboo has joined #ruby
urbanmonk has quit [Quit: urbanmonk]
mcclurmc has joined #ruby
mcclurmc has quit [Remote host closed the connection]
othernick has left #ruby [#ruby]
mcclurmc has joined #ruby
urbanmonk has joined #ruby
Jeff__ has quit [Ping timeout: 250 seconds]
Indian has joined #ruby
Marisa has joined #ruby
workmad3 has joined #ruby
dc_ has joined #ruby
rehat has joined #ruby
dc_ has quit [Client Quit]
nateberkopec has joined #ruby
<rehat> I'm kinda new with web requests and I am trying to write a script that downloads a file from a site. The site requires a login and I think that is why I am getting a 'forbidden' message from net/http is there a way to add my cookie auth or get another auth added to the headers
workmad3 has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Remote host closed the connection]
yokel has quit [Ping timeout: 250 seconds]
vasilakisfil_ has joined #ruby
Mia has joined #ruby
mcclurmc has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yokel has joined #ruby
Axy has quit [Ping timeout: 272 seconds]
ryba has quit [Ping timeout: 256 seconds]
quazimodo has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<Ox0dea> rehat: Post code?
Eiam has joined #ruby
workmad3 has joined #ruby
nateberkopec has joined #ruby
<Ox0dea> A link to SO is not code.
<Ox0dea> If you're using something like Net::HTTP.post, you can pass a Hash of headers as one of the arguments.
ooesili has joined #ruby
ooesili has quit [Client Quit]
ooesili has joined #ruby
j4cknewt has quit [Remote host closed the connection]
fooooooooo has joined #ruby
<rehat> I am doing a get. So I basically have something like this http://pastebin.com/yndYAyTD
<ruboto> rehat, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/91241725f6ed98800e8e
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
vasilakisfil_ has quit [Ping timeout: 256 seconds]
kobain has quit [Ping timeout: 256 seconds]
techietrash has joined #ruby
ooesili has quit [Client Quit]
<rehat> so do I need to add auth before the http.get?
<fooooooooo> hey, how come one can't `def some_method(foo?: true); foo?; end` #=> identifier foo? is not valid to set
<Ox0dea> rehat: You shouldn't be able to log into something with a GET, but whatever. Do that, then get the response headers, pluck out whichever one contains your auth cookie, and then pass that along in subsequent requests.
<Ox0dea> fooooooooo: Because.
ooesili has joined #ruby
snsei has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
thalassa has quit [Ping timeout: 256 seconds]
nofxx has quit [Ping timeout: 252 seconds]
mcclurmc has quit [Remote host closed the connection]
thalassa has joined #ruby
<rehat> Ox0dea: thanks, I didn't realize I needed to login to get the auth cookie first. I will work on that
dgutierrez1287 has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 250 seconds]
idafyaid has quit [Ping timeout: 272 seconds]
<Ox0dea> rehat: It's possible that the site will set a few cookies as soon as you request the login page, so you may need to apply the steps outlined above at that stage.
coffee__cup has joined #ruby
michael_mbp has quit [Excess Flood]
tubuliferous_ has joined #ruby
kobain has joined #ruby
sp4rrow_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snsei has joined #ruby
quazimodo has quit [Ping timeout: 248 seconds]
bruno-_ has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
ashleyis has joined #ruby
michael_mbp has joined #ruby
MatthewsFace has joined #ruby
tubuliferous_ has quit [Ping timeout: 246 seconds]
<fooooooooo> Ox0dea :/ -- :foo? is a valid symbol.
<Ox0dea> That it is.
<Ox0dea> But it is not a valid identifier for anything but methods.
millerti has joined #ruby
<Ox0dea> And that makes a good deal of sense too.
<Ox0dea> It's often the case that we call a method to ask a question, but when should a variable represent such a thing?
balazs has joined #ruby
<fooooooooo> ok makes sense thanks
Axy has joined #ruby
Axy has joined #ruby
bf4 has joined #ruby
quazimodo has joined #ruby
Mia has quit [Ping timeout: 255 seconds]
snsei has quit [Remote host closed the connection]
marr has quit []
mrmargolis has joined #ruby
bf4 has quit [Ping timeout: 256 seconds]
ooesili has quit [Quit: leaving]
Igorshp_ has quit [Remote host closed the connection]
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]