apeiros_ changed the topic of #ruby to: Ruby 2.2.0; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
noob is now known as Guest57758
brb3 has joined #ruby
<waxjar> don't expect it to, make sure it does :p
<jhass> shevy: yeah, someone might trap SIGINT
<shevy> yeah
mjuszczak has quit []
<shevy> and not exit
dfinninger has quit [Remote host closed the connection]
mjuszczak has joined #ruby
Guest57758 has left #ruby [#ruby]
ghostpl_ has quit [Ping timeout: 255 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rephiax has quit []
Stalkr_ has quit [Quit: Leaving...]
juanpablo_ has joined #ruby
<zhan_> so then im making a website with separate communities that can socialize along with auction
<zhan_> how long is it going to take me
<zhan_> to make
baweaver has quit [Remote host closed the connection]
werelivinginthef has quit [Remote host closed the connection]
<shevy> another question
doodlehaus has quit [Remote host closed the connection]
<shevy> I have a module that translates '$FOO' into ENV['FOO'] (if this entry exists), otherwise it returns the input unmodified
<jhass> zhan_: between 1 week and 5 years
billy_ran_away has quit [Read error: Connection reset by peer]
<shevy> should I use an additional "if string.include? '$'" check?
Musashi007 has joined #ruby
wallerdev has quit [Quit: wallerdev]
<ponga> HI shevy
<jhass> ?
<shevy> I could well do without that check because the module itself takes care of it
<zhan_> well say if i get around to actually doing 4 hours of work every day
<mozzarella> guys, is there a better of achieving something like module Mod; class << self; module_methods_here; end; end
benlieb has quit [Quit: benlieb]
<shevy> hey ponga - still crystaling your way around?
maknz has joined #ruby
<mozzarella> basically, I want all methods to be module methods, but I don't want to write self. everywhere
<jhass> zhan_: then 2 weeks - 5 years
<shevy> lol why 5 years?
<zhan_> ye
<jhass> have a better estimate?
arescorpio has joined #ruby
<jhass> shevy: ^
<zhan_> well no im actually learning the language too
<shevy> hey now zhan_ is clever
<shevy> he won't even need a full year if he is that committed
<ponga> shevy: me back on track developing my waifu bot, and well yes i still do like crystal very much
Pupeno has quit [Remote host closed the connection]
<ponga> even thinking to contribute(if i were able to, tho)
<jhass> mozzarella: put module_function at the top
<zhan_> well month is good median?
<jhass> ponga: heh, if I made it
oki has joined #ruby
kaiZen has joined #ruby
Pupeno has joined #ruby
<ponga> jhass: lol
juanpablo_ has quit [Ping timeout: 256 seconds]
AlphaTech has joined #ruby
<jhass> zhan_: the median in that estimate is closer to 2.5 years than 1 month
<ponga> shouldn't he be in rails than ruby
<zhan_> what actually takes that much time
<zhan_> spotify is made in ruby, how much it takes for a man to do it?
<jhass> you'll find out along the way
baweaver has joined #ruby
<jhass> what part of spotify is?
<zhan_> the web player
<jhass> no, that's HTML, CSS and a bunch JS
zachrab has joined #ruby
<ponga> bunch of js yeah
<jhass> and probably some fallback flash still
<zhan_> says c++
oki has quit [Ping timeout: 245 seconds]
ascarter has joined #ruby
benlieb has joined #ruby
crueber has quit [Quit: Leaving.]
morenoh149 has joined #ruby
Pupeno has quit [Ping timeout: 265 seconds]
<jhass> one thing to learn is that any reasonably complex software or product is never finished
malcolmva has quit [Ping timeout: 252 seconds]
<mozzarella> jhass: "extend self" was what I was looking for
<mozzarella> I never know when I should use include or extend >.>
<jhass> mozzarella: module_function is what ruby core uses, so it should be good for you too
<Senjai> zhan_: That's a wildly openended question
<Senjai> so you're going to get a proportional answer
<mozzarella> jhass: but you have to specify the function names
<ponga> shevy: you should try crystal too!
mary5030 has quit [Remote host closed the connection]
<shevy> dunno
<shevy> I am too committed to ruby, finish up the remaining projects, then move to C
<ponga> shevy: crystal is like ruby's sister but hotter!
<ponga> altho she hasn't got those fancy gems
DadoCe has joined #ruby
<shevy> I am sure there are warts to be discovered!
<ponga> oh shevy are you going to leave ruby
<shevy> nah
checkit has joined #ruby
<ponga> then what's "move to C"
<ponga> ;(
justin_pdx has quit [Quit: justin_pdx]
<godd2> Maybe shevy meant move to learning C
ascarter has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 256 seconds]
<jhass> mozzarella: nope
<shevy> because C rules the world man
<jhass> mozzarella: it works like private
<jhass> and protected
ascarter has joined #ruby
<shevy> it's either C, or nim or javascript
<jhass> shevy: you don't have to move to C when you have crystal!
<shevy> crystal might be dead in 5 years
<ponga> nim?
baweaver has quit [Remote host closed the connection]
<ponga> uh please don't say that i love crystal
<shevy> well nim is very different
<shevy> so it's more interesting than python
<shevy> but I dunno, all the time commitment... :(
mjuszczak has quit []
brb3 has quit [Quit: ZZZzzz…]
<GaryOak_> rust!
<ponga> shevy: so C is less annoying than Java?
<shevy> ponga I hate java
<ponga> so does everyone
<shevy> I'd rather use C++ than java
<GaryOak_> rust!
momomomomo has quit [Ping timeout: 246 seconds]
reinaldob has quit [Remote host closed the connection]
<ponga> i'd rather use C# than java
luksaur has quit [Quit: done]
<shevy> C# is also fine
<shevy> compared to java
<ponga> um.. nim doesn't seem verbose
brb3 has joined #ruby
<shevy> nim is not so easy for my brain
<shevy> proc unsafeScanf(f: File, s: cstring)
<shevy> {.varargs,
<shevy> importc: "fscanf",
<shevy> header: "<stdio.h>".}
<ponga> uh
zhan_ has quit [Quit: Page closed]
<shevy> but it would be cool if ruby would have optional typing or type-specification
FooMunki_ has joined #ruby
<bricker> agree, weak typing sucks
<ponga> shevy: then go for crystal !
<jhass> ruby is strongly typed
reinaldob has joined #ruby
<jhass> just not static
quazimodo has quit [Ping timeout: 252 seconds]
<jhass> >> 1+"1"
<eval-in_> jhass => String can't be coerced into Fixnum (TypeError) ... (https://eval.in/296532)
<mozzarella> jhass: I see… is there a way of undoing it (just curious)
Musashi007 has quit [Quit: Musashi007]
<jhass> ^ this would work in a weakly typed language
<jhass> mozzarella: is there a way of undoing extend self?
<jhass> or private?
<mozzarella> jhass: no, module_function
<shevy> mozzarella not an easy one
tkuchiki has joined #ruby
<mozzarella> there's "public" for "private"
<shevy> huh
<shevy> :)
<jhass> mozzarella: plain no, that question doesn't make much sense to me
<mozzarella> they go hand in hand
<shevy> aha you mean like a toggle
<mozzarella> yes
<GaryOak_> is there a language you can do 1+"1"
quazimodo has joined #ruby
<mozzarella> that's what module_function does, right? but can you do the opposite?
wldcordeiro has quit [Ping timeout: 265 seconds]
<shevy> I actually don't know how to easily untoggle class methods away from a module
<ponga> GaryOak_: i really wanna know that too
<mozzarella> GaryOak_: php
bigmac has joined #ruby
<GaryOak_> ugh :S
<shevy> module_function just switches the following definitions towards becoming a module_function too, so you can call them with ModuleName.bla()
bigmac is now known as i8igmac
brb3 has quit [Client Quit]
<mozzarella> GaryOak_: http://codepad.org/Ctwy50Nk
malcolmva has joined #ruby
<shevy> mozzarella but you can also use .class_eval or .instance_eval { alias foo bla }
<jhass> mozzarella: GaryOak_ https://eval.in/108854
<jhass> much nicer
chipotle has joined #ruby
<GaryOak_> haha those are totally the same
<shevy> let's face it
<shevy> php is not a programming language
<jhass> GaryOak_: https://eval.in/61309 how about this one then
<shevy> it is a pot for many cooks
<mozzarella> wtf
rhllor has joined #ruby
<shevy> php makes people sad
<waxjar> i had to do some php a while ago, it wasn't *that* bad actually
<versatiletech> and there starts the flame war
mjuszczak has joined #ruby
<GaryOak_> jhass: I'm so confused and scared right now
tkuchiki has quit [Ping timeout: 252 seconds]
<shevy> waxjar what did you write?
<jhass> GaryOak_: yap, weak typing sucks tremendously
<waxjar> a blog :/
<jhass> however I like dynamic typing
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<waxjar> you don't even have to run a full-fletched apache server anymore to run php scripts! :P
<GaryOak_> oh yeah you can run it through the shipped php server
<GaryOak_> that comes built in
scripore has quit [Quit: This computer has gone to sleep]
<shevy> awesome
<shevy> didn't ruby have that years ago?
<havenwood> shevy: ruby -run -ehttpd .
versatiletech has quit [Quit: versatiletech]
<GaryOak_> I've only heard of python's one
a5i has joined #ruby
<GaryOak_> havenwood: that's pretty cool
<havenwood> or: ruby -run -ehttpd . -p 3000
SolarSailor has joined #ruby
<havenwood> it's handy sometimes
ascarter has joined #ruby
<GaryOak_> does it try to bind port 80 by default, i had access errors
<havenwood> sudo
<havenwood> that's just a port 80 thing
<GaryOak_> yeah
ascarter has quit [Max SendQ exceeded]
tag has joined #ruby
<havenwood> GaryOak_: oh, i misread your query - yes, port 80 by default
<GaryOak_> oh ok
ascarter has joined #ruby
tohsig has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has joined #ruby
<havenwood> shevy: named 'un' so you can -run it :)
BigRonnieRon has joined #ruby
fryguy9 has joined #ruby
<havenwood> ruby -run -ehelp
oki has joined #ruby
brb3 has joined #ruby
jonr22 has joined #ruby
<shevy> havenwood lol
Aswebb_ has quit [Remote host closed the connection]
<GaryOak_> hahaha
sivsushruth has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
<a5i> Ruby
<a5i> is that guy in Harry Potter
MatthewsFace has joined #ruby
<a5i> teacher of Gryffindor
<ponga> I want rubyprocess A to send string to rubyprocess B, then B sends back reply string to A, is IO class what i should use for such communication
jonr22 has quit [Ping timeout: 256 seconds]
oki has quit [Ping timeout: 252 seconds]
i8igmac has quit [Quit: Leaving]
cphrmky has quit [Ping timeout: 246 seconds]
<shevy> a5i you like hairy potter?
bigmac has joined #ruby
DerisiveLogic has joined #ruby
<shevy> I lost all respect for hairy potter since that!
<a5i> I dont like harry potter
FooMunki_ has quit [Quit: FooMunki_]
<GaryOak_> ponga: looks like IO is the right way to god
<GaryOak_> go* lol
bricker_ has joined #ruby
<ponga> g0bl1n: so i'm good using either socket or IO
<jhass> ponga: how are the processes created?
<a5i> here
<a5i> bottom of comments
<ponga> jhass: what do you mean, its a loop run in terminal
<jhass> so B is not forked from A?
<ponga> they are two seperate
<jhass> named pipe might be easiest thing then, unix socket is another way
_djbkd has quit [Remote host closed the connection]
<ponga> A is twitter bot code receives mention, and B processes it and gives back A the reply to update
<ponga> named pipe
<ponga> ok i will google it
bruno- has joined #ruby
bricker has quit [Ping timeout: 244 seconds]
bruno- is now known as Guest30617
Guest7768 has quit [Ping timeout: 255 seconds]
tag has quit [Ping timeout: 252 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Kellin has quit [Disconnected by services]
brb3 has quit [Quit: ZZZzzz…]
<ponga> uh.. damn it this is too complicated
fryguy9 has quit [Quit: Leaving.]
Guest30617 has quit [Ping timeout: 256 seconds]
sevvie has quit [Ping timeout: 240 seconds]
<ponga> jhass: i should just fork it and write twitter class in the code
<ponga> rather than IPC
<ponga> ;(
<jenrzzz> does anyone know the best current practice for loading files in gems? not sure if I should keep require_relative'ing everything in the top level lib/gem_name.rb or use Kernel.autoload with all my constants instead
<jenrzzz> i found a discussion from 2011 about autoload being deprecated after 2.x but i'm not sure how that ended
bruno-_ has joined #ruby
ponga has quit [Quit: Leaving...]
<Radar> jenrzzz: Why require_relative? the lib dir of the gem should be in the load path, so you can just require things, no?
_djbkd has joined #ruby
<jhass> jenrzzz: neither, do plain requires, take advantage of Rubygems setting the load path for you once the gem is installed
DadoCe has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
maximski has joined #ruby
<jenrzzz> Radar, jhass: good point. i remember needing the relative requires before i moved this stuff into a gem but it's unnecessary now
<jenrzzz> so is it a good idea to avoid autoload nowadays?
startupality has quit [Quit: startupality]
GaryOak_ has quit [Remote host closed the connection]
eat_multi has quit [Remote host closed the connection]
bruno-_ has quit [Ping timeout: 252 seconds]
bruno-_ has joined #ruby
Hijiri has joined #ruby
VBlizzard is now known as _blizzy_
justin_pdx has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
jottr has joined #ruby
nii236 has joined #ruby
sevvie has joined #ruby
momomomomo has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevenseacat has joined #ruby
bricker_ is now known as bricker
Guest65 has joined #ruby
graydot has quit [Quit: graydot]
Takle has joined #ruby
bim has quit [Remote host closed the connection]
beneggett has joined #ruby
Guest65 has quit [Max SendQ exceeded]
plashchynski has joined #ruby
<shevy> jenrzzz yes. matz deprecated it
<shevy> if you use gem-structure layout then you can use require alone just fine. I never need require_relative
mistermocha has quit [Ping timeout: 244 seconds]
beneggett has quit [Ping timeout: 264 seconds]
<shevy> autoload will remain in 2.x by the way jenrzzz
<jenrzzz> shevy: awesome, thanks!
<shevy> "[...] Ruby will keep autoload for a while, since 2.0 should keep compatibility to 1.9. But you don't expect it will survive further future, e.g. 3.0."
graydot has joined #ruby
<baweaver> shevy: what's the word on 3.0 anyways?
<havenwood> baweaver: much win
<baweaver> I figured. ETA / details at all?
<baweaver> or is it still in the aether?
sankaber has joined #ruby
Shazaum has quit [Quit: This computer has gone to sleep]
<baweaver> I keep getting Rails 3.0 and that static typing bit.
<havenwood> baweaver: LLVM JIT for some great speed improvements and removal of the GIL with a new concurrency model.
<shevy> baweaver dunno. I think ruby 2.x will remain in 2015 and probably 2016
jeromelanteri has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
wallerdev has joined #ruby
nii236 has quit [Ping timeout: 240 seconds]
<baweaver> throw in automatic tailcall optimizations and I'll be quite happy.
<baweaver> I keep forgetting they're not in Ruby and using recursion for some things.
dfinninger has joined #ruby
<baweaver> I switch about between Ruby, JS, Elixir, and Clojure
sdothum has joined #ruby
<havenwood> baweaver: Enable it tail call optimization at compile time! But yeah, I'd usually have it rather have it than the trace you're trading off I suppose.
<baweaver> then again JS doesn't have it either until ES6 clears it seems.
nettoweb has joined #ruby
Takle has quit [Remote host closed the connection]
marr has quit [Ping timeout: 272 seconds]
<baweaver> You can, but at this point I think it should just be built in
<havenwood> That would make it more practically useable. ;)
Takle has joined #ruby
<baweaver> Admittedly I tend to think recursively for most things
<havenwood> baweaver: but i'm excited for what's coming, some good stuff
<baweaver> and trying to avoid state in ruby is treacherous without good recursion
<havenwood> baweaver: it'll be interesting to see which way they go with removing the GVL
<baweaver> I'll see if I can get some more details out of the Kaigi talk
<baweaver> Angular 2.0 is going to be an odd beast after 1.x
werelivinginthef has joined #ruby
fandi has joined #ruby
DadoCe has joined #ruby
dfinninger has quit [Ping timeout: 265 seconds]
Soda has joined #ruby
brainfartist has joined #ruby
<havenwood> baweaver: it's yet to be decided whether to go with an Actor model or one where Threads own the Objects they create, and they're seen as immutable by other Threads unless they gain possession.
nii236 has joined #ruby
<baweaver> So effectively we're emulating parts of Go or Elixir/Erlang
tkuchiki has joined #ruby
<baweaver> Actor models at least work well for Erlang.
Pupeno has joined #ruby
<baweaver> and some Scala
xymbol has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
<havenwood> Matz said his first choice was Actor model but he's open to immutable-from-the-outside sharing as a possibility.
rbennacer has joined #ruby
werelivinginthef has quit [Ping timeout: 245 seconds]
<baweaver> If Ruby were to take the concurrency of Elixir / Erlang, the contracts and static typing of Haskell, and pattern matching that'd be amazing.
<baweaver> though case works vaguely like a pattern match to be fair
<havenwood> baweaver: Matz keeps saying he's looking at other functional programming languages for further inspiration.
lesce has quit [Ping timeout: 265 seconds]
apeiros_ has quit [Remote host closed the connection]
<havenwood> fingers crossed
<baweaver> Which is why I still prefer Ruby to Python in most cases
<baweaver> Python's anonymous functions are clunky
<baweaver> though they do have list comprehensions to be fair.
<baweaver> Still not much my cup of tea.
<havenwood> agreed
<baweaver> Heh, Ruby built on top of Haskell
<baweaver> that'd be a trip
<shevy> a beaver on a trip
<baweaver> Might add that to my list of ridiculously esoteric projects to do when I get bored.
<baweaver> Birch bark does it man, potent stuff.
chipotle has quit [Quit: cheerio]
Pupeno has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
<baweaver> Right next to remaking RPG Maker in Clojure for giggles.
<havenwood> baweaver: Found where Matz briefly talks about in the QA sess at RubyConf: https://www.youtube.com/watch?v=_zoG2i7pMxg#t=23m22s
<baweaver> danke
Asher has quit [Quit: Leaving.]
checkit has quit [Ping timeout: 244 seconds]
<shevy> hmm didn't hanmac also redo RPG Maker but inr uby
<shevy> *in ruby
<baweaver> I really should finish writing my book first though....
<baweaver> too many things
chipotle has joined #ruby
<shevy> lol
rbennacer has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
ghostpl_ has joined #ruby
tkuchiki has quit [Ping timeout: 256 seconds]
nii236 has quit [Ping timeout: 252 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
kaneda^ has joined #ruby
Sawbones has joined #ruby
CorySimmons has quit [Quit: Bye!]
duncannz has quit [Max SendQ exceeded]
roolo has joined #ruby
<kaneda^> hey all, i'm running rbenv on two systems that are very close to identical, but on one system something is setting my gempath differently. the GEM_PATH and GEM_HOME variables are not set, where could it be being modified?
xymbol has quit [Quit: Be back later ...]
duncannz has joined #ruby
chipotle has quit [Quit: cheerio]
<baweaver> I have the attention span of nil sometimes...
<baweaver> .bashrc probably
<baweaver> or some variant of it.
duncannz has quit [Max SendQ exceeded]
<kaneda^> baweaver: already looked in the .bash*
<kaneda^> they're identical on both machines
<baweaver> Hm
<baweaver> Have you tried purging / reinstalling it?
<kaneda^> the system where it's not working appropriately is a hot standby, so it's not critical, but it's confusing
nii236 has joined #ruby
<kaneda^> baweaver: that's one way of dealing with it, but i was hoping to pinpoint what was causing it and eliminate it
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
<baweaver> load order potentially
<baweaver> not sure
<kaneda^> and my gem binary is being invoked from shims, so that's right
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Megtasti_ has quit []
fandi has quit [Ping timeout: 240 seconds]
duncannz has joined #ruby
fandi has joined #ruby
duncannz has quit [Max SendQ exceeded]
mjuszczak has quit []
justin_pdx has quit [Quit: justin_pdx]
_maes_ has quit [Ping timeout: 264 seconds]
<baweaver> I'd just reinstall it honestly. Best chance of catching something is to just checksum the files and see what sticks out in RBENV and ~/.bash files
momomomomo has quit [Quit: momomomomo]
<kaneda^> baweaver: but it's all identical ;_;
<kaneda^> i checked /etc/profile and the stuff in /etc/profile.d too
<kaneda^> all the same
<baweaver> Are you sure though on rbenv's install?
maximski has quit []
adriancb has joined #ruby
* baweaver isn't exactly familiar with RBENV, uses RVM
ghostpl_ has quit [Ping timeout: 250 seconds]
<kaneda^> so i'm 99% sure it'sb ecause the last guy installed a version of ruby elsewhere
<kaneda^> and i made sure that version was OFF the path
<kaneda^> but i have no clue where it's being referenced from
<kaneda^> it's very mysterious
<baweaver> did you echo both the paths
<baweaver> and do ruby -v?
<kaneda^> yep
<kaneda^> and which ruby/irb/gem yields the right one in shims
<kaneda^> my instinct tells me SOMETHING is setting GEM_PATH and/or GEM_HOME
baroquebobcat has quit [Quit: baroquebobcat]
<baweaver> Sorry to say that's about as far as I could guess.
<kaneda^> there's also no ~/.gemrc
<baweaver> rbenv probably just botched the install from some old files.
<bigmac> kaneda^: maybe you can grep threw the files to what your looking for
scripore has joined #ruby
<bigmac> find . -name "*.rb" -print0 | xargs -0 grep -i -n "GEM_PATH"
WildBamboo-Josh has quit [Quit: Leaving]
Azure has quit [Ping timeout: 256 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaleido has quit [Ping timeout: 244 seconds]
<kaneda^> bigmac: i'll give something like that a shot, but definitely a last ditch effort
<kaneda^> i already looked through all of the files being invoked at (login) shell start
n80 has joined #ruby
oki has joined #ruby
<kaneda^> what's really weird is that, at least originally, the second machine is a clone of the first
reinaldob has quit [Remote host closed the connection]
kaleido has joined #ruby
zachrab has quit [Remote host closed the connection]
reinaldob has joined #ruby
n008f4g_ has quit [Ping timeout: 256 seconds]
<kaneda^> there's definitely projects on here that update the gem path
<kaneda^> but that makes sense, and they dont run on login shell
zachrab has joined #ruby
kblake has quit [Remote host closed the connection]
<kaneda^> otherwise nothing came up from looking through rb files for the set
<kaneda^> next, shell files
rbennacer has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
reinaldob has quit [Ping timeout: 240 seconds]
zachrab has quit [Ping timeout: 252 seconds]
nfk has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 252 seconds]
<kaneda^> whatever
<kaneda^> i'll just overwrite it for now
SpikeMaster has joined #ruby
<bigmac> how big is the clone
bricker has quit [Quit: leaving]
rbennacer has joined #ruby
juanpablo_ has joined #ruby
tkuchiki has joined #ruby
<kaneda^> errr
plashchynski has quit [Quit: plashchynski]
<kaneda^> so this is weird
<kaneda^> i just set the GEM_PATH and GEM_HOME to good values manually
jottr has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
<kaneda^> it worked, not weird, but then i unset them, logged out and back in, and now everything works
<kaneda^> must have been something lingering in the env
TheNet has joined #ruby
<kaneda^> so, all fixed
<kaneda^> i wont question a good thing, not at 9PM
<kaneda^> laters
kaneda^ has left #ruby [#ruby]
oki has quit [Ping timeout: 252 seconds]
Sawbones has quit [Remote host closed the connection]
RegulationD has joined #ruby
Qladstone has joined #ruby
mistermocha has joined #ruby
robustus|Off has joined #ruby
robustus|Off is now known as robustus
SpikeMaster has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
juanpablo_ has quit [Ping timeout: 256 seconds]
mistermo_ has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
rhllor has quit [Quit: rhllor]
mistermocha has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
graydot has quit [Quit: graydot]
Qladstone has quit []
wallerdev has quit [Quit: wallerdev]
DrForr has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
Shazaum has joined #ruby
Shazaum has joined #ruby
Shazaum has quit [Changing host]
adriancb has quit [Remote host closed the connection]
oo_ has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
bim has joined #ruby
graydot has joined #ruby
Rayford has joined #ruby
drkush has quit [Ping timeout: 252 seconds]
mrsolo has joined #ruby
AlphaTech has quit []
mistermocha has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
_djbkd has quit [Ping timeout: 272 seconds]
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
graydot has quit [Client Quit]
_djbkd has joined #ruby
dfinninger has joined #ruby
bim has quit [Ping timeout: 265 seconds]
Mives has joined #ruby
baweaver has quit [Remote host closed the connection]
kaiZen has joined #ruby
<Rayford> Anyone know of a Framework that can be used to aggregate Indentities from Identity Providers?
<Rayford> Like something to allow a user to aggregate/save mulitple social media accounts
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
willharrison has joined #ruby
Qladstone has joined #ruby
tcrypt has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
amclain has joined #ruby
roolo has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 265 seconds]
lkba_ has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
ismaelga has quit [Remote host closed the connection]
claptor has joined #ruby
mikeric has quit []
Rodya_ has joined #ruby
drkush has joined #ruby
Azure has joined #ruby
charliesome has quit [Quit: zzz]
bruno-_ has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
BigRonnieRon has quit [Quit: Textual IRC Client: www.textualapp.com]
ismaelga has joined #ruby
sevvie has quit [Ping timeout: 252 seconds]
jonr22 has joined #ruby
Aswebb_ has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
Rodya_ has quit [Remote host closed the connection]
krz has joined #ruby
jonr22 has quit [Ping timeout: 255 seconds]
_whitelogger has joined #ruby
Shazaum has quit [Quit: This computer has gone to sleep]
Rodya_ has joined #ruby
mrsolo has joined #ruby
dumdedum has joined #ruby
dumdedum has quit [Client Quit]
Rodya_ has quit [Remote host closed the connection]
elfuego has quit [Quit: elfuego]
PaulCape_ has joined #ruby
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest50 has joined #ruby
mrsolo has quit [Client Quit]
Rayford has quit [Quit: Rayford]
jenrzzz has quit [Ping timeout: 264 seconds]
Rodya_ has joined #ruby
zachrab has joined #ruby
narcan has joined #ruby
sevvie has joined #ruby
Guest50 has quit [Client Quit]
PaulCapestany has quit [Ping timeout: 250 seconds]
kblake has joined #ruby
jenrzzz has joined #ruby
ghr has joined #ruby
_djbkd has quit [Remote host closed the connection]
adriancb has quit [Read error: Connection reset by peer]
denwo has joined #ruby
_djbkd has joined #ruby
adriancb has joined #ruby
zachrab has quit [Ping timeout: 246 seconds]
kblake has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 250 seconds]
nahtnam has joined #ruby
mikeric has joined #ruby
devdazed has quit [Quit: Bye]
tunaCanBruh has joined #ruby
doodlehaus has joined #ruby
triple_b has joined #ruby
brainfartist has quit []
justin_pdx has joined #ruby
tunaCanBruh has quit [Ping timeout: 240 seconds]
adriancb has quit [Read error: Connection reset by peer]
rbennacer has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
adriancb has joined #ruby
_djbkd has quit [Remote host closed the connection]
tus has quit []
nicolastarzia has quit [Remote host closed the connection]
rbennacer has joined #ruby
pwnz0r has joined #ruby
doodlehaus has quit [Remote host closed the connection]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justin_pdx has quit [Quit: justin_pdx]
rbennacer has quit [Remote host closed the connection]
dandaman has joined #ruby
DavidDudson has joined #ruby
mrdtt has joined #ruby
n80 has quit [Quit: n80]
duncannz has joined #ruby
mrsolo has joined #ruby
triple_b has joined #ruby
pork_clips has joined #ruby
a5i has quit [Quit: Connection closed for inactivity]
_cake has quit [Ping timeout: 256 seconds]
Soda has quit [Remote host closed the connection]
bruno- has joined #ruby
bruno- is now known as Guest25188
_djbkd has joined #ruby
mrsolo has left #ruby ["Leaving"]
Sawbones has joined #ruby
ghostpl_ has joined #ruby
rbennacer has joined #ruby
rbennace_ has joined #ruby
sevvie has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
ghostpl_ has quit [Ping timeout: 264 seconds]
Guest25188 has quit [Ping timeout: 255 seconds]
rbennacer has quit [Ping timeout: 256 seconds]
dandaman has quit [Quit: Leaving.]
freerobby has quit [Quit: Leaving.]
justin_pdx has joined #ruby
yfeldblum has quit [Remote host closed the connection]
rbennace_ has quit [Ping timeout: 256 seconds]
sevvie has joined #ruby
commmmodo has quit [Quit: commmmodo]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Quit: Leaving]
Mon_Ouie has quit [Ping timeout: 272 seconds]
martianixor has joined #ruby
martianixor has quit [Max SendQ exceeded]
commmmodo has joined #ruby
martianixor has joined #ruby
_djbkd has quit [Quit: My people need me...]
oki has joined #ruby
kaiZen has quit [Quit: Computer has gone to sleep.]
sevvie has quit [Ping timeout: 255 seconds]
juanpablo_ has joined #ruby
jlast has joined #ruby
oki has quit [Ping timeout: 272 seconds]
ismaelga has quit [Remote host closed the connection]
beneggett has joined #ruby
dandaman has joined #ruby
deric_skibotn has quit [Ping timeout: 252 seconds]
qiffp has quit [Ping timeout: 252 seconds]
juanpablo_ has quit [Ping timeout: 245 seconds]
morenoh149 has quit [Ping timeout: 264 seconds]
ghr has joined #ruby
Qladstone has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
ismaelga has joined #ruby
fandi has quit [Remote host closed the connection]
justin_pdx has quit [Quit: justin_pdx]
ghr has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
sevvie has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dandaman has quit [Quit: Leaving.]
RegulationD has joined #ruby
ascarter has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
keen__________80 has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
keen__________79 has quit [Ping timeout: 265 seconds]
TheNet has quit [Remote host closed the connection]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
TheNet has joined #ruby
commmmodo has quit [Quit: commmmodo]
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jerematic has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
ismaelga has quit [Remote host closed the connection]
commmmodo has joined #ruby
<mozzarella> >> { '{}': 'cool' }
<eval-in_> mozzarella => {:"{}"=>"cool"} (https://eval.in/296553)
<mozzarella> when was this feature made available?
<havenwood> mozzarella: 1.9
<mozzarella> I mean 'str': instead of :'str' =>
<havenwood> mozzarella: ah, right
braincra- has quit [Quit: bye bye]
TheNet has quit [Remote host closed the connection]
TheNet has joined #ruby
<havenwood> mozzarella: 2.2
jerematic has joined #ruby
<mozzarella> tfw still on 2.1.5
<havenwood> 21>> { '{}': 'cool' }
<eval-in_> havenwood => /tmp/execpad-4fee965f4396/source-4fee965f4396:2: syntax error, unexpected ':', expecting => ... (https://eval.in/296554)
yfeldblum has joined #ruby
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has joined #ruby
braincrash has joined #ruby
Vile` has quit [Ping timeout: 252 seconds]
xploshioon has joined #ruby
jerematic has quit [Ping timeout: 255 seconds]
dandaman has joined #ruby
mattjbarlow has quit [Ping timeout: 265 seconds]
Vile` has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Guest98794 has quit [Changing host]
Guest98794 has joined #ruby
Guest98794 is now known as daynaskully
<havenwood> mozzarella: not sure i'll ever use it but nice to have it consistent
kyb3r_ has joined #ruby
arescorpio has quit [Excess Flood]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anaeem1 has joined #ruby
jonr22 has joined #ruby
dandaman has quit [Quit: Leaving.]
Aswebb_ has joined #ruby
mattjbarlow has joined #ruby
martianixor has quit [Quit: Leaving]
morenoh149 has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has quit [Ping timeout: 265 seconds]
JoshGlzBrk has joined #ruby
Aswebb_ has quit [Ping timeout: 272 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
dandaman has joined #ruby
kyb3r_ has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
Musashi007 has joined #ruby
dandaman has quit [Client Quit]
Vile` has quit [Read error: Connection reset by peer]
kyb3r_ has quit [Read error: Connection reset by peer]
Vile` has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
DavidDudson has joined #ruby
zachrab has joined #ruby
rhg135 has quit [Quit: ZNC - http://znc.in - making IRC 20% cooler]
rhg135 has joined #ruby
zachrab has quit [Ping timeout: 246 seconds]
drkyro has joined #ruby
_honning_ has quit [Ping timeout: 252 seconds]
phutchins has joined #ruby
commmmodo has quit [Quit: commmmodo]
drkyro has quit [Client Quit]
jenrzzz has joined #ruby
davedev24_ has quit [Ping timeout: 256 seconds]
dandaman has joined #ruby
jlast has quit [Remote host closed the connection]
davedev24_ has joined #ruby
JBreit has joined #ruby
bim has joined #ruby
boshhead has quit [Ping timeout: 264 seconds]
nii236 has quit [Ping timeout: 246 seconds]
bim has quit [Ping timeout: 264 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
Musashi007 has quit [Quit: Musashi007]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
RegulationD has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
nii236 has joined #ruby
dfinninger has quit [Remote host closed the connection]
swgillespie has joined #ruby
_maes_ has joined #ruby
skj3gg has joined #ruby
Renich has joined #ruby
_maes_ has quit [Read error: Connection reset by peer]
amystephen has quit [Quit: amystephen]
TheNet has quit [Remote host closed the connection]
David_Miller has quit [Ping timeout: 255 seconds]
adriancb has quit [Read error: Connection reset by peer]
<dopiee> Hey all I have a question
TheNet has joined #ruby
jerematic has joined #ruby
adriancb has joined #ruby
<dopiee> I'm viewing a gem on github and im quite not understanding something why in ASSETS the array has 2 fields... one for the file name and one for the file ?!??!
lolmaus has quit [Quit: Konversation terminated!]
<mozzarella> dopiee: sha1 hash
ghostpl_ has joined #ruby
mrdtt has quit [Quit: Textual IRC Client: www.textualapp.com]
dandaman has quit [Quit: Leaving.]
jerematic has quit [Ping timeout: 244 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
TheNet has quit [Remote host closed the connection]
TheNet has joined #ruby
ghostpl_ has quit [Ping timeout: 245 seconds]
psy_ has quit [Ping timeout: 272 seconds]
DerisiveLogic has quit [Remote host closed the connection]
mistermocha has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 265 seconds]
krz has quit [Ping timeout: 264 seconds]
josephcs has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
dandaman has joined #ruby
dandaman has quit [Read error: Connection reset by peer]
crantron has joined #ruby
oki has joined #ruby
skj3gg has joined #ruby
Megtastique has joined #ruby
xploshioon has quit [Quit: Leaving]
juanpablo_ has joined #ruby
krz has joined #ruby
hobodave has joined #ruby
keen__________80 has quit [Read error: Connection timed out]
tjohnson has quit [Quit: Connection closed for inactivity]
Sawbones has quit [Remote host closed the connection]
keen__________80 has joined #ruby
Megtastique has quit [Client Quit]
skj3gg has quit [Client Quit]
oki has quit [Ping timeout: 265 seconds]
PaulCapestany has joined #ruby
juanpablo_ has quit [Ping timeout: 246 seconds]
PaulCape_ has quit [Ping timeout: 256 seconds]
DEA7TH has joined #ruby
narcan has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
Sawbones has joined #ruby
Sawbones has quit [Client Quit]
red_horned_rihno has joined #ruby
GnuYawk has quit [Ping timeout: 256 seconds]
tmtwd has quit [Remote host closed the connection]
lys has quit [Quit: lys]
havenwood has quit []
mikecmpbll has quit [Quit: ciao.]
skj3gg has joined #ruby
Macaveli has joined #ruby
MasterPiece has quit [Remote host closed the connection]
agent_white has joined #ruby
ponga has joined #ruby
adriancb_ has joined #ruby
adriancb has quit [Read error: No route to host]
DavidDudson has joined #ruby
skmp has quit [Quit: Connection closed for inactivity]
adriancb_ has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
pontiki has joined #ruby
Macaveli has quit [Read error: No route to host]
red_horned_rihno is now known as LordDerp
Macaveli has joined #ruby
LordDerp is now known as red_horned_rihno
Rodya_ has quit [Quit: Leaving...]
adriancb has quit [Read error: Connection reset by peer]
Xiti has quit [Quit: Xiti]
adriancb has joined #ruby
mikeric has quit []
jonr22 has joined #ruby
Aswebb_ has joined #ruby
xploshioon has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
lesce has joined #ruby
Mives has quit [Quit: WeeChat 1.1.1]
adriancb has joined #ruby
piotrj has joined #ruby
arup_r has joined #ruby
AlexRussia has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
Aswebb_ has quit [Ping timeout: 272 seconds]
Cache_Money has joined #ruby
rbennacer has joined #ruby
ghostpl_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb_ has joined #ruby
jamesfordummies has joined #ruby
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby
DarkFoxDK has joined #ruby
kyb3r_ has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24_ has joined #ruby
ghostpl_ has quit [Ping timeout: 264 seconds]
rbennacer has quit [Ping timeout: 264 seconds]
davedev2_ has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
adriancb has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
piotrj has quit [Ping timeout: 264 seconds]
adriancb_ has quit [Read error: Connection reset by peer]
zachrab has joined #ruby
<TheNet> jamesfordummies: actually I've been interested in that too, if you find out anything more let me know!
<jamesfordummies> will do
<jamesfordummies> prospects are grim, atm
jenrzzz has quit [Ping timeout: 255 seconds]
adriancb has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
adriancb has joined #ruby
Soda has joined #ruby
beneggett has joined #ruby
zachrab has quit [Ping timeout: 245 seconds]
Channel6 has quit [Quit: Leaving]
beneggett has quit [Client Quit]
lemur has joined #ruby
oki has joined #ruby
davedev2_ has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
davedev24_ has quit [Ping timeout: 256 seconds]
juanpablo_ has joined #ruby
adriancb_ has joined #ruby
deol has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
skj3gg has left #ruby ["welp, see you later."]
oki has quit [Ping timeout: 256 seconds]
Xiti has joined #ruby
<jamesfordummies> the script in that article just forces VERIFY_PEER
<jamesfordummies> i could be wrong, but it looks like if you use_ssl, you’re safe
juanpablo_ has quit [Ping timeout: 256 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
adriancb has joined #ruby
adriancb_ has quit [Read error: Connection reset by peer]
Cache_Money has left #ruby [#ruby]
Cache_Money has joined #ruby
pwnz0r has quit [Remote host closed the connection]
diegoviola has joined #ruby
SolarSai_ has joined #ruby
lolmaus has joined #ruby
Trynemjoel has quit [Ping timeout: 272 seconds]
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
SolarSailor has quit [Ping timeout: 244 seconds]
User458764 has joined #ruby
bMalum has joined #ruby
Trynemjoel has joined #ruby
Spami has joined #ruby
hvxgr has quit [Ping timeout: 244 seconds]
apeiros_ has joined #ruby
codecop has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
arup_r has quit [Remote host closed the connection]
adriancb has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
pontiki has quit [Quit: gnite all]
josephcs has quit [Ping timeout: 244 seconds]
last_staff has joined #ruby
tagrudev has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
<godd2> jamesfordummies perhaps using Faraday instead of vanilla net/http can solve your problem
Hirzu has joined #ruby
<godd2> something to look into, anyway.
adriancb has joined #ruby
<jamesfordummies> i’m just trying to understand if there is a problem godd2
<jamesfordummies> but will look into that, thanks
Hirzu_ has joined #ruby
Morkel has joined #ruby
lkba has joined #ruby
piotrj has joined #ruby
ascarter has joined #ruby
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<certainty> moin ruby hackers
anaeem1 has quit [Quit: Leaving...]
Hirzu has quit [Ping timeout: 244 seconds]
adriancb has quit [Read error: Connection reset by peer]
<flughafen> Phage: moin certainty hacker
<flughafen> err
<flughafen> just certainty
<certainty> flughafen: sup
<flughafen> certainty: just got into work, sup with you
adriancb has joined #ruby
<certainty> same here
bMalum has quit [Quit: bMalum]
<certainty> waiting for the water for my tea
deol has joined #ruby
* flughafen is debugging someone elses python code.
apeiros_ has quit [Remote host closed the connection]
* sevenseacat is sitting waiting patiently for beer o'clock
martinbmadsen has joined #ruby
andikr has joined #ruby
<flughafen> i should alias pythong as python because I keep typing that in
bruno- has joined #ruby
<certainty> sevenseacat: it sure is beer o'clock somewhere on the planet ;)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bruno- is now known as Guest4135
<flughafen> in germany that for me and certainty that is in 30 minutes
<certainty> flughafen: do you have a github/bitbucket?
<certainty> <- spanner
<certainty> flughafen: you work for SUSE?
<flughafen> certainty: yes
adriancb has quit [Read error: Connection reset by peer]
adriancb_ has joined #ruby
<certainty> interesting. the distribution with the funny green sausage dog as their maskot
<flughafen> haha
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest4135 has quit [Ping timeout: 256 seconds]
<certainty> :)
cnj is now known as chinmay
Hijiri has joined #ruby
Hobogrammer_ has quit [Ping timeout: 245 seconds]
<flughafen> certainty: are you still waiting for emacs to start up?
<wasamasa> lol
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flughafen> moin wasamasa
adriancb_ has quit [Read error: Connection reset by peer]
* wasamasa is progressing pretty well on making emacs display zero seconds of init time
chinmay is now known as cnj
<certainty> flughafen: haha, nope
adriancb has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
<flughafen> it takes 6 seconds for my vim to quit! take that emacs
<wasamasa> wat
<flughafen> it's an issue with rxvt-unicode and vim...
maximski has joined #ruby
<wasamasa> sounds pretty wrong
<flughafen> if i use xterm it shuts down instantly
<flughafen> or even on my laptop with urxvt
<certainty> :q! and vim is like. "what? really? i just started to rock. ok ... will shut down"
CorySimmons has joined #ruby
ptrrr has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
hvxgr has joined #ruby
martinbmadsen has quit [Ping timeout: 264 seconds]
TheNet has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
TheNet has quit [Client Quit]
mkaesz has joined #ruby
<flughafen> waaaaaah, sounds like someone is jelly
<certainty> ;)
adriancb has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
wallerdev has joined #ruby
jamesfordummies has quit [Quit: jamesfordummies]
adriancb has joined #ruby
quazimodo has quit [Ping timeout: 256 seconds]
<certainty> i guess bitbucket is not a big thing in the ruby world
<flughafen> or any world?
<flughafen> haha
mkaesz has quit [Ping timeout: 264 seconds]
anaeem1_ has joined #ruby
bal has joined #ruby
narcan has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb_ has joined #ruby
flip_digits has quit []
SolarSai_ has quit [Quit: Textual IRC Client: www.textualapp.com]
narcan has quit [Client Quit]
agent_white has quit [Quit: brb]
agent_white has joined #ruby
amundj has quit [Ping timeout: 256 seconds]
amundj has joined #ruby
livingstn has quit []
adriancb_ has quit [Read error: Connection reset by peer]
maximski has quit []
JoshGlzBrk has joined #ruby
adriancb has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
DerisiveLogic has joined #ruby
rdark has joined #ruby
wicope has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
ZJvandeWeg1 has joined #ruby
jshultz has quit [Quit: Connection closed for inactivity]
maximski has joined #ruby
fabrice31 has joined #ruby
lolmaus has joined #ruby
kp666 has joined #ruby
ZJvandeWeg has quit [Ping timeout: 272 seconds]
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
keelerm has quit [Ping timeout: 245 seconds]
keelerm has joined #ruby
DerisiveLogic has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
nii236 has quit [Ping timeout: 264 seconds]
adriancb has quit [Read error: Connection reset by peer]
MatthewsFace has quit [Remote host closed the connection]
Aswebb_ has joined #ruby
aganov has joined #ruby
adriancb has joined #ruby
benatkin has quit [Ping timeout: 245 seconds]
chihhsin has quit [Quit: leaving]
benatkin has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
adriancb has quit [Read error: Connection reset by peer]
SouL_ has quit [Remote host closed the connection]
chihhsin has joined #ruby
wallerdev has quit [Quit: wallerdev]
<godd2> Where else am I gonna put all my free private repos?
chihhsin has quit [Client Quit]
adriancb has joined #ruby
sarkis has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
<agent_white> godd2: Bitbucket?
<godd2> yesh
<certainty> flughafen: heh
* certainty likes bitbucket
* agent_white has never tried it
<agent_white> :P
chihhsin has joined #ruby
<certainty> probably because i like/use mercurial. but they of course also support git
<flughafen> they give you free private repos, which is nice
chihhsin has quit [Client Quit]
<flughafen> certainty: do you guys us mercurial at work?
<certainty> flughafen: yes
chihhsin has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
adriancb has joined #ruby
jenrzzz has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
Aswebb_ has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
hs366 has joined #ruby
CustosLimen has quit [Ping timeout: 264 seconds]
ghostpl_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
polysics has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
strixd has joined #ruby
nii236 has joined #ruby
ghostpl_ has quit [Ping timeout: 245 seconds]
zachrab has joined #ruby
lemur has quit [Remote host closed the connection]
narcan has joined #ruby
mkaesz has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
zachrab has quit [Ping timeout: 245 seconds]
aphprentice has joined #ruby
oki has joined #ruby
User458764 has joined #ruby
Soda has quit [Remote host closed the connection]
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
juanpablo_ has joined #ruby
alex88 has joined #ruby
ptrrr has quit [Quit: ptrrr]
monod has joined #ruby
Soda has joined #ruby
Bounga has joined #ruby
selu has joined #ruby
oki has quit [Ping timeout: 256 seconds]
chemiazpolski has joined #ruby
Qladstone has joined #ruby
juanpablo_ has quit [Ping timeout: 244 seconds]
adriancb has quit [Read error: Connection reset by peer]
elaptics is now known as elaptics_away
adriancb has joined #ruby
CustosLimen has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
CorySimmons has quit [Remote host closed the connection]
CorySimmons has joined #ruby
bim has joined #ruby
danjordan has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
quazimodo has joined #ruby
adriancb has joined #ruby
monod has quit [Quit: Sto andando via]
EasyCo has quit [Quit: Connection closed for inactivity]
bim has quit [Ping timeout: 255 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinkensabe has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
CorySimmons has quit [Quit: Bye!]
adriancb has joined #ruby
CorySimmons has joined #ruby
kalusn has joined #ruby
Beoran_ has quit [Ping timeout: 265 seconds]
xploshioon has quit [Quit: Leaving]
elfuego has joined #ruby
pretodor has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
pretodor has quit [Max SendQ exceeded]
roolo has joined #ruby
pretodor has joined #ruby
adriancb has joined #ruby
pretodor has quit [Remote host closed the connection]
oki has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
leafybasil has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 240 seconds]
jud has quit [Ping timeout: 252 seconds]
jerematic has joined #ruby
_Andres has joined #ruby
amclain has quit [Quit: Leaving]
senayar has joined #ruby
bruno- has joined #ruby
Phage has quit [Quit: Apparently I have better things to do than IRC.]
sarkis has joined #ruby
bruno- is now known as Guest35545
Beoran_ has joined #ruby
jerematic has quit [Ping timeout: 252 seconds]
red_horned_rihno has quit [Ping timeout: 255 seconds]
The_Phoenix has joined #ruby
ghr has joined #ruby
Guest35545 has quit [Ping timeout: 245 seconds]
Guest65 has joined #ruby
sarkis has quit [Ping timeout: 252 seconds]
Hirzu_ has quit [Read error: Connection reset by peer]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Hirzu has joined #ruby
Advocation has joined #ruby
joonty has joined #ruby
alkoma has quit [Ping timeout: 264 seconds]
DEA7TH has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
AlexRussia has quit [Ping timeout: 272 seconds]
MasterPiece has joined #ruby
Hirzu_ has joined #ruby
red_horned_rihno has joined #ruby
chthon has joined #ruby
multi_io_ has joined #ruby
erichmenge has quit [Ping timeout: 240 seconds]
Phage has joined #ruby
red_horned_rihno has quit [Max SendQ exceeded]
davidcelis has quit [Ping timeout: 246 seconds]
Hirzu has quit [Ping timeout: 250 seconds]
red_horned_rihno has joined #ruby
oo_ has quit [Remote host closed the connection]
multi_io has quit [Ping timeout: 245 seconds]
crazed has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
davidcelis has joined #ruby
Kamilion has quit [Ping timeout: 255 seconds]
erichmenge has joined #ruby
AlexRussia has joined #ruby
ton31337 has left #ruby [#ruby]
bukington has joined #ruby
marr has joined #ruby
sevenseacat has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 265 seconds]
roshanavand has joined #ruby
maximski has quit []
Takle has joined #ruby
<shevy> you pythonista you
yfeldblum has joined #ruby
ghostpl_ has joined #ruby
ghr has quit [Remote host closed the connection]
davidhq has joined #ruby
ghr has joined #ruby
lysw123 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
nii236 has quit [Quit: WeeChat 1.1.1]
yfeldblu_ has joined #ruby
startupality has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
Igneous has quit [Ping timeout: 255 seconds]
nii236 has joined #ruby
mikecmpbll has joined #ruby
<certainty> pythongista?
<certainty> piethong
bim has joined #ruby
nii236 has quit [Client Quit]
dixie_ has joined #ruby
<shevy> mercurial users
detail_pratique has quit [Remote host closed the connection]
dixie_ has quit [Remote host closed the connection]
<flughafen> haha, shut it!
detail_pratique has joined #ruby
<flughafen> i'm worse than a pythonista, as I write java too :(
bim has quit [Ping timeout: 272 seconds]
fantazo has joined #ruby
<certainty> shevy hehe
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
red_horned_rihno has quit [Ping timeout: 250 seconds]
adriancb has quit [Read error: Connection reset by peer]
coderhs has joined #ruby
Renich has quit [Quit: leaving]
Deele has joined #ruby
adriancb has joined #ruby
nettoweb has joined #ruby
<flughafen> i feel like i'm about to get beat up ;)
Spami has joined #ruby
jonr22 has joined #ruby
nii236 has joined #ruby
decoponio has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
fantazo has quit [Quit: Verlassend]
adriancb has joined #ruby
Kamilion has joined #ruby
<certainty> flughafen: nah, don't worry ;)
jonr22 has quit [Ping timeout: 244 seconds]
<flughafen> you ruby guys are so much nicer than the python guys
<godd2> flughafen glad to hear it :)
<certainty> flughafen: indeed. i'm not a ruby guy though
<godd2> we have a saying here "Matz is nice so we are nice"
elaptics_away is now known as elaptics
commmmodo has joined #ruby
<aep> can i set exceptions in a thread to be fatal?
<aep> currently they seemt o be ignored\
adriancb has quit [Read error: Connection reset by peer]
red_horned_rihno has joined #ruby
<godd2> aep you need to set Thread.abort_on_exception to true
adriancb has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
<godd2> scroll down to Threads and Exceptions
<aep> thanks
User458764 has joined #ruby
* certainty is with apeiros here, in the hope that Thread.abor_on_exceptions will default to true some day
<certainty> Thread.abort_on_exception, even
reinaldob has joined #ruby
<godd2> we could make abhor_on_exception and have it scoff at you
Guest20 has joined #ruby
tvw has joined #ruby
Guest20 has quit [Client Quit]
<flughafen> how does threading work in ruby? does ruby have it's own thing like the crappy python gil?
rkgudboy has joined #ruby
hanmac1 has joined #ruby
<shevy> where do you guys put "extend Bla" statements? near include statements? or on the bottom of the module/class
<godd2> flughafen Ruby has a global interpreter lock, yes
<flughafen> okie dokie
<certainty> shevy: usually before includes
<shevy> flughafen you can spawn multiple Thread.new and sync through mutexes
<godd2> flughafen however jruby and rubinius do not. they support native threads
Aswebb_ has quit [Ping timeout: 265 seconds]
<shevy> certainty ack! why before?
<hanmac1> shevy if possible i do it at the head of the module/class near/after includes
DaniG2k has joined #ruby
<shevy> phew hanmac1 is my man
<shevy> certainty you are an odd one!
<avril14th> shevy: at the top with include statements why?
<certainty> shevy: i forward the question to hanmac1. whay after?
adriancb_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
<certainty> why, even
febuiles has joined #ruby
<shevy> avril14th I discovered old code where I consistently put extend near the end
<shevy> whay wat!
<avril14th> I had this idea too
Qladstone has quit [Remote host closed the connection]
<avril14th> before #prepend
<shevy> well, extend strikes me as similar to include right?
<shevy> so if that is the case, then it should be grouped near includes
<avril14th> that's often the case
<agent_white> Threading?! Only forks help with spaghetti!
<godd2> and of course, e comes before i in the alphabet, so extends first, includes later
<febuiles> hello, anyone has an idea of who's behind the Google Summer of Code efforts for Ruby?
Zai00 has joined #ruby
<avril14th> flughafen: also check Fiber class for collaborative / concurrent work in ruby
<shevy> febuiles the Cubans
zachrab has joined #ruby
mrfoto has joined #ruby
<godd2> febuiles I believe the SciRuby project is most involved
jimms has joined #ruby
<certainty> hanmac1: why do you put extend after include?
<hanmac1> certainty: i usaly do that in module ABC; includes <>; extends <>; <code> end ... imo thats more orderd (also because extends are later in the chain than includes)
<febuiles> godd2: thank you!
imanzarrabian has joined #ruby
<certainty> hanmac1: but the result is the same, correct?
<flughafen> bbiab
Aswebb_ has joined #ruby
adriancb has joined #ruby
<hanmac1> certainty: thats why i said "if possible"
adriancb_ has quit [Read error: Connection reset by peer]
<certainty> shevy: the reason i do them before include is because e goes before i. (Under the assumption that the order doesn't matter to ruby)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lysw123 has quit [Ping timeout: 256 seconds]
Advocation has quit [Quit: Advocation]
<certainty> hanmac1: alright
timonv has joined #ruby
<shevy> certainty hehe
<shevy> I am with hanmac1 here!
<certainty> shevy: come on
<shevy> you alphabet junkies you
<shevy> see this is so cool in ruby
<shevy> there is more than one way
<shevy> there is also more than one community - look at our enemies at #ruby-lang
<shevy> which other programming language has that?
zachrab has quit [Ping timeout: 244 seconds]
<hanmac1> sometimes the order of the include and extends are important, thats why i said "if possible" ... sometimes you must do an extend before you can include the other stuff
jhass has quit [Quit: Bye]
<wasamasa> shevy: scheme has lots of small communities
<certainty> indeed
TheMoonMaster has quit [Quit: Later!]
<shevy> scheme lacks one thing compared to ruby
<wasamasa> there's a good amount of lisp-related channels on freenode
<certainty> shevy: which is?
<shevy> matz
<wasamasa> lol
<wasamasa> a benevolent dictator for life?
<shevy> well ok perl has that and python has that too
<certainty> we have felix
<shevy> the cat?
<agent_white> python, ew
<wasamasa> the cat would have better web design skills
<shevy> a programming language designed by a cat ...
mengu has quit [Remote host closed the connection]
<shevy> lol wasamasa
<shevy> designing isn't that easy!
<certainty> we're not talking about software design here
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
juanpablo_ has joined #ruby
oo_ has joined #ruby
dtordable has joined #ruby
mrfoto has quit []
<shevy> why the name chicken
<wasamasa> that's explained somewhere later
dtordable has quit [Changing host]
dtordable has joined #ruby
<shevy> certainty I am happy when I use <div> with padding and margin
<aep> is there a mechanism to start N threads with a block and wait for them to complete?
<wasamasa> "I had a plastic toy of Feathers McGraw on my desk, the evil penguin (disguised as a chicken!) from the Wallace and Gromit movie, “The Wrong Trousers.”"
Feyn has joined #ruby
<wasamasa> felix sure likes the baddies in movies
Takle has quit [Remote host closed the connection]
SOLDIERz has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
Deele has joined #ruby
juanpablo_ has quit [Ping timeout: 264 seconds]
adriancb has quit [Read error: Connection reset by peer]
<certainty> felix is a genius. and probably not a human
<wasamasa> I can confirm that he's a human
<certainty> ok that he appears to be human
<certainty> then
Pupeno has joined #ruby
adriancb has joined #ruby
<wasamasa> I've talked with him about emacs a bit and found out that even felix has his gripes with it
Xeago_ has joined #ruby
<wasamasa> "I don't want to install these new-fangled new releases!"
<Xeago_> bah #python requires registration :|
codecop has quit [Remote host closed the connection]
<shevy> Xeago_ haha!
ghostpl_ has joined #ruby
<Xeago_> shevy: you do python right? can I use a with statement to automatically close my socket?
<shevy> hey
<shevy> I am a ruby guy by heart
<Xeago_> ditto :|
<wasamasa> lol
<Xeago_> I don't know whether I'm invoking it incorrectly or it just doesn't work
<wasamasa> what is it with python questions in here lately
kith has quit [Quit: kith]
digitalextremist has joined #ruby
kith has joined #ruby
DouweM has joined #ruby
jhass has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
<agent_white> They are jealous of how awesome we are.
<wasamasa> they?
Pupeno has quit [Ping timeout: 265 seconds]
adriancb has quit [Read error: Connection reset by peer]
davedev2_ has quit [Remote host closed the connection]
<agent_white> the python-questionistas coming in here
razieliyo has joined #ruby
razieliyo has joined #ruby
senayar has quit [Remote host closed the connection]
adriancb has joined #ruby
nii236 has quit [Quit: WeeChat 1.1.1]
elfuego has quit [Quit: elfuego]
rohitkashyap has joined #ruby
xrlabs has joined #ruby
<xrlabs> join #ada
<xrlabs> oops
<wasamasa> lol
dEPy has joined #ruby
<wasamasa> how dare you show interest in a better specified language than ruby!?
DouweM has quit [Ping timeout: 264 seconds]
rkgudboy has quit [Ping timeout: 246 seconds]
<xrlabs> it's like my first love on junior high, how can I not
<agent_white> A better specified language has yet to be created!
sankaber has joined #ruby
<agent_white> ;D
<xrlabs> I didn't mean to upset you xD
adriancb_ has joined #ruby
Takle has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
<agent_white> It's OK, I'm only furious.
<agent_white> ;)
<godd2> That's your secret. You're always furious.
terlar has quit [Ping timeout: 264 seconds]
startupality has quit [Quit: startupality]
Advocation has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
adriancb_ has quit [Read error: Connection reset by peer]
michael_mbp has quit [Quit: ZNC - http://znc.sourceforge.net]
senayar has joined #ruby
<agent_white> Someone has to be!
adriancb has joined #ruby
fgo has joined #ruby
terlar has joined #ruby
ypasmk has joined #ruby
<digitalextremist> Does anyone know if another language has the "nearly everything's an Object" way of being that Ruby does?
<wasamasa> ruby stole that from smalltalk
jerematic has joined #ruby
<digitalextremist> wasamasa, thanks -- good to know! Any others like that?
maximski has joined #ruby
leafybasil has joined #ruby
SOLDIERz_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
<wasamasa> I used to believe that python does this
adriancb has joined #ruby
mkaesz has quit [Ping timeout: 246 seconds]
Timgauthier has joined #ruby
Deele has joined #ruby
bruno- has joined #ruby
gfawcettpq has joined #ruby
xrlabs has quit [Ping timeout: 255 seconds]
bruno- is now known as Guest48991
sarkis has joined #ruby
godd2 has quit [Ping timeout: 255 seconds]
jerematic has quit [Ping timeout: 264 seconds]
SOLDIERz has quit [Ping timeout: 256 seconds]
<certainty> digitalextremist: i thing IO fits that bill
<certainty> think
<certainty> damn
mog_ has joined #ruby
<digitalextremist> IO? IO.js?
imanzarrabian has quit [Ping timeout: 246 seconds]
adriancb has quit [Read error: Connection reset by peer]
<certainty> digitalextremist: http://iolanguage.org/
adriancb has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
Xeago_ has quit [Ping timeout: 246 seconds]
SOLDIERz_ has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
<digitalextremist> thank you certainty
SOLDIERz_ has joined #ruby
Guest48991 has quit [Ping timeout: 265 seconds]
sarkis has quit [Ping timeout: 240 seconds]
fgo has quit [Ping timeout: 256 seconds]
chipotle has quit [Quit: cheerio]
denwo has quit [Remote host closed the connection]
<hanmac1> digitalextremist: in ruby its funny because even the singleton classes of objects can have singleton classes ;P
Stalkr_ has joined #ruby
Takle has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
wottam has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
DarkFoxDK has quit [Quit: ZNC - http://znc.sourceforge.net]
adriancb has joined #ruby
<digitalextremist> wasamasa, certainty, hanmac1 I appreciate your answers!
User458764 has joined #ruby
dANO__ has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
rohitkashyap has quit [Ping timeout: 272 seconds]
maximski has quit []
diegoviola has quit [Ping timeout: 240 seconds]
<certainty> digitalextremist: yw
adriancb has quit [Read error: Connection reset by peer]
Deele has joined #ruby
adriancb has joined #ruby
<hanmac1> shevy: look ;P
<hanmac1> >> class Fixnum; def each; Math.log(self,2).ceil.times {|i| yield self[i]}; self; end; include Enumerable;end; 6.to_a
<eval-in_> hanmac1 => [0, 1, 1] (https://eval.in/296663)
oo_ has quit [Remote host closed the connection]
diego3 has joined #ruby
<certainty> :)
Takle has quit [Remote host closed the connection]
diego3 has quit [Changing host]
diego3 has joined #ruby
diego3 is now known as diegoviola
Mia has quit [Read error: Connection reset by peer]
rodfersou has joined #ruby
Mia has joined #ruby
ChoiKyuSang has quit [Read error: Connection reset by peer]
imanzarrabian has joined #ruby
<hanmac1> specially 6[2] #=> 1 is very funny imo ;P
ChoiKyuSang has joined #ruby
jottr has joined #ruby
oo_ has joined #ruby
roshanavand has quit [Remote host closed the connection]
prqlwf has joined #ruby
adriancb_ has joined #ruby
charliesome has quit [Quit: zzz]
Takle_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
mkaesz has joined #ruby
SOLDIERz__ has joined #ruby
SOLDIERz__ has quit [Client Quit]
joonty has quit [Quit: joonty]
charliesome has joined #ruby
zachrab has joined #ruby
SOLDIERz_ has quit [Ping timeout: 245 seconds]
davedev24_ has joined #ruby
workmad3 has joined #ruby
adriancb_ has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
oo_ has quit [Quit: Leaving...]
senayar has quit [Remote host closed the connection]
adriancb has joined #ruby
senayar has joined #ruby
ypasmk has quit [Quit: ypasmk]
Spami_ has joined #ruby
serivich has joined #ruby
zachrab has quit [Ping timeout: 246 seconds]
joonty has joined #ruby
Timgauthier is now known as timgauthier_away
CAP5562 has joined #ruby
dtordable has quit [Ping timeout: 245 seconds]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami has quit [Ping timeout: 246 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has quit [Ping timeout: 264 seconds]
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
jenrzzz has joined #ruby
polysics has quit [Remote host closed the connection]
fabrice31 has quit [Remote host closed the connection]
commmmodo has quit [Quit: commmmodo]
CorySimmons has quit [Quit: Bye!]
jenrzzz has quit [Ping timeout: 245 seconds]
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
Qladstone has joined #ruby
narcan has joined #ruby
_Andres has joined #ruby
prasselpikachu has quit [Ping timeout: 246 seconds]
<gregf_> i can do this in ruby: a = [1,2,3]; b = [*a,4]. in python i ended up using: itertools.chain(*[curr_data, ['_id']])
phale has joined #ruby
<phale> hi, i read that in order to update my ruby version to 2.0 i need rvm
nettoweb has joined #ruby
<gregf_> no wonder they say: you need to do things in only 1 way
<phale> i dont have rvm though
CAP5562 has quit [Quit: • IRcap • 8.72 •]
spider-mario has joined #ruby
CAP5562 has joined #ruby
_Andres has quit [Client Quit]
CAP5562 has quit [Client Quit]
prasselpikachu has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
mengu has joined #ruby
hirogen has joined #ruby
<hirogen> anyone work on the ruby helpdesk
dtordable has joined #ruby
<hirogen> we logged a ticket to get our lience for a user but they are taking ages?
<hirogen> uk
adriancb has joined #ruby
nii236 has joined #ruby
Axy has quit [Read error: Connection reset by peer]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maximski has joined #ruby
coderhs has quit [Remote host closed the connection]
<phale> how do i update ruby on linux..
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
apeiros_ has joined #ruby
trufflesnout has joined #ruby
trufflesnout has quit [Client Quit]
<canton7> phale, depends on how you installed it
mjuszczak has joined #ruby
<lxsameer> phale: use a version manager like rbenv or rvm
<phale> canton7: it came with debian
Takle_ has quit [Remote host closed the connection]
<canton7> phale, use debian to update it then. Or switch to rbenv if you want something newer than what debian offer
<phale> can i just do
<phale> apt-get install ruby2.0
<phale> or something
<canton7> dunno
<canton7> ask Debian
<phale> ok
dtordable has quit [Ping timeout: 250 seconds]
Axy has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
Axy has joined #ruby
_Andres has joined #ruby
Mia has quit [Quit: Leaving]
oo_ has joined #ruby
adriancb_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
ypasmk has joined #ruby
Takle has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
adriancb_ has quit [Read error: Connection reset by peer]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
jimms has quit [Read error: Connection reset by peer]
jimms has joined #ruby
adriancb has joined #ruby
Dolphi has joined #ruby
jonr22 has joined #ruby
mathie has quit [Quit: Quitting...]
Zai00 has quit [Quit: Zai00]
<phale> apparently i have to use jessie
serivich has quit [Ping timeout: 256 seconds]
<phale> since wheezy is incompatible with all ruby gems
Dolphi has quit [Client Quit]
chthon has quit [Ping timeout: 255 seconds]
jimms has quit [Read error: Connection reset by peer]
TheNumb is now known as OpenRC
bruno- has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
bruno- is now known as Guest28177
jonr22 has quit [Ping timeout: 256 seconds]
adriancb has joined #ruby
sarkis has joined #ruby
User458764 has joined #ruby
doodlehaus has joined #ruby
fgo has joined #ruby
n008f4g_ has joined #ruby
kalusn has quit [Remote host closed the connection]
DouweM has joined #ruby
dtordable has joined #ruby
dtordable has quit [Changing host]
dtordable has joined #ruby
<gr33n7007h> Phage, if your using wheezy default is 1.9.3
<Phage> phale: ^
<gr33n7007h> which is eol
<phale> why is my name strangely similar to yours
<phale> gr33n7007h: i know
wald0 has joined #ruby
<flughafen> w00t, my keyboard arrived!
Guest28177 has quit [Ping timeout: 264 seconds]
sarkis has quit [Ping timeout: 245 seconds]
<Phage> phale: I do not know the answer to that question.
adriancb has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 246 seconds]
adriancb has joined #ruby
kalusn has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
morenoh149 has quit [Ping timeout: 255 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mjuszczak has quit []
User458764 has joined #ruby
chthon has joined #ruby
prqlwf has quit [Ping timeout: 240 seconds]
<workmad3> phale: please only PM after asking permission
<phale> okay, sorry.
adriancb has quit [Read error: Connection reset by peer]
Hirzu_ has quit [Remote host closed the connection]
adriancb has joined #ruby
jqcehm has joined #ruby
Hirzu has joined #ruby
narcan has joined #ruby
quazimodo has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo_ has joined #ruby
DouweM has quit [Quit: Leaving...]
plashchynski has joined #ruby
withnale__ has joined #ruby
mjuszczak has joined #ruby
imanzarrabian has quit [Quit: Textual IRC Client: www.textualapp.com]
adriancb_ has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
juanpablo_ has quit [Ping timeout: 256 seconds]
OpenRC is now known as TheNumb
_Andres has quit [Quit: jazz]
Qladstone has quit [Remote host closed the connection]
phale has left #ruby [#ruby]
mjuszczak has quit [Client Quit]
piotrj has quit [Remote host closed the connection]
<shevy> those poor debian souls
DouweM has joined #ruby
chth0n has joined #ruby
piotrj has joined #ruby
chth0n has quit [Read error: Connection reset by peer]
jerematic has joined #ruby
adriancb_ has quit [Read error: Connection reset by peer]
chth0n has joined #ruby
serivich has joined #ruby
adriancb has joined #ruby
_Andres has joined #ruby
chth0n has quit [Client Quit]
Qladstone has joined #ruby
chthon has quit [Ping timeout: 252 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Timgauthier has joined #ruby
jerematic has quit [Ping timeout: 240 seconds]
jud has joined #ruby
sankaber has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
mjuszczak has joined #ruby
Czj has joined #ruby
plashchynski has quit [Quit: plashchynski]
mjuszczak has quit [Client Quit]
doodlehaus has quit [Remote host closed the connection]
mjuszczak has joined #ruby
bruno-_ has joined #ruby
User458764 has joined #ruby
SOLDIERz__ has joined #ruby
prasselpikachu has quit [Ping timeout: 246 seconds]
jimms has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
triple_b has joined #ruby
adriancb has joined #ruby
prasselpikachu has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
Hirzu has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Hirzu has joined #ruby
triple_b_ has joined #ruby
adriancb_ has joined #ruby
doodlehaus has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
triple_b has quit [Ping timeout: 256 seconds]
drkush has quit [Ping timeout: 252 seconds]
sandelius has joined #ruby
Czj has left #ruby [#ruby]
bim has joined #ruby
trampi has quit [Ping timeout: 245 seconds]
adriancb_ has quit [Read error: Connection reset by peer]
thiagovsk has joined #ruby
adriancb has joined #ruby
jottr has quit [Ping timeout: 265 seconds]
senayar has joined #ruby
Takle has quit [Remote host closed the connection]
maximski has quit []
plashchynski has joined #ruby
tvw has quit [Ping timeout: 240 seconds]
adriancb has quit [Read error: Connection reset by peer]
otisZart has joined #ruby
monod has joined #ruby
adriancb has joined #ruby
sdothum has joined #ruby
digitalextremist has quit [Ping timeout: 256 seconds]
mkaesz has quit [Ping timeout: 245 seconds]
drkush has joined #ruby
_honning_ has joined #ruby
Takle has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
multi_io_ is now known as multi_io
Aswebb_ has quit [Remote host closed the connection]
r3dk1nG has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
adriancb has joined #ruby
DaniG2k has quit [Ping timeout: 246 seconds]
<shevy> we should warn them
<Timgauthier> no
polysics has joined #ruby
ypasmk has quit [Quit: ypasmk]
Aswebb_ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Shazaum has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
Shazaum has quit [Remote host closed the connection]
adriancb has joined #ruby
Shazaum has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
riotjon__ has quit [Read error: No route to host]
dtordable has quit [Quit: • IRcap • 8.72 •]
claptor has quit [Quit: this channel is bakas]
riotjone_ has joined #ruby
fabrice31_ has joined #ruby
zachrab has joined #ruby
dtordable has joined #ruby
apeiros_ has quit [Remote host closed the connection]
anaeem1_ has quit [Ping timeout: 264 seconds]
nfk has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
adriancb has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
Hirzu has quit [Ping timeout: 250 seconds]
zachrab has quit [Ping timeout: 252 seconds]
plashchynski has quit [Quit: plashchynski]
riotjone_ has quit [Remote host closed the connection]
fgo has joined #ruby
Hirzu has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
phale has joined #ruby
jenrzzz has joined #ruby
kobain has joined #ruby
avril14th has quit [Remote host closed the connection]
Takle has joined #ruby
mengu has quit [Ping timeout: 240 seconds]
fgo has quit [Ping timeout: 264 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Feyn has quit [Quit: Leaving]
n80 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Mon_Ouie has quit [Ping timeout: 272 seconds]
<Qladstone> warn what?
ypasmk has joined #ruby
charliesome has quit [Quit: zzz]
Takle has quit [Remote host closed the connection]
willharrison has joined #ruby
roshanavand has joined #ruby
diegoviola has quit [Quit: WeeChat 1.1.1]
willharrison has quit [Client Quit]
anarang has joined #ruby
aclearman037 has joined #ruby
agarie has joined #ruby
mengu has joined #ruby
<Qladstone> I can't have a return statement in a block?
lanemeyer has quit [Ping timeout: 246 seconds]
spyderman4g63 has joined #ruby
joonty has quit [Quit: joonty]
spyderma_ has joined #ruby
mjuszczak has quit []
mib_mib has joined #ruby
adriancb has joined #ruby
<mib_mib> i have a text string that i want to 'split with index' - is there a way to do this?
<mib_mib> aside from just having an external counter
<mib_mib> i.e.
<hanmac1> Qladstone: i think yes you can, depend what are you trying to do
<Qladstone> hanmac1: oh yes I tried it, it works. thanks (:
<hanmac1> mib_mib: use split and then do each_with_index ?
<mib_mib> 'my@string@is@cool'.split('@').with_index {|word,i| ... }
spyderman4g63 has quit [Ping timeout: 264 seconds]
Zai00 has joined #ruby
<mib_mib> hanmac1 - but split doesn't return an enumerator right? so its going to read in the entire array?
<hanmac1> mib_mib: yes, thats why you need each_with_index
wald0 has quit [Ping timeout: 246 seconds]
<mib_mib> hanmac1 - wait, if you do .split.each_with_index then it returns just an enumerator? doesnt it first split, and then return an enumerator on that object?
spyderma_ has quit [Read error: Connection reset by peer]
<mib_mib> so its essentially doing .split
<mib_mib> and then an enumerator over it
<mib_mib> so you are iterating it twice?
lesce has quit [Ping timeout: 246 seconds]
adriancb has quit [Ping timeout: 244 seconds]
<mib_mib> the real question is how to get .split to return an enumerator...
wald0 has joined #ruby
<hanmac1> mib_mib: with split i think you cant
<mib_mib> mmmm k
mostlybadfly has joined #ruby
tjohnson has joined #ruby
rbennacer has joined #ruby
nettoweb has joined #ruby
monod has quit [Quit: Sto andando via]
<phale> what are triplets
<phale> of red and green and blue colours
<mib_mib> probably have to use string scanner or something
rbennacer has quit [Remote host closed the connection]
nii236 has quit [Quit: WeeChat 1.1.1]
<hanmac1> mib_mib: what you can do is that:
<hanmac1> >> 'my@string@is@cool'.to_enum(:scan,/[^@]+/).with_index {|word,i| p [word,i]}
<eval-in_> hanmac1 => ["my", 0] ... (https://eval.in/296703)
<mib_mib> its only semi-odd that split doesn't return an enumerator
<mib_mib> yeah
<mib_mib> cool thx
<phale> >> ''.next.methods.length
<eval-in_> phale => 168 (https://eval.in/296704)
jonr22 has joined #ruby
spyderman4g63 has joined #ruby
<phale> who made eval-in?
elfuego has joined #ruby
brb3 has joined #ruby
DerisiveLogic has joined #ruby
<hanmac1> phale: charliesome did, but he is currently not online
paulfm has joined #ruby
sarkis has joined #ruby
jonr22 has quit [Ping timeout: 272 seconds]
n80 has quit [Quit: n80]
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sameerynho has joined #ruby
<phale> hanmac1: what?
<hanmac1> phale: the user that did the
rbennacer has joined #ruby
<hanmac1> bot, is named charlisoe
<hanmac1> charliesome
<phale> oh
<Qladstone> does anyone have any idea how this could be any more efficient: http://pastebin.com/2aJsJuCk
<helpa> Hi Qladstone. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa> Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
sinkensabe has joined #ruby
<phale> Qladstone: .each_with_index
<phale> not sure how to use it with your code though
<shevy> and what does article contain
<phale> shevy: it's irrelevant
<phale> the data that a variable contains is irrelevant to giving a better solution to syntax
lxsameer has quit [Ping timeout: 245 seconds]
<Qladstone> article is a text document
<Qladstone> Could you explain how .each_with_index helps?
<jhass> Qladstone: try to avoid float for money, store in cents as integer or at least use a precise decimal type
sarkis has quit [Ping timeout: 272 seconds]
michael_mbp has joined #ruby
AlexRussia has quit [Ping timeout: 256 seconds]
serivich has quit [Ping timeout: 252 seconds]
SixiS has joined #ruby
AlexRussia has joined #ruby
<Qladstone> omg.
rippa has joined #ruby
<Qladstone> phale: using .each_with_index doubled the speed. but I have no idea why
<Qladstone> I did not even use the index in the statement
sinkensabe has quit [Remote host closed the connection]
<phale> Qladstone: oh that's cool
<phale> i was just guessing
<shevy> lol
<Qladstone> this black box thing is driving me nuts
<shevy> Qladstone it often helps if you can give a minimal example so others can reproduce what you have there
piotrj has quit [Remote host closed the connection]
<Qladstone> minimal example?
<shevy> you have a lot of options available - .select and .inject come to mind
<shevy> yes
serivich has joined #ruby
<shevy> how can people reproduce with the code snippet you showed?
bweston92 has quit [Remote host closed the connection]
piotrj has joined #ruby
mib_mib has quit [Ping timeout: 246 seconds]
sankaber has joined #ruby
anaeem1_ has joined #ruby
<jhass> Qladstone: your measurement seems flawed. Replacing .each with .each_with_index in your code should if anything make it slower
<shevy> so is this a snippet
<shevy> or is it the code that allows others to reproduce what you have there
<waxjar> qladstone, can you give an example of what article is (your input), the task at a high level and your expected output?
<shevy> btw save with a .rb ending, then you get colours for free
<shevy> on gist.github
<phale> jhass: he may be using a different ruby version
<shevy> phale stop sidetracking
<jhass> Qladstone: payment_rule = payment_rule.to_h
User458764 has joined #ruby
<jhass> phale: doesn't matter
<Qladstone> article is a text file which will be interpreted as an array of strings
<Qladstone> input*
<Qladstone> output is just a float
<Qladstone> task is to match all characters in article to the payment_rule
<Qladstone> and add the value to a total
<Qladstone> and return that total
<shevy> now jhass can solve it
<jhass> sample data would still help
scottstamp is now known as darkstar851
darkstar851 is now known as scottstamp
<waxjar> ok. couldn't you just loop trough all characters in the file, without creating an Array of lines first?
mbreit has joined #ruby
Takle has joined #ruby
<Qladstone> nope, the input is already in that format, an array of strings :S
B1n4r10 has joined #ruby
juanpablo_ has joined #ruby
selu has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 264 seconds]
anaeem1_ has quit [Remote host closed the connection]
<waxjar> hmm, depending on the length of the article it could pay off to join them all together first, to avoid creating an enumerator for every single line
anaeem1 has joined #ruby
<Qladstone> ok I'll try that
juanpablo_ has quit [Ping timeout: 265 seconds]
<waxjar> and maybe instead of looking up the price and adding it to the total for every character, just count the occurences and look up the price in one go at the end
CAP5562 has joined #ruby
dtordable has quit [Ping timeout: 252 seconds]
<Qladstone> I'll store the count in a hash?
<waxjar> yea, that'd be easiest i think
<Qladstone> hmm good idea
<Qladstone> I'll try each
<Qladstone> of them
<Qladstone> I'll let you know how it goes (:
jerematic has joined #ruby
lxsameer_ has joined #ruby
danjordan has quit [Quit: danjordan]
<jhass> yeah, that'll be interesting
<jhass> I'd expect setting a value in the hash to be more expensive than looking it up
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
anaeem1 has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
bweston92 has joined #ruby
<jhass> so I wonder if .count reduces the number of lookups enough
<mcpierce> Is there any way to pass a Ruby object to a C library via an extension and have C take sole ownership of the object; i.e., prevent it from reaped during GC?
<Qladstone> waxjar: joining the arrays did the trick
dtordable has joined #ruby
hgl has quit [Ping timeout: 252 seconds]
<mcpierce> The C library would just hold onto it as a void* and another integratoin piece would handle invoking a single method on it periodically.
riotjone_ has joined #ruby
sameerynho has quit [Ping timeout: 244 seconds]
bMalum has joined #ruby
<jhass> Qladstone: how do you test which is faster btw? gotta micro bench setup?
CAP5562 has quit [Ping timeout: 265 seconds]
<jhass> *got a
<Qladstone> I have a test file given to me to test it with some sample data
senayar has quit [Remote host closed the connection]
<Qladstone> the test tells me the returned result and time taken
jerematic has quit [Ping timeout: 246 seconds]
<jhass> is the test doing multiple iterations?
<Qladstone> nope
<jhass> for averaging out the time?
<jhass> mh
<Qladstone> it's not
<phale> how do I make it print out the raster of pixels?
hgl has joined #ruby
<Qladstone> but the data is large enough
yfeldblu_ has quit [Ping timeout: 265 seconds]
<jhass> how dramatic are the time differences? seconds?
<phale> onto a blank line of colours
<Qladstone> well
<Qladstone> using.join for that strings in the array
<hanmac1> mcpierce: yes. i did it in my bindings too to keep the Ruby object alive as long as the C object does
<Qladstone> reduced the time from 191ms to 008ms
<Qladstone> so that's a big difference
<mcpierce> hanmac1: Do you have an example or a link to code to show how you did it?
davedev24_ has quit [Remote host closed the connection]
<hanmac1> mcpierce: https://github.com/Hanmac/rwx/blob/master/ext/main.cpp#L23-L45 a combination with a ruby hash for storeing and a C++ Hash for counting
sgambino has joined #ruby
riotjone_ has quit [Ping timeout: 265 seconds]
anaeem1 has joined #ruby
senayar has joined #ruby
n80 has joined #ruby
<mcpierce> hanmac1: Thank you! I'll check it out right away.
<mcpierce> hanmac1: Ah, you used a hidden global var to hold references?
<jhass> Qladstone: mmh, but if it's a huge file in the realms of a disk read on the first run to a read from the in memory cache on the second run
<hanmac1> mcpierce: yes i use a hidden global hash so i can add and remove the objects later
roqo has quit [Ping timeout: 245 seconds]
<jhass> that is if the test includes reading the file into the measurement
JDiPierro has joined #ruby
ducklobster has quit [Ping timeout: 255 seconds]
spyderman4g63 has quit [Read error: Connection reset by peer]
anaeem1 has quit [Remote host closed the connection]
joonty has joined #ruby
<mcpierce> hanmac1: I had proposed something similar and someone said it would be too "brittle" to use global vars. What do you think of attaching something like the hash to the eigenclass of one of your library objects?
roqo has joined #ruby
<hanmac1> mcpierce: that global var is hidden in the C code, so the ruby side is not affected (and the global hash isnt even visible from the outside)
mkaesz has joined #ruby
amystephen has joined #ruby
anaeem1 has joined #ruby
<Qladstone> jhass: I'm retesting as well
<Qladstone> seems to be producing similar results
<jhass> mmh. weird
<mcpierce> hanmac1: kk - thanks for the tip. I'll look it over and see how I can integrate that into my work. :D
<Qladstone> I mean
<Qladstone> with restesting, I reproduced the superior performance of using .join before runnning through the entire combined string
<hanmac1> mcpierce: i use a c++ hash for refcounting, you might not need it, if you only want storeing without a chance to remove it again, use just: rb_hash_aset(global_holder,INT2NUM(object),object);
<Qladstone> and testing in reverse order as well
<Qladstone> so it worked
Macaveli has quit [Ping timeout: 256 seconds]
spider-mario has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
<Qladstone> and thanks! (:
<jhass> Qladstone: so this is an assignment for school or something btw?
amundj has quit [Ping timeout: 245 seconds]
<Qladstone> jhass: yup it is, I managed to get the algorithm. But then again... with the same complexity so much difference in speed can occur due to the nature of the operations themselves
<mcpierce> hanmac1: The tricky part for me may be the removal; i.e. I'm working on top of a C library with no true destructor per se.
<jhass> Qladstone: give your teacher a slap from me from having you return money as a float then ;)
<jhass> and yeah, I expected the join to be slower since it needs to do an extra allocation (or a few actually)
<phale> what's better: filling a hash with results from parsing or something else
<phale> i.e: info[:header] = "blablabla"...
<jhass> vs. ?
<phale> i don't know
<phale> just asking if there's a better way of doing it
<jhass> you can compare to specifics, not to "everything else"
anaeem1 has quit [Remote host closed the connection]
<phale> what about structs?
<Qladstone> jhass: LOL. yea I got some trailing decimals at first until I decided to perform the division operation only at the very end
lesce has joined #ruby
Guest65 has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> Qladstone: for added precision don't use 0.0, keep intergers as long as you can
<Qladstone> jhass: Oh yea, I did that, between the time I shared the link to the code and now I soon saw that and made that optimisation
<hanmac1> mcpierce: depending on the c lib, do you have an interface / header files of that online? maybe you can store user data in the C objects (and i used that to put my Ruby objects into the C++ objects)
timonv has quit [Ping timeout: 252 seconds]
<Qladstone> it did cut the time by a tiny bit
<phale> workmad3:
<Qladstone> and yea precision
trufflesnout has joined #ruby
<mcpierce> hanmac1: Yeah, the project's name is Proton (AMQP messaging library) and my git repo is github.com/mcpierce/Proton
<Qladstone> are operations with integers quicker than with floats?
spider-mario has joined #ruby
<mcpierce> hanmac1: I'm working on the Ruby bindings for it. The branch I'm on it the PROTON-799-*, and all my current work is in the proton-c/bindings/ruby directory.
juanpablo_ has joined #ruby
triple_b_ has quit [Ping timeout: 252 seconds]
<jhass> Qladstone: should be iirc
trufflesnout has quit [Client Quit]
tus has joined #ruby
dblessing has joined #ruby
triple_b has joined #ruby
jottr has joined #ruby
anaeem1 has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<jhass> Qladstone: otoh for that level of optimization, Ruby might not be the best choice tbh ;)
<jhass> iterations & allocations is where you can usually make a difference here
qiffp has joined #ruby
<Qladstone> jhass: true that... Ruby is my first lang. I'm pretty much doing it because my course uses it. But since it's my first I'm trying to explore it in some detail before I start on another lang
<Qladstone> funny thing is
ismaelga has joined #ruby
<hanmac1> mcpierce: hm first a c++ api might be more interesting and maybe easier to port (also for the binding, i use templates for most of my stuff *g) ... second when you do the C/C++ part yourself you might add userdata attributes into your C structs, with that you can track the objects like i did
<Qladstone> they made us use Ruby 1.8
<Qladstone> which is 1/3 the speed of Ruby 1.9+
<jhass> Qladstone: okay, deserves another slap from me, a bigger one
<mcpierce> hanmac1: The library currently has reference counting; i.e., pn_incref, pn_decref and pn_refcount.
FooMunki_ has joined #ruby
ismaelga has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<mcpierce> hanmac1: C++ would be nice, but this is a C library so it's not really an option for me.
jottr has quit [Ping timeout: 240 seconds]
<jhass> Qladstone: since even 1.9.3 is completely EOL by now
Bhavya has joined #ruby
<shevy> hey hanmac batman orchestra https://www.youtube.com/watch?v=3vYf1OEI05A
jerematic has joined #ruby
<hanmac1> mcpierce: hm add userdata or something like that which is deleted by the finalize function or something similar
<phale> how do I delete all occurences of ' ' in an array?
<phale> i.e: [ " 255", " 33" ]
<phale> should be [ "255", "33" ]
<jhass> .map(&:strip)
<phale> thanks
<Qladstone> jhass: yea no idea why.. maybe it's just the materials and text they used were all standardised for the version of Ruby
<phale> jhass: that also strips the newline
<phale> I only want it to strip spaces though
<mcpierce> hanmac1: I've been using the python bindings (the principal engineer writes both Python and C) as a guide. He has a decent example of things there, though Python uses reference counting so in that sense it didn't help.
andikr has quit [Remote host closed the connection]
<jhass> Qladstone: shouldn't be that much to update them really, while there might better ways for some things, the old ways still mostly work. Sounds just lazy to me
maximski has joined #ruby
<mcpierce> hanmac1: The main issue for me is tht Swig (how we generate the majority of the bindings) does not give us a way to hook into the lifecycles of its bindings on C structs.
<jhass> phale: then combine Array#map and String#delete
<phale> okay
lolmaus_ has joined #ruby
<hanmac1> mcpierce: forgot swig! with that you cant protect yourself from segmentation faults, with writing bindings yourself you can
jenrzzz has joined #ruby
mbreit has quit [Read error: Connection reset by peer]
<Qladstone> jhass: haha are you teaching too? I'm fine with the old version for the purposes of the course, since the course is mainly just to learn algorithms, and the code itself is just a tool
green-big-frog has joined #ruby
<phale> .map(&:delete(' '))
<phale> gives an error
<mcpierce> hanmac1: Yeah, it's been a definite struggle. I've found some ways to work around issues, but the big one is the one I'm facing now.
mbreit has joined #ruby
adriancb has joined #ruby
<Qladstone> jhass: well, algorithms and data structures. and about computational reasoning
<green-big-frog> how can I program mobile apps with ruby? (I found out that ruboto exists)
<mcpierce> hanmac1: I had attached my Ruby object to the Swig bindings for the C struct, and that worked great. Up until Swig deleted the wrapper and recreated it later. Then I got segfaults.
<jhass> Qladstone: nah, only here on IRC ;) And while what you say might be true, students will take away the old practices and apply them in other contexts
<phale> >> a = [" 255", " 39", " 42\n"]; a.split(",")[1..-1].map(&:strip)
<eval-in_> phale => undefined method `split' for [" 255", " 39", " 42\n"]:Array (NoMethodError) ... (https://eval.in/296719)
<phale> ugh
<hanmac1> mcpierce: have you heard of wxRuby? because of swig and its shitness, https://github.com/Hanmac/rwx was born
<Qladstone> jhass: such as using .each_with_index when there really is no need to refer to the index?
<hanmac1> phale: why are you trying to split an array when its already splitted?
<mcpierce> hanmac1: I hadn't, no. But my project's kind of bound to Swig. I don't have the luxury of replacing it ATM.
<jhass> Qladstone: and as said, I can't imagine porting that stuff to Ruby 2.2 would take much more than 8-10 hours of work, much less if you know your way around
SOLDIERz__ has quit [Quit: Be back later ...]
<phale> hanmac1: oops,
<hanmac1> mcpierce: checkout rwx, you might like it
<phale> i was splitting a string in my program
<jhass> Qladstone: such as your way to create the Hash instead of Hash#to_h
<phale> should be: " 255, 39, 42\n"
<jhass> * Array#to_h
jottr has joined #ruby
lolmaus__ has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
<mcpierce> hanmac1: Will do, and thanks for the tips. :D
<phale> jhass: how do I combine map and delete with an array?
kalusn has quit [Remote host closed the connection]
timonv has joined #ruby
<jhass> Qladstone: using options hashes instead of keyword arguments and so on
<jhass> phale: what did you try?
<phale> array.map(&:delete ' ')
<jhass> the shortcut doesn't work with arguments
FooMunki_ has quit [Quit: FooMunki_]
<phale> so what do i do
<jhass> pass the block explicitly
it0a has joined #ruby
<rom1504> {|x| x.delete ' '}
mbreit has quit [Read error: Connection reset by peer]
<phale> that works, thanks
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dtordable has quit [Changing host]
dtordable has joined #ruby
lolmaus_ has quit [Ping timeout: 240 seconds]
Azure has quit [Excess Flood]
ych4k3r has joined #ruby
zenith_ has joined #ruby
<green-big-frog> how can I program mobile apps with ruby? (I found out that ruboto exists)
<Qladstone> oh yea true that
rbennacer has quit [Remote host closed the connection]
<DefV> green-big-frog: rubymotion
kalusn has joined #ruby
zhan has joined #ruby
<green-big-frog> anything else?
<zhan> i installed nokogiri, how do i see what one its prompts opens?
rbennacer has joined #ruby
doodlehaus has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
HOrangeJewce has joined #ruby
sinkensabe has joined #ruby
Mia has left #ruby [#ruby]
zachrab has joined #ruby
rbennacer has quit [Remote host closed the connection]
Qladstone has quit [Remote host closed the connection]
Qladstone has joined #ruby
<zhan> doc = Nokogiri::HTML(open("http://www.threescompany.com/"))
<zhan> how do i tell what this opens, and what do i put instead of nokogiri
sinkensabe has quit [Ping timeout: 245 seconds]
enebo has joined #ruby
aryaching has joined #ruby
ooesili has joined #ruby
zachrab has quit [Ping timeout: 244 seconds]
senayar has quit [Remote host closed the connection]
<jhass> zhan: I don't follow the question at all
anaeem1 has quit [Remote host closed the connection]
zyxelthrone has joined #ruby
coderhs has joined #ruby
<zhan> installed nokogiri, and it gives you that prompt to open websites
anaeem1_ has joined #ruby
<zhan> well I don't entirely understand the structure of promt, and i don't know what happens once i run it
<IceDragon> zhan: opening a uri is done via the `open-uri` gem, nokogiri, will read a String or IO and convert it to an XML/HTML tree
tunaCanBruh has joined #ruby
FooMunki has joined #ruby
anaeem1_ has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 256 seconds]
anaeem1 has joined #ruby
<zhan> uh, right, it says that...
<zhan> so install "open-uri" gem?
coderhs has quit [Client Quit]
<gr33n7007h> zhan, it's in the stdlib
<canton7> yeah, it's not a gem, just a library in the stdlib
<canton7> require 'open-uri'
<zhan> what do i do?
<canton7> zhan, and, indeed, the doc that lists 'doc = Nokogiri::HTML(open("http://www.threescompany.com/"))' has "require 'open-uri'" right above it
<zhan> i know that
lanemeyer has joined #ruby
<zhan> im not sure what it means
nepgear has joined #ruby
<canton7> ok, we're all completely lost as to what your question is, then
nepgear has quit [Disconnected by services]
<zhan> well how do i have the app im writing open a website
<canton7> doc = Nokogiri::HTML(open("http://www.thewebsite.com"))
<zhan> but also understand what it opens, like so that I could determine what to program next
<zhan> what do i put instead of nokogiri?
<canton7> 'doc' is a Nokogiri class representing the HTML document
<canton7> why do you want to put something instead of nokogiri?
<zhan> right that stays then
<canton7> presumably the point is to parse the website's HTML using nokogiri?
<canton7> ..otherwise you wouldn't be looking at a nokogiri doc page
<zhan> and do i have to download the website first, or that command does exactly that
<zhan> y
<canton7> 'open' downloads the page's source as a string
* canton7 double-checks that
<zhan> right
senayar has joined #ruby
<zhan> so then open-uri "adress" then the prompt
<zhan> how do i test it after
maximski has quit []
zenith_ has quit [Ping timeout: 264 seconds]
<canton7> actually returns a Tempfile
<canton7> what prompt? test what after?
<canton7> what are you trying to do?
mengu has quit [Remote host closed the connection]
<zhan> well im just terribe dev
zyxelthrone has quit [Ping timeout: 256 seconds]
centrx has joined #ruby
<zhan> utter retard
livingstn has joined #ruby
anarang has quit [Quit: Leaving]
werelivinginthef has joined #ruby
vt102 has joined #ruby
tunaCanBruh has quit [Ping timeout: 272 seconds]
<zhan> run open-uri in git bash, says command not found
<canton7> what are you trying to do?
<canton7> have you ever used ruby before?
<zhan> have the app open a website
<zhan> i did a course
<canton7> as in... download the HTML? parse it? view it in a browser?
<zhan> download it if necessery, parse it after
freerobby has joined #ruby
<canton7> ok, to parse it as a nokogiri document, use that snippet you pasted earlier
kalusn has quit [Remote host closed the connection]
<canton7> do you know what irb is?
<canton7> do you know what 'require' does?
<zhan> no
DouweM has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
<canton7> ok, your course wasn't very good
<canton7> I recommend doing some more background learning
<phale> it works!!
DouweM has joined #ruby
<phale> my own format works!
Aswebb_ has quit [Remote host closed the connection]
jottr has joined #ruby
Azure has joined #ruby
<ponga> le me see
bigmac has quit [Quit: Leaving]
spider-mario has quit [Remote host closed the connection]
<ponga> phale: your format of imaging?
startupality has joined #ruby
FooMunki has quit [Quit: FooMunki]
<phale> ponga: yes
spider-mario has joined #ruby
<ponga> congrats
<phale> now i need a translator
<phale> bmp to ptf, jpg to ptf, etc
<workmad3> phale: congrats, you've just re-invented the colour-pallette bitmap! ;)
<zhan> so then can some1 just post steps for doing what im trying to do
<workmad3> phale: I guess you gave up on PBM?
<phale> workmad3: yes
Hirzu has quit [Ping timeout: 244 seconds]
<phale> I can parse PPM all the way to raster
<phale> you gave me some obscure raster grid last night, wasn't sure how to use it
Megtastique has joined #ruby
maximski has joined #ruby
rbennacer has joined #ruby
<workmad3> phale: how long did you spend figuring out what it did?
<jhass> zhan: for the part you described, you already posted the snippet of code you need yourself
<phale> workmad3: 0 seconds
<zhan> how do i see the tempfile or what it returns
<jhass> zhan: use pry, pryrepl.org
<workmad3> phale: wow, such a long time, I can see why you're so great at ruby and parsing really simple formats... :P
<phale> :(
<phale> i haven't even read a single ruby book
TheMoonMaster has joined #ruby
<phale> i just started using it
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
boshhead has joined #ruby
<workmad3> phale: btw, I was a bit tired last night... I should really have given you the simpler snippet of 'info[:raster].each_slice(info[:width].to_i * 3).to_a'
RegulationD has joined #ruby
startupality has quit [Ping timeout: 256 seconds]
<zhan> jhass: so sublime worse then pry?
beneggett has joined #ruby
<jhass> zhan: they're completely different things
<workmad3> phale: that said, the other people who said there really should be more structure rather than just a simple hash holding your image info were also correct ;)
<zhan> pry isn't a text editor?
fryguy9 has joined #ruby
<jhass> no
<zhan> installing it then
green-big-frog is now known as frog|OFF
<phale> workmad3: now I have an array of arrays
<workmad3> phale: correct
Aswebb_ has joined #ruby
<phale> I have 4 arrays in the array
<workmad3> phale: want to guess what each array inside the top array consists of?
<phale> sure
<phale> uh
kalusn has joined #ruby
<phale> colors?
<phale> no, pixels
<workmad3> phale: wrong on both counts
FooMunki has joined #ruby
<phale> don't know then
<workmad3> phale: go and look up what 'each_slice' does, then look at what the value being passed to it is
<workmad3> phale: and consider what it could be
<workmad3> phale: i.e. don't give up with absolutely 0 effort put in... that's not the way to learn things, it actually takes some effort on your part
<phale> "Iterates the given block for each slice of <n> elements. If no block is given, returns an enumerator."
<phale> i see
_Andres has joined #ruby
zenith_ has joined #ruby
<workmad3> phale: so each array consists of?
<phale> each slice by width times 3, to an array
<phale> each array consists of slices
frog|OFF is now known as green-big-frog
<workmad3> phale: yeah... it slices up the raster into arrays of length width * 3
<workmad3> phale: why width * 3? (check the PPM spec ;) )
<phale> right
<phale> triplet of red, green and blue samples
jqcehm has quit [Ping timeout: 245 seconds]
<workmad3> phale: ok... so what does each of those slices of the original raster represent?
tagrudev has quit [Remote host closed the connection]
<phale> a raster of height rows, in order from top to bottom
<phale> each row consists of info[:width] pixels, in order from left to right
<workmad3> phale: ok... so a slice is...
chthon has joined #ruby
jlebrech has joined #ruby
<phale> [s1, s2]
User458764 has joined #ruby
SouL_ has joined #ruby
jonr22 has joined #ruby
zenith_ has quit [Remote host closed the connection]
iesoxk has joined #ruby
<phale> basically a substring
<jlebrech> anyone else suffer from "simpleitis", because you code in ruby you always need to find the simple way to do something, and complex code doesn't look right?
<phale> jlebrech: yes
<centrx> That's called simplegreatness
fryguy9 has quit [Read error: Connection reset by peer]
<jlebrech> phale: must-find-one-liner
<workmad3> phale: lets try this again... lets say I did 'info[:raster_grid] = info[:raster].each_slice(info[:width].to_i * 3).to_a' and then did 'x = info[:raster_grid][0]' what would be a good variable name for x?
fryguy9 has joined #ruby
adriancb_ has joined #ruby
<centrx> y
<workmad3> centrx: ssh :P
adriancb has quit [Read error: Connection reset by peer]
<phale> thepositionofzeroininforastergridslicearray
mengu has joined #ruby
<workmad3> phale: well, x will be pointing to an array
zcreative has joined #ruby
<phale> right
<workmad3> phale: that array is some part of the original raster
lordkryss has joined #ruby
chemiazpolski has quit [Read error: Connection reset by peer]
<workmad3> phale: what would be a good name for that part?
iamjarvo has joined #ruby
<phale> hm
<phale> color, pixel, y
<phale> not sure
<workmad3> phale: it begin's with 'r'
<workmad3> *begins
<phale> does it end with r too
<workmad3> no
<phale> what does it end with
<workmad3> phale: give it some thought
jonr22 has quit [Ping timeout: 252 seconds]
kalusn has quit [Remote host closed the connection]
sarkis has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
a5i has joined #ruby
* jhass senses hangman time
FooMunki has quit [Quit: FooMunki]
mitchellhenke has joined #ruby
<workmad3> jhass: variable name hangman... fill in the blanks before the command "sudo rm -rf /" gets completed?
roshanavand has joined #ruby
<jhass> yeah
<hs366> Q: i don't get any result to test: "Fear is the path to the dark side".split("\n") in IRB, is my code correct ?
crueber has joined #ruby
<jhass> r__ 0/12 [] What's the next letter you choose?
hollywood has joined #ruby
<jhass> >> "Fear is the path to the dark side".split("\n")
<eval-in_> jhass => ["Fear is the path to the dark side"] (https://eval.in/296738)
<phale> well
<phale> it points to the first array in the array
<phale> red?
<phale> wait no
<jhass> r__ 2/12 [ed] What's the next letter you choose?
beneggett has quit [Ping timeout: 255 seconds]
<phale> ot
<jhass> ro_ 3/12 [edt] What's the next letter you choose?
Adran has quit [Quit: Este é o fim.]
<hs366> jhass, i don't choose any , i thought i should get each char/letter in one line
<phale> m
<hs366> l
<hs366> i
<hs366> k
<centrx> z
<centrx> q
<phale> no spamming
<workmad3> jhass: I can't help but think he wanted to finish that with 'in hell' :)
<jhass> sorry, phale is the only player in this game
<hs366> sorry
<centrx> >> :sorry
<eval-in_> centrx => :sorry (https://eval.in/296739)
<phale> rop
<zhan> so installed pry and read obout open-uri. run open-uri in git bash, and pry, didn't work
skj3gg has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
<phale> it has to be rop
<jhass> zhan: "didn't work" is not a problem description worthy of a programmer, try again
tvon has quit [Quit: leaving]
<jhass> ro_ 4/12 [edtp] What's the next letter you choose?
<zhan> synatx error: unexpected tidentifier
phutchins has joined #ruby
<workmad3> jhass: you missed phale guessing m too :P
zorak8 has joined #ruby
<jhass> oh
Channel6 has joined #ruby
<jhass> ro_ 5/12 [edtmp] What's the next letter you choose?
<jhass> zhan: so what's the code?
<phale> o
<jhass> you already had o
<zhan> open ("http://......")
<jhass> ro_ 5/12 [edtmp] What's the next letter you choose?
<gr33n7007h> this is to funny
<jhass> zhan: why that space?
<phale> ¢
User458764 has joined #ruby
<zhan> right
Adran has joined #ruby
<phale> d
oki has quit [Ping timeout: 246 seconds]
<phale> oh
<phale> uh..
<jhass> you already had d
<jhass> ro_ 5/12 [edtmp] What's the next letter you choose?
<phale> a
<jhass> ro_ 6/12 [edtmpa] What's the next letter you choose?
<phale> v
<workmad3> so close!!!
<zhan> runtimeError: redirection forbidden: I'm running this in pry so to speak although i was told it's not a text editor
<jhass> ro_ 7/12 [edtmpav] What's the next letter you choose?
<phale> idk
paolooo has joined #ruby
<phale> bcfghijkl
<jhass> zhan: the URL you try to access does a redirect, try the URL it redirects to
n008f4g_ has quit [Ping timeout: 240 seconds]
<gr33n7007h> open-uri follows redirects
<jhass> ro_ 12/12 [edtmpavbcfghijkl] You're dead
rbennacer has quit [Remote host closed the connection]
<phale> buffer overflow
parduse has joined #ruby
triple_b has quit [Read error: Connection reset by peer]
<phale> 14/12
<hs366> phale,
<phale> i win
<hs366> plz
<jhass> w would be correct
<waxjar> open-uri doesn't follow http -> https redirects on some versions
B1n4r10 has quit [Ping timeout: 255 seconds]
triple_b has joined #ruby
<phale> well that was dumb
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has quit [Read error: Connection reset by peer]
<zhan> yey it stored the fucker, how do i actually open it to see it
freerobby1 has joined #ruby
<gr33n7007h> waxjar, ah ok
<phale> ok
<phale> row
<phale> good name ;)
<jhass> zhan: "open"?
<workmad3> phale: yeah... as in a row of the image
Cache_Money has quit [Quit: Cache_Money]
<zhan> well i have run that
<zhan> it gave me an adress
beneggett has joined #ruby
maximski has quit []
<phale> workmad3: great
<phale> i have the row
<phale> what do i do now
<workmad3> phale: well, more specifically, you have an array of rows, giving you a 2d array of the image data, which you can use to easily walk over the data and do what you want with it
last_staff has quit [Quit: last_staff]
<phale> i want to string.colors
FooMunki has joined #ruby
<phale> String.colors has a size of 17, that is 17 colours
<phale> but the maxval for most ppm images is 255. what do I do then?
<zhan> what is gitbash
rbennacer has joined #ruby
aryaching has quit []
<zhan> just a command prompt, cuz it doesn't run ruby
<jhass> !g gitbash
<workmad3> phale: i.e. you could do info[:raster_grid].each {|row| row.each_slice(3) {|red, green, blue| print"rgb(#{red},#{green},#{blue}" }; print "\n"} and have the image colours spat out in rgb(...) form
<workmad3> phale: you could do similar, but on the inside you could look up a suitable colour in your pallette from the rgb components and print a pixel
<phale> yes
<workmad3> phale: the main thing is that your image data is now 2 dimensional, which generally makes it easier to work with ;)
<phale> :D
<workmad3> phale: if you wanted a step that might be easier again to work with, then 'info[:raster].each_slice(3).to_a.each_slice(info[:width].to_i)'
<zhan> jhass: I'm still an lost as I can't get a temp file or return
bruno-_ has quit [Quit: Lost terminal]
<workmad3> phale: which gives you an array of arrays of arrays
crueber has quit [Quit: Leaving.]
<phale> :)
<workmad3> phale: and now each row is organised as an array of '[[r,g,b],[r,g,b],...]' pixels
<jhass> zhan: your only utter failure is to properly describe your goal
<zhan> open a website in command prompt or editor to then see how it perceives the website
agarie has quit [Remote host closed the connection]
<phale> workmad3: but how does one transform these into String.colors
<jhass> zhan: open(url, &:read) at pry
<workmad3> phale: that depends on your pallette and how you want to downscale your colours to it
<zhan> all in same parenthesis
<jhass> zhan: you can also open(url) {|f| f.read } if that's easier to read for you
<phale> workmad3: [:black, :light_black, :red, :light_red, :green, :light_green, :yellow, :light_yellow, :blue, :light_blue, :magenta, :light_magenta, :cyan, :light_cyan, :white, :light_white, :default]
<zhan> wholy shit
DouweM has quit [Ping timeout: 252 seconds]
<zhan> jhass: to check though, pry is seruisly a lot like the windows command prompt without copy/paste?
<havenwood> Yup, that's Pry's goal. The Windows command prompt without copy/paste.
<jhass> zhan: pry is feature rich read eval print loop for Ruby, it doesn't affect the terminal emulator its run much
<workmad3> phale: so that's your pallette... do you happen to have access to what colours they are in rgb form?
<workmad3> phale: because then you could do a nearness match of some description
sinkensabe has joined #ruby
<zhan> window im using right now says cmd.exe
<zhan> and it appears to have downloaded the whole website at once, instead of the page
<phale> workmad3: no
<phale> it comes with this wonderful String extending gem colorize
RandyT_ has joined #ruby
adriancb_ is now known as adriancb
RandyT has quit [Ping timeout: 240 seconds]
<phale> idk though
<jhass> zhan: it's the same thing as when you do "view source" in your browser
<jhass> called HTML
<workmad3> phale: ok... that makes your job difficult, as you'll need to figure out how to convert rgb triples to those symbols
bruno- has joined #ruby
red_horned_rihno has quit [Ping timeout: 244 seconds]
<zhan> so what im doing now is the only way of doing it through cmd.exe
Qladstone has quit [Ping timeout: 264 seconds]
<havenwood> zhan: Do you know what a REPL is?
<zhan> no
<jhass> zhan: there's few things for that exist only "one way"
<phale> workmad3: yeah
Qladstone has joined #ruby
<zhan> to iterate i installed pry gem, typed up pry in search windows, and found a config file
<zhan> thats how i run the pry
<phale> maybe this
<havenwood> zhan: irb is the REPL that ships with Ruby. Pry is a REPL alternative to irb. REPL stands for Read Eval Print Loop.
febuiles has quit [Quit: febuiles]
hs366 has quit [Quit: Leaving]
drkush has quit [Ping timeout: 252 seconds]
<ponga> havenwood: thank you
<ponga> i didnt know that too
sinkensabe has quit [Ping timeout: 244 seconds]
riotjones has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
<zhan> how do i use REPL
<zhan> cuz im ussing command prompt with ruby config
<ponga> get into terminal type in irb
<jhass> zhan: using pry is already using a REPL because pry is a REPL
bruno- has quit [Ping timeout: 252 seconds]
<zhan> the point is i dob't belief that pry is suppose to be cmd.exe
<hanmac1> havenwood: isnt more Loop { Print(Eval(Read())) } ? ;P
AlexRussia has joined #ruby
<zhan> so i don't think that im actualy using pry right now
<havenwood> hanmac1: hehe
<jhass> zhan: you do
mistermocha has joined #ruby
bruno- has joined #ruby
<zhan> well irb didn't give me anything
hanmac1 has quit [Quit: Leaving.]
<jhass> if it says pry(main)> inside it you do
<zhan> right i am
<ponga> is zhan in windows?
rbennacer has quit [Remote host closed the connection]
<havenwood> zhan: Pry is a gem. It ships with an executable called `pry` like Ruby ships with an executable called `irb`. You run `pry` or `irb` from the command prompt to enter the loop.
<ponga> if so i have no idea then
<jhass> ponga: no he runs cmd.exe on linux
<zhan> i hate it
<zhan> so there's no way of seeing what happens in text editor
<zhan> cuz programming courses let you see that
<havenwood> zhan: Pry can jump back and forth from a text editor.
mistermo_ has joined #ruby
<zhan> on web
<phale> Anyone know a gem that converts RGB into visible terminal colours?
rbennacer has joined #ruby
drkush has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
DerisiveLogic has quit [Remote host closed the connection]
ypasmk has quit [Quit: ypasmk]
mistermocha has quit [Ping timeout: 244 seconds]
hobodave has joined #ruby
<zhan> so how do i make pry run like it does in programming lessons
<havenwood> zhan: Your inability to paste is not Pry-related. One does not simply ctrl-v in CMD.EXE. Try `alt + space e p`.
drkush has quit [Ping timeout: 252 seconds]
red_horned_rihno has joined #ruby
<havenwood> zhan: At least switch to PowerShell if you're stuck on Win.
maletor has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tunaCanBruh has joined #ruby
<zhan> jesus
<zhan> is there seriuslly like no way of getting the fucking thing to work like it does on web
<phale> workmad3:
<phale> i succeeded in using the RGB's and it shows exactly what the ppm contains
drkush has joined #ruby
zenith_ has joined #ruby
Limix has joined #ruby
<jhass> zhan: complain to microsoft about that, you're their customer after all
<havenwood> you're enabling them!
<zhan> for realz
<havenwood> j/k j/k >.>
<zhan> programming lessons can get the fucker to run on web
<zhan> there's no app for doing it in desktop
Mives has joined #ruby
serivich has quit [Ping timeout: 246 seconds]
Shazaum has quit [Ping timeout: 255 seconds]
<havenwood> zhan: What you're wanting can likely be done. But it'd probably take some toil on your part, especially on Windows.
<havenwood> zhan: It's not a well-trod path.
<zhan> "it's not a well-trod path"...
<phale> workmad3:
crueber has joined #ruby
<phale> jhass: is it normal for File.read to stop reading?
Channel6 has quit [Remote host closed the connection]
<phale> like at a partial point
<phale> not at the end
mkaesz has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mkaesz has joined #ruby
senayar has quit [Remote host closed the connection]
aryaching has joined #ruby
<jhass> no
Takle has quit [Remote host closed the connection]
<phale> well it does for me
senayar has joined #ruby
zenith_ has quit [Ping timeout: 265 seconds]
<phale> i read it all into a string, parsed it
Qladstone has quit []
<phale> and at a certain point it will not read
<havenwood> zhan: Right, find a tutorial for setting something up like that on Windows? Good luck!
<phale> no, the File has already been read
bal has quit [Quit: bal]
<zhan> perl?
<phale> Everything is fine and dandy, it prints out the RGB's that workmad3 gave me
demophoon has quit [Read error: Connection reset by peer]
<zhan> is what its called
<havenwood> zhan: !spacenotenter
<phale> but then it stops if I read in a big file
<phale> like an image 99x99
<phale> the iteration stops
<jhass> I don't follow
ndrei has quit [Ping timeout: 255 seconds]
<phale> sec
<zhan> what?
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mkaesz has quit [Ping timeout: 246 seconds]
<jhass> so?
<havenwood> zhan: Use the space key instead of the enter key to separate words. It's nicer not to have so much vertical scroll and keeps your text together for easier reading.
Timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
Takle_ has joined #ruby
mengu has quit [Remote host closed the connection]
GaryOak__ has joined #ruby
<phale> jhass: look
<zhan> okay, so then im just looking for the perl, or what stuff in lessons is something else
<phale> it stops reading after like the 15th row
<havenwood> zhan: I'm sure you can find a tutorial on how to use Pry with a text editor.
<jhass> phale: which line exactly does?
febuiles has joined #ruby
mloveless has joined #ruby
<phale> 32
<phale> or counting from 0, 31
DouweM has joined #ruby
<zhan> yea i looked at one that comes on the pry homepage, it terrible
<havenwood> zhan: But you might prefer online interactive stuff at this point because it seems you don't have a ton of command line experience and online you can focus on the Ruby part. Your choice though, both are great skills to learn.
triple_b has joined #ruby
<jhass> phale: line of code
<zhan> not the training will i'm looking for like in codecademy
<zhan> I need the gems though
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
SOLDIERz__ has joined #ruby
<phale> jhass: oh
<phale> print " ".background(red, green, blue)
Mives has quit [Ping timeout: 265 seconds]
momomomomo has joined #ruby
<jhass> phale: there's no iteration in that line of code that could stop
piotrj has quit [Remote host closed the connection]
<phale> then what's going on?
<phale> why won't it complete the printing?
piotrj has joined #ruby
<jhass> debug
<phale> how
<jhass> inspect all the immediate values, verify they are what you expect/assume
<phale> okay
<havenwood> zhan: Since you aren't already familiar with the Windows command line it'd probably be a good idea to switch to a *nix command line since those skills will be more portable and useful going forward. Unless you want to be a Win sysadmin or something.
<phale> jhass: but why does it work on a 4x4 image
<phale> and not a 99x99?
<jhass> phale: you find out with debugging
<phale> im not exactly sure how to debug data that is nonsensical
crueber has quit [Quit: Leaving.]
arclitgold has joined #ruby
jimms has quit []
DouweM has quit [Ping timeout: 252 seconds]
<jhass> phale: you trace backwards from the point where you notice the error, looking at all the intermediate values whether they are what you expect/assume
<zhan> havenwood: Unix, for ubuntu, no. I seriusly want immidiate feed back as I'm still learning the language, searching for rgb or wtv pry is will still use command prompt. what term do i use in google to find what codecademy uses
<phale> ok
plashchynski has joined #ruby
zenith_ has joined #ruby
DouweM has joined #ruby
<jhass> phale: don't assume your (or anybody else) code is just doing/producing the right thing, verify
<phale> ok uh
<phale> i've noticed that all the rows well
<phale> aren't all the rows
<phale> in the image
maletor has quit [Quit: Computer has gone to sleep.]
qiffp has quit [Remote host closed the connection]
ascarter has joined #ruby
programmerq has quit [Read error: Connection reset by peer]
Timgauthier has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
mistermo_ has quit [Ping timeout: 240 seconds]
dfinninger has joined #ruby
<havenwood> zhan: You can have your text editor eval Ruby (if the editor supports an inline REPL) or you can use Pry alongside a text editor (see `help` from inside Pry).
pawlz has joined #ruby
Timgauthier is now known as timgauthier_away
<waxjar> xmp-filter, ftw!
dfinninger has quit [Read error: Connection reset by peer]
<havenwood> zhan: If you're having trouble setting it up on your current setup, maybe just paste from your editor into Pry until you get more comfortable with your tooling.
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
Mives has joined #ruby
adriancb has quit [Read error: No route to host]
aclearman037 has joined #ruby
sarkis has joined #ruby
<havenwood> zhan: For example, I can see the output of my Ruby code (with varying degrees of elegance) from the text editors TextMate 2, Atom, LightTable, Sublime and emacs. (Hrm, what's a good way in vim?)
Sou|cutter has quit [Quit: WeeChat 0.4.3]
<ericwood> havenwood: you can use ! but most of us prefer to have a separate term for running and seeing results
<zhan> i got sublime
marcoamorales has joined #ruby
<havenwood> ericwood: rgr
<jlebrech> is there a dsl like rabl I can use within a class not a controller?
<jlebrech> model*
<havenwood> zhan: So good for running Ruby in Sublime and get that setup.
<havenwood> s/good/google
DouweM_ has joined #ruby
User458764 has joined #ruby
<jlebrech> jbuilder?
mengu has joined #ruby
mengu has joined #ruby
<zhan> havenwoood: do i need a plugin, or is there in-line evaluator hidden somewhere
programmerq has joined #ruby
maximski has joined #ruby
SOLDIERz__ has quit [Quit: Be back later ...]
sambao21 has joined #ruby
<havenwood> zhan: I'm not a regular Sublime Text user but I recall it being either built-in or available by plugin. Ask in the Sublime chan or check the interwebs.
DouweM has quit [Ping timeout: 252 seconds]
SOLDIERz__ has joined #ruby
alex88 has quit []
fabrice31_ has quit [Remote host closed the connection]
zenith_ has quit [Ping timeout: 256 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cache_Money has joined #ruby
sn0wb1rd has quit [Ping timeout: 245 seconds]
Limix has quit [Quit: Limix]
terrellt has quit [Ping timeout: 250 seconds]
<havenwood> zhan: ##sublimetext
Asher has joined #ruby
Limix has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
<zhan> join @sublimetext
kblake has joined #ruby
<zhan> join #sublimetext
<zhan> join ##sublimetext
<zhan> #join sublimetext
<jhass> zhan: / in front
aganov has quit [Quit: Leaving]
<zhan> the chanel is empty
<ponga> it seems a long journey for him to go ;p
<jhass> zhan: wrong name then
anarang has joined #ruby
sn0wb1rd has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> zhan /j ##sublimetext
terrellt has joined #ruby
ascarter has joined #ruby
<shevy> the best editor is the human brain
<shevy> and notepad
<GaryOak__> The best editor is Will Shortz
beneggett has joined #ruby
ghr has quit []
<workmad3> phale: oh, btw, because I was bored, here's a PPM parser for you :P https://gist.github.com/workmad3/94f8724eb02af81bc078
<phale> only noobs use editors
<phale> i use echo
FooMunki has quit [Quit: FooMunki]
<phale> oh cool workmad3
benlieb has joined #ruby
<phale> i've already made it though
adriancb has joined #ruby
<phale> the only problem is the partial row
gizmore has quit [Ping timeout: 272 seconds]
zcreative has quit [Quit: (null)]
ooesili has quit [Quit: leaving]
zachrab has joined #ruby
<phale> workmad3: you see, the colours don't output correctly
<phale> after a short time they'll stop outputting
<phale> for whatever reason
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beneggett has quit [Client Quit]
Timgauthier has joined #ruby
mengu has quit []
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crueber has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ascarter has quit [Client Quit]
shanlar- has joined #ruby
beneggett has joined #ruby
shanlar has quit [Read error: Connection reset by peer]
ghostpl_ has quit [Remote host closed the connection]
<shevy> grrr
<shevy> colours just aren't meant for you phale
zachrab has quit [Ping timeout: 245 seconds]
<phale> what is meant for me then??? huh????????????
DouweM_ has quit [Ping timeout: 245 seconds]
fantazo has joined #ruby
Timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
Bhavya has quit [Quit: Quit the channel]
ghostpl_ has joined #ruby
krz has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
juanpablo_ has quit [Read error: Connection reset by peer]
kaiZen- has joined #ruby
DerisiveLogic has joined #ruby
juanpablo_ has joined #ruby
sarkis has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp has quit [Excess Flood]
sinkensabe has joined #ruby
User458764 has joined #ruby
<workmad3> phale: just updated the gist btw, it now has an ansii_24 method for Colour that generates a 24bit colour code, and the 8bit colour code is closer to being correct... ansii colour codes suck
oddraisin has joined #ruby
michael_mbp has joined #ruby
anaeem1 has quit [Remote host closed the connection]
xaxisx has joined #ruby
agarie has joined #ruby
beneggett has joined #ruby
beneggett has quit [Client Quit]
<jhass> you're really bored :P
febuiles has quit [Quit: febuiles]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<phale> im reading
<phale> TRPL
<workmad3> jhass: yup :P
5EXAAN260 has joined #ruby
senayar_ has joined #ruby
<jhass> workmad3: how about contributing something nice to Crystal stdlib? lots of fun stuff still open :P
<workmad3> jhass: suggestions welcome on cleaning up the header parsing btw :)
<phale> now add plain PPM parsing
<workmad3> jhass: I didn't fancy a parser that slurped the entire file into memory, so it's doing a byte at a time
<workmad3> phale: well, the next obvious step would be to ignore # comment lines
<jhass> workmad3: show some love for until :P
thumpba has joined #ruby
sinkensabe has quit [Ping timeout: 250 seconds]
<shevy> phale I picture your future with python
<ponga> i wish i could contribute to crystal stdlib
senayar has quit [Ping timeout: 240 seconds]
<jhass> ponga: the trick is to find the easy missing parts, like https://github.com/manastech/crystal/pull/368
<phale> pyth9on sucks
thumpba has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
febuiles has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
lemur has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
5EXAAN260 has quit [Remote host closed the connection]
dblessing has joined #ruby
danman has joined #ruby
wottam has joined #ruby
skj3gg has joined #ruby
thumpba has joined #ruby
willharrison has joined #ruby
arup_r has joined #ruby
Mives has quit [Ping timeout: 256 seconds]
cphrmky has joined #ruby
lesce has quit [Changing host]
lesce has joined #ruby
Mives has joined #ruby
willharrison has quit [Client Quit]
skyjumper has left #ruby [#ruby]
dandaman has joined #ruby
OrbitalKitten has joined #ruby
thumpba_ has joined #ruby
snockerton has joined #ruby
crueber has quit [Quit: Leaving.]
crueber has joined #ruby
pawlz has quit [Quit: Leaving]
GnuYawk has joined #ruby
senayar_ has quit []
iesoxk has quit [Read error: Connection reset by peer]
jlast has joined #ruby
commmmodo has joined #ruby
jshultz has joined #ruby
xymbol has joined #ruby
benlieb has quit [Quit: benlieb]
thumpba has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
r3dk1nG has quit [Remote host closed the connection]
pdoherty has joined #ruby
einarj has quit [Remote host closed the connection]
commmmodo has quit [Client Quit]
jonr22 has joined #ruby
lolmaus has joined #ruby
Spami_ has quit [Quit: Leaving]
Spami has joined #ruby
ptrrr has joined #ruby
zhan has quit [Ping timeout: 246 seconds]
thebastl has joined #ruby
skj3gg has left #ruby ["welp, see you later."]
atomiccc has joined #ruby
<workmad3> jhass: there, I'm a bit happier with that now :)
strixd has quit [Quit: 500]
lolmaus__ has quit [Ping timeout: 245 seconds]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopiee has quit [Quit: Leaving]
warprobot has joined #ruby
strixd has joined #ruby
<jhass> workmad3: hehe, nice pull parser^^
dopie has joined #ruby
sivsushruth has joined #ruby
chipotle has joined #ruby
Kricir has joined #ruby
warprobot has quit [Remote host closed the connection]
sambao21 has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
lesce has quit [Quit: leaving]
SouL_ has quit [Ping timeout: 244 seconds]
withnale__ has quit [Ping timeout: 244 seconds]
DerisiveLogic has quit [Ping timeout: 264 seconds]
jonr22 has quit [Ping timeout: 256 seconds]
xaxisx has quit [Quit: xaxisx]
mikecmpbll has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
deol has joined #ruby
JDiPierro has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
piotrj has joined #ruby
<workmad3> jhass: it's a nice parser style :)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> yeah, and often surprisingly fast while readable
<workmad3> jhass: yeah... this is a little slow with the 4mb sample image I found... but not so bad as to be unworkable :)
dANO__ has quit []
joonty has quit [Quit: joonty]
<workmad3> jhass: 4s to load and process the image
apeiros_ has joined #ruby
Bounga has quit [Quit: Bounga]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
commmmodo has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
snockerton has joined #ruby
commmmodo has quit [Client Quit]
strixd has quit [Quit: 500]
mistermocha has quit [Ping timeout: 255 seconds]
<workmad3> phale: do you like the PPM parser I wrote that you reckoned I couldn't :P
f03lipe has joined #ruby
DerisiveLogic has joined #ruby
dfinninger has quit [Remote host closed the connection]
commmmodo has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
timonv has quit [Ping timeout: 252 seconds]
dandaman has quit [Quit: Leaving.]
User458764 has joined #ruby
jenrzzz has joined #ruby
dfinninger has joined #ruby
aninaki has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
Takle_ has quit [Remote host closed the connection]
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
rbennacer has quit [Remote host closed the connection]
<mwlang> shevy: I like the “nerd p0rn” comment. Nice to see those guys take feedback seriously and cleaned up their rack accordingly.
xaxisx has joined #ruby
maletor has joined #ruby
Meow-J has joined #ruby
atomiccc has joined #ruby
<phale> how come 3[0] works
<phale> but 3.each {|i| puts i } doesn't
f-a has joined #ruby
kera has joined #ruby
<workmad3> >>3[0]
<eval-in_> workmad3 => 1 (https://eval.in/296788)
dandaman has joined #ruby
mloveless has quit [Remote host closed the connection]
dandaman has quit [Client Quit]
<workmad3> phale: because Fixnum or Integer implements [], but not each
<phale> oh
f-a has left #ruby [#ruby]
mloveless has joined #ruby
<workmad3> phale: x[0] is just syntax sugar in ruby for x.[](0) (calling the [] method with 0 as the parameter)
dcarmich has joined #ruby
<phale> oh
zachrab has joined #ruby
rbennacer has joined #ruby
<phale> i thought it was like an array
<apeiros_> [] on its own is an array
ta has quit [Quit: Leaving...]
<apeiros_> [] appended on an expression is - as workmad3 said - a method call
xymbol has quit [Quit: Be back later ...]
Aswebb_ has quit []
Takle has joined #ruby
cjim has joined #ruby
crack_user has joined #ruby
mloveless has quit [Ping timeout: 240 seconds]
<crack_user> hello guys
ndrei has joined #ruby
<phale> hi
riotjone_ has joined #ruby
lemur has quit [Remote host closed the connection]
kera has quit [Ping timeout: 256 seconds]
zachrab has quit [Ping timeout: 265 seconds]
zenith_ has joined #ruby
leafybasil has quit [Remote host closed the connection]
timonv has joined #ruby
deric_skibotn has joined #ruby
davedev24_ has joined #ruby
MatthewsFace has joined #ruby
riotjone_ has quit [Ping timeout: 245 seconds]
<jhass> how's the crack today?
tag has joined #ruby
thumpba_ has quit [Ping timeout: 244 seconds]
zenith_ has quit [Remote host closed the connection]
jenrzzz has quit [Read error: Connection reset by peer]
ismaelga has joined #ruby
sinkensabe has joined #ruby
rhllor has joined #ruby
parduse has quit [Ping timeout: 265 seconds]
<phale> >> 1.upto(10) { |i| print i if i[0] == 0 }
<eval-in_> phale => 2468101 (https://eval.in/296791)
<phale> i don't get it
roolo has quit [Remote host closed the connection]
<phale> > 101
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass> >> 1.upto(10).map {|n| [n, n.to_s(2)] }
<eval-in_> jhass => [[1, "1"], [2, "10"], [3, "11"], [4, "100"], [5, "101"], [6, "110"], [7, "111"], [8, "1000"], [9, "1001"], [10, "1010"]] (https://eval.in/296796)
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
sambao21 has quit [Quit: Computer has gone to sleep.]
<jhass> stare at it for a while
<phale> looks like bits to me
Limix has quit [Quit: Limix]
iamjarvo has joined #ruby
<jhass> indeed
<phale> but 1.upto(10) iterates up to 10 right?
<phale> so why does it put a 1 at the end?
<jhass> because it returns 1
<phale> oh
<jhass> so that's just eval in
chthon has quit [Ping timeout: 246 seconds]
<jhass> more specifically upto returns the receiver
<jhass> if passed a block
Spami has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
Zai00 has quit [Quit: Zai00]
sinkensabe has quit [Ping timeout: 250 seconds]
wallerdev has quit [Quit: wallerdev]
InterCal has joined #ruby
triple_b has joined #ruby
User458764 has joined #ruby
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tcrypt has joined #ruby
sambao21 has quit [Client Quit]
Spami has joined #ruby
graydot has joined #ruby
<phale> oops wrong channel
Limix has joined #ruby
FooMunki_ has joined #ruby
d10n-work has joined #ruby
_honning_ has quit [Remote host closed the connection]
atomiccc has joined #ruby
dropp has joined #ruby
blazes816 has joined #ruby
mloveless has joined #ruby
tcrypt has quit [Read error: Connection reset by peer]
FooMunki_ has quit [Client Quit]
centrx has quit [Remote host closed the connection]
<InterCal> looks like the www.modruby.net domain has expired
shadoi has joined #ruby
<phale> >> b = Array.new; "hello".each_char {|s| b << s}
<eval-in_> phale => "hello" (https://eval.in/296804)
FooMunki_ has joined #ruby
ismaelga has quit [Remote host closed the connection]
dEPy has quit [Quit: (null)]
<jhass> InterCal: yeah, mod ruby is dead, it's passenger since many years
Mives has quit [Remote host closed the connection]
zachrab has joined #ruby
_djbkd has joined #ruby
jlebrech has quit []
Squarepy has joined #ruby
justin_pdx has joined #ruby
<apeiros_> phale: use [], not Array.new
<phale> why
<apeiros_> do you use Integer.new("12") or 12?
<phale> 12
FooMunki_ has quit [Client Quit]
<apeiros_> why?
<phale> it's shorter
<apeiros_> see
<phale> ok
n80 has quit [Quit: n80]
<apeiros_> you already know the answer :)
graydot has quit [Quit: graydot]
<apeiros_> the others: easier to read, easier for an interpreter to optimize.
lolmaus_ has joined #ruby
<wasamasa> there are situations though where the long form makes sense
ismaelga has joined #ruby
<apeiros_> yes, when you use new with arguments
droidburgundy has joined #ruby
<wasamasa> which is the case for hashes
centrx has joined #ruby
GnuYawk has quit [Ping timeout: 245 seconds]
<apeiros_> Array.new takes arguments too
<apeiros_> even a block
lolmaus has quit [Ping timeout: 250 seconds]
<phale> how do i get the alphabet position of a letter
<phale> like 'a'
graydot has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_> phale: what would a's position be?
n80 has joined #ruby
<phale> 1
<apeiros_> alpha = [nil, *'a'..'z'].each_with_index.to_a; alpha['a']
thebastl has quit [Quit: Leaving...]
<apeiros_> >> alpha = [nil, *'a'..'z'].each_with_index.to_a; alpha['a']
<eval-in_> apeiros_ => no implicit conversion of String into Integer (TypeError) ... (https://eval.in/296806)
<apeiros_> grah
<apeiros_> >> alpha = [nil, *'a'..'z'].each_with_index.to_h; alpha['a']
<eval-in_> apeiros_ => 1 (https://eval.in/296807)
commmmodo has quit [Quit: commmmodo]
<apeiros_> to_h, not to_a of course :)
<phale> cool
<ericwood> that's a nice use of splats :o
<ericwood> didn't realize you could splat inside arrays like that with ranges!!!!
Skif_ has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<centrx> >> [*'holy'..'guacamole']
<eval-in_> centrx => [] (https://eval.in/296808)
<ericwood> alternatively it could be [nil]+('a'..'z').to_a
timonv has quit [Ping timeout: 245 seconds]
<apeiros_> you can splat everywhere where you'd use a literal comma separated list
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Skif_ has quit [Client Quit]
<jhass> apeiros_: somehow I find .ord-right_value_always_have_to_look_up less gross :P
<apeiros_> ericwood: that'd need another paren around the whole expression before chaining
Takle has quit [Remote host closed the connection]
<ericwood> ah yeah
<apeiros_> jhass: in elder times you could just do -?a
* apeiros_ swings fist against this 1.9 change
<jhass> lol
GnuYawk has joined #ruby
<apeiros_> 18>> ['a'.ord-?a, 'b'.ord-?b]
<eval-in_> apeiros_ => undefined method `ord' for "a":String (NoMethodError) ... (https://eval.in/296809)
<apeiros_> oh, right, no ord in 1.8
<jhass> haha
<apeiros_> 18>> ['a'[0]-?a, 'b'[0]-?b]
<eval-in_> apeiros_ => [0, 0] (https://eval.in/296810)
<apeiros_> grah, STUPID!
<apeiros_> 18>> ['a'[0]-?a, 'b'[0]-?a]
<eval-in_> apeiros_ => [0, 1] (https://eval.in/296811)
Takle has joined #ruby
<apeiros_> yeah, well. still recovering from jogging. cheap excuse, I know. but valid!
<jhass> 18>> ?c-?a
<eval-in_> jhass => 2 (https://eval.in/296812)
tjohnson has quit [Quit: Connection closed for inactivity]
<jhass> >> [?c, ?a].map(&:ord).inject(:-)
<eval-in_> jhass => 2 (https://eval.in/296814)
anarang has quit [Quit: Leaving]
<jhass> hah, inject smiley face, beat that!
<ericwood> :-)
<phale> apeiros_
<phale> your program gives me enumerator thing error
<phale> 2:in `<main>': undefined method `to_h' for #<Enumerator:0x8e95590> (NoMethodError)
<apeiros_> phale: you're using an old version of ruby
<phale> i agree
<phale> what else do i use
<jhass> 2.2
<phale> cant
<phale> im on wheezy
<apeiros_> if you use old ruby versions, specify the version
<phale> 1.9.3p4
<apeiros_> I don't want to have to pull it out of your nose :-p
OrbitalKitten has joined #ruby
<apeiros_> oh dear, that's old.
<jhass> phale: consider RVM
<apeiros_> s/consider/immediately use/
<centrx> phale, upgrade to jessie
<phale> i'll do that
<phale> but give me a version of that for this version
<apeiros_> 19>> alpha = Hash[[nil, *'a'..'z'].each_with_index.to_a]
<eval-in_> apeiros_ => {nil=>0, "a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5, "f"=>6, "g"=>7, "h"=>8, "i"=>9, "j"=>10, "k"=>11, "l"=>12, "m"=>13, "n"=>14, "o"=>15, "p"=>16, "q"=>17, "r"=>18, "s"=>19, "t"=>20, "u"=>21, "v"=>22, "w" ... (https://eval.in/296821)
<apeiros_> phale: ^
<jhass> phale: when installing RVM, do it as your regular user as shown on rvm.io, don't use the package
<apeiros_> "but give me", how demanding…
Eiam_ has joined #ruby
<centrx> If you would be so kind, Sir RubyAlot
wallerdev has joined #ruby
monod has joined #ruby
xrlabs has joined #ruby
mjuszczak has joined #ruby
<apeiros_> centrx: you forgot to bow! you insensitive clod!
* centrx bows profusively
nahtnam has joined #ruby
SixiS has quit [Quit: SixiS]
cazrin has joined #ruby
f03lipe has quit [Quit: Leaving]
<shadoi> ('a'..'z').to_a.index('a') + 1
<shadoi> easier to read for me :)
<jhass> >> "ca".codepoints.inject(:-)
<eval-in_> jhass => 2 (https://eval.in/296822)
<apeiros_> shadoi: O(n) vs. O(1)
<apeiros_> if you only have to look up once, that's fine
<ericwood> >> :3
<eval-in_> ericwood => /tmp/execpad-0304d2e4933f/source-0304d2e4933f:2: syntax error, unexpected tINTEGER, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END (https://eval.in/296823)
<ericwood> boo
<phale> http://codepad.org/g6SZyg2C not working
<shadoi> apeiros: doesn't matter at that size :)
<phale> :(
<apeiros_> shadoi: the size is not the relevant part
febuiles has quit [Quit: febuiles]
centrx has quit [Remote host closed the connection]
lolmaus_ has quit [Quit: Konversation terminated!]
<shadoi> seems like a bad place to worry about optimization is all
<phale> I want it to do this:
<phale> xxx will output c
<phale> rrr should also output c
<apeiros_> shadoi: you say that without knowing anything about where it's used
SouL_ has joined #ruby
<apeiros_> or how it's used
mistermocha has quit [Ping timeout: 244 seconds]
<shadoi> apeiros: true enough, I suppose it could be in a high speed trading algorithm. But I highly doubt it. :)
<phale> apeiros_: please look at my program
sambao21 has joined #ruby
<phale> it is terribly wrong :(
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_> shadoi: doesn't need to be such an exotic case to matter
<apeiros_> if you're using it on a large enough dataset, it can be the difference between a minute and an hour running time.
<shadoi> sure
<shadoi> readability > optimization until it matters.
thumpba has joined #ruby
<apeiros_> and given that it costs me *zero* additional time to write my variant, I think *not* worrying about performance makes no sense.
<phale> apeiros_: pretty please?
<phale> pp?
mistermocha has joined #ruby
<apeiros_> phale: "not working" is not a helpful problem description
<phale> here's what I want sample input and output: xxxx AA
<apeiros_> helping: exceptions, expected output, actual output
<phale> should output
<phale> db
thumpba_ has joined #ruby
* IceDragon waves claw
<phale> but it doesn't
<IceDragon> phale: whats your problem, I'd be glad to help?
<phale> nvm
<phale> i found out the problem
<apeiros_> btw., re "readability": mine is in all places just `alpha[char]`, yours is `alpha.index(char) + 1` in all places.
<apeiros_> so IMO yours loses out in readability quickly if it's used in more than one place
<phale> yes but how do i make it work
mjuszczak has quit []
Limix has quit [Quit: Limix]
thumpba has quit [Ping timeout: 246 seconds]
<apeiros_> as for performance, the difference is actually less than I expected (and I'm pretty sure that it's better today than in older ruby versions): avg 3.4x, min: 1.4x, max: 5.3x
odigity has quit [Ping timeout: 265 seconds]
Limix has joined #ruby
<shadoi> apeiros: good point :)
<shadoi> re alpha[char]
Advocation has quit [Quit: Advocation]
tvw has quit [Remote host closed the connection]
<phale> nvm i found the problem
meschi has quit [Quit: Leaving]
<phale> the problem is that i coded it improperly
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
meschi has joined #ruby
tunaCanBruh has quit [Ping timeout: 252 seconds]
<jhass> who would've guessed
mjuszczak has joined #ruby
tubuliferous has joined #ruby
iceden has quit [Ping timeout: 264 seconds]
<phale> damn this sucks i cant figure out how to do this:
<phale> convert xxx to c, but in the same logic as others
<phale> xxxx should be d
<phale> etc
<apeiros_> phale: code?
wallerdev has quit [Quit: wallerdev]
rdark has quit [Ping timeout: 264 seconds]
<apeiros_> seems to me like you'd also want the opposite mapping. not 'a' -> 1, but 1 -> 'a'
<phale> yes!
jottr has quit [Ping timeout: 244 seconds]
<apeiros_> phale: and what about "xxx…xx".size # => 50
wallerdev has joined #ruby
<phale> hm
<phale> no
<phale> i need the opposite mapping
cazrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros_> well, for lengths 1-26, you can do `(string.size+96).chr`
x1337807x has joined #ruby
<apeiros_> >> str = 'xxxx'; (string.size+96).chr
<eval-in_> apeiros_ => undefined local variable or method `string' for main:Object (NameError) ... (https://eval.in/296838)
<apeiros_> >> str = 'xxxx'; (str.size+96).chr
<eval-in_> apeiros_ => "d" (https://eval.in/296839)
<phale> :o
<phale> thanks this was what i was looking for
<apeiros_> or:
justin_pdx has quit [Quit: justin_pdx]
Crazy_Atheist has quit [Quit: WeeChat 1.0.1]
<apeiros_> 19>> alpha = Hash[(1..26).zip('a'..'z')]; str = 'xxxx'; alpha[str.length]
<eval-in_> apeiros_ => "d" (https://eval.in/296841)
sargas has joined #ruby
tunaCanBruh has joined #ruby
tubuliferous has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has joined #ruby
odigity has joined #ruby
sdothum has joined #ruby
codecop has joined #ruby
ArchRogem has joined #ruby
sdothum has quit [Client Quit]
Takle has quit [Remote host closed the connection]
x1337807x has quit [Ping timeout: 255 seconds]
ndrei has quit [Ping timeout: 265 seconds]
sdothum has joined #ruby
doodleha_ has joined #ruby
monod has quit [Quit: Sto andando via]
doodlehaus has quit [Read error: Connection reset by peer]
sdothum has quit [Client Quit]
agarie has quit []
InterCal has quit [Quit: Page closed]
blackmesa has joined #ruby
kaiZen- has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sdothum has joined #ruby
<phale> >> 1.upto(10) {|i| print i if i[0] == 0}
<eval-in_> phale => 2468101 (https://eval.in/296845)
snockerton has quit [Quit: Leaving.]
gfawcettpq has quit [Ping timeout: 255 seconds]
<phale> >> 1.upto(methods.length) {|i| print i if i[1] == 0}
<eval-in_> phale => 1458912131617202124252829323336374041444548495253561 (https://eval.in/296846)
terlar has quit [Ping timeout: 264 seconds]
<phale> weird
sea_local has joined #ruby
triple_b has joined #ruby
wldcordeiro has joined #ruby
tvw has joined #ruby
centrx has joined #ruby
doodleha_ has quit [Ping timeout: 244 seconds]
jottr has joined #ruby
sea_local has quit [Client Quit]
elaptics is now known as elaptics_away
tvw has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
<gr33n7007h> >> (1..20).group_by {|i| i[0].zero? }
spider-mario has quit [Ping timeout: 240 seconds]
<eval-in_> gr33n7007h => {false=>[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], true=>[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]} (https://eval.in/296847)
CustosLimen has quit [Ping timeout: 272 seconds]
<gr33n7007h> I need to upgrade :(
<phale> >> RUBY_VERSION
<eval-in_> phale => "2.2.0" (https://eval.in/296848)
mjuszczak has quit []
<havenwood> 2.2.1 or bust!
jenrzzz has joined #ruby
<phale> i remember someone inputting a command to the bot that printed out the version "1.8.6"
<phale> not sure how
exadeci has quit [Quit: Connection closed for inactivity]
<havenwood> 18>> RUBY_VERSION
<eval-in_> havenwood => "1.8.7" (https://eval.in/296849)
x1337807x has joined #ruby
<phale> ah yes
<phale> why does that work
GnuYawk is now known as RoboSig
jottr has quit [Ping timeout: 246 seconds]
<havenwood> phale: charliesome made it work that way
<havenwood> or... it's a magical incantation
kirun has joined #ruby
<phale> 200>> RUBY_VERISON
<phale> 200>> RUBY_VERSION
RoboSig is now known as GnuYawk
justin_pdx has joined #ruby
<phale> weird
<gr33n7007h> 20>> RUBY_VERSION
<eval-in_> gr33n7007h => "2.0.0" (https://eval.in/296850)
<phale> 0>> RUBY_VERSION
<phale> grr
<jefus> 22>> RUBY_VERSION
<eval-in_> jefus => "2.2.0" (https://eval.in/296851)
<shevy> cool
rbennacer has joined #ruby
<shevy> 23>> RUBY_VERSION
jonr22 has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
<shevy> :(
<phale> 220>> RUBY_VERSION
<havenwood> shevy: phale => "2.3.0" (https://eval.in/lalalala)
<phale> !say test
<phale> >> help
<eval-in_> phale => undefined local variable or method `help' for main:Object (NameError) ... (https://eval.in/296852)
<havenwood> shevy: We just need to have a dedicated human evaler.
baweaver has joined #ruby
<phale> is this real?
_djbkd has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<havenwood> phale: the offtopicness is real
<phale> ok
<phale> wasn't intended on this channel anyways lol
baweaver has joined #ruby
fryguy9 has quit [Read error: Connection reset by peer]
ych4k3r has joined #ruby
fryguy9 has joined #ruby
_cake has joined #ruby
RandyT_ has quit [Quit: ZNC - http://znc.in]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has quit [Ping timeout: 265 seconds]
gfawcettpq has joined #ruby
n008f4g_ has joined #ruby
rdark has joined #ruby
RegulationD has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 245 seconds]
pork_clips has quit [Ping timeout: 256 seconds]
zachrab has quit [Remote host closed the connection]
zachrab has joined #ruby
amundj has joined #ruby
baweaver has quit [Ping timeout: 272 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mjuszczak has joined #ruby
marr has quit [Ping timeout: 250 seconds]
<IceDragon> 18>> RUBY_VERSION
<eval-in_> IceDragon => "1.8.7" (https://eval.in/296853)
* IceDragon gawks
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
thumpba_ has quit [Ping timeout: 265 seconds]
zachrab has quit [Ping timeout: 255 seconds]
green-big-frog is now known as frog|OFF
graydot has quit [Quit: graydot]
<phale> do i have to specify an email in a gemspec?
_whitelogger has joined #ruby
_whitelogger has joined #ruby
<centrx> phale, It's "MiniTest", with a capital T
<phale> oh
<phale> thanks
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros_> phale: and for future reference: "an error" is still a bad description. always gist the full exception you get.
<apeiros_> people love to help, but they hate having to extract basic information from you.
PaulCapestany has joined #ruby
momomomomo has quit [Quit: momomomomo]
<phale> i'm a nice guy
<phale> ;)
<shadoi> And google the error first :)
<apeiros_> good, then you'll remember that :-p
<shadoi> stackoverflow is surprisingly helpful
Meow-J has quit [Quit: Connection closed for inactivity]
<vhlfd> :p
<vhlfd> Points mean everything.
red_horned_rihno has joined #ruby
wldcordeiro has quit [Read error: Connection reset by peer]
pdoherty has quit [Quit: Leaving]
<phale> /usr/lib/ruby/vendor_ruby/rake/ext/module.rb:36:in `const_missing': uninitialized constant MiniTest::Test (NameError)
<phale> same error
zhan has joined #ruby
x1337807x has joined #ruby
Altonymous has joined #ruby
bootstrappm has joined #ruby
<baweaver> magic internet points are all that matter in life.
bootstrappm has quit [Client Quit]
<Altonymous> Assuming I have an array that I’m iterating over.. and I want to set a default when the array is empty. What’s the best way to do that?
<baweaver> >> a = Array.new { 1 }; a[5]
<eval-in_> baweaver => nil (https://eval.in/296871)
<Altonymous> When I say set a default I want to make sure at least one value is in the array
<Altonymous> I’m not declaring the array it’s passed in
<shadoi> phale: class ImageParserTest < MiniTest::Unit::TestCase
pipework has joined #ruby
<baweaver> array[index] ||= something ?
x1337807_ has joined #ruby
sinkensabe has joined #ruby
x1337807_ has quit [Max SendQ exceeded]
<baweaver> better though
<phale> it works
<Altonymous> In essence I want to ensure the block is executed.. I suppose I could set it beforehand, but I was trying to avoid that.
Advocation has quit [Quit: Advocation]
<phale> but now I get an error that there are no files that I put in my file
<baweaver> example?
x1337807_ has joined #ruby
x1337807_ has quit [Max SendQ exceeded]
<baweaver> (array.empty? [1] : array).each
jottr has joined #ruby
rbennacer has quit [Remote host closed the connection]
<baweaver> (array.empty? ? [1] : array).each
x1337807_ has joined #ruby
<Altonymous> I don’t want to actually modify the array I guess because it’s a global variable..
ghostpl_ has joined #ruby
x1337807_ has quit [Max SendQ exceeded]
drkush has quit [Remote host closed the connection]
<baweaver> that doesn't, and why are you using globals?
<shadoi> Altonymous: sounds like an code smell
x1337807x has quit [Ping timeout: 256 seconds]
Hirzu has quit [Remote host closed the connection]
kaleido has quit [Changing host]
kaleido has joined #ruby
x1337807x has joined #ruby
<Altonymous> It’s a config
x1337807x has quit [Max SendQ exceeded]
<Altonymous> config loaded on intialization and shared across many threads
<Altonymous> not modified.
Hirzu has joined #ruby
<phale> do I need to add the files that I will test on my Rakefile?
<phale> that I use for my class?
x1337807x has joined #ruby
<baweaver> then just use that empty check like above.
<shadoi> phale: see that link on stackoverflow I sent you, make sure the pattern it has matches where your files live.
<shadoi> Altonymous: so initialize it to a valid default at initial load time
<Altonymous> Right now I do .. local_config = $config[“foo”]; local_config ||= [default_value]; // then iterate
Stooge has joined #ruby
<Altonymous> The default can change based on which class queries it..
sinkensabe has quit [Ping timeout: 255 seconds]
<Altonymous> Essentially the config is acting as an override.. and I want it to default to the class name when no override is given
<phale> shadoi: even ones that aren't .rb files?
<shadoi> local_config = $config.fetch("foo", default_value)
rbennacer has joined #ruby
<phale> shadoi: it works for the .ptf file
<phale> but not for the ppm file
<phale> ..
droidburgundy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<shadoi> phale: I have no idea what you're trying to do. Tests are only ruby files.
droidburgundy has joined #ruby
x1337807_ has joined #ruby
snockerton has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
<Altonymous> shadoi that’s what I was looking for thanks
<Altonymous> I new there was a way couldn’t remember syntax
<baweaver> >> a = [1,2]; (a.empty? ? [1] : a).reduce(:+)
<eval-in_> baweaver => 3 (https://eval.in/296872)
<phale> shadoi: the test that I have opens a file
<baweaver> >> a = nil; (a.empty? ? [1] : a).reduce(:+)
<eval-in_> baweaver => undefined method `empty?' for nil:NilClass (NoMethodError) ... (https://eval.in/296873)
<shadoi> Altonymous: you can pass a block to fetch also if you need more logic for the default value or error handling.
<phale> and since it opens a file, it's telling me that it can't find it
x1337807_ has quit [Read error: Connection reset by peer]
<baweaver> >> a = nil; (a && a.empty? ? [1] : a).reduce(:+)
<eval-in_> baweaver => undefined method `reduce' for nil:NilClass (NoMethodError) ... (https://eval.in/296874)
<phale> so i need to include it somewhere
<baweaver> >> a = nil; (!a && a.empty? ? [1] : a).reduce(:+)
<eval-in_> baweaver => undefined method `empty?' for nil:NilClass (NoMethodError) ... (https://eval.in/296875)
<Altonymous> shadoi: right, it was the keyword fetch I was forgetting
x1337807_ has joined #ruby
<baweaver> ah Friday, coding skills are gone again
Hirzu has quit [Ping timeout: 250 seconds]
zeel has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shadoi> phale: check that you're using absolute paths or if it's relative that it's always relative to the code that's running in the current file.
<gr33n7007h> why does !p and !0 alias true and false respectively
<zeel> how do I escape quote characters in a CSV file for Ruby to parse, the gsub(/\"/, '""') solution does not work
x1337807x has quit [Ping timeout: 256 seconds]
a5i has quit [Quit: Connection closed for inactivity]
<phale> shadoi: not using absolute paths
<phale> if it were to be absolute, can you give an example of such path*?
<shadoi> gr33n7007h: !p means "unless p is defined" basically, and p is a method.
sambao21 has joined #ruby
<baweaver> >> p 1
<eval-in_> baweaver => 1 ... (https://eval.in/296876)
<centrx> p returns nil
febuiles has joined #ruby
<baweaver> false
<centrx> >> p
<eval-in_> centrx => nil (https://eval.in/296877)
<jhass> >> p
<eval-in_> jhass => nil (https://eval.in/296878)
<shadoi> gr33n7007h: 0 is just zero and is false-y
grrrr_ has joined #ruby
Juanchito has joined #ruby
<baweaver> when passed nil it does
<gr33n7007h> ah thanks shadoi :)
<jhass> shadoi: no 0 isn't falsey
<jhass> >> !0
<eval-in_> jhass => false (https://eval.in/296879)
anaeem1_ has quit [Remote host closed the connection]
<shadoi> sorry
<baweaver> >> !!0
<eval-in_> baweaver => true (https://eval.in/296880)
<shadoi> my bad
<baweaver> C / JS fun
<jhass> only nil and false
<shadoi> 0 is defined so it's not false is what I mean :)
<phale> shadoi:
<phale> give an example of this absolute path
<baweaver> the dangers of polyglotting.
cocotton has joined #ruby
<baweaver> /dev/null
<shadoi> This: /is/an/absolute/path
<shadoi> This: is/not
<phale> okay
<phale> so
<phale> if my gem is in a folder named foo, and theres another folder with the file bar in there, it would be
<phale> /foo/test/bar
jcromartie has joined #ruby
morenoh149 has joined #ruby
jmosco1 has joined #ruby
jherbst has joined #ruby
baweaver has quit [Remote host closed the connection]
<phale> nope still not working
<shadoi> Try this: require 'pathname'; Pathname.new(__FILE__).realdirpath + 'test/bar'
<shadoi> use irb so you can see what the realdirpath is
<jhass> >> __dir__
<eval-in_> jhass => "/tmp/execpad-daa88ae2a514" (https://eval.in/296881)
<jmosco1> is there a good plugin for vim that will allow me to see the available methods for objects?
<jhass> >> File.join(__dir__, "my_file")
<eval-in_> jhass => "/tmp/execpad-1ae1862cacb4/my_file" (https://eval.in/296882)
<phale> __dir__ wont work
anaeem1 has joined #ruby
<shadoi> jmosco1: I use pry
<phale> gives me that it doesnt exist or something
cajone has quit [Ping timeout: 240 seconds]
<shadoi> jmosco1: then launch vim via pry, works nicely
<jhass> phale: because you're still on a EOL'd ruby
<phale> give me an EOL'd directory checking method/variable then?
<jmosco1> shadoi: ok, looking at that now
jmosco1 is now known as jmosco
DEA7TH has joined #ruby
<jhass> phale: EOL means out of support, so no support there
jottr has joined #ruby
phale_ has joined #ruby
<shadoi> jmosco: gem install pry; pry -r 'code'
User458764 has joined #ruby
RegulationD has joined #ruby
<phale_> what happened?
<shadoi> then 'ls <object>' shows nicely formated info about the methods & variables
xaxisx has quit [Ping timeout: 255 seconds]
<shadoi> or: ? <object>
<shadoi> shows docs
blazes816 is now known as tcrypt
<phale_> shadoi:
<phale_> the 1.9.3p4 dir?
<phale_> ok found it
<phale_> i Did Dir.pwd
jottr_ has joined #ruby
tunaCanBruh has quit [Ping timeout: 245 seconds]
<zhan> how come openoffice doesn't open fucking .db
_ixti_ has joined #ruby
<shadoi> phale_: I definitely recommend using Pathname, it has lots of useful behavior
drkush has joined #ruby
phale has quit [Ping timeout: 272 seconds]
<shadoi> But yeah, that works
yfeldblum has joined #ruby
<shadoi> Although that may be the wrong path when you're talking about relative to a file in a nested directory structure, which is why you want __dir__ or __FILE__
<zhan> and how do i get fucking alive or in-line repl
<shadoi> zhan: pry
ixti has quit [Ping timeout: 246 seconds]
<zhan> thats stupid shit
<zhan> neither alive or in-line
RegulationD has quit [Ping timeout: 264 seconds]
<shadoi> require 'pry'; binding.pry
jottr has quit [Ping timeout: 256 seconds]
einarj has joined #ruby
<shadoi> wherever you want it to stop in-line
<zhan> "stop"?
<shadoi> interactive debugger prompt
<shadoi> with a full REPL
<zhan> yes
<zhan> how do i fucking get that
<shadoi> like I just fucking told you
OrbitalKitten has joined #ruby
<zhan> i don't fucking understand
workmad3 has quit [Ping timeout: 256 seconds]
rodfersou has quit [Quit: leaving]
<shadoi> gem install pry
<zhan> i have
<Beoran_> zhan, iy's a ruby debugger
<shadoi> then in your code: require 'pry'
Stooge has left #ruby [#ruby]
<shadoi> and where you want it to stop add: binding.pry
<zhan> nothing is fucking happening
<josiah14> zhan: is your code executing inside of a class?
<shadoi> it's probably not getting to where you think it is then, add it earlier.
<vhlfd> "nothing is fucking happening"
<zhan> its at the top
<josiah14> pry won't give you the context if you are at the top level of the program (like in a script with no claasses)
<josiah14> wrap your code in a class and then try
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<josiah14> I bet you pry will print the context, then
<josiah14> zhan^
ndrei has joined #ruby
<zhan> nothing
<josiah14> I ran into this problem before when writing scripts. It IS breaking, you just can't see where
PaulCapestany has quit [Quit: .]
<josiah14> but you should have access to all the objects
anaeem1 has quit [Remote host closed the connection]
* jhass complains that this uses up all his popcorn reserves
tunaCanBruh has joined #ruby
drkush has quit [Ping timeout: 265 seconds]
<zhan> jhass didn't tell me shit about
<shadoi> josiah14: it works fine with nothing except: require 'pry'; binding.pry
<phale_> my first gem
<zhan> i wrote that
<phale_> :DDD
PaulCapestany has joined #ruby
<zhan> well what the fuck
einarj has quit [Ping timeout: 244 seconds]
<josiah14> shadoi: I don't know what you mean
<jmosco> shadoi: I got it working, just not sure how to get the available methods to show up on objects
RegulationD has joined #ruby
phale_ has quit [Quit: Lost terminal]
<josiah14> shadoi: it works, but it won't give you your 10 lines of context if you aren't breaking inside of a class
<josiah14> so, with most programs, you would never enounter this, but in scripts where I never create a class for the main execution, I see this sort of stuff happens. Yes, it still works, but I can't tell where I am
<josiah14> anyway, it sounds like zhan has bigger problems
Crazy_Atheist has quit [Ping timeout: 240 seconds]
tunaCanBruh has quit [Client Quit]
werelivinginthef has quit [Remote host closed the connection]
<josiah14> zhan, can you verify that pry is installed?
<josiah14> you need to install in globally using RubyGems
<zhan> how
<havenwood> jhass: welp, posted my sorry attempt at justifying #itself with a block: https://bugs.ruby-lang.org/issues/10883
SixiS has joined #ruby
<shadoi> jmosco: ls <object>
x1337807_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> jhass: i neeeed it!
<shadoi> You can also cd in and out of contexts like a directory structure
freerobby has joined #ruby
replay has joined #ruby
whoughton has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> havenwood: haha, good luck :P
<havenwood> jhass: was wondering if it's worth proposing for crystal, or if #try suffices
cajone has joined #ruby
<jhass> havenwood: asterite's around ;)
<josiah14> zhan: you are free to ask questions here, but we expect that you be respectful and that you do the legwork (read the docs). We aren't held under any obligation to answer your questions
<havenwood> maybe i'll propose
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Crazy_Atheist has joined #ruby
<zhan> what am i suppose to do with the doc
marr has joined #ruby
<josiah14> read it - it tells you how to use your tools, zhan
Zai00 has joined #ruby
<zhan> yes it doesn't fucking convey anything to me
<josiah14> gem which will tell you if you have a gem installed
OrbitalKitten has joined #ruby
<havenwood> zhan: no more swearing for you.
<jhass> havenwood: I wonder if it actually makes more sense with crystal's block shortcut, can't think of anything adhoc though
<josiah14> zhan - then learn to read the doc
<zhan> maybe telling the command for checking if i install pry correctly is easier
triple_b has quit [Ping timeout: 245 seconds]
<josiah14> zhan: Find the location of a library file you can require <- that's not what that says to you?
<jhass> havenwood: since you could &.itself { }
<josiah14> what do you think happens if the location of the library you request can't be found?
<josiah14> it probably says not found
<jhass> havenwood: or even &.itself &.foo
joejoe221 has joined #ruby
<zhan> expecting end of input
<josiah14> I got that sentence from the documentation straight from here: http://guides.rubygems.org/command-reference/#gem-which zhan
mjuszczak has quit []
<josiah14> zhan, the format is 'gem which pry' without the quotes
<havenwood> jhass: mmmmmm
<zhan> it doesn't say that in doc
<zhan> oh right
<zhan> sry
<josiah14> yes it does
<josiah14> look at the usage section at the same link
<josiah14> gem which FILE [FILE ...] [options] :zhan
<josiah14> ^ zhan copied from the doc
<josiah14> like I said, learn to read the documentation first
<josiah14> you can't come here cussing at us without doing your due diligence to learn the Ruby ecosystem
<zhan> doesn't give me anything ;P
drkush has joined #ruby
<josiah14> doesn't give you anything or gave you an error message?
<zhan> nothing tried it different ways
<josiah14> gem which pry
<zhan> yes
<zhan> im not suppose to be doing it pry i suppose though
<zhan> will get to git bash
whoughton has quit [Ping timeout: 264 seconds]
<josiah14> yes, gem is a system level command, you can't run it from inside of pry without additional logic
<jhass> havenwood: https://github.com/manastech/crystal/blob/master/src/io.cr#L81 had to look twice at that one the first time :D
kyb3r_ has joined #ruby
<josiah14> zhan: You might also consider learning how to use your computer, as well (learn the command line)
<zhan> it gave me an adress
rbennacer has quit [Remote host closed the connection]
x1337807x has joined #ruby
<zhan> ill fry my nerves before i do
<josiah14> okay, which version of ruby is in the path you got?
<zhan> 2.1
rbennacer has joined #ruby
<zhan> i updated it...
<waxjar> zhan, you should get familiar with the command line, it'll make things a lot easier :)
<jhass> josiah14: pry has the gem-install command and you can escalate to your shell by starting with .
<josiah14> type ruby -v into bash
<zhan> 2.1.5
<josiah14> jhass: I know, but zhan isn't ready for that level of complexity, yet
<josiah14> okay, zhan, it looks to me like your ruby version and your pry version match
tier has joined #ruby
ismaelga has quit [Remote host closed the connection]
<josiah14> the other thing I guess is you need to make sure you execute your program with the pry command instead of the ruby command
<josiah14> so instead of $ ruby my_script.rb, you would type $ pry my_script.rb
<zhan> i did that says false
<josiah14> the $ represents the bash prompt, don't type that
<zhan> if youre talking about require 'pry'
<josiah14> no
<josiah14> your script
drkush has quit [Ping timeout: 256 seconds]
<josiah14> when you run it
<josiah14> you normally run it with ruby <your script name>
<josiah14> replace ruby with pry
amundj has joined #ruby
<josiah14> you have to run your scripts inside of pry if you want to debug
<zhan> i want to debug in editor
<josiah14> zhan: I'm also going to suggest that if you don't have the patience to learn your Operating System, programming is probably not the career for you
<zhan> ill fuck up my syntax and every other word and etc.
joejoe221 has quit [Quit: ZNC - http://znc.in]
Advocation has joined #ruby
<josiah14> zhan: give up the editor, the most common way to debug in Ruby is in the REPL, whether its IRB or PRY
<josiah14> if you want a full blown IDE, I suggest Ruby Mine
sargas has quit [Quit: Leaving]
<zhan> jessus christ
<zhan> how did no1 thought of telling me about that
<zhan> spend over a day looking for that
<josiah14> because most established ruby developers prefer not to use an IDE
<josiah14> we are very comfortable with the CLI
mjuszczak has joined #ruby
<josiah14> it's just not the way we do things :) -> we know what we know, we are not omniscient
<josiah14> I only know about RubyMine because I worked on a team where some people used that IDE. It was mostly former Java developers and .NET programmers who were moved into Ruby development who used RubyMine
<grrrr_> testing should stop you from making bugs to debug also :)
PaulCapestany has quit [Quit: .]
wald0 has quit [Ping timeout: 240 seconds]
Asher has quit [Quit: Leaving.]
PaulCapestany has joined #ruby
<josiah14> zhan: Another potential reason nobody told you about RubyMine is because your rude behavior caused people to ignore you
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<josiah14> zhan: Don't feel right not listing that out as a possibility
<zhan> i've been at it since yesterday
<zhan> and i have a lot of free time
<josiah14> zhan: is this your first language?
<zhan> like some of the shit that I ask and post you could tell id need IDE
<zhan> y
Kricir has quit [Remote host closed the connection]
<josiah14> zhan: because it changes my response
<zhan> ?
replay has quit [Ping timeout: 246 seconds]
nahtnam has quit [Quit: Connection closed for inactivity]
<josiah14> zhan: if this is your first language, then the response is, programming is hard
<havenwood> zhan: stop swearing in the channel.
<havenwood> zhan: your contributions to curses and insults ratio is getting lousy.
<josiah14> zhan: if this isn't your first language, then the response is learning a new programming language with a different way of doing things is hard
<havenwood> zhan: be patient, this is hard stuff.
<zhan> ty
<josiah14> zhan: expect to spend days troubleshooting your own problems, maybe weeks, until you get the hang of things. We all went through this process cursing under our breathe until we got comfortable in Ruby
<havenwood> indeed
<josiah14> zhan: our job is to teach you how to find what you need without our help (use google, read the docs, know your computer/Operating System are good starting places)
<bradland> If you can't manage `ruby myscript.rb`, your chances of correctly configuring and using RubyMine are not good
<josiah14> bradland: ++
<josiah14> bradland: +1 *
<bradland> even a good IDE requires you to learn how to use the IDE, and IMO, the command line tools are far simpler than RubyMine
<zhan> googled it, it doesn't define it
drkush has joined #ruby
<bradland> zhan: it sounds like your just getting started.
<bradland> my recommendation for anyone getting started is to start with the basics, and try not to rush headlong in to bigger problems until you understand the basics.
<josiah14> zhan: ^ implies, you will need a lot of patience and need to spend many hours before you 'get it' and using Ruby feels natural
mwlang has quit [Quit: mwlang]
<bradland> start with learning how the command line works
<bradland> this isn't the best place for that, because it's the ruby channel, but there are lots of places you can learn the command line
adriancb has quit [Read error: Connection reset by peer]
ZJvandeWeg1 has quit [Remote host closed the connection]
<bradland> at a minimum, you need to understand how to move around, how to execute programs, and how to pass arguments to those programs
<zhan> ill try my chances with getting away just by developing an app
<bradland> ok, well, in that case, gl;hf
<josiah14> zhan: suit yourself. typically, when I haven't listened to the established experts (like a lot of people here are), I end up putting myself through a lot of pain and then doing what they suggested to me anyway
<josiah14> zhan: but seriously, best of luck and happy hacking
<zhan> what is moving around?
<bradland> moving around the filesystem
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bradland> from directory to directory
imanzarrabian has joined #ruby
<josiah14> zhan: Google 'unix cd ls cp mv grep less cat'
<bradland> zhan: what OS are you on?
<zhan> windows
<bradland> ok, so those google phrases won't help you a whole lot
<josiah14> correct
<josiah14> I'm not even really sure how to use Ruby effectively in Windows
<josiah14> Windows seems like it was always kind of a second thought for the Ruby community
<zhan> well im developing a website app
<zhan> do i relaly need to get hardcore
<bradland> zhan: http://bit.ly/1wMqCII
<bradland> using the command line isn't hardcore
atomiccc has joined #ruby
<bradland> it's the basics
<josiah14> zhan: yes, you do. To become a programmer, you have to be all-in
<zhan> why do i need several directories
sinkensabe has joined #ruby
<bradland> the dream of developing applications through a GUI goes back a long way, but virtually everyone who has tried it has failed
<jhass> bradland: disapointed, I expected that to go through lmgtfy :(
hollywood has quit [Quit: Leaving]
<bradland> there are GUI tools that can help you along the way, but you won't be able to use them effectively until you understand what's happening behind the scenes
godd2 has joined #ruby
<bradland> jhass: considered it... lol
graydot has quit [Quit: graydot]
<bradland> i can't emphasize that enough zhan
danman has quit [Quit: danman]
<bradland> GUI tools *seem* like they'll be easier, but they aren't
<bradland> not at all
<josiah14> zhan: Even if you want to develop on Windows, if you want to deploy to something like Heroku, Heroku gives you a Linux shell, so you have to learn something Unix-like no matter what
<bradland> they end up generating tons of code that you won't understand
Channel6 has joined #ruby
Advocation has quit [Quit: Advocation]
<zhan> like on server side
<bradland> josiah14: is correct that if you're going to develop in ruby, you'll probably want to learn some basic linux, because the vast majority of ruby hosts are linux based
<bradland> you could use a service like heroku without knowing much linux though
<bradland> and you need to manage how much you're learning
The_Phoenix has quit [Read error: Connection reset by peer]
<bradland> so i would keep it simple
<josiah14> bradland: IDE's have their place. I did appreciate when Visual Studio C++ would drop me into the disassembly - helped me solve some strange errors in my early days (Assembly was my second programming language)
zachrab has joined #ruby
<bradland> certainly
<bradland> i'm not saying IDEs are bad, i'm saying they don't make things easier for beginners
adriancb has joined #ruby
<josiah14> bradland: this is true. You still have to know what's going on. I hated the process of learning all the configuration to get Visual Studio working well
<bradland> exactly
<bradland> not to mention, you end up asking yourself: is my IDE config broken, do I have a system issue, or is my app broken?
<bradland> with the base set of tools, you eliminate one of those three
dfinninger has quit [Remote host closed the connection]
<josiah14> bradland: +1
<zhan> so if you just take the code and stick it in editor you won't have same problems?
sinkensabe has quit [Ping timeout: 250 seconds]
<bradland> with an editor, you're only editing the text
Sou|cutter has joined #ruby
<bradland> your toolchain for running your app would be run from the command line
<bradland> all an IDE typically does is execute command line tools for you, but the environment for those commands is controlled by the IDE
<bradland> so you have to have your IDE configured correct
<bradland> *correctly
<zhan> good to know
<bradland> and if something isn't working, you have to look at what commands are being issued, and how to understand them
<bradland> hence the rabbit hold we're down now: you should learn the commands first :)
<zhan> im trying to get in touch with my old classmate
<zhan> hopefully he bullies through that
zachrab has quit [Ping timeout: 255 seconds]
<zhan> so the IDE does the debugging, how do i see what it returns
drkush has quit [Remote host closed the connection]
<josiah14> zhan: the IDE way of doing things is to flag lines as breakpoints in the editor, execution will halt at that point when you run the program through the IDE's run command, and then the way it gives you environment information depends on the IDE
<bradland> an IDE can do debugging, but it varies from tool to tool
<josiah14> some IDE's change layout and provide panes with information about your stack history, objects, and variables
MasterPiece has quit [Quit: Leaving]
<bradland> josiah14: +1 (that's how most -- including RubyMine -- do it)
<bradland> the visual debugger in RubyMine is absolutely fantastic
<josiah14> other IDE's might do it differently
sambao21 has quit [Quit: Computer has gone to sleep.]
<josiah14> bradland: that's good to hear a positive like that. I've always just used Pry, Vim, and Tmux as my 'IDE'
elaptics_away is now known as elaptics
<josiah14> using Guard and Spork in that mix is like heaven - Tmux notifications when something I wrote breaks a test, and then automatically bringing up the Pry REPL in heaven
<bradland> pry is my go to tool. i'll fire up RubyMine only if i'm really losing my mind.
<josiah14> hmm, I got my sentence mixed up, but I think the point is still recognizable
sambao21 has joined #ruby
<bradland> TracePoint is friggin incredible for >2.0 apps as well
<josiah14> this has been fun, but I have to get something done this afternoon
<bradland> if you haven't used the RubyMine debugger, you should absolutely try it some time though
<bradland> haha, good luck (TGIF)
drkush has joined #ruby
tier has quit [Remote host closed the connection]
skmp has joined #ruby
<josiah14> bradland: I may try it out sometime
<josiah14> right now, though, my job also requires me to know Scala, Spark, Hadoop, Node, Angular, and jQuery, all of which I have only really gotten exposed to in the past year
drkush has quit [Read error: Connection reset by peer]
zhan has quit [Quit: Page closed]
SixiS has quit [Quit: SixiS]
<dtordable> [josiah14] you mean spark of Ada?
it0a has quit [Ping timeout: 250 seconds]
decoponio has quit [Quit: Leaving...]
GaryOak__ has quit [Remote host closed the connection]
<josiah14> dtordable: Apache Spark for Streaming Big Data
<dtordable> ah ah
<josiah14> bradland: thanks for the luck :). off to work.
<dtordable> though it was that variant of Ada Language
<dtordable> secure programming
<dtordable> code over a convention and so
GnuYawk has quit [Ping timeout: 256 seconds]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cout has joined #ruby
imanzarrabian has quit [Quit: Textual IRC Client: www.textualapp.com]
dfinninger has joined #ruby
rbennacer has quit [Remote host closed the connection]
PaulCapestany has quit [Quit: .]
PaulCapestany has joined #ruby
Takle has joined #ruby
Morkel has quit [Quit: Morkel]
plashchynski has quit [Quit: plashchynski]
ferr has joined #ruby
rbennacer has joined #ruby
riotjone_ has joined #ruby
plashchynski has joined #ruby
zachrab has joined #ruby
workmad3 has joined #ruby
IrishGringo has joined #ruby
ntln has joined #ruby
ldnunes has quit [Quit: Leaving]
vifino has quit [Quit: Who turned this off?! D:<]
riotjone_ has quit [Ping timeout: 256 seconds]
<Sou|cutter> josiah14: That sounds a lot like something I'm embarking on
freerobby has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
<josiah14> Sou|cutter: I love it
fryguy has joined #ruby
rdark has quit [Quit: leaving]
<josiah14> Can't wait to get comfortable in Big Data with all the machine learning and data science
werelivinginthef has joined #ruby
jobewan has joined #ruby
GGMethos has quit [Quit: WeeChat 1.0.1]
<fryguy> i'm trying to write a function to merge hashes putting duplicates into an array. ie [{key: true}, {key: false}] would become {key: [true, false]}. I've been fumbling with enumerator methods and can't find a clean way to do this. any suggestions?
xaxisx has joined #ruby
<fryguy9> whoa...I thought *I* wrote this somehow o_O
<fryguy9> never seen another fryguy before :D
<josiah14> zip only works on lists
<zeel> oh
<josiah14> you would need to match by key
<fryguy> yah zip doesn't work here
<fryguy> and i can't get group_by (which this SEEMS like) to work either
<workmad3> fryguy: hsh1.merge(hsh2){|v1, v2| [v1,v2]}
<zeel> it was a wild guess, apologies
rbennacer has quit [Remote host closed the connection]
x1337807x has quit [Read error: Connection reset by peer]
<fryguy> workmad3: yah, you need to flatmap over something like that. it gets messy quickly
<workmad3> fryguy: throw a .flatten on the end there if you want to merge more than 2 hashes together and flattep them all
<fryguy> wondering if there is a simpler way
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
<fryguy> currently working with:
<fryguy> x.inject({}) {|memo, i| memo.merge(i) {|k, o, n| Array(o).push n}}
<fryguy> but that is just unreadable bad code
werelivinginthef has quit [Ping timeout: 252 seconds]
Zai00 has quit [Quit: Zai00]
<josiah14> you could do something like hash1.each_with_object({}) { |item, result| result[item.key] ? result[item.key] << hash2.value : [hash2.value] }
<josiah14> ^ untested fryguy
<fryguy> again, way too long and unreadable
rbennacer has joined #ruby
<josiah14> fryguy: that's long and complicated? Good luck finding something simpler
<workmad3> fryguy: not sure you're gonna get better than with 'ary_of_hsh.inject{|hsh, merged| merged.merge(hsh){|v1, v2| [v1,v2].flatten}}'
<zeel> does anyone know the regex gsub to escape a " in a CSV for ruby 2.2.0?
<workmad3> fryguy: or your current Array(v1) << v2
<zeel> gsub(/"/,'') is not the solution I want
<josiah14> fryguy: if you want something shorter-looking, you might try out Haskell or Lisp...
morenoh149 has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby
<workmad3> fryguy: if you want it clearer, you're gonna need to expand it out of a 1-liner
lxsameer_ has quit [Quit: Leaving]
GreenObsession has joined #ruby
IrishGringo has quit [Remote host closed the connection]
IrishGringo has joined #ruby
shevy has joined #ruby
AlexRussia has quit [Ping timeout: 255 seconds]
DEA7TH has quit [Ping timeout: 245 seconds]
jeff_laplante has joined #ruby
iliketurtles has joined #ruby
jmdade has joined #ruby
kapowaz_ is now known as kapowaz
Asher has joined #ruby
<jhass> fryguy: another trick is [item, *items]
kaiZen has joined #ruby
xaxisx has quit [Quit: xaxisx]
cocotton_ has joined #ruby
<shadoi> zeel: there are lots of corner-cases for parsing CSV, I think the parser has ways to deal with quotes.
xaxisx has joined #ruby
<apeiros_> somebody wants to roll their own csv parser?
rbennacer has quit [Remote host closed the connection]
<apeiros_> zeel: use the CSV class
<apeiros_> zeel: if you do it yourself and ask questions like this, you *will* do it wrong.
iamjarvo has joined #ruby
Macaveli has joined #ruby
<ddv> banging csv into submission like its 1999
reinaldob has quit [Remote host closed the connection]
Macaveli has quit [Max SendQ exceeded]
cocotton_ has quit [Read error: Connection reset by peer]
graydot has joined #ruby
cocotton has quit [Ping timeout: 256 seconds]
AxonetBE has joined #ruby
<AxonetBE> Today I had a strange behavior on my server, suddenly all request resolves in 500 error, no matter which controller and I got this in my stacktrace. I can't find anything on google about it. Somebody has an idea what it can be? https://gist.github.com/DriesS/3f9536f11fe778dc34d1
wallerdev has joined #ruby
<zeel> apeiros_: I am using the CSV class
Macaveli has joined #ruby
<apeiros_> zeel: then you don't have to escape anything yourself
<apeiros_> CSV does that for you
GreenObsession has left #ruby ["Leaving"]
cocotton has joined #ruby
<apeiros_> ddv: csv, that "simple" thing that is being done wrong since like 1980
rbennacer has joined #ruby
<zeel> unfortunately I work with data feeds that come into CSV that I have to parse as sane objects
<apeiros_> (microsoft interpreting "comma" as ";" doesn't help either)
<apeiros_> zeel: so?
<ddv> apeiros, yep
<zeel> the CSV feed doesn't have quote marks to delimit strings etc
<workmad3> apeiros_: or seeing 'CSV' and thinking 'hey, you know what would make this bettor? tabs!!!!'
<apeiros_> zeel: and I repeat: so?
<zeel> so one field has a sentence with " in
<zeel> cant seem to escape it using STDLIB CSV
<apeiros_> …
crack_user has quit [Quit: Leaving.]
<zeel> imagine having a field with inches
<zeel> 12"
<apeiros_> >> require 'csv'; CSV.parse(['hello " quote'].to_csv)
<eval-in_> apeiros_ => [["hello \" quote"]] (https://eval.in/296894)
<zeel> I cant gsub the original file with "" to escape this
red_horned_rihno has quit [Ping timeout: 240 seconds]
xaxisx has left #ruby [#ruby]
<apeiros_> zeel: do. not. escape. it.
ragingcake_ has joined #ruby
<apeiros_> as you can see above, csv lib does that just fine for you.
<apeiros_> workmad3: and throw in some encodings…
<apeiros_> of course, without any metadata to indicate the encoding.
<apeiros_> workmad3: also I'm not sure about choosing the escape sequence for " to be ""
<apeiros_> I guess still better than how you escape ' in bash ('\'')
GGMethos has joined #ruby
<workmad3> apeiros_: I think the RFC allows for arbitrary quote marks, with the criteria being that it's the first character in the field
<apeiros_> workmad3: can't be completely arbitrary
<zeel> gonna run a test with my current data
<workmad3> apeiros_: so given that, it kinda makes sense for a simple rule of simply doubling up the quote value as an 'escape'
<zeel> that stackoverflow suggestions suggest to escape using "" but I do not see this documented anywhere
<apeiros_> zeel: do you even read?
Hijiri has quit [Quit: WeeChat 1.0.1]
adriancb has quit [Read error: Connection reset by peer]
<apeiros_> YOU DO NOT ESCAPE IT. PERIOD.
<apeiros_> that's the libs job, and it does it better than you. sheesh…
<apeiros_> *lib's
<apeiros_> and yes, as said before, the csv lib will escape it (properly) as ""
Squarepy has quit [Remote host closed the connection]
<apeiros_> workmad3: na, `escaped = DQUOTE *(TEXTDATA / COMMA / CR / LF / 2DQUOTE) DQUOTE` and DQUOTE is "
<apeiros_> oh, wait, that's been updated
<bradland> use the force, zeel. let it flow through you.
adriancb has joined #ruby
<zeel> haha 1 sec still testing
<zeel> csv.rb:1874:in `block (2 levels) in shift': Illegal quoting in line 1.
nfk has quit [Quit: #gentoo-hardened happy now?]
fryguy9 has quit [Quit: Leaving.]
<bradland> ha! sounds like working with CSV to me.
<bradland> problem with CSV is there is no such thing as standard CSV
seitensei has quit [Quit: No Ping reply in 180 seconds.]
dfinninger has quit [Remote host closed the connection]
havenwood has quit []
5EXAAM0AM has quit [Quit: Leaving...]
<apeiros_> ok, the update does not change the ABNF. so only "
<apeiros_> bradland: there's RFC CSV. and anything not following it can go and burn in hell.
* apeiros_ looks at M$ products
fryguy9 has joined #ruby
adriancb has quit [Read error: Connection reset by peer]
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
eam has quit [Ping timeout: 264 seconds]
Sou|cutter has quit [Ping timeout: 256 seconds]
rcs has quit [Ping timeout: 264 seconds]
eam has joined #ruby
<zeel> apeiros_: try and get vendors to supply standardized CSV's ....
* apeiros_ hands zeel a bat
<apeiros_> have fun
<apeiros_> beat sense into their heads.
maletor has joined #ruby
rcs has joined #ruby
<apeiros_> also tell them that they should not call something CSV which is really "random blob of text interspersed with commas"
cpt_yossarian has quit [Ping timeout: 256 seconds]
xymbol has joined #ruby
<weaksauce> so I have some ruby plugin for macvim that pops up some documentation when you hover over a symbol but it keeps erroring anytime I move the mouse that dyld: lazy symbol binding failed: symbol not found _rb_str_new_static Referenced from .../ruby/2.2.0/.../json-1.8.2/... expected in : flat namespace. any ideas?
red_horned_rihno has joined #ruby
<ddv> weaksauce, ask the maintainer of that pluign
<workmad3> weaksauce: sounds like the ruby you compiled macvim against isn't visible anymore
<weaksauce> ddv I am not sure which plugin it is that is doing that tbh
adriancb has joined #ruby
<weaksauce> workmad3 that could be
roolo has joined #ruby
<weaksauce> though. I didn't compile this one
<workmad3> weaksauce: when I get that sort of error I typically rebuild through homebrew :)
<ddv> weaksauce, brew reinstall macvim?
<weaksauce> I didn't compile it through brew actually. just downloaded it from the net
ismaelga has joined #ruby
<shevy> recompile!
<ddv> you don't have to shout in shevy
<weaksauce> maybe one of the plugins is compiled... I'll blow out the plugin folder
<ddv> -in
<shevy> -out!
<ddv> !!!
<shevy> people need to embrace compiling thingies
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce> shevy I compile ycm fine.
<fryguy> jhass, I think your trick helped. Not sure how I feel about this, but: x.inject({}) {|i, n| i.merge(n) {|k, *v| v}}
<weaksauce> it's no big deal to compile things
<workmad3> weaksauce: ah you're using YCM? yeah, that'll probably need rebuilding
<workmad3> weaksauce: I stopped bothering with YCM because it was a PITA on that front :)
hgl has quit [Ping timeout: 246 seconds]
<weaksauce> well I removed ycm a while ago because of python issues.
<weaksauce> added it back in and got that resolved but somehow it borked my ruby.
<weaksauce> oh wait! I removed a ruby thing from my path that I thought was not needed
mjuszczak has quit []
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3> hehe
<workmad3> could be it was important? :)
Hijiri has joined #ruby
paulfm has quit [Quit: Zzzzz...]
<weaksauce> perhaps.
JDiPierro has quit [Remote host closed the connection]
hgl has joined #ruby
<zeel> apeiros_: You sir are a genius, I figured out the solution
<zeel> I had to read the file into an array
<zeel> for it to parse properly by CSV, doesn't like it raw
rhllor has quit [Quit: rhllor]
<zeel> Thank you sir
<bradland> zeel: i've seen that before too
<bradland> slurping in the file doesn't work, but going line by line does
<bradland> you know, that's probably a bug in the CSV lib
<apeiros_> zeel: that sounds odd…
<apeiros_> zeel: can you provide example input where that will happen?
<bradland> zeel, is this data that you could provide so taht we could try to replicate and open a ticket
<bradland> echo... echo... echo :)
<weaksauce> boom. dumb path issue
<apeiros_> cho… cho… cho…
<apeiros_> o… o… o…
ByronJohnson has quit [Quit: Restarting client.]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
majoh has quit [Quit: bam bam bam bam]
<zeel> apeiros_, bradland sure thing, give me a moment to format it all
ByronJohnson has joined #ruby
<zeel> would you prefer the data in a gist?
<apeiros_> zeel: yupp
<apeiros_> that'd be jolly nice :D
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
IrishGringo has quit [Ping timeout: 265 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
canton7 has quit [Quit: ZNC - http://znc.in]
iliketurtles has quit [Ping timeout: 255 seconds]
<bradland> you know, i seem to recall my issues having something to do with line endings... so a gist might not do the trick
snockerton has quit [Quit: Leaving.]
<bradland> in other words, we may not have issues with it because gist will reformat the line endings
<bradland> that really jogged my memory
<bradland> zeel, the issue isn't with the illegal quoting, it's that MS Excel generated CSV files are a shit show
<bradland> CSV.open doesn't handle the line endings well
<bradland> but File.readlines will
vifino has joined #ruby
<ragingcake_> can I put a $ gem server behing 127.0.0.1/gems?
jamgood9_ has joined #ruby
dfinninger has joined #ruby
Takle has quit [Remote host closed the connection]
IrishGringo has joined #ruby
Takle has joined #ruby
Macaveli has quit [Ping timeout: 264 seconds]
werelivinginthef has joined #ruby
<shevy> ragingcake_ I assume so, you have to run it locally
sarkis_ has quit [Quit: WeeChat 1.1.1]
<ragingcake_> I’m tyring to use nginx to do it but
<apeiros_> bradland: now that you say it - I remember having had issues with encodings. I could not use CSV.open, I had to use File.read to transcode and feed that to CSV.
<ragingcake_> no lck
<ragingcake_> only seems to work if its on the root context
<apeiros_> but I didn't investigate time, I might well have used it wrongly.
jamgood96 has quit [Ping timeout: 256 seconds]
<apeiros_> *invest
<shevy> gem_server --dir=/gems --daemon
<shevy> that should have worked in the old days
<ragingcake_> nice thank you
<shevy> or when it was webrick, one could mount servlets
thumpba has joined #ruby
<shevy> does not work for me either haha
ItSANgo has joined #ruby
<ragingcake_> hmm
<zeel> bradland: you're correct in the fact that I was doing File.open('products.csv').read
<zeel> that outputs it as a string where as readlines will output it as an array
dziegler_ has joined #ruby
thumpba_ has joined #ruby
<ragingcake_> ah how do I remove the ssl verify when adding gem sources!
thumpba__ has joined #ruby
spyderman4g63 has quit []
RegulationD has quit [Remote host closed the connection]
ItSANgo has quit [Client Quit]
mjuszczak has joined #ruby
Sou|cutter has joined #ruby
RegulationD has joined #ruby
grrrr_ has quit [Read error: Connection reset by peer]
brb3 has quit [Quit: <.<]
thumpba has quit [Ping timeout: 264 seconds]
thumpba_ has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
mjuszczak has quit [Client Quit]
plashchynski has quit [Quit: plashchynski]
<ddv> ragingcake_, fix your real problem
sivsushruth has quit [Ping timeout: 245 seconds]
imanzarrabian has joined #ruby
plashchynski has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
morenoh149 has joined #ruby
soulcake has quit [Quit: Quack.]
zorak8 has quit [Ping timeout: 265 seconds]
rbennacer has quit [Remote host closed the connection]
soulcake has joined #ruby
sivsushruth has joined #ruby
bMalum has quit [Quit: bMalum]
ItSANgo has joined #ruby
rbennacer has joined #ruby
centrx has quit [Remote host closed the connection]
canton7 has joined #ruby
canton7 has joined #ruby
rbennacer has quit [Remote host closed the connection]
bashusr has quit [Ping timeout: 246 seconds]
Asher has quit [Quit: Leaving.]
<apeiros_> zeel: I didn't miss your gist, right?
Azure has quit [Excess Flood]
jonr22 has joined #ruby
Azure has joined #ruby
workmad3 has quit [Remote host closed the connection]
VBlizzard is now known as _blizzy_
Azure has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
sevvie has quit [Ping timeout: 245 seconds]
<arclitgold> i'm having a tough time finding a good way to see if a system daemon is running in ruby
<arclitgold> i must not have my google fu with me today
d10n-work has quit [Quit: Connection closed for inactivity]
GaryOak_ has joined #ruby
rbennacer has quit [Remote host closed the connection]
<zeel> apeiros_: nope still doing more testing, this is very weird
sevvie has joined #ruby
<bradland> arclitgold: this is, uh, not new, but when i got started with Ruby, I was using it for systems management, and this helped: http://www.ibm.com/developerworks/aix/library/au-rubysysadmin/
<bradland> cfruby hasn't been updated in a long, long time, so no idea if it's still functional with supported versions of ruby
<bradland> there are other libraries like ohai that might do what you want though
jonr22 has quit [Ping timeout: 256 seconds]
febuiles has quit [Ping timeout: 246 seconds]
lanemeyer has quit [Ping timeout: 246 seconds]
<apeiros_> zeel: kk, might be afk in a bit
<zeel> ok no problem
<bradland> there are other libraries like ohai that might do what you want though
<bradland> derp, sry
<arclitgold> bradland: what about just using the standard lib?
rbennacer has joined #ruby
<bradland> arclitgold: afaik, the only way to do that with stdlib would be to shell out and parse the output of something like ps
<bradland> which wouldn't be horribly difficult
<bradland> if you know the location of something like the pid file, that would be helpful too, becaus eyou can simply read the contents of that pid file and use it to filter ps output
<arclitgold> ah i see
<arclitgold> ok - that's the way i was going but wanted to find a way to do it in pure ruby
febuiles has joined #ruby
<arclitgold> wonder why no one picks up cfruby anymore?
<arclitgold> maintains in i mean
nateberkopec has quit [Remote host closed the connection]
n80 has quit [Quit: n80]
jamgood9_ has quit [Remote host closed the connection]
jamgood96 has joined #ruby
<bradland> arclitgold: not sure, but you could probably learn a few tricks by digging around in the cfruby code
mistermocha has quit [Read error: Connection reset by peer]
<bradland> gem fetch cfruby will get the gem file
<bradland> which you can unpack and dig around in
mistermocha has joined #ruby
rbennacer has quit [Remote host closed the connection]
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
Guest123 has joined #ruby
Altonymous has quit [Quit: Altonymous]
<shevy> just like you dig up a corpse at night and dig into
<bradland> arclitgold: so... digging around a little in cfruby reveals lots and lots of `system command here`
<bradland> aaaaaand here comes shevy to make it weird
<shevy> hacks on top of hacks on top of hacks
<shevy> yeah!
elfuego has quit [Quit: elfuego]
<bradland> lol
leafybasil has joined #ruby
<bradland> not even past Q1 and we've met our grave robbing reference quota for the year
<arclitgold> haha awesome.
<shevy> 1.01 - April 23, 2008 (79 KB)
<shevy> k soon 7 years
justin_pdx has quit [Quit: justin_pdx]
<shevy> that probably does not even work on latest ruby versions
<arclitgold> so most people that are using ruby for system stuff are just shelling out with backticks,etc?
<shevy> YES
deric_skibotn has quit [Ping timeout: 245 seconds]
dfinninger has quit [Remote host closed the connection]
rbennacer has joined #ruby
HOrangeJewce has quit [Quit: Leaving.]
<arclitgold> \o/
<shevy> result = `ps aux`
rbennacer has quit [Remote host closed the connection]
<shevy> now you have a string which you can manipulate
<arclitgold> ya
<arclitgold> thanks!
<bradland> yeah, system administration tends to be full of warts
<shevy> yep, perl is still going strong there
<arclitgold> true - python has a few good libraries as well for udev and devices and such
<arclitgold> wish ruby did
<shevy> ack
<shevy> udev
<bradland> have you tried searching 'python library-name ruby alternative' ?
doodlehaus has quit [Remote host closed the connection]
<arclitgold> yep in the past... haven't needed those libs for a bit
AlexRussia has joined #ruby
<bradland> most of the ruby devops tools are good places to look too
<bradland> ohai, for example
mitchellhenke has quit [Quit: Computer has gone to sleep.]
tag has quit [Changing host]
tag has joined #ruby
<arclitgold> yeah, found some good stuff in puppet and chef too
<arclitgold> bradland: so no more systems stuff for you... what do you do now?
sgambino has quit [Remote host closed the connection]
<shevy> begging on the streets
<bradland> i still do some system stuff
<bradland> but since the "DevOps YEAH!" revolution, it's all through more modern tools
<arclitgold> what kinda tools you using?
Hijiri has quit [Quit: WeeChat 1.0.1]
<bradland> i'm kind of a nutter. i use sprinkle
Hijiri has joined #ruby
<bradland> i consider my systems disposable
<bradland> so instead of changing a system, i replace it
tubuliferous has joined #ruby
<bradland> meaning, for example, i don't migrate ruby versions, i just provision a new system, hit it with my build tool, then point everything at the new system
mistermocha has quit [Remote host closed the connection]
n80 has joined #ruby
<bradland> i'm looking at ansible a lot more lately though
<jhass> kind of where systemd is moving with read-only /usr and tmpfs /etc
<arclitgold> intersting! never had heard of sprinkle before
<bradland> idempotence is just too big of a pain in the ass for me
maximski has quit [Read error: Connection reset by peer]
<bradland> well, i mean, that's not entirely true. i just focus on making build scripts that are complete end-to-end
febuiles_ has joined #ruby
maximski_ has joined #ruby
roshanavand has quit [Ping timeout: 255 seconds]
<bradland> i *could* run them over and over, but technically they're not idempotent, because they'd be re-writing files and such
<bradland> but the system would still work
<bradland> sprinkle has some features that help with idempotence, but they're kind of limited
<bradland> i'm a bit irked with a recent change in the way file transfers are handled though
<bradland> all your "templates" have to go in a single folder
<bradland> which annoys the hell out of me
<bradland> i'm on an old version with a custom patch or two
febuiles has quit [Read error: Connection reset by peer]
FooMunki has joined #ruby
<bradland> this is on my reading list: https://github.com/ansible/ansible-for-rubyists
oki has joined #ruby
cocotton has quit [Quit: Leaving...]
<GaryOak_> with minitest how do I keep a variable that can be accessed throughout the tests?
mistermocha has joined #ruby
<bradland> awesome, thx zeel!
justin_pdx has joined #ruby
<zeel> np
juanpablo_ has quit [Quit: (null)]
centrx has joined #ruby
juanpablo_ has joined #ruby
x1337807x has joined #ruby
<zeel> bradland: fwiw, this is the minimum viable solution I can come up with, the method you talked about with readlines works, but that's because the string gets inserted into an array
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
werelivinginthef has quit [Remote host closed the connection]
hs366 has joined #ruby
<hs366> hi
riotjone_ has joined #ruby
<bradland> zeel: yep, this is similar to something i've run in to in the past. will dig around and see if i can arrive at a description suitable for a ticket.
werelivinginthef has joined #ruby
<zeel> bradland: thanks for being involved, much appreciated :)
<bradland> just hope it doesn't end up like the issue i filed on Net::SSH lol
<bradland> May 2013... still open @_@
<zeel> the other solution is manually reformatting the CSV using openoffice, but let's face it, that is not pragmatic enough for us devs :)
<bradland> yap
<bradland> that's the issue write-up
cphrmky has quit [Quit: Textual IRC Client: www.textualapp.com]
<bradland> if i ever find myself in search of a job, that's going on my resume... even though it's not an actual solution lol
werelivinginthef has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 252 seconds]
jeff_laplante has quit [Ping timeout: 265 seconds]
<zeel> haha indeed, this is the stuff that top paying employers look for
<zeel> but if you are fortunate enough to earn a living by not working for the man, keep it up :)
jbw_ has quit [Ping timeout: 255 seconds]
lkba has joined #ruby
riotjone_ has quit [Ping timeout: 250 seconds]
<bradland> zeel: can you have a look at your local copy of products.csv to see what kind of line endings are being used?
Drakevr has quit [Ping timeout: 265 seconds]
n80 has quit [Quit: n80]
sambao21 has quit [Quit: Computer has gone to sleep.]
<bradland> you should be able to just File.open('products.csv').read.inspect in a pry/irb session
<bradland> have a look for \n or \r
<bradland> or \r\n
<bradland> er something
<bradland> skip the .inspect part
<bradland> it'll double escape
phutchins has quit [Ping timeout: 272 seconds]
<hs366> Q: what is (/ ./) as a RegEx ?
<bradland> space followed by anything
<hs366> bradland, thx !!
<bradland> are you trying to write a regex, or understand someone else's regex?
kirun has quit [Quit: Client exiting]
<jhass> hs366: also chck rubular.com and regular-expressions.info
<hs366> I'm learning ruby from RubyMonk
<bradland> ok, as far as regular expressions go, that one is really, really broad
<zeel> bradland: line endings are \n as supsected
<hs366> jhass, thx for the links
<bradland> ok, that explains why
<bradland> zeel: ok, super
<zeel> bradland: why?
triple_b has joined #ruby
<bradland> sry, the "explains" msg was for hs366
<zeel> ahhh
<hs366> lol
<bradland> hs366: just an example: http://www.rubular.com/r/eNhxhVTsYG
<bradland> note that rubular shows you all matches for a regex
<bradland> depending on the ruby regex method you're using, you might only get the first match, or you might only get a true/false based on whether a regex match is found at all
<hs366> bradland, thats cool
mistermocha has joined #ruby
spicerack has quit [Changing host]
spicerack has joined #ruby
<jhass> mmh, I know nil or or a number, nil or MatchData, nil or String, what's returning true false?
spicerack has quit [Changing host]
spicerack has joined #ruby
<bradland> ok, ok. truthy/falsy :P
greenbagels has joined #ruby
<bradland> i don't know of any that return True or False
<jhass> oh
<jhass> >> "foo" !~ /foo/
<eval-in_> jhass => false (https://eval.in/296913)
<jhass> >> "foo" !~ /fob/
<eval-in_> jhass => true (https://eval.in/296914)
<jhass> there :P
<bradland> =~ is commonly used in a truthy/falsy context too
<jhass> yah
<bradland> heh, not sure i've ever used !~
<jhass> it's an odd one, yeah
Azure has joined #ruby
<godd2> !>, !<, !=, !~, !!
<bradland> a.k.a., Ruby's excitable operators
<bradland> (not really)
<godd2> Wait, I don't think those first two work
<wallerdev> lol
<wallerdev> !> is just <=
<wallerdev> no reason for !> to exist
<godd2> well, "hello" isn't greater than 2 either
<bradland> are you sure it's not !> - The 'ZOMG it's greater' operator
rhg135 has quit [Quit: ZNC - http://znc.in - making IRC 20% cooler]
<godd2> We should use >> for WAY bigger
<bradland> lol
<wallerdev> lol
roolo has quit [Remote host closed the connection]
<wallerdev> each > adds an order of magnitude
<wallerdev> 1000000 >>>>> 1
<godd2> 1000 >>> 1
<godd2> of course, if were using binary, 8 >> 2
<apeiros_> zeel: you should use File.read(path), not File.open(path).read. the latter leaves dangling file descriptors
wicope has quit [Read error: Connection reset by peer]
Rephiax has joined #ruby
<zeel> apeiros_: I think I was using File.read initially but thought that might have been the problem for the lack of parsing
<apeiros_> (not related to your problem, though)
hobodave has quit [Quit: Computer has gone to sleep.]
adriancb has quit [Read error: Connection reset by peer]
<apeiros_> zeel: yeah, that csv is invalid csv
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros_> so what you want to do is parse or sanitize invalid csv
<zeel> apeiros_: I know, due to lack of ""
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zeel> apeiros_: any suggestions on how to parse or sanitize?
<apeiros_> different situation than what I understood to be your situation
<shevy> godd2 do you remember your github link of that javascript game?
bashusr has joined #ruby
serivich has joined #ruby
<godd2> shevy you mean the demo or the code?
<zeel> this is what I thought the gsub for file read string would work, but the CSV lib is not accepting the escape
AxonetBE has quit [Quit: AxonetBE]
<apeiros_> zeel: how do you deal with invalid data? I'd seriously consider clubbing the party which emits this BLOB (it's NOT csv, and if they call it csv, ask them to fix or refund)
<shevy> godd2 I don't remember; I only remember you gave me a link a while ago, this time I will save it locally so I don't forget
CAP5562 has joined #ruby
<apeiros_> as for a work-around - depends on the total of your data
<shevy> thanks!
<godd2> :)
<apeiros_> I'd probably build a custom parser using StringScanner
<zeel> apeiros_: probably around 800 rows
<godd2> shevy I should probably bring the deps up to date on that
<zeel> to be honest, I prefer the readlines method as it keeps it more rubyistic
<apeiros_> zeel: how often do you have to import the data?
sambao21 has joined #ruby
dtordable has quit [Ping timeout: 245 seconds]
<apeiros_> I'm not quite sure how using readline helps you with this
<bradland> apeiros_: it doesn't
<bradland> not in my testing
codecop has quit [Remote host closed the connection]
<zeel> apeiros_: this is not an on-going problem, this is purely for my own experimentation on getting to grips with ruby idioms, but I ran into a case where I was doing a data import and would thought it would be great to investigate
<shevy> godd2 lol is the logo new?
<bradland> i can't parse this "CSV" no matter what
<bradland> zeel: what was the source of this CSV data?
<bradland> hand built, or from an app?
<shevy> dead chickens
adriancb has joined #ruby
<bradland> no joke
<zeel> bradland: I was supplied in an xls file
<shevy> aha!
jbw_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
<apeiros_> zeel: it doesn't accept it because escaped quote is only valid in a quoted field
<zeel> technically, I could just format it automatically using openoffice
<bradland> just the other day, a chicken ran across the road in front of our car, and we were not in a rural area
<godd2> shevy according to the commit log, I added it on Dec 10
<zeel> apeiros_: Yes I'm gathering that so far from my experimentations
<apeiros_> zeel: i.e. `foo,"bar""baz",quuz` # valid
<bradland> zeel: so you did file, save as csv in Excel?
<apeiros_> `foo,bar""baz,quuz` # invalid
<shevy> bradland cool. here it's all concrete and stone... a few green/grass areas, or small parks, with perhaps some birds, the occasional cat without an owner and perhaps a few mice, rats or squirrels... but no free chickens
<apeiros_> zeel: you can try plain split
<bradland> couple days later.... dead chicken in the road
<apeiros_> i.e. File.readlines(path).map { |line| line.chomp.split(/,/) }
<zeel> bradland: imported in open office, but it gives you the option to wrap text fields in quotes, which parses fine
CAP5562 has quit [Client Quit]
cjim_ has joined #ruby
<shevy> godd2 guess I did not see it yet! an artist is hiding in you!
<bradland> apeiros_: is a regex required? can't you do split(',')
<bradland> and save the overhead?
mjuszczak has joined #ruby
<apeiros_> bradland: using a string is the overhead ;-)
<bradland> hahaha, touche
<apeiros_> string arg to split is iirc converted to regex
<bradland> ha!
RegulationD has quit [Remote host closed the connection]
<bradland> i thought it might be like gsub vs tr
<bradland> where tr is faster
<bradland> helps to know your ruby internals though
<apeiros_> but the overhead is academic anyway
<shevy> benchmark!
<bradland> especially for 50 lines of csv lol
RegulationD has joined #ruby
iliketurtles has joined #ruby
<shevy> oh I have one :)
<bradland> i used to parse many, many geebees of CDR (call data records) once upon a time
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bradland> wherein i learned much about shevy's buddy benchmark
<shevy> unfortunately my tests will probably be skewed as my computer is like at max cpu...
<bradland> at one point, strptime was slower than strftime
<bradland> if you can believe that
mjuszczak has quit [Client Quit]
<shevy> I don't think I have ever had a test using strftime
<shevy> user system total real
<godd2> shevy haha thanks
<shevy> Testing: .tr 2.200000 0.000000 2.200000 ( 10.243753)
<zeel> this is some very interesting insights in regards to string vs regex for split :D
<shevy> Testing: .gsub 11.900000 0.010000 11.910000 ( 36.908549)
mjuszczak has joined #ruby
<shevy> Testing: .delete 2.100000 0.000000 2.100000 ( 6.642623)
<shevy> \o/
nicolastarzia has joined #ruby
<bradland> you passed the 3 line limit shevy
cjim has quit [Ping timeout: 246 seconds]
<bradland> keep an eye out for trout
<shevy> I guess I reshuffle that to put .gsub on top
<shevy> as it is the slowest
<shevy> bradland yeah I could have omitted .delete I guess
ismaelga has quit [Remote host closed the connection]
<shevy> wasn't a fair comparison
<shevy> but .tr beats .gsub's ass any time!
Limix has quit [Quit: Limix]
<bradland> bench us up some split(/,/) vs split(',')
<shevy> well, the pickaxe said that when we use a regex, we carry the regex engine with us and that one is slow
<shevy> but ok, I can do that!
kaiZen has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bradland> apeiros_ points out that split converts the string to a regex internally
<bradland> but i love being an underdog in a fight, so let's do this thign!
<zeel> haha
<shevy> well
<shevy> we could peek at the source code :-)
<bradland> psh
<bradland> cheater
<shevy> but I am preparing the benchmark as I type!
adriancb has quit [Remote host closed the connection]
<shevy> wow
<zeel> that map is not working correctly
<shevy> lol
<apeiros_> bradland: it may well be that I'm wrong, or no longer correct. been a while since I looked into that.
<shevy> I mixed up the desription for .split(/,/) versus .split(','), let me do that one again
<bradland> apeiros_ is hedging already
<bradland> i'm feeling spry!
<apeiros_> no, I'm looking at the code
<shevy> can the benchmark .report() method also report on the right side?
<shevy> look at the weird line I have...
<shevy> user system total real
qhartman has joined #ruby
<apeiros_> an empty string is converted to regex as it seems.
<shevy> Testing split with regex
<apeiros_> non-empty string use different split type
<shevy> anyway, the results are
<shevy> Testing split with regex 6.750000 0.000000 6.750000 ( 20.106591)
<shevy> Testing split without regex 2.620000 0.000000 2.620000 ( 7.994510)
<shevy> gah, not aligned properly
crueber has quit [Quit: Leaving.]
baweaver has joined #ruby
<apeiros_> yeah, string split does not convert regex. I wonder whether this changed or whether I misremember
<shevy> your brain is getting older!
<bradland> i'm betting it changed
<bradland> like i said, i've seen all kinds of weirdness
<bradland> no way strptime should be slower than strftime
<bradland> ever
<bradland> wait
<bradland> derp
<bradland> strptime vs parse!
<shevy> I don't remember having used strptime
<shevy> but I have used strftime extensively
<bradland> well then i suspect you breath through your mouth
<bradland> ignore my usage of strftime in the last 5 minutes
<bradland> i was mouth-breating, apparently
<bradland> it's strptime vs parse
<zeel> amazing to create such a debate over my trivial issues
<bradland> bro, this is IRC
<bradland> this is basically what it was created for
<apeiros_> hm? we're not really debating. are we? exchanging knowledge I'd say :)
<zeel> haha
FooMunki has quit [Quit: FooMunki]
<bradland> read 'em and weep!
<zeel> I normally use IRC to spew profanities in another channel, but this has proved to be more useful to the wealth of my brain
<shevy> well
<shevy> bradland that would actually confirm what the pickaxe said really
<bradland> i read somewhere that males relate to each other through a ritual of mock displays of dominance
<bradland> we may be in the midst of that
<zeel> aye
<shevy> bradland I am not going into the size comparison debate!!!
<bradland> size benchmark, engage!
<zeel> comradery.rb
<bradland> shevy, you might be interested in my use of a Fixnum argument to Benchmark::bm
fgo has joined #ruby
<shevy> well I may have some other benchmarks... let me see
<bradland> eliminates the need to manually format your report strings
<shevy> aha
ptrrr has quit [Quit: ptrrr]
<shevy> I also just discovered Benchmark.bmbm
Hijiri has quit [Quit: WeeChat 1.0.1]
IrishGringo has quit [Ping timeout: 252 seconds]
<bradland> i hate when i have a bmbm
elfuego has joined #ruby
<bradland> just when you think you're done, bam, another bm
<shevy> I don't know if this is a silly benchmark, it compares Interpolation to Appending, but here goes
jherbst has joined #ruby
<shevy> interpolation is faster than appending?
<bradland> Benchmark::bm shouuld accept -1 to auto-size the label
<shevy> oh wait...
<shevy> I think this may be because of '' ...
<apeiros_> it'd be nice if CSV had a try_parse/parse_broken/parse_invalid method, which accepts a couple of options to deal with the most common insanities
<bradland> apeiros_: indeed it would.
starless has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claw has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
<shevy> Has anyone of you ever had this crazy idea to add all the ways how the R programming language displays and manages data, into Ruby?
jherbst has quit [Client Quit]
<shevy> I'd rather want to write ruby than R :(
<claw> Hey there why do i have to run ObjectSpace.garbage_collect to get my memory freed ? i thoug gc would run periodicaly ?
odigity has quit [Ping timeout: 265 seconds]
<shevy> claw do you have to?
<apeiros_> claw: you shouldn't have to
<apeiros_> and yes, gc runs on its own. unless you disable it.
<claw> shevy i was searching for memory leak
cpt_yossarian has joined #ruby
baweaver has quit [Remote host closed the connection]
<shevy> cool
<claw> now i run gc periodically somewhre and memory is noticeable better
serivich has quit [Ping timeout: 255 seconds]
<claw> before i was growing and growing no its just fine
<godd2> shevy can you give an example of how R would display some data?
zachrab has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
narcan has joined #ruby
zachrab has joined #ruby
<shevy> godd2 hmm a moment
<shevy> godd2 first you fill up some data, then you can draw a plot like: plot(cars, type="o", col="blue")
mistermocha has joined #ruby
<godd2> kinda like excel?
<shevy> godd2 then it may look like this shevegen.square7.ch/R_PICTURE_01.png
<shevy> yeah kinda
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> the drawings/graphs are cool
<shevy> but I don't like the R syntax
<godd2> Oh I see
<shevy> where it excels is in statistics
greenbagels has quit [Read error: Connection reset by peer]
<godd2> surely there are graphing gems?
<shevy> you have a function like summary() in interactive R that really gives you all you want or need from a dataset
<shevy> > summary(array)
<shevy> Min. 1st Qu. Median Mean 3rd Qu. Max.
<shevy> 1.0 1.5 2.0 2.0 2.5 3.0
mistermocha has quit [Read error: Connection reset by peer]
<shevy> most of these things can be written in ruby just fine, the Math module should have most of the parts
<shevy> but I am unsure what to do with the graphic component
greenbagels has joined #ruby
zachrab has quit [Ping timeout: 246 seconds]
<bradland> kickcharts ?
<godd2> well how does R output?
<bradland> or whatever the gem is called
<godd2> to a jpg? or to some gui?
serivich has joined #ruby
<shevy> godd2 I think it can generate any file like .png and .jpg, let me look
<ponga> oh
<ponga> hi shevy!
<bradland> R was built for stats. you're probably not going to beat it with any general purpose language.
<bradland> Although Pandas is apparently sweet.
davedev24_ has quit [Ping timeout: 246 seconds]
lanemeyer has joined #ruby
<godd2> bradland surely a DSL can be crafted in Ruby for stats. but I'm not in that space so maybe it's harder than that
<shevy> png(filename="your/file/location/name.png")
<shevy> plot(fit); dev.off() # something like that will store it as a png file
davedev24_ has joined #ruby
<shevy> bradland dunno, why not? only consideration I could see is speed
<godd2> so instead of plot(cars, type="o", col="blue"), what would you want it to look like?
<godd2> cars.plot(type: "o", color: "blue") ?
<shevy> godd2 look at how many arguments a function in R can have :)
Megtastique has quit []
FooMunki has joined #ruby
Takle has quit [Remote host closed the connection]
zachrab has joined #ruby
<shevy> plot() has at least 8
mistermocha has joined #ruby
baweaver has joined #ruby
<shevy> bradland hmm does that work?
<bradland> i'm looking at the code now
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bradland> it's basically a DSL wrapped around gnuplot cli invocations
<bradland> so it's all pretty basic ruby
<shevy> the gnuplot images seem ok http://gnuplot.sourceforge.net/demo_4.4/
<bradland> i don't see why it wouldn't, unless there are some 1.8 specific hacks in there somewhere
odigity has joined #ruby
<bradland> gnuplot is incredible
<bradland> i mean, flatly incredible
<godd2> shevy click the more hyperlink above the plots on the right
<shevy> whisker plots!
<godd2> some of them are pretty sweet
<bradland> if you have X11, it can output to an X11 term too
<bradland> err, X11 window
<bradland> not term
juanpablo_ has joined #ruby
<bradland> although i think gnuplot will do ASCII plots
<shevy> that almost looks like a CAD program
<shevy> godd2 did I show you context free design (cfdg) yet?