havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
cagomez has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 260 seconds]
gusrub has joined #ruby
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez_ has joined #ruby
cagomez_ has quit [Client Quit]
hutch34 has joined #ruby
astrobunny has quit [Remote host closed the connection]
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
milardovich has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
ColeHub has quit [Quit: Bye.]
cdg has joined #ruby
cam27 has joined #ruby
__Yiota has joined #ruby
j0bk has quit [Changing host]
j0bk has joined #ruby
gusrub has quit []
cdg has quit [Ping timeout: 268 seconds]
landon` has joined #ruby
<landon`> clear
landon` is now known as anon
anon has left #ruby [#ruby]
Dimik has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
bruno- has quit [Ping timeout: 240 seconds]
BSaboia has quit [Ping timeout: 246 seconds]
BSaboia has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
brian_penguin has quit [Remote host closed the connection]
quobo has quit [Quit: Connection closed for inactivity]
ansraliant has joined #ruby
ansraliant has joined #ruby
ansraliant has quit [Changing host]
hahuang65 has joined #ruby
jdawgaz has joined #ruby
brent__ has quit [Remote host closed the connection]
bruno- has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
impermanence has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eightlimbed has joined #ruby
hotpancakes has quit [Remote host closed the connection]
minimalism has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ansraliant has quit [Quit: Konversation terminated!]
sarmiena_ has quit [Quit: sarmiena_]
umaaji has joined #ruby
hotpancakes has joined #ruby
charliesome has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tau has quit [Remote host closed the connection]
tau has joined #ruby
milardovich has joined #ruby
tau has quit [Remote host closed the connection]
mim1k has joined #ruby
eljimmy has joined #ruby
rundor has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
hutch34 has quit [Ping timeout: 246 seconds]
rfoust has joined #ruby
patarr has joined #ruby
tau has joined #ruby
tau has quit [Remote host closed the connection]
jdawgaz has joined #ruby
oaisud has joined #ruby
amclain has quit [Quit: Leaving]
ascarter has joined #ruby
patarr has quit [Client Quit]
Miah_ has quit [Quit: Connection closed for inactivity]
oaisud has quit [Remote host closed the connection]
uZiel has joined #ruby
BSAlb has joined #ruby
gizmore|2 has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
AAA has joined #ruby
BSaboia has quit [Ping timeout: 260 seconds]
gizmore has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
aphprentice has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 248 seconds]
oaisud has joined #ruby
ecuanaso has joined #ruby
d^sh_ has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
lacuna has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hotpanca_ has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
jdawgaz has quit [Client Quit]
duderonomy has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
impermanence has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
uZiel has joined #ruby
nacho has joined #ruby
nacho has left #ruby ["WeeChat 1.9"]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
astrobunny has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
shiranuidong has joined #ruby
shiranuidong has quit [Max SendQ exceeded]
jdawgaz has joined #ruby
ecuanaso has joined #ruby
zssshhh has joined #ruby
kies has quit [Ping timeout: 276 seconds]
astrobunny has quit [Remote host closed the connection]
ElFerna has joined #ruby
AAA has quit [Ping timeout: 255 seconds]
cdg has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
hotpancakes has joined #ruby
Raboo has quit [Remote host closed the connection]
zssshhh has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
Raboo has joined #ruby
hotpancakes has joined #ruby
cdg has quit [Remote host closed the connection]
astrobunny has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
zssshhh has joined #ruby
mwlang has joined #ruby
enterprisey has joined #ruby
rundor has quit [Remote host closed the connection]
rundor has joined #ruby
enterprisey has quit [Client Quit]
enterprisey has joined #ruby
hahuang65 has joined #ruby
rundor has quit [Ping timeout: 260 seconds]
rundor has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
hotpanca_ has joined #ruby
moei has quit [Quit: Leaving...]
s2013 has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
uZiel has joined #ruby
jameser has joined #ruby
gothicsouth has joined #ruby
digitalnomad has joined #ruby
jameser has quit [Read error: Connection reset by peer]
jameser has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HoierM has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
s2013 has quit [Client Quit]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
SteenJobs has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
elcontrastador has quit [Ping timeout: 240 seconds]
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
jdawgaz has joined #ruby
Curting has joined #ruby
sarmiena_ has joined #ruby
kies has joined #ruby
<Curting> Hello! I need help to my Ruby code found here: https://gist.github.com/Curting/22a98316598492010f993ddc4e24e3f6
<havenwood> Curting: What seems to be the problem? Just general refactor or a specific issue?
phinxy has joined #ruby
phinxy has quit [Changing host]
phinxy has joined #ruby
<Curting> havenwood Sorry I didn't clarify. I just updated the link with the challenge description.
<Curting> havenwood: My issue is that when my orange tree is @age == 3, it should have @orangeCount == 5. But no matter the @age, it has @orangeCount == 0
uZiel has quit [Ping timeout: 248 seconds]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
<Curting> Any help would really be appreciated! :)
zssshhh has left #ruby [#ruby]
sarmiena_ has quit [Quit: sarmiena_]
hotpanca_ has quit [Remote host closed the connection]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
__Yiota has joined #ruby
<Curting> I'll go to bed. Have a nice evening everyone! :-)
Curting has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Radar> Cur... is ogne.
<Radar> Anyway, probably not calling oneYearPasses is the problem there.
<Radar> alsoWhatIsWithThisNamingConvention
<Radar> actually case should be an if / elsif
someuser has quit [Ping timeout: 255 seconds]
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Ping timeout: 255 seconds]
hotpancakes has quit [Remote host closed the connection]
tacoboy has quit [Remote host closed the connection]
ElFerna has quit [Ping timeout: 255 seconds]
gix has quit [Ping timeout: 255 seconds]
mwlang has quit [Quit: mwlang]
MrBismuth has quit [Ping timeout: 246 seconds]
gix has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
oaisud has quit [Remote host closed the connection]
phinxy has quit [Read error: Connection reset by peer]
dviola has quit [Quit: WeeChat 1.9]
bronson has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
jdawgaz has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
sarmiena_ has joined #ruby
leah2 has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marxarelli is now known as marxarelli|afk
hotpancakes has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
charliesome has quit [Client Quit]
charliesome has joined #ruby
heinrich5991 has joined #ruby
eightlimbed has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
enterprisey has quit [Remote host closed the connection]
eightlimbed has joined #ruby
jtd has joined #ruby
hutch34 has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
hutch34 has quit [Ping timeout: 255 seconds]
rundor has quit [Remote host closed the connection]
rundor has joined #ruby
AndyNam has joined #ruby
MrBismuth has joined #ruby
tau has joined #ruby
rundor has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
AndyNam has left #ruby [#ruby]
coenraad has joined #ruby
smulverine has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
armyriad has quit [Quit: Leaving]
aphprentice has quit [Quit: Connection closed for inactivity]
znz_jp has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
patrontechnosoft has joined #ruby
milardovich has quit []
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
znz_jp has joined #ruby
charliesome has joined #ruby
gothicsouth has joined #ruby
milardovich has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
govg has quit [Ping timeout: 240 seconds]
govg_ has joined #ruby
impermanence has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
SteenJobs has quit [Quit: SteenJobs]
impermanence has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rundor has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
tunaBee_ has joined #ruby
milardovich has quit []
brent__ has joined #ruby
tunaBee has quit [Ping timeout: 240 seconds]
Bock has joined #ruby
oleo has quit [Quit: irc client terminated!]
enterprisey has joined #ruby
enterprisey has quit [Remote host closed the connection]
jphase has quit [Read error: Connection reset by peer]
br0d1n has quit [Quit: Leaving]
jphase has joined #ruby
troter__________ has quit []
brent__ has quit [Remote host closed the connection]
hays has quit [Ping timeout: 255 seconds]
rundor has quit [Remote host closed the connection]
moei has joined #ruby
empty_cup has quit [Ping timeout: 255 seconds]
empty_cup has joined #ruby
_whitelogger has joined #ruby
phate408 has joined #ruby
enterprisey has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
uZiel has joined #ruby
hays has joined #ruby
hays has joined #ruby
hays has quit [Changing host]
anisha has joined #ruby
aufi has joined #ruby
<morfin> dminuoso, i assume clang allowed such UB before
<morfin> but i think 4.0 can break stuff :)
armyriad has joined #ruby
leah2 has joined #ruby
armyriad has quit [Ping timeout: 260 seconds]
armyriad has joined #ruby
ur5us has quit [Remote host closed the connection]
hightower2 has joined #ruby
renchan has joined #ruby
enterprisey has quit [Remote host closed the connection]
lacuna has quit [Ping timeout: 240 seconds]
morfin60 has joined #ruby
morfin has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
jenrzzz has joined #ruby
tofutoon has quit [Quit: Leaving.]
hotpancakes has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
nofxxx has joined #ruby
anisha has quit [Read error: Connection reset by peer]
anisha has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 240 seconds]
coenraad has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
Puffball_ has joined #ruby
Hunter1 has joined #ruby
<morfin60> or 5
patrontechnosoft has quit [Remote host closed the connection]
roshanavand has joined #ruby
Puffball has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
cam27 has quit [Quit: cam27]
djbkd has quit [Remote host closed the connection]
<dminuoso> morfin60: What?
<dminuoso> morfin60: There's no defined semantics of UB. "it works" is only based on your expectation.
<dminuoso> morfin60: So did you run it through valgrind with a clang or pre-7.1 build?
ayonkhan has joined #ruby
Puffball_ has quit [Remote host closed the connection]
<dminuoso> morfin60: Oh you did actually. File a bug report.
Puffball has joined #ruby
bronson has joined #ruby
TomyWork has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
coenraad has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Seenox has joined #ruby
tau has quit [Remote host closed the connection]
Hunter1 has quit [Remote host closed the connection]
aglorei has quit [Ping timeout: 248 seconds]
Hunter1 has joined #ruby
tau has joined #ruby
tau has quit [Remote host closed the connection]
aglorei has joined #ruby
mark_66 has joined #ruby
sarbs has quit [Ping timeout: 255 seconds]
weaksauce has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
sarbs has joined #ruby
agent_white has joined #ruby
hutch34 has joined #ruby
pandaant has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
Silthias1 has joined #ruby
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 246 seconds]
bambanx has joined #ruby
vondruch_ has quit [Client Quit]
vondruch_ has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
judofyr has joined #ruby
Silthias has joined #ruby
antgel has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
Silthias1 has quit [Ping timeout: 258 seconds]
vondruch has joined #ruby
vondruch_ has quit [Ping timeout: 260 seconds]
nhhc_ has joined #ruby
nhhc has joined #ruby
nhhc_ has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coenraad has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
jameser has joined #ruby
ur5us has joined #ruby
camilasan has quit [Remote host closed the connection]
dionysus69 has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
InfinityFye has joined #ruby
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
coenraad has joined #ruby
umaaji has quit [Quit: Leaving...]
romankapitonov has joined #ruby
umaaji has joined #ruby
sysvalve has joined #ruby
<alex``> is there a functional version of #tap?
bambanx has quit [Quit: Leaving]
<judofyr> alex``: what's the use case?
marens has quit [Remote host closed the connection]
marens has joined #ruby
<judofyr> does it make a difference whether it's foo.tap { } or tap(foo) { } ?
<judofyr> hmm. maybe combined with Symbol#to_proc
<alex``> I want chain the methods
<alex``> I do something like that, I would know if there is something built-in around
<dminuoso> alex``: What exactly is the point of a functional version of tap?
<judofyr> that's not tap though. tap returns `self`
<dminuoso> I mean..
<alex``> I want only one result without other assignments
vuoto has joined #ruby
<alex``> last = document.search('.pager-last a')[0]['href'].as { <get-index-of-href-link> }
<alex``> with no as:
<alex``> last-page = document.search('.pager-last a')[0]['href']
<judofyr> matthewd: hah. that's very aptly named
<elomatreb> matthewd: Am I correct in seeing that as a map for single objects/non-enumerables? That sounds really nice
<alex``> last-page-index = <get-index-of> last-page
<ljarvis> talking about a functional version of tap is misleading, matthewd mentioned what you want in that link
<ljarvis> (nothing exists in current ruby versions though)
<alex``> I’m just caring about the number in the link
<judofyr> haven't been following ruby-core for years. any other new things I've missed?
<alex``> I need to get the last page index
<ljarvis> judofyr: probably 10391 more aliases
<judofyr> "Added by alexeymuranov (Alexey Muranov) about 5 years ago". wow it's actually a really old issue
<ljarvis> still: GIL
<judofyr> I see tenderlove is doing some GC work?
<matthewd> While "functional" and "inscrutable" can definitely overlap, they don't actually *have* to mean the same thing. I'd just use a variable. ¯\_(ツ)_/¯
hoangtg has joined #ruby
Terens has joined #ruby
<morfin60> i think i should try debug that bad code
<Terens> hello
<judofyr> hi Terens
vuoto has quit [Remote host closed the connection]
<alex``> ljarvis: yield self :OOO
<Terens> If you have a class and at some point X thing happens. So it calls after_X_happened method.
<Terens> Like a callback. I have an argument that this is bad because after_X_happened doesnt describe what actually happens
<elomatreb> Personally I'd leave the _happened off, but that's just taste
<ljarvis> after_X_happened should call methods that are more descriptive about what's happening
<ljarvis> but hooks are a thing and it's fine
<elomatreb> Normally you pass an object to a handler that gives more detailed informations about the event, if necessary
<judofyr> if I'm in full control of the class and don't expect any subclass shenanigans I would probably drop the hook-method and invoke properly named methods directly
ledestin has joined #ruby
<judofyr> once you have inheritance/composition in the picture it can be quite useful to have generic hook methods
aupadhye has joined #ruby
<judofyr> but hey, once you have inheritance in the picture everything is a mess anyway :)
hahuang65 has joined #ruby
pandaant has quit [Remote host closed the connection]
<judofyr> okay. I need help naming something.
<judofyr> it's like a function
<judofyr> you can call it
<judofyr> but it always creates an object
<judofyr> so "constructor" kinda makes sense
<judofyr> but "constructor" is already taken
<elomatreb> Like a factory?
<judofyr> (this is a language where objects are not everything. so there is a point that this constructs an *object*)
<judofyr> hm
<judofyr> yeah, I haven't thought about that point of view
hotpancakes has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
Beams has joined #ruby
<Bish> generator?
mim1k has joined #ruby
coenraad has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
impermanence has joined #ruby
impermanence has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
bronson has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Siyfion has joined #ruby
mfaeh has joined #ruby
camilasan has joined #ruby
z0mbee has joined #ruby
eightlimbed has quit [Ping timeout: 260 seconds]
marr has joined #ruby
umaaji has quit [Quit: Leaving...]
coenraad has joined #ruby
vee_ has quit [Ping timeout: 248 seconds]
postmodern has quit [Quit: Leaving]
judofyr has quit [Remote host closed the connection]
judofyr has joined #ruby
nhhc has quit [Remote host closed the connection]
astrobunny has quit [Remote host closed the connection]
eightlimbed has joined #ruby
hightower2 has quit [Ping timeout: 240 seconds]
judofyr has quit [Ping timeout: 240 seconds]
<Bish> what is a good way to spread/execute code over files
<Bish> i wrote something that comes close to a cronjob handler
<Bish> and i want my rules seperate in files
<Bish> code inside the file should look like
<Bish> with_interval(:often) { puts "something" }
<Bish> now, do i wrap that stuff in a method&module?
<Bish> do i put each of these rules in one big ass module and call all its methods?
judofyr has joined #ruby
<Bish> cool would be something like eval but in not dirty ;;
<elomatreb> I'd put them in seperate files in a subdirectory if they're at least a little more comlicated
<elomatreb> With a method on your class/module that registers a task
<Bish> sure, i did that
<Bish> thats the issue im having
<Bish> right not the whole files only consists of the rules
<Bish> i could File.read and eval them
<Bish> which would be essentially what i want
<Bish> but doesnt feel right
<Bish> so i would wrap them in a method, inside a module, and call this methods
<Bish> these*
<dminuoso> If only Ruby has a functional package/module system...
<dminuoso> require is just misnamed eval_once...
stamina has joined #ruby
<matthewd> *load_once
dionysus69 has quit [Ping timeout: 240 seconds]
<dminuoso> matthewd: Oh. Yeah.
<judofyr> a proper module system would be amazing
BSAlb has quit [Quit: Leaving]
<judofyr> not sure if it's possible to bolt on top
<dminuoso> bolting things ontop is what ruby developers have become exceedingly good at.
<judofyr> I find it interesting that because JS is so limited, they have ended up with a great compiler/transpiler ecosystem
<dminuoso> judofyr: Actually the way that JS modules work would be patched into Ruby with ease.
<dminuoso> *could
someuser has joined #ruby
<dminuoso> Well. actually no.
<judofyr> hehe
<dminuoso> Stupid global namespace of Ruby. :(
<judofyr> well, couldn't you still introduce `export class Foo` ?
<elomatreb> I bet you could do some really funky hackery with const_missing to achieve that
<matthewd> dminuoso: I think it could -- just use locals instead of constants
<judofyr> matthewd: but locals don't cross method definitions
<Bish> so, i basicially have it to like that?
<matthewd> Ah, yeah.. so you'd have to go all-in on define_method etc
<Bish> since ruby doesnt have a great module system
<matthewd> Bish: I don't think you actually want a module system here... I think you want to do read+instance_eval, using separate instances of some appropriate class for each file
<elomatreb> Bish: You may want to take a look at how Rake implements its support for task directories
tvw has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Bish> bleh that shit depresses me
eightlimbed has quit [Read error: Connection reset by peer]
eightlimbed has joined #ruby
sleepee has quit [Quit: Leaving]
eightlimbed has quit [Read error: Connection reset by peer]
eightlimbed has joined #ruby
Serpent7776 has joined #ruby
hotpancakes has joined #ruby
dionysus69 has joined #ruby
nowhere_man has quit [Quit: Konversation terminated!]
nowhere_man has joined #ruby
workmad3 has joined #ruby
ych has joined #ruby
f1ro has joined #ruby
ych is now known as Guest30859
<judofyr> the JS ecosystem has the advantage of compiling it down so that it doesn't have any runtime dependencie
<Bish> self.instance_eval(&module.method(:run))
<Bish> that sounds about right ;;
<dminuoso> judofyr: The issue is that it's more object oriented. When you define a class in Ruby it directly infests global namespace.
<Guest30859> hi, i'm tryign to upload to s3 with aws-ruby-sdk, it fails after 12hours (almost exactly) i tried to look for a configuration parameter of timeout or anything but couldn't find any. anybody familliar?
<judofyr> dminuoso: not in the gist I posted?
<judofyr> 12 hours? you sure are patient…
<dminuoso> judofyr: And what if the module monkey patches String?
agent_white has quit [Ping timeout: 240 seconds]
<dminuoso> by using `class String; def magic; end; end`
nowhere_man has quit [Quit: Konversation terminated!]
eightlimbed has quit [Ping timeout: 260 seconds]
<elomatreb> Can't you do something similar in JS (at least in browser context) if you fiddle with e.g. window?
nowhere_man has joined #ruby
<judofyr> dminuoso: yeah, then you can do that. it's similar in Node/JS as well
Rodya_ has quit [Remote host closed the connection]
<dminuoso> judofyr: You can, that's what `import "foo"` is for.
<dminuoso> judofyr: importing just for the sake of side-effects, as bad as it sounds like.
* Bish always writes get_const instead of const_get
<dminuoso> Though in reality it's used for things like custom loaders in webpack
Rodya_ has joined #ruby
<judofyr> dminuoso: I don't quite understand your point? the idea here is that plain classes can live in their own namespace. you are still free to monkey-patch if you'd like
bronson has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bish> ? does instance_eval emit a parameter?
<dminuoso> emit a parameter?
hotpancakes has quit [Ping timeout: 240 seconds]
<judofyr> Bish: yeah, it yields self
<Bish> oh.
<dminuoso> Bish: *pass an argument
<Bish> pass argument sounds syntaktik to me
sarbs has quit [Ping timeout: 255 seconds]
<Bish> while parameter in runtime would be sent?
<Bish> i dont know if that makes sense
<dminuoso> Bish: argument is what you pass, parameter is the variable arguments are put in.
<dminuoso> foo(1) // 1 is the argument
<dminuoso> def foo(arg) // arg is the parameter
<Bish> okey, thanks
sarbs has joined #ruby
<elomatreb> Great stuff to be pedantic about, friends/coworkers will love you
eightlimbed has joined #ruby
<dminuoso> I dont have friends.
<Bish> neither i do
<Bish> do i*
bronson has quit [Ping timeout: 248 seconds]
<judofyr> elomatreb: that's quite a good argument
jackjackdripper has joined #ruby
<Bish> but my instance_eval does not work :(, could it be because the method is bound?
<judofyr> Bish: yes
<Bish> it seems like the "self" of the method does not get changed
<Bish> well, what do i do?
<dminuoso> Well either way. JavaScript has ended up with quite an elegant module system that is fairly controllable.
<dminuoso> I'm jealous.
<matthewd> Bish: I'm unclear what you're doing at the moment (e.g., the fact you're not passing a string from a file)
<judofyr> Bish: is the method defined in a class or a module?
* Bish is frustrated because there is not THE programming language
<dminuoso> It just sucks how the implementation of JavaScript is completely fragmented by partially running on node, partially running inside webpack/rollup/etc., and partially running inside the browser
<Bish> judofyr: it's defined like "def self.run" inside a module
<Bish> and im getting each submodule of a module and instance_eval its run method
<alex``> is there a difference between yield and block.call?
<Bish> to get my hacky module system
<judofyr> Bish: if you change it to "def run" you should be able to do this:
<matthewd> Bish: Full multi-file gist plz
<dminuoso> alex``: Semantically no.
<judofyr> Mod.instance_method(:run).bind(something).call
<judofyr> at least in recent rubies
<alex``> what is the preffered?
<dminuoso> alex``: A block is just an optimized form of a proc.
<Radar> all this talk about code without the code itself. I am sad.
<judofyr> >> module Foo; def bar; self end end; Foo.instance_method(:bar).bind(123).call
<Bish> why wouldnt i be able to unding the "class method"
<dminuoso> alex``: Or rather, a proc is a block stuffed inside an object.
<judofyr> do we have a bot here?
<elomatreb> yield if it's not necessary to use it as an object
<Radar> judofyr: yes, but you might not have access to it or it's shit the bed again
<Bish> if i call .bind on a method, will the method get copied?
<dminuoso> I always pass it as an object to make it more readable.
<Radar> >> module Foo; def bar; self end end; Foo.instance_method(:bar).bind(123).call
<ruby[bot]> Radar: # => 123 (https://eval.in/834429)
<alex``> to my point of view `block` is explicit, and yield hidden from method declaration
<dminuoso> alex``: Precisely.
<alex``> def foo
<judofyr> Radar: why are you special? :((
<dminuoso> alex``: That's why I prefer explicitly binding blocks to procs.
<alex``> yield 2
<alex``> end
<alex``> def foo &block
<Radar> judofyr: /whois Radar probably has something to do with it.
<alex``> block.call 2
<alex``> end
<dminuoso> alex``: Consider things like block_given? and yield as tools for libraries that want to avoid unnecessary overhead.
<Radar> alex``: You could write that on one line ;)
<Bish> if i call .bind on a method, will it change/move the original method
<Bish> or do something like that?
<alex``> thus I prefer `block` rather than `yield`
<elomatreb> You can still call a method that has an explicit block parameter without the block though, right? As in, it will only error when it tries to call the block?
<judofyr> Bish: copied? nope
<dminuoso> alex``: I also prefer lambda over proc/block
<alex``> but how do the same for `block_given?`?
<dminuoso> Because.. `return`
<Bish> judofyr: so, the method vanishes from the original owner?
<judofyr> Bish: no. it's still there. a Method is just a reference to an UnboundMethod + an owner
<alex``> would `if block` work?
<alex``> def foo &block
<dminuoso> alex``: i.e. foo(-> { |arg| .... }) over foo() { |arg| }
<alex``> if block
<alex``> block.call
<matthewd> alex``: Please stop with the multi-line code
<alex``> oki
<dminuoso> alex``: But only because I've been writing JavaScript so much, that the value of treating these freaking functions as objects is more than the elegance of blocks.
<Bish> judofyr: but.. there have to be at least something twice if the original stays intact
<elomatreb> Yes it would, block is nil if you didn't pass a block
<matthewd> Bish: Please start with the [gist of] code
coenraad has quit [Ping timeout: 255 seconds]
<alex``> so to resume, we can replace
<Bish> my questions regarding the code are already finished, just want to know the ruby behaviour now
<judofyr> Bish: well, yeah, the Method instance is copied, but it doesn't actually contain the code or anything
<alex``> yield -> block.call
<Bish> judofyr: great, thanks
<alex``> block_given? -> block
<alex``> ?
<dminuoso> alex``: Yes.
<alex``> Cool
<Bish> so same method, 2 times information about the owner
<dminuoso> alex``: Or like me, avoid blocks entirely whenever possible!
<Radar> Bish: Please just show us some code that you're asking about rather than talking about it.
<alex``> dminuoso: why?
<Bish> Radar: im done already :> thanks
<elomatreb> But it's not the general convention, many people prefer to use yield/block_given? wherever possible
<Radar> Bish: Ok. Remember this for next time then
<Bish> sure, always do
<dminuoso> alex``: predicate = -> { |e| e.isSexy? && applyMagic(e).hasStyle };
<dminuoso> alex``: now you can take that predicate and do things with it. like. array.filter(predicate)
<judofyr> Bish: oh, and I should be precise: the owner of a method is *not* self. the owner is the class/module which defines it
<judofyr> Bish: "receiver" is self
<ljarvis> then slap dminuoso for using camelCase
<dminuoso> ljarvis: Haha!
<judofyr> >> 123.method(:+).receiver # => 123
<alex``> dminuoso: is yield and block_given? considered bad pratice? over explicit &block in method declaration?
<elomatreb> iNVERSEcAMELcASE is the superior naming scheme
f1ro has left #ruby ["Leaving"]
<judofyr> >> 123.method(:+).owner # => Integer
<ljarvis> yield is better than block.call
<alex``> why
<dminuoso> alex``: I'm not the best person to tell you about bad and good practices.
Hunter1 has quit [Remote host closed the connection]
<dminuoso> I'm... special.
Hunter1 has joined #ruby
<matthewd> alex``: Performance, for one
<alex``> ljarvis: yield and block_given? come from no where to my point of view
<ljarvis> I don't understand what that means
<alex``> XD
<elomatreb> Also the error is better, trying to call a non-given block gives an infamous undefined method for nil
<dminuoso> See, yet another reason why you shouldnt procify in the parameter
<ljarvis> the only downside really is the method signature is less knowledgeable
<dminuoso> def meth(callable); callable.call(1); end
<dminuoso> elomatreb: ^-
<ljarvis> but it's ruby, so method sigs mean absolutely nothing anyway
<dminuoso> cant dodge that bullet!
<judofyr> Bish: interesting. behind the scenes a Method and an UnboundMethod stores the exact same data: https://github.com/ruby/ruby/blob/a14cb8ad5b432bcda7b6a4a0ee41a1a292d0b568/proc.c#L29
<elomatreb> I would like a way to specify that a method may take a block or not tbh
<alex``> dminuoso: def meth(&callable); callable&.call(1); end
<judofyr> Bish: it's just that UnboundMethod ignores the `recv`-field
<alex``> & ensure giving block and &.call not nil
<Bish> doesnt actually suprise me :o would have done it that way
<judofyr> but yeah, as you can see a (Unbound)Method is stores just three things: recevier, owner/class and a reference to the actual method body
<alex``> thanks for the clarification
<dminuoso> elomatreb: def meth(callable = ->{}); end
<dminuoso> :P
<elomatreb> alex``: Now you've just silenced the error?
<alex``> elomatreb: yep XD
rgtk has joined #ruby
<dminuoso> elomatreb: though "may take a block or not" now depends on what the behavior should be if no block was passed.
<elomatreb> dminuoso: I'd also be interested in the inverse, a method erroring if you give it a block without it being defined as taking one
<dminuoso> would it default to something? this makes sense for things like #sort
<judofyr> why does super() still automatically pass the block up? I thought that would have been cleaned up by now…
<Bish> judofyr: why exactly can't i do that with singleton methods?
<dminuoso> elomatreb: See, _yet_ another reason why passing as actual arguments is an advantage.
<judofyr> Bish: instance methods on modules are special
<Bish> special like dminuoso ?
<dminuoso> >> def foo; end; foo(->{}); # elomatreb
<ruby[bot]> dminuoso: # => wrong number of arguments (given 1, expected 0) (ArgumentError) ...check link for more (https://eval.in/834442)
<judofyr> Bish: you can't do it on other instance methods
<Bish> too bad.
<judofyr> Bish: and singleton methods are just instance methods on the singleton class
<Bish> but my code works now, thanks
<dminuoso> elomatreb: This whole monstreous hack of blocks just for the sake of avoiding object creation leaks in the language and leads to brittle code design.
<judofyr> it's because it doesn't make sense to Integer.instance_method(:+).bind("Hello")
<elomatreb> I do agree, but I would like it to behave like blocks do now. Avoiding the both performance and mental overhead of creating lambdas for everything
* Bish wrote his own cron-job, and wheel
<dminuoso> elomatreb: Do you know what the price is?
<dminuoso> Because I do.
<dminuoso> lambdas are cheap as fuck.
<judofyr> Bish: it's actually a recent change regarding the module instance method. previously you could only bind it to an object which included the module
<elomatreb> Performance is less of a concern for me, but it's what people usually cite when advocating yield over explicit block calling/lambdas
<judofyr> or. well. I don't know how recent it is
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
<Bish> it's weird, because im sure i did that
<judofyr> I think it was added in 2.x something
<dminuoso> elomatreb: Micro-optimizations. It's fine if the standard library does it, because it can't make assumptions whether it will be in hotspots or not.
<dminuoso> Or for general libraries.
<Bish> i always used instance_eval() and expected the called method thinks self is the receiver of instance_eval
<Bish> amd somehow it always worked
<Bish> didn't know i couldnt method use completely like procs
<judofyr> Bish: hm. Method#to_proc creates a proc which basically ignores `self` and always uses the bound receiver
<Bish> i did that, and self. stayed on the owner
<Bish> confused the fuck out of m
<dminuoso> elomatreb: The price of creating a lambda over a block is essentially just a single C function `rb_data_typed_object_zalloc`
<elomatreb> I agree on it being a often pointless microoptimization
eightlimbed has quit [Ping timeout: 260 seconds]
<judofyr> often? how about always?
<Bish> microoptimizing ruby
<Bish> *laughs*
<ljarvis> never, always microoptimize
naprimer is now known as cherry-pick
<matthewd> Yeah, I'll agree that while I normally care about it, average app code needn't
<Bish> ruby is slow af no matter what you do </opinion>
<elomatreb> https://github.com/JuanitoFatas/fast-ruby#proccall-and-block-arguments-vs-yieldcode If it's in a hotspot that might be significant
<ljarvis> definitely untrue
jaruga has joined #ruby
<judofyr> elomatreb: yes, if you're just calling the same method over and over again without doing *anything* else
hightower2 has joined #ruby
<judofyr> once you actually start doing real work, the difference in yield/block.call won't matter anymore
<elomatreb> As I said, "often"
<matthewd> Tricky micro-opts are best reserved for especially hot spots, but "free" gains have broader value in widely-used libraries
<dminuoso> elomatreb: ^- that. The problem with that is the main cost stems from the GC.
<dminuoso> elomatreb: I you avoid any object creations, the GC wont interfere with you at all.
<ljarvis> ehm
* ljarvis opens book "how to prove anything anyone says about Ruby wrong"
<dminuoso> ljarvis: What do you mean?
<Bish> chapter 1-9 GC
<judofyr> in what use case do you repeatedly call a method with a block, without doing any other memory- or CPU-bound work?
<matthewd> The one I've never actually investigated is when a block gets passed down through say 10 method calls
astrobunny has joined #ruby
<ljarvis> dminuoso: just kidding
<matthewd> If they all use &block, you pay the allocation/blockification once -- vs a bunch of calls with { |a,b| yield a, b } blocks
ferr has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
<dminuoso> matthewd: I think that is an interesting point. Especially if you pre-construct the lambda once, such as `predicate = -> { |a| a.odd? }` and then pass it in, it disappears.
<dminuoso> The overhead I mean.
ur5us has quit [Remote host closed the connection]
<matthewd> Yeah, that variant's less interesting to me, just because the outermost call is normally in user code, but it would also have a relevant impact
hahuang65 has joined #ruby
tvon_ has quit [Remote host closed the connection]
tvon has joined #ruby
eightlimbed has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
tvon has quit [Ping timeout: 248 seconds]
nowhere_man has quit [Ping timeout: 248 seconds]
pandaant has joined #ruby
mfaeh has quit [Remote host closed the connection]
mfaeh has joined #ruby
mfaeh has quit [Remote host closed the connection]
mfaeh has joined #ruby
stamina has quit [Quit: WeeChat 1.9]
ltem has joined #ruby
ElFerna has joined #ruby
ElFerna has quit [Client Quit]
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
hotpancakes has joined #ruby
sagax has joined #ruby
bronson has joined #ruby
<sagax> hi all
<sagax> how to use ruby[bot] ?
doublemalt_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<elomatreb> >> "hello world" # sagax
<ruby[bot]> elomatreb: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<elomatreb> n i c e
<sagax> >> puts "test"
<ruby[bot]> sagax: # => test ...check link for more (https://eval.in/834470)
<sagax> puts 2 + 2
<sagax> >> puts 2 + 2
<ruby[bot]> sagax: # => 4 ...check link for more (https://eval.in/834471)
<sagax> ok
<elomatreb> Don't be too surprised if it breaks, it tends to do that
bronson has quit [Ping timeout: 260 seconds]
tvon has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
mim1k has quit [Ping timeout: 255 seconds]
jackjackdripper has quit [Quit: Leaving.]
mim1k has joined #ruby
eightlimbed has quit [Ping timeout: 260 seconds]
eightlimbed has joined #ruby
mfaeh has quit [Remote host closed the connection]
mfaeh has joined #ruby
eightlimbed has quit [Client Quit]
eightlimbed has joined #ruby
jameser has joined #ruby
tvon has quit []
<judofyr> >> 1 + 1
<judofyr> I still don't understand why it doesn't like me :(
<matthewd> judofyr: You're not identified with nickserv
eightlimbed has quit [Ping timeout: 260 seconds]
<judofyr> oooh, I reconnected
<judofyr> I haven't setup auto-login yet
Beams has quit [Quit: .]
<judofyr> >> 1 + 1
<ruby[bot]> judofyr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
Beams has joined #ruby
<matthewd> Now it's just broken :P ... it does that sometimes
astrobunny has joined #ruby
astrobunny has quit [Ping timeout: 268 seconds]
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
<judofyr> >> 1 + 1
<ruby[bot]> judofyr: # => 2 (https://eval.in/834484)
<judofyr> charliesome!
<judofyr> where are you?
ldnunes has joined #ruby
Rodya_ has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 246 seconds]
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
rgtk has quit [Ping timeout: 276 seconds]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jphase has quit [Changing host]
jphase has joined #ruby
<dminuoso> matthewd: In JS it's often not noticeable to create tons of functions in hot spots, but then again v8 has some pretty nifty techniques to optimize highly dynamic code paths away.
<dminuoso> matthewd: I think if we had a proper JIT it might be even less relevant in Ruby.
milardovich has joined #ruby
<dminuoso> Dunno how truffle/graalvm handles such cases, perhaps chrisseaton is around?
camilasann has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
camilasan has quit [Ping timeout: 260 seconds]
Guest30859 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
t-recx has joined #ruby
synthroid has joined #ruby
livcd has quit [Remote host closed the connection]
bronson has joined #ruby
judofyr has quit [Remote host closed the connection]
judofyr has joined #ruby
Rodya_ has quit [Remote host closed the connection]
hotpancakes has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
apparition has joined #ruby
judofyr has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Ping timeout: 255 seconds]
belmoussaoui_ has quit [Read error: Connection reset by peer]
belmoussaoui has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
belmoussaoui__ has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
belmoussaoui has quit [Ping timeout: 255 seconds]
nanoz has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
apparition47 has joined #ruby
belmoussaoui__ has quit [Read error: Connection reset by peer]
belmoussaoui has joined #ruby
ledestin has joined #ruby
Beams has quit [Quit: .]
astrobunny has joined #ruby
mim1k has joined #ruby
judofyr has joined #ruby
take5 has joined #ruby
ledestin has quit [Ping timeout: 240 seconds]
astrobunny has quit [Ping timeout: 260 seconds]
judofyr has quit [Ping timeout: 248 seconds]
<Bish> i often ecapsulate my logic into many modules
milardovich has quit [Remote host closed the connection]
Beams has joined #ruby
<Bish> i always tend to do class << self;def handle;end;end;
<Bish> and in the dispatcher something like handler.handle(job)
milardovich has joined #ruby
<Bish> should i step back from those singleton functions?
<Bish> and rather have instance methods which i call? or even use .new on each handler?
milardovich has quit [Remote host closed the connection]
sepp2k has joined #ruby
milardovich has joined #ruby
<matthewd> Bish: I think I'd need more context to have a coherent opinion, but... maybe?
hahuang65 has joined #ruby
<matthewd> Bish: Ultimately, it's up to whatever you find most pleasant to work with, though
<Bish> well its a pretty general question of you have some sort of work to be done
<Bish> and 12831823 ways to do it
<Bish> like a database event that can be handled and u have a shitton handlers for that
<Bish> how would you build it
iceden|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
iceden has joined #ruby
<Bish> right now im having modules with a singleton handle method
<Bish> if they need to capsulate complexity, they can have classes on their own
<Bish> that was my argumentation there
shiru has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
belmoussaoui has quit [Ping timeout: 246 seconds]
<matthewd> I think I'd generally default to something involving instance methods
pandaant has quit [Remote host closed the connection]
shiru has quit [Remote host closed the connection]
<Bish> hm
<matthewd> For something closer to what you described, I'd make the common method `call` instead of `handle`, so simpler ones can just be a Proc
<Bish> hm, that'd be clever
<Bish> can i has instance_eval without yielding self?
apparition47 has quit [Quit: Bye]
<matthewd> On the "instance methods" front, I think circumstances would dictate a choice between `send("handle_#{event_type}", event)` and `Handlers[event_type].new(event).call`, say
<Bish> i even encapsulated each event in its own module
<matthewd> You might want instance_exec
apparition47 has joined #ruby
<Bish> so i have something like
<Bish> MessageHandler.constants.map { |x| [x.to_s.gsub(/(.)([A-Z])/,'\1_\2').downcase,MessageHandler.const_get(x)] }.to_
<Bish> which is a map from evnet name to handler module name
<Bish> (so i can just add modules and they will handle stuff)
<Bish> i think i will go the zombie-in-between version
<Bish> callable modules
ych has joined #ruby
ych is now known as Guest38836
ltem has quit [Quit: Leaving]
impermanence has joined #ruby
impermanence has quit [Client Quit]
belmoussaoui has joined #ruby
jaruga has quit [Quit: jaruga]
bronson has joined #ruby
Papierkorb has quit [Ping timeout: 268 seconds]
gnufied has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
rgtk has joined #ruby
andikr has quit [Remote host closed the connection]
charliesome has joined #ruby
jaruga has joined #ruby
dviola has joined #ruby
troulouliou_dev has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
troulouliou_dev has quit [Client Quit]
charliesome has quit [Client Quit]
Papierkorb has joined #ruby
hotpancakes has joined #ruby
troulouliou_dev has joined #ruby
jdawgaz has joined #ruby
Beams has quit [Quit: .]
Beams has joined #ruby
ShekharReddy has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
ar1a_ has joined #ruby
ElFerna has joined #ruby
ar1a has quit [Ping timeout: 255 seconds]
alex`` has quit [Quit: WeeChat 1.9]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rfoust has joined #ruby
jdawgaz has joined #ruby
nopolitica has quit [Quit: WeeChat 1.9]
oleo has joined #ruby
Xiti has quit [Quit: Xiti]
charliesome has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
paolo_ has joined #ruby
jdawgaz has quit [Ping timeout: 240 seconds]
frmendes has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
DLSteve has joined #ruby
coenraad has joined #ruby
stoffus has quit [Quit: leaving]
paolo_ has quit [Quit: paolo_]
__Yiota has joined #ruby
Xiti has joined #ruby
mfaeh has quit [Remote host closed the connection]
mfaeh has joined #ruby
hutch34 has joined #ruby
frmendes has quit [Quit: Textual IRC Client: www.textualapp.com]
roshanavand has quit [Ping timeout: 255 seconds]
frmendes has joined #ruby
alex`` has joined #ruby
alex`` has quit [Client Quit]
milardovich has quit [Remote host closed the connection]
jhooker has joined #ruby
chouhoulis has joined #ruby
frmendes has quit [Client Quit]
pwned has joined #ruby
frmendes has joined #ruby
ElFerna has quit [Ping timeout: 260 seconds]
guardianx has joined #ruby
<dminuoso> 0 => [a]. 1 => [a-1, a, a+1], 2 => [a-2, a-1, a, a+1, a+2]
<dminuoso> I find this surprisingly difficult to nail this in an elegant fashion...
ElFerna has joined #ruby
<dminuoso> Oh.
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
chouhoulis has quit [Ping timeout: 255 seconds]
<dminuoso> (-n..n).map { |q| a + q }
bkxd has joined #ruby
bkxd_ has joined #ruby
iMadper` has joined #ruby
kobain has joined #ruby
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
cam27 has joined #ruby
frmendes has quit [Quit: leaving]
frmendes has joined #ruby
chouhoulis has joined #ruby
sylario has joined #ruby
impermanence has joined #ruby
bronson has joined #ruby
coenraad has quit [Ping timeout: 255 seconds]
impermanence has quit [Client Quit]
frmendes has quit [Quit: leaving]
frmendes has joined #ruby
Rapture has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 246 seconds]
mim1k has quit [Ping timeout: 248 seconds]
rgtk has quit [Ping timeout: 268 seconds]
smulverine has quit [Quit: WeeChat 1.9]
chouhoul_ has joined #ruby
hightower2 has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
chouhoulis has quit [Ping timeout: 258 seconds]
nebiros has left #ruby ["Textual IRC Client: www.textualapp.com"]
hotpancakes has joined #ruby
ansraliant has joined #ruby
shinnya has joined #ruby
ansraliant has quit [Client Quit]
cdg has quit [Remote host closed the connection]
mfaeh has quit [Remote host closed the connection]
mark_66 has quit [Quit: Leaving.]
ansraliant has joined #ruby
ansraliant has joined #ruby
ansraliant has quit [Changing host]
mfaeh has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
rundor has joined #ruby
mtkd has joined #ruby
apparition47 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
guardianx has quit [Remote host closed the connection]
coenraad has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
vee_ has joined #ruby
apparition47 has joined #ruby
guardianx has joined #ruby
mfaeh has quit [Remote host closed the connection]
mfaeh has joined #ruby
TomyWork has quit [Remote host closed the connection]
oliv_____ has joined #ruby
oliv_____ has quit [Client Quit]
oliv_____ has joined #ruby
astrobunny has joined #ruby
bkxd__ has joined #ruby
bkxd___ has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
bkxd_ has quit [Ping timeout: 268 seconds]
bruno- has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
coenraad has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
ltem has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
ElFerna has quit [Ping timeout: 255 seconds]
coenraad has joined #ruby
alex`` has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
Serpent7776 has quit [Quit: Leaving]
hotpancakes has joined #ruby
milardovich has joined #ruby
bronson has joined #ruby
kies has quit [Ping timeout: 240 seconds]
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phinxy has joined #ruby
roshanavand has joined #ruby
apparition47 has quit [Quit: Bye]
ElFerna has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Remote host closed the connection]
Guest38836 has quit [Quit: Textual IRC Client: www.textualapp.com]
bkxd has joined #ruby
digitalnomad has joined #ruby
bkxd___ has quit [Ping timeout: 260 seconds]
bkxd__ has quit [Ping timeout: 255 seconds]
psychicist__ has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
kies has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
t-recx has quit [Quit: t-recx]
TomyLobo has joined #ruby
uZiel has joined #ruby
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coenraad_ has joined #ruby
bkxd has joined #ruby
coenraad has quit [Ping timeout: 267 seconds]
astrobunny has joined #ruby
hotpancakes has joined #ruby
brent__ has joined #ruby
aufi has quit [Quit: Leaving]
brent__ has quit [Remote host closed the connection]
guardianx has quit []
brent__ has joined #ruby
bkxd_ has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
jaruga has quit [Quit: jaruga]
jaruga has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
bkxd_ has quit [Ping timeout: 268 seconds]
bruno- has quit [Ping timeout: 248 seconds]
phinxy has quit [Read error: Connection reset by peer]
phinxy has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Ping timeout: 248 seconds]
perniciouscaffei has joined #ruby
mikecmpb_ has joined #ruby
cam27 has quit [Quit: cam27]
bruno- has joined #ruby
doublemalt_ has quit [Ping timeout: 240 seconds]
cherry-pick-2 has joined #ruby
usr_share has joined #ruby
tau has joined #ruby
cherry-pick has quit [Ping timeout: 240 seconds]
<usr_share> So i have this little situation on a shell server, where ruby itself is installed in the standard location, but the header files (which should be in /usr/lib/ruby/include/ruby.h) are in a different spot. i figured out that their location can be set with an rbconfig variable named "rubyhdrdir". How do I set its value?
<usr_share> is it an environment variable or is there a config file somewhere?
Luyt has joined #ruby
enterprisey has quit [Remote host closed the connection]
digitalnomad has joined #ruby
synthroid has quit [Remote host closed the connection]
coenraad_ has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
cdg has joined #ruby
troulouliou_dev has joined #ruby
psychicist__ has joined #ruby
enterprisey has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
rundor has quit [Remote host closed the connection]
npgm has joined #ruby
cdg_ has joined #ruby
synthroid has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
belmoussaoui has quit [Ping timeout: 255 seconds]
belmoussaoui has joined #ruby
InfinityFye has quit [Ping timeout: 255 seconds]
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 248 seconds]
digitalnomad has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
nebiros has joined #ruby
nebiros has left #ruby ["Be back later..."]
psychicist__ has quit [Quit: leaving]
kobain has quit [Ping timeout: 255 seconds]
InfinityFye has joined #ruby
roshanavand has joined #ruby
shinnya has quit [Ping timeout: 248 seconds]
haylon has joined #ruby
tvw has quit [Remote host closed the connection]
<haylon> Anyone have troubles with Rake saying there was an issue with teh create_shell_runner when executing a shell command, however, I can execute other shell commands just fine. When I reun the erroring shell command by hand, it works.
kies has quit [Ping timeout: 260 seconds]
z3uS has quit [Ping timeout: 276 seconds]
sysvalve has quit [Quit: Leaving]
hotpancakes has quit [Remote host closed the connection]
polishdub has joined #ruby
astrobunny has joined #ruby
sarmiena_ has joined #ruby
sekmo has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
ferr has quit [Quit: WeeChat 1.9]
mikecmpb_ has quit [Ping timeout: 240 seconds]
t-recx has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
cagomez has joined #ruby
SteenJobs has joined #ruby
hahuang65 has joined #ruby
al2o3-cr has quit [Ping timeout: 255 seconds]
gothicsouth has joined #ruby
pecan has quit [Quit: WeeChat 1.6]
ElFerna has quit [Ping timeout: 255 seconds]
troulouliou_dev has quit [Quit: Leaving]
SteenJobs has quit [Ping timeout: 246 seconds]
gloscombe has joined #ruby
hotpancakes has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
ltem has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rundor has joined #ruby
gr33n7007h has joined #ruby
__Yiota has joined #ruby
rundor_ has joined #ruby
Beams has quit [Quit: .]
roshanavand has quit [Ping timeout: 276 seconds]
rundor has quit [Ping timeout: 255 seconds]
lxsameer has quit [Quit: WeeChat 1.7]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
z3uS has joined #ruby
marxarelli|afk is now known as marxarelli
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
cyfr0n1 has joined #ruby
Miron has left #ruby [#ruby]
Miron has joined #ruby
romankapitonov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cyfr0n1 has left #ruby [#ruby]
dstrunk has joined #ruby
renchan has quit [Quit: Leaving...]
peter1 has joined #ruby
frmendes has quit [Ping timeout: 240 seconds]
alex`` has quit [Quit: WeeChat 1.9]
TomyLobo2 has joined #ruby
peter1 is now known as pecan
oliv_____ has quit [Remote host closed the connection]
jordanm has quit [Quit: Konversation terminated!]
bronson has joined #ruby
cagomez has quit [Remote host closed the connection]
oliv_____ has joined #ruby
cagomez has joined #ruby
TomyLobo has quit [Ping timeout: 255 seconds]
sekmo has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 255 seconds]
oliv_____ has quit [Ping timeout: 248 seconds]
cornfeedhobo has joined #ruby
cagomez has quit [Ping timeout: 268 seconds]
antgel has quit [Ping timeout: 240 seconds]
jordanm has joined #ruby
<cornfeedhobo> hello. is it possible to split a string up while interpolating?
<apeiros> cornfeedhobo: not sure I understand what you want to do, can you make an example?
cschneid_ has joined #ruby
<cornfeedhobo> a more complete question would be: I have a string "foo,bar,baz" and I would like to turn it into an array
<apeiros> &ri String#split cornfeedhobo
<cornfeedhobo> cool. thanks
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
mikecmpbll has joined #ruby
hahuang65 has joined #ruby
kies has joined #ruby
dstrunk has joined #ruby
ski7777 has joined #ruby
eightlimbed has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
cagomez has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gloscombe has quit [Quit: WeeChat 1.9]
jphase has joined #ruby
ShekharReddy has joined #ruby
milardovich has quit [Remote host closed the connection]
aupadhye has quit [Ping timeout: 255 seconds]
cinayakoshka has joined #ruby
astrobunny has joined #ruby
rekkoha has joined #ruby
duderonomy has joined #ruby
haylon has quit [Remote host closed the connection]
ski7777 has quit [Remote host closed the connection]
uZiel has quit [Ping timeout: 248 seconds]
SteenJobs has joined #ruby
romankapitonov has joined #ruby
deep-book-gk_ has joined #ruby
astrobunny has quit [Ping timeout: 260 seconds]
deep-book-gk_ has left #ruby [#ruby]
rippa has joined #ruby
SteenJobs has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
olivi____ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
ski7777 has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
cam27 has joined #ruby
olivi____ has quit [Ping timeout: 255 seconds]
cagomez has quit [Remote host closed the connection]
InfinityFye has quit [Quit: Leaving]
cagomez has joined #ruby
__Yiota has joined #ruby
sgen has quit [Remote host closed the connection]
sarmiena_ has quit [Ping timeout: 246 seconds]
xt233 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
lxsameer has joined #ruby
bronson has joined #ruby
sarmiena_ has joined #ruby
hotpancakes has joined #ruby
hotpanca_ has joined #ruby
dyjakan has left #ruby [#ruby]
bronson has quit [Ping timeout: 255 seconds]
u_nuSLASHkm8 has joined #ruby
roshanavand has joined #ruby
rgtk has quit [Ping timeout: 268 seconds]
hotpancakes has quit [Ping timeout: 246 seconds]
u_nuSLASHkm8 has left #ruby [#ruby]
olivi____ has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
xt233 has quit [Quit: Leaving]
ozcanesen has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
romankap_ has joined #ruby
romankapitonov has quit [Read error: Connection reset by peer]
olivi____ has quit [Ping timeout: 260 seconds]
Rapture has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nadir has quit [Quit: Connection closed for inactivity]
pwned has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
andrzejku has joined #ruby
VladGh has quit [Ping timeout: 255 seconds]
astrobunny has joined #ruby
uZiel has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
petruff has joined #ruby
uZiel has quit [Remote host closed the connection]
swills has quit [Remote host closed the connection]
hotpancakes has joined #ruby
astrobunny has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
oliv_____ has joined #ruby
hotpancakes has joined #ruby
dionysus69 has joined #ruby
rgtk has joined #ruby
_Bin4ry has joined #ruby
coenraad has joined #ruby
SeepingN has joined #ruby
VladGh has joined #ruby
theunraveler has joined #ruby
loincloth has joined #ruby
rundor_ has quit [Remote host closed the connection]
whippythellama has quit [Ping timeout: 240 seconds]
swills has joined #ruby
<Luyt> How do you call Ruby code which is idiomatic? Rubyesque?
jaruga has quit [Quit: jaruga]
swills has quit [Remote host closed the connection]
<jhass> yeah
<havenwood> Rubyish
<havenwood> ;-P
<havenwood> "off the Rails"
whippythellama has joined #ruby
<havenwood> j/k j/k
<havenwood> jhass: o/
<jhass> o/
<havenwood> Luyt: A Rubyist with Rubyesque code sounds pretty good.
<Luyt> 'Rubyonic' doesn't have that refined tone 'Rubyesque' evokes...
Rapture has joined #ruby
milardovich has joined #ruby
rubycoder35 has joined #ruby
swills has joined #ruby
swills has joined #ruby
arquebus has joined #ruby
rubycoder35 has quit [Client Quit]
ElFerna has joined #ruby
tacoboy has joined #ruby
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
bronson has joined #ruby
arquebus has quit [Quit: konversation disconnects]
tinyurl_comSLASH has joined #ruby
tinyurl_comSLASH has quit [Excess Flood]
ascarter has joined #ruby
ozcanesen has joined #ruby
petruff has quit [Ping timeout: 255 seconds]
cagomez has quit [Ping timeout: 258 seconds]
jackjackdripper has joined #ruby
hotpanca_ has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
tinyurl_comSLASH has joined #ruby
ozcanesen has quit [Client Quit]
gusrub has quit [Remote host closed the connection]
* apeiros actually just calls it "idiomatic"
hotpancakes has quit [Ping timeout: 246 seconds]
<SeepingN> Rubish
tinyurl_comSLASH has left #ruby [#ruby]
frmendes has joined #ruby
<apeiros> I'd expect that from Papierkorb…
vee_ has quit [Ping timeout: 260 seconds]
gusrub has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<ineb> rubbish
whippythellama has quit [Ping timeout: 240 seconds]
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
digitalnomad has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gothicsouth has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
cagomez has joined #ruby
tinyurl_comSLASH has joined #ruby
tinyurl_comSLASH has left #ruby [#ruby]
sgen has joined #ruby
dcunit3d has joined #ruby
romankap_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
dviola has quit [Quit: WeeChat 1.9]
rundor has joined #ruby
ElFerna has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
mfaeh has quit [Remote host closed the connection]
mfaeh has joined #ruby
kobain has joined #ruby
milardov_ has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
hahuang65 has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
astrobunny has joined #ruby
gusrub has quit [Remote host closed the connection]
cagomez has joined #ruby
ascarter_ has joined #ruby
cagomez has quit [Remote host closed the connection]
hahuang65 has joined #ruby
cagomez has joined #ruby
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
ascarter_ has quit [Client Quit]
usr_share has left #ruby [#ruby]
wilbert has joined #ruby
frmendes has quit [Ping timeout: 240 seconds]
cam27 has quit [Quit: cam27]
cagomez has quit [Ping timeout: 240 seconds]
whippythellama has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
ahrs has quit [Remote host closed the connection]
ShekharReddy has quit [Quit: Connection closed for inactivity]
gusrub has joined #ruby
ascarter has joined #ruby
ahrs has joined #ruby
cam27 has joined #ruby
ElFerna has quit [Ping timeout: 260 seconds]
ascarter has quit [Client Quit]
shinnya has quit [Ping timeout: 255 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
ltem has joined #ruby
ElFerna has joined #ruby
ascarter has joined #ruby
ascarter has quit [Client Quit]
someuser has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
TvL2386 has quit [Ping timeout: 248 seconds]
ujjain has quit [Quit: ZNC - 1.6.0 - http://znc.in]
cagomez has joined #ruby
milardov_ has quit [Read error: Connection reset by peer]
astrobunny has quit [Ping timeout: 240 seconds]
rundor has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
bronson has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bronson has quit [Ping timeout: 255 seconds]
oliv_____ has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
oliv_____ has joined #ruby
cagomez has quit [Remote host closed the connection]
hotpancakes has joined #ruby
belmoussaoui has quit [Quit: belmoussaoui]
frmendes has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
perniciouscaffei has joined #ruby
rgtk has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
cagomez has joined #ruby
hutch34 has joined #ruby
andrzejku has quit [Quit: Textual IRC Client: www.textualapp.com]
cagomez has quit [Ping timeout: 260 seconds]
theunraveler has quit []
dn` has quit [Remote host closed the connection]
dn` has joined #ruby
hotpancakes has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cornfeedhobo has left #ruby ["when i leave, come together like butt cheeks"]
uZiel has joined #ruby
belmoussaoui_ has joined #ruby
ramfjord has joined #ruby
mikecmpbll has joined #ruby
MrBismuth has quit [Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel]
milardovich has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
kkiero has joined #ruby
cagomez has joined #ruby
tvw has joined #ruby
<kkiero> hi
<kkiero> is word.mb_chars.upcase the best solution when word contains some l1anguage-specific letters?
TvL2386 has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
DTZUZU has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
vee_ has joined #ruby
ElFerna has quit [Ping timeout: 260 seconds]
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
_Bin4ry has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has quit [Remote host closed the connection]
synthroid has quit []
digitalnomad has joined #ruby
gr33n7007h is now known as al2o3-cr
mathys has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
ElFerna has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
sarmiena_ has quit [Quit: sarmiena_]
gusrub has quit [Remote host closed the connection]
brent__ has joined #ruby
astrobunny has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 240 seconds]
enterprisey has quit [Remote host closed the connection]
bronson has joined #ruby
cschneid_ has joined #ruby
mikecmpbll has joined #ruby
dcunit3d has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
ldnunes has quit [Quit: Leaving]
gusrub has joined #ruby
cagomez has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
mikecmpbll has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
<havenwood> >> 'José'.upcase
<ruby[bot]> havenwood: # => "JOSé" (https://eval.in/834700)
<havenwood> kkiero: In Ruby 2.4 that ^ returns: "JOSÉ"
<havenwood> kkiero: The best solution is to use Ruby 2.4 if that's available.
<havenwood> 2.4.1
<kkiero> what if it's not possible to use ruby 2.4?
<kkiero> then my solution?
mathys has quit [Quit: Leaving]
milardovich has joined #ruby
kkiero_ has joined #ruby
ledestin has joined #ruby
kkiero has quit [Ping timeout: 260 seconds]
tpendragon has quit [Remote host closed the connection]
giraffe has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 255 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest67830 is now known as julian
cagomez has joined #ruby
<havenwood> kkiero_: what version of Ruby?
gothicsouth has joined #ruby
<havenwood> I'm assuming if you can't upgrade Ruby that patching and recompiling is also out?
ltem has quit [Quit: Leaving]
oliv_____ has quit [Remote host closed the connection]
whippythellama has quit [Ping timeout: 255 seconds]
oliv_____ has joined #ruby
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<kkiero_> unfortunatelly no
<kkiero_> i'm creating mac automator service
<kkiero_> and it uses system ruby
<kkiero_> which is 2.0.0
<havenwood> High Sierra is Ruby 2.3 fwiw.
<kkiero_> yep, but macOS sierra in this case
<havenwood> kkiero_: I don't know if anyone has backported the unicode case enhancements and made a gem of it.
ur5us has joined #ruby
<kkiero_> but is it the best solution in my case?
<havenwood> kkiero_: Is this a Rails app?
<kkiero_> no, just ruby script
<havenwood> kkiero_: If you'd like you can cherry pick the method from ActiveSupport.
<havenwood> kkiero_: require 'active_support/core_ext/string/multibyte'
<havenwood> kkiero_: It's a fine solution.
ascarter has joined #ruby
ElFerna has quit [Quit: WeeChat 1.9]
claw has quit [Ping timeout: 255 seconds]
<ruby[bot]> kkiero_: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/a1c1ce0dc7d1f98c4d7794d39d25300a
<ruby[bot]> kkiero_: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
GodFather has quit [Quit: Ex-Chat]
<kkiero_> it's just simple script
crankharder has joined #ruby
GodFather has joined #ruby
ElFerna has joined #ruby
<havenwood> kkiero_: do you need to support all accents?
<havenwood> kkiero_: a limited list of languages or?
hutch34 has joined #ruby
<kkiero_> i think polish is ok for now
<kkiero_> maybe german and spanish later too
ElFerna has quit [Client Quit]
<havenwood> kkiero_: for just Polish i'd maintain a Hash with the conversion.
<havenwood> if that starts creeping you might consider an ActiveSupport gem dependency with cherry picking multibyte or just a smaller gem for the same purpose
hahuang65 has quit [Quit: WeeChat 1.9]
<havenwood> it's nice you can do it in latest stable Ruby now!
<kkiero_> ok, but what's wrong with this mb_chars from link?
<havenwood> kkiero_: That's ActiveSupport. That's what I'm saying.
<havenwood> kkiero_: You're free to use it. Have a gem dependency on ActiveSupport and: require 'active_support/core_ext/string/multibyte'
<havenwood> Then use away.
<kkiero_> I see
<havenwood> kkiero_: That method is defined by the ActiveSupport gem. It's available in Rails because Rails already requires it.
<kkiero_> ok, I didn't understand you previously
<havenwood> you can cherry pick, that is just load that part of ActiveSupport, not the whole thing
<havenwood> if a gem dependency is allowed
kkiero_ is now known as kkiero
AxelAlex has joined #ruby
nadir has joined #ruby
mikecmpbll has joined #ruby
username_ has joined #ruby
<kkiero> is it fix in newer version of ruby?
__Yiota has joined #ruby
<kkiero> upcase of specific letter
<havenwood> kkiero: yes, it **just works** in Ruby 2.4.0+
hutch34 has quit [Ping timeout: 246 seconds]
<havenwood> kkiero: it works in latest stable Ruby 2.4.1
<kkiero> I see
<kkiero> so I guess the best solution here will be with Hash as you wrote
milardovich has joined #ruby
<kkiero> so it won't require any dependencies
mim1k has joined #ruby
claw has joined #ruby
take5 has quit [Remote host closed the connection]
__Yiota has quit [Client Quit]
cschneid_ has quit [Remote host closed the connection]
aclark has quit [Remote host closed the connection]
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
aclark has joined #ruby
<havenwood> >> POLISH_CONVERSION = {'ą' => 'Ą', 'ć' => 'Ć'}; 'zrobić'.upcase.gsub /[#{POLISH_CONVERSION.keys}]/, POLISH_CONVERSION # kkiero
<ruby[bot]> havenwood: # => "ZROBIĆ" (https://eval.in/834702)
mim1k has quit [Ping timeout: 248 seconds]
* apeiros throws havenwood a Regexp.union
rundor has joined #ruby
high_fiver has joined #ruby
* havenwood bobbles and drops it
<havenwood> kkiero: I forgot about Regexp.union!
<havenwood> >> POLISH_CONVERSION = {'ą' => 'Ą', 'ć' => 'Ć'}; 'zrobić'.upcase.gsub Regexp.union(POLISH_CONVERSION.keys), POLISH_CONVERSION
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> #=> "ZROBIĆ"
astrobunny has joined #ruby
<havenwood> apeiros: much nicer :-)
hotpancakes has joined #ruby
<apeiros> havenwood: also more correct
<apeiros> remember, Array#to_s changed
<apeiros> s/more// :)
mikecmpbll has quit [Read error: Connection reset by peer]
<kkiero> wow, thanks, I didn't expect whole solution
_Bin4ry has joined #ruby
whippythellama has joined #ruby
<havenwood> kkiero: and then a code review of the solution!
<kkiero> indeed ;)
GodFather has quit [Read error: No route to host]
cagomez has quit [Remote host closed the connection]
GodFather has joined #ruby
whippythellama has quit [Client Quit]
cagomez has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
astrobunny has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
TomyLobo2 has quit [Ping timeout: 255 seconds]
amclain has joined #ruby
roshanavand has quit [Quit: roshanavand]
oliv_____ has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 255 seconds]
olivi____ has joined #ruby
cam27 has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cam27 has joined #ruby
olivi____ has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
eightlimbed_ has joined #ruby
<kkiero> btw why irb cannot display polish letters? POLISH_CONVERSION = {'\U+FFC4' => '\U+FFC4', '\U+FFC4' => '\U+FFC4'}
ResidentBiscuit has quit [Quit: Critical Miss]
<kkiero> I have readline
<apeiros> it can. it depends on your shell and your encoding settings.
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<apeiros> oh, and of course you should use " not ' if you want to use escape sequences.
nemesit|znc has quit [Ping timeout: 260 seconds]
<apeiros> also in ruby it's not "\U+FFC4", it's "\uffc4"
<apeiros> (are you sure about the code though? that's not even remotely in the polish script…)
jphase has quit [Remote host closed the connection]
<kkiero> in shell I can type those letter correctly
<apeiros> bottom line: about everything wrong which can be done wrong…
ColeHub has joined #ruby
nemesit|znc has joined #ruby
<al2o3-cr> >> 'łęńzrobić'.codepoints.map { |cp| cp >= 127 ? cp -= 1 : cp }.pack('U*').upcase # kkiero should work for just polish
mtkd has quit [Ping timeout: 240 seconds]
<ruby[bot]> al2o3-cr: # => "ŁĘŃZROBIĆ" (https://eval.in/834703)
Hunter1 has quit []
<al2o3-cr> make a little method or something
<apeiros> interesting. I never noticed that the two are only 1 off
mtkd has joined #ruby
<al2o3-cr> yep
dcunit3d has quit [Ping timeout: 240 seconds]
<apeiros> well…
* apeiros afk
<apeiros> cya
<al2o3-cr> o/
<kkiero> al2o3-cr: thanks
<kkiero> the solution with Hash replacement is good as I can't pack letters from german too
mikecmpbll has quit [Read error: Connection reset by peer]
<al2o3-cr> kkiero: yw
<al2o3-cr> yeah, you'd have to revert back to a Hash
<kkiero> now i'm solving why I cannot type or paste this letter in irb
high_fiver has quit [Ping timeout: 255 seconds]
polishdub has quit [Quit: leaving]
sepp2k has quit [Ping timeout: 255 seconds]
cagomez has quit []
MrBusiness has joined #ruby
troulouliou_dev has joined #ruby
Rodya_ has joined #ruby
anuxivm has joined #ruby
ElFerna has joined #ruby
olivi____ has joined #ruby
cam27 has quit [Read error: Connection reset by peer]
cdg_ has quit [Ping timeout: 246 seconds]
cam27 has joined #ruby
postmodern has joined #ruby
hutch34 has joined #ruby
olivi____ has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
shinnya has joined #ruby
duderonomy has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
<kkiero> hmm weird
sgen has quit [Quit: Leaving]
<kkiero> when ruby is set to 2.3 then I can type polish letters to irb
<kkiero> in 2.0.0 I can't...
mikecmpbll has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
lxsameer has quit [Quit: WeeChat 1.9]
astrobunny has joined #ruby
shinnya has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Read error: Connection reset by peer]
shinnya has joined #ruby
gusrub has quit []
astrobunny has quit [Ping timeout: 255 seconds]
rundor has quit [Remote host closed the connection]
rundor has joined #ruby
bronson has joined #ruby
rundor has quit [Remote host closed the connection]
rundor has joined #ruby
rundor has quit [Remote host closed the connection]
rundor has joined #ruby
cschneid_ has joined #ruby
rundor has quit [Remote host closed the connection]
dstrunk has joined #ruby
rundor has joined #ruby
rundor has quit [Remote host closed the connection]
ElFerna has quit [Quit: WeeChat 1.9]
rundor has joined #ruby
rundor has quit [Remote host closed the connection]
AxelAlex has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 240 seconds]
ElFerna has joined #ruby
cam27 has quit [Read error: Connection reset by peer]
shinnya has quit [Quit: ZNC - http://znc.in]
cschneid_ has quit [Ping timeout: 248 seconds]
eightlimbed_ has quit [Quit: Ex-Chat]
duderonomy has joined #ruby
cam27 has joined #ruby
shinnya has joined #ruby
<Radar> Time to upgrade your ruby version
hotpancakes has quit [Remote host closed the connection]
hahuang65 has joined #ruby
scorphus has quit [Ping timeout: 260 seconds]
username_ has quit [Quit: Lost terminal]
shinnya has quit [Client Quit]
<kkiero> I have 2.4 from rbenv
<kkiero> the point is macOS system ruby version
<Radar> so don't use it?
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
hotpancakes has joined #ruby
im0nde has joined #ruby
cats has quit [Quit: BURN HIS HOUSE DOWN]
olivi____ has joined #ruby
alveric1 has joined #ruby
wilbert has quit [Ping timeout: 276 seconds]
cats has joined #ruby
cats is now known as Guest29598
alveric4 has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
tau is now known as pytau
Guest29598 has quit [Client Quit]
Renich has joined #ruby
<kkiero> Radar: unfortunatelly in mac automator I have to use it :<
<Radar> You can't call "rbenv use 2.4" in automator, but you can call Ruby scripts? huh?
olivi____ has quit [Ping timeout: 260 seconds]
<kkiero> automator runs script with /usr/bin/ruby
<havenwood> kkiero: you can have /usr/bin/ruby symlink point wherever you want
<Radar> ^ ^ ^ ^ ^
<kkiero> I tried this
<kkiero> but not /usr/bin is read only
<kkiero> *now
<Radar> sudo?
<kkiero> doesn't work
<Radar> ?didntwork
<ruby[bot]> What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
<kkiero> firstly I wanted to backup system binary
<kkiero> mv: rename /usr/bin/ruby to /usr/bin/system_ruby: Operation not permitted
troulouliou_dev has quit [Quit: Leaving]
<Radar> ok, that doesn't work on my machine either with sudo.
<kkiero> I read that this is due to System Integrity Protection (SIP)
troulouliou_dev has joined #ruby
dstrunk has quit [Remote host closed the connection]
<kkiero> I can do this
<kkiero> but it's overkill
dcunit3d has joined #ruby
cats has joined #ruby
<havenwood> kkiero: how about a hack like: alias /usr/bin/ruby="~/.rubies/ruby-2.4.1/bin/ruby"
<havenwood> i'm not familiar with how automator's script-running rules
frmendes has quit [Read error: Connection reset by peer]
frmendes has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
troulouliou_dev has quit [Client Quit]
<Radar> kkiero: what's stopping you running the shell script as /bin/bash and then calling "rbenv use 2.4" in that shell script, then calling "ruby /path/to/script.rb" to actually run the script?
digitalnomad has joined #ruby
enterprisey has joined #ruby
davidmichaelkarr has joined #ruby
knight33 has joined #ruby
<kkiero> that makes sense
<kkiero> i'm coming to this solution with every step
<kkiero> but I don't want to keep ruby code in separate file
<kkiero> I will put it somehow in bash script
cam27 has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
frmendes has quit [Read error: Connection reset by peer]
cam27 has joined #ruby
frmendes has joined #ruby
npgm has quit [Quit: Connection closed for inactivity]
Renich has quit [Quit: Renich]
hutch34 has quit [Ping timeout: 255 seconds]
<kkiero> ruby -e "puts ARGV[0].upcase" test => TEST
<kkiero> ruby -e "puts ARGV[0].upcase" ęóąśłżźćń => ęóąśłżźćń
hutch34 has joined #ruby
<kkiero> weird...
<kkiero> ruby 2.3.1p112
petruff has joined #ruby
<kkiero> maybe 2.4 will be ok with this
<Radar> Yeah, looks like 2.3.3 locally doesn't upcase that correctly, but 2.4 does.
<al2o3-cr> kkiero: havenwood pointed this out you before
<al2o3-cr> *to
<kkiero> yep, forgot about it
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> no worries
dcunit3d has quit [Ping timeout: 248 seconds]
anuxivm has left #ruby [#ruby]
<kkiero> I didn't think that so little automator service will bring so many problems...