<colstrom_>
All of the power, none of the elegance?
<Ox0dea>
crime: You're... in #ruby?
<danneu>
meanwhile, in langs without destructuring, you feel like a dingus with your intermediate value you have to manually assign apart
Alina-malina has quit [Ping timeout: 250 seconds]
<crime>
Ox0dea: ? was i getting too far off topic?
<Ox0dea>
crime: No, I meant to indicate that "Perl-y Lisp" is a decent first brush at succinctly describing Ruby.
dfinninger has joined #ruby
workmad3 has joined #ruby
<crime>
id say its more of a perly lisp, and id also argue that theres a difference, because ruby has a consistent model of computation and perl less so
<crime>
a lispy perl is just higher order perl, which theres plenty of crap on cpan for
h99h9h88 has joined #ruby
<crime>
but a perly lisp has convenient variables already set, and a way to interface with the code that is consistent all the way down, which ruby has
<Ox0dea>
Exactly...
<crime>
oh
<colstrom_>
Ox0dea Perl-y Lisp with a health dose of Smalltalk?
dfinninger has quit [Remote host closed the connection]
<crime>
misread you
<Ox0dea>
colstrom_: Just so.
<crime>
s/all that/yep
h99h9h88 has quit [Remote host closed the connection]
AnoHito has quit [Ping timeout: 250 seconds]
craysiii has quit [Remote host closed the connection]
<crime>
smalltalk died an unjust death
<crime>
cog vm tho, that cog vm
<crime>
i was real excited about Cardinal as well, before it died
ss_much has joined #ruby
<colstrom_>
And thus we have my journey FROM Perl and Smalltalk, TO Ruby. I picked up Lisp later, but use it alongside Ruby.
XxionxX has left #ruby [#ruby]
<crime>
my first language was lisp, then perl, lua, and now ruby
<crime>
emacs killed lisp for me
<crime>
after a while anyways
<colstrom_>
@crime Smalltalk isn't dead! It's... as alive as it ever really was. Probably moreso now, if you count people using it. Pharo and such!
K1MOS has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
<colstrom_>
So much conceptual beauty.
<colstrom_>
Wrapped in a development model that just... never caught on.
<colstrom_>
And we're all poorer for it.
pu22l3r has quit [Remote host closed the connection]
<crime>
i tried a while back to get pharo to compile and never could
emptyflask has joined #ruby
<colstrom_>
One day... maybe one day, I'll bring those things I loved from Smalltalk's tooling to Ruby.
<crime>
i got squeak running after that and quickly realized I don't know the first thing about smalltalk programming
workmad3 has quit [Ping timeout: 240 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crime>
I really like reading about it, and you know what else I've found, there's another language that has a really interesting model that is worth trying to learn from
<crime>
tcl
<crime>
really fascinating architecture, clean code most of the time unless you're reading tk junk
<crime>
documentation is p terrible, though
Alina-malina has joined #ruby
Limix has quit [Quit: Limix]
Rodya_ has joined #ruby
step1step2 has quit [Read error: Connection reset by peer]
jwaldrip has quit [Quit: Be back later ...]
eminencehc has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
Wompy has joined #ruby
colstrom_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MyMind has joined #ruby
baweaver has quit [Remote host closed the connection]
Wompy has quit [Client Quit]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
p0wn3d has quit [Ping timeout: 250 seconds]
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
millerti has joined #ruby
Sembei has quit [Ping timeout: 255 seconds]
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
eminencehc has quit [Ping timeout: 240 seconds]
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
elaptics` is now known as elaptics`away
_blizzy_ has joined #ruby
jgt1 has joined #ruby
felixrsmith has quit [Quit: Konversation terminated!]
<zenspider>
!ban _blizzy_ !T 1d please fix your connection
_blizzy_ was banned on #ruby by ChanServ [_blizzy_!*@*]
_blizzy_ was kicked from #ruby by ChanServ [Banned: please fix your connection]
jessemcgilallen has quit [Quit: jessemcgilallen]
eminencehc has joined #ruby
alcipir has joined #ruby
<zenspider>
!unban _blizzy_
solocshaw1 has joined #ruby
jgt has quit [Ping timeout: 272 seconds]
Pupeno has quit [Remote host closed the connection]
Contigi has quit [Read error: Connection reset by peer]
bryanray has joined #ruby
<crime>
it passes the tests, but it still takes too long to run somehow. I'm able to run even large numbers in subsecond time, and they are taking more than 6000ms to test 4 numbers each under 10000
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Asher has joined #ruby
<ruby-newb>
thank you ruboto
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-newb>
I call the initialize method on the class just once in my initializors folder
<ruby-newb>
It appears my events are getting listened to (logged) twice though
<Ox0dea>
ruby-newb: The actual #initialize method on the singleton class, not #new on the class itself, yes?
<ruby-newb>
yes
<Ox0dea>
How come?
<ruby-newb>
How come what?
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sl33k has joined #ruby
hahuang65 has quit [Ping timeout: 256 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
I guess I'm just wondering why you chose the most confusing name possible.
<ruby-newb>
Well, I wrote this when I was first learning ruby, so I didn't think much of it
<ruby-newb>
The name does make sense, all confusion aside
Igorshp has quit [Remote host closed the connection]
bruno- has joined #ruby
ibouvousaime has quit [Ping timeout: 260 seconds]
<ruby-newb>
I suppose I'll change it, but was just wondering if have picked that name could explain for why the listeners appear to be getting initialized twie
<ruby-newb>
twice*
bruno- is now known as Guest29198
sanjoseninja has joined #ruby
pullcheezy has joined #ruby
<Ox0dea>
ruby-newb: Co-opting #initialize for your own purposes is confusing, and it may well indeed explain the strange behavior you're seeing.
moeabdol has joined #ruby
favadi has joined #ruby
<Ox0dea>
It'd be easy enough to debug-print `caller` to determine whence you're being invoked a second time.
zenguy_pc has joined #ruby
Guest29198 has quit [Ping timeout: 240 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenguy_pc has quit [Read error: Connection reset by peer]
p0wn3d has quit [Ping timeout: 264 seconds]
EllisTAA has quit [Quit: EllisTAA]
dfinninger has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
darkf has joined #ruby
darkf has quit [Changing host]
darkf has joined #ruby
sanjoseninja has left #ruby ["Leaving"]
pullcheezy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
slawrence00 has joined #ruby
ryba has joined #ruby
konrath has quit [Quit: Leaving]
wldcordeiro has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
sl33k: toolbox also includes some metrics in its overview which can help with the decision.
<apeiros>
but generally, there's no guarantees.
TomyWork has joined #ruby
<sl33k>
truth be told, i know this friend from Java world...either way I'll rather use a Hibernate or Spring library than his code. Why? I have assurance of continuality maintenance from last two than some individual
astrobunny has joined #ruby
<ljarvis>
yeah unfortuantely that's hardly guarenteed, it's a price you have to pay and a chance you have to take
leafybasil has quit [Ping timeout: 240 seconds]
agent_white has quit [Quit: leaving]
agent_white has joined #ruby
<ljarvis>
i wish i had moretime for oss at the moment :( *still* no internet in the new place even after 5 weeks
<apeiros>
oh wow, that's fucked
<sl33k>
thanks for toolbox link...looks better
Guest41644 has quit [Ping timeout: 265 seconds]
<ljarvis>
yeah, been working at family/friends/coffee shops :(
<sl33k>
ljarvis: i hope to start doing OSS earlu y next year
<ljarvis>
sl33k: great!
ruurd has quit [Quit: ZZZzzz…]
<sl33k>
just a lot of stuff to take in first >-<
HakN96 has quit [Quit: Peace!]
calleerlandsson has quit []
aufi has joined #ruby
last_staff has joined #ruby
colegatron has joined #ruby
<colegatron>
good morning
AxonetBE has joined #ruby
froginvasion has joined #ruby
<froginvasion>
hello folks
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
skade has joined #ruby
Peg-leg has joined #ruby
duncannz has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
jonnie has quit [Ping timeout: 264 seconds]
zotherstupidguy has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Ping timeout: 252 seconds]
troulouliou_div2 has joined #ruby
norc has joined #ruby
bruce_lee2 has quit [Changing host]
bruce_lee2 has joined #ruby
bruce_lee2 is now known as bruce_lee
<norc>
Is there a way to specify a quantifier for a regex group before the group?
<norc>
I just feel like it decreases readability so much to have this at the end.
blaxter has joined #ruby
<apeiros>
norc: no
<apeiros>
quantifier comes after the quantified element
<apeiros>
you'd have to write your own engine, or a "transpiler" (yay, buzzword!)
rshetty_ has joined #ruby
govg has quit [Ping timeout: 240 seconds]
<norc>
apeiros: Fair enough. I mean with your tip from yesterday regarding /x it is not such a big deal, because with good indention and commenting I can work with it.
jgt1 has joined #ruby
Pupeno has joined #ruby
sl33k has quit [Quit: sl33k]
pandaant has joined #ruby
jgt1 has quit [Ping timeout: 252 seconds]
<froginvasion>
norc, just wondering but why do you want this besides readability? I think it's unavoidable that regexes are already unreadable either way
kimegede has joined #ruby
<froginvasion>
not "unreadable", but as in a sense, you need to 'parse' it with your mind in order to make sense of it
rshetty_ has quit [Remote host closed the connection]
rshetty has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
<apeiros>
for the amount of information a regex contains, I find them actually quite readable
sdwrage has quit [Quit: This computer has gone to sleep]
yfeldblum has joined #ruby
<apeiros>
I've seen tries of more readable expression engines and the result was not pretty (stuff like "3 times 'x', 3-5 times 'z'")
<apeiros>
I mean they looked nice for tiny expressions. but anything reasonably complex simply exploded.
<norc>
Honestly anything that approaches complex is often easier handled with a proper parser.
<apeiros>
honestly, you're wrong ;-)
<norc>
Possibly. :)
<norc>
I have just seen Perl programs. So maybe Im just branded in a bad way here.
<apeiros>
I mean yes, there's cases where people try with insanely complex regex where I'd agree a proper parser would probably be better.
<norc>
apeiros: So it comes down to what you and I consider "complex" :)
<apeiros>
but parsers are complex themselves too and come with their own set of problems.
<apeiros>
regex have the advantage of being rather compact, which gives you a large amount of locality. that helps a lot with understanding what's going on.
big|bad|wolf has joined #ruby
Motoservo has joined #ruby
trosborn has joined #ruby
hfp_work has quit [Ping timeout: 240 seconds]
lipoqil has joined #ruby
m3_del has joined #ruby
solars has joined #ruby
<apeiros>
one of my largest regexen is for email validation, covering most of email address BNF (deliberately left some stuff out because I don't want that to be valid - like multiline addresses).
yfeldblum has quit [Ping timeout: 260 seconds]
<apeiros>
you could write that with a parser
<apeiros>
but I think it'd be a *lot* more pain.
hfp_work has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
<norc>
apeiros: But yeah, this is not what I meant when I said complex. :)
<apeiros>
the domain part btw. is [^@] because there's a separate test for that
<norc>
Gotcha. It is an interesting example to look at though.
troulouliou_div2 has joined #ruby
<adaedra>
Hi
<norc>
But it shows that what I have been doing yesterday (splitting my regex into the smallest parts, and interpolating them into the next logical bits again) was not wrong. :)
<apeiros>
yes, IME that's quite a successful strategy.
unclouded has quit [Read error: No route to host]
<apeiros>
it also allows testing the small chunks individually.
Pupeno has quit [Remote host closed the connection]
trosborn has quit [Quit: trosborn]
mikecmpbll has joined #ruby
workmad3 has joined #ruby
mark2 has joined #ruby
CrazyEddy has joined #ruby
<norc>
apeiros: Yeah. Definitely beats http://pastie.org/10510639 (that is what AddrSpec apparently yields after all interpolations)
<apeiros>
granted, if you wrote it by hand, you'd probably drop all the (?:-imx…) parts
joonty has joined #ruby
marr has joined #ruby
<apeiros>
*sob*, rugged docs wrong, or I can't read.
cwong_on_irc has quit [Quit: Leaving.]
Pupeno has joined #ruby
Pupeno has joined #ruby
benhuda has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
ibouvousaime has joined #ruby
CrazyEddy has quit [Ping timeout: 265 seconds]
elaptics`away is now known as elaptics`
elaptics` is now known as elaptics
Azure has quit [Ping timeout: 260 seconds]
yashinbasement has joined #ruby
jonnie has joined #ruby
stan has joined #ruby
techsethi has joined #ruby
zipace has joined #ruby
zipace has quit [Changing host]
zipace has joined #ruby
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
big|bad|wolf has joined #ruby
DrCode has quit [Ping timeout: 244 seconds]
big|bad|wolf has quit [Client Quit]
vigintas has joined #ruby
_joes__ has quit [Ping timeout: 240 seconds]
chthon has joined #ruby
Motoservo has joined #ruby
_joes__ has joined #ruby
Hounddog has joined #ruby
rbowlby has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 260 seconds]
hmsimha_ has quit [Ping timeout: 265 seconds]
mbrownes has joined #ruby
yardenbar has joined #ruby
TomyWork has joined #ruby
Hounddog has quit [Ping timeout: 240 seconds]
Motoservo has quit [Ping timeout: 268 seconds]
bonemind has joined #ruby
subscope has joined #ruby
Hounddog has joined #ruby
<mbrownes>
Hi there! I'm new to ruby and I'm working on a small project where I'm building a connect four clone for in the terminal. I was thinking of using (n)curses to make the UI more usable. My question is: would this be to hard for a beginner and which curses library would you recommend?
<mbrownes>
I see that the original stdlib library has gone stale
<mbrownes>
is it stale good to use?
<mbrownes>
stil*
nfk|laptop has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
quazimodo has joined #ruby
bnizzle has quit [Read error: Connection reset by peer]
<caliostro>
i can found a lot of tutorial on ruby and tcl tk integration
gizless has joined #ruby
<mbrownes>
I'm not necessarily looking for a full on GUI solution, I still want the program to run in the terminal
<mbrownes>
Thanks though
bnizzle has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
Archyme_ has joined #ruby
<caliostro>
Look for this book, "Build Awesome Command-Line Applications in Ruby"
<caliostro>
You will go deep into writing ruby command line application, using OptionParser and Gli
lkba has quit [Ping timeout: 244 seconds]
karapetyan has quit [Remote host closed the connection]
<oddmunds>
mbrownes: i've used ncurses
<oddmunds>
it was some years ago, but the libraries were abandoned and outdated
yfeldblum has joined #ruby
<mbrownes>
did you use a ruby wrapper or the native library?
jgt1 has joined #ruby
tolo123 has joined #ruby
tolo123 has left #ruby [#ruby]
krz has quit [Read error: Connection reset by peer]
<mbrownes>
yeah curses still has some commits from this year
Voker57 has joined #ruby
krz has joined #ruby
Timba-as has joined #ruby
m3_del has joined #ruby
foooobear has quit [Quit: (null)]
Motoservo has joined #ruby
karapetyan has joined #ruby
dmolina has joined #ruby
radgeRayden has quit [Quit: Leaving]
m3_del has quit [Ping timeout: 268 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
Motoservo has quit [Ping timeout: 240 seconds]
beauby has joined #ruby
jimms has joined #ruby
dikaio has joined #ruby
yardenbar has joined #ruby
niemcu has joined #ruby
jgt1 has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
<caliostro>
what is the advantage of using Fiber over Thread ?
rodfersou has joined #ruby
<apeiros>
that question makes as much sense as asking "what's the advantage of eating an apple over a pear?"
<apeiros>
fibers and threads are different. which one you should use depends on what you want to do.
<ljarvis>
well.. the shape of the apple makes me feel more comfortable, pears are insane
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has joined #ruby
<apeiros>
the main difference is that threads are preemptive and fibers are cooperative
leafybasil has joined #ruby
<ljarvis>
and apples are tastier
<apeiros>
ljarvis: lies!
<ljarvis>
:O
leafybasil has quit [Remote host closed the connection]
<ljarvis>
sacrilege
<apeiros>
actually I don't even know.
<apeiros>
don't remember when I last ate a pear.
<ljarvis>
same tbh
Guest987 has quit [Ping timeout: 240 seconds]
<ljarvis>
but i eat apples, so logic
leafybasil has joined #ruby
<apeiros>
hm, nice. just realized that this test app doesn't need to use rails. at all. so plain gem. yay :D
<ljarvis>
that's what you call success
<caliostro>
i understand
<apeiros>
and finally finished one part of my git tool - I can now check whether an acceptance branch contains commits which are "problematic" (read: not coming from another branch, not just a merge commit, and change something else than just Gemfile & Gemfile.lock)
<caliostro>
i am new to this concept, i've never found it in othere languages , os ,...
quazimodo has joined #ruby
foooobear has joined #ruby
yfeldblum has joined #ruby
Musashi007 has joined #ruby
<apeiros>
caliostro: quite a couple of languages implement concurrency in one way or the other. and your OS certainly does.
<apeiros>
though, php and javascript don't.
favadi has joined #ruby
<apeiros>
(unless you count webworkers, but I'd like to pretend that webworkers don't exist)
<adaedra>
pear > apple
favadi has quit [Max SendQ exceeded]
<adaedra>
(and I'd like to pretend PHP don't exist)
jgt1 has quit [Ping timeout: 272 seconds]
benlovell has quit [Ping timeout: 246 seconds]
yardenbar has quit [Ping timeout: 250 seconds]
akem has joined #ruby
blue_deref has quit [Quit: bbn]
<apeiros>
oh how I'd like to be able to pretend php doesn't exist…
<apeiros>
luckily it only resurfaces only every now and then anymore.
<norc>
adaedra: JS has some form of concurrency tho in form of the event queues
<apeiros>
norc: nope. all concurrency happens outside of js.
tkuchiki_ has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
<apeiros>
there's no way to concurrently run *js code*. (insert webworker comment)
Rickmasta has joined #ruby
trautwein has quit [Ping timeout: 272 seconds]
Bloomer has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ruby
Musashi007 has quit [Quit: Musashi007]
sameerynho has joined #ruby
Olipro_ has joined #ruby
Olipro_ is now known as Guest37565
yardenbar has joined #ruby
colegatron has quit [Ping timeout: 268 seconds]
Musashi007 has joined #ruby
astrobunny has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
astrobunny has joined #ruby
bruno- is now known as Guest44110
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ibouvousaime_ has joined #ruby
ibouvousaime has quit [Ping timeout: 268 seconds]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gregoriokusowski has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
<norc>
apeiros: I just meant stuff like XHR (granted, it is just a simple form of cooperative multitasking) - so there is *some* concurrency at least. :)
<apeiros>
norc: but XHR is not javascript code running concurrently.
krisquigley has joined #ruby
sgambino has joined #ruby
<norc>
Yeah.
tkuchiki_ has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
Pathfinder has joined #ruby
jimms has quit [Remote host closed the connection]
<norc>
The pain you get for real concurrency with shared resources is immense though.
<apeiros>
but you could implement an event system like what js uses with fibers quite easily (I once did with threads, then realized I could have just used fibers - so stupid)
<norc>
Doesnt Ruby have a GIL in the MRI to prevent real parallelism?
<workmad3>
norc: it prevents more than 1 thread being active at once... you could still have parallelism at a higher system level by having multiple ruby processes
<norc>
workmad3: I think the only instance where you can actually interrupt code is through some immediate events which need to get processed immediately.
subscope has joined #ruby
<workmad3>
norc: concurrency doesn't require interruptible code... it just means two 'things' can be ongoing at once, e.g. while one 'thing' is waiting for an ajax response, another 'thing' could be responding to an event
Coldblackice has quit [Ping timeout: 252 seconds]
ibouvousaime has joined #ruby
davedev24 has joined #ruby
Motoservo has joined #ruby
colegatron has joined #ruby
l_tonz has quit [Ping timeout: 240 seconds]
<apeiros>
workmad3: no, JS can't even be concurrent.
<yorickpeterse>
norc: a GIL prevents in-process parallelism
ibouvousaime_ has quit [Read error: Connection reset by peer]
<apeiros>
a mistake surprisingly many people make
<workmad3>
apeiros: so you're saying than you can never have an ajax request waiting while other events happen?
<apeiros>
you can offload work to an external party which probably even does it in parallel
<apeiros>
workmad3: no, I say ajax is not *js code* being concurrently run
<apeiros>
it's work offloaded to an external party. outside your js runtime.
subscope has quit [Client Quit]
astrobunny has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 260 seconds]
<apeiros>
and the response has to wait for the JS runtime to signal the ability to process it (i.e., no code running anymore)
astrobunny has joined #ruby
<norc>
apeiros has a point here. ajax does just a call to the XMLHttpRequest API of the browser. When its done, the browser then inserts an event into the JS event queue
<workmad3>
hmm... I'd still argue that semantically, that's concurrency in your JS app, because conceptually your JS code is waiting on the response to an ajax request (so things are progressing there) while other things can occur
<workmad3>
but I'm not particularly invested in that view, so feel free to knock it down ;)
Motoservo has quit [Ping timeout: 250 seconds]
<apeiros>
workmad3: given that a JS usually consists of more than JS, I'd agree. but JS itself is not capable of concurrency.
<apeiros>
i.e. *js app* is concurrent. *js code* is not.
<workmad3>
apeiros: ah, there's the difference... I see concurrency as a property of a system, not at the code level :)
<apeiros>
in that case, anything which can be embedded can be concurrent.
<apeiros>
which makes the distinction somewhat pointless IMO :)
Igorshp has quit [Remote host closed the connection]
jwaldrip has joined #ruby
karapetyan has joined #ruby
<workmad3>
apeiros: I'm not sure which distinction you're referring to there
Igorshp has joined #ruby
ldnunes has joined #ruby
metalic has joined #ruby
blaxter has quit [Quit: foo]
jwaldrip has quit [Ping timeout: 240 seconds]
Renich has quit [Quit: leaving]
karapetyan has quit [Ping timeout: 244 seconds]
hfp_work has quit [Ping timeout: 272 seconds]
hfp__work has joined #ruby
Azure has joined #ruby
m3_del has joined #ruby
hfp__work is now known as hfp_work
pard has joined #ruby
<pard>
greet
agent_white has quit [Quit: Lost terminal]
<froginvasion>
apeiros, of course you can make 'concurrent' requests, or so they will appear to be. JS works with an event-loop-model
agent_white has joined #ruby
davedev2_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pard>
in 2.0, this won't work def _l(l,L) print l, L end _l /l/, 12
gregf has quit [Quit: WeeChat 1.3]
tesuji_ has joined #ruby
<pard>
i'm not sure why
<pard>
because it actually works in the prev versoins
m3_del has quit [Ping timeout: 260 seconds]
dhjondoh has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
<pard>
am i maybe doing sth in a wrong way?
davedev24 has quit [Ping timeout: 240 seconds]
<workmad3>
pard: 'SyntaxError: (irb):1: formal argument cannot be a constant' <-- seems pretty clear why they finally got around to disallowing it
<pard>
oh thanks
govg has joined #ruby
<pard>
i'm not sure though as why this won't work too def l_(l,_l) print l, _l end l_ /l/, 12
stamina has joined #ruby
<workmad3>
pard: needs a ; to terminate the def statement
<ruboto>
workmad3 # => /tmp/execpad-bb49f54954f6/source-bb49f54954f6:2: syntax error, unexpected tIDENTIFIER, expecting kEN ...check link for more (https://eval.in/457697)
<norc>
workmad3: Which ambiguity does that help solving though?
<workmad3>
norc: statements need either a newline or a ; to terminate... def l_(l,_l) print l, _l end is a statement
minimalism has quit [Quit: leaving]
<norc>
Good point
RegulationD has joined #ruby
<norc>
Hopefully some day I might not be terrible at all of this. :(
astrobunny has quit [Remote host closed the connection]
syath has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Igorshp has quit [Remote host closed the connection]
beast has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
hmsimha_ has joined #ruby
RegulationD has joined #ruby
y0da has joined #ruby
Igorshp has joined #ruby
ruby-lang903 has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
d34th4ck3r has quit [Quit: zzz]
RegulationD has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
ledestin has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
vasilakisfil has joined #ruby
RegulationD has joined #ruby
ruurd has joined #ruby
<vasilakisfil>
hey! just wondering.. is there any performance/memory difference when you have defined a class inside another class vs a class inside a module ?
<vasilakisfil>
and instantiate the inner class of course
kerunaru has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zotherstupidguy has quit [Ping timeout: 252 seconds]
RegulationD has joined #ruby
ledestin has joined #ruby
Pathfinder has quit [Remote host closed the connection]
Jackneill has joined #ruby
allcentury has joined #ruby
<norc>
vasilakisfil: Use what makes more sense, and worry about performance after: a) you have written functional code, b) written tests, c) profiled, and d) deduced that this is a bottleneck.
tkuchiki has quit [Remote host closed the connection]
RegulationD has quit [Read error: Connection reset by peer]
mbrownes has quit [Quit: Leaving]
ruby-lang903 has quit [Ping timeout: 246 seconds]
<vasilakisfil>
Yeah that's what I do.. but I was just wondering..
RegulationD has joined #ruby
RegulationD has quit [Read error: No route to host]
RegulationD has joined #ruby
sepp2k has joined #ruby
dikaio has quit [Quit: ........]
RegulationD has quit [Read error: Connection reset by peer]
<norc>
vasilakisfil: From what I understand about the object model it should not make a difference either way though.
RegulationD has joined #ruby
pard has quit [Quit: Leaving]
Igorshp has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.2]
<norc>
vasilakisfil: To your question though: class Foo; end -- this creates a new Class, and adds a constant ("Foo") to the constant table of whatever "self" is in that context.
<norc>
(Someone correct me if Im wrong here)
<norc>
vasilakisfil: So based on your question, there is no difference.
RegulationD has quit [Ping timeout: 246 seconds]
Timba-as has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
Timba-as has joined #ruby
pard has joined #ruby
jonnie has quit [Ping timeout: 252 seconds]
<pard>
def l ( _12 ) print _12 end ; 5 / l 5
<pard>
what might be wrong?
<pard>
i mean
<pard>
why SyntaxError: (irb):2: syntax error, unexpected tINTEGER, expecting keyword_do or '{' or '('
* pard
is actually highly baffled
<adaedra>
I'm not even sure what this code is supposed to do.
<adaedra>
Also, give real names to your arguments. What is "_12" supposed to mean.
<pard>
norc, thanks but could not find list-op ;sir, as for what list-op means, in l 12, 12 l is a list-op
sdothum has joined #ruby
gregf has joined #ruby
<pard>
am i being a nitpicker?
<shevy>
and what is l 12, 12 l
<shevy>
looks like a palindrome to me
<pard>
shevy , i meant l 12, 12
<pard>
l is calld a list-op
<shevy>
ok that is l(12,12) right?
<pard>
yes sir
<shevy>
ok ma'am
<pard>
sorry
naztharune has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
<shevy>
well it's a method call
hughjass has joined #ruby
<shevy>
you are right, the tables don't mention rules for ()
<pard>
yes :\
subscope has joined #ruby
<pard>
i'm trying to unravel the reason sth lik 5 / l 5 won't work
<pard>
i have been told it is because / takes precedenc over list-op , so it actually becomes ( 5 - l ) 5
<norc>
pard: If you repeadedly refuse to read the answer you have been given already, Im not sure shevys response will help you.
<shevy>
pard how can it become ( 5 - l ) 5
<shevy>
where is the /
<shevy>
:D
<pard>
sorry i meant /
<norc>
shevy: Today I learned something bizarre.
<shevy>
hehe
<norc>
For real!
<shevy>
norc does it have something to do with cats?
<norc>
It can.
<shevy>
yay!
<shevy>
tell
solocshaw has joined #ruby
Cyther has joined #ruby
<norc>
>> def cats(a) end; cats(not true)
<ruboto>
norc # => /tmp/execpad-59afbbbc3b79/source-59afbbbc3b79:2: syntax error, unexpected keyword_true, expecting '( ...check link for more (https://eval.in/457745)
<norc>
I actually stared at this for a good minute, until someone here explained it to me.
The_Phoenix has quit [Quit: Leaving.]
<pard>
norc, by 'list-op' i mean an actuall op , not a list of op's, and i could not find it in the links i was given; my apologies though, i should have clarified it
CloCkWeRX has joined #ruby
<pard>
*actual
Pupp3tm4st3r has quit [Remote host closed the connection]
<norc>
pard: Have you tried looking for yourself?
<pard>
i did ; no avail :\
<pard>
looks like an anomaly
synthroid has joined #ruby
<norc>
pard: Well, given the data you have, Im sure you can quickly test that one case for yourself.
<pard>
i will :)
<pard>
thanks
<shevy>
norc right, I think someone here mentioned that once... eam probably, he is a parser-guru (in perl)
<pard>
>> def l(_e) _e end; print l 5, l 5
<ruboto>
pard # => /tmp/execpad-11ee811382a2/source-11ee811382a2:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/457753)
<norc>
shevy: You mean he wrote an LALR parser using nothing but regular expressions?
<shevy>
pard did we not start with that syntax error yesterday :D
benhuda has joined #ruby
<shevy>
norc I dunno... perhaps he did in the past when he was using perl. he is much older now, like larry wall's younger brother
agent_white has quit [Quit: brb]
<shevy>
ruby people tend to do extremely weird stuff when they are bored
agent_white has joined #ruby
<norc>
pard: If you really want to write unreadable code, I recommend you give perl a try. You will have much better success there. ;-)
<pard>
no ; it was the L.getInt /e/ - 5 thing (for which i was given an answr)
user083 has quit [Read error: Connection reset by peer]
* pard
is going to do a parser-on-chip, in SysC
thejoecarroll has joined #ruby
tak1n has joined #ruby
tak1n has quit [Quit: Leaving]
tak1n has joined #ruby
JammyHammy has quit [Read error: Connection reset by peer]
pard has quit [Quit: Leaving]
Motoservo has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
sdwrage has joined #ruby
user083 has joined #ruby
user083 has quit [Read error: Connection reset by peer]
stardiviner has joined #ruby
freerobby has quit [Client Quit]
odigity has joined #ruby
m3_del has joined #ruby
akem has quit [Read error: No route to host]
stannard has joined #ruby
akem has joined #ruby
jgt1 has joined #ruby
user083 has joined #ruby
user083 has quit [Read error: Connection reset by peer]
HayesHimself has joined #ruby
skinux has joined #ruby
m3_del has quit [Ping timeout: 265 seconds]
stannard has quit [Ping timeout: 240 seconds]
<skinux>
Anyone have issues installing gems because of SSL errors?
CloCkWeRX has joined #ruby
jaygen has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
dmitch has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
<jhass>
windows?
cwong_on_irc has joined #ruby
synthroid has quit []
quazimodo has joined #ruby
iamvery has quit [Quit: ZNC - 1.6.0 - http://znc.in]
cwong_on_irc has quit [Max SendQ exceeded]
<jhass>
skinux: ^
naftilos76 has quit [Ping timeout: 272 seconds]
cwong_on_irc has joined #ruby
<skinux>
Yes
<skinux>
10
<jhass>
gem -v?
cajone has joined #ruby
<skinux>
2.4.8
user083 has joined #ruby
Chaoborid has joined #ruby
<jhass>
mmh, weird
user083 has quit [Read error: Connection reset by peer]
<skinux>
?
<jhass>
well, then I don't know. The common problem there was an old rubygems versions with an outdated cert bundled
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
user083 has joined #ruby
Chaoborid has quit [Client Quit]
binaryplease has joined #ruby
akem2 has joined #ruby
akem has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
user083 has quit [Read error: Connection reset by peer]
techsethi has quit [Quit: techsethi]
Rickmasta has joined #ruby
joonty has joined #ruby
elaptics is now known as elaptics`away
iamvery has joined #ruby
basiles has joined #ruby
nzst has joined #ruby
rshetty_ has joined #ruby
<nzst>
Hi, I use rbenv and am working on an upgrade mechanism for ruby versions through puppet. I am wondering how I can check which ruby unicorn, rails and my gems are currently running under
benlovell has joined #ruby
rshetty_ has quit [Remote host closed the connection]
rbennacer has joined #ruby
rshetty_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
malconis has joined #ruby
<skinux>
I believe this is the gem it's trying to run rubygems-update-2.0.3.gem
malconis has quit [Remote host closed the connection]
user083 has joined #ruby
rshetty_ has quit [Remote host closed the connection]
shredding has joined #ruby
malconis has joined #ruby
<skinux>
Or install
allcentury has joined #ruby
user083 has quit [Read error: Connection reset by peer]
aswen has joined #ruby
RegulationD has joined #ruby
rshetty has quit [Ping timeout: 255 seconds]
<jhass>
skinux: how come?
mag42c has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
<skinux>
I don't know. The main goal is to install rails
<jhass>
nzst: not sure there's a way beyond /proc/<pid>/exe
RegulationD has joined #ruby
<jhass>
skinux: but what lead you to that assumption?
tvw has quit [Ping timeout: 264 seconds]
Fire-Dragon-DoL has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 250 seconds]
benlovell has joined #ruby
RegulationD has joined #ruby
skweek has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
jonnie has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
metalic has joined #ruby
`tim` has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
jimms has joined #ruby
jimms has quit [Read error: Connection reset by peer]
GnuYawk has quit [Ping timeout: 272 seconds]
diegoaguilar has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
Chaoborid has joined #ruby
jimms has joined #ruby
tkuchiki has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
Vile` has quit [Ping timeout: 265 seconds]
RegulationD has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
riotjones has quit [Remote host closed the connection]
RegulationD has joined #ruby
user083 has joined #ruby
cdg has joined #ruby
gambl0re has quit [Ping timeout: 255 seconds]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
user083 has quit [Read error: Connection reset by peer]
Vile` has joined #ruby
waxjar has quit [Remote host closed the connection]
odigity has quit [Ping timeout: 246 seconds]
tkuchiki has quit [Remote host closed the connection]
blackoperat has joined #ruby
rbennacer has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 250 seconds]
froginvasion has quit [Quit: Leaving]
tkuchiki has joined #ruby
basiles has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
everbot has quit [Ping timeout: 240 seconds]
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
rwilcox has joined #ruby
cdg has quit [Remote host closed the connection]
<arup_r>
atmosx: hi
blackoperat has quit [Client Quit]
pu22l3r has joined #ruby
cdg has joined #ruby
beauby has joined #ruby
Chaoborid has quit [Quit: WeeChat 1.3]
episage has joined #ruby
millerti has joined #ruby
Chaoborid has joined #ruby
Rinzlit has joined #ruby
Motoservo has joined #ruby
NeverDie has joined #ruby
RobertBirnie has joined #ruby
Xeago has joined #ruby
millerti has quit [Max SendQ exceeded]
user083 has joined #ruby
jonnie has joined #ruby
user083 has quit [Read error: Connection reset by peer]
NeverDie has quit [Client Quit]
platzhirsch has joined #ruby
Rinzlit_ has quit [Ping timeout: 246 seconds]
beauby has quit [Ping timeout: 265 seconds]
Motoservo has quit [Ping timeout: 240 seconds]
sgambino has joined #ruby
RobertBirnie has quit [Ping timeout: 256 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pwnd_nfsw has quit [Quit: Leaving]
astrobunny has quit [Remote host closed the connection]
govg has joined #ruby
RobertBirnie has joined #ruby
odigity has joined #ruby
inteq has quit [Remote host closed the connection]
dhjondoh has quit [Ping timeout: 264 seconds]
user083 has joined #ruby
user083 has quit [Read error: Connection reset by peer]
centrx has joined #ruby
dhjondoh has joined #ruby
lkba has joined #ruby
lkba_ has joined #ruby
decoponio has joined #ruby
iceden has quit [Ping timeout: 256 seconds]
sankaber has joined #ruby
beauby has joined #ruby
basiles has joined #ruby
RegulationD has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has joined #ruby
verdoc has quit [Ping timeout: 240 seconds]
user083 has joined #ruby
sankaber has quit [Remote host closed the connection]
stannard has joined #ruby
sankaber has joined #ruby
nfk has joined #ruby
user083 has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 250 seconds]
edenc has joined #ruby
Bloomer has joined #ruby
Guest53 has joined #ruby
m3_del has joined #ruby
<izzol>
there is anything else then nokogiri for parsing HTML page?
verdoc has joined #ruby
<izzol>
I'm tired to fighting with nokogiri installation process.
nemo__ has quit [Remote host closed the connection]
<havenwood>
izzol: Oga
mag42c has quit [Quit: mag42c]
solocshaw has quit [Ping timeout: 240 seconds]
<izzol>
Successfully installed oga-1.3.1
<izzol>
finally :-)
<izzol>
havenwood: thanks, I'm going to try it.
InternetFriend has joined #ruby
InternetFriend has quit [Client Quit]
Guest53 has quit [Client Quit]
akem2 has quit [Remote host closed the connection]
<marahin>
it has been pointed out that I might not "translate" from gzip format, I'm not really sure how to implement that then...
joncol has joined #ruby
Guest44110 has quit [Ping timeout: 268 seconds]
basiles has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hughjasss>
\x1f\x8b you gettin gzip
ibouvousaime has quit [Ping timeout: 264 seconds]
jonnie has quit [Quit: leaving]
Aswebb_ has joined #ruby
tk__ has quit [Quit: ばいばい]
<joncol>
Are there any EventMachine users here?
<hughjasss>
marahin if you accessing an api have a look at how the response needs to come back in doco
hanmac has quit [Ping timeout: 246 seconds]
<marahin>
hughjasss: can you point me in some direction? I don't really get what you just said
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ibouvousaime has joined #ruby
Dar has joined #ruby
kalusn has joined #ruby
<hughjasss>
marahin give me 5 seconds ill load it up
<marahin>
hughjasss: thank you very much
jwaldrip has joined #ruby
doublemalt_ has joined #ruby
dopamean_ has quit [Ping timeout: 246 seconds]
Guest53 has joined #ruby
chorgi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user083 has joined #ruby
jwaldrip has quit [Read error: Connection reset by peer]
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
failshell has joined #ruby
umgrosscol has joined #ruby
Pupp3tm4st3r has joined #ruby
jwaldrip has joined #ruby
Chaoborid has quit [Quit: WeeChat 1.1.1]
wldcordeiro has joined #ruby
Chaoborid has joined #ruby
user083 has quit [Read error: Connection reset by peer]
dhjondoh has joined #ruby
Chaoborid has quit [Client Quit]
lkba_ has quit [Ping timeout: 268 seconds]
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
joncol has quit [Quit: leaving]
jobewan has joined #ruby
Pupp3tm4st3r has joined #ruby
<hughjasss>
marahin is this api publically accessable?
NeverDie has joined #ruby
<marahin>
hell, I think so?
<hughjasss>
no keys needed?
nzst has quit [Remote host closed the connection]
DoubleMalt has quit [Ping timeout: 260 seconds]
<marahin>
let me check, maybe it's my browser's session that allows me to access it
nzst has joined #ruby
riotjones has joined #ruby
<hughjasss>
im getting []
chorgi has joined #ruby
dhjondoh has quit [Client Quit]
<marahin>
hughjasss: indeed I just noticed it, when I create a new browser session it responses with "[]"
<hughjasss>
my guess is its a private/protected api and you need to pass over an access key in the headers or similar
<marahin>
i logged in steamcommunity.com, however I am currently logged off - I guess session stores something that still allows you to access API but doesnt keep you logged in
tesuji_ has quit [Read error: Connection reset by peer]
<marahin>
huh
codecop has quit [Remote host closed the connection]
<marahin>
hughjasss: well shouldn't I be available to look up the access key from chrome devtools?
<hughjasss>
not necessarily
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hughjasss>
it depends how the api is secured
mary5030 has joined #ruby
chorgi has quit [Max SendQ exceeded]
jwaldrip has quit [Ping timeout: 272 seconds]
<hughjasss>
my suggestions are to get a api client like postman and play around in it then convert it ruby code once you understand it better
dopieee has joined #ruby
Igorshp has quit [Remote host closed the connection]
JDiPierro has joined #ruby
jimms has quit []
mary5030 has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 244 seconds]
kerunaru has quit [Read error: No route to host]
metalic has joined #ruby
episage has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
Xiti has quit [Quit: Xiti]
krz has joined #ruby
nzst has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
sonOfRa has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
user083 has joined #ruby
hanmac has joined #ruby
user083 has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
ta has quit [Remote host closed the connection]
sonOfRa has joined #ruby
A124 has quit [Ping timeout: 268 seconds]
shinenelson has quit [Quit: Connection closed for inactivity]
kimegede has quit [Quit: Leaving...]
rbennacer has joined #ruby
binaryplease has quit [Ping timeout: 252 seconds]
A124 has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
user083 has joined #ruby
user083 has quit [Read error: Connection reset by peer]
gusTester has joined #ruby
axl_ has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
Xiti has joined #ruby
kirun_ has joined #ruby
kirun_ has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 246 seconds]
jwaldrip has joined #ruby
Alayde has joined #ruby
dopamean_ has joined #ruby
kirun has quit [Ping timeout: 264 seconds]
monsieurp has quit [Ping timeout: 255 seconds]
but3k4 has quit [Ping timeout: 244 seconds]
but3k4 has joined #ruby
freerobby has joined #ruby
jessemcgilallen has joined #ruby
GhettoCode has joined #ruby
dravine has quit [Ping timeout: 246 seconds]
Dar has quit [Ping timeout: 246 seconds]
GhettoCode has quit [Client Quit]
bonemind has quit [Quit: WeeChat 1.0]
Alayde has quit [Client Quit]
kerunaru has joined #ruby
Alayde has joined #ruby
slawrence00 has joined #ruby
rshetty has joined #ruby
bonemind has joined #ruby
mag42c has quit [Quit: mag42c]
agent_white has quit [Remote host closed the connection]
dravine has joined #ruby
rodfersou is now known as rodfersou|lunch
gregf has joined #ruby
Rollabunna has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rshetty has quit [Remote host closed the connection]
Rollabunna has joined #ruby
BTRE has quit [Quit: Leaving]
user083 has joined #ruby
rshetty has joined #ruby
user083 has quit [Read error: Connection reset by peer]
doublemalt_ has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user083 has joined #ruby
user083 has quit [Read error: Connection reset by peer]
ibouvousaime_ has joined #ruby
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Client Quit]
joncol has joined #ruby
Wompy has joined #ruby
musicmatze has joined #ruby
mag42c has joined #ruby
<joncol>
Is there any recommended way of defining in-place an object with a specific method `update`? Something like a local lambda only used for one thing? I could do `Class.new { def update; ...; end }.new` but that doesn't look very nice.
user083 has joined #ruby
freerobby has quit [Quit: Leaving.]
user083 has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
ef__ has joined #ruby
rodfersou has joined #ruby
<joncol>
Maybe I cannot even declare a class in a function...
chopin has joined #ruby
crime has quit [Quit: Connection closed for inactivity]
<yorickpeterse>
god these Postgres people really think of everything
<yorickpeterse>
I wonder if Pg can also do my laundry
norc has quit [Ping timeout: 246 seconds]
swgillespie has joined #ruby
joncol has quit [Quit: leaving]
swgillespie has quit [Client Quit]
<workmad3>
yorickpeterse: I think that's on the roadmap for 9.7
<yorickpeterse>
create extension pg_laundry;
lkba has joined #ruby
snockerton has joined #ruby
ruurd has joined #ruby
Igorshp has quit [Remote host closed the connection]
vr_mex has quit [Quit: vr_mex]
wldcordeiro has quit [Ping timeout: 250 seconds]
asad_ has joined #ruby
gusTester has left #ruby [#ruby]
dopieee has joined #ruby
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
<asad_>
How do keyword arugments work? Does ruby take a hash and create local variables with the same name as hash keys?
Igorshp has joined #ruby
Timba-as_ has joined #ruby
Motoservo has joined #ruby
<yorickpeterse>
Local variables are basically "indexes" so to speak
<yorickpeterse>
So for example
<yorickpeterse>
def some_method(foo); foo; end
<yorickpeterse>
could basically be replaced with
<yorickpeterse>
def some_method(0); 0; end
<yorickpeterse>
IIRC keyword arguments map to local variables in a similar way, though MRI does use a Hash internall to store the keyword arguments
<yorickpeterse>
* internal
tomeara has joined #ruby
ESpiney has joined #ruby
roger_rabbit has joined #ruby
tomeara has quit [Client Quit]
<asad_>
when passing keyword args, we're actually passing a hash right?
beauby has quit [Ping timeout: 250 seconds]
Timba-as__ has joined #ruby
<yorickpeterse>
Don't fully remember how MRI implemented it from the top of my head
<Ox0dea>
asad_: Essentially, yes, but not technically.
<asad_>
Ox0dea: Is there a good article online on how keyword args work technically?
Timba-as has quit [Ping timeout: 264 seconds]
<asad_>
Ox0dea: I couldn't find anything.
<Ox0dea>
asad_: The source is authoritative.
skade has joined #ruby
Timba-as_ has quit [Ping timeout: 240 seconds]
ReK2 has joined #ruby
willardg has joined #ruby
<Ox0dea>
asad_: For YARV, they are indeed parsed and converted to the internal hash structure, and from there "injected" into the local variable table, more or less.
northfurr has joined #ruby
NeverDie has joined #ruby
towski_ has quit [Remote host closed the connection]
K1MOS has joined #ruby
emilkarl has quit [Quit: emilkarl]
<asad_>
Ox0dea: What about the default keyword args in a method definition? Does ruby internally create local variables with those values initially?
<Ox0dea>
asad_: Yes.
<asad_>
Ox0dea: The default args in a method definition look like a hash. Is it a hash?
<Ox0dea>
asad_: It's not a Hash at the "Ruby level" at the time you define the method, but it so very quickly becomes one under the hood that the distinction is of little consequence.
<Ox0dea>
This "problem" is also present for the Gem::Specification class, but it at least returns `false` rather than looping forever looking for a module in the primes.
max_Q_ has quit [Ping timeout: 268 seconds]
BSaboia has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
based_pdev has quit [Read error: Connection reset by peer]
based_pdev has joined #ruby
mrtomme has quit [Ping timeout: 260 seconds]
eminencehc has quit [Remote host closed the connection]
<shevy>
is .include? not a general method?
ibouvousaime_ has quit [Quit: Leaving]
Xeago has joined #ruby
<Ox0dea>
It's an instance method on Class and Enumerable.
ftj has joined #ruby
<Ox0dea>
s/Class/Module/, technically.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky__ has joined #ruby
eminencehc has joined #ruby
<Ox0dea>
Prime and Gem::Specification both have Enumerable mixed into their singleton classes, which makes for this unfortunate ambiguity.
mrtomme has joined #ruby
colegatron has quit [Read error: Connection reset by peer]
<Ox0dea>
`Prime.include?(Enumerable)` "should" be true, but so should `Prime.include?(17)`.
<Ox0dea>
Only the latter is the case at present.
pullcheezy has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
jordanm has quit [Quit: Konversation terminated!]
RobertBirnie has joined #ruby
jordanm has joined #ruby
towski_ has joined #ruby
tak1n has joined #ruby
kirun has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
niemcu has joined #ruby
govg has quit [Ping timeout: 246 seconds]
HayesHimself has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
thun has joined #ruby
corpsicle has left #ruby [#ruby]
<shevy>
hah epic contradiction
<shevy>
I guess it won't do your laundry after all
<thun>
If have a file hashes.rb with a simple hash declared in it (not in a class) and I include it with require './hashes.rb' How do I access the hashes declared in hashes.rb?
denver has joined #ruby
<thun>
Is it possible?
<shevy>
a coding thuna!
Pumukel has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
<shevy>
thun several ways; a very simple and primitive one is to make your hash a constant like HASH = {}
<thun>
shevy: It's a config file used in another project. Was trying to just quickly parse out some of the hashes.
<shevy>
a better way for longevity of code is to namespace everything; put it into a module or class, use @ there even on the module/class level, use class/module methods to access/manipulate it (or also put it into a hash constant residing in your main namespace)
p0wn3d__ has joined #ruby
<thun>
Can I get access to those variables without changing the original hashes.rb?
<Ox0dea>
thun: Are they local variables?
<shevy>
you can also use $hash which is a sure sign that you did not know of alternatives
<mg^>
filthy dollars
<shevy>
hah
<shevy>
we chould propose ? for global variables in ruby
SCHAAP137 has quit [Remote host closed the connection]
<mg^>
No, I've done way worse than that
Xeago has quit [Remote host closed the connection]
troulouliou_div2 has quit [Ping timeout: 252 seconds]
<mg^>
I made a singleton class called Global that uses method_missing and a mutex to hold universally accessible things
<Ox0dea>
(Don't.)
tkuchiki has quit [Ping timeout: 246 seconds]
<shevy>
mg^ I like the name Global
Alayde has left #ruby ["WeeChat 1.1.1"]
troulouliou_div2 has joined #ruby
<mg^>
So I can do things like Global.foo = "foo" and then access Global.foo later in another thread...
<shevy>
thun this is a cool line here: require '.\hashes.rb'
<thun>
Ty ;)
<thun>
lol
eminencehc has quit [Remote host closed the connection]
solars has quit [Ping timeout: 264 seconds]
Motoservo has joined #ruby
eminencehc has joined #ruby
binaryplease has quit [Ping timeout: 272 seconds]
benlovell has quit [Ping timeout: 240 seconds]
rbennacer has joined #ruby
<thun>
Ox0dea: How do you mean? I am looking for a quick hack
<Ox0dea>
thun: Reconsider.
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlovel1 has quit [Ping timeout: 256 seconds]
<thun>
This is a piece of throwaway code, I did not write 'hashes.rb' and can not change it
<thun>
But I need to programmatically loop over the hashes
n008f4g_ has joined #ruby
<mg^>
Is this homework, by chance?
<thun>
No
<thun>
I am moving a bunch of variables to another app and might have to do it every now and then.
niemcu has quit [Ping timeout: 256 seconds]
<Ox0dea>
> This is a piece of throwaway code
<thun>
Yes... it is middleman code to generate other code
aspiers has quit [Ping timeout: 260 seconds]
<thun>
But if somone changes the original hashes I will have to re-run
maletor has joined #ruby
<Ox0dea>
"Someone"?
<thun>
Lol yes
<Ox0dea>
Who is "someone" in this context?
<mg^>
Ok so you've got this hashes.rb that someone else writes. You need to get at the contents of that, take the data stored in the hashes, at put it somewhere else. That's a correct summary?
<thun>
mg^ Ys
<thun>
*Yes
<thun>
I do not maintain hashes.rb
<Ox0dea>
`eval(File.read('hashes.rb'))`, and may the fates frown upon you.
<thun>
Lol perfect ty...
troulouliou_div2 has quit [Ping timeout: 265 seconds]
<txtsd>
Ox0dea: I don't know any ruby. I have a python background. I don't know how to do that. I figured I would just need to write one line of code to call that method.
rbowlby has joined #ruby
<shevy>
Ox0dea is such a stalker
shredding has quit [Ping timeout: 240 seconds]
<Ox0dea>
Of myself...?
<shevy>
of everyone
<atmosx>
Hello everyone
<pard>
what is it ?
<shevy>
do I have to stalk you now where you stalk others
<Ox0dea>
pard: Just visit the link?
Wompy has quit [Remote host closed the connection]
<Ox0dea>
pard: I just thought it was humorous that you linked me to an article to which I linked somebody else not terribly long ago.
karapetyan has joined #ruby
<txtsd>
Ox0dea: Is this not all I need to call that method? `Emoji::Extractor.extract()`
<shevy>
pard finally he added the explanation, he had me wonder as well ;)
yardenbar has quit [Ping timeout: 250 seconds]
<pard>
sorry i'm so slow getting things
<Ox0dea>
txtsd: No, because #extract is an instance method, so you need an instance of Emoji::Extractor.
<Ox0dea>
Looking at the constructor, you'll need to provide the desired size of the resultant images and in which directory you'd like them placed.
<Ox0dea>
Emoji::Extractor.new(42, '/tmp/foo').extract! or some such.
SCHAAP137 has joined #ruby
Wompy has joined #ruby
Wompy has quit [Remote host closed the connection]
Wompy has joined #ruby
<pard>
what matters is now i have it , gsl
p0wn3d has joined #ruby
stan has quit [Ping timeout: 250 seconds]
p0wn3d__ has quit [Ping timeout: 240 seconds]
akem has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eminencehc has quit [Remote host closed the connection]
mprelude has joined #ruby
e1senhorn has joined #ruby
Blaguvest has joined #ruby
e1senhorn has left #ruby [#ruby]
<pard>
shevy , reading it ?
<atmosx>
Extending a class like: class Person;attr_reader :sex;end; class Woman < Person; attr_reader :name;end ... is a violation of the Liskov principle right?
rismoney1 has quit [Remote host closed the connection]
synthroid has joined #ruby
jgt1 has quit [Ping timeout: 265 seconds]
<atmosx>
Liskov Sub Principle to be more precise.
<txtsd>
Ox0dea: I would never have worked out that format. Thanks. Where should I actually call this from though?
<txtsd>
Ox0dea: I need to change that EMOJI_TTF variable to point to a custom location, so I can't use the official gem.
p0wn3d__ has joined #ruby
<Ox0dea>
txtsd: Just redefine that constant.
pard has left #ruby ["Leaving"]
<frozenfoxx>
I'm having some problems with some code (https://github.com/frozenfoxx/hack-doom/blob/master/certain/lib/libcertain.rb). I need to be able to fire off a system command and capture/process its output/input in realtime. I've tried a variety of methods like IO.popen("command") and such but either they all exit early, don't seem to respond to stdin, don't output stdout, or similar. I've gotten somewhat there with Open3.pipeline("command") but don't know
<Ox0dea>
txtsd: You'll get a warning, but it won't be the end of the world.
<frozenfoxx>
I'm sorry for bugging you folks with it but I'm kindo f at my wit's end, I'm just not really sure what I need to do. The affected code is in line 23 on that file.
<shevy>
yeah sounds like a job for popen, you can assign to stdout stderr etc..
<frozenfoxx>
shevy: When using IO.popen("command") it just terminates early, don't know why.
<shevy>
I hate how much code one has to write compared to system() or `` there :(
evo2020 has joined #ruby
<frozenfoxx>
shevy: Thanks, I'll have a look at this too. If it helps, I'm basically wrapping up a CLI server so I can hand it off to websocketd.
<frozenfoxx>
shevy: That means I need to be able to grab certain lines of output based on regex to call other commands to send over the websocket, and capture/process commands from stdin over websocket to determine how to pass it to the cli server.
DoubleMalt has joined #ruby
<evo2020>
I have been looking for a way to keep score in a procedural ruby app. All I can find are OOP references. Has anyone ever encountered a problem like that?
<frozenfoxx>
shevy: looks like this should help me get rolling, so I'll let you know what happens.
skinux has joined #ruby
s2013 has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nemo_ has joined #ruby
<shevy>
\o/
dnomyar has quit [Ping timeout: 260 seconds]
failshell has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
treehug88 has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
failshell has quit [Remote host closed the connection]
Eiam has joined #ruby
Musashi007 has joined #ruby
Xeago has joined #ruby
Mon_Ouie has joined #ruby
wprice has joined #ruby
_tpavel has joined #ruby
senayar has quit []
tedstriker has quit [Quit: Anti-Fraping status set.]
failshell has joined #ruby
joonty has quit [Quit: joonty]
barhum2013 has joined #ruby
hfp_work has quit [Ping timeout: 244 seconds]
<evo2020>
shevy are you able to point me in the right direction with my question?
<evo2020>
U probably know resources that I dont
Eiam_ has joined #ruby
<evo2020>
@shevy
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hfp_work has joined #ruby
evo2020 has quit [Quit: Leaving]
dmitch has joined #ruby
K1MOS has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pandaant has quit [Remote host closed the connection]
jxl180 has quit [Quit: ChatZilla 0.9.92 [Firefox 41.0.2/20151015125802]]
<Ox0dea>
I couldn't execute it on eval.in because it forks, but playing with it locally should get you headed in the right direction.
nemo_ has joined #ruby
<frozenfoxx>
Ox0dea: thanks, I'll try this one, too.
<Ox0dea>
When you run it, it'll wait for your input; lines containing "echo" will be sent to `sh` and the result displayed, and all other lines will be ignored.
dnomyar has joined #ruby
superscott has joined #ruby
<frozenfoxx>
Ox0dea: that's awesome, definitely something I can use!
psy_ has joined #ruby
<frozenfoxx>
Ox0dea: I'll give it a try as soon as food's over.
__tpavel has joined #ruby
<Ox0dea>
I should probably eat myself.
<Ox0dea>
I'm rolling; food if I don't get all Strings.
<Ox0dea>
>> [*ObjectSpace.each_object].sample 3
<ruboto>
Ox0dea # => ["'", "test_files", " super \"You don't have write permissions for the \#{directory} directory.\" ...check link for more (https://eval.in/457992)
<Ox0dea>
Grr.
ryba has quit [Ping timeout: 240 seconds]
<Ox0dea>
txtsd: I'm afraid it's working fine here. :<
al2o3-cr has quit [Ping timeout: 268 seconds]
millerti has joined #ruby
<millerti>
How can I do a reverse each_index in Ruby? array.reverse.each_index doesn't do the trick.
<txtsd>
Ox0dea: Some env settings perhaps?
NeverDie_ has quit [Max SendQ exceeded]
User458764 has joined #ruby
<Ox0dea>
txtsd: God dammit. I was right the first time; the version on RubyGems doesn't have Extractor.
<jhass>
millerti: (array.size-1).downto(0) do |i|
<txtsd>
How is it working for you then?
<Ox0dea>
The `gem` command must be doing some caching that got in the way.
<millerti>
jhass: Ok. I wasn't sure if there was a better way...
<millerti>
thanks
<Ox0dea>
txtsd: It's working because I installed from source.
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Wompy has quit [Remote host closed the connection]
<txtsd>
Oh alright. I'll do that then. I replace the *spec and *gen with the actual filenames, right?
_tpavel has quit [Ping timeout: 250 seconds]
<Ox0dea>
txtsd: Well, it'd work fine with the asterisks in this case, but sure.
Wompy has joined #ruby
<Ox0dea>
txtsd: I apologize for making this so much more trouble than it might've been.
m3_del has joined #ruby
Wompy has quit [Read error: Connection reset by peer]
BSaboia has quit [Ping timeout: 246 seconds]
Wompy has joined #ruby
eminencehc has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
[Butch] has joined #ruby
eminencehc has quit [Remote host closed the connection]
treehug88 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has joined #ruby
shinnya has quit [Read error: No route to host]
Igorshp has quit [Remote host closed the connection]
skade has quit [Client Quit]
shinnya has joined #ruby
skade has joined #ruby
snockerton has quit [Quit: Leaving.]
<txtsd>
Ox0dea: I had globbing turned off so the asterisks weren't working. I finally found a reason to enable globbing lol.
<txtsd>
And don't worry about the trouble. Just as long as I can get this done.
<Ox0dea>
txtsd: *All* globbing?!
m3_del has quit [Ping timeout: 256 seconds]
last_staff has joined #ruby
based_pdev_ has joined #ruby
cyle has quit [Ping timeout: 244 seconds]
<karapetyan>
can i pass block to array.include?
<txtsd>
Yep. I was trying to learn zsh and shell concepts by making my own zshrc.
BSaboia has joined #ruby
<Ox0dea>
txtsd: Fair enough, but ditching globbing altogether is absurd. :P
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
karapetyan: No, you want Array#any?.
<txtsd>
I just couldn't find a reason to use it. Plus I liked not having to quote my URLs.
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Ox0dea>
txtsd: Yeah, you'll have to manually install that; Gemoji doesn't specify it as a dependency.
CanTonic has joined #ruby
ta has joined #ruby
<txtsd>
Ox0dea: From source? I have it installed via `gem`
LBRapid_ has quit [Remote host closed the connection]
CanTonic has quit [Client Quit]
hfp_work has quit [Ping timeout: 268 seconds]
<Ox0dea>
txtsd: Oh, sorry; I just assumed you were getting the LoadError that I did.
CanTonic has joined #ruby
Guest53 has joined #ruby
sl33k has joined #ruby
NeverDie has joined #ruby
h99h9h88 has joined #ruby
CanTonic has quit [Client Quit]
<millerti>
Anyone know how to install ruby-prof in Ubuntu 15.10? I trued using gem, but it complains that it doesn't have dev tools, although I have installed ruby-dev. And apparently, apt-get no longer has a ruby-dev package I can get from the Ubuntu repos.
<pipework>
millerti: I use chruby and ruby-install for managing my ruby versions.
<pipework>
Not the distro repos.
LBRapid has joined #ruby
baweaver has joined #ruby
h99h9h88 has quit [Ping timeout: 240 seconds]
dfinninger has quit [Remote host closed the connection]
KensoDev has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<karapetyan>
if i iterating array using select and condition fails. What i should return from block to return nothing in select? '' ?
<karapetyan>
nil ?
chthon has quit [Ping timeout: 244 seconds]
<Ox0dea>
karapetyan: Either falsey value will do.
etyety has quit []
dfinninger has joined #ruby
ftj has joined #ruby
L8 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<txtsd>
Ox0dea: are you using it on the correct font file though?
firstdayonthejob has quit [Ping timeout: 255 seconds]
<Ox0dea>
txtsd: I can't say whether we have the exact same one, but I'd imagine we do.
bricker_ has joined #ruby
<millerti>
So since Ruby has a GIL, does it have some convenient IPC functions? For instance, can I easily launch a child process and communicate with it using queues?
<frozenfoxx>
Ox0dea: If I can do this without celluloid that'd probably be better, it just seemed like it'd be a better way to do concurrency. That said, if I can't get this done in it then I'd prefer to have something that works in an ugly way than a pretty way that doesn't work
<Ox0dea>
For some reason, `parse!` isn't being called in time for `@strikes` to get initialized.
hfp__work has joined #ruby
<Ox0dea>
I've no idea why a slightly different input font file would cause that to happen.
<Ox0dea>
frozenfoxx: The POC was more meant to indicate how to use Open3 for basic "command and control"; $thing you described would certainly benefit from not blocking, so you'll want to marry the two.
<frozenfoxx>
Ox0dea: Agreed, I'm playing around with it a little bit and think I might have this working.
hfp_work has quit [Ping timeout: 264 seconds]
hfp__work is now known as hfp_work
niftylettuce has quit [Quit: Connection closed for inactivity]
<Mon_Ouie>
millerti: There is no such thing in stdlib (well, there's IO as mentioned above, you would still need to serialize your objects though). Also keep in mind the GIL does not affect multiple processes, only multiple threads running within the same process.
h99h9h88 has quit [Remote host closed the connection]
mghaig has joined #ruby
|\|370 has joined #ruby
h99h9h88 has joined #ruby
<millerti>
I've done multiprocess Ruby before, where one Ruby program calls via popen another and communicates via stdio. I was just wondering if anyone had streamlined it.
al2o3-cr1 has joined #ruby
<txtsd>
Ox0dea: I've been looking at that line, but I have no idea what to make of it.
<postmodern>
what's the defacto way to determine if a mechanize response is html?
h99h9h88_ has joined #ruby
<postmodern>
!page.kind_of?(Mechanize::File) ?
<txtsd>
Ox0dea: Can you try running it on the ttf I queried you?
<frozenfoxx>
Ox0dea: yeah, the more I work with this the more I think it'll work. Thank you so much! Thanks to you, too, shevy, I'll give the links you sent me a closer look later as well
alexdunne has quit [Ping timeout: 250 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
<frozenfoxx>
Ox0dea: At the risk of being dumb, is there a good quick way to signify the end of input? I'm thinking in the while loop just a "while res = o.gets || res != 'quit'" or something?
|\|370 has quit [Client Quit]
h99h9h88_ has quit [Remote host closed the connection]
h99h9h88_ has joined #ruby
shadoi has joined #ruby
<millerti>
Grr. I'm trying to use ruby-prof, and it keeps producing bogus dot files.
shadoi has left #ruby [#ruby]
h99h9h88 has quit [Ping timeout: 265 seconds]
<frozenfoxx>
Ox0dea: OH! And one more question (because I apparently take tips from the Steve Jobs of "one more thing"), the new thread is reading from "i" which is mapped to stdin which means ANYTHING in my program that interacts with stdin SHOULD be interpreted by that thread, yes?
Xiti has quit [Read error: Connection reset by peer]
paulcsmith has joined #ruby
paulcsmith has quit [Remote host closed the connection]
Xiti has joined #ruby
paulcsmith has joined #ruby
paulcsmith has quit [Remote host closed the connection]
h99h9h88_ has quit [Remote host closed the connection]
paulcsmith has joined #ruby
paulcsmith has quit [Remote host closed the connection]
raldu has quit [Remote host closed the connection]
justicefries has left #ruby [#ruby]
al2o3-cr1 is now known as al2o3-cr
<djellemah>
millerti: there are a couple of parallel each / parallel map gems. I vaguely remember being dissatified with them. Yeah I know, not helpful :-|
<Ox0dea>
frozenfoxx: Well, that loop should terminate when there's nothing more to read, but that'll never happen if the source is a stream.
tak1n has joined #ruby
<millerti>
djellemah: The reason I ask is mostly so that I don't keep reinventing the wheel.
Xeago has joined #ruby
<millerti>
Also, I wish there were an equivalent to sympy for Ruby.
cyle has joined #ruby
<Ox0dea>
frozenfoxx: Kernel#gets actually reads from ARGF, which is essentially $stdin if you didn't leave any filenames in ARGV.
bryanray has joined #ruby
<Ox0dea>
txtsd: Same error for that TTF.
eminencehc has joined #ruby
cdg has quit [Remote host closed the connection]
kadoppe has quit [Ping timeout: 260 seconds]
GnuYawk has joined #ruby
jord has joined #ruby
<frozenfoxx>
Ox0dea: Good stuff, I think I understand. As I'm testing it out here it's working nicely. This also means that, nifty as Celluloid is, I probably won't have to use it and less external dependencies makes me a happy camper.
kadoppe has joined #ruby
<Ox0dea>
*fewer
<Ox0dea>
<3
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<frozenfoxx>
Ox0dea: I've had little sleep, so I'm going to mulligan my Engrish.
<frozenfoxx>
Ox0dea: anyway, thanks so much, I've beat my head on that for three weeks now trying to figure out how to make it work.
<Ox0dea>
frozenfoxx: It's much fewer abrasive if you interpret it as a Game of Thrones reference.
<txtsd>
Ox0dea: Am I SOL then? I just want to extract the damn PNGs :(
<frozenfoxx>
Ox0dea: I'm that horrible heretic that doesn't like Game of Thrones. Please don't make me Sean Bean!
<millerti>
djellemah: There's also a C version of sympy called symengine that has been made into a Ruby extension, but it's incomplete.
<Ox0dea>
txtsd: I mean, do you want the older TTF for which it works just fine?
<Ox0dea>
(See query.)
<txtsd>
Ox0dea: No, I need the new emojis from the most recent version.
<Ox0dea>
frozenfoxx: He lives!
m3t4l1c_s0ul has quit [Quit: Leaving]
<workmad3>
frozenfoxx: blasphemy! Your punishment is to be every Sean Bean character in every film and show he's ever been in!
<Ox0dea>
txtsd: I suppose your only option is to file an issue with ttfunk, then. :<
h99h9h88 has joined #ruby
<frozenfoxx>
workmad3: in that case, quoting Black Death, "victory is mine!"
Guest53 has joined #ruby
mbrune has joined #ruby
<pipework>
frozenfoxx: you mean Stewie Griffin.
lkba has quit [Ping timeout: 264 seconds]
jdawgaz has joined #ruby
<mbrune>
hey all I am doing an ssh.exec!("") and I have an awk string that I want to run but I can't seem to escape it in such a way that ruby and awk both understand
karapetyan has quit [Remote host closed the connection]
<frozenfoxx>
pipework: no, he says it right before he's got his limbs pulled off at the end of the movie.
<pipework>
frozenfoxx: it was a joke
karapetyan has joined #ruby
<frozenfoxx>
pipework: sorry, it didn't come across that way with text. :/
lkba has joined #ruby
<pipework>
frozenfoxx: If someone says that Family Guy says anything original, it's either a joke or a reflection of their lack of a worthwhile educational background.
h99h9h88 has quit [Ping timeout: 260 seconds]
m3_del has joined #ruby
failshell has joined #ruby
sl33k_ has joined #ruby
sl33k has quit [Read error: Connection reset by peer]
sl33k_ is now known as sl33k
karapetyan has quit [Ping timeout: 252 seconds]
IrishGringo has quit [Ping timeout: 246 seconds]
benlovell has joined #ruby
benlovel1 has joined #ruby
<drbrain>
mbrune: try using %q[…]
<drbrain>
>> %q[ this is a string that can have ", ' or {} inside it ]
<ruboto>
drbrain # => " this is a string that can have \", ' or {} inside it " (https://eval.in/458010)
karapetyan has joined #ruby
<djellemah>
Ox0dea: thanks for that thaw code using Fiddle, it gives me one way of doing what I want. Now, all I have to do is resist the many temptations down that road ;-)
<Ox0dea>
djellemah: Sure thing. That particular rabbit hole does indeed run quite deep. :)
dmolina has joined #ruby
Xeago has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
m3_del has quit [Ping timeout: 265 seconds]
dmolina1 has joined #ruby
<skinux>
I seem to have Ruby 2.1.5p273 (which I just downloaded yesterday), which contains a CA certificate issue. How do I update so this issue is resolved? Do I have to download and install Ruby again?
Xeago has joined #ruby
<Ox0dea>
drbrain: Thoughts on `Prime.include?`?
<skinux>
I found documentation for update fix versions online, which shows 2.0 and 2.2, but not 2.1
<drbrain>
Ox0dea: ?
rbennacer has quit [Remote host closed the connection]
<drbrain>
Ox0dea: you might get better performance by divmod each prime with value
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
Really, `Prime.include?` is hardly the best way to check for primality, but it should at least not lie.
<drbrain>
↑ yes
diegoaguilar has quit [Ping timeout: 250 seconds]
<Ox0dea>
Gem::Specification is another such "enumerable class", but its finitude absolves it somewhat.
nemo_ has quit [Remote host closed the connection]
<Ox0dea>
Using ObjectSpace to find the classes which include Enumerable leads to a bad time if you've required 'prime'.
Dakota-choad has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
Dakota-choad has quit [Remote host closed the connection]
bryanray has quit [Ping timeout: 252 seconds]
willardg has joined #ruby
Coldblackice has joined #ruby
<pipework>
Ox0dea: I'm willing to bet that most sentences involving "Using ObjectSpace" lead to a bad time.
G186 has joined #ruby
<Ox0dea>
pipework: Wrong channel?
<pipework>
Ox0dea: No, why would you think that?
<pipework>
[12:12:38 PM] <Ox0dea>Using ObjectSpace to find the classes which include Enumerable leads to a bad time if you've required 'prime'.
yfeldblum has joined #ruby
tvw has joined #ruby
h99h9h88 has joined #ruby
skade has quit [Read error: Connection reset by peer]
mghaig has quit [Remote host closed the connection]
daffy_duck has joined #ruby
dionysus69 has joined #ruby
skade has joined #ruby
<Ox0dea>
pipework: The part where you don't think it's great that we *can* analyze the entire system threw me off.
mhib has quit [Ping timeout: 255 seconds]
<pipework>
Ox0dea: Oh, it's not that it's not great, just that bad times are had.
bricker has joined #ruby
poguez_ has joined #ruby
<Ox0dea>
> Terrible, yes, but great.
Lucky__ has joined #ruby
<Ox0dea>
ObjectSpace is Voldemort confirmed.
mghaig_ has joined #ruby
<pipework>
He who shall not be introspected?
dfinninger has joined #ruby
firstdayonthejob has joined #ruby
<shevy>
stop peeking at inside ruby!
mghaig_ has quit [Client Quit]
arthurix_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
Bloomer has quit [Ping timeout: 240 seconds]
Fire-Dragon-DoL has quit [Read error: Connection reset by peer]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
sepp2k has quit [Quit: Leaving.]
Fire-Dragon-DoL has joined #ruby
kerunaru has joined #ruby
<drbrain>
reminds me of a bug where you could crash ruby by using ObjectSpace to find the String gsub was using to build the result string and adding characters to it
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<drbrain>
or something like that
diegoaguilar has joined #ruby
karapetyan has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Eiam_ has joined #ruby
arthurix has quit [Ping timeout: 264 seconds]
kerunaru has quit [Client Quit]
Salve has joined #ruby
pdoherty has joined #ruby
kerunaru has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
<skinux>
Umm..apparently gem is set to use JRuby,how do I set it to use regular Ruby?
targaf has joined #ruby
<slash_nick>
skinux: are you using rvm?
<skinux>
Not unless it's doing it automagically
ruurd has joined #ruby
<shevy>
hah I once had fun with jruby too and installed into /usr prefix, then I wondered why ruby no longer worked
<adaedra>
sounds like you were asking for trouble.
<skinux>
I installed JRuby after I installed Ruby, but on Windows, I didn't set any custom locations.
al2o3-cr has quit [Remote host closed the connection]
mhib has joined #ruby
Eiam_ has quit [Ping timeout: 265 seconds]
uber has quit [Ping timeout: 240 seconds]
trosborn has quit [Quit: trosborn]
karapetyan has quit [Remote host closed the connection]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<mbrune>
but when I go to the redis server the only key there is "test"
<mbrune>
any ideas?
skade has quit [Read error: Connection reset by peer]
skweek has joined #ruby
C0r3 has joined #ruby
skade has joined #ruby
northfurr has quit [Client Quit]
uber has joined #ruby
m3_del has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
lxsameer has joined #ruby
northfurr has joined #ruby
NeverDie_ has joined #ruby
<targaf>
is there a way to call a ruby file from another file and pass variables along with the call?
al2o3-cr has joined #ruby
<C0r3>
I have basic programming experience... By 'basic' I mean it literally and not the language 'BASIC'.. :P I have prior experience in PHP and now I wish to migrate to Ruby. Can anyone guide me the right way??
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has quit [Ping timeout: 260 seconds]
swgillespie has joined #ruby
<shevy>
C0r3 write as much code as possible in ruby
<shevy>
start with something small that you would do in php
Motoservo has joined #ruby
<C0r3>
shevy: I used php for developing web apps. Also use a framework.
<C0r3>
shevy: Can you please tell me any nice example tasks that can help me enhance my Ruby programming skills?
skweek has quit [Ping timeout: 240 seconds]
<Ox0dea>
C0r3: Scratch an itch.
Soda has quit [Remote host closed the connection]
<shevy>
C0r3 well do you have irb running locally already; if so start it
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
`tim` has joined #ruby
Guest53 has joined #ruby
<Ox0dea>
targaf: Could you elaborate? The broadest applicable answer is "yes, structure your code appropriately".
m3_del has quit [Ping timeout: 255 seconds]
h99h9h88 has joined #ruby
<Salve>
targaf: yeah, use a pipe and stream the data
<C0r3>
shevy: I don't even know what is IRB. I'll give a search..
<shevy>
it's a bit weird though, I would not write it like that, but it's cool that it is a single .rb file
<shevy>
but anyway, work through the chapters first!
h99h9h88 has quit [Remote host closed the connection]
djbkd has joined #ruby
<C0r3>
shevy: The entire website is a single .rb file???
<shevy>
yeah
<shevy>
he wrote it in 2003 or so if you look at the copyright notice :)
<C0r3>
shevy: I can't believe..
karapetyan has joined #ruby
ruurd has joined #ruby
G186 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<C0r3>
Awesome!!
Steve_Jobs has quit [Ping timeout: 244 seconds]
dopamean_ has quit [Read error: Connection reset by peer]
<shevy>
by the way C0r3 also read this short interview - it is also very old but this is the best difference between ruby and e. g. python, the philosophy: http://www.artima.com/intv/ruby.html
pocketprotector- has joined #ruby
jriggins has joined #ruby
<C0r3>
shevy: Hang on I'll make a note of all the recommendations...
prasselpikachu is now known as Fridtjof
<C0r3>
shevy: Tell me more.
<shevy>
the interview is really short, it's like only 8 paragraphs in question-answer style
<shevy>
dunno... both articles linked above actually originated from 2003 :\
<shevy>
one thing that you should later learn is how to write a .gem file yourself for your code to distribute it
<C0r3>
I'll check that. I noted it down.
yfeldblum has quit [Remote host closed the connection]
jriggins has quit [Client Quit]
dopamean_ has joined #ruby
ldnunes has quit [Quit: Leaving]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bender_unit has joined #ruby
<C0r3>
Okay.. How much time should I expect to get a grip over Ruby? If I have 1 year of programming experience. And you can see my code at www.github.com/Qumonto/usersys
trosborn has joined #ruby
trosborn has quit [Client Quit]
<C0r3>
I feel the Ruby community is more friendly than the PHP community. Is it always like this?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cdg has joined #ruby
bender_unit has quit [Read error: Connection reset by peer]
lipoqil has quit [Quit: Connection closed for inactivity]
Yzguy has joined #ruby
yashinbasement has joined #ruby
swgillespie has joined #ruby
cwong_on_irc has quit [Read error: Connection reset by peer]
<mozzarella>
did ruby ever ship with a static web server?
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
<jhass>
ruby -run -ehttpd
cwong_on_irc has joined #ruby
<havenwood>
mozzarella: For example, current dir on port 8080: ruby -run -ehttpd . -p 8080
<mozzarella>
so, it loads the "un" file and executes "httpd" as code (which calls the httpd function)?
<havenwood>
C0r3: Your experience should speed up learning nicely. Can't say what a grip on Ruby is or how long it might take you. It's a nice community!
uber has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bb010g has quit [Quit: Connection closed for inactivity]
<jhass>
mozzarella: method, yeah
jessemcgilallen has quit [Quit: jessemcgilallen]
alexdunne has joined #ruby
stamina has quit [Ping timeout: 240 seconds]
synthroid has quit []
ruurd has joined #ruby
Steve_Jobs has joined #ruby
ni291187 has joined #ruby
<ni291187>
why are niggers racist?
<havenwood>
!mute ni291187
dionysus69 has joined #ruby
bruno- has joined #ruby
al2o3-cr has quit [Ping timeout: 268 seconds]
bruno- is now known as Guest53513
alexdunne has quit [Ping timeout: 250 seconds]
v4n_ has quit [Ping timeout: 252 seconds]
<skinux>
Does Rails have it's own version of Ruby packaged???
Guest53513 has quit [Client Quit]
<danneu>
skinux: no, as in rails runs on whichever ruby you have installed
momomomomo has joined #ruby
<skinux>
Hmm. I installed needed packages using command-line, but RubyMine keeps saying their missing and fails to install them.
bender_unit has quit [Ping timeout: 272 seconds]
<skinux>
It's trying to install debase, but it says it cannot install dependency debase-ruby_core_source
chouhoul_ has joined #ruby
<skinux>
It shouldn't be trying to because both are already installed.
<momomomomo>
skinux: maybe try in the jetbrains support email
kerunaru has joined #ruby
<skinux>
Yeah..so I can wait a day or two for them to reply.
ruurd has quit [Quit: ZZZzzz…]
skweek has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
<momomomomo>
skinux: just suggesting an avenue that might be of help to you; that's a product-specific integration. You probably need to ensure that you've got the right ruby environment configured for rubymine
codecop has quit [Remote host closed the connection]
ni291187 has quit [Remote host closed the connection]
symm- has joined #ruby
jamesaxl has joined #ruby
<skinux>
Honestly I wish I knew how to develop extensions to Eclipse, so I could create my own custom "IDE".
<momomomomo>
I don't use an IDE for ruby
<momomomomo>
only for c++ and java
arthurnn has joined #ruby
<skinux>
I was just thinking maybe I should just use Sublime Text or Notepad++ and either Gradle or Maven individually instead of using RubyMine
<shevy>
yeah
Couch has quit [Ping timeout: 265 seconds]
<momomomomo>
skinux: some people like IDEs, some people like text editors, it's all preference
<momomomomo>
try sublime text, it's nice
<shevy>
try notepad++ if you are on windows, and try to stay as simple as possible. ruby is simple, one should not need eclipse for it
ahegyi has quit [Ping timeout: 244 seconds]
<skinux>
I prefer IDEs, but if I can't get an IDE to work with me then I'll use a text editor, ruby/rails themselves, and whatever other tools needed via command-line.
<momomomomo>
skinux: that's generally the way of things
<Radar>
Sublime Text 3 or death
<shevy>
haha
arthurix has joined #ruby
<Radar>
IDEs are not that great for Ruby because it is a dynamic language
<skinux>
I like IDEs, for one thing because I don't have to learn all the commands of various things.
svkurowski has joined #ruby
<momomomomo>
I use vim + syntastic
<Radar>
I often see a lot of people (coworkers included!) who spend more time fiddling around with their IDE to run commands like "git commit" or Rake tasks.
<svkurowski>
ruby -e "require 'date'; puts Date.rfc3339('2009-04-04T09:51:28+00:00').strftime('%Y/%m-%B/%d-%A/%H-%M')" > Why does this print 0 for the minute and the hour value?
<Radar>
Like, how hard is to tab over into the terminal and run the commands?
Musashi007 has quit [Quit: Musashi007]
<momomomomo>
or just stay in the terminal and use vim
<momomomomo>
or emacs if that's your thing
<Radar>
svkurowski: Is this an interview question?
<svkurowski>
Nope
<svkurowski>
I'm trying to batch process a bunch of files
<Radar>
svkurowski: It's because you're using Date and not Time.
<Radar>
svkurowski: Date is for days, months and years.
nertzy has quit [Quit: This computer has gone to sleep]
<dreinull75>
I could handle these things just fine with nil checks but it will look ugly. So I'm trying to simplify things a bit for the user.
<drbrain>
dreinull75: "foo"[3] is nil, though, so what do you want it to return?
<Ox0dea>
A user-friendly error message, it seems.
allcentury has joined #ruby
bender_unit has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
hxegon has joined #ruby
arthurix_ has joined #ruby
<dreinull75>
The problem ist that I'm working with DB associations. If they are missing there's a problem. So I want to tell the user to check their data. If not just spit out some Strings with data.
bender_unit has quit [Max SendQ exceeded]
umgrosscol has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 250 seconds]
<drbrain>
it seems the best you could do is guess at where the error occurred
<dreinull75>
I'm using these method calls in slim templates so there is not much room for logic
yfeldblum has joined #ruby
<drbrain>
Either the contents of the string or the argument to String#[] could be the source
jwaldrip has quit [Quit: Be back later ...]
alexdunne has quit [Ping timeout: 255 seconds]
mhib has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
<dreinull75>
Is there a way to create wrapper methods in the simple delegate subclass for the methods concerned? If nil, return some message, if valid forward them?
arthurix has quit [Ping timeout: 256 seconds]
arthurix_ has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
numbertheory_isP has quit [Quit: Leaving]
matp has joined #ruby
eminencehc has quit [Remote host closed the connection]
bender_unit has joined #ruby
bb010g has joined #ruby
<Ox0dea>
dreinull75: Do you know about Module#prepend?
Pupeno has quit [Remote host closed the connection]
<dreinull75>
Ox0dea: yes
<dreinull75>
Ox0dea thought maybe there'S a simpler method
shadoi has joined #ruby
skade has joined #ruby
shadoi has left #ruby [#ruby]
jwaldrip has joined #ruby
benlovel1 has joined #ruby
benlovell has joined #ruby
Igorshp has quit [Remote host closed the connection]
Pupeno has joined #ruby
akem has quit [Quit: Bye]
shazaum_ has joined #ruby
nateberkopec has joined #ruby
jwaldrip has quit [Ping timeout: 250 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
benlovel1 has quit [Ping timeout: 252 seconds]
benlovell has quit [Ping timeout: 252 seconds]
yashinbasement has quit [Ping timeout: 268 seconds]
leafybasil has quit [Remote host closed the connection]
<dreinull75>
in a more controlled environment this looks straight forward :)
ruurd has joined #ruby
firstdayonthejob has joined #ruby
jgpawletko has joined #ruby
ecksit has joined #ruby
jgpawletko has quit [Client Quit]
jwaldrip has joined #ruby
skade has quit [Read error: No route to host]
failshell has joined #ruby
skade has joined #ruby
New_to_Ruby has joined #ruby
jgpawletko has joined #ruby
maxz has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
<New_to_Ruby>
Hi
<adaedra>
Ah, here comes the ruby expert
<havenwood>
New_to_Ruby: hi
jwaldrip has quit [Ping timeout: 240 seconds]
h99h9h88 has joined #ruby
scoot_ has joined #ruby
nateberkopec has joined #ruby
baweaver_ has quit [Read error: Connection reset by peer]
mghaig has joined #ruby
northfurr has quit [Quit: northfurr]
mghaig has quit [Client Quit]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
bender_unit has joined #ruby
h99h9h88 has quit [Ping timeout: 265 seconds]
jessemcgilallen has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
failshell has quit [Remote host closed the connection]
<shevy>
New_to_Ruby hey you are no longer new
<shevy>
you were here yesterday too!
dnomyar has quit [Ping timeout: 250 seconds]
lxsameer has quit [Quit: Leaving]
BlackCoyote has joined #ruby
New_to_Ruby is now known as Less_new_to_Ruby
jgpawletko has joined #ruby
northfurr has joined #ruby
<shevy>
yay \o/
<Less_new_to_Ruby>
I am trying to get my head around why when defining a method I would pass it an argument.
<shevy>
how do you define a method without arguments Less_new_to_Ruby
mary5030 has quit [Ping timeout: 246 seconds]
<Less_new_to_Ruby>
def method_name rather than def method_name(arguments)
Alina-malina has quit [Ping timeout: 244 seconds]
<shevy>
yeah
<shevy>
the second one accepts arguments, the first one does not
<havenwood>
Less_new_to_Ruby: Use just a method if that suffices. Choose the simplest thing.
benlovell has joined #ruby
benlovel1 has joined #ruby
<Less_new_to_Ruby>
I'm doing the koans and am seeing methods defined with arguments and they're throwing me off.
troyready has quit [Ping timeout: 250 seconds]
malconis has joined #ruby
Jackneill_ has quit [Ping timeout: 240 seconds]
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
naztharune has joined #ruby
cornerma1 has joined #ruby
<Less_new_to_Ruby>
I'm at the point where (8 days in) I feel as though I should be past the basics. I feel a little dumb for being hung up on, what I think, seems like an easy enough concept to everyone else.
benlovel1 has quit [Ping timeout: 268 seconds]
benlovell has quit [Ping timeout: 268 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.3]
superscott has quit []
roxtrongo has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<shevy>
it's just a method
<shevy>
you bind code into it
<shevy>
when you invoke the method, that code is run
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
Blaguvest has quit []
roxtrongo has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
malconis has quit [Ping timeout: 268 seconds]
roxtrongo has quit [Remote host closed the connection]
chouhoulis has joined #ruby
nateberkopec has quit [Ping timeout: 264 seconds]
<Less_new_to_Ruby>
I understand it better after reading and trying this example. http://goo.gl/bUKt0h
leafybasil has joined #ruby
quazimodo has joined #ruby
djbkd has joined #ruby
skade has quit [Read error: No route to host]
skade has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
mois3x has joined #ruby
platzhirsch has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
RegulationD has joined #ruby
nateberkopec has joined #ruby
tkuchiki has joined #ruby
opensource_ninja has quit [Remote host closed the connection]
opensource_ninja has joined #ruby
hiyosi has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
agit0 has joined #ruby
agit0 has quit [Client Quit]
Less_new_to_Ruby has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
Underdogg has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
yardenbar has quit [Ping timeout: 268 seconds]
mordocai has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
<TheNet>
is there a way to toggle between instance variables being writable or readable?
bruno- has joined #ruby
agit0 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
You can freeze instances, but instance variables can always be reaffected.
Igorshp has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
<TheNet>
can I create my own accessor methods?
<adaedra>
of course
<TheNet>
how would I create a write method?
<adaedra>
attr_reader, attr_writer, attr_accessor for default behavior, otherwise define `name` and `name=(_)` to your convienence
nertzy has joined #ruby
<shevy>
def foo=(i); @foo = i # TheNet
<TheNet>
thanks!
BlackCoyote has quit [Quit: Leaving]
gregoriokusowski has quit [Quit: gregoriokusowski]
ruby-lang734 has joined #ruby
ruurd has joined #ruby
dopamean_ has quit [Ping timeout: 252 seconds]
Ropeney has joined #ruby
dopamean_ has joined #ruby
Igorshp has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
avahey has joined #ruby
mollusk_ has joined #ruby
tno has quit [Quit: Ex-Chat]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
polishdub has quit [Quit: Leaving]
ruby-lang734 has quit [Ping timeout: 246 seconds]
naztharune has quit [Ping timeout: 264 seconds]
inteq has quit [Remote host closed the connection]
Igorshp has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
Igorshp has joined #ruby
yfeldblum has quit [Quit: Leaving...]
jgpawletko has quit [Quit: jgpawletko]
nateberkopec has joined #ruby
Alina-malina has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
cyle has quit [Ping timeout: 260 seconds]
codeurge has joined #ruby
Or1on has joined #ruby
yfeldblum has joined #ruby
pathlost has joined #ruby
yardenbar has quit [Ping timeout: 256 seconds]
m3_del has joined #ruby
<Ox0dea>
dreinull75: Still about?
<dreinull75>
Ox0dea kinda, doing the Javascript tour now
pathlost has quit [Client Quit]
jobewan has quit [Quit: Leaving]
nateberkopec has quit [Ping timeout: 250 seconds]
<dreinull75>
I should really check out opal
dopamean_ has quit [Ping timeout: 252 seconds]
sanjayu has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
failshell has joined #ruby
<Ox0dea>
dreinull75: Well, I decided to go all out on your crazy nil-monitoring idea: https://eval.in/458098
ruurd has joined #ruby
mag42c has quit [Quit: mag42c]
<dreinull75>
Ox0dea: wow, I tried something similar via the initialize method but probably called super too late.
Rickmasta has joined #ruby
m3_del has quit [Ping timeout: 265 seconds]
Wompy has quit [Remote host closed the connection]
skinux has quit [Ping timeout: 265 seconds]
<dreinull75>
Ox0dea I'm going to study this tomorrow, I'm falling asleep. Thank you for looking into it.
<Ox0dea>
dreinull75: Sure thing. I would actually advise you to forget all you witnessed here today.
quazimodo has joined #ruby
andersoldahl has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
dfinninger has joined #ruby
andersoldahl has quit [Client Quit]
<dreinull75>
Ox0dea why? It solves a problem and I'm using this in a local environment only. So as long as I'm happy and it works I'm fine.
failshell has quit [Remote host closed the connection]
pocketprotector- has quit [Ping timeout: 240 seconds]
ESpiney has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
Ox0dea has joined #ruby
htmldrum has joined #ruby
karapetyan has joined #ruby
northfurr has quit [Quit: northfurr]
nfk has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
charliesome has joined #ruby
bender_unit has joined #ruby
northfurr has joined #ruby
roxtrongo has joined #ruby
malconis has joined #ruby
mbrune has quit [Quit: leaving]
dopieee has quit [Quit: This computer has gone to sleep]
bryanray has joined #ruby
h99h9h88 has joined #ruby
yardenbar has joined #ruby
<svkurowski>
Which environment variable do i have to set s.t. Datetime#strftime outputs day and month names in another language than English? I tried LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LANGUAGE=de_DE ./script.rb but it still outputs english names
karapetyan has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
willharrison has joined #ruby
CloCkWeRX has quit [Ping timeout: 268 seconds]
JammyHammy has joined #ruby
skinux has joined #ruby
bender_unit has quit [Ping timeout: 268 seconds]
h99h9h88 has quit [Ping timeout: 244 seconds]
failshell has joined #ruby
chipotle has quit [Quit: cheerio]
ReK2 has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
dorei has quit []
jwaldrip has joined #ruby
failshell has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
I don't quite know with what to send to configure to for the next ruby version, I'll probably test frozen strings as early as possible so it will bite me as little as possible lateron
<shevy>
yeah
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
I guess _ = '' will be similar to _ = ''.freeze