havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
duckpuppy has quit [Ping timeout: 240 seconds]
firstdayonthejob has quit [Ping timeout: 252 seconds]
duncannz has quit [Ping timeout: 260 seconds]
atomical has joined #ruby
startupality has quit [Quit: startupality]
k3asd` has quit [Quit: leaving]
k3asd` has joined #ruby
k3asd` has quit [Client Quit]
k3asd` has joined #ruby
l_tonz has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
Silverfall has joined #ruby
Musashi007 has quit [Quit: Musashi007]
eminencehc has joined #ruby
l_tonz has joined #ruby
k3asd` has quit [Quit: Lost terminal]
_aeris_ has quit [Ping timeout: 260 seconds]
Success has quit [Quit: Page closed]
k3asd` has joined #ruby
k3asd` has quit [Client Quit]
k3asd` has joined #ruby
eminence_ has joined #ruby
Guest51228 is now known as Tristan-Speccy
eminencehc has quit [Ping timeout: 264 seconds]
_aeris_ has joined #ruby
k3asd` has quit [Quit: leaving]
maletor has quit [Quit: Computer has gone to sleep.]
k3asd` has joined #ruby
minimalism has joined #ruby
eminence_ has quit [Ping timeout: 272 seconds]
terminalrecluse has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
eminencehc has joined #ruby
eminencehc has quit [Remote host closed the connection]
spider-mario has quit [Remote host closed the connection]
agent_white has joined #ruby
<agent_white> Evenin' folks
_blizzy_ has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
<c355E3B> evening
symm- has quit [Quit: Leaving...]
symm- has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
eminencehc has joined #ruby
eminencehc has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
k3asd` has quit [Ping timeout: 264 seconds]
<havenwood>
maletor has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
maletor has quit [Client Quit]
h99h9h88 has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tyraeltong has joined #ruby
segfalt__ has joined #ruby
keen___________2 has joined #ruby
keen___________1 has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
sp4rrow has joined #ruby
<dreinull75> I can rescue inline for stuff like this: user.address.street rescue "Fail". Is it possible to rescue elsewhere? Like if user hits nil to end the chain immediately? (without changing user.address.street))
segfalt__ has quit [Ping timeout: 240 seconds]
<darix> dreinull75: active_support brings a try method
<dreinull75> darix sure, but then I'd have to change that line.
mistermocha has joined #ruby
<dreinull75> I know about monads and try and stuff. In this case I just want to stop execution of that line.
<dreinull75> Like rescue does.
tyraelto_ has joined #ruby
<darix> rescue doesnt stop execution
ibouvousaime has quit [Ping timeout: 268 seconds]
<shevy> anyone has some idea what my next (small) game should be about
<darix> it just guards the error and then returns Fail
<dreinull75> maybe not, but it does the job.
<dreinull75> I'd like to outsource that a bit
devoldmx has quit [Ping timeout: 260 seconds]
<dreinull75> I'm using a Null object that returns more Null objects but that doesn't look very smart
Musashi007 has joined #ruby
pdoherty has quit [Ping timeout: 268 seconds]
mistermocha has quit [Ping timeout: 246 seconds]
<shevy> "#FunFact: The original version of MYST was scripted and built using HyperCard."
<shevy> :D
<dreinull75> well, I need to sleep. The Null object does seem to be ok for now.
<shevy> it'll output more nulls as you sleep
momomomomo has joined #ruby
mostlybadfly has joined #ruby
spaceoddity has joined #ruby
stannard has joined #ruby
rgtk has joined #ruby
diegoaguilar has quit [Ping timeout: 264 seconds]
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
stannard has quit [Ping timeout: 246 seconds]
_blizzy_ has quit [Ping timeout: 250 seconds]
l_tonz has quit [Remote host closed the connection]
yfeldblum has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
cmoney has joined #ruby
weaksauce has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
djellemah_ has joined #ruby
spaceoddity has quit [Quit: Page closed]
rgtk has quit [Read error: Connection reset by peer]
<dreinull75> yes, I'm about to /dev/null for a while
rgtk has joined #ruby
<dreinull75> yes z
<dreinull75> :D
jwinder has joined #ruby
rgtk has quit [Read error: No route to host]
tyraeltong has quit [Quit: tyraeltong]
tyraelto_ has quit []
rgtk has joined #ruby
djellemah has quit [Ping timeout: 240 seconds]
rgtk has quit [Read error: No route to host]
yqt has quit [Ping timeout: 272 seconds]
l_tonz has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<Erik_Underline> Quick question, if I wanna set an instant variable to an empty hash, should I write @variable = [] or @variable = {} ?
diegoaguilar has joined #ruby
hxegon_ has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
benlieb has joined #ruby
l_tonz has quit [Ping timeout: 265 seconds]
hxegon has quit [Ping timeout: 256 seconds]
blue_deref has joined #ruby
<jhass> Erik_Underline: [] is Array, {} is Hash
<Erik_Underline> Ahh, I knew it was something wrong, thanks
<jhass> >> [[].class, {}.class] # how you can find out on your own in the future Erik_Underline
<ruboto> jhass # => [Array, Hash] (https://eval.in/460859)
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
djbkd has joined #ruby
<devbug_> ugh
<devbug_> i've now gone ahead and implemented a generic typespec system
rgtk has quit [Read error: No route to host]
stannard has joined #ruby
_blizzy_ has joined #ruby
rgtk has joined #ruby
ekinmur has joined #ruby
rgtk has quit [Read error: No route to host]
rbennacer has joined #ruby
rgtk has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
cmoney has quit [Remote host closed the connection]
zenguy_pc2 has quit [Ping timeout: 250 seconds]
juanpablo__ has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
l_tonz has joined #ruby
juanpablo__ has quit [Ping timeout: 244 seconds]
jmarchello has joined #ruby
_blizzy_ has quit [Quit: Leaving]
rgtk has joined #ruby
jmarchello has left #ruby [#ruby]
towski_ has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
stardiviner has joined #ruby
zenguy_pc2 has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
arooni has quit [Ping timeout: 240 seconds]
jgt has joined #ruby
rgtk has joined #ruby
cmoney has joined #ruby
momomomomo has quit [Quit: momomomomo]
arooni has joined #ruby
d5sx43 has joined #ruby
l_tonz has quit [Remote host closed the connection]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
jgt has quit [Ping timeout: 264 seconds]
SenpaiSilver has quit [Read error: Connection reset by peer]
keen_ has joined #ruby
Ox0dea has joined #ruby
<hxegon_> >> foo = proc { |a, b| a - b }; foo.curry(5).call(5)
<ruboto> hxegon_ # => #<Proc:0x407a7f34> (https://eval.in/460865)
keen___________2 has quit [Ping timeout: 240 seconds]
SenpaiSilver has joined #ruby
<hxegon_> >> foo = proc { |a, b| a - b }; (1..5).map(&foo)
<ruboto> hxegon_ # => nil can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/460866)
<hxegon_> >> foo = proc { |a, b| a - b }; [1, 2].map(&foo)
<ruboto> hxegon_ # => nil can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/460867)
<jhass> hxegon_: is there a question?
<hxegon_> yes, but hold a second
<jhass> ?experiment hxegon_
<ruboto> hxegon_, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<Ox0dea> >> eval ":#\nfoo"
<ruboto> Ox0dea # => :foo (https://eval.in/460868)
l_tonz has joined #ruby
d5sx43 has quit []
rgtk_ has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
<hxegon_> so why does foo.curry(5).call(5) return a proc, rather than 0?
<Ox0dea> &ri Proc#curry @ hxegon_
stamina has quit [Ping timeout: 240 seconds]
<Ox0dea> >> almost = proc { |a, b| a - b }.curry(5)[1][1][1][1]; almost[1] # hxegon_
<ruboto> Ox0dea # => 0 (https://eval.in/460873)
rgtk_ has quit [Read error: No route to host]
rodfersou has quit [Quit: leaving]
l_tonz has quit [Ping timeout: 240 seconds]
<Ox0dea> A curried Proc can't fully evaluate until it has received the number of arguments it expects.
rgtk has joined #ruby
devoldmx has joined #ruby
rrichardsr3 has joined #ruby
<hxegon_> Ox0dea: are you not giving it 5 arguments in that example though?
<hxegon_> Ox0dea: 6, sorry
<Ox0dea> hxegon_: No, the 5 is an argument to #curry telling the Proc how many arguments to expect/wait for.
<jhass> hxegon_: the argument to curry is the number of arguments to be expected
<hxegon_> Ox0dea: aaaah, soo
rrichardsr3 has quit [Max SendQ exceeded]
<jhass> >> foo = proc {|a, b| a - b }; foo.curry(2).call(5).call(4)
<ruboto> jhass # => 1 (https://eval.in/460884)
<jhass> >> foo = proc {|a, b| a - b }; foo.curry.call(5).call(4)
<ruboto> jhass # => 1 (https://eval.in/460886)
<hxegon_> >> foo = proc { |a, b| a - b }; foo.curry(2)[5]; foo.call(5)
<ruboto> hxegon_ # => nil can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/460888)
<Ox0dea> hxegon_: Proc#call is not destructive.
<Ox0dea> It doesn't mutate the receiver.
rrichardsr3 has joined #ruby
<Ox0dea> You'd have to reassign the variable to see the behavior you expected.
<hxegon_> slaps forehead
<hxegon_> ty Ox0dea, jhass
<Ox0dea> Happy to help.
rgtk has quit [Read error: No route to host]
<Ox0dea> I'm going to roll; the next one's a double if I don't get all Strings.
<Ox0dea> >> [*ObjectSpace.each_object].sample 3
<ruboto> Ox0dea # => ["<=", "autorequire", "\n"] (https://eval.in/460889)
<Ox0dea> God dammit.
moss_ has joined #ruby
rgtk has joined #ruby
moss_ has quit [Client Quit]
<hxegon_> >> 2/3
<ruboto> hxegon_ # => 0 (https://eval.in/460890)
<Ox0dea> hxegon_: Hm? Those're all Strings.
duckpuppy has joined #ruby
<hxegon_> I'm going to pretend I was checking to see if ruby automatically converts to float when approprate with division Ox0dea
rgtk has quit [Read error: No route to host]
<jhass> ?pry hxegon_
<ruboto> hxegon_, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<jhass> get it
<jhass> don't use the bot
<Ox0dea> jhass: Lighten up a little; it's Christmas.
rgtk has joined #ruby
<jhass> Ox0dea: where's my present?
<Ox0dea> jhass: I'm eating it.
<hxegon_> jhass: I thought he got 2/3 strings and was making a joke about it meaning he got 0%
<Ox0dea> ^
<jhass> Ox0dea: I don't think that's healthy
hmsimha_ has quit [Ping timeout: 265 seconds]
moss has quit [Ping timeout: 268 seconds]
<jhass> so you'll probably die from it. I can accept that as a replacement I guess
<Ox0dea> jhass: How do you know I didn't get you a pair of socks?
<jhass> How do you know you're eating the present you got for me instead of the one I got myself for me?
<Ox0dea> >> '2discordian4me'.gsub /\d/, &:succ
<ruboto> Ox0dea # => "3discordian5me" (https://eval.in/460891)
Jardayn has quit [Quit: Leaving]
<jhass> reminds me, I forgot the hotdogs last friday
duckpuppy has quit [Ping timeout: 250 seconds]
moretti has joined #ruby
<Ox0dea> I'm glad.
<Ox0dea> I hope you forget the hot dogs every Friday for the rest of your days.
rgtk has quit [Ping timeout: 260 seconds]
<jhass> so only the german hotdog for me in the future
hxegon has joined #ruby
<jhass> mh, english wikipedia can't decide to spell it hot dog or hotdog: https://en.wikipedia.org/wiki/Hotdog_%28disambiguation%29
cmoney has quit [Remote host closed the connection]
rgtk has joined #ruby
<jhass> "HotDog, an HTML editor", let's hope it only works on fridays
hxegon_ has quit [Ping timeout: 272 seconds]
<Ox0dea> I get ~47M vs. ~17M.
<jhass> I wonder if the plugin still works
<Ox0dea> Plugging hot dogs in where they don't belong is a serious offense in many jurisdictions.
vigintas has quit [Ping timeout: 250 seconds]
terminalrecluse has quit [Ping timeout: 250 seconds]
terminalrecluse has joined #ruby
moretti has quit [Quit: Leaving...]
rgtk has quit [Read error: No route to host]
rgtk_ has joined #ruby
jwinder has quit [Ping timeout: 250 seconds]
Scarthus is now known as Zarthus
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 240 seconds]
baroquebobcat has joined #ruby
rgtk_ has quit [Ping timeout: 260 seconds]
scampbell has quit [Quit: Leaving]
mikeharris22 has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
colegatron has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
x-light has joined #ruby
solocshaw has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
rgtk has quit [Read error: No route to host]
favadi has joined #ruby
RobertBirnie has joined #ruby
rgtk has joined #ruby
favadi has quit [Max SendQ exceeded]
StarBreaker has quit []
pwnd_nfsw has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 246 seconds]
RobertBirnie has quit [Ping timeout: 256 seconds]
hxegon has quit [Ping timeout: 256 seconds]
rgtk has quit [Ping timeout: 260 seconds]
asmodlol has quit [Ping timeout: 246 seconds]
solocshaw has joined #ruby
beast has joined #ruby
asmodlol has joined #ruby
hxegon has joined #ruby
rgtk has joined #ruby
pwnd_nsfw has joined #ruby
grotewold is now known as grotewold[afk]
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
<Ox0dea> > sbc are the initials of Sacha Baron Cohen, (in)famous for his portrayal of a particular European "G", a phonetic respelling of which might be "You're a PNG", that being compressible to "urapng", which is a deranged anagram of "Pangur". Pangur Bán is a famous white cat, and this is a Whitespace interpreter written in LOLCODE.
<Ox0dea> I have gone well and truly mad.
colegatron has joined #ruby
<Ox0dea> I suppose flipping the languages would be madder still.
rgtk has quit [Ping timeout: 260 seconds]
hxegon has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
rgtk has joined #ruby
rgtk has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
dorei has quit []
pdoherty has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
rgtk has joined #ruby
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
tmtwd has joined #ruby
pocketprotector- has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
<Ox0dea> Ha.
Oatmeal has quit [Ping timeout: 244 seconds]
atomical has quit [Ping timeout: 255 seconds]
mistermocha has joined #ruby
symm- has quit [Ping timeout: 268 seconds]
<Ox0dea> But mine makes at least a little bit of Satan-blessed sense, no?
rgtk has quit [Read error: No route to host]
rgtk_ has joined #ruby
<jhass> maybe
musou has quit [Quit: Connection closed for inactivity]
c355E3B has quit [Quit: Connection closed for inactivity]
tectonic has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
Oatmeal has joined #ruby
pocketprotector has quit [Ping timeout: 246 seconds]
rgtk_ has quit [Read error: No route to host]
rgtk has joined #ruby
IlIIlIII|I_snack has joined #ruby
pocketprotector- has quit [Ping timeout: 264 seconds]
<IlIIlIII|I_snack> j L b z ~ q M w t m 2 d H M y g n ( ! X C s y " 4 R f ] \ N ^ j o g C / ' y U * ? Z C
<IlIIlIII|I_snack> Y | A m ; D L E F B
<IlIIlIII|I_snack> . o y ' p [ ? T [ f V P W H ) B b D J < N T % " V $ d , I t I g { 9 u 6 w $ v { f x R
<IlIIlIII|I_snack> Q , ( ~ X / P g 8
<IlIIlIII|I_snack> 6 e I H ] Q * \ B x B Z - % C n ] : Z P r M W Z f : w / i ' U U ~ 9 . 3 t | u L b
<IlIIlIII|I_snack> ) C W C S E C D " z
<IlIIlIII|I_snack> w . ^ { $ # y O < r U + b ? g , v l q K - : A j v I Y L t " < [ C 8 N % N C E 6
<IlIIlIII|I_snack> Nothing but A ROOBY TOOB BLACK AZZ
<IlIIlIII|I_snack> " _ . 4 _ $ I & > z k
solocshaw has joined #ruby
<IlIIlIII|I_snack> ] ] ' M K \ $ J P e ) - b 8 ) t I q z 2 ( # Q - O T ] l + > G I ' m " H y ) b ! e ; <
<IlIIlIII|I_snack> M + = * b I ] @ Y u d
<IlIIlIII|I_snack> A W ; d ? ` : _ D Y z " O j 5 . & f + d \ - t B - W ' B Z X - k J @ Q U R X o 5 ` Z
<IlIIlIII|I_snack> N ~ . k u 9 I V V d 3
<IlIIlIII|I_snack> # ] g { s X x ) ^ ^ : ~ { o E > Q A [ c N H f z n { = x \ , Q * W P m f @ I C >
<IlIIlIII|I_snack> H | M 8 { = s # G b )
<Ox0dea> Well, this is interesting.
<IlIIlIII|I_snack> Q f c ! d A ) * d ) f | B : h h k O / D Q 1 N D l S ? k z = B | f k U & B , $ A + % K 2
<IlIIlIII|I_snack> Z H " X : I L . $ M
<IlIIlIII|I_snack> h d G ) - < = g a H @ O v - F d I , Q ^ J 9 S ` ] J l k & d , E x Z 5 \ I u [ C
<IlIIlIII|I_snack> h { < G P a d e % / ?
<IlIIlIII|I_snack> $ z _ i u h d i d E X + l R H Z = $ h + [ t t - \ S G ^ / D 3 \ $ U C K W L G Z C
<IlIIlIII|I_snack> " L " B j B k k - l
<IlIIlIII|I_snack> W B a K \ E R a @ 0 D d C * s | x n k M o y ) N ^ j S h b f a g z F " i = & e P v q
<IlIIlIII|I_snack> ! n ` J x ( n %
<IlIIlIII|I_snack> 8 S u { : d I j * ) s d x t \ e Z h - % o W U < F g s | I W G - h ~ @ T H t e _
<IlIIlIII|I_snack> S + 3 F F v < t T %
<tectonic> Wat?
<IlIIlIII|I_snack> D j . M e b j A F W { > v A + # p 2 Y - m \ v s Q y / y 9 c I $ " & - % / p b _ Y ] \
<IlIIlIII|I_snack> _ T ` z - X g > { V 6
<IlIIlIII|I_snack> p } S ; Z S ' ; < / " c x A ? e X + * { j d F [ e } s 4 ; ; . A v 0 b " 0 M 0 L < E x )
<Ox0dea> IlIIlIII|I_snack: Stop and have a chat?
<IlIIlIII|I_snack> | - P * { g i } T M V
<IlIIlIII|I_snack> Nothing but A ROOBY TOOB BLACK AZZ
<IlIIlIII|I_snack> P p h B | N & G N O t m h z m { j 2 + h Q W m C ^ D S _ E v L : Z : , X V O ^ # 8 u -
<IlIIlIII|I_snack> e n X c f z v M
<IlIIlIII|I_snack> ] e : J F i < 9 J I K b - P p $ e B w ` + % / ^ L Q 4 p S ~ o D $ \ \ G 8 Z v 5 { ; 0
<IlIIlIII|I_snack> f G o / b E x B h 6 I
<IlIIlIII|I_snack> r f = & ! y ; ? r k m u t ' B " \ ` @ k r U > @ Q + k A * } P \ ~ L : T 3 t Q (
IlIIlIII|I_snack has left #ruby [requested by jhass (Your behavior is not conductive to the desired environment.)]
<Ox0dea> But he made me feel like I was in the matrix!
tkuchiki has joined #ruby
roxtrongo has joined #ruby
<Ox0dea> I wish he knew how to do color.
<Ox0dea> jhass: *conducive, for reference.
<jhass> maybe he did, we got +c
tkuchiki has quit [Remote host closed the connection]
<xxneolithicxx> he just got k+o'ed
<Ox0dea> I have sufficient reason to believe that was just copied from a `cmatrix` run.
vigintas has joined #ruby
<Ox0dea> A proper spammer would've made some of them green.
rgtk has quit [Ping timeout: 260 seconds]
<jhass> xxneolithicxx: we're just late to the party, they've been roaming the network the whole day
<shevy> hmm
<shevy> can the economy stand the hit when IRC will be unavailable?
vigintas has quit [Ping timeout: 246 seconds]
rgtk has joined #ruby
<Ox0dea> shevy: IRC is used to coordinate Bitcoin-mining botnets, so definitely not.
Ulfalizer has quit [Ping timeout: 250 seconds]
Erik_Underline has quit [Quit: Page closed]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
pocketprotector has joined #ruby
juanpablo__ has joined #ruby
The_Phoenix has joined #ruby
segmond has quit [Ping timeout: 240 seconds]
x-light has quit [Ping timeout: 268 seconds]
roxtrongo has quit [Remote host closed the connection]
claw has quit [Ping timeout: 268 seconds]
diegoaguilar has quit [Remote host closed the connection]
rgtk has quit [Ping timeout: 260 seconds]
juanpablo__ has quit [Ping timeout: 260 seconds]
claw has joined #ruby
djbkd has joined #ruby
rbennacer has quit [Remote host closed the connection]
c_nick has joined #ruby
rgtk has joined #ruby
hxegon has joined #ruby
<c_nick> i want to iterate over a range of 1 to 10 .. such that for first 3 it should print "Hi" next two "Hello" then again next three "Hi" following two "Hello" and so on
<c_nick> So the range would be (1..10) hi hi hi hello hello hi hi hi hello hello
<Ox0dea> c_nick: Sounds like you want the flip-flop!
<Ox0dea> Or maybe even a trip-flop, which must surely be the most obscure Ruby "feature".
<c_nick> whats that .. I am not able to figure out in terms of % or /
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roxtrongo has joined #ruby
zenguy_pc2 has quit [Ping timeout: 260 seconds]
<Ox0dea> c_nick: You'd make it easier on yourself if you went from 0..9 instead of 1..10.
<c_nick> yeah a trip flop but how
<c_nick> hmm
darkf has joined #ruby
<shevy> lol
rgtk has quit [Read error: No route to host]
<shevy> Ox0dea you are doing a comedy show here on #ruby
<shevy> trip flops
rgtk has joined #ruby
<Ox0dea> c_nick: You don't actually need a trip-flop, of course.
<c_nick> Ox0dea: a 4th and 9th element would become 3rd and 8th
<Ox0dea> It's really very simple arithmetic, and you've already hit on the right operators.
<c_nick> oh
<c_nick> so u mean number % 3 == 0 set a flag and then based on that do what you want
<Ox0dea> c_nick: The optimal solution is stateless.
mikeharris22 has quit [Remote host closed the connection]
<Ox0dea> c_nick: Why `% 3`?
djbkd has quit [Ping timeout: 264 seconds]
<c_nick> after every 3rd element i want to change the print statement
segmond has joined #ruby
<Ox0dea> c_nick: Nope.
<c_nick> however 3 wont work
<Ox0dea> c_nick: Mod-3 will cut your 10-element Range into 3 1/3 "chunks", which is not the 2 you're looking for.
<c_nick> indeed
<Ox0dea> c_nick: So who's better than 3 for that part?
rgtk has quit [Read error: No route to host]
<c_nick> not getting :( i thought 2 but that doesnt ring a bell
rgtk has joined #ruby
<Ox0dea> >> 10.times.map { |i| i % 2 }
<ruboto> Ox0dea # => [0, 1, 0, 1, 0, 1, 0, 1, 0, 1] (https://eval.in/460901)
<Ox0dea> c_nick: That's five "chunks"; do you see them?
rrichardsr3 has quit [Quit: He who dares .... wins.]
<c_nick> > 10.times.map { |i| i % 4 }
<c_nick> >> 10.times.map { |i| i % 2 }
<ruboto> c_nick # => [0, 1, 0, 1, 0, 1, 0, 1, 0, 1] (https://eval.in/460902)
<c_nick> thats so dumb of me ofcourse it will be same
<Ox0dea> What're you talking about?
<c_nick> i % 2 and i % 4 will be similar results
<Ox0dea> ...
<c_nick> i thought of 5 but that would be 2 sets so how then i would bifurcate that into further two
<Ox0dea> c_nick: Baby steps.
tkuchiki has joined #ruby
<Ox0dea> Bifurcate, then bifurcate again.
<Ox0dea> >> 10.times.map { |i| i % 5 }
<ruboto> Ox0dea # => [0, 1, 2, 3, 4, 0, 1, 2, 3, 4] (https://eval.in/460903)
kp666 has quit [Ping timeout: 260 seconds]
kp666_ has joined #ruby
<c_nick> hmm
<c_nick> ok i'll try
<Ox0dea> c_nick: You should just stop and think about it.
<Ox0dea> It seems like you're just throwing shi^Wthings and hoping one sticks.
<shevy> just keep trying
quazimodo has joined #ruby
Channel6 has joined #ruby
<Ox0dea> Think until try becomes do.
rgtk has quit [Ping timeout: 260 seconds]
<Ox0dea> c_nick: What operation can you apply to {0,1,2} that'll be the same for every element and yet different from the result you'd get when applying it to {3,4}?
<shevy> c_nick and if you want to be done with it https://gist.github.com/shevegen/4a041ff9021893f89243
NeverDie has joined #ruby
jud has joined #ruby
<Ox0dea> >> 10.times.map { |i| %w'hi hello'[i % 5 / 3] } # shevy made me do this.
<ruboto> Ox0dea # => ["hi", "hi", "hi", "hello", "hello", "hi", "hi", "hi", "hello", "hello"] (https://eval.in/460914)
zenguy_pc2 has joined #ruby
atomical has joined #ruby
nitrix is now known as nitrix-or-treat
<c_nick> i was thinking on similar lines of 5 and 3 :) but in two different loops
<c_nick> but this is far better (one loop saved)
jgt has joined #ruby
<al2o3-cr> I knew it was that gif haha
<hxegon> hmm... why does def x a; a; end; x.to_proc give an argument error, but def x a; a; end.to_proc return a proc?
<c_nick> haha no no seriously.. but didnt think of a case :D hehe
<c_nick> thanks guys
JoshuaPaling has joined #ruby
genpaku has quit [Ping timeout: 260 seconds]
Musashi007 has quit [Quit: Musashi007]
rbennacer has joined #ruby
<Ox0dea> hxegon: `x.to_proc` is invoking the #x method with no arguments, but it expects one.
<Ox0dea> I suspect you want `:x.to_proc`.
<hxegon> Ox0dea: I guess that makes sense... [].map(&method(:foo)) right? thanks.
<Ox0dea> hxegon: And the latter works precisely because it's actually doing `:x.to_proc`; method definitions evaluate to their names.
<Ox0dea> hxegon: Right.
<jhass> hxegon: (def x a; a; end) value is :x
<Ox0dea> >> send def foo; :ohai; end
<ruboto> Ox0dea # => :ohai (https://eval.in/460919)
jgt has quit [Ping timeout: 252 seconds]
Channel6 has quit [Quit: Leaving]
SShrike has quit [Quit: Leaving]
<hxegon> Does ruby represent methods as :methods internally or is that just a quirk of #to_proc?
rbennacer has quit [Remote host closed the connection]
<Ox0dea> hxegon: There are Method and UnboundMethod classes for that.
<Ox0dea> Symbols are just used wherever it's reasonable to do so.
<jhass> Symbol#to_proc is basically def to_proc; proc {|x| x.public_send(self) }
leafybasil has quit [Remote host closed the connection]
rbennacer has joined #ruby
genpaku has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
mikeharris22 has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
eminencehc has joined #ruby
machan has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
eminence_ has joined #ruby
qiukun has joined #ruby
mikeharris22 has quit [Ping timeout: 246 seconds]
devoldmx has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 256 seconds]
<Ox0dea> Every Symbol has a backing String.
mikeharris22 has joined #ruby
<Ox0dea> And we can get all up in their base and nerf their dudes.
eminencehc has quit [Ping timeout: 255 seconds]
skcin7 has joined #ruby
pocketprotector has quit [Quit: WeeChat 1.2]
duckpuppy has joined #ruby
dopie has joined #ruby
gener1c_ has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
ziprar has joined #ruby
sysanthrope has quit [Quit: No Ping reply in 180 seconds.]
duckpuppy has quit [Ping timeout: 264 seconds]
gener1c has quit [Ping timeout: 260 seconds]
sysanthrope has joined #ruby
braincrash has quit [Quit: bye bye]
minimalism has quit [Quit: leaving]
zipace has quit [Ping timeout: 246 seconds]
rbennacer has quit [Remote host closed the connection]
<hxegon> More proc questions... why is this:
<hxegon> >> def foo a, b; a + b; end; bar = :foo.to_proc; bar[1]
<ruboto> hxegon # => private method `foo' called for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/460924)
<hxegon> sorry: this
<hxegon> >> def foo a, b; a + b; end; bar = :foo.to_proc; bar.curry[1]
<ruboto> hxegon # => private method `foo' called for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/460925)
<hxegon> different from this
<hxegon> >> foo = proc { |a, b| a + b }; foo.curry[1]
<ruboto> hxegon # => #<Proc:0x42057f84> (https://eval.in/460926)
solocshaw has joined #ruby
xxneolithicxx has quit [Ping timeout: 272 seconds]
lavros has joined #ruby
braincras has joined #ruby
xxneolithicxx has joined #ruby
<Ox0dea> hxegon: The former is calling #foo *on* 1, whereas the latter is calling it *with* 1.
<Ox0dea> Methods defined at the top level become private methods on Object.
<Ox0dea> hxegon: How're you gonna remember all this shit?
tkuchiki has quit [Remote host closed the connection]
<hxegon> Ox0dea: on my pry I'm getting ArgumentError...
tkuchiki has joined #ruby
<Ox0dea> hxegon: Awesome; gimme a second to read your mind to figure out to which example you're referring.
l_tonz has joined #ruby
<hxegon> >> def foo a, b; a + b; end; foo.to_proc.curry[1]
<ruboto> hxegon # => wrong number of arguments (0 for 2) (ArgumentError) ...check link for more (https://eval.in/460927)
<hxegon> ...
<Ox0dea> hxegon: Procs are not methods...
<Ox0dea> >> def foo a, b; a + b; end; foo # You're doing this, so the rest is noise.
<ruboto> Ox0dea # => wrong number of arguments (0 for 2) (ArgumentError) ...check link for more (https://eval.in/460928)
davedev24 has quit []
gix has quit [Ping timeout: 240 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
<Ox0dea> hxegon: I suspect you must be coming from a language in which you can obtain a reference to a method/function simply by mentioning its name, but that's just not the case in Ruby; mentioning a method's name invokes the method.
<Ox0dea> This is entirely a byproduct of optional parentheses for method invocation.
<hxegon> Ox0dea: I learned currying and partial application in haskell, so that is probably why
solocshaw has joined #ruby
l_tonz_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
peteykun has joined #ruby
<hxegon> I'm going to reread some docs a few times...
gix has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
houhouli_ has joined #ruby
<shevy> lol
<Ox0dea> It's the only meme I know how to use. :<
<shevy> you are just too sceptic about those new IRC nicks!
houhoulis has quit [Ping timeout: 260 seconds]
solocshaw has quit [Remote host closed the connection]
favadi has joined #ruby
solocshaw has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
OrbitalKitten has quit [Read error: Connection reset by peer]
OrbitalKitten has joined #ruby
moss has joined #ruby
<hxegon> foo.to_proc should have been :foo.to_proc if that makes a difference
h99h9h88 has joined #ruby
<hxegon> it doesn't in my pry though
<Ox0dea> Bollocks.
solocshaw has quit [Ping timeout: 246 seconds]
<Ox0dea> You confused yourself by having a method and a Proc with the same name alive at the same time.
kp666_ has quit [Ping timeout: 244 seconds]
kp666 has joined #ruby
x-light has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stannard has quit [Remote host closed the connection]
<hxegon> why doesn't :foo.to_proc.curry work? If i'm being thick I apologize
<Ox0dea> hxegon: What's `foo` there?
xantik has quit [Read error: Connection reset by peer]
<hxegon> def foo a, b; [a, b]; end
diegoaguilar has joined #ruby
solocshaw has joined #ruby
<hxegon> Ox0dea: arbitrary top level multi arg method
quazimodo has joined #ruby
x-light has quit [Ping timeout: 255 seconds]
<Ox0dea> hxegon: And you maintain that it's giving you an ArgumentError and not a NoMethodError by dint of your trying to invoke a private method?
tref has joined #ruby
<Ox0dea> hxegon: Does this help at all? https://eval.in/460933
favadi has joined #ruby
bluOxigen has joined #ruby
<hxegon> Ox0dea: http://imgur.com/y22NuF1
trosborn has joined #ruby
tenderlove has quit []
bluOxigen has left #ruby [#ruby]
<Ox0dea> [1] pry(main)> def foo a, b; [a, b]; end; :foo.to_proc.curry[1]
<Ox0dea> NoMethodError: private method `foo' called for 1:Fixnum
jamto11 has joined #ruby
<Ox0dea> hxegon: Ruby version?
<hxegon> 2.2.3
<hxegon> Ox0dea: 2.2.3
<Ox0dea> hxegon: You have a demon in your computer.
l_tonz_ has quit [Remote host closed the connection]
<hxegon> Ox0dea: fucking os x
grotewold[afk] is now known as grotewold
moss has quit [Quit: QUITTING]
<al2o3-cr> I get argument error too
elcontrastador has joined #ruby
vigintas has joined #ruby
<Ox0dea> ~ $ ruby -ve 'def foo a, b; [a, b]; end; :foo.to_proc.curry[1]'
<Ox0dea> ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
<Ox0dea> -e:1:in `[]': private method `foo' called for 1:Fixnum (NoMethodError)
kp666 has quit [Ping timeout: 240 seconds]
<Ox0dea> hxegon: Patch level 173 too, presumably?
mikeharris22 has quit [Remote host closed the connection]
<hxegon> Ox0dea: ummm
<hxegon> $ pry --version #=> 2.2.3
<Ox0dea> This fucking guy.
<hxegon> $ ruby --version 2.0.0p645
<hxegon> $ rbenv global => 2.2.3
tenderlove has joined #ruby
<hxegon> so yes, my computer is haunted
<Ox0dea> hxegon: Do you see the problem?
tenderlove has quit [Remote host closed the connection]
mistermocha has joined #ruby
dikaio has joined #ruby
tenderlove has joined #ruby
vigintas has quit [Ping timeout: 256 seconds]
<hxegon> Ox0dea: not besides using os x
<hxegon> Ox0dea: I mean there is the ruby --version being wierd
tenderlove has quit [Client Quit]
quazimodo has quit [Ping timeout: 244 seconds]
<hxegon> Ox0dea: I'm getting the private method error when I ruby -ve '...'
mistermocha has quit [Ping timeout: 246 seconds]
leafybasil has joined #ruby
Puck6633 has quit [Read error: Connection reset by peer]
Puck6633 has joined #ruby
juanpablo__ has joined #ruby
darkf_ has joined #ruby
<Ox0dea> 19>> def foo a, b; [a, b]; end; :foo.to_proc[1] # hxegon
<ruboto> Ox0dea # => private method `foo' called for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/460950)
tref has quit [Quit: tref]
<Ox0dea> As you can see, this snippet has done "The Right Thing" all the way back to 1.9.
moss has joined #ruby
elcontrastador has quit [Quit: Textual IRC Client: www.textualapp.com]
leafybasil has quit [Ping timeout: 252 seconds]
darkf has quit [Ping timeout: 240 seconds]
<al2o3-cr> Ox0dea: Messing around in fiddle, if the args to c function are char * would that be Fiddle::TYPE_VOIDP ?
elcontrastador has joined #ruby
<Ox0dea> al2o3-cr: Should do, yep.
<hxegon> Ox0dea: that error message makes me understand
<al2o3-cr> Ox0dea: Ok, cheers
<Ox0dea> hxegon: It's the same message we've seen about a dozen times now.
bruno- has joined #ruby
to_json has quit [Quit: Leaving.]
dikaio has quit [Ping timeout: 250 seconds]
juanpablo__ has quit [Ping timeout: 256 seconds]
pontiki has joined #ruby
quazimodo has joined #ruby
purplexed- has joined #ruby
purplexed- has joined #ruby
<purplexed-> goodmorning
<blubjr> hi purple x ed
<pontiki> hi
<Ox0dea> al2o3-cr: https://eval.in/460954
baweaver has joined #ruby
tekacs has quit [Ping timeout: 268 seconds]
<Ox0dea> pontiki! \o http://i.imgur.com/jtNQaUc.jpg
bruno- has quit [Ping timeout: 240 seconds]
<al2o3-cr> I hope that place has WiFi
EvilJStoker has quit [Ping timeout: 256 seconds]
[spoiler] has quit [Ping timeout: 256 seconds]
Takumo has quit [Ping timeout: 272 seconds]
oddmunds has quit [Ping timeout: 268 seconds]
jbw has quit [Ping timeout: 244 seconds]
kaspergrubbe has quit [Ping timeout: 244 seconds]
nrk has quit [Ping timeout: 256 seconds]
adamholt has quit [Ping timeout: 250 seconds]
nixmaniack has joined #ruby
Guest9865 has quit [Ping timeout: 250 seconds]
<al2o3-cr> letme try strlen in fiddle
dikaio has joined #ruby
Drakevr has quit [Ping timeout: 240 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
EvilJStoker has joined #ruby
[spoiler] has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<hxegon> >> def foo a, b; a + b; end; method(:foo).to_proc.curry[1]
<ruboto> hxegon # => #<Proc:0x40e4bf5c (lambda)> (https://eval.in/460959)
keen_ has quit [Ping timeout: 246 seconds]
keen_ has joined #ruby
tekacs has joined #ruby
lucas has joined #ruby
xantik has joined #ruby
jbw has joined #ruby
oddmunds has joined #ruby
adamholt has joined #ruby
moss has quit [Quit: QUITTING]
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
<Ox0dea> >> [:==.class, method(:==).class] # hxegon
<ruboto> Ox0dea # => [Symbol, Method] (https://eval.in/460961)
<Ox0dea> As such, they can (and obviously do) have different implementations of #to_proc.
kaspergrubbe has joined #ruby
darkf_ is now known as darkf
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xantik has quit [Max SendQ exceeded]
Drakevr has joined #ruby
<al2o3-cr> strlen in fiddle?
moss has joined #ruby
jamto11 has quit [Remote host closed the connection]
nixmaniack has quit [Remote host closed the connection]
xantik has joined #ruby
towler has quit [Ping timeout: 268 seconds]
techsethi has joined #ruby
zenguy_pc2 has quit [Ping timeout: 244 seconds]
<al2o3-cr> fiddle is good :)
moss has quit [Client Quit]
quazimodo has quit [Ping timeout: 250 seconds]
fedexo has joined #ruby
<Ox0dea> al2o3-cr: strlen() in Fiddle.
moss has joined #ruby
xantik has quit [Max SendQ exceeded]
<Ox0dea> I do so love being able to thaw frozen objects; it's just so naughty.
kp666 has joined #ruby
<al2o3-cr> :)
<Ox0dea> hxegon: Do you like Haskell's list comprehensions?
Lucky__ has joined #ruby
arup_r has joined #ruby
freerobby has quit [Quit: Leaving.]
towler has joined #ruby
nixmaniack has joined #ruby
<Ox0dea> What's strange is that https://eval.in/460962 gives 11 on 32-bit, but 12 on 64.
techsethi has quit [Quit: techsethi]
<Ox0dea> I wonder why there are two different Strings that contribute to the contents of a Symbol on 64-bit.
nixmaniack has quit [Remote host closed the connection]
xantik has joined #ruby
nixmaniack has joined #ruby
keen_ has quit [Quit: Tiarra 0.1+svn-39209: SIGTERM received; exit]
<al2o3-cr> Yeah, weird it puts an extra space on 64bit
lkba_ has quit [Remote host closed the connection]
htmldrum has joined #ruby
weihan has joined #ruby
techsethi has joined #ruby
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
zenguy_pc2 has joined #ruby
<hxegon> Ox0dea: its the best around
nrk has joined #ruby
<Ox0dea> hxegon: Did you ever wish you could use them in Ruby?
<hxegon> Ox0dea: all the time.
<baweaver> oh no
<baweaver> no no no
* baweaver ducks
jgt has joined #ruby
cashnguns has quit [Ping timeout: 246 seconds]
<Ox0dea> baweaver: Hey, who's running this magic show?!
<Ox0dea> How went the vacay?
<baweaver> still on it :D
<Ox0dea> Wunderbar.
<baweaver> L4D
dcarmich has joined #ruby
<baweaver> out I go
<Ox0dea> You're like Christian Bale's character in The Prestige.
<Ox0dea> "Oh, hey, I'ma spoil your buildup right quick and then I'ma bounce, cool?"
tlarevo has joined #ruby
<Ox0dea> hxegon: https://eval.in/460974
jgt has quit [Ping timeout: 260 seconds]
<Ox0dea> It's something I've been meaning to recreate with a bit more sanity since refinements landed.
<Ox0dea> That main loop, though.
h99h9h88 has quit [Remote host closed the connection]
iateadonut has joined #ruby
favadi has joined #ruby
h99h9h88 has joined #ruby
techsethi has quit [Quit: techsethi]
l_tonz has joined #ruby
techsethi has joined #ruby
h99h9h88 has quit [Ping timeout: 265 seconds]
enherit has quit [Ping timeout: 240 seconds]
xantik has quit [Read error: Connection reset by peer]
Puck6633 has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 268 seconds]
iateadonut has quit [Quit: Leaving.]
haxrbyte has joined #ruby
iateadonut has joined #ruby
mistermocha has joined #ruby
<hxegon> Ox0dea: I have no idea how that case statement works, but it gives me haskell list comp, so I'm not going to sleep ontil I can find out how it works and absorb its power
sp4rrow has joined #ruby
<Ox0dea> hxegon: That's arguably the most straightforward part, but there's certainly something to be learned from it.
duckpuppy has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
<Ox0dea> As I understand it, Haskell lists can either be the bog-standard variety ([1,2,3]), a range ([1..3]), or a range whose step is the difference between the first two elements ([1,3..9]).
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has quit [Remote host closed the connection]
<Ox0dea> That cast statement just branches based on the position of the Range in the Array.
<Ox0dea> *case
leafybasil has joined #ruby
ziprar has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 246 seconds]
tectonic has quit []
duckpuppy has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 1.3]
favadi has joined #ruby
AnoHito_ has quit [Read error: Connection reset by peer]
leafybasil has quit [Ping timeout: 246 seconds]
AnoHito_ has joined #ruby
blubjr has quit [Read error: Connection reset by peer]
ledestin has quit [Read error: Connection reset by peer]
rakm has joined #ruby
blubjr has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
tlaxkit has quit [Quit: ¡Hasta luego!]
user1138 has joined #ruby
arup_r has joined #ruby
user1138 has quit [Remote host closed the connection]
arup_r is now known as Guest21618
<hxegon> Ox0dea: its so wrong, but it feels so right
Guest21618 is now known as arup_r
tlarevo has left #ruby [#ruby]
NeverDie_ has joined #ruby
NeverDie has quit [Ping timeout: 252 seconds]
<Ox0dea> hxegon: I think it's terrifying that Ruby can get that close.
techsethi has quit [Quit: techsethi]
yfeldblum has joined #ruby
<Ox0dea> There are these blogthings pairing programming languages with weapons and with vehicles; I'm of the opinion that Ruby is the Bagger 288 in both cases. https://www.youtube.com/watch?v=azEvfD4C6ow
l_tonz has quit [Ping timeout: 250 seconds]
<Ox0dea> > The Bagger 288 is there to safeguard all mankind. The Bagger 288 reaks total, utter devestation.
djbkd has joined #ruby
<hxegon> Ox0dea: that is one kaiju killing machine. If ruby was a superhero, it would be spiderman. with great power...
devbug has joined #ruby
h99h9h88 has joined #ruby
pontiki has quit [Ping timeout: 240 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Ping timeout: 265 seconds]
devbug_ has quit [Ping timeout: 265 seconds]
nixmaniack has joined #ruby
<Ox0dea> I'm petitioning for the next edition of The Pickaxe Book to be called The Bagger 288 Book.
devoldmx has joined #ruby
favadi has joined #ruby
qiukun has quit [Ping timeout: 240 seconds]
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
hxegon has quit [Quit: Reconnecting]
hxegon has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 264 seconds]
vigintas has joined #ruby
baweaver has quit [Remote host closed the connection]
Archyme has quit [Ping timeout: 256 seconds]
htmldrum has quit [Ping timeout: 255 seconds]
htmldrum has joined #ruby
vigintas has quit [Ping timeout: 256 seconds]
<hxegon> >> require 'facets/proc/compose'
<ruboto> hxegon # => cannot load such file -- facets/proc/compose (LoadError) ...check link for more (https://eval.in/460975)
<hxegon> aww :(
techsethi has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
lxsameer has joined #ruby
<hxegon> oh my god... I'm going to cry.
ahegyi has joined #ruby
<hxegon> >> def duhhh; ->(a, b) { a + b }; end; duhhh.curry[1]
<ruboto> hxegon # => #<Proc:0x4177be60 (lambda)> (https://eval.in/460978)
<hxegon> * facepalms
<Ox0dea> But why?
<hxegon> basically I'm making something that transforms corrects issues with product hash formats left over from csv conversion
<hxegon> Ox0dea: and there is more than one distributor csv, so I need the component cleanups (delete_empty_fields, recover_numstrings) to be easily combinable
juanpablo__ has joined #ruby
<Ox0dea> hxegon: We don't have Proc#compose yet, though, so what makes Procs easier to combine than methods?
<Ox0dea> It's true enough that they're easier to pass around, of course, but that's nothing to do with combination.
<Ox0dea> >> Method.instance_method(:curry) # hxegon: My last chime on the matter.
<ruboto> Ox0dea # => #<UnboundMethod: Method#curry> (https://eval.in/460979)
juanpablo__ has quit [Ping timeout: 260 seconds]
<Ox0dea> I thought you were just mucking about with the language looking for gotchas and the like.
<blubjr> does ruby have something like lisp restarts
<hxegon> Ox0dea: not really, I mean we are only @ 1 distributor for now, but we will have dozens and basic function comp like that just makes sense for the problem to me. (not that I don't like muking around in ruby though :) )
<Ox0dea> blubjr: call/cc, you mean?
<blubjr> call/cc is more general
<blubjr> i could write it myself i guess but is there a predefined option
<Ox0dea> blubjr: The Enumerator class is actually implemented using Fibers.
<blubjr> but there isn't any integration with that and the exception system correct
<blubjr> id have to patch that in myself
<Ox0dea> No, what makes you think that?
<Ox0dea> >> foo = [1,2].to_enum; [foo.next, foo.next, (foo.next rescue $!)] # blubjr
stannard has joined #ruby
<ruboto> Ox0dea # => [1, 2, #<StopIteration: iteration reached an end>] (https://eval.in/460981)
<Ox0dea> I suppose I should've stuck a call to #rewind in there for demonstration purposes, but you get the idea.
<blubjr> how would high level code grab that
<Ox0dea> This is #ruby.
djbkd has quit [Remote host closed the connection]
<blubjr> ?
<Ox0dea> blubjr: What's your definition of "high level" here?
<blubjr> higher level
<blubjr> sorry
<blubjr> up the call stack
<Ox0dea> "Grab" it as in have a reference to it?
<hxegon> gnight all
<Ox0dea> Au revoir, hxegon.
hxegon has quit [Quit: leaving]
stannard has quit [Ping timeout: 250 seconds]
<blubjr> get at the continuation at time of error
<Ox0dea> You just control the iteration?
<blubjr> so that the lower level could give paths to respond by
nixmaniack has quit [Read error: Connection reset by peer]
n1x has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
<Ox0dea> I confess to not having an intimate understanding of the Fiber API, but everything you'd need seems to be there.
<blubjr> im sure it could be implemented
<blubjr> i was just wondering if it already was
<Ox0dea> If "what" already was?
<Ox0dea> I did not intend to use quotes for emphasis there.
<blubjr> lisp-style restarts
<blubjr> where you get to a condition and you see if there's a handler and if there is let them continue from that point based off recovery strategies
lxsameer has quit [Remote host closed the connection]
<Ox0dea> blubjr: Ah, that's a much better picture. I'm sure somebody somewhere's done it, and they probably used Fibers to do so.
<Ox0dea> I suspect Celluloid's Fiber usage would be of considerable interest to you.
solocshaw1 has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 is now known as solocshaw
<blubjr> thank you
<Ox0dea> You're welcome.
moeabdol has joined #ruby
yardenbar has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc2 has quit [Ping timeout: 250 seconds]
jgt has joined #ruby
blue_deref has quit [Quit: bbn]
lxsameer has joined #ruby
rrichardsr3 has joined #ruby
benhuda has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 240 seconds]
The_Phoenix has joined #ruby
n1x has quit [Ping timeout: 250 seconds]
ItSANgo has quit [Quit: Leaving...]
xantik has joined #ruby
nixmaniack has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
sameerynho has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 252 seconds]
lxsameer_ has joined #ruby
rrichardsr3 has quit [Quit: He who dares .... wins.]
zenguy_pc2 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sameerynho has quit [Ping timeout: 268 seconds]
ItSANgo has joined #ruby
eminence_ has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
_blizzy_ has quit [Client Quit]
Rollabunna has joined #ruby
Rinzlit has joined #ruby
segfalt__ has joined #ruby
Rinzlit_ has quit [Ping timeout: 255 seconds]
segfalt__ has quit [Ping timeout: 240 seconds]
pontiki has joined #ruby
grotewold has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has quit [Ping timeout: 246 seconds]
pontiki has quit [Ping timeout: 246 seconds]
weihan has quit [Ping timeout: 240 seconds]
naftilos76 has joined #ruby
duckpuppy has joined #ruby
mistermocha has joined #ruby
beast has quit [Quit: Leaving]
yfeldblum has joined #ruby
duckpuppy has quit [Ping timeout: 265 seconds]
techsethi has quit [Quit: techsethi]
mistermocha has quit [Ping timeout: 246 seconds]
bMalum has joined #ruby
bruno- has joined #ruby
agent_white has quit [Quit: moo]
bb010g has quit [Quit: Connection closed for inactivity]
rippa has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
colegatron has quit [Ping timeout: 265 seconds]
SCHAAP137 has joined #ruby
techsethi has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw has joined #ruby
benlieb has quit [Quit: benlieb]
l_tonz has joined #ruby
asmodlol has quit [Ping timeout: 265 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
tmtwd has joined #ruby
tectonic has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmodlol has joined #ruby
l_tonz has quit [Ping timeout: 268 seconds]
vigintas has joined #ruby
trosborn has quit [Quit: trosborn]
favadi has joined #ruby
eam has quit [Ping timeout: 272 seconds]
k3asd` has joined #ruby
nixmaniack has quit [Remote host closed the connection]
vigintas has quit [Ping timeout: 264 seconds]
colegatron has joined #ruby
bMalum has quit [Quit: bMalum]
fedexo has quit [Read error: Connection reset by peer]
roxtrongo has quit [Remote host closed the connection]
devoldmx has joined #ruby
eam has joined #ruby
tref has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
juanpablo__ has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has quit [Ping timeout: 256 seconds]
firstdayonthejob has joined #ruby
naftilos76 has quit [Ping timeout: 265 seconds]
SenpaiSilver has joined #ruby
juanpablo__ has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby
favadi has joined #ruby
favadi has quit [Client Quit]
tectonic has quit []
devbug has quit [Remote host closed the connection]
pontiki has joined #ruby
karapetyan has joined #ruby
elaptics`away is now known as elaptics
nixmaniack has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
pontiki has quit [Ping timeout: 252 seconds]
arooni has joined #ruby
jgt has joined #ruby
treaki_ has joined #ruby
asmodlol has quit [Ping timeout: 256 seconds]
poguez_ has joined #ruby
gagrio has quit [Remote host closed the connection]
asmodlol has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
dikaio has quit [Quit: ........]
techsethi has quit [Quit: techsethi]
arup_r has joined #ruby
arup_r is now known as Guest2104
drew2_ has quit [Ping timeout: 244 seconds]
Guest2104 is now known as arup_r
abbe has quit [Ping timeout: 246 seconds]
drew2_ has joined #ruby
techsethi has joined #ruby
lele has quit [Excess Flood]
lele has joined #ruby
abbe has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
gagrio has joined #ruby
roger_rabbit has quit [Ping timeout: 250 seconds]
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
htmldrum has quit [Ping timeout: 250 seconds]
tref has quit [Quit: tref]
nixmaniack has quit [Remote host closed the connection]
leafybasil has joined #ruby
benhuda has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
leafybasil has quit [Ping timeout: 264 seconds]
nixmaniack has joined #ruby
l_tonz has joined #ruby
arup_r has quit [Quit: Leaving]
zenguy_pc2 has quit [Ping timeout: 250 seconds]
techsethi has quit [Quit: techsethi]
sameerynho has joined #ruby
k3asd` has quit [Quit: leaving]
k3asd` has joined #ruby
techsethi has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
vigintas has joined #ruby
nixmaniack has joined #ruby
segfalt__ has joined #ruby
l_tonz has quit [Ping timeout: 260 seconds]
lxsameer_ has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
FernandoBasso has joined #ruby
vigintas has quit [Ping timeout: 265 seconds]
k3asd` has quit [Ping timeout: 246 seconds]
nixmaniack has quit [Ping timeout: 255 seconds]
nixmaniack has joined #ruby
segfalt__ has quit [Ping timeout: 265 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
ruurd has joined #ruby
zenguy_pc2 has joined #ruby
treaki_ has quit [Ping timeout: 255 seconds]
n1x has joined #ruby
lxsameer_ has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
saddad has quit [Quit: WeeChat 1.4-dev]
rgtk has joined #ruby
DoubleMalt has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
treaki has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
sameerynho has quit [Ping timeout: 265 seconds]
n1x has quit [Client Quit]
rgtk has quit [Read error: No route to host]
rgtk has joined #ruby
rgtk has quit [Remote host closed the connection]
spider-mario has joined #ruby
rgtk has joined #ruby
jgt has joined #ruby
pontiki has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
Axy has joined #ruby
pontiki has quit [Ping timeout: 246 seconds]
Motoservo has joined #ruby
Mia has quit [Ping timeout: 265 seconds]
duckpuppy has joined #ruby
karapetyan has joined #ruby
roger_rabbit has joined #ruby
mistermocha has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta has quit [Quit: Leaving...]
benhuda has joined #ruby
duckpuppy has quit [Ping timeout: 244 seconds]
rgtk has joined #ruby
stannard has joined #ruby
rgtk has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 255 seconds]
jamesaxl has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
htmldrum has joined #ruby
stannard has quit [Ping timeout: 252 seconds]
nichtdiebohne has joined #ruby
karapetyan has quit [Remote host closed the connection]
ta has joined #ruby
karapetyan has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
th0m_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby
tmtwd has quit [Ping timeout: 250 seconds]
c_nick has left #ruby [#ruby]
Jackneill has joined #ruby
SCHAAP137 has quit [Ping timeout: 260 seconds]
rgtk has joined #ruby
c_nick has joined #ruby
<c_nick> I need to delete data from three tables. I wanted to know which is the most database efficient approach of the following 1. Delete data from 3 tables using INNER JOINS (2 Inner join queries and 1 normal query) 2. Retrieve ID's and store in an array and then delete from 3 using Delete from where IN ()
DEA7TH has joined #ruby
pontiki has joined #ruby
djellemah_ is now known as djellemah
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
l_tonz has joined #ruby
quazimodo has joined #ruby
juanpablo__ has joined #ruby
<djellemah> c_nick: In general, delete with inner join. But it depends. Are your indexes are set up correctly? How large is the set of rows you're deleting? Is this a once-off, or an operation that will be repeated? Do you need the deletes to be atomic? (or whatever the term du jour is)
l_tonz has quit [Ping timeout: 246 seconds]
SCHAAP137 has joined #ruby
The_Phoenix1 has joined #ruby
The_Phoenix has quit [Ping timeout: 264 seconds]
<c_nick> its a one off for now but we will have to do it again in six months time
leafybasil has joined #ruby
juanpablo__ has quit [Ping timeout: 252 seconds]
<c_nick> do i need to handle indexes on that database ?
htmldrum has joined #ruby
asmodlol has quit [Ping timeout: 255 seconds]
asmodlol has joined #ruby
devoldmx has joined #ruby
leafybasil has quit [Ping timeout: 246 seconds]
segfalt__ has joined #ruby
jessemcgilallen has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
segfalt__ has quit [Ping timeout: 260 seconds]
stamina has joined #ruby
techsethi has quit [Quit: techsethi]
blackmesa has joined #ruby
c_nick has left #ruby [#ruby]
akem has joined #ruby
haxrbyte has joined #ruby
akem2 has joined #ruby
OrbitalKitten has joined #ruby
akem2 has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
OrbitalKitten has quit [Client Quit]
akem has quit [Ping timeout: 246 seconds]
akem2 has joined #ruby
akem2 has quit [Read error: Connection reset by peer]
akem has joined #ruby
rikkipitt has quit [Quit: Leaving...]
last_staff has quit [Quit: last_staff]
sameerynho has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akem has quit [Ping timeout: 246 seconds]
DEA7TH has quit [Ping timeout: 260 seconds]
lxsameer_ has quit [Ping timeout: 246 seconds]
sameerynho has quit [Ping timeout: 240 seconds]
last_staff has joined #ruby
minimalism has joined #ruby
kp666 has quit [Ping timeout: 260 seconds]
reubensutton has joined #ruby
<reubensutton> Hi, does anyone know of a guide to compiling ruby statically?
Ulfalizer has joined #ruby
bruno- has joined #ruby
akem has joined #ruby
DEA7TH has joined #ruby
DEA7TH has quit [Client Quit]
bruno- has quit [Ping timeout: 240 seconds]
lubarch has joined #ruby
bruno- has joined #ruby
houhouli_ has quit [Remote host closed the connection]
vigintas has joined #ruby
symm- has joined #ruby
machan has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
<Ulfalizer> http://docs.seattlerb.org/rake/doc/rakefile_rdoc.html "Any prerequisites are given as a list (enclosed in square brackets) following the name and an arrow (=>)."
<Ulfalizer> i don't see an arrow after that
sankaber has joined #ruby
<Ulfalizer> is the formatting broken in the documentation, or the text?
<jhass> Ulfalizer: the text, kinda
<Ulfalizer> so what are the rules? i'm a ruby noob trying to make sense of some Rakefiles for packaging purposes. :)
<jhass> >> {name: [:prereq1, :prereq2]} == {:name => [:prereq1, :prereq2]}
<ruboto> jhass # => true (https://eval.in/461028)
vigintas has quit [Ping timeout: 246 seconds]
<jhass> Ulfalizer: ^ it's just a hash
sankaber has quit [Remote host closed the connection]
<Ulfalizer> so foo: bar is shorthand for foo => bar?
<Ulfalizer> and both create a single-key hash?
<jhass> for :foo => bar
<Ulfalizer> ah
poguez_ has quit [Quit: Connection closed for inactivity]
<Ulfalizer> i think i get it. thanks.
sankaber has joined #ruby
djbkd has joined #ruby
<Ulfalizer> what's the syntactic magic behind 'task'? i get a syntax error for 'f foo: 7' after i define a function f. 'f :foo => 7' works though.
bruno- has joined #ruby
zenguy_pc2 has quit [Ping timeout: 265 seconds]
<jhass> >> def f h; end; f foo: 7
<ruboto> jhass # => nil (https://eval.in/461029)
<jhass> is your ruby -v beyond ancient?
<Ulfalizer> 1.8.7. on a really ancient laptop atm. :/
l_tonz has joined #ruby
<jhass> that syntax was introduced with 1.9, but even that is out of support by now, 2.0 is about to run out (4 more months). 2.1 and 2.2 are the supported versions, 2.3 is around the corner
haxrbyte has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 255 seconds]
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
bruno- has quit [Ping timeout: 240 seconds]
<djellemah> Ulfalizer: In other words, 1.8.7 is beyond ancient. So many of the articles you'll find on ruby will have syntax that won
<djellemah> 't work. Which will be confusing for you.
l_tonz has quit [Ping timeout: 268 seconds]
<Ulfalizer> djellemah: i've just moved. still waiting for my regular computers to arrive. should be here in a few days. :)
<Ulfalizer> stuck with this 2006 laptop until then
<Ulfalizer> perhaps i could find a newer package for it still
<jhass> doesn't mean it can't run a recent OS
machan has quit [Ping timeout: 240 seconds]
<Ulfalizer> nope, just gotta hope someone has packaged up a recent ruby for it. it's a macbook running leopard.
<jhass> install linux? :P
<Ulfalizer> i run that on the other ones :)
<djellemah> Ulfalizer: your tradeoff is then between confusing syntax, and doing an install dance. The install dance might be easier with rvm or similar. No idea about leopard though.
<jhass> xfce or lxde, will run faster than it ever did
<Ulfalizer> i'm pretty happy just reading up at the moment. i can pretend the syntax works until later. :P
machan has joined #ruby
bruno- has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
haxrbyte has joined #ruby
<djellemah> Ulfalizer: At syntax level, 1.8.7 only understands => as the hash key/value separator. And -> for lambdas doesn't exist until 2.0 (I think...). There are quite a few other differences, but I think those two will bite hardest.
<jhass> no, -> was 1.9 too
<jhass> syntax wise, 2.0 introduced optional keyword args, 2.1 required ones
<jhass> I think 2.2 introduced a literal or two
bruno- has quit [Ping timeout: 255 seconds]
<djellemah> oh? Which ones?
<jhass> I might misremember
<jhass> >> 1/2r
<ruboto> jhass # => (1/2) (https://eval.in/461038)
machan has quit [Ping timeout: 265 seconds]
<jhass> 19>> 1/2r
<ruboto> jhass # => /tmp/execpad-ea655a20a7fd/source-ea655a20a7fd:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/461039)
<jhass> 21>> 1/2r
<ruboto> jhass # => (1/2) (https://eval.in/461040)
<djellemah> oh yeah, also %i and things like that.
<jhass> 20>> 1/2r
<ruboto> jhass # => /tmp/execpad-69ef1be83f00/source-69ef1be83f00:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/461041)
kp666 has joined #ruby
bruno- has joined #ruby
<jhass> okay, r is 2.1
<jhass> %i was 2.1 too iirc
<djellemah> >>%i[these are symbols] # Ulfalizer
<ruboto> djellemah # => [:these, :are, :symbols] (https://eval.in/461042)
* djellemah likes %i
<Ulfalizer> djellemah: okay
<djellemah> jhass: and utf8 was post-1.8.7, right?
yqt has joined #ruby
juanpablo__ has joined #ruby
Icey has joined #ruby
<jhass> 1.9 improved encoding handling, 2.0 switched source code fallback encoding from ASCII to UTF-8
haxrbyte_ has joined #ruby
rgtk has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 240 seconds]
yqt has quit [Client Quit]
jokke1 has joined #ruby
<Ulfalizer> why does task() take a single-element name=>prereqs hash instead of taking 'name' and 'prereqs' as two arguments? just to allow a particular syntax to be used?
jokke has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
<djellemah> Ulfalizer: before keyword arguments, people used a hash to simulate them.
haxrbyte has quit [Ping timeout: 244 seconds]
<jhass> Ulfalizer: so it looks nice
juanpablo__ has quit [Ping timeout: 240 seconds]
<jhass> Ulfalizer: it's not keyword argument emulation here, the key is part of the data f or task
Icey has quit [Quit: Leaving]
stamina has quit [Ping timeout: 260 seconds]
<jhass> there's no particular strong reason really
Icey has joined #ruby
<Ulfalizer> ok, just wanted to check if you could pass in multiple name=>reqreqs in the hash at once or something
<Ulfalizer> *prereqs
bruno- has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
<djellemah> Ulfalizer: in ruby, a method call has provision for one 'implicit' hash, where you don't have to specify the {} around the hash elements.
diegoviola has joined #ruby
Icey has quit [Client Quit]
Icey has joined #ruby
<Ulfalizer> can you put multiple elements in it? seems kinda odd to pass in single-key hashes left and right.
<Ulfalizer> unless it's a keyword argument simulation thing maybe, like you mentioned
diegoviola has quit [Client Quit]
radgeRayden has quit [Quit: Leaving]
<jhass> you can leave the braces off for only the last argument, multiple elements do work then though
<Ulfalizer> ok
Icey has quit [Client Quit]
bruno- has joined #ruby
tulak has joined #ruby
skcin7 has quit [Quit: Textual IRC Client: www.textualapp.com]
skcin7 has joined #ruby
duckpuppy has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
<djellemah> >> def task(opts); "args were #{opts.inspect}"; end; task :name => 'do tha thang', :target => '/tmp/outfile.txt' # Ulfalizer
<ruboto> djellemah # => "args were {:name=>\"do tha thang\", :target=>\"/tmp/outfile.txt\"}" (https://eval.in/461047)
<Ulfalizer> yeah, i think i get how it works. thanks. :)
duckpuppy has quit [Ping timeout: 244 seconds]
haxrbyte_ has quit [Ping timeout: 272 seconds]
machan has joined #ruby
<Ulfalizer> >> def foo(args); args.inspect; end; foo a: :b, c: :d
<ruboto> Ulfalizer # => "{:a=>:b, :c=>:d}" (https://eval.in/461051)
<Ulfalizer> >> def foo(args); args.inspect; end; foo a::b, c::d
<ruboto> Ulfalizer # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/461054)
<Ulfalizer> close :P
htmldrum has quit [Ping timeout: 240 seconds]
OrbitalKitten has joined #ruby
sankaber has quit [Ping timeout: 260 seconds]
sankaber has joined #ruby
<Ray`> TypeError: Symbol is not a symbol
<Ray`> best error of the day
peteykun has quit [Ping timeout: 240 seconds]
<djellemah> Ulfalizer: yeah, whitespace is sometimes significant. :: is the constant resolution operator. Which overlaps with . in some cases.
OrbitalKitten has quit [Ping timeout: 246 seconds]
<djellemah> >> Constant # Ray`
<ruboto> djellemah # => uninitialized constant Constant (NameError) ...check link for more (https://eval.in/461058)
<Ulfalizer> yeah, guessed that was what was going on. C++ has :: as a scope resolution operator too.
bruno- has joined #ruby
<Ulfalizer> Ray`: it's probably expecting something that's an instance (object) of class Symbol. the class Symbol itself is not an instance of class Symbol, hence the error.
segfalt__ has joined #ruby
<Ulfalizer> that seems dynamic languagish at least :P
<Ulfalizer> gets pretty meta
<djellemah> >> f = Float; f::MIN # Ulfalizer
<ruboto> djellemah # => 2.2250738585072014e-308 (https://eval.in/461059)
z4j5 has joined #ruby
<djellemah> >> :some_symbol.class
<ruboto> djellemah # => Symbol (https://eval.in/461060)
<Ulfalizer> yeah, everything-is-a-class stuff :)
akem has quit [Read error: No route to host]
<Ulfalizer> >> Symbol.class
<ruboto> Ulfalizer # => Class (https://eval.in/461061)
<Ulfalizer> >> Class.class
<ruboto> Ulfalizer # => Class (https://eval.in/461062)
akem has joined #ruby
sdothum has joined #ruby
zotherstupidguy has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
fantazo has joined #ruby
sdothum has quit [Client Quit]
bruno- has joined #ruby
asmodlol has quit [Ping timeout: 240 seconds]
segfalt__ has quit [Ping timeout: 268 seconds]
lubarch has quit [Quit: leaving]
<djellemah> Ulfalizer: it's more accurate to say everything-is-an-instance, even classes.
sdothum has joined #ruby
<jhass> >> BasicObject.superclass.class
<ruboto> jhass # => NilClass (https://eval.in/461064)
<Ulfalizer> djellemah: yeah, that makes sense
last_staff has quit [Quit: last_staff]
asmodlol has joined #ruby
cornerma1 has joined #ruby
bruce_lee has joined #ruby
cornerman has quit [Read error: Connection reset by peer]
* djellemah wonders if one day there will be a ReallyBasicObject
cornerma1 is now known as cornerman
l_tonz has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
htmldrum has joined #ruby
<Ray`> Ulfalizer: that was it actually, I did a double-take when I first saw the error though
zenguy_pc has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 260 seconds]
_blizzy_ has joined #ruby
<Ulfalizer> "Error: No error" is nice too
<Ulfalizer> that's usually someone printing an error code (e.g., errno) that ends up indicating no error
<Ulfalizer> not the clearest application design if it's supposed to be able to happen :P
stannard has joined #ruby
trosborn has joined #ruby
tlarevo has joined #ruby
chrisco has joined #ruby
<Ulfalizer> i think you end up with "Error: Succeeded" for errno a lot of the time. even worse. :)
devoldmx has joined #ruby
<Ray`> haha
<Ray`> I'll look out for that one
ruurd has quit [Quit: ZZZzzz…]
bruno- has joined #ruby
OrbitalKitten has joined #ruby
karapetyan has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 255 seconds]
cornerman has quit [Remote host closed the connection]
chrisco has quit [Ping timeout: 268 seconds]
bruno- has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
joufflu has joined #ruby
cornerman has joined #ruby
radgeRayden has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobunny has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
naftilos76 has joined #ruby
djbkd has joined #ruby
FernandoBasso has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
ruurd has joined #ruby
reubensutton has quit [Ping timeout: 246 seconds]
djbkd has quit [Ping timeout: 268 seconds]
duckpuppy has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
Guest65600 has joined #ruby
tlarevo has quit [Ping timeout: 240 seconds]
Guest65600 is now known as pard
<pard> howdy
rgtk has quit [Ping timeout: 260 seconds]
DoubleMalt has quit [Remote host closed the connection]
karapetyan has joined #ruby
bruno- has joined #ruby
vigintas has joined #ruby
jgt has quit [Ping timeout: 252 seconds]
<pard> are there any op's with a precedenc higher than -@'s (that is, the urnay -) ?
duckpuppy has quit [Ping timeout: 256 seconds]
grotewold has joined #ruby
<pard> if such an op exists, how should an expr like "- - l <op> e" be nterpreted?
grotewold is now known as grotewold[afk]
<pard> >> prec('**') <=> prec('@-' )
<ruboto> pard # => undefined method `prec' for main:Object (NoMethodError) ...check link for more (https://eval.in/461069)
<pard> :\
bruno- has quit [Ping timeout: 240 seconds]
<Ulfalizer> pard: guessing the '.' operator has higher precedence
vigintas has quit [Ping timeout: 265 seconds]
<Ulfalizer> you'd want -my_object.f to be interpreted as -(my_object.f), not as (-my_object).f
lipoqil has joined #ruby
<pard> thanks, what about '**'? does it have a higher prec?
<pard> (than -@ )
<pard> thanks a lot
<Ulfalizer> i would expect -2**2 to be -4 intuitively too, so it makes sense
<Ulfalizer> and not (-2)**2 = 4
<Ulfalizer> matches how it works when written
<pard> thanks a lot; what about (- - 5 ** 12) ?
peteykun has joined #ruby
<Ulfalizer> - - 5 ** 12 should be -(-(5**12)) = 5**12 = whatever that is :)
<pard> thanks a lot :)
<Ulfalizer> np
<pard> jhass, thanks
<pard> :)
vigintas has joined #ruby
pard has quit [Quit: Leaving]
vigintas has quit [Read error: Connection reset by peer]
vigintas has joined #ruby
segfalt__ has joined #ruby
Oatmeal has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
naftilos76 has quit [Ping timeout: 260 seconds]
segfalt__ has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
Oatmeal has joined #ruby
icbm has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
DiCablo has joined #ruby
l_tonz has joined #ruby
shellie_ has joined #ruby
waxjar_ has joined #ruby
akem has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
rodfersou has joined #ruby
waxjar_ is now known as waxjar
aspiers has joined #ruby
l_tonz has quit [Ping timeout: 268 seconds]
juanpablo__ has joined #ruby
rgb-one has joined #ruby
<rgb-one> Hello
<rgb-one> Success? Ox0dea?
zenguy_pc has quit [Ping timeout: 272 seconds]
juanpablo__ has quit [Ping timeout: 240 seconds]
fantazo has quit [Quit: Verlassend]
antgel has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
zotherstupidguy has quit [Ping timeout: 250 seconds]
bnizzle has left #ruby [#ruby]
spider-mario has quit [Remote host closed the connection]
radgeRayden has quit [Ping timeout: 246 seconds]
radgeRayden_ has joined #ruby
zenguy_pc has joined #ruby
ruurd has joined #ruby
spider-mario has joined #ruby
cpup has quit [Ping timeout: 264 seconds]
cpup has joined #ruby
<Ulfalizer> what do people mean when they write e.g. Rake::Task#[]? i only know # as a comment and string interpolation character so far.
<Ulfalizer> or foo#bar more generally
rgb-one has quit [Ping timeout: 265 seconds]
DEA7TH has joined #ruby
<jhass> Ulfalizer: the class or module Task inside the namespace Rake (a class or module too), the instance method (#) named [] on it
machan has quit [Ping timeout: 272 seconds]
ruurd has quit [Quit: ZZZzzz…]
<jhass> Namespace::ClassOrModule#instance_method, Namespace::ClassOrModule::class_method
<jhass> doc conventions, use . to call in Ruby code
<Ulfalizer> ok, ty
<Ulfalizer> was just gonna ask if it was valid ruby syntax too :)
<Ulfalizer> that'd make no sense though, at least not if it's "bare", since it'd be ambiguous with comments :P
aspiers has quit [Ping timeout: 250 seconds]
ruurd has joined #ruby
shellie_ has quit [Quit: brb.]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shellie_ has joined #ruby
kovalevsky has joined #ruby
<kovalevsky> hello everyonw
<kovalevsky> I'm using ruby on rails and I want to install a gem that needs to upload or set files in the assets folder but after run the bundle install command I dont see those files
<kovalevsky> Anyone have any idea about why i'm getting this behavior?
<kovalevsky> Thanks in advance
creepycat is now known as cats
claptor has joined #ruby
asmodlol has quit [Ping timeout: 268 seconds]
<jhass> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass> and provide more information there
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asmodlol has joined #ruby
<kovalevsky> ruboto, thanks a lot
<kovalevsky> :D
kovalevsky has left #ruby ["Leaving"]
kp666_ has joined #ruby
kp666 has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
yfeldblum has joined #ruby
duckpuppy has joined #ruby
OrbitalKitten has joined #ruby
shinnya has joined #ruby
bMalum has joined #ruby
dorei has joined #ruby
duckpuppy has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 240 seconds]
zotherstupidguy has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
treaki has quit [Ping timeout: 256 seconds]
kp666_ has quit [Ping timeout: 250 seconds]
RobertBirnie has joined #ruby
radgeRayden_ is now known as radgeRayden
tlarevo has joined #ruby
kp666 has joined #ruby
blackmesa has joined #ruby
l_tonz has joined #ruby
tlarevo has quit [Ping timeout: 240 seconds]
htmldrum has quit [Ping timeout: 264 seconds]
machan has joined #ruby
radgeRayden_ has joined #ruby
colegatron has joined #ruby
fantazo has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
smoitra has joined #ruby
l_tonz has quit [Ping timeout: 268 seconds]
moeabdol has quit [Read error: Connection reset by peer]
radgeRayden has quit [Ping timeout: 255 seconds]
jokke1 is now known as jokke
moeabdol has joined #ruby
agit0 has joined #ruby
<smoitra> hi everyone
<smoitra> I am a rubyist
<al2o3-cr> o/
<smoitra> I have been failing in interviews that is quite frustrating for me
ruurd has joined #ruby
tulak has quit [Remote host closed the connection]
devoldmx has joined #ruby
<al2o3-cr> smoitra: practice makes perfect
<smoitra> So if anyone could help and mentor me that would be great I know people are busy.
<trosborn> what have you been struggling with?
<smoitra> The problem I am now facing is I get quickly out of track trying to do too many things in a hurry
<smoitra> I have been struggling with ruby and RoR
<totimkopf> smoitra: what have you been struggling with specifically?
devoldmx has quit [Ping timeout: 240 seconds]
<smoitra> I have been struggling with ruby language constructs in particular most often I end of writing in efficient 'C' like code
ruurd has quit [Read error: Connection reset by peer]
<smoitra> *inefficient
ponga has joined #ruby
Alina-malina has quit [Quit: Leaving]
<totimkopf> smoitra: There are books to remedy those things like Eloquent Ruby and Confident Ruby
ziprar has joined #ruby
<totimkopf> I haven't read those personally, I've just used The Well Grounded Rubyist... The code in that book is idiomatic ruby afaik :)
ekinmur has joined #ruby
<totimkopf> smoitra: perhaps you're being too hard on yourself, how long have you been learning ruby?
<smoitra> Since last year
<totimkopf> what resources have you been using?
ruurd has joined #ruby
The_Phoenix1 has quit [Ping timeout: 265 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
<smoitra> Programming ruby 1.9
<smoitra> try ruby
<smoitra> and Ruby docs
<trosborn> if you show us some code, maybe we could help you refactor it to make it more Ruby-esque :)
<smoitra> trosborn: thankyou but I dont have any of my code handy this time
<totimkopf> smoitra: until then, check out Confident Ruby, it's a relatively short read
<smoitra> totimkopf: thankyou I will surely check that out
<havenwood> smoitra: If now is a good time maybe work through some interview-esque problems and get channel feedback.
symm- has quit [Ping timeout: 265 seconds]
Trynemjoel has joined #ruby
<smoitra> havenwood: please tell me a good place to start
antgel has quit [Quit: leaving]
<totimkopf> smoitra: do you remember the questions they asked you in your interviews?
sedai has joined #ruby
Rollabunna has quit [Remote host closed the connection]
<totimkopf> regarding ruby/rails
sedai has quit [Client Quit]
<smoitra> They asked me question to tell 3 ways to call a method etc
Voker57 has joined #ruby
<smoitra> Yeah more realated to ruby on rails
<totimkopf> do you know the correct answers to all the questions already?
<smoitra> my interviewer told me I need more understanding of internals of ruby on rails
<smoitra> no not yet
Alina-malina has joined #ruby
<totimkopf> if not then create a gist and write down all the questions and I'm sure people will help you answer them all :)
th0m_ has quit [Read error: Connection reset by peer]
<totimkopf> I'm curious to see the questions myself
<smoitra> okay
<smoitra> I will surely make a list of those questions
<totimkopf> cool :D
The_Phoenix has joined #ruby
djbkd has joined #ruby
Nahra has quit [Remote host closed the connection]
<smoitra> Thanks all
Nahra has joined #ruby
Azulinho has joined #ruby
radgeRayden_ is now known as radgeRayden
vdamewood has joined #ruby
segfalt__ has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
rgb-one has joined #ruby
djbkd has quit [Ping timeout: 272 seconds]
Jesterovskiy has joined #ruby
fantazo has quit [Quit: Verlassend]
Jesterovskiy has quit [Remote host closed the connection]
tlarevo has joined #ruby
Jesterovskiy has joined #ruby
Jesterovskiy has quit [Client Quit]
bMalum has quit [Quit: bMalum]
bMalum has joined #ruby
davedev24 has joined #ruby
Macaveli has joined #ruby
segfalt__ has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
Rinzlit_ has joined #ruby
moeabdol has joined #ruby
h99h9h88 has joined #ruby
radgeRayden has quit [Read error: Connection reset by peer]
smoitra_ has joined #ruby
Rinzlit has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
atomical has joined #ruby
h99h9h88 has quit [Ping timeout: 252 seconds]
rgb-one has left #ruby [#ruby]
smoitra has quit [Ping timeout: 265 seconds]
k3asd` has joined #ruby
juanpablo__ has joined #ruby
User458764 has joined #ruby
trosborn has quit [Quit: trosborn]
zotherstupidguy has quit [Ping timeout: 252 seconds]
quazimodo has quit [Ping timeout: 252 seconds]
yardenbar has quit [Ping timeout: 265 seconds]
juanpablo__ has quit [Ping timeout: 244 seconds]
solocshaw has joined #ruby
grotewold[afk] is now known as grotewold
blackmesa has quit [Ping timeout: 268 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
l_tonz has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
decoponio has joined #ruby
akem has joined #ruby
jamto11 has joined #ruby
l_tonz has quit [Ping timeout: 268 seconds]
zenguy_pc has quit [Ping timeout: 256 seconds]
patdohere has joined #ruby
zotherstupidguy has joined #ruby
rgtk has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 246 seconds]
<Ulfalizer> where does the 'gem' utility get dependency information from? the Gemfile seems to be related to Bundler, and i assume 'gem' isn't tied to Bundler.
<shevy> information is written into the .gemspec file used to build a .gem
zenguy_pc has joined #ruby
<Ulfalizer> ah, makes sense. thanks.
jamto11 has quit [Ping timeout: 252 seconds]
NeverDie_ has quit [Quit: http://radiux.io/ -> Manhattan Project]
<shevy> inside the .gemspec, it is the entry .add_dependency 'name_of_gem_goes_here'
<shevy> \o/
patdohere has quit [Read error: Connection reset by peer]
User458764 has quit [Ping timeout: 240 seconds]
<jhass> Ulfalizer: recent rubygems (so not yours) can actually read some basic Gemfile's too with gem install -g
tlarevo has quit []
<Ulfalizer> what's the point of the Gemfile in that case? why not just have dependency information in the .gemspec?
<Ulfalizer> jhass: ok
<jhass> the Gemfile defines your applications dependencies
<jhass> you don't want to create a gem for all your applications
<jhass> also Rubygems is still bad at locking a fully resolved dependency graph
<jhass> which is what bundler does
<jhass> you can't load anything except what's in your Gemfile.lock when bundler is activated
dravine has quit [Read error: Connection reset by peer]
dravine has joined #ruby
<Ulfalizer> is that to catch unlisted dependencies?
h99h9h88 has joined #ruby
* Ulfalizer reads up a bit on Bundler
h99h9h88 has left #ruby [#ruby]
<Ulfalizer> after that i should try to understand Hoe, and then i might have some vague idea of what's going on in Rakefiles :P
danielpclark has quit [Remote host closed the connection]
User458764 has joined #ruby
l_tonz has joined #ruby
stamina has joined #ruby
rgtk has quit [Remote host closed the connection]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ekinmur has joined #ruby
ekinmur has quit [Client Quit]
OrbitalKitten has joined #ruby
mikeharris22 has joined #ruby
<Ulfalizer> why does bundler require runtime setup? does it install gems into non-standard paths?
Erik_Underline has joined #ruby
<Papierkorb> Basically .. yes. it stores gems in the project directory
<jhass> Ulfalizer: it has the option to, but to do its main job, which is not installing but restricting what can be loaded, it needs that too
krumelmonster has joined #ruby
<adaedra> It can store, if you ask it.
davedev2_ has joined #ruby
devoldmx has joined #ruby
<Ulfalizer> ah, yeah, makes sense if it needs to restrict which versions are loaded...
<adaedra> It can also load gems from local paths or git repositories.
mikeharris22 has quit [Ping timeout: 252 seconds]
<Ulfalizer> ok
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
l_tonz has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
<shevy> that last part is pretty cool since you can tap e. g. into github
NeverDie has joined #ruby
zotherstupidguy has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
duckpuppy has joined #ruby
<Ulfalizer> can a Gemfile be used to generate (parts of a) .gemspec?
<Ulfalizer> i guess a .gemspec lists more stuff than a Gemfile, e.g. files
<Ulfalizer> but just for the dependency information
<adaedra> Don't think so, but you can put 'gemspec' in a Gemfile to tell it to read the gemspec.
<Ulfalizer> kk
mistermocha has joined #ruby
TheMoonMaster has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
duckpuppy has quit [Ping timeout: 255 seconds]
bMalum has quit [Quit: bMalum]
Jardayn has joined #ruby
m3_del has joined #ruby
TheMoonMaster has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
cashnguns has joined #ruby
<Ulfalizer> what's the point of gem 'hoe' on a line by itself?
<Ulfalizer> i assume 'gem' is a function from rubygems. it's hard to google up documentation for it though. :)
<Ulfalizer> the next line has require 'hoe'
jamto11 has quit []
<jhass> Ulfalizer: where do you see this?
<Ulfalizer> jhass: the nokogiri Rakefile
agit0 has joined #ruby
null__ has quit [Ping timeout: 264 seconds]
<jhass> https://github.com/sparklemotion/nokogiri/commit/505e91acaa54ae0065f1d5bb9c4765da8e86cd46 looks like it used to ensure a recent enough version, now it's just useless
TheMoonMaster has quit [Ping timeout: 255 seconds]
nullwarp_ has quit [Ping timeout: 246 seconds]
shaileshg has joined #ruby
ainu has joined #ruby
roxtrongo has joined #ruby
but3k4 has joined #ruby
<Ulfalizer> thanks for digging that up
<Ulfalizer> and yeah, it looks like the require ought to be enough, even with my limited understanding :P
<jhass> was a simple Blame away
<Ulfalizer> just didn't think to check it. i assumed it was doing something common. :)
ainu has quit [Client Quit]
TheMoonMaster has joined #ruby
kp666 has quit [Ping timeout: 252 seconds]
blueOxigen has joined #ruby
null__ has joined #ruby
null__ has joined #ruby
nullwarp has joined #ruby
<Ulfalizer> the original problem i'm trying to solve is cross-compiling ruby gems containing native extensions (e.g., nokogiri) to non-windows platforms. rake-compiler looked promising, but it seems to be tailored for cross-compilation to windows. :/
<Ox0dea> > since it'd be ambiguous with comments
jacaballero has joined #ruby
<Ox0dea> Not if I have something to say about it. https://eval.in/461145
smoitra has joined #ruby
<Ulfalizer> maybe it could be convinced into using other cross-compilers though
<Ulfalizer> either way it's probably good to have some understanding of how ruby building and ruby gems work first
ivanskie has joined #ruby
<Ulfalizer> Ox0dea: hax :P
<Ox0dea> So hax.
c355E3B has joined #ruby
smoitra_ has quit [Ping timeout: 265 seconds]
carving is now known as GeneralElectric
erfus has joined #ruby
roxtrongo has quit [Remote host closed the connection]
Uranio has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
rbennacer has joined #ruby
nullwarp has quit [Ping timeout: 246 seconds]
null__ has quit [Ping timeout: 264 seconds]
cwong_on_irc has quit [Quit: Leaving.]
rfscott has joined #ruby
mhib has joined #ruby
null__ has joined #ruby
null__ has joined #ruby
hakunin_ is now known as hakunin
<djellemah> Ox0dea: #-prefixed custom syntax. In ruby. Who woulda thunk.
naftilos76 has joined #ruby
<Ox0dea> djellemah: This language is just crazy-malleable.
<shevy> where people do all sorts of things without them ever being useful!
browndawg has joined #ruby
grotewold is now known as grotewold[afk]
<djellemah> That # thing, I can think of a few places it could be useful. But it would drive wtf/line ratio through the roof.
saddad has joined #ruby
rbennacer has quit [Remote host closed the connection]
houhoulis has joined #ruby
<Ox0dea> shevy: Are you saying you wouldn't want to be able to define instance methods like that?
jacaballero_ has joined #ruby
<shevy> I don't know what that atrocity is
<Ox0dea> Yes, you do.
bMalum has joined #ruby
<Ox0dea> It's not as if there's any particularly good reason to put a comment at the end of a signature, so why couldn't # be co-opted for this purpose?
null__ has quit [Ping timeout: 264 seconds]
K1MOS has joined #ruby
Xeago has quit [Remote host closed the connection]
<shevy> it's interesting to see that most rubyists drift towards omitting ()
jacaballero has quit [Ping timeout: 268 seconds]
<Ox0dea> You're not paying attention.
roxtrongo has joined #ruby
K1MOS has quit [Max SendQ exceeded]
<shevy> just delete the code
asmodlol has quit [Ping timeout: 260 seconds]
Zamerick has joined #ruby
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
nullwarp has joined #ruby
<Ox0dea> djellemah: The WTFs would be reduced considerably if it were highlighted differently.
segfalt__ has joined #ruby
nichtdiebohne has quit [Quit: Linkinus - http://linkinus.com]
asmodlol has joined #ruby
solars has joined #ruby
<djellemah> Ox0dea: I quite like wtfs.
jacaballero_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
symm- has joined #ruby
<Ox0dea> djellemah: And so kindred spirits are we.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
Uranio has quit [Quit: Leaving]
rfscott has quit [Quit: Lost terminal]
darkf has quit [Quit: Leaving]
segfalt__ has quit [Ping timeout: 255 seconds]
Rollabunna has joined #ruby
<djellemah> Ox0dea: A while back I was playing with single-assignment futures with blocking semantics - called dataflow variables in at least one other language. But I couldn't find a nice way to assign the value. The best I could come up with was this: soon = Dataflow.new; Thread.new{ puts soon }; soon._ = "The value you wanted, sah!"
<djellemah> Ox0dea: Can you think of a nicer way?
* Ulfalizer wonders why the Hoe documentation starts with "Sow generates a new project from scratch. Sow uses a simple ERB templating system..."
<Ulfalizer> i was expecting "hoe is yadayada. to use hoe, do yadayada. here's the class and function reference: yadayada"
<Ulfalizer> but maybe i'm looking in the wrong place :P
<djellemah> Ulfalizer: maybe I'm way off here, but I have a sense most people don't bother with Hoe anymore. bundle gem your_new_gem does pretty much the same thing.
akem has quit [Read error: No route to host]
akem has joined #ruby
<havenwood> Ulfalizer: Where are you looking?
<Ulfalizer> djellemah: i'm mostly trying to understand it because nokogiri uses it
iateadonut has quit [Quit: Leaving.]
<Ox0dea> djellemah: Well, you've got about two dozen or so different operators you could repurpose; you're right that `._ = ` isn't very aesthetically pleasing.
juanpablo__ has quit [Ping timeout: 272 seconds]
<Ox0dea> How about defining #call, so that you could say `soon.(value)`.?
Rollabunna has quit [Ping timeout: 240 seconds]
<Ulfalizer> havenwood: was looking at http://docs.seattlerb.org/hoe/Hoe.html
<Ulfalizer> yours look more promising :)
roxtrongo has quit [Remote host closed the connection]
Xeago has joined #ruby
karapetyan has joined #ruby
<djellemah> Ox0dea: I was trying to keep the assignable instance as close to a transparent delegate as I could. Which is quite a tricky constraint to work with.
browndawg has quit [Read error: Connection timed out]
<Ox0dea> djellemah: Well, but you've got that `_` attribute, which is something you've got to hand off explicitly, no?
ibouvousaime has joined #ruby
felltir has joined #ruby
_blizzy_ has quit [Quit: Leaving]
<djellemah> Ox0dea: Not sure what you mean by hand off?
<Ox0dea> djellemah: Delegate.
mndoci has joined #ruby
null__ has quit [Ping timeout: 264 seconds]
Xeago has quit [Ping timeout: 268 seconds]
<Ox0dea> djellemah: Or did you mean you want it to look as much like regular assignment as possible?
<djellemah> Ox0dea: Pretty much. From my perspective _ was the least breakage of transparency. But something has to break transparency. Or the language has to get another operator.
bruno- has joined #ruby
yardenbar has joined #ruby
<Ox0dea> djellemah: Right, that's the point I meant to make in mentioning the operators at your disposal.
<Ox0dea> You could define #/, for instance, and then the assignment could be `soon /= value`.
<Ox0dea> You'd capture the argument, put it wherever you're putting `_` now, and make sure to return `self` so that it's not actually a reassignment.
<Ox0dea> (We sound crazy.)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<djellemah> Ox0dea: Yes, it is a bit crazy. I was a bit obsessive about dataflow variables for a while.
linocisco has joined #ruby
<Ox0dea> djellemah: I was that way with https://github.com/rplevy/swiss-arrows
nullwarp has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 240 seconds]
ivanskie has quit [Read error: Connection reset by peer]
jacaballero has joined #ruby
RobertBirnie has joined #ruby
* djellemah tries out /=
linocisco has quit [Ping timeout: 250 seconds]
<Ox0dea> djellemah: There are so many to choose from! `>>=` looks more fitting, now I think about it.
Zamerick has quit [Read error: Connection reset by peer]
bMalum has quit [Quit: bMalum]
perrier__ has quit [Remote host closed the connection]
perrier has joined #ruby
rgtk has joined #ruby
<djellemah> Ox0dea: I have a vague memory of a gotcha with the return value of assignments. Need to check it out.
Mon_Ouie has joined #ruby
blackoperat has joined #ruby
bruno- has joined #ruby
<Ox0dea> djellemah: Hm? `foo <op>= bar` is just `foo = foo <op> bar`.
tmtwd has joined #ruby
<Ox0dea> So the receiver will get the return value of the method call.
blackoperat has quit [Client Quit]
<djellemah> Ox0dea: Patience... ;-)
<Ox0dea> djellemah: Aye, I supposed there must be a bit more to your misgivings.
bMalum has joined #ruby
but3k4 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 265 seconds]
User458764 has joined #ruby
krumelmonster has quit [Ping timeout: 244 seconds]
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
claptor has quit [Quit: this channel is bakas]
tref has joined #ruby
eminencehc has joined #ruby
kp666 has joined #ruby
diegoaguilar has joined #ruby
<djellemah> Ox0dea: Well, that seems to work. I'll drag out the code and see if it works there too. Thanks :-D
NeverDie has joined #ruby
<Ox0dea> djellemah: Happy to "help". :P
eminence_ has joined #ruby
eminencehc has quit [Ping timeout: 265 seconds]
<Ox0dea> > There are 87,762 users currently online (at time of writing) on Freenode. There are 10,293 people on OFTC. 22,384 people on Rizon.
mndoci has quit [Remote host closed the connection]
BTRE has quit [Quit: Leaving]
mndoci has joined #ruby
<adaedra> That's nice.
alexherbo2 has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
smoitra has quit [Remote host closed the connection]
krumelmonster has joined #ruby
rbennacer has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
bnizzle has joined #ruby
<shevy> yeah
<shevy> people are destroying the old IRC :(
<Papierkorb> Do you need an account to read slack?
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb> I've never tried it, I'm just annoyed by the "wow IRC Slack bots are so helpful" hipsters
<shevy> hehe
alexherbo2 has quit [Client Quit]
linocisco has joined #ruby
mndoci has quit [Ping timeout: 268 seconds]
segfalt__ has joined #ruby
<shevy> "Code snippets: Slack has built-in support for them. On IRC you?re just asked to use a pastebin like Gist."
<shevy> hmm
<shevy> should not be that difficult to enable... like someone posts a link to a code site, and in the main buffer one could view the source, rather than using the browser to go there. would seem like a managable feature
bMalum has quit [Quit: bMalum]
rodfersou has quit [Ping timeout: 240 seconds]
saddad has quit [Ping timeout: 256 seconds]
<Ox0dea> Putting it in the main buffer would be noisy, but I am surprised there isn't already a WeeChat script for sending Gist sources to some dedicated buffer.
zenguy_pc has quit [Ping timeout: 268 seconds]
mndoci has joined #ruby
bMalum has joined #ruby
<Papierkorb> If the pastebin pages would be more smart, KDE would notice it upon me clicking on it and would actually open up my-favorite-code-editor program to show it.
diegoaguilar has quit [Remote host closed the connection]
blue_deref has joined #ruby
<Ox0dea> Papierkorb: Are you suggesting an editor: protocol?
segfalt__ has quit [Ping timeout: 264 seconds]
<Papierkorb> Ox0dea: No. Konversation (my IRC client) is configured in such a way that KDE will first send a HEAD request to a link I clicked on in any KDE application. It then uses the Content-Type to figure out which program to use. May be the web browser, but can also be my image viewer or text editor
<Papierkorb> Afaik, that's the default configuration for KDE
<Ox0dea> Nifty.
<adaedra> Some editors already register a protocol to open files with.
Mon_Ouie has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
veg has joined #ruby
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
nullwarp has joined #ruby
rodfersou has joined #ruby
karapetyan has joined #ruby
BlackCoyote has joined #ruby
bruno- has joined #ruby
<shevy> emacs!
<shevy> it has ALL THE THINGS
OrbitalKitten has joined #ruby
BTRE has joined #ruby
Macaveli has joined #ruby
Musashi007 has joined #ruby
<adaedra> no.
<shevy> you are a vimster!
<dorei> one needs guitar lessons before start using emacs :p
zenguy_pc has joined #ruby
mikeharris22 has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
<shevy> actually that may not be so bad... know those old piano lessons by chance? one entails to putting your upper fingers flat on a surface, then use only one finger to tap a piano key as strong as you possibly can
linocisco has quit [Ping timeout: 250 seconds]
<shevy> I always struggled with the ring finger
<rgtk> True. I've been using Vim, then used Emacs as Vim emulator but now using vanilla Emacs.
stannard has quit [Remote host closed the connection]
<rgtk> It's more ergonomical to me, frankly.
mrtomme has quit [Ping timeout: 260 seconds]
<shevy> :)
stannard has joined #ruby
swgillespie has joined #ruby
bb010g has joined #ruby
Musashi007 has quit [Client Quit]
mrtomme has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mndoci has quit [Remote host closed the connection]
akem has quit [Ping timeout: 264 seconds]
mndoci has joined #ruby
stannard has quit [Ping timeout: 244 seconds]
mndoci_ has joined #ruby
mndoci has quit [Read error: Connection reset by peer]
fedexo has joined #ruby
SCHAAP137 has joined #ruby
devoldmx has joined #ruby
asmodlol has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
mndoci_ has quit [Remote host closed the connection]
mndoci has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
devoldmx has quit [Ping timeout: 264 seconds]
asmodlol has joined #ruby
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
tulak has joined #ruby
linocisco has joined #ruby
linocisco has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
mndoci has quit [Ping timeout: 265 seconds]
pdoherty has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
schi33 has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
lavros has quit [Quit: leaving]
bruno- has joined #ruby
mistermocha has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
ibouvousaime has quit [Ping timeout: 240 seconds]
ibouvousaime has joined #ruby
tmtwd has quit [Ping timeout: 264 seconds]
<schi33> anyone have this problem with ubuntu 14.04 and ruby-switch? https://gist.github.com/anonymous/a7402c11a020796c660c
mistermocha has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 268 seconds]
<c355E3B> schi33: feels like you have a pathing issue
<Ox0dea> schi33: Install the ruby-dev package.
<shevy> usually you lack some component there, possibly some dev package "mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h"
mndoci has joined #ruby
tref has quit [Quit: tref]
<schi33> ah yeah. i had ruby1.8-dev not ruby2.2-dev. thanks guys
felltir has quit []
pdoherty has joined #ruby
to_json has joined #ruby
to_json has joined #ruby
<shevy> \o/
symm-_ has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheMoonMaster has quit [Ping timeout: 252 seconds]
nullwarp has quit [Ping timeout: 246 seconds]
<Ox0dea> Of course not.
<Ox0dea> Look at all those letters.
OrbitalKitten has joined #ruby
<shevy> yeah... "->" really beats "lambda" there
<shevy> "<< (((((_ << ___)" <--- and that is just stealing from lisp really
null__ has quit [Ping timeout: 264 seconds]
<Ox0dea> Python's dis module really is so much better than what RubyVM::InstructionSequence gives us, though. :<
segfalt__ has joined #ruby
fantazo has joined #ruby
<Ox0dea> I mean, we can get at the YARV bytecode and that's nice, but it's very look-don't-touch at present.
bruno- has quit [Ping timeout: 265 seconds]
krumelmonster1 has joined #ruby
cpup has quit [Ping timeout: 255 seconds]
krumelmonster has quit [Ping timeout: 246 seconds]
bradleyprice has joined #ruby
karapetyan has joined #ruby
segfalt__ has quit [Ping timeout: 255 seconds]
Alobaid has joined #ruby
Alobaid has quit [Read error: Connection reset by peer]
cpup has joined #ruby
last_staff has joined #ruby
mag42c has joined #ruby
<Ox0dea> Exception poetry.
<c355E3B> Afaik, you also cant dump and load ruby bytecode like you can with pythons
mndoci has quit [Remote host closed the connection]
roxtrongo has joined #ruby
mndoci has joined #ruby
erfus has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> c355E3B: Some day: http://git.io/vl43T
<c355E3B> Indeed
segfalt__ has joined #ruby
Dakuan has joined #ruby
Xeago has quit [Remote host closed the connection]
Alobaid has joined #ruby
<c355E3B> I feel like they missed out on the nickleback reference.
Xeago has joined #ruby
Musashi007 has joined #ruby
<Alobaid> Hello every one :)
shaileshg has quit [Quit: Connection closed for inactivity]
<havenwood> Alobaid: hi
<blubjr> hi alobaid
juanpablo__ has joined #ruby
<Ox0dea> c355E3B: Which is that, then?
<Ox0dea> Alobaid: Oh, hey, it's the devil in backwards female form.
<Alobaid> I was wondering if some one could tell me how to use cycle inside and each with out duplicates
Xeago has quit [Ping timeout: 240 seconds]
<Ox0dea> Alobaid: I've got just the thing.
<c355E3B> Somewhere Somehow
<havenwood> Ox0dea: :D
<Alobaid> OK what is it :D
StarBreaker has joined #ruby
<Ox0dea> Alobaid: Oh, well, I was gonna link you to this: https://eval.in/460797
<Ox0dea> But it's not *quite* what you need.
mikeharris22 has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
jimbeaudoin has joined #ruby
StarBreaker is now known as Starbreaker
<Alobaid> It is for a command like tool that have a table that I want to strip with colorize
<Alobaid> line not like
blackmesa has joined #ruby
<Ox0dea> Alobaid: And you're sure you need #cycle?
k3asd` has joined #ruby
juanpablo__ has quit [Ping timeout: 256 seconds]
mikeharris22 has joined #ruby
kirun has joined #ruby
<Alobaid> I am using if right now which looks really bad so I don't know what to use I am new to ruby and to programming
<Ox0dea> Alobaid: Post code?
bruno- has joined #ruby
to_json has quit [Quit: Leaving.]
<Ox0dea> havenwood: I wonder why that hasn't gone in yet.
<Alobaid> def output_restaurant_table(restaurants=[])
<Alobaid> 1 output_action_header(" " + "Name".ljust(30) + " " + "Cuisine".ljust(2 0) + " " + "Price".rjust(26))
svf has joined #ruby
<Alobaid> 2 output_action_header("-" * 80)
<Alobaid> 3 restaurants.each_with_index do |rest, i|
<Alobaid> 4 line = " " << rest.name.titleize.ljust(30)
<Alobaid> 5 line << " " + rest.cuisine.titleize.ljust(20)
<Alobaid> 6 line << " " + rest.formatted_price.rjust(26)
<havenwood> Ox0dea: Yeah, I don't know why not.
<Alobaid> 7 if i.odd?
<Alobaid> 8 y = :blue
<Alobaid> 9 else
<Alobaid> 10 y = :white
<havenwood> ?gist Alobaid
<ruboto> Alobaid, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Alobaid> 11
<Alobaid> 12 end
<Alobaid> 13 output_action_header(line, :black, y)
<Alobaid> 14
<Alobaid> 15 end
<adaedra> !kick Alobaid Paste in a gist, not in the channel
Alobaid was kicked from #ruby by ruboto [Paste in a gist, not in the channel]
<havenwood> Alobaid: Please paste >3 lines of text to: https://gist.github.com
roxtrongo has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
grotewold[afk] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> Mh, should have come back now.
blackmesa has quit [Ping timeout: 268 seconds]
<shevy> you knocked him unconscious!
bruno- has quit [Ping timeout: 265 seconds]
<shevy> you have to better control the power of your kicks adaedra
<havenwood> Maybe it needs some +1s.
<adaedra> Or client is still pasting in nothing and blocks.
grotewold has joined #ruby
grotewold has quit [Client Quit]
<shevy> havenwood perhaps matz did not notice it
Alobaid has joined #ruby
<adaedra> Here you are.
<Ox0dea> Another in dire need of a +1. :<
karapetyan has quit [Remote host closed the connection]
<Alobaid> Sorry about that
<havenwood> Alobaid: Much better!
<Ox0dea> Alobaid: You're not using #cycle.
<adaedra> It seems an end is missing.
Starbreaker has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
<Ox0dea> Nah, just bad formatting.
<Ox0dea> &ri Array#uniq @ Alobaid
Starbreaker has joined #ruby
<Ulfalizer> when people write stuff like "rake cross compile", is that just syntactic cuteness, or two separate tasks?
<Ulfalizer> if it's the former, it's very unsettling to me :|
k3asd` has quit [Quit: leaving]
segfalt__ has quit [Ping timeout: 265 seconds]
<adaedra> Ox0dea: ahah, you broke it!
<Ox0dea> Yay!
<Ox0dea> Ulfalizer: I believe you have sufficient reason to be unsettled.
<Ulfalizer> "rake cross native gem" also scares me :(
Starbrea_ has joined #ruby
ibouvousaime has quit [Ping timeout: 255 seconds]
zylogz80 has joined #ruby
ziprar has quit [Changing host]
ziprar has joined #ruby
ziprar is now known as zipace
Rickmasta has joined #ruby
<Ulfalizer> that one doesn't even make sense as a sentence
DiCablo has joined #ruby
<Ulfalizer> don't cross the native gems~
mikeharris22 has quit [Remote host closed the connection]
<Ox0dea> Alobaid: Seems like you just need the modulus operator?
<Alobaid> which is :)
<Ox0dea> You're doing #each_with_index, so just use something like `%i[red white][index % 2]`.
karapetyan has joined #ruby
<Ox0dea> >> 6.times.map { |i| %i[red white][i % 2] }
<ruboto> Ox0dea # => [:red, :white, :red, :white, :red, :white] (https://eval.in/461198)
<shevy> Ulfalizer if all fails, write a class/method that solves the specific thing you have to do via a rake task
Rollabunna has quit [Ping timeout: 250 seconds]
Starbreaker has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
ibouvousaime has joined #ruby
<shevy> wikipedia now has 5,000,490 articles https://en.wikipedia.org/wiki/Special:Statistics - now how many of them are about ruby?
<Ox0dea> shevy: We could actually find out.
poguez_ has joined #ruby
dmr8 has joined #ruby
bricker has joined #ruby
dmr8 has quit [Client Quit]
<Ulfalizer> what's a native gem? native extensions inside gems aren't compiled until they're installed, so i don't get it.
<shevy> Ox0dea guess it is probably not worth it ... will be less than 100 surely
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
<shevy> Ulfalizer usually one that has to be compiled on your machine
mikeharris22 has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<shevy> in theory you can probably just download some already-compiled binaries... but I have not seen anyone do that
<shevy> (for ruby addons)
<yxhuvud> shevy: it is common for gems that support windows.
<shevy> ah
<shevy> good old windows folks
karapetyan has quit [Remote host closed the connection]
<shevy> lol why is that a redirect?
Musashi007 has quit [Quit: Musashi007]
<adaedra> Because PHP.
<Ulfalizer> ah, yeah, that makes sense in context actually
<adaedra> (One of the rares cases I can say that without trolling.)
<shevy> oh dear ...
sandals has joined #ruby
<Ox0dea> > Although it has been confusing to many developers who do not speak Hebrew, it is still being used in PHP 5
<shevy> adaedra yeah... that is weird
<Ulfalizer> native = contains code that needs compiling
<shevy> I even used to think that this is czech
<shevy> Ulfalizer you are probably not using windows right?
<adaedra> But you didn't czech if you were right?
<Ulfalizer> shevy: nope, trying to cross-compile gems between different linux configurations
NeverDie has joined #ruby
<Ulfalizer> which it seems no one expects you to do
<Ulfalizer> so it's a huge mess
<Ox0dea> Ulfalizer: On a Mac, no less.
<Ulfalizer> :P
<Ulfalizer> only until i get my regular boxes
<shevy> adaedra eh, I was way too confused up there to understand (a) why Paamayim_Nekudotayim is redirected to "Scope resolution operator" and (b) how Ox0dea finds/knows these things. I think he is the Jerry Seinfeld of #ruby
<Ox0dea> *boxen
mndoci has quit [Remote host closed the connection]
bnizzle has quit [Ping timeout: 240 seconds]
<Ox0dea> shevy: How do you mean?
<shevy> Ox0dea you are a born comedian
<adaedra> shevy: people can just know things, you know.
<Ox0dea> ^
<Ulfalizer> i still don't get why "rake native gem" spits out two different .gem's - one for linux and one for windows
<shevy> adaedra right and he could have also given this link here: https://en.wikipedia.org/wiki/Scope_resolution_operator#Ruby
mndoci has joined #ruby
rgtk has quit [Remote host closed the connection]
<Ulfalizer> the .gem contains the source code, not the compiled code
karapetyan has joined #ruby
<Ulfalizer> so why can't they share the same .gem?
<adaedra> shevy: what's the difference? Goes to the same page.
<Ox0dea> adaedra: The humor.
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> adaedra yes, one goes through a redirect though
<adaedra> Oh no, you lost 100ms of your life waiting for the redirect!
Alobaid has left #ruby [#ruby]
<Ox0dea> adaedra: You're wooshing, mate.
Alobaid has joined #ruby
<adaedra> I'm not your mate, pal.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Ox0dea> I'm your pal, bestie.
ElFerna has joined #ruby
<shevy> Ulfalizer well you have either .rb code or .c code or .cpp code; the .rb code won't have to be compiled, the C and C++ would
* Ox0dea should've made an NTSC joke.
Alobaid has left #ruby [#ruby]
arooni has joined #ruby
Alobaid has joined #ruby
<adaedra> Let's go back to breaking things.
<Ulfalizer> shevy: you mean in the sense that the .c code might not be mandatory?
<Ulfalizer> is that a common thing?
NeverDie has quit [Max SendQ exceeded]
<Ulfalizer> seems odd
<Ox0dea> >> eval ":#\nfoo" # adaedra
<ruboto> Ox0dea # => :foo (https://eval.in/461206)
<shevy> though yxhuvud comment makes you wonder why windows manages something that linux fails to
Creechoftheeast has joined #ruby
<Ox0dea> It's fixed since yesterday, though.
Starbrea_ has quit []
bnizzle has joined #ruby
<adaedra> Nice.
NeverDie has joined #ruby
<shevy> Ulfalizer nono there are some bindings
<yxhuvud> shevy: necessity. people don't have compilers. Also lots and lots of gems doesn't work.
Starbreaker has joined #ruby
<shevy> Ulfalizer well... from all the 100% gems out there, I would assume that less than 5% require compilation
karapetyan has quit [Ping timeout: 250 seconds]
mndoci has quit [Ping timeout: 268 seconds]
joufflu has quit [Read error: Connection reset by peer]
pdoherty has quit [Quit: Leaving]
mikeharris22 has quit [Remote host closed the connection]
ibouvousaime_ has joined #ruby
jacaballero has quit [Quit: Textual IRC Client: www.textualapp.com]
ibouvousaime has quit [Ping timeout: 260 seconds]
Alobaid has quit [Read error: Connection reset by peer]
<Ulfalizer> shevy: i'm still very confused. how do the two gems output by 'rake native gem' differ?
Alobaid has joined #ruby
<Ox0dea> Ulfalizer: Unpack them and see?
<Ulfalizer> i'm just reading the rake-compiler readme. i don't have a specific project to check with.
Alobaid has quit [Read error: Connection reset by peer]
<Ulfalizer> it must be pretty easy, but i'm lost in terminology :/
<Ox0dea> ~ $ factor `gem search | wc -l`
<Ox0dea> 108263: 108263
<Ox0dea> We're at a prime!
Xeago has quit [Remote host closed the connection]
karapetyan has joined #ruby
FireCoin has joined #ruby
svf has quit [Ping timeout: 246 seconds]
<shevy> I want to use ruby 1.0
<adaedra> Then do it.
FireCoin has left #ruby ["Leaving"]
User458764 has joined #ruby
pdoherty has joined #ruby
<Ulfalizer> "as expected, you can still build your pure-ruby gem in the usual way (standard output) by running:"
symm- has joined #ruby
saddad has joined #ruby
<shevy> I can't adaedra :(
<Ulfalizer> is the implicit assumption that a pure-ruby version of the gem can be built too?
symm-_ has quit [Ping timeout: 250 seconds]
<Ulfalizer> is that a common thing?
<Ox0dea> 10>> :foo # shevy
<ruboto> Ox0dea # => 7649 (https://eval.in/461215)
<shevy> Ulfalizer what gem is that?
<adaedra> shevy: you can.
<shevy> include/varargs.h:4:2: error: #error "GCC no longer implements <varargs.h>."
<Ulfalizer> shevy: some unmentioned gem from the rake-compiler readme
<shevy> Ulfalizer hehe ... unmentioned? :D
<al2o3-cr> 18>> ?a
<ruboto> al2o3-cr # => 97 (https://eval.in/461216)
<shevy> does ruboto really have ruby 1.0?
<Ulfalizer> that gem which must not be mentioned
<al2o3-cr> yep
<adaedra> 10>> RUBY_VERSION
<ruboto> adaedra # => /tmp/execpad-a83ee8cdefd7/source-a83ee8cdefd7:4: TypeError: can't modify frozen string (https://eval.in/461217)
<shevy> HAHAHA
<Ox0dea> Ha.
<adaedra> lel.
<Ox0dea> shevy: ruboto uses eval.in, which has support for six different Rubies.
<al2o3-cr> thats why they have two diff temps
<Ox0dea> But not 0.49 or trunk. :<
<Mon_Ouie> The template used by Ruboto wouldn't work for 1.0 though
<Mon_Ouie> (e.g. there was no #class method, only #type)
<shevy> ruby 1.0 really was tiny... less than half a MB
<al2o3-cr> Lua is even smaller now
<shevy> yeah
<al2o3-cr> hell yeah
<adaedra> heaven yeah
mag42c has quit [Quit: mag42c]
<al2o3-cr> smoke or you get smoked
<al2o3-cr> and you got smoked
mikeharris22 has joined #ruby
duckpuppy has joined #ruby
<Ox0dea> Mon_Ouie: And Symbols were just serial tagged pointers, yeah?
blackmesa has joined #ruby
Xeago has joined #ruby
<al2o3-cr> byte pointers
<shevy> how beautiful
MVPhelp has quit [Remote host closed the connection]
<Mon_Ouie> I wouldn't know specifically, I never actually used Ruby 1.0 except for very small tests with eval-in
<Ulfalizer> i really hope "rake native gem" isn't just meant to show that you can build both "native" and "gem" at once...
<Ox0dea> Mon_Ouie: Any insight into what's going on here? https://eval.in/460962
<Ulfalizer> that makes no sense with "rake cross compile" though
<Ox0dea> The answer's 12 on 64-bit, and I can't think why.
<Ulfalizer> both cross and compile!
<al2o3-cr> Ox0dea: extra nibble
bnizzle1 has joined #ruby
kp666 has quit [Ping timeout: 260 seconds]
bnizzle has quit [Ping timeout: 246 seconds]
<al2o3-cr> Come on Van GERWEN
<Ox0dea> al2o3-cr: Did you mean nybble?
Uranio has joined #ruby
lkba has joined #ruby
<al2o3-cr> Ox0dea: No, van GERWEN
<Mon_Ouie> Maybe the size of the object header is the same for 64-bit and 32-bit ruby but the implicit size of a Fiddle::Pointer is not?
<Ox0dea> Mon_Ouie: No, I don't think Fiddle is playing much a part in it; it's just the most straightforward way to thaw objects.
eminencehc has joined #ruby
nullwarp has joined #ruby
<Ox0dea> Every Sybmol has a backing String, but it seems like they've got two on 64-bit.
<shevy> check your Sybmols
Xeago has quit [Remote host closed the connection]
eminence_ has quit [Ping timeout: 264 seconds]
terminalrecluse has joined #ruby
<al2o3-cr> ruby hacker of the year goes to Ox0dea
<Ox0dea> I suppose it could be that a new String is winding up in ObjectSpace in the middle of the loop, but I'm using #<<, so I don't see why a new String should get created (and then immediately walked into).
mag42c has joined #ruby
<al2o3-cr> collect your prize on 1st Jan 2230
<shevy> al2o3-cr aaaand the comedy prize as well
<shevy> 10>> RUBY_VERSION.to_s.dup
<ruboto> shevy # => /tmp/execpad-9a0abc9f9fa0/source-9a0abc9f9fa0:4: TypeError: can't modify frozen string (https://eval.in/461223)
<Mon_Ouie> What about the ' ' string? Is that one not recreated at each iteration?
<al2o3-cr> Mon_Ouie: you're correct!
TheMoonMaster has joined #ruby
<Ox0dea> Nice.
<Mon_Ouie> Yeah, doing space = ' ' and then reusing the variable makes the program output 11
mndoci has joined #ruby
Uranio has quit [Ping timeout: 256 seconds]
northfurr has joined #ruby
<Ox0dea> I can't confirm, even if I `space.freeze`. :/
eminencehc has quit [Ping timeout: 264 seconds]
RobertBirnie has joined #ruby
pocketprotector has joined #ruby
MVPhelp has joined #ruby
<Mon_Ouie> space = ' '; ObjectSpace.each_object(String) { |s| s.thaw << ' ' } outputs 11 for me, but with space = ' '.freeze it outputs 12 still.
zenguy_pc has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
<al2o3-cr> hack the planet!
mikeharris22 has quit [Remote host closed the connection]
user083 has quit [Quit: leaving]
tulak has quit [Remote host closed the connection]
user083 has joined #ruby
vdamewood has quit [Ping timeout: 244 seconds]
pdoherty has quit [Quit: Leaving]
mndoci has quit [Remote host closed the connection]
tulak has joined #ruby
<Ox0dea> Mon_Ouie: Ah, you're right, but now I'm wondering why it's 12 in both cases on trunk.
<Ox0dea> I think I'll just leave it be...
<al2o3-cr> 82,000 is a signicant number, why?
mndoci has joined #ruby
<Ox0dea> al2o3-cr: I already showed you?
<al2o3-cr> where?
m3_del has quit [Remote host closed the connection]
<Ox0dea> >> (2..5).map { |n| 82000.to_s(n) }
<ruboto> Ox0dea # => ["10100000001010000", "11011111001", "110001100", "10111000"] (https://eval.in/461226)
<al2o3-cr> Ox0dea: you soldier
<al2o3-cr> Ox0dea: numbers are your game?
<Ox0dea> al2o3-cr: I fuckin' love 'em.
<al2o3-cr> Ox0dea: no shit!
pocketprotector has quit [Ping timeout: 260 seconds]
<Ox0dea> It's an open problem!
eminencehc has joined #ruby
<al2o3-cr> Ox0dea: it sure is
<Ox0dea> Curious that it should be so round, right?
ahegyi has quit [Ping timeout: 240 seconds]
<al2o3-cr> going for a piss
Uranio has joined #ruby
<djellemah> Ox0dea: Bugger. <op>= didn't work after all. https://eval.in/461222
x-light has joined #ruby
mndoci has quit [Ping timeout: 255 seconds]
justinweiss has joined #ruby
<Ox0dea> djellemah: Looks right to me?
<Ox0dea> Or is that the behavior you're hoping for but not seeing?
tmtwd has joined #ruby
<al2o3-cr> Ox0dea: true
arooni has quit [Ping timeout: 246 seconds]
<Ox0dea> al2o3-cr: I don't even have a decent JARH.
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> >> $__=$$/$$;_=$__+$__;__=$__+_;$_=_+_;@_=$__+$_;$-_=_**@_;$___=_*$-_;@__=$-_+$___;$><<(''<<$___+_*@_<<@__+__*(_+@_)<<@__+_*__*__+$__<<@__+_*_*@_<<$-_<<$___+$__<<@__+_*(_+@_)<<@__+__*@_<<@__+_*_*@_<<@__+_*$_<<@__+@_<<@__+_*__*__<<$-_<<$___+_*__*__<<@__+__*(_+@_)<<@__+_<<@__+@_*@_<<$-_<<$___+_*$_<<@__+$__<<@__+__<<@__+_*@_+$__<<@__+@_<<@__+_*__*__<<_*@_)
<ruboto> Ox0dea # => Just Another Ruby Hacker ...check link for more (https://eval.in/461232)
<al2o3-cr> Ox0dea: sstop sspeaking aacronyms
kp666 has joined #ruby
yfeldblum has joined #ruby
<al2o3-cr> Ox0dea: what is this nonsense?
<Ox0dea> ...?
<al2o3-cr> Ox0dea: I want to see some quines that elite the master
zenguy_pc has joined #ruby
<Ox0dea> al2o3-cr: You're looking for Endoh-san.
<al2o3-cr> Ox0dea: you is plenty capable, no?
<Ox0dea> al2o3-cr: Not of surpassing mame, certainly not.
<al2o3-cr> Ox0dea: I don't think anyone is
<Ox0dea> That's correct.
<al2o3-cr> that guy is is not from planet earth
Contigi has quit [Quit: Leaving]
<Ox0dea> And he still gave us The Qlobe.
<Ox0dea> $DEITY bless that beautiful man.
<al2o3-cr> AWESOME is all i can say!!!!!!!
DiCablo has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
pocketprotector has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
bricker has quit [Ping timeout: 252 seconds]
juanpablo__ has joined #ruby
but3k4 has joined #ruby
<al2o3-cr> Isolated
mistermocha has joined #ruby
MVPhelp has quit [Ping timeout: 260 seconds]
<al2o3-cr> Ox0dea: why, just why?
devoldmx has joined #ruby
jessemcgilallen has joined #ruby
sandals has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr> You fruit cake
<djellemah> Ox0dea: In a nutshell, the delegator can't disambiguate between handing off a method, and using it as assignment. Ah well, back to ._ = until something better shows up.
juanpablo__ has quit [Ping timeout: 265 seconds]
Uranio has quit [Quit: Leaving]
Trynemjoel has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
devoldmx has quit [Ping timeout: 272 seconds]
banister has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
null__ has joined #ruby
null__ has joined #ruby
<Ox0dea> djellemah: You must promise me you won't actually use this. https://eval.in/461233
x-light has quit [Remote host closed the connection]
pygospa has joined #ruby
stamina has quit [Ping timeout: 256 seconds]
northfurr has quit [Quit: northfurr]
unreal_ has joined #ruby
Motoservo has joined #ruby
<al2o3-cr> van GERWEN
<djellemah> Ox0dea: Heh. I was wondering when the #-thing would show up again. I'll try it. But I won't use it. Much.
<Ox0dea> djellemah: I suspect there might be some slightly saner way to do it via TracePoint, but that might be overkill.
<djellemah> Lol. Definitely not! Well, maybe a little.
ponga has quit [Quit: Connection closed for inactivity]
<al2o3-cr> insane in membrane, insane in the brain
unreal has quit [Ping timeout: 250 seconds]
Trynemjoel has quit [Ping timeout: 250 seconds]
<al2o3-cr> *the
<Ox0dea> djellemah: Bummer; the TracePoint events are the exact same. :<
mistermocha has joined #ruby
<Ox0dea> As expected, I guess; compound assignment should only ever be a syntactic convenience.
leafybasil has joined #ruby
Trynemjoel has joined #ruby
ivanskie has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
northfurr has joined #ruby
<Ox0dea> >> class T; def call o; o end end; t = T.new; t :: (42) # djellemah
<ruboto> Ox0dea # => 42 (https://eval.in/461235)
<Ox0dea> Shame about the necessary parens, though.
timonv has joined #ruby
colegatron has quit [Ping timeout: 244 seconds]
mistermocha has quit [Ping timeout: 246 seconds]
aspiers has joined #ruby
vdamewood has joined #ruby
<al2o3-cr> Ox0dea: What shit was you into before Ruby>
northfurr has quit [Client Quit]
<djellemah> Ox0dea: Yeah, that's quite a pretty cousin of .() Something like an definable := operator would be perfect. But alas.
<al2o3-cr> Ox0dea: genuine question
northfurr has joined #ruby
<Ox0dea> al2o3-cr: Are you playing doctor?
<al2o3-cr> Ox0dea: Why, playing doctor?
tvon has joined #ruby
tvon has quit [Client Quit]
<al2o3-cr> Ox0dea: I can be cereal or stupeed
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tvon has joined #ruby
yqt has joined #ruby
mistermocha has joined #ruby
tectonic has joined #ruby
akkad has quit [Excess Flood]
_blizzy_ has joined #ruby
karapetyan has joined #ruby
d00s has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
al2o3-cr has quit [Ping timeout: 246 seconds]
uber has quit [Ping timeout: 264 seconds]
akkad has joined #ruby
al2o3-cr has joined #ruby
leafybasil has quit [Remote host closed the connection]
colegatron has joined #ruby
mistermocha has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tejasmanohar> hey
<tejasmanohar> will this really work w/ multiple servers / heroku dynos?
<tejasmanohar> there's no persistence layer, i think
fantazo has quit [Quit: Verlassend]
<tejasmanohar> isnt it possible a job would execute twice then
northfurr has quit [Quit: northfurr]
fedexo has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 272 seconds]
Creechoftheeast has quit []
<jhass> tejasmanohar: whenever just generates you the crontab, it doesn't run or schedule anything itself. What to do with that crontab is a job for your deployment
<tejasmanohar> ahaa
skade has joined #ruby
<tejasmanohar> is there a good cron-ish implementation in ruby itself?
<tejasmanohar> rufus-scheduler i guess
northfurr has joined #ruby
<havenwood> tejasmanohar: whenever
<tejasmanohar> i thought whenever relies on cron
<tejasmanohar> i was saying something you can deploy to say heroku
<tejasmanohar> doesn't need cron
<havenwood> tejasmanohar: yeah, it does
<havenwood> ah
<tejasmanohar> yea
<tejasmanohar> sorry that was badly phrased
<tejasmanohar> cron-ish implementation in ruby as in a replacement-ish for apps :P
<havenwood> i didn't read the backlog
<tejasmanohar> aha
<tejasmanohar> nice site
northfurr has quit [Client Quit]
skade has quit [Client Quit]
mistermocha has joined #ruby
snebel has joined #ruby
northfurr has joined #ruby
northfurr has quit [Client Quit]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
akem has joined #ruby
notnoyyyyy has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
arup_r has quit [Quit: Leaving]
yfeldblum has quit [Ping timeout: 240 seconds]
DoYouKnow has quit [Changing host]
DoYouKnow has joined #ruby
DoYouKnow has joined #ruby
sgambino has joined #ruby
l_tonz has joined #ruby
l_tonz has quit [Remote host closed the connection]
tvon has quit [Quit: leaving]
l_tonz has joined #ruby
Rollabunna has joined #ruby
crdpink has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
tulak has quit [Read error: Connection reset by peer]
tulak has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
leafybasil has joined #ruby
devbug has joined #ruby
kp666_ has joined #ruby
crdpink has joined #ruby
stamina has joined #ruby
uber has joined #ruby
kp666 has quit [Ping timeout: 260 seconds]
tvon has joined #ruby
Rollabunna has quit [Ping timeout: 264 seconds]
mistermocha has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 246 seconds]
banister has joined #ruby
rgtk has joined #ruby
mistermocha has joined #ruby
skade has joined #ruby
ibouvousaime_ has quit [Quit: Leaving]
ibouvousaime has joined #ruby
aspiers has quit [Ping timeout: 250 seconds]
dome22xl has joined #ruby
devoldmx has joined #ruby
eminencehc has quit [Remote host closed the connection]
aspiers has joined #ruby
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akem has quit [Read error: Connection reset by peer]
patdohere has joined #ruby
tvon has quit []
nettoweb has joined #ruby
tvon has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
hmsimha_ has joined #ruby
dome22xl has quit [Quit: Bye]
eminencehc has joined #ruby
yfeldblum has joined #ruby
aspiers has quit [Ping timeout: 272 seconds]
al2o3-cr has joined #ruby
aspiers has joined #ruby
prereflect has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
prereflect has quit [Client Quit]
<snebel> I'm trying to access an instance variable from a class method but I get nil
<ruboto> snebel, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5e707e36f5243a95d8ca
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vdamewood has quit [Ping timeout: 240 seconds]
<apeiros> snebel: KlassExample and klass are two different objects
<apeiros> so they do not share instance variables
<snebel> how could I access that variable?
<apeiros> you'll have to do self.class.description in your instance
patdohere has quit [Read error: Connection reset by peer]
<snebel> ah let me try
<apeiros> that'll call the class method `description` (which you have defined in your example)
mistermocha has quit [Remote host closed the connection]
<apeiros> the code you gisted btw. seems incomplete. it wouldn't run like that.
d00s has quit [Quit: Lost terminal]
armyriad has quit [Ping timeout: 255 seconds]
OrbitalKitten has joined #ruby
<Authenticator> jhass: Thanks for the Typhoeus suggestion. I'm looking into it now.
mistermocha has joined #ruby
rgrmatt has joined #ruby
devoldmx has quit [Remote host closed the connection]
armyriad has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
eminence_ has joined #ruby
rgrmatt has quit [Remote host closed the connection]
blackmes1 has joined #ruby
mistermocha has quit [Remote host closed the connection]
eminencehc has quit [Ping timeout: 260 seconds]
<snebel> I think I'm mixing things and I'm doing something weir, what I'm really looking for is a way for creating an instance from a class using an string to call the class
<snebel> I was googling over there and found that Object.const_get
<snebel> what would be the best way to do it?
<shevy> snebel you have it as string?
<snebel> I have a bunch of class files
<snebel> I'm loading them by reading the dir
blackmesa has quit [Ping timeout: 264 seconds]
<snebel> once loaded i'm trying to instantiate those objects
schi33 has quit [Remote host closed the connection]
<snebel> dynamically
<shevy> yeah the problem is that @description is not set since you do not instantiate
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
l_tonz has quit [Ping timeout: 244 seconds]
<shevy> "def self.description" is different than the "def initialize" part; you use @description in both cases, but these are two distinct @description
<Ox0dea> snebel: Have you considered autoloading?
<snebel> mmm i didn;t know there is something like this
<snebel> im pretty new :-)
DiCablo has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Erik_Underline has quit [Quit: Page closed]
<shevy> snebel here may be one variant: http://pastie.org/10522965
DLSteve has joined #ruby
eminence_ has quit [Ping timeout: 264 seconds]
<snebel> ah cool, so you basicaly instantiate on the class method
<shevy> always depends on what you wanna do; Object.const_get works though
<al2o3-cr> fuck me
mattwildig has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> van gerwen 4 piggy 6
<havenwood> al2o3-cr: Wrong channel? (Wrong channel.)
<snebel> yessss, thanks!!!!
<snebel> i need to read more to understand better...
ivanskie has joined #ruby
<snebel> step by step coll thanks!
rgrmatt has joined #ruby
<al2o3-cr> snebel: everyone was once like you are
<snebel> really grateful!
<Authenticator> I'm using Net::HTTP.start {} to make many API calls. After it's processed ~16400 items it always falls over with "Errno::EADDRNOTAVAIL: Can't assign requested address - connect(2) ..." - That's suspiciously close to 16384. After a while, I can rerun it and it'll do another ~16k... Any ideas why it fails?
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
<adaedra> Guess Typhoeus didn't work?
<c355E3B> Authenticator: are you assigning a port to your socket?
lukaszes has joined #ruby
<havenwood> "Creates a new Net::HTTP object, then additionally opens the TCP connection and HTTP session."
kp666_ has quit [Ping timeout: 250 seconds]
bMalum has quit [Quit: bMalum]
zenguy_pc has quit [Ping timeout: 260 seconds]
<c355E3B> Authenticator: whats the output of `cat /proc/sys/net/ipv4/ip_local_port_range` ?
<adaedra> Authenticator: otherwise, it seems you're running out of anonymous ports on your system. This would mean that the HTTP connections are kept open, maybe for keep-alive or something. Trying to see if you can't mutualize the HTTP objects and do multiple requests could be an idea.
h99h9h88 has joined #ruby
armyriad has quit [Quit: Leaving]
but3k4 has joined #ruby
houhoulis has quit []
<c355E3B> or just close the connection and force a gc
TheNet has joined #ruby
lukaszes has quit [Quit: Textual IRC Client: www.textualapp.com]
iamlukasz has joined #ruby
iamlukasz has quit [Client Quit]
houhoulis has joined #ruby
lukaszes has joined #ruby
<Authenticator> c355E3B: I'm doing start(uri.hostname, uri.port) {|h| ... } if that's what you mean by a port.
<al2o3-cr> this should fet you right `sudo sysctl -w net.ipv4.ip_local_port_range=$((2**32))`
<al2o3-cr> Authenticator: uri.host
karapetyan has quit [Remote host closed the connection]
run_kmc has joined #ruby
<Authenticator> c355E3B: 1024 65000
asmodlol has quit [Quit: Leaving]
<Authenticator> adaedra: Hmm, I'll see if I can fiddle with keep-alive or something. These are quick requests, and that this does timeout eventually and let me run it again does imply that...
<havenwood> Authenticator: Is using a persistent connection to the API a possibilty?
run_kmc has quit [Client Quit]
<Authenticator> havenwood: I have no idea.
juanpablo__ has joined #ruby
<havenwood> Authenticator: I'm curious, did you try Typhoeus?
l_tonz has joined #ruby
<Authenticator> c355E3B: I could try throwing in a GC call to see if it helps. It *shouldn't*, but...
karapetyan has joined #ruby
<c355E3B> I think your exsauting all of your computer's temp ports. So you either need to use the same port or make sure you cull ports your no longer needing.
mhib has quit [Read error: Connection reset by peer]
aspiers has quit [Ping timeout: 264 seconds]
h99h9h88 has quit [Remote host closed the connection]
sandals has joined #ruby
l_tonz has quit [Ping timeout: 255 seconds]
AnoHito_ has quit [Ping timeout: 240 seconds]
juanpablo__ has quit [Ping timeout: 272 seconds]
zenguy_pc has joined #ruby
<havenwood> Authenticator: Typhoeus supports keep-alive or there are other options that do like HTTP.rb, HTTPClient, Net::HTTP::Persistent, etc.
h99h9h88 has joined #ruby
<Authenticator> havenwood: I'm just trying now.
<havenwood> ^ HTTP.rb
blackmes1 has quit [Ping timeout: 240 seconds]
NeverDie has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
Dakuan has quit [Remote host closed the connection]
blackmes1 has joined #ruby
<NeverDie> L
<adaedra> M
<Ox0dea> N
<Authenticator> havenwood: I've also grabbed 'http'. I'll try it too.
<adaedra> Gotcha try them all.
<adaedra> er.
<adaedra> Gotta.
mistermocha has joined #ruby
Ulfalizer has quit [Quit: z]
pocketprotector has quit [Quit: WeeChat 1.2]
Azulinho has quit [Ping timeout: 244 seconds]
tulak has quit [Remote host closed the connection]
<havenwood> Mechanize, em-http-request and Curb are other options with keep-alive.
<shevy> keep your zombies alive people
bruno- has joined #ruby
<Ox0dea> havenwood: Just Net::HTTP::Persistent, even.
Rickmasta has quit [Read error: Connection reset by peer]
<Authenticator> Why do I have to do a two-phase load? "gem 'typhoeus' ; require 'typhoeus'"
<havenwood> Ox0dea: Already said that one!
<Ox0dea> Oh, right.
Rickmast_ has joined #ruby
<Authenticator> havenwood: I've already got Mechanize but I always saw it as a slower option for parsing and scraping.
<Authenticator> I don't know if that's at all fair...
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
poguez_ has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 240 seconds]
VeryBewitching has joined #ruby
<Ox0dea> Authenticator: It's fair. A solid understanding of HTTP is much better than bothering with the DOM.
bradleyprice has quit [Remote host closed the connection]
mistermocha has joined #ruby
spider-mario has quit [Remote host closed the connection]
mistermo_ has quit [Ping timeout: 265 seconds]
bnizzle has joined #ruby
bnizzle1 has quit [Ping timeout: 272 seconds]
mloy has joined #ruby
bruno- has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
htmldrum has joined #ruby
l_tonz has joined #ruby
freerobby has quit [Quit: Leaving.]
bMalum has joined #ruby
mallu has joined #ruby
trosborn has joined #ruby
hmsimha_ has quit [Ping timeout: 265 seconds]
bruno- has quit [Ping timeout: 255 seconds]
mistermocha has joined #ruby
justinweiss has quit []
sphex has quit [Ping timeout: 255 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
bruno- has joined #ruby
jamesaxl has quit [Remote host closed the connection]
freerobby has joined #ruby
sphex has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
snebel has quit [Quit: Leaving]
<Authenticator> al2o3-cr: You need ="1024 $((2**n))" in that command line. I didn't think > 65535 would work, and it didn't.
ivanskie has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
mistermocha has quit [Ping timeout: 256 seconds]
to_json has joined #ruby
to_json has joined #ruby
h99h9h88 has joined #ruby
kinduff has joined #ruby
RobertBirnie has quit [Ping timeout: 255 seconds]
AnoHito has joined #ruby
RobertBirnie has joined #ruby
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
skcin7 has joined #ruby
freerobby has quit [Quit: Leaving.]
bruno- has joined #ruby
tulak has joined #ruby
tulak has quit [Remote host closed the connection]
rgrmatt has quit [Remote host closed the connection]
tulak has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
davidmst has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
bruno- has joined #ruby
<al2o3-cr> Authenticator: uh, uh
rgtk has quit [Remote host closed the connection]
rgtk has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
musou has joined #ruby
rgrmatt has joined #ruby
mattwildig has quit [Remote host closed the connection]
l_tonz has joined #ruby
m3_del has joined #ruby
mag42c has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
<al2o3-cr> Authenticator: the impossible i can do, mircacles take a little bit longer
mag42c has joined #ruby
karapetyan has quit [Remote host closed the connection]
notnoyyyyy has quit [Quit: Me fail English? That's unpossible.]
notnoyyyyy has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
karapetyan has joined #ruby
marr has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr> Authenticator: maybe 2**32 is just to big of a ...
<al2o3-cr> just maybe
mattwildig has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mag42c has quit [Quit: mag42c]
<al2o3-cr> Ox0dea: tell me about fiddle!
but3k4 has joined #ruby
karapetyan has quit [Remote host closed the connection]
trosborn has quit [Quit: trosborn]
m3_del has quit [Remote host closed the connection]
<al2o3-cr> >> $>.class
<ruboto> al2o3-cr # => IO (https://eval.in/461296)
<al2o3-cr> >> $<.class
<ruboto> al2o3-cr # => ARGF.class (https://eval.in/461297)
karapetyan has joined #ruby
<al2o3-cr> weird
_blizzy_ has quit [Quit: Leaving]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr> that is the weirdest thing in ruby
mikeharris22 has joined #ruby
eshy has joined #ruby
Starbreaker has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
bruno- has joined #ruby
jpfuentes2 has joined #ruby
<Mon_Ouie> >> Thingy = Class.new { def self.inspect; "Thingy.class"; end }.new; Thingy.new.class
<ruboto> Mon_Ouie # => undefined method `new' for #<#<Class:0x407a3f74>:0x407a3f10> (NoMethodError) ...check link for more (https://eval.in/461298)
<Mon_Ouie> >> Thingy = Class.new { def self.inspect; "Thingy.class"; end }.new; Thingy.class
<ruboto> Mon_Ouie # => Thingy.class (https://eval.in/461299)
<Mon_Ouie> ^ they just chose to do something similar to this to implement it
<banister> Mon_Ouie 'alut
<banister> Mon_Ouie rust seems like your kind of language, are you learning it?
<al2o3-cr> Mon_Ouie: Why?
Starbreaker has joined #ruby
rgrmatt has quit [Remote host closed the connection]
<Mon_Ouie> banister: 'alut. Never looked at it, no
mikeharris22 has quit [Ping timeout: 252 seconds]
kinduff has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Mon_Ouie> al2o3-cr: I don't know, maybe because it only makes sense to have one instance of ARGF, though that's not how they implemented true/false
<banister> Mon_Ouie you should, it'll get your blood pumping again, you'll look away momentarily from the screen, then look back and feel your blood surge, you'll be programming late into the night and need to dive head first into the canal just to cool yourself down
bruno- has quit [Ping timeout: 255 seconds]
uber has quit [Ping timeout: 272 seconds]
opensource_ninja has joined #ruby
<al2o3-cr> Mon_Ouie: My point exactly
<al2o3-cr> Just an odd ball?
<Mon_Ouie> Probably. If you want to see a third way to do it, look at how ENV works.
<al2o3-cr> When got Y need an X, no?
<Mon_Ouie> (ENV.class == Object, the methods are on its singleton class)
<banister> Mon_Ouie are you still bothering with haskell or has that been tossed aside?
<banister> Mon_Ouie and what new/fascinating projects are you working on?
<banister> al2o3-cr Mon_Ouie is the rimbaud of ruby
<Mon_Ouie> I haven't done much lately
<Mon_Ouie> banister is Rimbaud's biggest fan
Dakuan has joined #ruby
<banister> Mon_Ouie you're going to give up programming and smuggle guns in/out of africa instead?
<Mon_Ouie> I'm not actively trying to mimic his life, no ;)
<banister> i saw the place where he shot verlaine recently, while i was in brussels ;)
<banister> exciting, too bad it's nearly that ridiculous pissing statue
<al2o3-cr> Mon_Ouie: Thanks explaination
<al2o3-cr> *for
<al2o3-cr> *the
<banister> al2o3-cr explanation*
<banister> al2o3-cr you completely messed that up, try again!
<al2o3-cr> banister: *k thanks
<banister> near that*
<banister> oh god, i failed too
<al2o3-cr> shit happens
bruno- has joined #ruby
<banister> Mon_Ouie are you doing yoru masters already?
<Mon_Ouie> Yes, first out of two years
Rollabunna has joined #ruby
<al2o3-cr> Can anyone tell me why addiction has got the better of me?
<havenwood> ?ot al2o3-cr
<banister> Mon_Ouie cool, what's your topic?
<banister> al2o3-cr because god no longer shines his light on you
<banister> read more rimbaud
Dakuan has quit [Ping timeout: 252 seconds]
hmsimha_ has joined #ruby
<Mon_Ouie> Oh, the topic of the thesis is picked around the beginning of the next semester
nertzy has joined #ruby
uber has joined #ruby
<banister> Mon_Ouie has seen the low-hanging sun speckled with mystic horrors
<banister> Mon_Ouie has seen the dawn rise up like a flock of doves
blueOxigen has quit [Ping timeout: 256 seconds]
ivanskie has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
<Authenticator> al2o3-cr: Yeah, 2**16 works. Too bad we didn't figure on the p65k limit when Unix was being designed.
Rollabunna has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
mag42c has joined #ruby
rgtk has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 246 seconds]
tectonic has quit []
m3_del has joined #ruby
l_tonz has quit [Ping timeout: 255 seconds]
l_tonz_ has joined #ruby
m3_del has quit [Read error: Connection reset by peer]
m3_del has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
krumelmonster1 has quit [Quit: Leaving.]
opensource_ninja has quit [Ping timeout: 240 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
stamina has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
Jackneill has quit [Remote host closed the connection]
ElFerna has joined #ruby
riotjone_ has joined #ruby
rgtk has joined #ruby
bruno- has joined #ruby
<dorei> is there some ruby testing framework where i could provide it with a set of inputs and a set of expected outputs ?
FernandoBasso has quit [Quit: WeeChat 1.3]
riotjon__ has quit [Ping timeout: 240 seconds]
DN404 has joined #ruby
<DN404> hi
ivanskie has quit [Ping timeout: 260 seconds]
mistermocha has quit [Ping timeout: 256 seconds]
tectonic has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
Ropeney has joined #ruby
bluOxigen has joined #ruby
mikeharris22 has joined #ruby
<al2o3-cr> DN404: as a duck
htmldrum has joined #ruby
rgtk has quit [Remote host closed the connection]
mikeharris22 has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
l_tonz_ has quit [Ping timeout: 240 seconds]
<Authenticator> jhass: havenwood: Wow, Typhoeus is *amazing*. It's like twenty or more times faster than Net::HTTP and I've made well over 16k - 58k in 35 seconds, and it handled it perfectly!
l_tonz has joined #ruby
<jhass> ikr
scpike has joined #ruby
MVPhelp has joined #ruby
Rickmast_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
Rickmasta has joined #ruby
juanpablo__ has joined #ruby
MVPhelp has quit [Remote host closed the connection]
icbm has quit [Quit: Leaving]
MVPhelp has joined #ruby
kinduff has joined #ruby
zenguy_pc has quit [Ping timeout: 264 seconds]
kinduff has quit [Client Quit]
nertzy has quit [Quit: This computer has gone to sleep]
juanpablo__ has quit [Ping timeout: 255 seconds]
eminencehc has quit [Ping timeout: 240 seconds]
uber_ has joined #ruby
eminencehc has joined #ruby
ohaibbq has joined #ruby
diegoviola has joined #ruby
horsecowdog has joined #ruby
skade has joined #ruby
devbug_ has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
devbug has quit [Ping timeout: 264 seconds]
Starbreaker has quit []
rbennacer has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tectonic has quit []
zenguy_pc has joined #ruby
l_tonz has quit [Ping timeout: 260 seconds]
skade has quit [Ping timeout: 272 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
trosborn has joined #ruby
mikeharris22 has joined #ruby
Dakuan has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
l_tonz has joined #ruby
duckpuppy has quit [Ping timeout: 268 seconds]
<shevy> al2o3-cr it may be how your brain works, but often you can trick your brain
<shevy> al2o3-cr perhaps you got a superbrain http://www.folklore.org/StoryView.py?story=Make_a_Mess,_Clean_it_Up!.txt
<al2o3-cr> shevy: can i ask you a Q?
rbennacer has quit [Remote host closed the connection]
<shevy> no :)
mikeharris22 has quit [Ping timeout: 240 seconds]
Dakuan has quit [Ping timeout: 240 seconds]
<al2o3-cr> shevy: I will ask anyway, do you coding?
<al2o3-cr> *like
<shevy> well that depends
firstdayonthejob has quit [Ping timeout: 250 seconds]