lel has quit [Read error: Connection reset by peer]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
skweek has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
EasyCo_ has quit [Quit: Connection closed for inactivity]
weemsledeux has joined #ruby
<matheusmoreira>
is it really a good idea to be pulling source code from implicit locations? I think its good to always specify the exact URL
whathappens has quit [Client Quit]
allcentury has joined #ruby
aalmenar has joined #ruby
aalmenar has joined #ruby
aalmenar has quit [Changing host]
aalmenar_ has quit [Ping timeout: 250 seconds]
threedee_ has quit [Ping timeout: 246 seconds]
binaryplease has quit [Quit: binaryplease]
pawnbox has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
<nofxx>
matheusmoreira, agreed... also with new bundler you need some allow_insecure config, forcing https
<nofxx>
it is naive thinking git:// is not secure but, anyways....
threedee_ has joined #ruby
gusrub__ has joined #ruby
gusrub_ has quit [Read error: Connection reset by peer]
cloaked1 has joined #ruby
cloaked1 has joined #ruby
cloaked1 has quit [Changing host]
triangles2 has joined #ruby
Asher has quit [Quit: Leaving.]
triangles has quit [Ping timeout: 260 seconds]
smlocal has quit []
byte512 has quit [Ping timeout: 248 seconds]
JeanCarloMachado has quit [Ping timeout: 245 seconds]
nonnatus has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 265 seconds]
threedee_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 258 seconds]
dnicole has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
nonnatus has quit [Ping timeout: 244 seconds]
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
koooge has quit [Ping timeout: 244 seconds]
nettoweb has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
koooge has joined #ruby
rfoust has joined #ruby
dnicole has quit [Ping timeout: 240 seconds]
nettoweb has quit [Client Quit]
rfoust has quit [Client Quit]
rfoust has joined #ruby
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
SCHAAP137 has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
lel has joined #ruby
_sfiguser has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
roamingdog has joined #ruby
jenrzzz has joined #ruby
matp has quit [Quit: Bye!]
matp has joined #ruby
jcao219 has joined #ruby
nankyokusei has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
roamingdog has quit [Ping timeout: 245 seconds]
Ropeney has joined #ruby
ziarkaen has joined #ruby
SteenJobs has joined #ruby
flashpoint9 has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
blackbombay_ has joined #ruby
smtudor has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
blackbombay has quit [Ping timeout: 256 seconds]
jhack has quit [Quit: jhack]
ziarkaen has quit [Ping timeout: 244 seconds]
_sfiguser has joined #ruby
tyang_ has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
spiette_ has joined #ruby
spiette_ is now known as simonp
simonp is now known as spiette_
jenrzzz has joined #ruby
marr has quit [Ping timeout: 246 seconds]
harfangk has joined #ruby
flashpoint9 has quit []
dnicole has joined #ruby
roamingdog has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
roamingdog has quit [Remote host closed the connection]
SeepingN has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
dnicole has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 252 seconds]
moei has quit [Quit: Leaving...]
dnicole has joined #ruby
railssmith has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
dnicole has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
TheHodge has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
r3vDev has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
tubuliferous_ has joined #ruby
xall_ has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
ruid has quit [Quit: Leaving]
Lann has joined #ruby
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Lann>
Could someone help me try to figure out the ruby way of doing this. I have a sitemap generator with a node with id = "future pages". I need to search the json structure for that key then replace that with 2 or more pages (no this is not homework, i'm making a sitemap generator app :-)). https://gist.github.com/minusreality/cd6f3d04554567c6f4aa224d7a5e3665
splud has quit [Quit: splud]
<Lann>
The problem is previous_level.push(new_link) makes the modified sitemap contain an empty hash at the end
SteenJobs has quit [Quit: SteenJobs]
blackbombay has joined #ruby
<Lann>
I think the gist of my problem is trying to deal with a situation where other languages would pass by reference
<adam12>
so return the new value and use assignment
djbkd has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<Lann>
adam12: thanks i'll try those approaches
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
pokalyis has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
igniting has joined #ruby
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
tyang has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall_ has quit [Ping timeout: 250 seconds]
tyang_ has quit [Ping timeout: 268 seconds]
jzigmund has quit [Ping timeout: 256 seconds]
al2o3-cr has quit [Quit: WeeChat 1.6]
mikecmpbll has joined #ruby
<chrisseaton>
I'd like to count the number of true values in an array, so I'm thinking of filtering by the identity function and then counting. Does Ruby have an identity method? I can't find it but I think I remember it being mentioned sometime.
pokalyis has quit [Read error: Connection reset by peer]
pokalyis has joined #ruby
smtudor has quit [Ping timeout: 260 seconds]
futabachannel has quit [Quit: Leaving...]
rfoust has joined #ruby
<blackbombay>
chrisseaton: why not count with a block?
<matheusmoreira>
itself? another method I didn't know about... that's awesome
DroidBurgundy has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
ruby-lang689 has joined #ruby
Felipe__ has joined #ruby
boadie has joined #ruby
banisterfiend has joined #ruby
spiette_ has quit [Read error: Connection reset by peer]
boadie has left #ruby [#ruby]
<ruby-lang689>
Hi guys; I have an interview question and I don't understand it at all: In ruby, what build in values or primitives are considered false? in other words; that it returns false if they are used in an expresion that expects a boolean variable
<ruby-lang689>
I hope you can help me :)
<adam12>
This is easily googleable, no?
govg has quit [Ping timeout: 268 seconds]
swills has joined #ruby
tyang has quit [Read error: Connection reset by peer]
<blackbombay_>
ruby-lang689: nil and false. everything else is considered true.
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby-lang689>
Thank you @blackbomay_
optiz0r has quit [Ping timeout: 252 seconds]
CloCkWeRX has quit [Ping timeout: 246 seconds]
Xaitec has joined #ruby
DroidBurgundy has quit [Remote host closed the connection]
sylario has quit [Quit: Connection closed for inactivity]
konsolebox has joined #ruby
ruby-lang689 has quit [Ping timeout: 260 seconds]
spligak has quit [Read error: Connection reset by peer]
DroidBurgundy has joined #ruby
nankyokusei has joined #ruby
Xaitec has quit [Remote host closed the connection]
maloik31 has joined #ruby
ziarkaen has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
hanmac has quit [Ping timeout: 258 seconds]
DroidBurgundy has quit [Ping timeout: 265 seconds]
pokalyis has joined #ruby
pawnbox has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
SeepingN has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
bumao has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 268 seconds]
ziarkaen has quit [Ping timeout: 258 seconds]
bumao has joined #ruby
spiette_ has joined #ruby
spiette_ has quit [Remote host closed the connection]
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Lann>
recursive functions++
cyphase has joined #ruby
<Lann>
I dont understand why I cant use Hash.new("something" => "value") in a recursive function because it ends up being an empty hash, but i can use {"something": "value"}
swills has quit [Ping timeout: 252 seconds]
pokalyis has joined #ruby
hanmac has joined #ruby
jschoolcraft has quit [Quit: peace]
<blackbombay_>
Lann: the .new() argument is the default value, it doesn't initialize the hash.
<Lann>
hehehe
<Lann>
still impressed that i could get this recursive function working from barely knowing ruby
<blackbombay_>
ya recursion is koo
<Lann>
i dont understand recursion because i dont understand recursion
creat has joined #ruby
i8igmac has quit [Ping timeout: 260 seconds]
Jayson_Virissimo has joined #ruby
creat has quit [Ping timeout: 258 seconds]
<matheusmoreira>
also notable is the fact that 0 is true. might trip up C friends.
nanoz has joined #ruby
bluOxigen has joined #ruby
SteenJobs has joined #ruby
roamingdog has joined #ruby
pawnbox has joined #ruby
bitri has joined #ruby
roamingdog has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 248 seconds]
bitri has quit [Client Quit]
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chris349 has quit [Ping timeout: 258 seconds]
jackjackdripper1 has quit [Quit: Leaving.]
Guest66 has quit [Quit: Guest66]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gusrub__ has quit [Remote host closed the connection]
gix has quit [Ping timeout: 256 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
gix has joined #ruby
JoshS has joined #ruby
gusrub_ has joined #ruby
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
palms has joined #ruby
roamingdog has joined #ruby
jhack has quit [Quit: jhack]
govg has joined #ruby
jaguarmagenta has joined #ruby
allcentury has joined #ruby
roamingdog has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
SeepingN_ has quit [Client Quit]
SteenJobs has quit [Quit: SteenJobs]
SteenJobs has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
buglessdr has joined #ruby
railssmi_ has joined #ruby
nankyokusei has joined #ruby
buglessdr2 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
railssmith has quit [Ping timeout: 246 seconds]
aupadhye has joined #ruby
dnicole has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
ziarkaen has joined #ruby
saneax-_-|AFK is now known as saneax
SteenJobs has quit [Quit: SteenJobs]
nanoz has quit [Read error: Connection reset by peer]
XV8 has joined #ruby
ziarkaen has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
tdy has joined #ruby
gusrub_ has quit [Remote host closed the connection]
sarbs has joined #ruby
conta has joined #ruby
chare has joined #ruby
<chare>
omg
<chare>
trump
<chare>
omg...
conta has quit [Ping timeout: 248 seconds]
buglessdr2 has quit [Ping timeout: 258 seconds]
chare has left #ruby [#ruby]
aupadhye has quit [Ping timeout: 256 seconds]
buglessdr has quit [Ping timeout: 258 seconds]
tectonic has joined #ruby
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
pawnbox has quit [Remote host closed the connection]
gusrub_ has joined #ruby
Joufflu has joined #ruby
aupadhye has joined #ruby
Channel6 has quit [Quit: Leaving]
tectonic has quit []
ur5us_ has joined #ruby
xall has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
zukin has joined #ruby
AndrewIsHere has quit [Remote host closed the connection]
_sfiguser has quit [Ping timeout: 260 seconds]
AndrewIsHere has joined #ruby
AndrewIsHere has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
AndrewIsHere has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
jorrin has quit [Quit: Leaving]
ur5us_ has quit [Remote host closed the connection]
ur5us has joined #ruby
palms has quit [Ping timeout: 260 seconds]
_sfiguser has joined #ruby
BillSussman has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 268 seconds]
zukin has quit [Quit: leaving]
DroidBurgundy has joined #ruby
siovene has joined #ruby
chare has joined #ruby
<chare>
OMG
<chare>
TRUMP
xall has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
pandaant has joined #ruby
<baweaver>
chare: Are you here for a Ruby question?
igniting has quit [Ping timeout: 240 seconds]
<baweaver>
if not, please take all offtopic discussion to #ruby-offtopic
vuoto has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<Lann>
How do people think in terms of recursive functions. I've been a dev forever and they still give me headaches. i'm wondering if there's some trick that i dont know
<baweaver>
In order to understand recursion....
chare has quit [Quit: Page closed]
<baweaver>
you must first understand recursion
djbkd has quit [Ping timeout: 268 seconds]
<baweaver>
!mute chare
<baweaver>
probably a troll. Anyways...
<baweaver>
On a more serious note, do you really want to learn recursion?
<baweaver>
Lann ^
<baweaver>
Because if you really want to go down that rabbit hole fully, learn Haskell
<Ropeney>
I was expecting something better then that :(
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has joined #ruby
<baweaver>
Ropeney: like?
<baweaver>
If you really want to do it in Ruby, reimplement every single method on Enumerable using only reduce
<Ropeney>
I didn't have something better, but still was waiting in anticipation for something :)
<baweaver>
After you get about halfway through that, look up what Tail Call Optimization is
<baweaver>
and realize what you've just learned.
weemsledeux has joined #ruby
<baweaver>
start with the easy ones like: map, filter, select, reject, flat_map
<hanmac>
in ruby iteration mostly feels better than recursion imo
<baweaver>
ah, but what is reduce exactly?
pawnbox has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
<baweaver>
or rather to say, how does reduce work in other languages? (hint: It's often called foldLeft)
igniting has joined #ruby
<baweaver>
hanmac ^
<baweaver>
Ropeney ^
<hanmac>
baweaver: oh do you mean me wit the reduce? i prefer inject ;P
<baweaver>
silly semantics aside
<baweaver>
where does reduce come from? How is it normally implemented
<baweaver>
Why is that important in Ruby?
<baweaver>
When you find yourself answering those questions you're very far along in understanding the core of recursion.
<baweaver>
I'd explain it in more detail, but depriving someone of that aha moment is just mean.
<hanmac>
baweaver: isnt reduce done with iteration instead of recursion?
<baweaver>
Oh it is
<baweaver>
Look up what Tail Call Optimization is
pawnbox has joined #ruby
<baweaver>
and realize that Reduce is pretty much Tail Call Recursion.
lxsameer has joined #ruby
lel has quit [Ping timeout: 268 seconds]
allcentury has quit [Ping timeout: 260 seconds]
r3vDev has joined #ruby
blaxter has joined #ruby
lacour has quit [Quit: Leaving]
qwertyco has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso>
baweaver: Oi Haskell.
Joufflu has quit [Quit: Leaving]
<dminuoso>
We just got a really funny application. Guy left out the application letter and just send a CV with some random certificates attached to it - he also listed Haskell, Go and Rust amongst languages he was comfy with.
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gingray has joined #ruby
<djellemah>
Lann: let's say "iterate" is what we call working through a collection one item at a time. Recursion is the answer to the question "how do you iterate when using a language that has no loop constructs?" Loop constructs being for, while, until etc.
c0mrad3 has joined #ruby
xall has quit [Ping timeout: 246 seconds]
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobun_ has joined #ruby
cpruitt has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yardenbar has joined #ruby
djbkd has joined #ruby
charliesome has joined #ruby
dionysus69 has joined #ruby
xall has joined #ruby
cpruitt has quit [Read error: Connection reset by peer]
gusrub_ has quit [Remote host closed the connection]
anisha has joined #ruby
dionysus69 has quit [Client Quit]
cpruitt has joined #ruby
dionysus69 has joined #ruby
conta1 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
Felipe__ has quit [Quit: Leaving]
aryaching has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
symm- has quit [Ping timeout: 245 seconds]
ziarkaen has joined #ruby
symm- has joined #ruby
ziarkaen has quit [Ping timeout: 246 seconds]
ta_ has quit [Remote host closed the connection]
lenwood has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore has joined #ruby
symm- has quit [Ping timeout: 258 seconds]
gizless has quit [Ping timeout: 265 seconds]
gizless has joined #ruby
jshjsh has joined #ruby
gizmore|2 has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
gizmore has quit [Ping timeout: 260 seconds]
JoshS has quit [Ping timeout: 246 seconds]
jaguarmagenta has joined #ruby
gizmore has joined #ruby
A124 has quit [Ping timeout: 252 seconds]
linduxed has joined #ruby
iwmrby has joined #ruby
pawnbox has quit [Remote host closed the connection]
gizless has quit [Ping timeout: 252 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
gizmore|2 has quit [Ping timeout: 250 seconds]
firstdayonthejob has joined #ruby
r3vDev has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Ping timeout: 268 seconds]
troulouliou_div2 has joined #ruby
last_staff has joined #ruby
Ishido has joined #ruby
firstdayonthejob has quit [Ping timeout: 265 seconds]
hahuang65 has joined #ruby
kith has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
hs366 has joined #ruby
sanmi has joined #ruby
r3vDev has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AndrewIsHere has joined #ruby
TomyWork has joined #ruby
hightower2 has quit [Ping timeout: 248 seconds]
lenwood has quit [Ping timeout: 256 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
davix has quit [Quit: WeeChat 1.6]
AndrewIsHere has quit [Ping timeout: 245 seconds]
marr has joined #ruby
andikr has joined #ruby
CalimeroTeknik has quit [Ping timeout: 265 seconds]
Burgestrand has joined #ruby
Dimik has joined #ruby
nickjj_ has joined #ruby
roamingdog has joined #ruby
nickjj has quit [Ping timeout: 265 seconds]
Cohedrin has joined #ruby
brendan- has joined #ruby
CalimeroTeknik has joined #ruby
anisha has joined #ruby
toretore has joined #ruby
roamingdog has quit [Ping timeout: 256 seconds]
govg has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
_djbkd has joined #ruby
pragmaticus has joined #ruby
jcao219 has quit [Ping timeout: 245 seconds]
Darmani has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 250 seconds]
aganov has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
SesMan has joined #ruby
Dimik has quit []
_djbkd has quit [Ping timeout: 260 seconds]
r3vDev has quit [Quit: Leaving.]
demophoon has left #ruby ["obai"]
bocaneri has joined #ruby
doublemalt__ has joined #ruby
pawnbox has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
cpruitt has quit [Quit: cpruitt]
antgel has joined #ruby
quazimodo has joined #ruby
Dimik has joined #ruby
jaguarmagenta has joined #ruby
mark_66 has joined #ruby
yardenbar has joined #ruby
anisha has quit [Quit: Leaving]
arnonhongklay has quit [Ping timeout: 244 seconds]
masterasia has quit [Ping timeout: 248 seconds]
sanmi has quit [Read error: Connection reset by peer]
<Bish>
also is there a shortcut to get the file part of a path?
gizmore has joined #ruby
<Bish>
it's basename ;;
ur5us has quit [Remote host closed the connection]
ziarkaen has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
jud has quit [Quit: Leaving]
Immune has quit [Ping timeout: 268 seconds]
<apeiros>
I'd expect it to default to something (maybe text/html) unless you pass it a header. I could imagine that it does a dynamic default based on the pathname in the url (e.g. .html -> text/html, .css -> …)
troulouliou_div2 has quit [Remote host closed the connection]
nowhereman has quit [Ping timeout: 260 seconds]
Ropeney has quit [Client Quit]
<apeiros>
you realize that rand is invoked every. single. time. bsearch yields?
<apeiros>
Bish: ^
7YUAAKWO6 has joined #ruby
6A4AAATV9 has joined #ruby
<apeiros>
(mind you, I haven't yet pondered whether the underlying algorithm is correct)
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sanmi has quit [Ping timeout: 244 seconds]
<apeiros>
given the result with that rand snafu fixed, I'd say the idea behind that algorithm is wrong too :)
jaruga___ has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
anisha_ has joined #ruby
rajdesai has joined #ruby
<apeiros>
or I'm misunderstanding the idea behind the 'chance' value. I understand it as total = 3.0, so {chance:0.2,value:1} means 1 should appear 6.6…% of the time. {chance:1.0,value:5} should appear 33.3…% of the time.
anisha has quit [Ping timeout: 265 seconds]
claudiuinberlin has joined #ruby
xall has joined #ruby
Moosashi has joined #ruby
sanmi has joined #ruby
phaza has quit [Read error: Connection reset by peer]
kimegede has joined #ruby
Beams has quit [Quit: .]
phaza has joined #ruby
sanmi has quit [Client Quit]
mluts has quit [Ping timeout: 244 seconds]
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
minimalism has quit [Quit: minimalism]
flyingX has quit [Remote host closed the connection]
jahmalz has joined #ruby
jahmalz has quit [Max SendQ exceeded]
Madplatypus has quit [Quit: Connection closed for inactivity]
flying has joined #ruby
jahmalz has joined #ruby
nankyokusei has joined #ruby
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
Moosashi has quit [Quit: Moosashi]
djbkd has joined #ruby
xall has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
koooge has quit [Quit: Leaving...]
nankyokusei has quit [Ping timeout: 260 seconds]
rajdesai has quit [Ping timeout: 246 seconds]
djbkd has quit [Ping timeout: 260 seconds]
Beams has quit [Quit: .]
jenrzzz has quit [Ping timeout: 250 seconds]
jshjsh has joined #ruby
vuoto has quit [Remote host closed the connection]
rlex has joined #ruby
Beams has joined #ruby
balazs has quit [Ping timeout: 268 seconds]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
UserJosh has quit [Ping timeout: 260 seconds]
saneax is now known as saneax-_-|AFK
balazs has joined #ruby
cbetta has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
roamingdog has joined #ruby
Beams has quit [Ping timeout: 252 seconds]
roamingdog has quit [Ping timeout: 256 seconds]
r3vDev has quit [Ping timeout: 250 seconds]
blackbombay_ has quit [Ping timeout: 256 seconds]
nowhereman has joined #ruby
gingray has quit [Ping timeout: 268 seconds]
sdothum has joined #ruby
Filiphe has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chris2 has quit [Ping timeout: 245 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
balazs has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
nickjj_ is now known as nickjj
pragmaticus has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
AndrewIsHere has joined #ruby
Beams has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
rajdesai has joined #ruby
mluts has joined #ruby
AndrewIsHere has quit [Ping timeout: 258 seconds]
hev has joined #ruby
vondruch_ has joined #ruby
tomphp has joined #ruby
konsolebox has quit [Quit: Leaving]
sparch has joined #ruby
chris2_ has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
miqlas-H has quit [Ping timeout: 265 seconds]
miqlas-H has joined #ruby
iwmrby has joined #ruby
CloCkWeRX has quit [Ping timeout: 248 seconds]
hev has quit [Quit: Leaving]
hev has joined #ruby
neeraj has joined #ruby
jgnagy has quit [Remote host closed the connection]
neeraj has quit [Quit: Leaving]
sludge has quit [Ping timeout: 244 seconds]
sludge has joined #ruby
strigonLeader has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
nadir has joined #ruby
spectrum has quit [Ping timeout: 260 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
balazs has joined #ruby
XV8 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
chris2_ is now known as chris2
hev has quit [Quit: Leaving]
[spoiler] has joined #ruby
interpolate has joined #ruby
tomphp has quit [Ping timeout: 244 seconds]
herbmillerjr has quit [Quit: Konversation terminated!]
[spoiler] has quit [Client Quit]
[spoiler] has joined #ruby
tomphp has joined #ruby
roamingdog has joined #ruby
jenrzzz has joined #ruby
dviola has joined #ruby
Rickmasta has joined #ruby
centrx has joined #ruby
farmic has joined #ruby
farmic has quit [Client Quit]
roamingdog has quit [Ping timeout: 265 seconds]
vondruch has joined #ruby
farmic has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
vondruch_ has quit [Ping timeout: 240 seconds]
anisha_ has quit [Quit: This computer has gone to sleep]
neeraj has joined #ruby
jmignault has joined #ruby
Madplatypus has joined #ruby
neeraj has left #ruby [#ruby]
iwmrby has quit [Quit: WeeChat 1.6]
rajdesai has quit []
jmignault has quit [Ping timeout: 260 seconds]
[spoiler] has quit [Quit: Cheers!]
[spoiler] has joined #ruby
brendan- has joined #ruby
pokalyis has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GinoManWorks has joined #ruby
jmignault has joined #ruby
zofrex has left #ruby ["o/"]
Ishido has quit [Remote host closed the connection]
kith_ has joined #ruby
creat has joined #ruby
Puffball_ has quit [Remote host closed the connection]
Ishido has joined #ruby
kith has quit [Ping timeout: 256 seconds]
synthroid has joined #ruby
Puffball has joined #ruby
nankyokusei has joined #ruby
CloCkWeRX has quit [Ping timeout: 245 seconds]
johnmilton has joined #ruby
pawnbox has quit [Remote host closed the connection]
r3vDev has joined #ruby
djbkd has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
diego2 has joined #ruby
gingray has joined #ruby
pawnbox has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as dviola
dviola has quit [Client Quit]
diego2 has joined #ruby
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as dviola
djbkd has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
dhollinger has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
<Bish>
apeiros: shit.
<Bish>
im an idiot
<adaedra>
no you aren't.
<Bish>
thats nice
<adaedra>
MINASWAN
CloCkWeRX has joined #ruby
<Bish>
i never understood that term
<Bish>
what does it mean
<adaedra>
Matz Is Nice And So We Are Nice
farmic has quit [Quit: Changing server]
rfoust has joined #ruby
<Bish>
ahh
<adaedra>
(But in reality, so, you just aren't an idiot. People make mistakes.)
jaguarmagenta has quit [Ping timeout: 244 seconds]
<Bish>
i never should've gotten into IT, that was a mistake
<Bish>
it's so depressing
<adaedra>
It can be rough sometimes
<toretore>
it's difficult, but one of the better professions you can have all things considered
<adaedra>
also, "IT" is so diverse
<Bish>
well, i would prefer being a trash-guy don't know how those are called in english
<Bish>
statistics suggest they're the happiest people
<Bish>
while it is all the way down at the bottom
<Bish>
s/it/IT
<toretore>
i doubt there is anything to prove that
<adaedra>
I won't say I'm happy because that would be a lie, but I don't think it's linked to IT tbh.
<Bish>
well it's statistics, there is no proofin that, but actually it sounds reasonable to me
<adaedra>
Also, 127.3% of statistics are made up.
<Bish>
yeah that's what i meant with "there is no proof in that"
<toretore>
i am unhappy because i hate humanity, nothing to do with my profession specifically
<Bish>
well, that is there additionally, yeah
<adaedra>
:|
<adaedra>
Hate is useless
<Bish>
but not being able to sleep because you have some sort of problem which is totally random
<Bish>
is something that i would prefer not to have
<adaedra>
It's another problem if that affects your sleep
<Bish>
well my brain is like that, i cannot go home from work
<Bish>
and stop thinking about a bug
millerti has joined #ruby
miqlas-H has quit [Ping timeout: 256 seconds]
<adaedra>
Don't get too worked over such a simple thing
<toretore>
most programmers are like that
<adaedra>
(I know, easier said than done)
<Bish>
(i am not talking about that rand thing)
<adaedra>
Programming is not easy, but it can also be loads of fun
<Bish>
yeah, i just started having my first github account and working on a full-web-solution for myself, that is pretty fun, but doing startup work is something completely different
DroidBurgundy has quit [Ping timeout: 245 seconds]
pawnbox has quit [Remote host closed the connection]
<Xeago>
Given in `encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError), is it trying to encode \xC3 as US-ASCII or from US-ASCII?
<Bish>
the string is in us-acii and \c3 does not seem to be a valid char in there
<Bish>
well i might be wrong.
<Bish>
>> x = "\xc3".force_encoding("US-ASCII"); x.encoding
DroidBurgundy has quit [Remote host closed the connection]
DroidBurgundy has joined #ruby
DroidBurgundy has quit [Client Quit]
<Xeago>
The pagerduty api returns unicode (\u00E4 for ä), somewhere something happens and then answer={:message=>"Some-name-with-a-umlaut \xC3\xA4 is on call at 2016-10-31 12:00:00 UTC."}
jerme has joined #ruby
<toretore>
1) are you sure it's utf-8 2) is is marked appropriately as utf-8?
jgnagy has quit [Ping timeout: 268 seconds]
<Xeago>
what I get from pagerduty is proper utf-8. When it gets to the #reply in rtm_adapter.rb it's unknown, but the representation has changed. (from \u00E4 to \xC3\xA4) which is the same byte representation but it prints differently.
davidt has joined #ruby
<Xeago>
unknown to me*
jgt has joined #ruby
<Xeago>
Given that the printed representation changes, the encoding has changed, I believe.
bmurt has joined #ruby
<Xeago>
The #bytes remain the same.
Tempesta has quit [Quit: See ya!]
GinoManWorks has quit [Read error: Connection reset by peer]
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
though, puts will print it as ä again, because it'll just write the bytes as-is to the output device, which doesn't care what ruby thinks which encoding it was using.
gingray has quit [Ping timeout: 248 seconds]
mordof has joined #ruby
<mordof>
is ruby's size method on strings O(n)?
saneax-_-|AFK is now known as saneax
<adaedra>
I'd say it's O(1), it surely keeps the size stored
strigonLeader has quit [Read error: Connection reset by peer]
<adaedra>
But that's a guess
<apeiros>
mordof: depends on the encoding
swills has joined #ruby
<apeiros>
variable-byte encodings like utf-8 are indeed O(n)
<apeiros>
.bytesize is O(1)
stan has quit [Remote host closed the connection]
<mordof>
ok, so use bytesize for getting large string size
<apeiros>
no
<mordof>
no?
aegis3121 has joined #ruby
<apeiros>
use bytesize if you want to know how many bytes there are.
<apeiros>
use size if you want to know how many characters there are.
cdg_ has joined #ruby
<apeiros>
different things.
cdg has quit [Ping timeout: 258 seconds]
<mordof>
right - bytes is more accurate for what i want anyway.. but it's just for a rough thing either way
<apeiros>
then yes, use bytesize. it'll be both faster and more correct ;-)
<mordof>
apeiros: we have some API calls that can return huge amounts of data, and i'm putting a limit in there so they can only return a certain amount of data within a given period
<mordof>
bytesize is best
SteenJobs has quit [Quit: SteenJobs]
<mordof>
thanks :)
blackwind_123 has joined #ruby
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Quit: Leaving.]
grug is now known as FODMEME
allcentury has quit [Ping timeout: 265 seconds]
stan has joined #ruby
pokalyis has joined #ruby
brendan- has joined #ruby
sepp2k has joined #ruby
shinnya has joined #ruby
nankyokusei has joined #ruby
saneax is now known as saneax-_-|AFK
saneax-_-|AFK is now known as saneax
SteenJobs has joined #ruby
FODMEME is now known as grug
Madplatypus has joined #ruby
cpruitt has quit [Quit: cpruitt]
allcentury has joined #ruby
maloik has joined #ruby
djbkd has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
ferr has quit [Quit: WeeChat 1.5]
i8igmac has quit [Ping timeout: 248 seconds]
machinewar has joined #ruby
Immune has quit [Ping timeout: 260 seconds]
jsrn__ has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
maloik31 has quit [Ping timeout: 258 seconds]
agit0 has joined #ruby
rippa has joined #ruby
jsrn_ has quit [Ping timeout: 240 seconds]
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
akitada has joined #ruby
pokalyis has joined #ruby
Beams has quit [Quit: .]
nettoweb has joined #ruby
yoshi has joined #ruby
yoshi is now known as Guest56892
agit0 has quit [Quit: I'm off]
QpQ4 has joined #ruby
saneax is now known as saneax-_-|AFK
cpruitt has joined #ruby
aegis3121 has quit [Read error: Connection reset by peer]
Beams has joined #ruby
saneax-_-|AFK is now known as saneax
aegis3121 has joined #ruby
codfection has joined #ruby
cpruitt has quit [Client Quit]
phaza_ has joined #ruby
unreal_ is now known as unreal
et09 has joined #ruby
<et09>
is there an equivalent to mkdir -p foo/bar/baz for objects
<fbt>
Well I mean it's not a big deal. Just don't forget about it.
triangles2 has quit [Ping timeout: 248 seconds]
GodFather has joined #ruby
<fbt>
Oh, and suid
<fbt>
When Process::Sys.setuid(uid) would set all three
<adaedra>
Not sure about that
<fbt>
At least on linux it sets all three.
<adaedra>
Looks like it's just a call to C setuid(2)
<fbt>
And that sets all three, yes
<adaedra>
uid= does a setuid() too
<fbt>
I've tested it literally a few minutes ago
<fbt>
It won't set euid
GinoManWorks has joined #ruby
<adaedra>
ah no, I misread, it's a fallback
<fbt>
Just open irb and see for yourself
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fbt>
so yeah, *now you know too* :D
<adaedra>
I usually don't change uids from ruby tho
<fbt>
And that won't reset your groups, so you have to do that too
JeanCarl1Machado has joined #ruby
weemsledeux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
meshsmith has joined #ruby
<fbt>
Eh, I just have a concept in my head that would most likely have a master process running as root and workers running as a user
govg has joined #ruby
atmosx has joined #ruby
weemsledeux has joined #ruby
<fbt>
Did a quick google and was surprised that uid= won't set euid. And euid= won't set uid.
aegis3121 has quit [Read error: Connection reset by peer]
<fbt>
Assumed it should be just a call to setuid. Nope :D
aegis3121 has joined #ruby
<adaedra>
You have the source in the doc
<fbt>
Yeah, yeah, I've looked it up after it didn't do what I assumed
<adaedra>
uid= actually has several methods it can call depending on what's available
tvsutton_ has quit [Quit: Quit]
codfection has quit [Remote host closed the connection]
weemsledeux has quit [Client Quit]
tuxaddicted has quit [Ping timeout: 260 seconds]
malconis has joined #ruby
watersoul_ has quit [Ping timeout: 256 seconds]
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hs366 has quit [Ping timeout: 245 seconds]
saneax is now known as saneax-_-|AFK
saneax-_-|AFK is now known as saneax
<eam>
fbt: behavior varies between systems, not at the ruby level but at the system level
ChiefAlexander has joined #ruby
<Guest56892>
Might Thread.new {ffi_call_that_blocks_forever} somehow starve the garbage collector ?
<eam>
fbt: I wrote a simple gem to collect this behavior and drop privs for blocks, if you're interested: https://rubygems.org/gems/elvis
<fbt>
Ooh
pokalyis has joined #ruby
saneax is now known as saneax-_-|AFK
<fbt>
I was going to do that myself at some point
Helheim has quit [Remote host closed the connection]
nettoweb has joined #ruby
Helheim has joined #ruby
Beams has quit [Quit: .]
TomyWork has quit [Ping timeout: 256 seconds]
watersoul has joined #ruby
Beams has joined #ruby
Snowy has joined #ruby
aganov has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 252 seconds]
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
davix has joined #ruby
exxi has joined #ruby
davidt has quit []
<exxi>
what's the difference between ruby and ruby on rails ?
<eam>
exxi: ruby on rails is a set of libraries for ruby
saneax-_-|AFK is now known as saneax
<havenwood>
exxi: Ruby is a language and Rails is a Rack adapter gem.
<exxi>
ruby of rails is for web dev am i correct ?
<havenwood>
exxi: Yup, Rails is a web app framework.
gregf_ has quit [Quit: Page closed]
<exxi>
cool :)
<exxi>
learning ruby must be fun :)
<exxi>
is it similar to python ?
* mordof
isn't familiar enough with python to make that distinction
<centrx>
They are similar in some ways, but Ruby is more powerful/expressive and cooler
<centrx>
more consistent interface
<centrx>
actual object-orientation
<mordof>
i feel like it'd be more accurate to say Ruby is closer to javascript than to python
<mordof>
ignoring syntax obviously
<exxi>
cool :)
bovis has joined #ruby
AndrewIsHere has joined #ruby
<chris2>
i'd consider that an insult :P
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mordof>
the ruby to js comment?
<chris2>
yes :)
<mordof>
i just meant in relative regards to python
<chris2>
and i'm not sure one could say that even
<mordof>
not in it's fullest
<chris2>
the oo system of python and ruby is much more similar than js
<chris2>
at least pre-es6
<centrx>
yeah I don't see any connection between Ruby and JS
<chris2>
except ruthless monkeypatching by the community, i dont either :P
<mordof>
lol, fair enough
<aegis3121>
Ruby has functional qualities.
<chris2>
and a bazillion gem deps :D
pokalyis has joined #ruby
AndrewIsHere has quit [Client Quit]
saneax is now known as saneax-_-|AFK
<mordof>
i got that impression mainly because i come from a js background.. and after reading about how ruby determines method locations and stuff, going up the chain.. it seemed like the style of how objects are in js was similar to ruby
saneax-_-|AFK is now known as saneax
<mordof>
there's a lot more to languages than just that, which i didn't really think about what i was considering similarities/differences
<centrx>
mordof: that's how method dispatch works in most languages
<mordof>
centrx: then it's pretty clear how much i know about these things :) lol. i'll avoid making that statement in the future
saneax is now known as saneax-_-|AFK
saneax-_-|AFK is now known as saneax
blackjid has quit [Ping timeout: 258 seconds]
tpendragon has quit [Ping timeout: 258 seconds]
brent__ has joined #ruby
preyalone has joined #ruby
<centrx>
JS is actually a pretty unique language because of "prototype" objects
sagax was kicked from #ruby by ruby[bot] [stop that]
atmosx has quit [Ping timeout: 260 seconds]
yardenbar has quit [Ping timeout: 250 seconds]
<Xeago>
I've been chasing this encoding bug I'm experiencing (from a few hours ago), it happens at a `ERB.new(template, nil, '>').result(binding).strip`. How can one instruct erb to consider the template UTF-8 and thus output in UTF-8?
jmignault has quit [Ping timeout: 252 seconds]
agit0 has quit [Quit: zzzZZZ….]
edwinvdgraaf has quit [Ping timeout: 248 seconds]
<Xeago>
I've not seen things in the docs for setting encodings for ERB's, there's a encoding read-property, but how does on set it? :#
<mordof>
tapas: you need a more complex solution before it's considered acceptable?
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marxarelli has joined #ruby
<mordof>
you could set up a redis server, and have a node process watch a channel on the redis server, and when that message gets sent over the channel, for the node process to write to a sql database, where another node process polls the sql database, and then once it receives the message to write a message to a file, where another process waits for the fi
<mordof>
le to appear, and then sends a signal to your main process
jenrzzz has joined #ruby
* mordof
likes coming up with insane solutions
roamingdog has joined #ruby
nofxx has quit [Ping timeout: 258 seconds]
<mordof>
the second node process could be written in bash, just to increase complexity
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roamingdog has quit [Ping timeout: 245 seconds]
larissa has joined #ruby
troys_ is now known as troys
mello has quit [Quit: Lost terminal]
kith_ is now known as kith
SeepingN has joined #ruby
rfoust has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha_ has joined #ruby
SeepingN has quit [Read error: Connection reset by peer]
mordof has left #ruby [#ruby]
SeepingN has joined #ruby
bmurt has joined #ruby
sepp2k has quit [Quit: Leaving.]
johnmilton has quit [Remote host closed the connection]
Synthead has joined #ruby
tyang has quit [Ping timeout: 248 seconds]
futilegames has quit [Quit: futilegames]
boombox_ has joined #ruby
meshsmith has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
nahra has joined #ruby
Salih has quit [Read error: Connection reset by peer]
pragmaticus has joined #ruby
synthroid has quit []
Synthead has quit [Quit: Synthead]
dionysus69 has quit [Ping timeout: 252 seconds]
vuoto has quit [Remote host closed the connection]
tw1sted_ is now known as tw1sted
tw1sted has quit [Changing host]
tw1sted has joined #ruby
Synthead has joined #ruby
boombox_ has quit [Remote host closed the connection]
mixdev23 has quit [Quit: Leaving]
zerowaitstate has joined #ruby
nofxx has joined #ruby
Salih has joined #ruby
Salih has quit [Changing host]
Salih has joined #ruby
Salih has quit [Max SendQ exceeded]
Salih has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
nettoweb1 has joined #ruby
nettoweb has quit [Ping timeout: 256 seconds]
_sfiguser has quit [Ping timeout: 258 seconds]
toretore has quit [Ping timeout: 252 seconds]
riffraff has quit [Quit: This computer has gone to sleep]
zerowaitstate has quit [Quit: leaving]
p0p0pr37 has quit [Read error: Connection reset by peer]