havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.3 & 2.2.6 (2.4.0-rc1): https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby
<marchelzo> pilne: do you plan on changing careers eventually or is programming just a hobby?
xall has joined #ruby
<pilne> hoping for a change, maybe full-time internal where i'm at, maybe something more programming-oriented to begin with. I've got my eyes and ears open.
montanonic has joined #ruby
xall has quit [Ping timeout: 250 seconds]
meshsmith has quit [Remote host closed the connection]
<marchelzo> cool
<marchelzo> i might make a lisp in ruby too now. you inspired me
agent_white has joined #ruby
kies has joined #ruby
BTRE has joined #ruby
<zenspider> marchelzo: pretty easy to do
<pilne> i feel like i "create" code in ruby vs. "writing" it in other languages i've tried to really get comfy with.
<agent_white> Like silly putty!
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Remote host closed the connection]
<pilne> lol, apt analogy
<zenspider> pilne: not sure I understand your distinction...
<pilne> when i say "write" it is more like by rote, "as directed" more translation going from "here's what i want to do" into "here's how to get it done" (with other languages).
<pilne> "create" is more of a direct brain <--> code translation
<zenspider> gotcha. I think of ruby a lot like that... it's the cleanest language to transliterate ideas from my brain to a text editor
<pilne> write has several calls to "map" code = brain.map.map.map
<pilne> exactly
<pilne> very low cognitive friction
<zenspider> the inverse is probably also true... my brain is tuned to think in ways compatible with ruby more than others
<zenspider> rust ... I ____struggled____ to go from idea to code
<zenspider> racket... I do _ok_, but it isn't a good fit yet
<zenspider> brb
<marchelzo> i wrote my own toy language and i actually find it very natural to write
<marchelzo> i think it's mainly to do with familiarity
<marchelzo> pilne: how long have you been doing ruby now
Devalo has joined #ruby
<pilne> on and off the whole 2 years i've dabbled again, but i've flirted with java (again), c++(11/14), python, racket, clojure, kotlin, scala, go, javascript (and a few transpilers), and haskell.
<pilne> oh and dart a couple of times
<pilne> but ruby and clojure draw me in the most, but i just tend to find myself prefering functional constructs in an OO language, than OO constructs in a functional language
<marchelzo> how long did it take to get to a point where you felt like you were "creating" in ruby
<zenspider> marchelzo: I disagree... I'm very familiar with a lot of languages... some fit your brain better than others
webopsx has joined #ruby
<pilne> cumulatively? i'd probably chalk it up at about 6-8 months, and really, exploring a scheme/lisp a decent amount, and smalltalk is what really "did" it.
<marchelzo> zenspider: yeah i guess since i designed the language it fits my brain really well too
<marchelzo> zenspider: that's a good point
<zenspider> pilne: I've found oo in functional to be pretty painful. I keep trying tho
webopsx has quit [Max SendQ exceeded]
<zenspider> pilne: you use clojurescript at all? viable? I can't stand the cost of jvm so I don't want to deal with clojure proper
Devalo has quit [Ping timeout: 246 seconds]
<zenspider> but I *love* racket
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<pilne> i can't stand js/node stuff generally, and i'm more comfy with the jvm, lol. but from what i dipped my toes into, clojurescript basically *is* clojure for most intents and purposes, and where it diverges is pretty clearly doc'd.
<pilne> there are some very good "up and running" blog snippets
<zenspider> someone did racketscript recently... not sure how usable it is yet
<pilne> there was/is whalesong for racket
<marchelzo> pilne: how complete are you planning on making your lisp
ur5us has quit [Ping timeout: 252 seconds]
<pilne> at first? not very, and i'll probably aim for R5RS scheme honestly
[Butch] has quit [Quit: I'm out . . .]
millerti has joined #ruby
<marchelzo> that's ambitious
<pilne> a CL implementation is way more than I could do an any reasonable attention-span of mine at this point.
<pilne> slowly but surely, it can be done, the standard is publicly available
<zenspider> pilne: whalesong is pretty defunct
<pilne> i *know* i'll have to do do some frontend at some point, if even for my pet projects, i'm decently excited for opal, but honestly, even dart is nice for my aspirations.
<pilne> and the vm itself isn't that shabby, but the language isn't enough like silly putty for me on a "personal"/feel level.
<pilne> and if i'm honestly doing this mostly for fun at this point, i better damn well enjoy it!
PresidentBiscuit has joined #ruby
<marchelzo> given a Regex that is not anchored, can i anchor it somehow?
marxarelli is now known as marxarelli|afk
marxarelli|afk is now known as marxarelli
marxarelli is now known as marxarelli|afk
marxarelli|afk is now known as marxarelli
ropeney has joined #ruby
<marchelzo> Regexp sorry
lxsameer has quit [Quit: WeeChat 1.6]
<havenwood> marchelzo: Regexp::union
<havenwood> >> Regexp.union /\d+/, /\z/ # marchelzo
<ruby[bot]> havenwood: # => /(?-mix:\d+)|(?-mix:\z)/ (https://eval.in/701741)
marxarelli is now known as marxarelli|afk
<havenwood> marchelzo: is that what you meant?
<marchelzo> i don't want union i want concatenation
<havenwood> ah, right
<havenwood> marchelzo: you can interpolate with Regexp
Byan has left #ruby [#ruby]
<elomatreb> >> some_regex = /test/; Regexp.new(some_regex.source + "\\z")
<ruby[bot]> elomatreb: # => /test\z/ (https://eval.in/701742)
<marchelzo> ah, .source
<marchelzo> that helps
<havenwood> >> /#{/\d+/}\z/
<ruby[bot]> havenwood: # => /(?-mix:\d+)\z/ (https://eval.in/701744)
marr has quit [Ping timeout: 258 seconds]
<marchelzo> how do you read that (?-mix: thing?
<havenwood> marchelzo: default regexp options, (m)ulti-line, case-(i)nsenstive, e(x)tended
<havenwood> >> /\d+/.to_s
<ruby[bot]> havenwood: # => "(?-mix:\\d+)" (https://eval.in/701745)
<marchelzo> i see
<marchelzo> thanks
arescorpio has joined #ruby
duderonomy has quit [Ping timeout: 258 seconds]
dtzu has quit [Ping timeout: 250 seconds]
ruby-lang002 has joined #ruby
ruby-lang002 has quit [Client Quit]
DTZUZU has quit [Ping timeout: 256 seconds]
<epitron> pilne: damn, you know a lot of languages for someone who doesn't have a programming job :)
ur5us has joined #ruby
<epitron> havenwood: that's actually not-multiline
<epitron> >> /#{//m}#{//}/
Azure has quit [Remote host closed the connection]
<ruby[bot]> epitron: # => /(?m-ix:)(?-mix:)/ (https://eval.in/701746)
<marchelzo> given a class C, i want to get a function f such that calling f on an instance c will invoke its foo method. how can i do that?
<havenwood> epitron: ah, yeah it's -
<marchelzo> instance c of C
Tomoe has joined #ruby
<havenwood> epitron: not any of those things
Tomoe has left #ruby [#ruby]
<havenwood> epitron: my head is all fuzzy from cough medicine, durned cold
dtzu has joined #ruby
<epitron> o noes!
DTZUZU2 has joined #ruby
<epitron> when did that start?
<havenwood> days ago, so at least it's on the mend - but now i have no excuse not to catch up on Advent of Code
marxarelli|afk has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<havenwood> in bed, I should be coding
<epitron> sounds like a good boredom remedy :)
Azure has joined #ruby
<agent_white> marchelzo: alias?
nettoweb has joined #ruby
bradleyprice has quit [Remote host closed the connection]
<marchelzo> agent_white: i'm sorry?
<agent_white> marchelzo: You can to call an instance method by a different name, right?
<agent_white> If I read what you meant correctly.
<agent_white> c.f instead of c.foo
<marchelzo> no
<marchelzo> f(c) instead of c.foo
<pilne> epitron=> i would hardly say "know" i've dipped my toes in
<marchelzo> like this is how i would imagine it working, but this doesn't work of course
<epitron> pilne: ah, ok...
<marchelzo> f = C.foo; c = C.new; f(c)
<agent_white> marchelzo: Ah. Then you aren't calling f on instance c; you're just passing c into f.
<epitron> pilne: still, that's an impressive range of programming paradigms
<agent_white> Hrm.
<epitron> pilne: you said you took C++ and Java in college too?
<epitron> you SOUND a lot like a programmer to me :)
<havenwood> >> class C; def foo; :foo end end; f = C.instance_method(:foo); c = C.new; f.bind(c).call
<ruby[bot]> havenwood: # => :foo (https://eval.in/701747)
<havenwood> marchelzo: ^ dunno if that's at all what you mean, but it's a thing.
kies has quit [Ping timeout: 258 seconds]
<havenwood> marchelzo: You can unbind and rebind methods.
<marchelzo> i see
<epitron> be warned: doing that has performance costs
<epitron> also, awkward code costs
<epitron> (why are you doing that? :)
<pilne> c++98 in high school, and 2 years of java in college, used 1.2 though, please keep that in context of "java" lol.
koldbrutality has joined #ruby
Devalo has joined #ruby
Guest61440 is now known as opt9
<marchelzo> epitron: well i'm writing a parser, and i was going to have a list of [Regexp, Method] pairs. i would iterate over them, and whichever pattern matches the begininning of the stream, i'll call its method on myself.
bronson has joined #ruby
jackjackdripper has joined #ruby
Channel6 has joined #ruby
<epitron> just use Procs
<epitron> closures, baby!!
<epitron> yeahhh!
bronson has quit [Ping timeout: 264 seconds]
troys is now known as troys_
SteenJobs_ has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
symm- has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Quit: Leaving.]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PresidentBiscuit has quit [Remote host closed the connection]
Flonk has quit [Quit: ZNC - http://znc.in]
<marchelzo> epitron: so like
<marchelzo> -> c { c.foo }
<marchelzo> ?
<epitron> marchelzo: ruby DSLs can be written like this -- https://eval.in/701750
dnicole has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<epitron> you can evaluate the blocks in the context of another class
<epitron> instance_eval is great
JaredR has joined #ruby
<epitron> that DSL.build method is pretty pointless...
<epitron> could just be DSL.new { }
symm- has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
<marchelzo> that's very cool
dnicole has quit [Ping timeout: 245 seconds]
<epitron> marchelzo: instance eval is a public method, too. so you can evaluate code in the context of an instance from another instance
<marchelzo> seems kind of like 'with' in javascript
<marchelzo> but they discourage that strongly
JaredR is now known as ResidentBiscuit_
ResidentBiscuit_ is now known as ResidentBiscuit
milardovich has joined #ruby
<epitron> yeah, this looks similar
<epitron> another option is to use closures cleverly
<epitron> make the state local variables in the enclosing scope
nankyokusei has joined #ruby
<epitron> it looks like you can make a lisp parser with just one regex: https://github.com/readevalprintlove/ulithp/blob/master/src/reader.rb
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
milardovich has quit [Ping timeout: 252 seconds]
symm- has quit [Ping timeout: 245 seconds]
nankyokusei has quit [Ping timeout: 248 seconds]
UserJosh has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jshjsh has quit [Ping timeout: 250 seconds]
<pilne> ruby really never ceases to amaze me at what can be expressed without looking like something out of a dystopian 1984-inspired nightmare.
<marchelzo> what's the difference between proc and lambda
charliesome has joined #ruby
charliesome has quit [Client Quit]
skweek has joined #ruby
xall has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
jenrzzz has quit [Ping timeout: 265 seconds]
xall has quit [Ping timeout: 250 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has quit [Ping timeout: 246 seconds]
gbgdev has quit [Remote host closed the connection]
SteenJobs_ has joined #ruby
jenrzzz has joined #ruby
charliesome has joined #ruby
<havenwood> marchelzo: If you call a lambda inside a method and `return` from the lambda it will return to the calling method and continue where it left off. If you call a proc inside a method and `return` from the proc it will return from the calling method as well.
<havenwood> marchelzo: A lambda enforces arity and a proc may or may not.
<marchelzo> yeah i found a pretty good article explaining the differences
ropeney has joined #ruby
<havenwood> marchelzo: Also a proc acts as a block sponge, like if you pass a method a block a `proc` will magically be the yielded block.
ur5us has quit [Remote host closed the connection]
milardovich has joined #ruby
duderonomy has joined #ruby
<havenwood> >> def marchelzo; proc.call end; marchelzo { :ok }
<ruby[bot]> havenwood: # => :ok (https://eval.in/701757)
ur5us has joined #ruby
<marchelzo> does `return` in a proc always return from the calling method?
<havenwood> marchelzo: yes
<marchelzo> then why is this an error
<marchelzo> >> [1, 2, 3].map &proc { return 3 }
<ruby[bot]> marchelzo: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/701758)
<marchelzo> why doesn't it just return 3 from map?
<havenwood> >> return
<ruby[bot]> havenwood: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/701759)
<havenwood> marchelzo: You're not in a method.
<marchelzo> i'm not calling the proc
<marchelzo> Array#map is
<marchelzo> Array#map is a method
<havenwood> marchelzo: It's trying to return, and you're inside a block not inside a method.
<marchelzo> i don't understand
<marchelzo> is Array#map a method?
<havenwood> >> def marchelzo; [1, 2, 3].map &proc { return 3 }; puts 'never run' end; marchelzo
<ruby[bot]> havenwood: # => 3 (https://eval.in/701760)
<havenwood> >> [1, 2, 3].map { self }
<ruby[bot]> havenwood: # => [main, main, main] (https://eval.in/701761)
milardovich has quit [Ping timeout: 246 seconds]
troys_ is now known as troys
<marchelzo> presumably in Array#map, there is some loop where they do new_array << block.call old_array[i]
<marchelzo> right?
ur5us has quit [Ping timeout: 248 seconds]
<havenwood> marchelzo: Consider: 1.times { return }
<marchelzo> ok
<marchelzo> what about it
<havenwood> marchelzo: Would you expect a LocalJumpError, returning there?
<havenwood> marchelzo: Or; begin; return end
<havenwood> marchelzo: There's no enclosing method to return to.
<marchelzo> if procs return from the calling method, then no, but i think there will be a LocalJumpError
<marchelzo> >> 1.times { return }
<ruby[bot]> marchelzo: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/701764)
cnk has quit [Quit: cnk]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<marchelzo> but why doesn't it just return from times?
<marchelzo> i'm not the one calling the proc
ResidentBiscuit has quit [Remote host closed the connection]
<havenwood> marchelzo: What's running in the block has nothing to return to. A return in a block has the same locality of return as a proc.
ResidentBiscuit has joined #ruby
charliesome has joined #ruby
<marchelzo> >> def foo(&block); block.call; puts 'foo'; end; def bar; foo &proc { return }; puts 'bar'; end; bar
<ruby[bot]> marchelzo: # => nil (https://eval.in/701765)
<havenwood> marchelzo: You're effectively passing the proc as the block and returning to nothing.
<havenwood> marchelzo: I have medicine head and am probably explaining very badly. Sorry! :-P Maybe someone else can be more clear.
<marchelzo> havenwood: so really they don't return from the calling method they return from the defining method?
charliesome has quit [Client Quit]
ur5us has joined #ruby
hotpancakes has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
ResidentBiscuit has quit [Ping timeout: 245 seconds]
d^sh has quit [Ping timeout: 258 seconds]
<havenwood> [1, 2, 3].map { __method__ } # marchelzo
<havenwood> => [:irb_binding, :irb_binding, :irb_binding]
d^sh has joined #ruby
<marchelzo> so blocks are called in the context where they're defined?
<havenwood> or rather they return from the callee
<marchelzo> [1, 2, 3].map &lambda { __method__ }
<marchelzo> oops
<havenwood> >> def hi; [1, 2, 3].map { __callee__ }; end; hi
<ruby[bot]> havenwood: # => [:hi, :hi, :hi] (https://eval.in/701766)
<marchelzo> >> [1, 2, 3].map &lambda { __method__ }
<ruby[bot]> marchelzo: # => wrong number of arguments (given 1, expected 0) (ArgumentError) ...check link for more (https://eval.in/701767)
<havenwood> >> [1, 2, 3].map &-> n { __callee__ } # marchelzo
<ruby[bot]> havenwood: # => [nil, nil, nil] (https://eval.in/701768)
<marchelzo> >> [1, 2, 3].map &-> n { return 42 }
<ruby[bot]> marchelzo: # => [42, 42, 42] (https://eval.in/701769)
johnzorn- has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
<havenwood> marchelzo: Yeah, lambdas have a nice local return that corresponds to where it was called. Insert some mutterings about Tennent's Correspondence Principle here.
UserJosh has quit [Quit: Leaving]
kies has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
johnzorn has joined #ruby
reverberations has quit [Quit: Leaving]
reverberations has joined #ruby
yeticry_ has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
yeticry_ has quit [Ping timeout: 252 seconds]
yeticry has joined #ruby
bruce_lee has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
antoniobeyah has joined #ruby
optiz0r has quit [Ping timeout: 256 seconds]
blackbom1 has quit [Ping timeout: 245 seconds]
enterprisey has joined #ruby
pilne has quit [Quit: Quitting!]
gusrub has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
milardovich has joined #ruby
nankyokusei has joined #ruby
A_ron has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
<zenspider> havenwood: your explanation is spot on
<zenspider> medicine or no... but you should share nonetheless
milardovich has quit [Ping timeout: 246 seconds]
<marchelzo> zenspider: the explanation is spot on?
troys is now known as troys_
<marchelzo> blocks return from the calling method?
nankyokusei has quit [Ping timeout: 250 seconds]
<zenspider> marchelzo: that's not what he said
<zenspider> marchelzo: reason about this
tmtwd has joined #ruby
<zenspider> def block_to_proc(&b) b; end; def x; block_to_proc { return 42 }; end
<zenspider> if I call x, I get back a proc. If I call that proc, what should it do?
harfangk has joined #ruby
dnicole has joined #ruby
harai_ has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
hanmac has quit [Ping timeout: 245 seconds]
<marchelzo> zenspider: nothing
<marchelzo> err
<marchelzo> i don't know
<marchelzo> returning 42 would be logical but it wouldn't fit with what i've seen so far
<zenspider> well... you're a language designer now... reason about it. "why doesn't it just return 3 from map?" is your conundrum
Yacker has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
dnicole has quit [Ping timeout: 258 seconds]
<marchelzo> i would expect it to return from x, but x has already returned, so maybe it's an error?
<marchelzo> >> def block_to_proc(&b) b; end; def x; block_to_proc { return 42 }; end; x.call
<ruby[bot]> marchelzo: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/701773)
<marchelzo> yay
braincrash has quit [Ping timeout: 258 seconds]
<zenspider> marchelzo: ok... so what about ary.map(&x) ?
A_ron has quit [Quit: Textual IRC Client: www.textualapp.com]
<marchelzo> also an error, right?
<zenspider> right
foo_ has joined #ruby
bradleyprice has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
foo_ has quit [Client Quit]
beilabs has joined #ruby
hanmac has joined #ruby
xall has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
dnicole has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
xall has quit [Ping timeout: 265 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
ersk1ne has quit [Ping timeout: 264 seconds]
meshsmith has joined #ruby
howdoi has joined #ruby
blackbom1 has joined #ruby
gnufied has quit [Quit: Leaving]
djbkd has quit [Ping timeout: 250 seconds]
harai_ has joined #ruby
jaguarmagenta has joined #ruby
blackbom1 has quit [Ping timeout: 265 seconds]
brendan- has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
milardovich has joined #ruby
blackbom1 has joined #ruby
astrobunny has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
milardovich has quit [Ping timeout: 260 seconds]
tubuliferous has quit [Ping timeout: 268 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
BTRE has joined #ruby
chouhoulis has quit [Remote host closed the connection]
andrzeju_ has quit [Ping timeout: 252 seconds]
sdwrage has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
sdwrage has quit [Client Quit]
SteenJobs_ has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
skweek has joined #ruby
Yacker has quit [Quit: Textual IRC Client: www.textualapp.com]
antoniobeyah has quit [Quit: antoniobeyah]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
arescorpio has quit [Quit: Leaving.]
Sammichmaker has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
UserJosh has joined #ruby
UserJosh is now known as JoshS
Devalo has joined #ruby
enterprisey has quit [Remote host closed the connection]
antoniobeyah has joined #ruby
braincrash has joined #ruby
jenrzzz has joined #ruby
cfec0b8d has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
armin has quit [Remote host closed the connection]
nankyokusei has joined #ruby
armin has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 256 seconds]
milardovich has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
A124 has joined #ruby
gix has joined #ruby
montanonic has quit [Ping timeout: 264 seconds]
milardovich has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
BrianJ has quit [Read error: Connection reset by peer]
ponga has quit []
BrianJ has joined #ruby
<Rich_Morin> clear
Devalo has quit [Ping timeout: 246 seconds]
<nofxx> Rich_Morin, life's too short man: Ctrl + l
<Rich_Morin> not in Adium
maattdd has joined #ruby
djbkd has joined #ruby
montanonic has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
yeticry has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
bronson has joined #ruby
maattdd has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
montanonic has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 256 seconds]
milardovich has quit [Ping timeout: 245 seconds]
tvw has joined #ruby
jenrzzz has joined #ruby
montanonic has joined #ruby
tubuliferous has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
xall has joined #ruby
pawnbox has joined #ruby
xall has quit [Ping timeout: 250 seconds]
empty_cup has quit [Quit: leaving]
dionysus69 has joined #ruby
adgtl has quit [Quit: bye]
cyphase has quit [Ping timeout: 256 seconds]
meshsmith has quit [Remote host closed the connection]
astrobunny has quit [Remote host closed the connection]
BillSussman has joined #ruby
rakm has joined #ruby
cyphase has joined #ruby
slackbotgz has joined #ruby
anisha has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
Channel6 has quit [Quit: Leaving]
radic has quit [Quit: ZNC - http://znc.in]
jenrzzz has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
araujo has joined #ruby
Devalo has joined #ruby
radic has joined #ruby
harai_ has quit [Ping timeout: 240 seconds]
gbgdev has joined #ruby
uranellus has quit [Quit: ZNC 1.6.1 - http://znc.in]
ur5us has quit [Remote host closed the connection]
<pragmatism> What's the best framework to prototype and iOS and Android app in simuntaneously?
<pragmatism> I'm asking here first because I prefer Ruby.
Devalo has quit [Ping timeout: 246 seconds]
<pragmatism> I see RubyMotion
<pragmatism> I also speak JS, so frameworks there are welcome too I guess,
<pragmatism> so Ionic?
koldbrutality has quit [Remote host closed the connection]
nowz has joined #ruby
gbgdev has quit [Ping timeout: 250 seconds]
<pragmatism> Ohhhhh man, ignore me. The conversation I'm in the middle of is honestly more interesting. I'll google.
<pragmatism> @zenspider would you throw your code in a gist? To me, it looks like you're missing s semicolon in your abbreviated example. so I wanna be sure.
<pragmatism> ^ sry, slack habit
uranellus has joined #ruby
uranellus has quit [Changing host]
uranellus has joined #ruby
tau has quit [Remote host closed the connection]
futabachannel has joined #ruby
hotpancakes has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 264 seconds]
hotpancakes has joined #ruby
d0nn1e has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
slackbotgz has quit [Remote host closed the connection]
nankyokusei has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]
astrobunny has joined #ruby
xall has joined #ruby
pawnbox has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 240 seconds]
cyphase has quit [Ping timeout: 250 seconds]
troys_ is now known as troys
BlaDe^ has quit [Remote host closed the connection]
neophyterubyist has joined #ruby
<neophyterubyist> hello
<havenwood> neophyterubyist: hi
<neophyterubyist> I have an array of strings
cyphase has joined #ruby
<havenwood> I match your array of strings and raise you an array of integers.
<neophyterubyist> I am trying to join any string shorter than a length e.g. 500 chars with the next string in the array unless the concatenated length exceeds the length
<neophyterubyist> any suggestions on how to do this ?
<pragmatism> what?
<pragmatism> Concatenage the strings, check the length, and with an if clause exclude those that don't match
<b0nn> hrm, needs to check the length of the strings pre concatenation
<neophyterubyist> I have to iterate on each string and backtrack if they exceeds
<pragmatism> you could also use a enum#select block to only be truthy on length upon concatenation is greater than 500
<neophyterubyist> yes but I have to preserve the order
<pragmatism> What?
<neophyterubyist> this is due to stupid amazon api limitations
<neophyterubyist> I am trying to use their polly service to convert an article
montanonic has quit [Ping timeout: 264 seconds]
<pragmatism> Order is reinforced.
<baweaver> neophyterubyist: what exactly are you trying to do?
<neophyterubyist> but there is a 1500 char limit
<baweaver> user data string for an ec2 launch?
<neophyterubyist> so I am splitting everything into sentences into pragmatic segmenter
<pragmatism> Homework?
<neophyterubyist> amazon polly
<neophyterubyist> nope
<neophyterubyist> quick script to automate some stuff
<pragmatism> kk
<baweaver> Which API are you using?
<neophyterubyist> amazon polly
<neophyterubyist> v3
<neophyterubyist> api v3
<neophyterubyist> right now I am trying to join sentences together unless they exceed the 1500 char limit
<baweaver> Hadn't seen that one before
<pragmatism> So again, what prevents you from checking the length before computation?
<pragmatism> just use an if statement
<neophyterubyist> pragmatism: can you elaborate?
<neophyterubyist> I am rather new to ruby
<pragmatism> Sure, sorry
tubuliferous has quit [Ping timeout: 250 seconds]
codfection has joined #ruby
pawnbox has joined #ruby
<pragmatism> [22:37:05] <b0nn>hrm, needs to check the length of the strings pre concatenation
<pragmatism> [22:37:15] <neophyterubyist>I have to iterate on each string and backtrack if they exceeds
<havenwood> neophyterubyist: In shorthand: array.each_with_object([]) { |s, a| a.last&.size&.<(1500) ? a.last << s : a << s }
<pragmatism> Fuck, sorry, can't edit that.
<pragmatism> Meant: <neophyterubyist>I am trying to join any string shorter than a length e.g. 500 chars with the next string in the array unless the concatenated length exceeds the length
<baweaver> havenwood had what I was about to do.
fzxi has joined #ruby
<neophyterubyist> what are the ampersands for?
<pragmatism> havenwood +=1
<baweaver> I forget about the lonely operator
<baweaver> nil coercion
<pragmatism> Although your var names tooootallly suck
<baweaver> >> 1&.to_s
<ruby[bot]> baweaver: # => "1" (https://eval.in/701878)
<baweaver> >> nil&.this_method_will_fail
<ruby[bot]> baweaver: # => nil (https://eval.in/701879)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<neophyterubyist> havenwood: thank you!
<baweaver> havenwood: 1 2 3 4
<baweaver> I declare a code golf war
<baweaver> 5 6 7 8
<baweaver> try and keep your code..... (something rhymes with 8 here)
<havenwood> baweaver: hah
<havenwood> neophyterubyist: you're welcome!
<neophyterubyist> try and keep your code great
milardovich has joined #ruby
last_staff has joined #ruby
pawnbox has quit [Remote host closed the connection]
<baweaver> array.each_with_object([]){|s, a|(a[-1]&.size&.<(1500)?a.last:s)<<s}
emilkarl has joined #ruby
pawnbox has joined #ruby
<baweaver> Waitasecondthere
bocaneri has joined #ruby
jschoolcraft has quit [Ping timeout: 240 seconds]
montanonic has joined #ruby
milardovich has quit [Ping timeout: 246 seconds]
<baweaver> array.each_with_object([]){|s, a|(a[-1].to_s.size<1500?a[-1]:s)<<s}
cyphase has quit [Ping timeout: 250 seconds]
<baweaver> array.reduce([]){|a,s|(a[-1].to_s.size<1500?a[-1]:s)<<s;a}
<baweaver> havenwood: no?
<baweaver> array.reduce(['']){|a,s|(a[-1].size<1500?a[-1]:s)<<s;a}
<havenwood> i don't think it quite works but reduce would be good to shorten it
troys has quit [Quit: Bye]
<pragmatism> oh, it's shorthand. sry.
<havenwood> hrmm
<havenwood> pragmatism: yeah, i felt guilty though and did a long form locally to cleanse my eyes ;-D
<baweaver> >> %w(one two threehundredandsomething).reduce(['']){|a,s|(a[-1].size<10?a[-1]:s)<<s;a}
<ruby[bot]> baweaver: # => ["onetwothreehundredandsomething"] (https://eval.in/701891)
<pragmatism> Yeah, got it. Way easier if possible than updatea a gist.
<baweaver> >> %w(one two threehundredandsomething else?).reduce(['']){|a,s|(a[-1].size<10?a[-1]:s)<<s;a}
<ruby[bot]> baweaver: # => ["onetwothreehundredandsomething"] (https://eval.in/701892)
<pragmatism> updating*
<baweaver> nuuuuu
<baweaver> ah well
yardenbar has joined #ruby
cyphase has joined #ruby
<pragmatism> havenwood do you allow use of that level of shorthand in your codebases?
<pragmatism> More like, "has anyone seen that level of shorthand in the wild"
hotpancakes has joined #ruby
agent_white has quit [Quit: agent_white]
<neophyterubyist> how do you make it take into account the current string i.e. abort and go to the next string if the previous string when concatenated with the current string exceeds the length limit
<neophyterubyist> ?
<havenwood> pragmatism: There's all sorts of obtuse, overly clever code in the wild. I might spike something like that but just like pseudocode I'd replace it with real code. It's important to name things well. As they say, "red, green, refactor."
bronson has joined #ruby
<pragmatism> havenwood Your process matches mine :) I refuse to approve that stuff in code review, though.
<pragmatism> I try to expect everything to fail, so everything must be as easy to understand as possible.
<pragmatism> *I anticipate all will fail
pabs has quit [Ping timeout: 240 seconds]
pabs has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
Apomelasma has joined #ruby
milardovich has joined #ruby
ttilley has quit [Read error: Connection reset by peer]
mim1k|wo1k has joined #ruby
amclain has quit [Quit: Leaving]
tildes has joined #ruby
mim1k|work has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 268 seconds]
montanonic has quit [Ping timeout: 265 seconds]
hotpanca_ has joined #ruby
Macaveli has joined #ruby
pwnd_nsfw has joined #ruby
enterprisey has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
Robtop__ has quit [Ping timeout: 265 seconds]
blaxter has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ResidentBiscuit has joined #ruby
_2easy has joined #ruby
enilsen16 has joined #ruby
ResidentBiscuit has quit [Ping timeout: 240 seconds]
conta has joined #ruby
tubuliferous has joined #ruby
montanonic has joined #ruby
jaguarma_ has joined #ruby
jaguarmagenta has quit [Read error: Connection reset by peer]
neophyterubyist has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
rippa has joined #ruby
tildes has quit [Ping timeout: 252 seconds]
Anonymoose2 has joined #ruby
tubbo has quit [Ping timeout: 268 seconds]
Pongles has quit [Ping timeout: 260 seconds]
tubbo has joined #ruby
reverberations has quit [Ping timeout: 265 seconds]
Pongles has joined #ruby
muelleme has joined #ruby
yaewa has joined #ruby
moei has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
<havenwood> Ah, neophyte left before I came back. Anyways: https://gist.github.com/havenwood/e9c286c524f2de5649586e7d28fec7af
hotpanca_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 265 seconds]
Mortomes|Work has joined #ruby
enterprisey has quit [Ping timeout: 258 seconds]
lacour has quit [Quit: Leaving]
Devalo has joined #ruby
eggshke has joined #ruby
Devalo has quit [Remote host closed the connection]
aganov has joined #ruby
Devalo has joined #ruby
cyphase has quit [Ping timeout: 245 seconds]
milardovich has joined #ruby
<kke> if you have something like virtus or activemodel, would you rather use class Foo; include Virtus.model; end or class Foo < Virtus.model any insight why?
Devalo has quit [Ping timeout: 246 seconds]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
Hyuk has joined #ruby
cyphase has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
ignarps- has joined #ruby
P1ro_ has joined #ruby
emilkarl has quit [Quit: emilkarl]
SesMan has joined #ruby
volix_ has joined #ruby
emilkarl has joined #ruby
_br___ has joined #ruby
chihhsin has quit [Quit: leaving]
fatbob_ has joined #ruby
destruct1re has joined #ruby
kaffepanna has joined #ruby
Ariadeno has joined #ruby
fumck has joined #ruby
blaxter has quit [Quit: foo]
eggshke has quit []
theRoUS` has joined #ruby
emilkarl has quit [Ping timeout: 240 seconds]
volix has quit [*.net *.split]
kaffepan1a has quit [*.net *.split]
ignarps has quit [*.net *.split]
theRoUS has quit [*.net *.split]
_br__ has quit [*.net *.split]
jesk has quit [*.net *.split]
fatbob has quit [*.net *.split]
destructure has quit [*.net *.split]
crowd42 has quit [*.net *.split]
Guest46272 has quit [*.net *.split]
fumk has quit [*.net *.split]
P1ro has quit [*.net *.split]
olblak has quit [*.net *.split]
freeze has quit [*.net *.split]
ta_ has quit [Quit: Leaving...]
volix_ is now known as volix
volix has quit [Changing host]
volix has joined #ruby
aryaching has joined #ruby
anisha has quit [Ping timeout: 258 seconds]
optiz0r has joined #ruby
muelleme has quit [Ping timeout: 250 seconds]
milardovich has joined #ruby
jesk has joined #ruby
aryaching has quit [Client Quit]
blackbom1 has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 258 seconds]
Devalo has joined #ruby
eggshke has joined #ruby
iMadper has joined #ruby
olblak has joined #ruby
freeze has joined #ruby
crowd42 has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
j3r0 has joined #ruby
anisha has joined #ruby
dionysus69 has joined #ruby
teclator has quit [Remote host closed the connection]
pwnd_nsfw` has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
symm- has joined #ruby
codfection has quit [Remote host closed the connection]
cippacio1 has joined #ruby
dionysus70 has joined #ruby
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxxx has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus70 is now known as dionysus69
Bish has quit [Ping timeout: 268 seconds]
colegatron has joined #ruby
cippaciong has quit [Ping timeout: 250 seconds]
eggshke has quit [Remote host closed the connection]
eggshke has joined #ruby
nofxx has quit [Ping timeout: 258 seconds]
cyphase has joined #ruby
the_drow has joined #ruby
jud has quit [Quit: Leaving]
enilsen16 has quit [Quit: enilsen16]
marr has joined #ruby
ta has joined #ruby
Bish has joined #ruby
andrzeju_ has joined #ruby
andikr has joined #ruby
pawnbox has joined #ruby
lenwood has joined #ruby
biberu has joined #ruby
teclator has joined #ruby
crowd42 has quit [*.net *.split]
olblak has quit [*.net *.split]
freeze has quit [*.net *.split]
djbkd has quit [Remote host closed the connection]
nettoweb has joined #ruby
djbkd has joined #ruby
djbkd_ has joined #ruby
emilkarl has joined #ruby
nofxxx has quit [Ping timeout: 240 seconds]
byte512 has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
Alina-malina has quit [Ping timeout: 268 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
koooge has quit [Quit: Leaving...]
Chair has joined #ruby
mikecmpbll has joined #ruby
postmodern_ has quit [Quit: Leaving]
chihhsin has joined #ruby
SpiffTR has joined #ruby
flying has joined #ruby
White-Fa1con has joined #ruby
milardovich has joined #ruby
nettoweb has joined #ruby
bronson has joined #ruby
djbkd has joined #ruby
White-Fa1con has quit [Client Quit]
djbkd__ has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 250 seconds]
djbkd_ has quit [Ping timeout: 248 seconds]
lenwood has quit [Ping timeout: 268 seconds]
djbkd has quit [Ping timeout: 252 seconds]
astrobunny has quit [Remote host closed the connection]
freeze has joined #ruby
olblak has joined #ruby
crowd42 has joined #ruby
hotpanca_ has joined #ruby
eightbitraptor has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
tvw has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 250 seconds]
hotpancakes has joined #ruby
tercenya has joined #ruby
tercenya_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
hotpanca_ has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby
SpiffTR has quit [Quit: Leaving.]
nankyokusei has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kies has quit [Ping timeout: 250 seconds]
ferr1 has quit [Quit: WeeChat 1.6]
nankyokusei has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
jsrn_ has joined #ruby
n008f4g_ has joined #ruby
anisha has quit [Read error: Connection reset by peer]
wugy has joined #ruby
wugy has quit [Remote host closed the connection]
tjbiddle has joined #ruby
kies has joined #ruby
meshsmith has joined #ruby
anisha has joined #ruby
djbkd has quit []
jaguarma_ has quit [Remote host closed the connection]
cfec0b8d has quit [Ping timeout: 248 seconds]
maattdd has joined #ruby
mim1k|wo1k is now known as mim1k|work
rodfersou has joined #ruby
milardovich has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
rodfersou is now known as rodfersou|coffee
fumck is now known as fumk
jgt has joined #ruby
koooge has joined #ruby
Devalo has quit [Remote host closed the connection]
Burgestrand has joined #ruby
blackbom1 has joined #ruby
Devalo has joined #ruby
andrzeju_ has quit [Remote host closed the connection]
blackbom1 has quit [Ping timeout: 245 seconds]
Devalo has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 268 seconds]
Beams has joined #ruby
blackbom1 has joined #ruby
xall has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Ishido has joined #ruby
kies has quit [Ping timeout: 252 seconds]
mark_66 has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
kareelee has joined #ruby
kies has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
rodfersou|coffee is now known as rodfersou
Flonk has joined #ruby
iMadper has quit [Ping timeout: 265 seconds]
iMadper has joined #ruby
ayonkhan has joined #ruby
<Psy-Q> everyone seems to suggest MiniTest for everything these days, but in quite some test utilities i see only support for Rspec, Cucumber and Test::Unit still
kareelee_ has joined #ruby
<Psy-Q> should i rewrite my tests in rspec, does minitest not have traction?
<Rich_Morin> I'm confused by the way REXML is acting. when I call (say) foo.elements['//spine/itemref'], it only hands back the first match. Wassup?
kareelee has quit [Ping timeout: 246 seconds]
RobertBlack has joined #ruby
kareelee_ has quit [Read error: Connection reset by peer]
kareelee has joined #ruby
lenwood has joined #ruby
iMadper` has joined #ruby
gregf_ has joined #ruby
dionysus69 has joined #ruby
iMadper has quit [Ping timeout: 250 seconds]
pagios has quit [Ping timeout: 248 seconds]
Robtop__ has joined #ruby
byte512 has quit [Ping timeout: 250 seconds]
pwnd_nsfw` has quit [Ping timeout: 258 seconds]
pagios has joined #ruby
ldnunes has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
hotpancakes has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 258 seconds]
eggshke has quit []
lenwood has quit [Ping timeout: 250 seconds]
beilabs_ has joined #ruby
emilkarl has quit [Quit: emilkarl]
tjbiddle has joined #ruby
beilabs has quit [Ping timeout: 265 seconds]
rykou has joined #ruby
milardovich has quit []
marchelzo has quit [Ping timeout: 250 seconds]
milardovich has joined #ruby
koooge_ has joined #ruby
nankyokusei has joined #ruby
milardovich has quit [Client Quit]
frozengeek has joined #ruby
koooge has quit [Ping timeout: 245 seconds]
koooge_ has quit [Client Quit]
Ishido has quit [Remote host closed the connection]
beilabs has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
pwnd_nsfw has joined #ruby
Robtop__ has quit [Ping timeout: 250 seconds]
beilabs_ has quit [Ping timeout: 265 seconds]
Macaveli_ has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
bronson has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
Macaveli_ has quit [Ping timeout: 248 seconds]
Tempesta has quit [Quit: See ya!]
bronson has quit [Ping timeout: 264 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RobertBlack has quit [Read error: Connection reset by peer]
RobertBlack has joined #ruby
maattdd has quit [Ping timeout: 258 seconds]
Jackneill has joined #ruby
workmad3 has joined #ruby
Macaveli has joined #ruby
milardovich has joined #ruby
ferr1 has joined #ruby
RobertBlack is now known as JohnChristie
Derderderd has quit [Ping timeout: 258 seconds]
tvw has joined #ruby
ResidentBiscuit has joined #ruby
GodFather has joined #ruby
ocbtec has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
kareelee_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
byte512 has joined #ruby
kareelee has quit [Ping timeout: 264 seconds]
hotpancakes has joined #ruby
Tempesta has joined #ruby
<manveru> oh, REXML... now i have flashbacks to 2005
jaguarmagenta has joined #ruby
opt9 has quit [Quit: ZNC - http://znc.in]
mikecmpbll has quit [Quit: inabit. zz.]
lenwood has joined #ruby
jaguarmagenta has quit [Ping timeout: 258 seconds]
<manveru> Rich_Morin: any reason you don't use nokogiri or oga?
ocbtec has quit [Quit: leaving]
hotpancakes has quit [Ping timeout: 265 seconds]
<IsoLinCHiP> Is there a common way to instruct bundler to install a specific locally built gem file? I had to modify an ancient gem to work for me and dont want bundler to install the rubygems version but my locally generated one.
stamina has joined #ruby
yaewa has quit [Quit: Leaving...]
opt9 has joined #ruby
moei has joined #ruby
opt9 is now known as Guest12040
Alina-malina has joined #ruby
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
reverberations has joined #ruby
cfec0b8d has joined #ruby
milardovich has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
Anonymoose2 has quit [Ping timeout: 240 seconds]
nadir has quit [Quit: Connection closed for inactivity]
Derderderd has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
moei has quit [Quit: Leaving...]
djbkd__ has quit [Ping timeout: 252 seconds]
milardovich has quit []
Madplatypus has quit [Quit: Connection closed for inactivity]
Derderderd has quit [Ping timeout: 260 seconds]
SesMan has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
emilkarl has joined #ruby
<Rich_Morin> manveru: dunno - mostly, it's in the std. library and I was trying to keep my footprint small
<manveru> ok
maattdd has joined #ruby
<manveru> i just remember its API being a constant headache :)
<manveru> and now the rexml docs are broken too
<Rich_Morin> in any case, I think I"m getting the hang of it (and yes, the docs need love)
<Rich_Morin> I recall using nokogiri back in the day. Any reason to prefer oga?
stamina has quit [Ping timeout: 240 seconds]
<manveru> oga doesn't need libxml and libxslt
<manveru> still way faster than rexml though
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 265 seconds]
stamina has joined #ruby
<Rich_Morin> can you recommend a good reference or three?
emilkarl has quit [Client Quit]
symm- has quit [Quit: Leaving...]
<Rich_Morin> FWIW, there are some places where I've been hand-coding stuff because I couldn't get REXML to work
lenwood has quit [Ping timeout: 265 seconds]
eggshke has joined #ruby
<c-c> REXML is great
<c-c> on 2007 PHP stack where you need to maximize time spent fixing the xml into as simple as possible
madgen has joined #ruby
n008f4g_ has joined #ruby
Apomelasma has quit [Quit: Linkinus - http://linkinus.com]
<Rich_Morin> oga looks tasty - I'll try it RSN
hightower3 has quit [Ping timeout: 258 seconds]
jphase has quit [Read error: No route to host]
jphase has joined #ruby
tvw has quit []
<Rich_Morin> tnx - that's one that I found
<Rich_Morin> so, good confirmation
nankyokusei has joined #ruby
<Rich_Morin> (for some obscure reason, Adium is multiplying URLs that I post)
<Rich_Morin> Testing: Oga
<Rich_Morin> owell
charliesome has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
cyphase has quit [Ping timeout: 252 seconds]
kareelee has joined #ruby
byte512 has quit [Ping timeout: 250 seconds]
kareelee_ has quit [Read error: Connection reset by peer]
SpiffTR has joined #ruby
madgen has quit [Quit: Lost terminal]
rodferso1 has joined #ruby
rodfersou has quit [Ping timeout: 250 seconds]
cyphase has joined #ruby
Ishido has joined #ruby
Ishido has quit [Remote host closed the connection]
Ishido has joined #ruby
rodferso1 is now known as rodfersou
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
nowz has quit [Remote host closed the connection]
Bish has quit [Ping timeout: 260 seconds]
Bish has joined #ruby
SpiffTR has quit [Quit: Leaving.]
milardovich has joined #ruby
<yorickpeterse> who dare disturb my slumber
<yorickpeterse> oh
<yorickpeterse> that's a valid reason
rodfersou has quit [Ping timeout: 268 seconds]
Derderderd has joined #ruby
gbgdev has joined #ruby
Ishido has quit [Remote host closed the connection]
lenwood has joined #ruby
Lord_of_Life has quit [Excess Flood]
Derderderd has quit [Ping timeout: 250 seconds]
<manveru> :)
rodfersou has joined #ruby
Lord_of_Life has joined #ruby
Ishido has joined #ruby
johnmilton has joined #ruby
houhoulis has joined #ruby
Burgestrand has joined #ruby
<adaedra> It is said that if you say yorick's name three times in front of your computer, your xml code disappears.
[jasper] has joined #ruby
kareelee_ has joined #ruby
<[jasper]> hej guys, I'm having some trouble connecting to mail server with tls via gitlab
<yorickpeterse> adaedra: hah
<yorickpeterse> Biggy XML
<[jasper]> this seems to be a ruby issue. anyone got some information about this?
<herwin> and why do you think that is a ruby issue?
[jasper] has left #ruby [#ruby]
<adaedra> Good bye then
tyang has joined #ruby
gbgdev_ has joined #ruby
kareelee has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
gbgdev has quit [Ping timeout: 248 seconds]
Burgestrand has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
Burgestrand has joined #ruby
Bish has quit [Remote host closed the connection]
rwb has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
marchelzo has joined #ruby
andikr has quit [Remote host closed the connection]
sdothum has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Burgestr_ has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 258 seconds]
kareele__ has joined #ruby
Burgestrand has joined #ruby
kareele__ is now known as kareelee__
Rasi has quit [Ping timeout: 246 seconds]
kareelee_ has quit [Read error: Connection reset by peer]
Burgestr_ has quit [Ping timeout: 248 seconds]
Devalo has joined #ruby
jmignault has joined #ruby
Rasi has joined #ruby
nowz has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 264 seconds]
Burgestrand has quit [Ping timeout: 246 seconds]
jmignault has quit [Ping timeout: 258 seconds]
georgie has joined #ruby
georgie has left #ruby [#ruby]
georgie has joined #ruby
georgie has left #ruby [#ruby]
MarcWeber has joined #ruby
gajus has joined #ruby
<gajus> What does this code fragment do?
<MarcWeber> Unix sockets how can i send/receive within threads ? http://dpaste.com/30B0WV5
<gajus> `key_file_path = node['gitlab']['gitlab-rails']['registry_key_path']` just assigns a value to a variable
<gajus> `file key_file_path do` opens a file?
<gajus> a link to the relavent document would be enough
<gajus> I don't understand the purpose of `content node['gitlab']['registry']['internal_key']` line
lenwood has quit [Ping timeout: 240 seconds]
houhoulis has quit [Remote host closed the connection]
houhoulis has joined #ruby
Ishido has quit [Remote host closed the connection]
<herwin> gajus: it's some kind of domain-specific language. The definitions of file and all other methods called in that file are probably in the same repository
<gajus> I see. So it is not part of Ruby core lib
<gajus> Okay, I will try to find it in the code base
hightower2 has joined #ruby
jaguarmagenta has joined #ruby
bihi has quit [Quit: Bye!]
moei has joined #ruby
rodfersou is now known as rodfersou|lunch
houhoulis has quit [Remote host closed the connection]
xen0fon has quit [Quit: xen0fon]
bihi has joined #ruby
hotpancakes has joined #ruby
Ishido has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
n008f4g_ has quit [Ping timeout: 256 seconds]
SteenJobs_ has joined #ruby
symm- has joined #ruby
ryan_notabot has joined #ruby
doubleemms has quit [Remote host closed the connection]
ryan_notabot has quit [Read error: Connection reset by peer]
ryan_notabot has joined #ruby
nankyokusei has joined #ruby
jmignault has joined #ruby
hotpancakes has quit [Ping timeout: 248 seconds]
ddffg has quit [Ping timeout: 240 seconds]
SesMan has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
Derderderd has joined #ruby
futabach_ has joined #ruby
pawnbox has joined #ruby
jhack has joined #ruby
futabachannel has quit [Ping timeout: 256 seconds]
<marchelzo> how can i learn ruby
<marchelzo> fast
tubuliferous has quit [Ping timeout: 264 seconds]
<marchelzo> i need to learn ruby in 15 minutes
jhack has quit [Client Quit]
jmignault has quit [Ping timeout: 250 seconds]
Derderderd has quit [Ping timeout: 265 seconds]
milardovich has quit []
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
jhack has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
xen0fon has joined #ruby
ramortegui has joined #ruby
stamina has quit [Quit: WeeChat 1.6]
<manveru> lol
Mortomes|Work has quit [Ping timeout: 260 seconds]
<marchelzo> manveru: it's not a joke
<manveru> i guess you only have 7 minutes left then
<marchelzo> yeah. can you help?
<marchelzo> what's the fastest way?
<blackbom1> marchelzo: seen men in black?
<manveru> or matrix?
<marchelzo> a long time ago i watched men in black but i don't remember much of it
<marchelzo> and believe it or not i've never watched the matrix
<manveru> what do you want to do?
<marchelzo> learn ruby
<marchelzo> fast
<manveru> for what?
<marchelzo> fun
marr has quit [Ping timeout: 258 seconds]
<surrounder> wow
<blackbom1> the only way you'll learn ruby in 15 minutes is with one of the machines from that movie (men in black)
<manveru> i'm not sure i follow... you learned other languages in 15 minutes?
<marchelzo> yeah
<marchelzo> i know 12 language. i've been programming for almost 3 months
<marchelzo> languages*
<herwin> "know"
<blackbom1> you learn them in 15 minute intervals?
<manveru> even reading just the syntax description of ruby takes longer
<marchelzo> i get the basics in 15 minutes, then i do some programming and master them in a week or so
<manveru> :)
<marchelzo> i'm a c god. i did c for 3 weeks
<manveru> there you go, 15 minute tutorial
hightower3 has joined #ruby
<blackbom1> lol
<manveru> rofl
<marchelzo> i'm only kidding. but i really am a c god.
<manveru> i've been doing ruby for almost 15 years and i'm still no ruby god
<manveru> but hey, i suck
<herwin> ow, if you're a C god, just read the source of ruby to learn it
<marchelzo> yeah sorry but if you have been doing it for 15 years and aren't a god im going to have to agree with you
<marchelzo> you suck
<blackbom1> manveru: ever wish ruby never changed from 15 years ago? maybe the code we have now would be better
<marchelzo> herwin: that doesn't work so well
<manveru> blackbom1: you can rip keyword args from my dead cold hands
<marchelzo> herwin: i have perused CRuby and mruby a bit
<blackbom1> hash syntax is nice too
<manveru> also encodings were such a pain :(
<blackbom1> still are
<marchelzo> so this tryruby.org thing can be done in 15 minutes?
<manveru> at least you don't need to invoke iconv anymore
hightower2 has quit [Ping timeout: 268 seconds]
<manveru> blackbom1: maybe if rails hadn't come along
<marchelzo> already at level 2. darn i am fast
jz has joined #ruby
<manveru> nowadays people shoot magic in their veins like it was heroin
<blackbom1> lol
<blackbom1> good way of putting it
jz is now known as Guest60360
hightower2 has joined #ruby
<blackbom1> and no one codes like the code you write can impact performance
Guest60360 has quit [Max SendQ exceeded]
<marchelzo> if you care about performance don't write ruby
gnufied has joined #ruby
<marchelzo> if magic is like heroin why does ruby make it so available
the_drow has quit [Quit: This computer has gone to sleep]
<marchelzo> matz wants to breed a generation of opiate addicts?
<manveru> because people think that code they don't see doesn't exist and can't hurt them
hightower3 has quit [Ping timeout: 248 seconds]
<marchelzo> that's not such a bad thing to think
<manveru> matz writes C all day :P
<marchelzo> ideally you should be able to code like that
<manveru> ideally you should just never write bugs
johnzorn- has joined #ruby
<marchelzo> that's not possible
<manveru> we used to laugh about java stacktraces that were 2 pages long
johnzorn has quit [Ping timeout: 258 seconds]
eightbit1aptor has joined #ruby
<manveru> now i work with apps everyday that need to pass requests through at least 25 libs to get anything done...
<marchelzo> is that so bad?
<manveru> people are like "oh, i need that line of code, but it's already in a gem, must stay DRY, so let's just require that too"
<marchelzo> like left-pad?
<manveru> pretty much
n008f4g_ has joined #ruby
<marchelzo> people need to spend some time writing c
<marchelzo> build some character
<marchelzo> i have developed a healthy case of NIH
eightbitraptor has quit [Ping timeout: 246 seconds]
sspreitz has joined #ruby
kareelee__ has quit []
jgt has joined #ruby
<sspreitz> hi, i want to connect two file descriptors in ruby to stream input and output outomatically. It seems that IO.pipe is not actually for that purpose? Do you maybe have an idea how i can achieve this in ruby?
futabach_ has quit [Ping timeout: 252 seconds]
<marchelzo> why not use IO.pipe
<marchelzo> pipe() + dup2() + dup2()
<sspreitz> marchelzo, to me it looks like IO.pipe is not plumbing two fd's together. I am looking for something that would do this automatically, like say pipe(fd1, fd2); pipe(fd2, fd1)
<marchelzo> i'm assuming IO.pipe is a wrapper around the pipe system call
<marchelzo> do you could create a pipe and then use dup2 to achieve what you want, i think
<marchelzo> s/do/so/
<marchelzo> assuming ruby exposes dup2
<dminuoso> sspreitz: Can you name the usecase?
<sspreitz> dminuoso, connecting 2 tcp sockets for example as a kind of proxy
denis_ has joined #ruby
<sspreitz> maybe i am looking at it too much with the shell pipe in mind
<denis_> Hello. Someone can help me with parsing json?
<manveru> denis_: sure
DLSteve has joined #ruby
<manveru> >> require 'json'; JSON.parse('{"like":"that"}')
<marchelzo> sspreitz: so you have two tcp sockets. what exactly do you want to have happen?
<manveru> bot is dead :(
<ruby[bot]> manveru: # => {"like"=>"that"} (https://eval.in/702148)
dionysus69 has quit [Ping timeout: 250 seconds]
<sspreitz> manveru, looks kinda like yes. with this though a select() would be still needed
<manveru> true that
<sspreitz> marchelzo, plumbing them together vice versa so they chat with each other
<marchelzo> ah, yeah i don't think there's a way to do that
<sspreitz> maybe i really need to build a loop/thread arround io#select and there is no oneshot for this
<marchelzo> like you can't get the kernel to do it for you
<marchelzo> you'd have to manage their chat yourself like manveru suggested
<sspreitz> okay, thanks a lot!
<sspreitz> oh btw. there is splice()
<sspreitz> maybe thats the copy-stream backbone
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
<guardian> hello
<guardian> imagine I have module A and B, and each module defines the same foo() function
pwnd_nsfw` has joined #ruby
<guardian> what happens when I include both A and B ?
<guardian> which #foo() gets called?
<dminuoso> guardian: Do you know about #ancestors ?
<dminuoso> (I'd prefer to answer this question with a compact explanation of how modules work)
jsanti[m] has joined #ruby
yehowyada has joined #ruby
<dminuoso> In a nutshell Ruby checks the class and then walks up the "ancestors chain", until it finds the method. Inheritance, Module#include, Module#extend and Module#prepend are the methods to insert modules/classes into the ancestory.
GodFather has quit [Ping timeout: 268 seconds]
<dminuoso> So to answer your question, use inheritance/include/extend/prepend - and then use #ancestors to see where it inserts the target module/class
Devalo has quit [Remote host closed the connection]
<dminuoso> The first one that defines the method is called (and if that one calls super, it resumes looking up)
Devalo has joined #ruby
hotpancakes has joined #ruby
Ishido has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 265 seconds]
<marchelzo> do people prefer ' or " for string literals in ruby
<dminuoso> marchelzo: "" generally
<marchelzo> usually i prefer ' but this tryruby.org seems to use "" mostly
<dminuoso> We have had some discussions in here before and the concensus is that "" is preferred.
<marchelzo> #{} only works in "", right?
<dminuoso> marchelzo: And some other, but yeah.
<marchelzo> in python they encourage '' over ""
<marchelzo> strange how preferences vary from language to language
<dminuoso> marchelzo: Interestingly interpolation can explicitly be disabled too.
<dminuoso> >> "\#{1}"
<ruby[bot]> dminuoso: # => "\#{1}" (https://eval.in/702157)
<dminuoso> >> puts "\#{1}"
<ruby[bot]> dminuoso: # => #{1} ...check link for more (https://eval.in/702158)
<guardian> dminuoso: no I don't
jhack has quit [Ping timeout: 264 seconds]
<dminuoso> >> String.ancestors
<ruby[bot]> dminuoso: # => [String, Comparable, Object, Kernel, BasicObject] (https://eval.in/702159)
<dminuoso> guardian: ^- So if you call a method on a given string, it will look whether String has the method, if it cant find it, it will then check Comparable, and so on and so on.
<marchelzo> is it also idiomatic to omit 'return' when returning a value at the end of a method?
eggshke has quit []
<guardian> dminuoso: thanks
<dminuoso> marchelzo: Yeah. Though I think it's fine if you consistently use return instead (Im a big fan of that)
hotpancakes has quit [Ping timeout: 246 seconds]
<marchelzo> dminuoso: so am i
<dminuoso> guardian: And I forgot, before the ancestors the objects singleton class is checked. ;-)
JohnChristie has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
<marchelzo> except for one-liners like maybe: def mean xs; xs.sum / xs.length; end
<dminuoso> marchelzo: Technically it's a little slower though.
<marchelzo> dminuoso: return is a little slower?
<dminuoso> asm>> def foo(); return 1; end
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/702160
<dminuoso> asm>> def foo(); 1; end
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/702161
Devalo has joined #ruby
<dminuoso> Mmm, bad example.
<herwin> if you're worried about that kind of performance differences, you problably shouldn't write code in ruby in the first place
<dminuoso> marchelzo: No it's not.
<dminuoso> marchelzo: Forget what I said.
<dminuoso> herwin: It's still relevant for core library developers, so they don't impose arbitrary penalties onto users.
<marchelzo> yeah i was going to say
<marchelzo> that would be a trivial optimization to implement
<dminuoso> this is why you see very little proc'ification of blocks in rubys stdlib or core libraries
jmignault has joined #ruby
<marchelzo> why don't they just write all the core libs in C
<dminuoso> marchelzo: Most of them are.
<marchelzo> the more stuff in C the better right
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
<dminuoso> Actually, is there any core library written in Ruby itself?
<blackbom1> all of core is C
<marchelzo> in mruby Array#each, Array#each_index, etc. are all written in ruby
<marchelzo> i couldn't figure out why
<marchelzo> all Array methods that take blocks are in ruby
Devalo has quit [Ping timeout: 246 seconds]
<dminuoso> marchelzo: Because it's too frequently used to be forced through Ruby VM.
BitWhisperer has joined #ruby
<dminuoso> blackbom1: I'm willing to bet that your statement is fault. :p
rwb has joined #ruby
<dminuoso> blackbom1: time!
<marchelzo> dminuoso: i don't understand
<dminuoso> That's a core library written in ruby.
denis_ has quit [Remote host closed the connection]
Derderderd has joined #ruby
SteenJobs_ has joined #ruby
<marchelzo> used too frequently to be forced through the Ruby VM?
<dminuoso> marchelzo: Because the same functionality comes from Enumerable, which would cost a method dispatch.
<dminuoso> Or.. mmmm
brendan- has joined #ruby
<dminuoso> Or maybe it's just optimized for array
<blackbom1> dminuoso: time.rb may be but the time loaded by default implements stuff in C
denis_ has joined #ruby
teclator has quit [Remote host closed the connection]
denis_ has quit [Remote host closed the connection]
<marchelzo> in CRuby it's written in C
denis_ has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
<manveru> well, mruby is supposed to be a smaller ruby
<marchelzo> the CRuby source is surprisingly readable
Mortomes|Train has joined #ruby
Derderderd has quit [Ping timeout: 258 seconds]
__Yiota has joined #ruby
<marchelzo> not sure why they use klass instead of class
pwnd_nsfw has joined #ruby
<marchelzo> ok i completed tryruby.org
<manveru> that's commonly used in ruby because class is a keyword... i assume that somehow reflected back into C
<marchelzo> ah
<marchelzo> sometimes people do it so their code will compile as C++
<marchelzo> but i hate that
<manveru> ah, that's possible too
<marchelzo> tryruby.org didn't teach me about modules or classes
<manveru> and it took longer than 15 minutes
eightbit1aptor has quit [Ping timeout: 258 seconds]
<marchelzo> dang
cfec0b8d has quit [Ping timeout: 240 seconds]
<marchelzo> ruby is the hardest lang i've seen yet
pwnd_nsfw` has quit [Ping timeout: 265 seconds]
<dminuoso> marchelzo: Ruby will not compile with a C++ compiler.
<marchelzo> that makes me happy
<marchelzo> why not?
<dminuoso> marchelzo: Because of the gazillion casts that would be illegal in C++.
hightower2 has quit [Ping timeout: 256 seconds]
<dminuoso> That alone would suffice.
<marchelzo> what casts?
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
hightower2 has joined #ruby
bronson has joined #ruby
BrianJ has joined #ruby
neze has joined #ruby
<neze> Hello !
<marchelzo> hi
<dminuoso> marchelzo: you know.. type casts.
<marchelzo> dminuoso: yeah but which ones
<dminuoso> marchelzo: most implicit casts.
<dminuoso> marchelzo: popular example: int *a = malloc(10);
<dminuoso> not legal in C++
eightbitraptor has joined #ruby
<marchelzo> ok so you mean /lack/ of casts
<neze> I just started ruby and met a problem I can't manage to solve with google. Assume I got two iterators, iterA and iterB, homemade with "def iterA .. yield(blah) .. end" the first yields int, the other chars (for example), and i got a function f(int,char). I'd like to do something looking like "while true do f(iterA.next,iterB.next) end" but of course I know I can't do it like this.
<neze> With arrays I can "zip", but more generally I don't know
jenrzzz has quit [Ping timeout: 252 seconds]
nankyokusei has joined #ruby
<neze> thank you by advance :)
bronson has quit [Ping timeout: 245 seconds]
ferr1 has quit [Quit: WeeChat 1.6]
<dminuoso> neze: How should this behave if one iterator stops before the other?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<neze> should stop
<neze> (thanks, dminuoso)
<marchelzo> why can't you use that while loop?
<marchelzo> and just catch the exception
<neze> machty: can I do "next" with this definition of iterA ?
nankyokusei has quit [Ping timeout: 256 seconds]
<neze> I mean, they behave as iterators but they are functions that yield. If I understood well they are not really "Iterators"
<neze> marchelzo * (dunno why completion didn't work)
<dminuoso> neze: enumerators are *exactly* iterators.
bijan_ has joined #ruby
<neze> okay, so if I try to do as you say, I get "no block given (yield)"
symm- has quit [Ping timeout: 245 seconds]
<neze> I'll put minimal example
<marchelzo> oh
<marchelzo> i've been learning ruby for like 20 minutes so
<marchelzo> forgive me
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yorickpeterse> patience young grasshoper
<yorickpeterse> one day you shall be one with the Ruby
<marchelzo> could you use Fibers instead of methods that take blocks?
<neze> http://www.neze.fr/snippets/test.rb doesn't work (but I expected it to fail)
<neze> I didn't understand, marchelzo, though
SteenJobs_ has quit [Quit: SteenJobs_]
<marchelzo> ahh those HTTP response headers
charliesome has joined #ruby
bijan_ has quit [Quit: Textual IRC Client: www.textualapp.com]
rodfersou|lunch is now known as rodfersou
bijan_ has joined #ruby
reverberations has quit [Read error: Connection reset by peer]
<neze> Okaaaay, I think I understand :) thanks
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<marchelzo> i wish sprunge would fix their stupid website so the line numbers didn't get highlighted
anisha has quit [Quit: Leaving]
charliesome has quit [Client Quit]
<marchelzo> just an idea. maybe there's a better way from someone who has been doing ruby for more than 25 minutes
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SpiffTR has joined #ruby
<marchelzo> is why's (poignant) guide still relevant?
<c-c> I wonder if it is 1.8 land
polishdub has joined #ruby
ropeney has joined #ruby
ponga has joined #ruby
ropeney has quit [Client Quit]
charliesome has joined #ruby
dionysus69 has joined #ruby
tau has joined #ruby
Mortomes|Train has quit [Ping timeout: 260 seconds]
ropeney has joined #ruby
jaguarmagenta has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
hotpancakes has joined #ruby
jaguarmagenta has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<marchelzo> what kind of music do ruby developers listen to
chouhoulis has joined #ruby
<bhaak> I wouldn't be aware of any ruby developer specific music taste
<marchelzo> bhaak: well what do you like to listen to
SesMan has joined #ruby
<bhaak> while coding, I've lately been listening to the 70/80s album of Kraftwerk and the Uncharted 4 soundtrack
nowz has quit [Quit: Leaving]
<marchelzo> very cool
<marchelzo> never heard of kraftwerk
hightower2 has quit [Ping timeout: 252 seconds]
iMadper` has quit [Quit: ERC (IRC client for Emacs 26.0.50.1)]
blunckr has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
<c-c> marchelzo: btw, see https://learncodethehardway.org/ruby/
last_staff has quit [Quit: last_staff]
nfk has joined #ruby
<marchelzo> i can't use that
<marchelzo> i've been hanging out in ##c for too long
Madper has joined #ruby
<marchelzo> i've been conditioned to hate Zed Shaw
<elomatreb> He wrote a Python article recently that didn't exactly fill me with confidence either
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Derderderd has joined #ruby
<marchelzo> what's the k&r of ruby
Madper has quit [Client Quit]
iMadper has joined #ruby
iMadper has quit [Changing host]
iMadper has joined #ruby
blunckr has quit [Quit: leaving]
<marchelzo> c-c: have you read Zed's ruby book? i want to learn about modules and classes so i will poke around in that section if you think it's decent
GodFather has joined #ruby
<elomatreb> marchelzo: The pickaxe is considered to be something like that, although it is slightly outdated by now
yehowyada has quit [Remote host closed the connection]
ropeney has joined #ruby
yehowyada has joined #ruby
spiette has joined #ruby
vlunkr has joined #ruby
vlunkr has quit [Client Quit]
MrBusiness2 has joined #ruby
iMadper has quit [Client Quit]
iMadper has joined #ruby
iMadper has joined #ruby
iMadper has quit [Changing host]
mark_66 has quit [Quit: Leaving.]
<marchelzo> why's it called the pickaxe?
<c-c> because of pickaxe on book cover
Derderderd has quit [Ping timeout: 258 seconds]
<c-c> for the discerning programmer, ruby classes and modules: http://rhg.rubyforge.org/chapter04.html
pwnd_nsfw` has joined #ruby
<marchelzo> discerning programmer?
polysics has joined #ruby
Axy has quit [Ping timeout: 260 seconds]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<marchelzo> this looks pretty cool
<marchelzo> thanks
pwnd_nsfw has quit [Ping timeout: 258 seconds]
eightbitraptor has quit [Ping timeout: 258 seconds]
cdg has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has joined #ruby
jenrzzz has joined #ruby
Mia has joined #ruby
shinnya has joined #ruby
eightbitraptor has joined #ruby
<havenwood> marchelzo: You can listen to the Poignant Guide soundtrack whilst reading: http://poignant.guide/soundtrack/
jenrzzz has quit [Ping timeout: 258 seconds]
jmignault has quit [Ping timeout: 268 seconds]
<havenwood> marchelzo: Alternatively pretend you're in Blade Runner and: https://www.youtube.com/watch?v=yUv1D9Tj34o
Derderderd has joined #ruby
<elomatreb> Kraftwerk is a good suggestion too though. If you like it, light chiptune is really great working music too imo
cyberarm has joined #ruby
zacts has quit [Quit: WeeChat 1.6]
zacts has joined #ruby
tlaxkit has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo> this is so cool
spider-mario has quit [Ping timeout: 265 seconds]
<marchelzo> i love the sidebar stuff in the guide
SesMan has joined #ruby
Sammichmaker has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Derderderd has quit [Ping timeout: 260 seconds]
nfk has quit [Ping timeout: 260 seconds]
<marchelzo> the ToC listings have such obscure names that it's essentially useless though
aganov has quit [Remote host closed the connection]
nettoweb has joined #ruby
AndrewIsHere has joined #ruby
gbgdev has joined #ruby
rubiesnperls has quit [Ping timeout: 258 seconds]
gbgdev_ has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
James123 has joined #ruby
<James123> Can anyone recommend a book / tutorial for web programming?
Emmanuel_Chanel has quit [Quit: Leaving]
bradleyprice has quit [Remote host closed the connection]
iMadper has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
iMadper has joined #ruby
iMadper has joined #ruby
iMadper has quit [Changing host]
iMadper has quit [Remote host closed the connection]
<marchelzo> i cringe every time
Madplatypus has joined #ruby
nankyokusei has joined #ruby
iMadper has joined #ruby
iMadper has joined #ruby
iMadper has quit [Changing host]
<marchelzo> James123: read the http 1.1 spec
marr has joined #ruby
Emmanuel_Chanel has joined #ruby
<James123> marchelzo, thank you :) This is a prerequisite for backend developing?
cdg_ has joined #ruby
<marchelzo> it should be
<marchelzo> only 176 pages and you will know more about the web than everyone you work with
nankyokusei has quit [Ping timeout: 252 seconds]
denis_ has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 258 seconds]
denis_ has joined #ruby
denis_ has quit [Client Quit]
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
symm- has joined #ruby
aryaching has joined #ruby
SpiffTR has quit [Quit: Leaving.]
juiko has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
antoniobeyah has joined #ruby
Beams has quit [Quit: .]
matthewd has quit [Ping timeout: 260 seconds]
matthewd has joined #ruby
__Yiota has joined #ruby
Derderderd has joined #ruby
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb1 has joined #ruby
conta has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
juiko has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
nettoweb has quit [Remote host closed the connection]
nettoweb1 has quit [Ping timeout: 264 seconds]
nettoweb has joined #ruby
LuckyABA has joined #ruby
Danny has joined #ruby
Danny is now known as Guest15395
dionysus69 has quit [Ping timeout: 248 seconds]
the_drow has joined #ruby
amclain has joined #ruby
jsrn_ has quit [Quit: Leaving]
bijan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
Robtop__ has joined #ruby
bradleyprice has joined #ruby
Guest15395 is now known as Danny1
audibleblink has quit [Quit: l8z]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
<marchelzo> hi
conta has joined #ruby
<marchelzo> why is 'def self.foo ...' the syntax for defining class methods?
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
<marchelzo> is there something deep there or is the self keyword just being re-purposed to disambiguate methods and class methods?
<havenwood> marchelzo: Consider this: class Example; def Example.foo end
bronson has joined #ruby
GodFather has quit [Ping timeout: 268 seconds]
<havenwood> marchelzo: That's exactly the same thing as: class Example; def self.foo end
<havenwood> marchelzo: But in the latter you can change the class name and it'll still work, since `self` is the class.
howdoi has quit [Quit: Connection closed for inactivity]
<marchelzo> so anywhere in the class definition, 'self' refers to the Class object?
<havenwood> marchelzo: It refers to whatever self is at the time.
<havenwood> marchelzo: In this case, a class.
<marchelzo> so in a normal method, would self refer to the object that the method was called on?
Steve____ has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
conta has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
<marchelzo> so are class methods actually singleton methods on the class's Class object?
<eam> marchelzo: in all methods, self refers to the object in question
<eam> yes
nadir has joined #ruby
<marchelzo> mind = blow
bronson has quit [Ping timeout: 260 seconds]
<eam> remember, you can even call methods on objects which don't define them
Chair has quit [Ping timeout: 258 seconds]
<marchelzo> how do you do that
<eam> >> def like_this; "hello world"; end; [].send :like_this
<ruby[bot]> eam: # => "hello world" (https://eval.in/702229)
<marchelzo> wtf
tlaxkit has quit [Quit: ¡Adiós!]
<eam> like_this() is defined on main
<eam> and I sent it to an array
minimalism has quit [Quit: minimalism]
<marchelzo> how
<marchelzo> :like_this is just a symbol
Danny1 has quit [Read error: Connection reset by peer]
<marchelzo> how does it know you're referring to the like_this method on main
cippaciong has joined #ruby
<eam> it's the method name to be called
minimalism has joined #ruby
<eam> >> [1,2,3].send :length
<ruby[bot]> eam: # => 3 (https://eval.in/702230)
hotpancakes has quit [Remote host closed the connection]
gusrub has joined #ruby
Fernando-Basso has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
audibleblink has joined #ruby
jinie has quit [Ping timeout: 246 seconds]
<eam> ruby is rather liberal
cippacio1 has quit [Ping timeout: 245 seconds]
SpComb has joined #ruby
<marchelzo> eam: but where does the send method look?
<ytti> 'main' is just monkey patcing Object
<ytti> so yes
<ytti> [] is subclass of Object
<baweaver> method lookup path
<ytti> so it sees all Object methods
<baweaver> that gist explains some of it
<SpComb> hi, I like playing around with dangerous toys so I'm trying to write some Celluloid::Actors with ruby threads, and I need to understand how this code is behaving when I'm stress-testing it. My rspec example is failing with a "fatal: No live threads left. Deadlock?". I can see from that stack trace where that thread is blocked, but I would also like to see the stack traces of the other blocked threads to understand what the deadlock is
<ytti> 19:18 < eam> remember, you can even call methods on objects which don't define them
<marchelzo> ytti: in that case, [] /does/ define like_this in some sense, right?
<ytti> is blatantly incorrect
<ytti> marchelzo, correct
<marchelzo> ok we're on the same page
mwlang has joined #ruby
<eam> main monkey patches object? But why isn't it seen in #methods?
<ytti> marchelzo, because 'main' is same as reopening 'Object' and defining methods there
<baweaver> >> self
<ruby[bot]> baweaver: # => main (https://eval.in/702231)
<SpComb> question is, is there any way to trap the fatal error raised by ConditionVariable#wait and dump a stack trace of all my other threads?
<baweaver> >> self.ancestors
<ruby[bot]> baweaver: # => undefined method `ancestors' for main:Object (NoMethodError) ...check link for more (https://eval.in/702232)
<ytti> [1] pry(main)> def send arg
<ytti> [2] pry(main)> 1.send 32
<ytti> => :send
<ytti> [1] pry(main)* end
<ytti> [1] pry(main)* 'poop'
<ytti> => "poop"
<ytti> because what i did is same as; class Object; def send arg; 'poop'; end; end
<eam> >> def like_this; "hello world"; end; [].methods.grep /like_this/
<ruby[bot]> eam: # => [] (https://eval.in/702234)
milardovich has joined #ruby
<ytti> bottom line: never write anything in main, always use classes
<ytti> you can end up having some really bad behaviour, imagine your main having 'send' method, all libraries using #send are now broken
<marchelzo> dang
<ytti> debugging that isn't fun or productive
<eam> >> lass Object; def not_like_this; "not the same"; end; end; def like_this; "hello world"; end; [].methods.grep /like_this/
<ruby[bot]> eam: # => /tmp/execpad-79154ae7bd6d/source-79154ae7bd6d:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/702235)
<eam> >> Class Object; def not_like_this; "not the same"; end; end; def like_this; "hello world"; end; [].methods.grep /like_this/
<ruby[bot]> eam: # => /tmp/execpad-38e47aeb0c84/source-38e47aeb0c84:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/702236)
<ytti> eam, it's private method of Object class
<eam> ooooh
<eam> that makes sense, but it's even scarier than I thought
<ytti> yes
<ytti> very very few people are aware how hacky the 'main' is
<ytti> it shouldn't be even allowed
<eam> also, you *can* call a method on a class which doesn't define it I'm pretty sure
<ytti> i don't think so, i don't even understand what that would mean
hutch34 has joined #ruby
<ytti> i mean you can define singletons and put new method on intance of an object and call it
<SpComb> I can see something when I call Celluloid.stack_dump from before I try the waiting operation that deadlocks, but I'd like to see those thread stacks when the ruby threads are actually deadlocked
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<marchelzo> ytti: do you know javascript
<ytti> marchelzo, i know of it :/
montanonic has quit [Ping timeout: 248 seconds]
<eam> I suppose it becomes equivocation over what it means to define a method
<marchelzo> hmm
<eam> ultimately it's just a function call with an implied argument
<SpComb> although, heh, even this stack dump is enough to show me that my threads are actually probably synchronizing on `Logger#debug` atm... I suspect this code would behave differently if I ran it without debug logging enabled D:
<marchelzo> when i read "calling a method on a class that doesn't define it" i think like
<havenwood> >> class << self; remove_method :inspect end; self
<ruby[bot]> havenwood: # => #<Object:0x41435350> (https://eval.in/702241)
<marchelzo> Array.prototype.foo.call(someNoneArrayObject, 42)
hotpancakes has joined #ruby
<havenwood> ^ that's a nice writeup on main
ramfjord has joined #ruby
alexar has joined #ruby
lacour has joined #ruby
<marchelzo> ytti: do you write ruby professionally?
<ytti> no, i don't write anything professionally
<ytti> hoping to pivot to software one day, but waiting for very specific opportunity
<marchelzo> oh, cool
AndrewIsHere has quit []
kies has quit [Ping timeout: 258 seconds]
hotpanca_ has joined #ruby
jinie has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
maattdd has quit [Ping timeout: 250 seconds]
montanonic has joined #ruby
jaguarmagenta has joined #ruby
segy has quit [Ping timeout: 268 seconds]
nettoweb has quit [Ping timeout: 256 seconds]
aswen has joined #ruby
James123 has quit [Quit: Lost terminal]
jaguarmagenta has quit [Ping timeout: 246 seconds]
jshjsh has joined #ruby
Derderderd has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
jaegerca has quit [Read error: Connection reset by peer]
gbgdev has quit [Remote host closed the connection]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has quit [Ping timeout: 260 seconds]
evie_hammond has quit [Ping timeout: 258 seconds]
nettoweb has joined #ruby
evie_hammond has joined #ruby
johnzorn- has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
<marchelzo> havenwood: have things changed much since this was written?
johnzorn has joined #ruby
<havenwood> marchelzo: nope
SeepingN has joined #ruby
<marchelzo> havenwood: for me, singleton_class.instance_methods(false) only contains :to_s and :inspect
<marchelzo> i don't have :include, :public, or :private
swills has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
gbgdev has joined #ruby
muelleme has joined #ruby
nettoweb has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
gbgdev has quit [Ping timeout: 248 seconds]
bocaneri has quit [Remote host closed the connection]
gbgdev has joined #ruby
e1z0_ has joined #ruby
milardovich has quit []
jenrzzz has quit [Ping timeout: 258 seconds]
eightbitraptor has quit [Ping timeout: 250 seconds]
hotpanca_ has quit [Remote host closed the connection]
benlieb has joined #ruby
muelleme has quit [Ping timeout: 245 seconds]
ddffg has joined #ruby
xall has quit [Ping timeout: 250 seconds]
tercenya_ has joined #ruby
bluOxigen has joined #ruby
duderonomy has quit [Ping timeout: 264 seconds]
tercenya has quit [Ping timeout: 246 seconds]
symm has joined #ruby
symm- has quit [Ping timeout: 258 seconds]
e1z0_ has quit [Read error: Connection reset by peer]
icarus has joined #ruby
hotpancakes has joined #ruby
Synthead has quit [Quit: Synthead]
bluOxigen has quit [Read error: Connection reset by peer]
antoniobeyah has quit [Quit: antoniobeyah]
bluOxigen has joined #ruby
Derderderd has joined #ruby
kebolio has joined #ruby
<kebolio> just messing around but im confused about what's wrong with this: while !(l = gets).nil? { puts l }
marxarelli has joined #ruby
djbkd has joined #ruby
sepp2k has joined #ruby
<kebolio> nvm i just iterate over STDIN instead :^)
kebolio has left #ruby [#ruby]
shinnya has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 250 seconds]
<marchelzo> but what was wrong with it
tildes has joined #ruby
<elomatreb> marchelzo: They likely expected the stuff in the brace s
<elomatreb> *in the braces to be the loop body,
<Papierkorb> while is a keyword ~
<Papierkorb> Not to mention the useless !.nil? combo
<marchelzo> what's wrong with !.nil? combo
pgib has joined #ruby
<marchelzo> oh, right. it should just be: while !(l = gets).nil?; puts l; end
<marchelzo> ?
<Papierkorb> marchelzo: It's redundant. the code will work without, making it clutter and thus useless.
<marchelzo> oh
<marchelzo> so just: while l = gets; puts l; end
djbkd has joined #ruby
nettoweb has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
vuoto has joined #ruby
jmignault has joined #ruby
hahuang65 has joined #ruby
veloutin_ is now known as veloutin
duderonomy has joined #ruby
muelleme has joined #ruby
hotpancakes has quit [Remote host closed the connection]
tercenya_ has quit [Remote host closed the connection]
[Butch] has joined #ruby
hotpancakes has joined #ruby
tercenya has joined #ruby
cfec0b8d has joined #ruby
JoshS has joined #ruby
nofxx has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
jshjsh has quit [Ping timeout: 250 seconds]
muelleme has quit [Ping timeout: 268 seconds]
Fernando-Basso has quit [Quit: Leaving]
troulouliou_dev has joined #ruby
teclator has joined #ruby
sneakers has joined #ruby
workmad3 has quit [Ping timeout: 258 seconds]
Lord_of_Life has quit [Excess Flood]
SpiffTR has joined #ruby
bijan_ has joined #ruby
conta has joined #ruby
pawnbox has quit [Remote host closed the connection]
MrBusiness2 has quit [Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel]
bronson has joined #ruby
Lord_of_Life has joined #ruby
antoniobeyah has joined #ruby
pilne has joined #ruby
careta has joined #ruby
Hink has quit [Quit: quit from client]
bronson has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
Hink has joined #ruby
ls has joined #ruby
marxarelli is now known as marxarelli|afk
dionysus70 has joined #ruby
<havenwood> marchelzo: loop { puts gets }
<marchelzo> why does { } work with loop but not while
<marchelzo> is loop a method?
<elomatreb> >> method :loop
<ruby[bot]> elomatreb: # => #<Method: Object(Kernel)#loop> (https://eval.in/702306)
bijan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo> cool
tercenya has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 245 seconds]
<marchelzo> >> loop { break }
<ruby[bot]> marchelzo: # => nil (https://eval.in/702307)
dionysus69 has quit [Ping timeout: 268 seconds]
dionysus70 is now known as dionysus69
<marchelzo> how does that work?
tercenya has joined #ruby
<havenwood> marchelzo: break breaks the loop, returning nil
<marchelzo> what loop
<havenwood> the loops you're iterating through in the block
<marchelzo> hmm
<elomatreb> Kernel#loop is basically implement like `def loop; yield while true; end`
<havenwood> >> loop { break 42 } # marchelzo
<ruby[bot]> havenwood: # => 42 (https://eval.in/702308)
<marchelzo> >> 3.times { puts 'hi'; break }
<ruby[bot]> marchelzo: # => hi ...check link for more (https://eval.in/702309)
<havenwood> marchelzo: That breaks on the first iteration
<manveru> 3.times{ break 'hi' }
<havenwood> #=> "hi"
<manveru> :)
<marchelzo> ok, but if you implemented .times recursively, then break wouldn't work, right?
conta has quit [Ping timeout: 250 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
<marchelzo> >> 4.method(:times).owner
<ruby[bot]> marchelzo: # => Integer (https://eval.in/702311)
ryan_notabot has quit [Remote host closed the connection]
BrianJ has joined #ruby
<manveru> >> def foop(n, &b) yield; foop(n-1, &b) if n > 1; end; foop(2){ break :hi }
<ruby[bot]> manveru: # => :hi (https://eval.in/702316)
<manveru> break and recursion are no problem
<marchelzo> wtf
<marchelzo> i thought i understood blocks
<marchelzo> so what does break mean
<manveru> yeah... mister i-learn-every-language-in-15-minutes :P
polysics_ has joined #ruby
<marchelzo> there are no good ruby tutorials for learning it in 15 minutes
<manveru> break is a non-local return
<marchelzo> like raise?
<manveru> pretty much
spider-mario has joined #ruby
<manveru> more like throw
<marchelzo> oh ruby has throw and raise?
muelleme has joined #ruby
<manveru> yes, you can implement break using throw/catch
<havenwood> marchelzo: It works just the same implemented recursively.
<havenwood> marchelzo: try it: def times n; return if n.zero?; proc.call; times n.pred, &proc end
<marchelzo> i was about to but manveru beat me
<havenwood> marchelzo: Aha, catching up on backlog.
ls is now known as lsousa
jgt1 has joined #ruby
lsousa has quit [Quit: lsousa]
lsousa has joined #ruby
<marchelzo> ok
<marchelzo> return and break in blocks seem to behave in a desirable way
<marchelzo> but not in a natural way from the perspective of someone implementing ruby
MrBusiness2 has joined #ruby
polysics has quit [Ping timeout: 268 seconds]
<manveru> throw/catch are light-weight versions of raise/rescue, they don't need a class or stacktrace
<marchelzo> rather, there doesn't seem to be an explanation of how break and return work in blocks that is both simple and accurate
<marchelzo> i see
jgt has quit [Ping timeout: 265 seconds]
[Butch] has quit [Quit: I'm out . . .]
<manveru> i can tell you more later, gotta make dinner first
<marchelzo> cool
csk has joined #ruby
moeSizlak has joined #ruby
<moeSizlak> can i use ruby + rack + passenger + apache without rails
dionysus69 has quit [Ping timeout: 268 seconds]
muelleme has quit [Ping timeout: 264 seconds]
<havenwood> moeSizlak: yes
<moeSizlak> is it common and /or advisable to do so
<marchelzo> why dont you want to use rails
<havenwood> moeSizlak: You could write a pure Rack app or use one of the many fine Rack adapters.
<moeSizlak> i dont like activerecord
<havenwood> moeSizlak: I'd recommend looking at Roda with Sequel. They're a lovely combo.
muelleme has joined #ruby
the_drow has quit [Ping timeout: 265 seconds]
troulouliou_dev has quit [Quit: Leaving]
<moeSizlak> what exactly is a "rack adapter"
<moeSizlak> i know sequel already
<lsousa> sinatra is another good option
<havenwood> moeSizlak: Here're examples of Hello Worlds written in various Rack adapter web frameworks: https://github.com/luislavena/bench-micro/tree/master/apps
<havenwood> moeSizlak: You can run any one of those with `rackup name_here.ru` or if you name it config.ru you can just run `rackup`.
<moeSizlak> ok but apache is a requirement for me
<havenwood> moeSizlak: That's fine.
<marchelzo> just curious, why is apache a requirement
<havenwood> moeSizlak: As you mention you can use Passenger as your Rack webserver and Passenger has an Apache module.
<havenwood> moeSizlak: It isn't a requirement.
<moeSizlak> too many frameworks/adpaters/bs. im a php guy that knows ruby
<marchelzo> have you tried nginx
<havenwood> moeSizlak: It's popular to reverse proxy to your Rack webserver from either Nginx or Apache for various reasons but it isn't necessary. You can serve directly to port 80 with your Rack webserver.
the_drow has joined #ruby
<moeSizlak> apache is already on port 80
<moeSizlak> ...
dnicole has quit [Remote host closed the connection]
<havenwood> moeSizlak: Well, if you weren't using Apache it wouldn't be.
dnicole has joined #ruby
<havenwood> moeSizlak: Your choice.
<moeSizlak> <moeSizlak> ok but apache is a requirement for me
Fernando-Basso has joined #ruby
chouhoul_ has joined #ruby
the_drow has quit [Client Quit]
bijan_ has joined #ruby
jaguarmagenta has joined #ruby
bijan_ has quit [Client Quit]
<havenwood> moeSizlak: You can reverse proxy from Apache to any of the Rack webservers. Passenger uniquely has an Apache module as well as its standalone version.
<havenwood> moeSizlak: But you can use Puma, Thin, Unicorn or whatever you prefer behind Apache.
chouhoulis has quit [Ping timeout: 250 seconds]
tubuliferous has joined #ruby
agent_white has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
<agent_white> Afternoon folks
<havenwood> moeSizlak: I'd suggest trying a pure Rack app with Passenger Apache and see what its limitations are. Then look at Roda and go through each plugin to see what it adds on top of Rack: https://github.com/jeremyevans/roda/tree/master/lib/roda/plugins
hotpancakes has joined #ruby
mikeXsh has quit [Quit: Connection closed for inactivity]
<havenwood> moeSizlak: You can compose the framework you need with Roda plugins. Or Sinatra is one of the most popular Rack adapters.
<moeSizlak> why do i need a rack adapter
<moeSizlak> i thought rack WAS the adapter
<moeSizlak> too much middleware
<moeSizlak> php doesnt have this problem
<pilne> php and ruby are... very different beasts
<havenwood> moeSizlak: Heh, Rack does have middleware too but that's a different thing. :-P
jmcc has quit [Quit: Updating details, brb]
jmcc has joined #ruby
<havenwood> moeSizlak: You can write your own middleware or there are some great off-the-shelf Rack middleware gems.
<pilne> i've been meaning to give hanami a whirl
alexar has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
alexar has joined #ruby
<adam12> There's a ton of options. Roda is nice if you like the routing tree, Padrino gives you the structure of Rails in a more componentized fashion
<moeSizlak> ugh
benlieb has quit [Quit: benlieb]
jz has joined #ruby
<pilne> choice is good, freedom to do it how you are most comfortable is a blessing, not a curse
jz is now known as Guest35153
<adam12> moeSizlak: Everything builds on top of Rack. It's the unified interface. You can use it raw, or with a tooling on top of it (Sinatra, Roda, Rails, whatever).
Guest35153 has quit [Max SendQ exceeded]
<pilne> "opinionated" is great, if your opinions on the matter match :)
johnzorn- has joined #ruby
<leah2> utterly complicated that rack stuff ;)
libastral has joined #ruby
<pilne> lol, i almost think you have to really try to write complicated code in ruby, and if you are, you are probably digging deep into the guts for a good reason :)
johnzorn has quit [Ping timeout: 258 seconds]
hotpancakes has quit [Ping timeout: 258 seconds]
eightbitraptor has joined #ruby
alexar has quit [Ping timeout: 258 seconds]
chouhoul_ has quit [Remote host closed the connection]
<marchelzo> pilne: how goes the lisp implementation
Yzguy has joined #ruby
<Yzguy> Can I refer to other sections of a YAML document in the same document?
chouhoulis has joined #ruby
swills has joined #ruby
<pilne> marchelzo=> i'm barely "actively" coding, work is insane right now and my brain just tends to hurt, but i'm bookmarking lots of things for when it gets back to normal
Phyllotaxis has joined #ruby
<marchelzo> i see
[Butch] has joined #ruby
eightbitraptor has quit [Ping timeout: 258 seconds]
JoshS has quit [Quit: Leaving]
lsousa has quit [Quit: lsousa]
jaegerca has joined #ruby
<jaegerca> Does anyone here know how to have the ruby net/ftp library resume an ftp download if it is interupted?
ldnunes has quit [Quit: Leaving]
hotpancakes has joined #ruby
<MrBusiness2> Does Ruby have an OS-agnostic GUI automator?
minimalism has quit [Quit: minimalism]
<pilne> MrBusiness2=> https://github.com/shoes/shoes4
<MrBusiness2> thank you pline
<pilne> 3 is the stable version though, sorry
<ruurd> MrBusiness2 a WHAT?
<pilne> and wait, 4 is jruby only
<pilne> 3 is what you wat
<pilne> want
<manveru> jaegerca: you'd have to retry the request with a specific range
ur5us has joined #ruby
<jaegerca> Range?
<manveru> jaegerca: depending on your case, it might be easier to shell out to `wget -c`
<manveru> yeah, http ranges
guacamole has quit [Quit: leaving]
<jaegerca> Hm, interesting, I will have to read up on http ranges - I think you're right though, I will probably just use libcurl or wget from ruby.
jhack has joined #ruby
<manveru> either way it'd be also recommended to checksum the content after download :)
vuoto has quit [Ping timeout: 245 seconds]
<manveru> wget is handy because it supports ftp and http(s) and has the -c flag for continuation of downloads
jenrzzz has quit [Ping timeout: 256 seconds]
<manveru> not sure what the range command is for ftp, but i think there was one
marxarelli|afk is now known as marxarelli
<manveru> section 5 :)
hotpanca_ has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
GodFather has joined #ruby
rodfersou has quit [Quit: leaving]
hotpancakes has quit [Ping timeout: 240 seconds]
gbgdev_ has joined #ruby
gbgdev has quit [Ping timeout: 246 seconds]
SpiffTR has quit [Quit: Leaving.]
d0nn1e has quit [Ping timeout: 258 seconds]
montanonic has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ruby
nankyokusei has joined #ruby
minimalism has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
aryaching has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 256 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
fzxi has quit [Ping timeout: 258 seconds]
johnmilton has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 246 seconds]
<MrBusiness2> Please pardon me
<MrBusiness2> I am a Ruby noob--
aswen has quit [Quit: WeeChat 1.5]
<MrBusiness2> Is that to say that Ruby is in between version ala Python 2 vs 3?
<MrBusiness2> a Ruby 3 vs 4, if you will?
<marchelzo> MrBusiness2: no, it's the shoes gem that pilne was talking about
<marchelzo> not ruby itself
tildes has joined #ruby
<manveru> MrBusiness2: well, there used to be the 1.8->1.9 migration
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<marchelzo> MrBusiness2: shoes version 4 only works with a particular ruby implementation (JRuby)
skweek has joined #ruby
<manveru> oh, didn't read the history
<pilne> yeah, ruby has already pretty much overcame the 1.8 -> 1.9 thing completely
jenrzzz has quit [Ping timeout: 250 seconds]
<marchelzo> soon it will have to overcome 2.x -> 3
<pilne> jruby bends over backwards to try and be compatible with ruby
jenrzzz has joined #ruby
<pilne> are they planning a lot of breaking changes?
alexar has joined #ruby
<manveru> ruby 3 won't be here for a couple of years
babblebre has joined #ruby
<marchelzo> what can i do to make ruby 3 come faster
Yzguy has quit [Remote host closed the connection]
kobain has joined #ruby
<manveru> hmm
konsolebox has quit [Ping timeout: 248 seconds]
<pilne> i wanted to quote southpark in response...
<manveru> 1.0 was 1996, 2.0 was 2013, so we should get it around 2034
ramfjord_ has joined #ruby
theRoUS` has quit [Changing host]
theRoUS` has joined #ruby
<pilne> inside i'm most looking forward to guilds in 3.0, but realistically i have everything i need to do what i feel i can accomplish before 3.0 comes out (mostly?)
<pilne> performance improvements are always nice, but i'm not gonna be enterprise-grade anytime soon lol
<manveru> well, guilds probably won't speed things up much for regular stuff
<marchelzo> lets get rid of the GIL in ruby3
ramfjord has quit [Ping timeout: 256 seconds]
<manveru> you mean rubinius?
<pilne> rubinis intrigues the fuck outta me, especially after really "getting" what a gemstone server is about
<manveru> hehe
<manveru> the ruby on gemstone/s was maglev, no?
<manveru> whatever became of that i wonder
<pilne> true, but something feels similar into how it can be deployed/scaled
nettoweb has quit [Read error: Connection reset by peer]
<MrBusiness2> Ah, interesting
<MrBusiness2> I may avoid that then
<MrBusiness2> Java-based things make me nervous
<manveru> looks like they gave up selling licenses for maglev
<pilne> a bit of a pity, the smalltalk vm seems quite a nice fit for ruby, more natural than the jvm
<chrisseaton> The JVM started as a Smalltalk VM though.
<pilne> but far less, everywhere
<pilne> yeah, but it is now really truly optimized for "java" with other stuff, but graal/truffle look superb
<manveru> nevermind, they still sell the gemstone/s licenses which you need to run maglev :P
<marchelzo> hotspot started as a smalltalk vm?
djbkd has quit [Remote host closed the connection]
yehowyada has quit [Quit: Textual IRC Client: www.textualapp.com]
Jackneill has quit [Remote host closed the connection]
<chrisseaton> Yeah.
<manveru> yeah
<marchelzo> should have stayed one
<marchelzo> the world would be better off
<manveru> eclipse used to be smalltalk too
<chrisseaton> The JVM didn't as a whole, but HotSpot did.
hahuang65 has quit [Remote host closed the connection]
<manveru> https://gemtalksystems.com/licensing/ you wanna use 4 of your 8 cores, that'll be $6000 please
alexar has quit [Remote host closed the connection]
<manveru> :(
<marchelzo> chrisseaton: how much formal education do you have in compilers
alexar has joined #ruby
<chrisseaton> marchelzo: I have a PhD in it.
<marchelzo> ok i figured
rakm has joined #ruby
<marchelzo> i want to be a compiler engineer one day
<chrisseaton> marchelzo: I only started seriously four years ago!
<chrisseaton> marchelzo: I did a masters in compilers, but it wasn't very serious, so it was a bit like starting from scratch just a few years ago.
<marchelzo> i asked for 'Engineering a Compiler' by by Cooper and Torczon, and 'The Garbage Collection Handbook' by Hosking, Moss, and Jones for christmas
<marchelzo> s/by by/by/
<pilne> i really should read the gang of four book, and the dragon book
<chrisseaton> marchelzo: do yourself a favour and don't spend any time on parsers - they're a trivial solved problem in practice and all the old texts spend far far far too much time on them
<manveru> you read SICP yet? :)
<MrBusiness2> The dragon book is a worthwhile read, but honestly, I'd recommended paying less and getting the old 80s version
<pilne> htdp and sicp when i was poking at racket.
<marchelzo> chrisseaton: yes, that is consistent with what i've read elsewhere, and it matches my experience
benlieb has joined #ruby
ishigoya has quit [Ping timeout: 258 seconds]
<marchelzo> chrisseaton: i've written a compiler for a toy language that i designed and i just wrote a recursive descent parser. it's reasonably fast. i'm pretty naive, but i don't see why the dragon book for example makes such a big deal of parsing algorithms
<marchelzo> and i guess i could just use a parser generator if i wanted something more efficient
<manveru> yeah... lots of options for parsing these days
bronson has joined #ruby
<pilne> something written when cores/ram weren't cheap is going to have roots in mhz/kb optimizations
<MrBusiness2> If you want every parson method known to man
hahuang61 has quit [Ping timeout: 245 seconds]
<MrBusiness2> there exists a monograph
<MrBusiness2> the cover is gray
<MrBusiness2> and it is jammed packed with a technical analysis of every parsing technique known to man
<MrBusiness2> I can barely read it.
<chrisseaton> I just did the maths - I've spent about 0.2% of my time of JRuby+Truffle on parser.
<MrBusiness2> Or at least I could barely read it last time I could find it
<marchelzo> chrisseaton: :o
<MrBusiness2> since all of my books are in disposable shopping bags due to a disastrous move
rwb has quit [Ping timeout: 258 seconds]
<manveru> chrisseaton: you like PEGs?
<chrisseaton> manveru: yeah that's what my masters thesis was on
<manveru> :D
<chrisseaton> I did a new kind of left recursion and JIT compiled PEGs to CLR bytecode
<manveru> i wrote one for neko once
SpiffTR has joined #ruby
<manveru> http://nekovm.org/ is probably one of my favorite VMs to learn building compilers for
bronson has quit [Ping timeout: 250 seconds]
<marchelzo> why not write your own vm
nettoweb has joined #ruby
<manveru> i'm not masochistic enough
ishigoya has joined #ruby
<marchelzo> that was my reason for not using an existing vm
frozengeek has quit [Read error: Connection reset by peer]
gbgdev_ has quit [Remote host closed the connection]
<marchelzo> it's not that hard and it gives you more control and saves you from wading through a bunch of docs
frozengeek has joined #ruby
<marchelzo> you can tailor the instruction set to your language's semantics
chrisja has joined #ruby
<marchelzo> manveru: what language were you compiling to neko vm bytecode?
<manveru> my own, called oxid
<manveru> it was based on the ideas of http://soft.vub.ac.be/research/agora/ and self
djbkd has joined #ruby
<marchelzo> manveru: any example source code to show?
<manveru> to have a language without a single reserved keyword
polysics_ has quit [Remote host closed the connection]
<manveru> hmm, i'd have to dig
<manveru> it's been ages
BillSussman has quit [Ping timeout: 258 seconds]
<manveru> i never released it, so it must be in my seafile
AndyBotwin has joined #ruby
synthroid has joined #ruby
psmolen has quit [Ping timeout: 246 seconds]
psmolen has joined #ruby
BitWhisperer has quit [Ping timeout: 248 seconds]
brendan- has joined #ruby
tdy has quit [Quit: tdy]
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BrianJ has joined #ruby
synthroi_ has joined #ruby
symm has quit [Ping timeout: 246 seconds]
tyang_ has joined #ruby
<marchelzo> manveru: do you have a good resource to learn about PEG?
symm- has joined #ruby
synthroid has quit [Ping timeout: 260 seconds]
<manveru> for ruby take a look at https://github.com/nathansobo/treetop
tdy has joined #ruby
bradleyprice has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
sagax has quit [Ping timeout: 258 seconds]
ishigoya has quit [Ping timeout: 245 seconds]
hutch34 has joined #ruby
bradleyprice has joined #ruby
djbkd has joined #ruby
<manveru> there are PEGs and PEG parsers for a lot of languages now
<manveru> also http://bford.info/packrat/ has a list of other implementations and more docs
tyang has quit [Ping timeout: 268 seconds]
ishigoya has joined #ruby
<marchelzo> awesome, thanks
tildes has quit [Ping timeout: 246 seconds]
jarred_ has joined #ruby
bradleyprice has quit [Ping timeout: 248 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
djbkd has quit [Ping timeout: 265 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
tyang_ has quit [Ping timeout: 268 seconds]
muelleme has quit [Ping timeout: 256 seconds]
jaguarmagenta has joined #ruby
<manveru> ok, found oxid again, i wrote it in 2007... it still compiles though
ishigoya has quit [Ping timeout: 250 seconds]
<manveru> need to convert the darcs repo sometime to git
jaguarmagenta has quit [Ping timeout: 252 seconds]
hahuang65 has joined #ruby
synthroi_ has quit []
<manveru> anw, fun stuff for the holidays, thanks man :)
ishigoya has joined #ruby
<ruby[bot]> manveru: as I told you already, please use https://gist.github.com
nankyokusei has joined #ruby
<marchelzo> haha
<manveru> syntax is inspired by smalltalk mostly
BitWhisperer has joined #ruby
benlieb has quit [Quit: benlieb]
Giorgio has joined #ruby
Giorgio has quit [Quit: Leaving]
<marchelzo> looks cool
<ruby[bot]> manveru: as I told you already, please use https://gist.github.com
<manveru> another simple one
GodFather has quit [Ping timeout: 268 seconds]
audibleblink has quit [Quit: l8z]
<manveru> it's a bit too verbose for me, but self is the only keyword :)
frozengeek has quit [Quit: frozengeek]
frozengeek has joined #ruby
<manveru> might be nice to replace it with @ like coffee-script
nankyokusei has quit [Ping timeout: 264 seconds]
johnzorn has joined #ruby
Guest38837 has quit [Changing host]
Guest38837 has joined #ruby
Guest38837 has joined #ruby
Guest38837 is now known as giraffe
johnzorn has quit [Max SendQ exceeded]
ishigoya has quit [Ping timeout: 258 seconds]
hightower2 has joined #ruby
<bougyman> manveru: is that swift?
<manveru> nah
<manveru> that was way before swift :)
SpiffTR has quit [Quit: Leaving.]
johnzorn- has quit [Ping timeout: 268 seconds]
SpiffTR has joined #ruby
bradleyprice has joined #ruby
johnzorn has joined #ruby
rgiscard has joined #ruby
theod has joined #ruby
<manveru> wonder what library i used to write the specs...
xen0fon has quit [Quit: xen0fon]
careta has quit [Quit: Leaving]
hahuang61 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
ramortegui has quit [Quit: Ex-Chat]
hahuang61 has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
csk has quit [Read error: Connection reset by peer]
biberu has quit []
audibleblink has joined #ruby
milardovich has joined #ruby
csk has joined #ruby
madsa has quit [Remote host closed the connection]
ignarps- has quit [Quit: ZNC - http://znc.in]
ignarps has joined #ruby
meshsmith has quit [Remote host closed the connection]
jz has joined #ruby
jz is now known as Guest57748
<zenspider> manveru: also looks like self w/ the cloning...
johnzorn has quit [Ping timeout: 256 seconds]
Guest57748 has quit [Max SendQ exceeded]
johnzorn has joined #ruby
griffindy has joined #ruby
<manveru> yes, its object model is prototype based too
polysics has joined #ruby
<manveru> every object has so-called slots, if you store a block in there, it's executed when you access the slot, thereby it acts like a method
<pilne> calling crystal, from ruby?
csk has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
antoniobeyah has quit [Quit: antoniobeyah]
<zenspider> manveru: nice. I always liked self's runtime model
flying has quit []
polysics has quit [Ping timeout: 252 seconds]
icarus has quit [Ping timeout: 246 seconds]
mwlang has quit [Quit: mwlang]
icarus has joined #ruby
Koirishima has joined #ruby
agent_white has quit [Quit: bbl]
last_staff has joined #ruby
antoniobeyah has joined #ruby
<zenspider> manveru: what'd you implement it in?
aryaching has joined #ruby
<manveru> zenspider: neko
<zenspider> not compiling to neko? written IN neko?
<manveru> yes
<zenspider> I tried to do a OO architechure on neko and had nothing but problems... and the mailing list was so dead I didn't get help for 4 months
<manveru> it's interpreted
<zenspider> is it up anywhere? I'd love to look at it
CloCkWeRX has joined #ruby
jhack has quit [Ping timeout: 260 seconds]
<manveru> i have to fix a few more things, but i'll ping you when it's on github
<manveru> neko 2.0 changed a few things, so exceptions are buggy atm
agent_white has joined #ruby
Robtop__ has quit [Ping timeout: 245 seconds]
pwnd_nsfw has joined #ruby
<manveru> was amazed it compiles at all, since it's 8 years old
SeepingN has quit [Ping timeout: 246 seconds]
<zenspider> kk. send a PM so I get it even if I'm not actually on here
<manveru> but yeah, i don't think i ever got much help from the community
<manveru> mostly got by with reading the neko source
rkoller has joined #ruby
SeepingN has joined #ruby
anuxivm has joined #ruby
muelleme has joined #ruby
polishdub has quit [Quit: Leaving]
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
Steve____ has quit [Quit: Page closed]
muelleme has quit [Ping timeout: 256 seconds]
jz has joined #ruby
jz is now known as Guest12199
rwb has joined #ruby
rykou has quit [Ping timeout: 252 seconds]
tommylommykins has joined #ruby
johnzorn has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
Koirishima has quit [Quit: WeeChat 1.5]
pwnd_nsfw has joined #ruby
marxarelli has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 258 seconds]
cfec0b8d has quit [Ping timeout: 245 seconds]
Dimik has joined #ruby
hightower3 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
NeverTired has joined #ruby
hightower2 has quit [Ping timeout: 268 seconds]
pwnd_nsfw` has joined #ruby
anuxivm has left #ruby [#ruby]
nankyokusei has joined #ruby
madsa has joined #ruby
brendan- has joined #ruby
pwnd_nsfw has quit [Ping timeout: 258 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saneax-_-|AFK is now known as saneax
xen0fon has joined #ruby
AndrewIsHere has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
xen0fon has quit [Client Quit]
hightower2 has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
hightower3 has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Fernando-Basso has quit [Quit: WeeChat 1.6]
bronson has quit [Ping timeout: 250 seconds]
Guest12199 has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
hahuang61 has joined #ruby
johnzorn has joined #ruby
enterprisey has joined #ruby
johnzorn has quit [Max SendQ exceeded]
johnzorn has joined #ruby
ruby-lang291 has joined #ruby
johnzorn has quit [Max SendQ exceeded]
ruby-lang291 has quit [Client Quit]
iceden has quit [Ping timeout: 246 seconds]
rgiscard has quit [Quit: Cheers]
johnzorn has joined #ruby
polysics has joined #ruby
johnzorn has quit [Max SendQ exceeded]
johnzorn has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
doubleemms has joined #ruby
lmc has joined #ruby
ishigoya has joined #ruby
benlieb has joined #ruby
Log1x has quit [Excess Flood]
jz has joined #ruby
jz is now known as Guest4124
jhack has joined #ruby
icarus has quit [Read error: Connection reset by peer]
polysics has quit [Ping timeout: 258 seconds]
johnzorn has quit [Ping timeout: 265 seconds]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
icarus has joined #ruby
hutch34 has joined #ruby
reverberations has joined #ruby
is_null has quit [Changing host]
is_null has joined #ruby
iceden has joined #ruby
last_staff has quit [Quit: last_staff]
jhack has quit [Ping timeout: 258 seconds]
hutch34 has quit [Ping timeout: 250 seconds]
StoneCypher has joined #ruby
<StoneCypher> i figure the answer is almost certainly no, but
<StoneCypher> is there any converse to require, or a re-require?
<StoneCypher> it's kind of frustrating killing and restarting irb every time i want to test updated code
jhack has joined #ruby
jenrzzz has joined #ruby
jaguarmagenta has joined #ruby
frozengeek has quit [Quit: frozengeek]
<elomatreb> StoneCypher: Not sure it's what you want, but pry has "load", which does that. Idk if irb has it too
jhack has quit [Client Quit]
<elomatreb> Actually, it seems load is built-in, so it will also work in irb
<StoneCypher> and load will replace stuff i already got?
jaguarmagenta has quit [Ping timeout: 265 seconds]
<elomatreb> It doesn't do the require thing where it ignoes files you already required, it seems
<StoneCypher> nice :)
<StoneCypher> thank you very much
* StoneCypher enjoys that #ruby seems to be largely free of the "your question is wrong" attitude
<marchelzo> the question is wrong though
koooge has joined #ruby
<StoneCypher> marchelzo: huahuahuahuahuah
<marchelzo> why aren't you using pry
<StoneCypher> because i don't speak ruby and don't know what pry is
<marchelzo> its just a better irb
<StoneCypher> ok
<marchelzo> gem install pry
<elomatreb> marchelzo: irb is fine, bugging everyone about pry isn't helping anyone
<marchelzo> sorry
<StoneCypher> i'm happy to learn about better tools
<StoneCypher> and i appreciate the tip
<StoneCypher> as long as they don't come with new dependencies for my code
<marchelzo> at least for me, irb doesn't even support basic readline bindings
<marchelzo> it's literally unusable
<marchelzo> i have ruby built with --without-readline
<StoneCypher> am i a wizard?
<StoneCypher> FOR I HAVE USED THE UNUSABLE AND SURVIVED
Log1x has joined #ruby
yqt has joined #ruby
<marchelzo> you probably have readline support
<StoneCypher> elomatreb: marchelzo: thank you both for the help
<elomatreb> marchelzo: Well, it's true it's less convenient, but the question is valid anyway
<marchelzo> yeah i was joking about the question being wrong
<StoneCypher> he waited until i was answered. it was good natured :)
* StoneCypher goes back to sucking at ruby
<marchelzo> i suck too
<marchelzo> just started learning yesterday
<marchelzo> pry has a thing called reload-code
<marchelzo> i don't know if it would be useful to you
<marchelzo> i think you want something like ghci's :reload
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]