havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
TCZ has quit [Quit: Leaving]
fluxAeon has quit [Ping timeout: 240 seconds]
fluxAeon has joined #ruby
cschneid_ has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
GodFather has quit [Ping timeout: 258 seconds]
Exuma has joined #ruby
noboruma has quit [Remote host closed the connection]
tabakhase has quit [Quit: ZNC - http://znc.in]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
millerti has quit [Ping timeout: 256 seconds]
tabakhase has joined #ruby
TCZ has joined #ruby
LDonoughe has joined #ruby
sphex has quit [Ping timeout: 260 seconds]
sphex has joined #ruby
Exuma has joined #ruby
pandakekok9 has joined #ruby
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 240 seconds]
drincruz_ has joined #ruby
drincruz_ has quit [Ping timeout: 256 seconds]
m27frogy has quit [Quit: ZNC - https://znc.in]
m27frogy has joined #ruby
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 265 seconds]
ellcs has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iNs has joined #ruby
iNs_ has quit [Remote host closed the connection]
ur5us has joined #ruby
LDonoughe has quit [Ping timeout: 256 seconds]
TomyLobo has quit [Read error: Connection reset by peer]
LDonoughe has joined #ruby
Exuma has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
LDonoughe has quit [Ping timeout: 264 seconds]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
ur5us has quit [Ping timeout: 256 seconds]
ChmEarl has quit [Quit: Leaving]
ChmEarl has joined #ruby
cd has quit [Quit: cd]
ellcs has joined #ruby
TCZ has quit [Quit: Leaving]
TCZ has joined #ruby
alfiemax has joined #ruby
ChmEarl has quit [Quit: Leaving]
alfiemax has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
havenwood has quit [Quit: ZNC 1.7.5 - https://znc.in]
havenwood has joined #ruby
havenwood has quit [Quit: ZNC 1.7.5 - https://znc.in]
LDonoughe has joined #ruby
havenwood has joined #ruby
LDonoughe has quit [Ping timeout: 264 seconds]
Esa_ has quit [Ping timeout: 256 seconds]
ellcs has quit [Ping timeout: 256 seconds]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
tpanarch1st has quit [Ping timeout: 265 seconds]
ellcs has joined #ruby
LDonoughe has joined #ruby
cschneid has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
LDonoughe has quit [Ping timeout: 250 seconds]
gdonald has quit [Ping timeout: 256 seconds]
cthu| has quit [Ping timeout: 250 seconds]
gix has joined #ruby
zcserei has joined #ruby
<zcserei> Hi there!
<zcserei> I'm trying to access a private method from another private method in the same class but it doesn't seem to work.
<zcserei> Is this normal behaviour or am I overlooking something?
zcserei has quit [Remote host closed the connection]
<leftylink> ah too bad
<leftylink> could have answered
regreg_ has joined #ruby
regreg has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
bvdw has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
bvdw has joined #ruby
alfiemax has quit [Ping timeout: 250 seconds]
sergioro has quit [Read error: Connection reset by peer]
sergioro has joined #ruby
sauvin has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
cliluw has quit [Remote host closed the connection]
cliluw has joined #ruby
cliluw has quit [Ping timeout: 256 seconds]
cliluw has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
donofrio has quit [Remote host closed the connection]
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 256 seconds]
gix has quit [Ping timeout: 250 seconds]
Jonopoly has joined #ruby
kyrylo has joined #ruby
arcaos has quit [Read error: Connection reset by peer]
arcaos has joined #ruby
ur5us has joined #ruby
kyrylo has quit [Quit: Textual IRC Client: www.textualapp.com]
schne1der has joined #ruby
xco has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
kevinburke has quit [Quit: Connection closed for inactivity]
xco has quit [Client Quit]
jetchisel has joined #ruby
schne1der has quit [Ping timeout: 256 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
ur5us has quit [Quit: Leaving]
roadie has joined #ruby
ropeney has quit [Ping timeout: 240 seconds]
xco has joined #ruby
ropeney has joined #ruby
sergioro has quit [Quit: leaving]
Jonopoly has quit [Quit: WeeChat 2.5]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
arahael2 has quit [Ping timeout: 252 seconds]
xco has joined #ruby
ur5us has joined #ruby
<xco> morning havenwood, do you know if any good resource on Ruby and encoding?
alexherbo2 has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 264 seconds]
cschneid has joined #ruby
arahael2 has joined #ruby
cschneid has quit [Quit: ZNC 1.7.5 - https://znc.in]
dionysus69 has joined #ruby
alexherbo23 has joined #ruby
alexherbo2 has quit [Read error: Connection reset by peer]
MrCrackPot has joined #ruby
code_zombie_ has quit [Quit: Leaving]
alexherbo2 has joined #ruby
alexherbo23 has quit [Ping timeout: 256 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid has joined #ruby
MrCrackPot has quit [Client Quit]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
pandakekok9 has quit [Ping timeout: 265 seconds]
markopasha has joined #ruby
pandakekok9 has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
chalkmonster has joined #ruby
kinduff has joined #ruby
vondruch has quit [Ping timeout: 258 seconds]
alexherbo2 has quit [Ping timeout: 265 seconds]
conta has joined #ruby
gdonald has joined #ruby
conta has quit [Quit: conta]
sagax has quit [Read error: Connection reset by peer]
cd has joined #ruby
sagax has joined #ruby
markopasha has quit [Remote host closed the connection]
markopasha has joined #ruby
vondruch has joined #ruby
yelloB has joined #ruby
yelloB has quit [Remote host closed the connection]
SCHAPiE has quit [Quit: ZNC - https://znc.in]
<madduck> Hey, I don't know ruby, but am in need to write some code for Puppet to do the following: recursively scan a directory for files called "data.txt", and add the content of each file to a hash indexed by the path. Shouldn't be hard, but I have no idea how to even start ;)
yelloB has joined #ruby
yelloB has quit [Remote host closed the connection]
<madduck> Dir.glob? Find.find?
<leftylink> oh. I was about to suggest Dir.glob. I didn't know Find.find exists.
<leftylink> thank you for teaching me about it
SCHAPiE has joined #ruby
<leftylink> interesting interface Find.find has... (the prune is what I mean)
<madduck> i suppose it mimics posix find
xco has joined #ruby
<madduck> done \o/
<madduck> ruby -e 'h={}; Dir.glob("output/**/fullchain.pem") { |f| h[File.basename(File.dirname(f))] = File.read(f) }'
<madduck> suggestions of improvement are very welcome!
<leftylink> I see that it would be possible to use Enumerable#to_h with block, but I have not been convinced that using it would be an improvement
<madduck> how would that work? I have no idea what you're talking about ;)
<leftylink> it would work as &ri Enumerable#to_h specifies it does.
<leftylink> &ri Enumerable#to_h
<madduck> okay, i understand. not as expressive though
silviu24 has quit [Read error: Connection reset by peer]
Sina has joined #ruby
drincruz_ has joined #ruby
cschneid has quit [Ping timeout: 258 seconds]
drincruz_ has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
hassox has joined #ruby
hassox has quit [Ping timeout: 265 seconds]
gix has joined #ruby
romanlevin4 has joined #ruby
romanlevin has quit [Ping timeout: 264 seconds]
romanlevin4 is now known as romanlevin
Vaevictu1 has joined #ruby
Vaevictu1 has left #ruby [#ruby]
alfiemax has joined #ruby
legit has joined #ruby
canton7 has quit [Quit: ZNC - http://znc.in]
<havenwood> xco: The best resource on Ruby and encoding is apeiros!
canton7 has joined #ruby
<havenwood> xco: I don't know a great Ruby-specific source, but I'd love to hear about it if you find one.
<xco> i've found a few through google
<havenwood> xco: I'd suggest general UTF-8 study, since it's so pervasive. https://flaviocopes.com/unicode/
<xco> only a couple are Ruby specific, rest general
<xco> oh these look good, google didn't show me these
TCZ has joined #ruby
<havenwood> madduck: You could also consider top-down traversal with Find.find: https://docs.ruby-lang.org/en/2.7.0/Find.html
<havenwood> madduck: Find.find('output') do |path|
<havenwood> madduck: It's particularly nice if you want to "prune" certain paths, where there are dirs you don't need to look in.
jingjinghack has joined #ruby
<siery> Is there a 'magic variable' in ruby to refer to array length?
GodFather has joined #ruby
<havenwood> siery: You can ask an Array its size. What would a magic variable look like?
<havenwood> siery: [].size #=> 0
<siery> ya, I mean like in perl you can just use array name like: `arr[arr]`
dionysus69 has quit [Ping timeout: 265 seconds]
<havenwood> siery: I don't follow. The last index is -1 or you can do an endless Range.
<havenwood> siery: arr[0..-1]
<havenwood> siery: arr[0..]
<havenwood> siery: Those are the same ^
<havenwood> siery: arr.size # To lazily get the size.
<havenwood> siery: #size tends to be lazily sized up front and #count tends to actually count.
<siery> what doe't it mean that something is lazily in ruby? c:
<siery> does's*
<siery> lake lazely .map.. o.0
<havenwood> siery: That the size is known up front and doesn't actually need to be counted.
<havenwood> siery: There're lazy Enumerators too, but that's a different thing.
<siery> hmm, so it's more efficient to use size in stead of length?
alfiemax has quit [Ping timeout: 265 seconds]
<havenwood> siery: More efficient in terms of typing, but it's an alias. :P
<havenwood> siery: Or at least it tends to be an alias for #size.
<havenwood> siery: By convention, #count is different from #size and #length. I see #size and #count used most often.
cschneid has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
<siery> hm.. ya, cound is mmore complex in definition
<siery> count*
cliluw has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
oneeggeach has joined #ruby
<al2o3-cr> &>> [String, Array, Hash, Range].each { _1.module_eval { define_method(:~@) { size } } }; [~"abc", ~[1,2,3], ~{a:1, b:2, c:3}, ~(1..3)]
<rubydoc> # => [3, 3, 3, 3] (https://carc.in/#/r/8s9j)
<al2o3-cr> i like this ;)
alfiemax has quit [Ping timeout: 250 seconds]
<al2o3-cr> i should of used alias ~@ size, ah nvm
NODE has quit [Quit: changing servers]
NODE has joined #ruby
alexherbo2 has joined #ruby
alfiemax has joined #ruby
pandakekok9 has quit [Quit: good night]
nyuszika7h has quit [Quit: ZNC 1.7.5+deb1~bpo10+1 - https://znc.in]
roadie has quit [Ping timeout: 260 seconds]
hassox has joined #ruby
roadie has joined #ruby
nyuszika7h has joined #ruby
hassox has quit [Ping timeout: 256 seconds]
brendan- has quit [Ping timeout: 256 seconds]
<havenwood> al2o3-cr: And a refinement!
brendan- has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
roadie has joined #ruby
<al2o3-cr> havenwood: yes, let me refactor. :)
<al2o3-cr> havenwood: beautiful :P
<al2o3-cr> i don't know why i always forget about refinements.
<havenwood> al2o3-cr: beauty is my middle name. Shannon Corey Beauty Petree Skipper.
<havenwood> al2o3-cr: They're nice, huh? I don't see them used as much as I'd like to.
<al2o3-cr> havenwood: really?
<al2o3-cr> havenwood: yeah, i like refinements.
<havenwood> al2o3-cr: All but the Beauty is true. I've been thinking about names since I wanted to add "Danger" to our daughter's name, Andromeda "Danger" Quinn Skipper.
alfiemax has quit [Ping timeout: 256 seconds]
<al2o3-cr> where did petree come from?
<havenwood> Then again, I like "SkyCaptain" so...
<havenwood> al2o3-cr: My mother's mother's maiden name.
<al2o3-cr> ah
oneeggea_ has joined #ruby
GodFather has quit [Ping timeout: 265 seconds]
<havenwood> al2o3-cr: I was Baby Boy Skipper for a year.
<havenwood> al2o3-cr: My parents refused to name me. Naming things is hard.
<havenwood> At least no off-by-one error I know of.
<al2o3-cr> haha, that reminds me i had a cat called ct cat with the a
oneeggeach has quit [Ping timeout: 240 seconds]
<havenwood> ct.scan
<al2o3-cr> i was going to be named michael or lee
<al2o3-cr> i'm the only one who doesn't have a middle name.
<havenwood> al2o3-cr: I think they're superfluous.
<al2o3-cr> yes, to an extent. generally older generations don't have them, this generation can have quite a few.
jingjinghack has quit [Quit: WeeChat 2.1]
coniptor has quit [Quit:  ]
<al2o3-cr> havenwood: oh, while you here can you test something for me about arc4random_buf if your not busy. (i'm to lazy to set up a VM)
<havenwood> al2o3-cr: sure, which OS?
<al2o3-cr> osx
* havenwood nods
<al2o3-cr> havenwood: try this in irb/pry but keep it open.
<al2o3-cr> buf = Fiddle::Pointer.malloc(64); f = Fiddle::Function.new(Fiddle::Handle::DEFAULT['arc4random_buf'], [TYPE_VOIDP, TYPE_SIZE_T], TYPE_VOID); f.(buf, buf.size); buf.to_str
<havenwood> al2o3-cr: #!> NameError (uninitialized constant TYPE_VOIDP)
<al2o3-cr> oops
<al2o3-cr> havenwood: buf = Fiddle::Pointer.malloc(64); f = Fiddle::Function.new(Fiddle::Handle::DEFAULT['arc4random_buf'], [1, -5], 0); f.(buf, buf.size); buf.to_str
<havenwood> al2o3-cr: #=> `bytes`
<havenwood> al2o3-cr: 64 of them.
<al2o3-cr> havenwood: ok, that's good. now call Fiddle.free(buf) twice
<havenwood> al2o3-cr: #=> nil #=> nil
<al2o3-cr> hmm. now ctrl+d
<havenwood> al2o3-cr: prompt
<al2o3-cr> hmm.
<al2o3-cr> i thought that should aborted with `free(): double free detected in tcache 2`
<al2o3-cr> havenwood: does this abort: buf = Fiddle::Pointer.malloc(64); 2.times { Fiddle.free(buf) }
sphex has quit [Ping timeout: 264 seconds]
<havenwood> al2o3-cr: Nope.
<al2o3-cr> that's very strange.
sphex has joined #ruby
oneeggea_ has quit [Quit: Leaving...]
<al2o3-cr> i think i'll just use Random.urandom
davispuh has joined #ruby
DTZUZU has joined #ruby
DTZUZU2 has quit [Ping timeout: 265 seconds]
NODE has quit [Quit: changing servers]
drincruz_ has joined #ruby
NODE has joined #ruby
GodFather has joined #ruby
brendan- has quit [Ping timeout: 256 seconds]
GGMethos has joined #ruby
Azure has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
Azure|dc has joined #ruby
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
Tungki has joined #ruby
dionysus69 has joined #ruby
dasher00 has joined #ruby
schne1der has joined #ruby
TCZ has quit [Quit: Leaving]
DTZUZU has quit [Ping timeout: 250 seconds]
cschneid_ has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
cschneid has quit [Ping timeout: 250 seconds]
DTZUZU has joined #ruby
Frobozz has joined #ruby
johnny56 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
hassox has joined #ruby
hassox has quit [Ping timeout: 240 seconds]
fluxAeon has quit [Ping timeout: 256 seconds]
drincruz_ has quit [Ping timeout: 256 seconds]
ChmEarl has joined #ruby
alfiemax has joined #ruby
lineus has quit [Remote host closed the connection]
lineus has joined #ruby
TCZ has joined #ruby
akz has joined #ruby
Frobozz has quit [Quit: quit]
alfiemax has quit [Ping timeout: 240 seconds]
LDonoughe has joined #ruby
LDonoughe has quit [Ping timeout: 264 seconds]
romanlevin has quit [Remote host closed the connection]
romanlevin has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brendan- has quit [Ping timeout: 265 seconds]
lineus_ has joined #ruby
brendan- has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
Tempesta has quit [Quit: See ya!]
oneeggeach has joined #ruby
oneeggea_ has joined #ruby
oneeggeach has quit [Ping timeout: 256 seconds]
sergioro has joined #ruby
KeyJoo has joined #ruby
TCZ has quit [Quit: Leaving]
sergioro has quit [Quit: leaving]
sergioro has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
Tempesta has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
cschneid has joined #ruby
cschneid_ has quit [Ping timeout: 250 seconds]
oneeggea_ has quit [Quit: Leaving...]
jmcgnh has joined #ruby
kinduff has quit [Quit: Ping timeout (120 seconds)]
Arkantos has joined #ruby
tpanarch1st has joined #ruby
markopasha has quit [Remote host closed the connection]
markopasha has joined #ruby
kinduff has joined #ruby
arcaos has quit [Remote host closed the connection]
oneeggeach has joined #ruby
chalkmonster has joined #ruby
oneeggeach has quit [Quit: Leaving...]
alexherbo2 has quit [Ping timeout: 265 seconds]
chalkmonster has quit [Quit: WeeChat 2.7.1]
henninb has joined #ruby
henninb has quit [Client Quit]
sergioro has quit [Quit: leaving]
orbyt_ has joined #ruby
jmcgnh has quit [Ping timeout: 250 seconds]
jmcgnh has joined #ruby
coniptor has joined #ruby
chalkmonster has joined #ruby
LDonoughe has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
Azure has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
sergioro has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
davispuh has quit [Ping timeout: 240 seconds]
oneeggeach has joined #ruby
oneeggeach has quit [Client Quit]
davispuh has joined #ruby
davispuh has quit [Client Quit]
davispuh has joined #ruby
noboruma has joined #ruby
roadie has quit [Ping timeout: 258 seconds]
markopasha has quit [Remote host closed the connection]
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
markopasha has joined #ruby
noboruma has quit [Remote host closed the connection]
dasher00 has quit [Ping timeout: 240 seconds]
dasher00 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
xco has joined #ruby
paraxial has joined #ruby
<xco> "🦁".codepoints => [129409]
<xco> "🇺🇸".codepoints => [127482, 127480]
akz has quit [Quit: Leaving]
<xco> will i be right in saying the lion is NOT a grapheme cluster, the US flag is? since it has 2 codepoints?
oneeggeach has joined #ruby
SeepingN has joined #ruby
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 264 seconds]
<al2o3-cr> &>> "\u{1f1f9}\u{1f1ed}" the best flag ;)
<rubydoc> stderr: -e:4: syntax error, unexpected local variable or method, expecting `end'... check link for more (https://carc.in/#/r/8sas)
<al2o3-cr> &>> "\u{1f1f9}\u{1f1ed}" # the best flag ;)
<rubydoc> # => "🇹🇭" (https://carc.in/#/r/8sat)
<al2o3-cr> well the food hehe
brendan- has quit [Ping timeout: 240 seconds]
<akem> It doesn't display the same in gnome-terminal for the flags.
<akem> And doesn't display at all in urxvt :P
<akem> Anyway, that's funny.
alfiemax has joined #ruby
alexherbo2 has joined #ruby
brendan- has joined #ruby
Arkantos has quit [Ping timeout: 256 seconds]
alfiemax has quit [Ping timeout: 258 seconds]
oneeggeach has quit [Remote host closed the connection]
oneeggeach has joined #ruby
LDonoughe has quit [Ping timeout: 265 seconds]
<havenwood> xco: Grapheme clusters are "user-perceived characters," so they're both clusters even if single-code-point ones.
<havenwood> xco: "X" is a grapheme cluster too, afaik.
<havenwood> &>> "xco".grapheme_clusters
<rubydoc> # => ["x", "c", "o"] (https://carc.in/#/r/8sax)
<havenwood> xco: It's just a newish addition to Ruby. It's what one should use in place of #chars these days.
<havenwood> &>> "🇺🇸".chars # xco
<rubydoc> # => ["🇺", "🇸"] (https://carc.in/#/r/8say)
<havenwood> &>> "🇺🇸".grapheme_clusters # xco
<rubydoc> # => ["🇺🇸"] (https://carc.in/#/r/8saz)
oneeggeach has quit [Ping timeout: 256 seconds]
<xco> al2o3-cr i didn't get your comments :D
<xco> al2o3-cr not sure what you want to tell me :P
<al2o3-cr> it's the thai flag
<xco> al2o3-cr yes i know.... you just posted for the fun of it or wanted to show me something hahah?
<al2o3-cr> just for fun. you know how bored i am lol ;)
Tungki has quit [Remote host closed the connection]
<al2o3-cr> akem: you listening to this: https://www.youtube.com/watch?v=isfBNsyIgGg
lucasb has joined #ruby
<akem> al2o3-cr, Yeah. :)
<al2o3-cr> akem: :P
<xco> havenwood i'm getting confused look:
<xco> A grapheme is a sequence of one or more code points that are displayed as a single, graphical unit that a reader recognizes as a single element of the writing system.
<xco> if the above is right, then why border bring up "grapheme cluster"
<xco> ?
<xco> instead of just saying "grapheme"
<xco> would could mean the char has >= 1 codepoints?
<xco> what's the point!?!
<xco> :D
_phaul has quit [Ping timeout: 256 seconds]
<havenwood> xco: Elixir, for example has String.graphemes/1 but Matz wanted to spell it out as #grapheme_clusters.
<havenwood> xco: Matz left it open to alias #graphemes later, but didn't want to do it for now.
<havenwood> xco: Matz felt "grapheme clusters" was the full, proper name.
<havenwood> xco: A cluster appears to the reader as a single unit. "Grapheme clusters" is the same as saying "graphemes."
<xco> havenwood well good job Matz, cause now you confused the shit out of me :P
<havenwood> xco: Think of #grapheme_clusters as what you mean by "characters."
<xco> > A cluster appears to the reader as a single unit. "Grapheme clusters" is the same as saying "graphemes." 👏 nice and easy
<havenwood> xco: The #chars method actually shows codepoints. :P
<al2o3-cr> Grapheme cluster. a cluster of code points that form a grapheme.
<xco> havenwood any reference i could get from how Matz decided to call it "graphem_clusters?
<al2o3-cr> matz is right.
<havenwood> xco: I show Elixir's graphemes and clusters functions in that ^ issue too.
<havenwood> &>> "🇺🇸🇦🇫".chars
_phaul has joined #ruby
<rubydoc> # => ["🇺", "🇸", "🇦", "🇫"] (https://carc.in/#/r/8sb0)
<xco> havenwood thank you
<havenwood> xco: Ruby's String#chars is like Elixir's String.codepoints/1 and String#grapheme_clusters is like String.graphemes/1.
<havenwood> xco: you're welcome
<xco> the naming trips me up. but with the Elixir reference everything makes sense
<xco> i'll just map Ruby names to Elixir's meanings hahahha
brendan- has quit [Ping timeout: 240 seconds]
oneeggeach has joined #ruby
Jonopoly has joined #ruby
brendan- has joined #ruby
banisterfiend has joined #ruby
LDonoughe has joined #ruby
brendan- has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
ellcs has quit [Remote host closed the connection]
LDonoughe has quit [Ping timeout: 265 seconds]
chalkmonster has joined #ruby
ellcs has joined #ruby
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
cloaked1 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
code_zombie has joined #ruby
orbyt_ has joined #ruby
oneeggeach has quit [Quit: Leaving...]
LDonoughe has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chalkmonster has quit [Quit: WeeChat 2.7.1]
jmcgnh has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
LDonoughe has quit [Ping timeout: 258 seconds]
jmcgnh has joined #ruby
cschneid has joined #ruby
cschneid_ has quit [Ping timeout: 265 seconds]
oneeggeach has joined #ruby
oneeggeach has quit [Client Quit]
cd has quit [Quit: cd]
lunarkitty has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CalimeroTeknik has quit [Max SendQ exceeded]
CalimeroTeknik has joined #ruby
<lunarkitty> Why did python become so popular instead of ruby? I mean ruby isn't unpopular, it's still top 10~15 depending on who you ask, but python is very hyped now. Ruby imo is much nicer to work with than python and all of the popular DS libs pythong has seem to just be c bindings, which could easily be brought to ruby
wildtrees has joined #ruby
wildtrees has quit [Client Quit]
<lunarkitty> I just did kind of a round trip looking at different web frameworks and don't really see why ruby is falling behind there either, there really isn't anything you can't do with ruby webserver wise, and it's a lot more concise usually to create apis in the big ruby frameworks compared to other techs I've looked at
<lunarkitty> And then there's opal for client side
banisterfiend has joined #ruby
<lunarkitty> Speed was used as an argument against using ruby when node was on the hype train, but now everyone is going to python, which is about the same speed as ruby pfft
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
<sergioro> ruby is a great language for web development that's why so many arguably successful startups use ruby (github, stripe, etc). i know python is used for AI research.
sergioro has quit [Quit: leaving]
sergioro has joined #ruby
LDonoughe has joined #ruby
alexherbo2 has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby
regreg_ has quit [Ping timeout: 256 seconds]
Fire-Dragon-DoL has quit [Ping timeout: 272 seconds]
Fire-Dragon-DoL has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz_ has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
Seich has quit [Remote host closed the connection]
TCZ has joined #ruby
drincruz_ has quit [Ping timeout: 264 seconds]
TCZ is now known as jealousy
Seich has joined #ruby
xorl has joined #ruby
drincruz_ has joined #ruby
LDonoughe has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 240 seconds]
jealousy has quit [Quit: Leaving]