havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
<benzrf> (py3, that is)
matp_ has joined #ruby
matp has quit [Ping timeout: 246 seconds]
<Ox0dea> >>> 'ß'.upper().lower()
<Ox0dea> 'ss'
<Ox0dea> Whoops.
<Ox0dea> Surely that should've been a no-op?
jaguarmagenta has joined #ruby
brent__ has joined #ruby
<arahael> Ox0dea: no, that's correct. python doesn't take locale into consideration.
<Ox0dea> arahael: Shouldn't it?
jaguarma_ has quit [Ping timeout: 252 seconds]
<arahael> benzrf: but locale!
<arahael> Ox0dea: how can it, without the locale?
bkxd has quit [Ping timeout: 250 seconds]
matp_ is now known as matp
pawnbox has joined #ruby
doublemalt__ has quit [Ping timeout: 250 seconds]
bkxd has joined #ruby
crime has joined #ruby
ur5us has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 252 seconds]
binaryplease1 has joined #ruby
_Tariq has joined #ruby
IrishGringo has quit [Ping timeout: 260 seconds]
binaryplease has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
<_Tariq> I am building a web server for a class, and every time the user goes to a website, I send them a Header telling the browser to create a new cookie with certain characteristics
<_Tariq> But Chrome adds a new cookie value, called rack.session.
<_Tariq> So the web server's cookie gets messed up...
<_Tariq> Also, when people go to a page, they send me their cookie, I process it in memory, and then send them a new cookie with new updated values...
<_Tariq> This is how I get "rack.session"
doublemalt__ has joined #ruby
<_Tariq> What should I do with rack.session? Just don't process it?
ta_ has quit [Ping timeout: 250 seconds]
arescorpio has joined #ruby
<_Tariq> Well, I guess that worked then. Thanks Rubby Duckies.
<_Tariq> *Rubbe
<_Tariq> *Rubber
w1lson has joined #ruby
IrishGringo has joined #ruby
binaryplease1 is now known as binaryplease
flashpoint9 has joined #ruby
moeabdol has joined #ruby
blackmesa has joined #ruby
benlieb has quit [Quit: benlieb]
n008f4g_ has quit [Ping timeout: 240 seconds]
IrishGringo has quit [Ping timeout: 276 seconds]
crime has quit [Remote host closed the connection]
crime has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
davedev24 has joined #ruby
<droptone> question: I'm trying to figure out how to best organize this hash. The associations are like this (using example names): "Account" has one value, which has an array "patients", and under patients there are two arrays that belong to patients, "billable_items" and "products"
crime has quit [Remote host closed the connection]
<droptone> so starting with "patients", I need patients to be an array, where each entry has two sub-arrays, "billiable_items" and "products"
SilverKey has joined #ruby
<droptone> what's the best way to design that?
ramfjord has quit [Ping timeout: 250 seconds]
william3 has joined #ruby
tmtwd has joined #ruby
jaguarma_ has joined #ruby
tmtwd has quit [Read error: Connection reset by peer]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24 has quit [Read error: Connection reset by peer]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
benlieb has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
benlieb has quit [Client Quit]
JoshGlzBrk has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
jdawgaz has joined #ruby
pawnbox has joined #ruby
<_Tariq> droptone: { account: [ patient_one: { billiable_items: "foo", products: "bar" }, patient_two: { billable_items: "alpha", products: "beta" } ] }
<_Tariq> At least, that's what your spec claimed for it to be
<_Tariq> Is this what you want?
<_Tariq> And sorry for the actual ruby code, I couldn't think how to explain it using pseudocode
<smathy> [] and [] instead of "foo" and "bar" - but yeah, what _Tariq said.
<droptone> That sounds fine _Tariq, thank you.
polysics has joined #ruby
<smathy> droptone, but, hashes of arrays of hashes scream out "write some classes" to me.
<droptone> Think I've got it here, I know it's a basic question but for some reason I couldn't wrap my head around it, think I got it.
<droptone> right smathy, I'm trying to replicate the database structure here in a hash to test dumping it to a big var.
<droptone> I might write out some classes.
<droptone> Thank you.
bkxd has quit [Ping timeout: 250 seconds]
davedev24 has quit []
jdawgaz has quit [Client Quit]
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
blaxter has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
polysics has quit [Ping timeout: 244 seconds]
jaguarmagenta has joined #ruby
bkxd has joined #ruby
jaguarma_ has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
RegulationD has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
william3 has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
ensyde has quit [Ping timeout: 268 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
zacstewart has quit [Ping timeout: 268 seconds]
tvon has quit [Quit: System is sleeping...]
triangles has quit [Quit: Leaving]
JoshGlzBrk has quit [Ping timeout: 244 seconds]
weemsledeux has joined #ruby
zacstewart has joined #ruby
william3 has quit [Ping timeout: 260 seconds]
Weavel has quit [Quit: Never put off till tomorrow, what you can do the day after tomorrow]
jaguarma_ has joined #ruby
northrup has joined #ruby
wilbert has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
diegoaguilar has joined #ruby
jdawgaz has joined #ruby
Dry_Lips has quit [Ping timeout: 252 seconds]
bruce_lee has quit [Remote host closed the connection]
hxegon has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Ping timeout: 244 seconds]
Moosashi has joined #ruby
ta_ has joined #ruby
skade has joined #ruby
x77686d has quit [Quit: x77686d]
swills has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
baweaver has quit [Remote host closed the connection]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
Dry_Lips has joined #ruby
Dry_Lips has joined #ruby
baweaver has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
_Tariq has quit []
Rodya_ has joined #ruby
nando293921 has quit [Read error: Connection reset by peer]
terminalrecluse has joined #ruby
nando293921 has joined #ruby
Moosashi has quit [Quit: Moosashi]
blackmesa has joined #ruby
bonhoeffer has joined #ruby
CloCkWeRX has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
w1lson has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
chipotle has quit [Ping timeout: 268 seconds]
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
newjersey has joined #ruby
newjersey has quit [Max SendQ exceeded]
freerobby has joined #ruby
jrafanie has joined #ruby
bronson has joined #ruby
framling has joined #ruby
freerobby has quit [Client Quit]
polysics has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
polysics has quit [Ping timeout: 246 seconds]
elifoster has quit [Ping timeout: 276 seconds]
mlakewood has quit [Quit: mlakewood]
gh has joined #ruby
djbkd has joined #ruby
northrup has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ruby
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
A124 has quit [Read error: Connection reset by peer]
diegoaguilar has quit [Read error: Connection reset by peer]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
acontius has joined #ruby
aspiers_ has joined #ruby
sdothum has joined #ruby
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A124 has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
diegoaguilar has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
johnmilton has quit [Remote host closed the connection]
terminalrecluse is now known as terminal|afk
moeabdol has joined #ruby
flashpoint9 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
GriffinHeart has joined #ruby
freerobby has quit [Quit: Leaving.]
statelesscode has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 276 seconds]
moeabdol has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Madplatypus has joined #ruby
rkazak has joined #ruby
Chagel has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
tref has joined #ruby
tref has quit [Client Quit]
JBlazeCoder21 has joined #ruby
tref has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
bklane has joined #ruby
northrup has joined #ruby
jaguarma_ has quit [Remote host closed the connection]
william3 has joined #ruby
tvon has joined #ruby
jaguarmagenta has joined #ruby
acontius has quit [Quit: leaving]
JBlazeCoder21 has quit [Remote host closed the connection]
william3 has quit [Ping timeout: 244 seconds]
mlakewood has joined #ruby
SilverKey has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Ebok has joined #ruby
Moosashi has joined #ruby
GriffinHeart has joined #ruby
ur5us has quit [Remote host closed the connection]
jaguarma_ has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
meinside has quit [Quit: Connection closed for inactivity]
solocshaw has joined #ruby
lxsameer has joined #ruby
ur5us has joined #ruby
william3 has joined #ruby
polysics has joined #ruby
<droptone> Question: I have an empty array, and I want to go to the next spot in the array, even if empty
wilbert has quit [Ping timeout: 250 seconds]
<droptone> is there a method for that, like .next or some such?
jaguarmagenta has quit [Ping timeout: 276 seconds]
emilford has joined #ruby
smathy is now known as smathy_afk
skweek has quit [Remote host closed the connection]
<Ox0dea> droptone: To what end?
<droptone> to the end of knowing I'm specifically at the next point in the array since it's an array of hashes that hold specific values
william3 has quit [Ping timeout: 260 seconds]
Moosashi has quit [Quit: Moosashi]
<droptone> so I can ensure that everything I'm assigning are landing on the next array index
<droptone> some of the values are arrays and I can't just dump via <<
<Ox0dea> How come?
<droptone> well I'm working on a workaround right now
<droptone> but there isn't such a method?
polysics has quit [Ping timeout: 268 seconds]
bonhoeffer has quit [Quit: Page closed]
LoneHerm_ has quit [Remote host closed the connection]
<Ox0dea> It's still not clear to me what sort of method you're looking for.
<Ox0dea> It sounds like you want something like `a[a.size + 1] = foo`, but that can't be right.
djbkd has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
<droptone> Ok, so here's my situation.
RegulationD has joined #ruby
<droptone> I have an app that is getting more customers and I need to speed it up.
<droptone> The basic gist of the app, oversimplified, is this:
<droptone> 1) Get data from remote API provider
<droptone> 2) Analyze said data, looping through objects returned from API and comparing aspects of those objects, such as last_updated timestamp, to the last_updated timestamp I have on file for that specific object
<droptone> 3) If needed, push data to second remote API
<droptone> it works as designed but is too slow, and I profiled it and, after analyzing the profile output and discussing it in here and elsewhere
<droptone> determined that a large amount of my speed issues revolve around the ActiveRecord MySQL queries that are occurring
<droptone> the MySQL DB lives on an Amazon RDS instance
<droptone> As it stands now, after retrieving the data, when looping through the data returned from the API for analysis, on every iteration it is making a MySQL query to load the record on file for that object
yardenbar has joined #ruby
<droptone> the consenus is that it could be sped up dramatically by making a single query to load the needed MySQL data ahead of time, in one big query, and storing it in a hash
<droptone> so I'm attempting to do that.
djbkd has quit [Ping timeout: 246 seconds]
<droptone> The issue is, I'm using Rails 4.2.x as the front end and some of the data lives in child tables
<arahael> droptone: You could also consider uploading a table containing your "local" timestamps and doing the comparison in SQL.
SilverKey has quit [Quit: Halted.]
<droptone> well, there's other data besides the timestamp that's analyzed, but fair point arahael, thank you
RegulationD has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
<droptone> but the issue is, I'm trying to design this hash so that record "patient", which has subrecord "billitems" and "prods", both of which belong_to patients
<arahael> droptone: Also, while I am somewhat biased against ORMs, I don't like them - ORMs do have a big advantage: When you learn the ORM thoroughly, you can do some quite good whole-program optimisations by just focusing on the ORM.
<droptone> I need the big hash that stores the database entries to be lined up properly
<droptone> what I mean is, say I have an array "patients", and each patient has a table of "billitems" and a table of "prods"
<arahael> droptone: I'm really not sure how you'd do it in mySQL. In Postgresql, I'd suggest returning the results as XML or Json given that you want a heirachial format.
<droptone> I need to design the hash that way so I don't have to re-query or further analyze, so I can just load a given patient from the array based on specific criteria and I know that that index also contains the proper billitems and prods
<droptone> both of which are arrays of their own
<arahael> droptone: (postgresql has native support for json and xml)
<arahael> droptone: Also, native support for arrays. :)
<droptone> so it's like, patients is an array, and for every patient I have an array of billitems and an array of prods
<arahael> Sounds like a suboptimal schema, though. :/
<droptone> arahael: I'm going to try some things before blowing away our RDS environment, last I checked RDS doesn't support postgres
<droptone> ok, what would be a more optimal schema?
<droptone> than a patient which has a table of billitems unique to that patient and a table of prods unique to that patient?
<arahael> droptone: Fairly sure AWS does support it. But anyway. Consider creating a new mysql view that allows an easier (and more efficient) activerecord use.
<droptone> oh never mind, it does support postgres
<droptone> rds
<droptone> that's good
p1k has joined #ruby
<arahael> droptone: Or even a temporary table that is created at the start with some complex SQL, do your processing, then drop the table
<droptone> it was maria it doesn't support
<droptone> but I suppose maria is just mysql
berserk_ren has joined #ruby
<arahael> droptone: maria is a fork of mysql. Just as bad (I'm biased...), but not exactly the same anymore.
baweaver has quit [Ping timeout: 250 seconds]
<droptone> Well right now all I need is to know how to create this hash to store these values
<droptone> in a logical manner
<droptone> this should be simple, not sure why it's escaping me
<arahael> droptone: However, if you're only looking at performance, mysql is probably quite adequate. I'd worry about changing the database another day when you optimise/refactor another aspect of your system.
<arahael> droptone: Don't fall in the trap of changing the whole system while trying to optimise a small part: You risk scope creap and never, ever finishing the task.
<droptone> I mean I suppose I could just dump the tables independently then perform logic after the fact to line them up
<droptone> I"m not changin the whole system, I'm just dumping the DBs ahead of time instead of querying the records one at a time as needed to see if I get a performance boost
braincrash has quit [Quit: bye bye]
<arahael> droptone: Sure. Dump the tables, do your processing, and say that the processing is accurate up to the dump point.
<droptone> right
terminal|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<droptone> which brings me back to my question regarding a logical manner to structure this hash
william3 has joined #ruby
<droptone> patients is an array, and each patient has both its own values as well as an array of "billitems" and an array of "prods"
mjuszczak has joined #ruby
blackgoat has quit [Quit: WeeChat 1.4]
<arahael> droptone: If it's just a quick test to see a performance improvemet, I'd just consider doing it naively. Hash of hashes, of arrays, whatever.
SilverKey has joined #ruby
<arahael> droptone: That's a PITA in terms of maintenance or refactoring, but it's a start.
<droptone> um, right, I'm just asking the best way to structure this hash
<droptone> patients is an array, each patient has an array of "billitems" and an array of "prods
<droptone> "
<droptone> and also each patient has its own values
<arahael> droptone: Your focus is on *algorithmic* and *architectural* changes, really, as far as performance is concerned.
<arahael> So ,consider the structure that best fits your algorithms.
ssiris has joined #ruby
<droptone> the structure that best fits my algorithms is the one described
<arahael> droptone: Then use it.
pawnbox has joined #ruby
<droptone> lol
<droptone> I'm asking how it would be written
<droptone> all good, I've got it, thank you
pawnbox_ has joined #ruby
<arahael> :)
yardenbar has quit [Ping timeout: 276 seconds]
<arahael> It's shit in terms of maintenance and refactoring, but you can do that *after* understanding that the time invested is worth it.
william3 has quit [Ping timeout: 244 seconds]
jdawgaz has joined #ruby
p1k has quit [Ping timeout: 250 seconds]
wilbert has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
pawnbox_ has quit [Ping timeout: 244 seconds]
w1lson has joined #ruby
bkxd has joined #ruby
braincrash has joined #ruby
rbennacer has joined #ruby
AnoHito_ has quit [Quit: Leaving]
rbennace_ has joined #ruby
ta_ has joined #ruby
isxek has joined #ruby
rbennacer has quit [Ping timeout: 246 seconds]
janebootydoe2 has joined #ruby
bradleyprice has joined #ruby
tref has quit [Quit: tref]
ta_ has quit [Ping timeout: 250 seconds]
w1lson has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
janebootydoe has quit [Ping timeout: 240 seconds]
mjuszczak has quit []
aspiers_ has quit [Ping timeout: 246 seconds]
bradleyprice has quit [Ping timeout: 246 seconds]
tildes has joined #ruby
w1lson has joined #ruby
gix has quit [Ping timeout: 250 seconds]
tref has joined #ruby
jaguarmagenta has joined #ruby
gix has joined #ruby
jaguarma_ has quit [Ping timeout: 252 seconds]
bklane has quit [Remote host closed the connection]
william3 has joined #ruby
Rickmasta has quit [Ping timeout: 246 seconds]
R3DH4 has quit [Remote host closed the connection]
xlegoman_ has quit [Quit: xlegoman_]
bronson has joined #ruby
w1lson has quit [Quit: Textual IRC Client: www.textualapp.com]
zacstewart has quit [Ping timeout: 246 seconds]
juanca_ has joined #ruby
Rickmasta has joined #ruby
Cohedrin has quit [Ping timeout: 250 seconds]
william3 has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
aspiers_ has joined #ruby
Trynemjoel has joined #ruby
polysics has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
berserk_ren has quit [Ping timeout: 276 seconds]
jaguarma_ has joined #ruby
elifoster has joined #ruby
Cohedrin has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
Devalo has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
baweaver has joined #ruby
x77686d has joined #ruby
polysics has quit [Ping timeout: 260 seconds]
tvon has quit [Quit: Peace out, y'all!]
djbkd has joined #ruby
moeabdol has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 244 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
Trynemjoel has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has quit [Ping timeout: 252 seconds]
LoneHerm_ has joined #ruby
moeabdol has quit [Ping timeout: 252 seconds]
bklane has joined #ruby
moeabdol has joined #ruby
kareeoleez has joined #ruby
william3 has joined #ruby
kareeole_ has joined #ruby
rbennace_ has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
rbennacer has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
kareeoleez has quit [Ping timeout: 276 seconds]
william3 has quit [Ping timeout: 244 seconds]
northrup has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: WeeChat 1.4]
northrup has joined #ruby
stardiviner has joined #ruby
statelesscode has quit [Quit: statelesscode]
baweaver has quit [Remote host closed the connection]
Es0teric has joined #ruby
stannard has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
Channel6 has quit [Quit: Leaving]
mlakewood has quit [Quit: mlakewood]
rbennacer has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
arescorpio has quit [Quit: Leaving.]
rbennacer has quit [Read error: Connection reset by peer]
<hackeron> apeiros: no, not solved yet :( - asked manufacturer for more details and examples
ta_ has joined #ruby
rbennacer has joined #ruby
lkba has joined #ruby
bluOxigen has joined #ruby
brianpWins has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
hxegon has joined #ruby
Yithar has joined #ruby
william3 has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
zzak has quit [Remote host closed the connection]
zzak has joined #ruby
astrobunny has joined #ruby
Dimik has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
bluOxigen has quit []
rbennace_ has joined #ruby
p1k has joined #ruby
zacstewart has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
rbennacer has quit [Ping timeout: 268 seconds]
Yiota has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LoneHerm_ has joined #ruby
rbennace_ has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 252 seconds]
juanca_ has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 246 seconds]
Yiota has quit [Ping timeout: 240 seconds]
Guest28437 has quit [Quit: Connection closed for inactivity]
Dimik1 has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
rbennacer has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kareeole_ is now known as kareeoleez
tax has joined #ruby
polysics has joined #ruby
Moosashi has joined #ruby
noService has joined #ruby
diegoviola has quit [Quit: WeeChat 1.4]
jaguarma_ has quit [Remote host closed the connection]
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wilbert has quit [Ping timeout: 276 seconds]
tref has quit [Quit: tref]
polysics has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
p1k has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
jaguarmagenta has joined #ruby
jdawgaz has joined #ruby
Moosashi has quit [Quit: Moosashi]
terminalrecluse has joined #ruby
p1k has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
djbkd has quit [Ping timeout: 246 seconds]
bklane has quit [Quit: Leaving...]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
janebootydoe2 has quit [Quit: Leaving]
GriffinHeart has joined #ruby
p1k has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
rbennacer has quit [Remote host closed the connection]
navneet has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
Chagel has quit [Ping timeout: 240 seconds]
flashpoint9 has joined #ruby
perturbation has quit [Quit: Leaving]
Cohedrin_ has joined #ruby
navneet_ has joined #ruby
Cohedrin has quit [Ping timeout: 276 seconds]
flashpoint9 has quit [Ping timeout: 244 seconds]
navneet__ has joined #ruby
baweaver has joined #ruby
SilverKey has quit [Quit: Halted.]
ropeney has joined #ruby
navneet has quit [Ping timeout: 250 seconds]
navneet_ has quit [Ping timeout: 240 seconds]
tristanp has joined #ruby
axion_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
Devalo has joined #ruby
saneax has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
aspiers_ has quit [Ping timeout: 276 seconds]
kareeoleez has quit [Remote host closed the connection]
ta_ has joined #ruby
bobbycvi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tristanp has quit [Ping timeout: 276 seconds]
SilverKey has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
agit0 has joined #ruby
william3 has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
navneet has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
s1kx has quit [Ping timeout: 268 seconds]
baweaver has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
tribals has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
navneet__ has quit [Ping timeout: 260 seconds]
LoneHerm_ has quit [Remote host closed the connection]
yardenbar has joined #ruby
oliver__ has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
northrup has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
zast has quit [Remote host closed the connection]
doublemalt__ has quit [Remote host closed the connection]
Chagel has joined #ruby
djbkd has joined #ruby
noServic1 has joined #ruby
noService has quit [Read error: Connection reset by peer]
bronson has joined #ruby
lxsameer has joined #ruby
moeabdol has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
Moosashi has joined #ruby
noServic1 has quit [Ping timeout: 276 seconds]
moeabdol has quit [Client Quit]
moeabdol has joined #ruby
polysics has joined #ruby
GriffinHeart has joined #ruby
noService has joined #ruby
ramfjord has joined #ruby
PedramT has joined #ruby
polysics has quit [Ping timeout: 250 seconds]
PedramT has quit [Remote host closed the connection]
bkxd has joined #ruby
mgorbach has quit [Ping timeout: 244 seconds]
Moosashi has quit [Quit: Moosashi]
PedramT has joined #ruby
solars has joined #ruby
mgorbach has joined #ruby
bluOxigen has joined #ruby
kareeoleez has joined #ruby
kareeoleez has quit [Remote host closed the connection]
mark_66 has joined #ruby
kareeoleez has joined #ruby
gh has quit [Quit: Leaving]
Devalo has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 276 seconds]
thesheff17 has quit [Quit: Connection closed for inactivity]
GriffinHeart has quit [Ping timeout: 246 seconds]
Chagel_ has joined #ruby
r0bby_ has joined #ruby
r0bby_ has quit [Client Quit]
robbyoconnor has quit [Read error: Connection reset by peer]
DoubleMalt has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
CausaMortis has joined #ruby
pLaToOn has joined #ruby
zacstewart has joined #ruby
aganov has joined #ruby
dionysus69 has joined #ruby
victortyau has joined #ruby
mloy_ has joined #ruby
tubuliferous has quit [Ping timeout: 250 seconds]
victortyau has quit [Client Quit]
yfeldblum has joined #ruby
GriffinHeart has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
william3 has joined #ruby
bkxd has quit [Ping timeout: 250 seconds]
victortyau has joined #ruby
tubuliferous has joined #ruby
xqwztis has joined #ruby
last_staff has joined #ruby
xqwztis has quit [Client Quit]
william3 has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
pandaant has joined #ruby
mloy_ has quit [Quit: Leaving]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tildes has joined #ruby
Moosashi has joined #ruby
oliver___ has joined #ruby
saneax is now known as saneax_AFK
oliver__ has quit [Ping timeout: 276 seconds]
ur5us has quit [Remote host closed the connection]
Pupeno has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
djbkd has quit []
Xeago has joined #ruby
haraoka has joined #ruby
Moosashi has quit [Quit: Moosashi]
GriffinHeart has joined #ruby
william3 has joined #ruby
tubuliferous has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
saneax_AFK is now known as saneax
polysics has joined #ruby
Moosashi has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
ta_ has joined #ruby
andikr has joined #ruby
tvw has joined #ruby
TomyWork has joined #ruby
sphex_ has joined #ruby
william3 has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 250 seconds]
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
p1k has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
biberu has joined #ruby
sphex has quit [Ping timeout: 250 seconds]
codecop_ has quit [Quit: Išeinu]
elifoster has quit [Quit: sleep]
tubuliferous has joined #ruby
tvw has quit []
Robtop__ has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
Robtop__ has joined #ruby
ur5us has quit [Read error: No route to host]
mikecmpbll has joined #ruby
ur5us has joined #ruby
hk238 has joined #ruby
william3 has joined #ruby
navneet has quit [Remote host closed the connection]
tessi has joined #ruby
bkxd has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
Chagel_ has quit [Ping timeout: 240 seconds]
Chagel has joined #ruby
x77686d has quit [Quit: x77686d]
ssiris has quit [Quit: End of Line]
armyriad has quit [Ping timeout: 252 seconds]
Devalo has quit [Ping timeout: 276 seconds]
AlexJakeGreen has joined #ruby
gagrio has joined #ruby
bluOxigen has left #ruby [#ruby]
armyriad has joined #ruby
tubuliferous has quit [Ping timeout: 250 seconds]
vondruch has quit [Ping timeout: 240 seconds]
polysics has joined #ruby
tristanp has joined #ruby
tessi has quit [Quit: tessi]
Xeago has joined #ruby
brent__ has quit [Quit: Connection closed for inactivity]
Yithar has quit [Quit: Leaving]
saneax is now known as saneax_AFK
bradleyprice has joined #ruby
ur5us has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
tristanp has quit [Ping timeout: 268 seconds]
s1kx has joined #ruby
terlar has joined #ruby
jaruga___ has joined #ruby
bradleyprice has quit [Ping timeout: 252 seconds]
xqwztis has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
the_drow has joined #ruby
tax has quit [Ping timeout: 268 seconds]
saneax_AFK is now known as saneax
ur5us has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
skade has joined #ruby
ur5us has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roelof has joined #ruby
roelof has quit [Client Quit]
roelof has joined #ruby
grassass has quit [Remote host closed the connection]
tubuliferous has joined #ruby
lsmola has joined #ruby
<roelof> and this solution : http://lpaste.net/161374
TheHodge has joined #ruby
<roelof> Can I improve my solution somehow : http://lpaste.net/161374
aufi has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
toretore has joined #ruby
edwinvdgraaf has joined #ruby
Couch has joined #ruby
xqwztis has quit [Ping timeout: 250 seconds]
evidex has joined #ruby
tagaulap has joined #ruby
CloCkWeRX has joined #ruby
Qommand0r has joined #ruby
anisha_ has joined #ruby
bronson has joined #ruby
PedramT has quit [Remote host closed the connection]
shayan has joined #ruby
armyriad has quit [Ping timeout: 250 seconds]
fedexo has quit [Ping timeout: 250 seconds]
<Elysia> roelof: the challenge link doesn't work / requires authorization, what is the challenge?
tubuliferous has quit [Ping timeout: 246 seconds]
<Elysia> roelof: also, you might like 'codewars', challenges made by users that also (once solved or given up) show you other people their solutions. I'm pretty sure it supports ruby
Moosashi has quit [Quit: Moosashi]
<roelof> Elysia: I apolize. in 2 sentences the challenge is this : Write a program that prints the temperature closest to 0 among input data. If two numbers are equally close to zero, positive integer has to be considered closest to zero (for instance, if the temperatures are -5 and 5, then display 5).
symm- has quit [Ping timeout: 250 seconds]
SilverKey has quit [Quit: Halted.]
<Elysia> the solutions by other users are not always the best (some of them are incredibly obscure exploiting the language), but it might give you some cool ideas
baweaver has quit [Remote host closed the connection]
<Elysia> oh, are you still on about that issue?
bronson has quit [Ping timeout: 252 seconds]
<roelof> which isssue, this code solves all cases presented
<roelof> I only want to know if I can do it a "better" way
<Elysia> issue as in question; you came here yesterday with the same thing
<roelof> correct, but now I solved it
<Elysia> took you a while :P
PedramT has joined #ruby
<roelof> Elysia: yep, I still need soeme time to find out which function can do the job and I do also not work full time on it
<Elysia> one thing you might be cautious about is that it's often better to reject user input if it doesn't match your criteria (which may not be the feedback you're looking for - but programs that don't account for bad user input aren't well written programs. For this challenge, it might suffice, but personally I'd put a string in the test cases just to mess with users)
<roelof> for me these are challenges to learn ruby and learn how to solve "real" problems
<roelof> you mean something like "1 2 -4 b 8 7 " ??
<Elysia> yeah, b will be 0
armyriad has joined #ruby
<Elysia> irb(main):002:0> "b".to_i
<Elysia> => 0
<Elysia> I also would not write code as that oneliner on rule 6, write your program full out - preserve your eyes and sanity
Snowy has joined #ruby
<Elysia> you can just use "puts temp" on line 10
navneet has joined #ruby
<Elysia> unless you want "the temperature is #{temp}", but your current code does not do that
<roelof> oke, so something like if .. then temp = temp * - 1 end ?
<Elysia> use newlines
<Elysia> it helps you expand the code in the future (easier to maintain) and it makes it easier to read (catch errors quickly)
<roelof> of course, I was checking if I understand what you mean
bollullera has joined #ruby
<Elysia> if you want to chain some more things, there's room for that too (depends on what you want)
<roelof> I like readable code not putting everything on one line
<Elysia> the 'temp' variable might be misleading (is it a temporary variable, or a temperature?)
<roelof> if that can be done with more chaining , no problem
<roelof> a temperature
<Elysia> "1 2 3 4".split.min_by { |x| x.to_i.abs }.to_i # for example if you want to
<Elysia> depends on what you find more pleasant to read, this isn't extremely overkill yet
marr has joined #ruby
mikecmpbll has joined #ruby
galuszkak has left #ruby [#ruby]
AlexJakeGreen has quit [Quit: Leaving]
AlexJakeGreen has joined #ruby
pawnbox has quit [Remote host closed the connection]
agent_white has joined #ruby
pawnbox has joined #ruby
<manveru> >> "-1 1".split.min_by { |x| x.to_i.abs }.to_i
<ruby[bot]> manveru: # => -1 (https://eval.in/559041)
CloCkWeRX has left #ruby [#ruby]
terlar has quit [Quit: WeeChat 1.4]
s1kx has quit [Quit: bai]
terlar has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<roelof> Elysia: I can do that but then I can check if there is a same number but then positive, like sentence 6
rrichardsr3 has joined #ruby
<roelof> or can I use @temps for that purpose
Chagel has quit [Ping timeout: 240 seconds]
rahult has joined #ruby
tlaxkit has joined #ruby
Dimik has quit [Ping timeout: 244 seconds]
j2k has quit [Ping timeout: 276 seconds]
j2k has joined #ruby
<roelof> Elysia: I did all the changes you wanted but then I run into this problem : http://lpaste.net/161376
rrichardsr3 has quit [Client Quit]
zacstewart has joined #ruby
xall has joined #ruby
william3 has joined #ruby
Chagel has joined #ruby
zacstewart has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
shayan has quit [Quit: shayan]
<roelof> Elysia: and the code fails somehow on this string : "42 -5 12 21 5 24". the output is -5 instead of 5
william3 has quit [Ping timeout: 250 seconds]
nisstyre_ has quit [Ping timeout: 250 seconds]
oliver___ has quit []
tristanp has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
<jackdaniel> 42 is the answer
Emmanuel_Chanel has joined #ruby
mrgrieves has joined #ruby
william3 has joined #ruby
skade has joined #ruby
<roelof> jackdaniel: since when is 42 more near zero then 5 ?
<manveru> a.reduce{|s,v| sa, va = s.abs, v.abs; sa == va ? (s > v ? s : v) : (sa > va ? v : s) }
<manveru> well, was bored during meeting, so there you go :)
tristanp has quit [Ping timeout: 268 seconds]
aupadhye has joined #ruby
<roelof> meetings are always boring
isxek has quit [Remote host closed the connection]
skol has joined #ruby
Chagel_ has joined #ruby
Gasher has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
nisstyre_ has joined #ruby
Chagel has quit [Ping timeout: 268 seconds]
UglyVendetta has joined #ruby
vnt has joined #ruby
Dimik1 has quit [Ping timeout: 250 seconds]
last_staff1 has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
moeabdol has joined #ruby
GriffinHeart has joined #ruby
siaw has quit [Quit: siaw]
skol has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
<roelof> Everyone thanks for the help and have a nice day
last_staff has quit [Ping timeout: 246 seconds]
last_staff1 is now known as last_staff
CalimeroTeknik has joined #ruby
Shashikant86 has joined #ruby
xall has quit [Quit: leaving]
roelof has quit [Quit: Page closed]
agent_white has quit [Ping timeout: 260 seconds]
kp666 has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
tomphp has joined #ruby
the_drow has joined #ruby
skislak has joined #ruby
<CalimeroTeknik> hi, I'm running while line = socket.gets.strip … end but the loop doesn't exit even after the TCP connection is long gone. how can I make the loop exit when the connection is dead?
agent_white has joined #ruby
xall has joined #ruby
pawnbox has joined #ruby
<atmosx> CalimeroTeknik You have to break it.
william3 has quit [Remote host closed the connection]
vondruch has joined #ruby
<CalimeroTeknik> ah, I thought the affectation in the condition would fulfill that role
bronson has joined #ruby
lxsameer has quit [Quit: WeeChat 1.4]
xall has quit [Client Quit]
malcolmva has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
william3 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<atmosx> CalimeroTeknik tbh I have no idea what you'r edoing, but generally speaking to exit a loop you need a break statement.
<atmosx> There are tons of ruby TCP Server examples online you can google it
<CalimeroTeknik> yeah, the question is more about what the socket does when the connection is broken (it's a client socket)
<CalimeroTeknik> I didn't give any info about the socket, sorry
<manveru> CalimeroTeknik: check out IO.select
<manveru> and if you want to detect broken connection you need some kind of heartbeat
navneet_ has joined #ruby
navneet has quit [Read error: Connection reset by peer]
igam has joined #ruby
xall has joined #ruby
<CalimeroTeknik> yeah, I see that socket.gets doesn't return even when the connection breaks
bazz_ has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
idletask has quit [Quit: .]
<jackdaniel> roeolf: it was a joke related to the "Guide to the Galaxy"
Todd has quit [Ping timeout: 276 seconds]
nisstyre_ has quit [Ping timeout: 250 seconds]
Pupeno has joined #ruby
antgel has joined #ruby
Pupeno has quit [Remote host closed the connection]
RegulationD has joined #ruby
TvL2386 has joined #ruby
anisha_ has quit [Quit: Leaving]
malcolmva has joined #ruby
Pupeno_ has joined #ruby
nisstyre_ has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
idletask has joined #ruby
elaptics`away is now known as elaptics
ayonkhan has joined #ruby
william3 has quit [Remote host closed the connection]
Todd has joined #ruby
william3 has joined #ruby
ayonkhan has quit [Client Quit]
Emmanuel_Chanel has quit [Remote host closed the connection]
Moosashi has joined #ruby
xall has quit [Quit: leaving]
shayan has joined #ruby
PedramT has quit [Remote host closed the connection]
victortyau has quit [Quit: Textual IRC Client: www.textualapp.com]
anisha has joined #ruby
william3 has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Remote host closed the connection]
PedramT has joined #ruby
Moosashi has quit [Quit: Moosashi]
bollullera has quit [Remote host closed the connection]
tlaxkit has quit [Remote host closed the connection]
william3 has joined #ruby
nando293921 has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
kam270 has joined #ruby
Chagel_ has quit [Ping timeout: 250 seconds]
Pupeno_ has quit [Remote host closed the connection]
Chagel has joined #ruby
<gregf_> >> [42, -5, 12, 21, 5, 24].inject() { |x1, x2| (x1 - diff).abs <= (x2 - diff).abs ? x1 : x2 }
<ruby[bot]> gregf_: # => undefined local variable or method `diff' for main:Object (NameError) ...check link for more (https://eval.in/559100)
<gregf_> *scrolls to the bottom*
mdw has joined #ruby
<gregf_> >> diff = 0; [42, -5, 12, 21, 5, 24].inject() { |x1, x2| (x1 - diff).abs <= (x2 - diff).abs ? x1 : x2 }
<ruby[bot]> gregf_: # => -5 (https://eval.in/559101)
william3 has quit [Remote host closed the connection]
Pupeno has joined #ruby
malcolmva has quit [Ping timeout: 276 seconds]
rahult is now known as rahult_
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
rahult_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
malcolmva has joined #ruby
william3 has joined #ruby
Emmanuel_Chanel has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
vnt has quit [Quit: Leaving]
ferr has joined #ruby
PedramT has quit [Remote host closed the connection]
giz|work has joined #ruby
PedramT has joined #ruby
M-shine has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
M-mistake has quit [Ping timeout: 264 seconds]
Pupeno has quit [Remote host closed the connection]
infra-red has joined #ruby
M-Kodo has quit [Ping timeout: 276 seconds]
Pupeno has joined #ruby
<Fernando-Basso> arahael: That pythong .uper probably has a default locale anyway.
M-shine has joined #ruby
lkba has joined #ruby
bollullera has joined #ruby
william3 has quit [Read error: Connection reset by peer]
M-mistake has joined #ruby
workmad3 has joined #ruby
M-Kodo has joined #ruby
baweaver has joined #ruby
agent_white has quit [Quit: night]
bollullera has left #ruby [#ruby]
rahult has joined #ruby
blackmesa has joined #ruby
p1k has quit [Ping timeout: 250 seconds]
william3 has joined #ruby
Weavel has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
Pupeno has quit [Ping timeout: 268 seconds]
kits has joined #ruby
terlar has quit [Ping timeout: 240 seconds]
shayan has quit [Quit: shayan]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Client Quit]
lxsameer has joined #ruby
postmodern has quit [Quit: Leaving]
xall has joined #ruby
astrobunny has quit [Remote host closed the connection]
<xall> /join n
astrobunny has joined #ruby
nofxx has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
CloCkWeRX has joined #ruby
shayan has joined #ruby
astrobunny has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 268 seconds]
thesheff17 has joined #ruby
Xeago has quit [Remote host closed the connection]
guardian has quit [Quit: Coyote finally caught me]
pawnbox has quit [Remote host closed the connection]
navneet_ has quit [Read error: Connection reset by peer]
navneet has joined #ruby
navneet_ has joined #ruby
navneet has quit [Read error: Connection reset by peer]
navneet has joined #ruby
JBrickley has joined #ruby
JBrickley has quit [Client Quit]
moeabdol has quit [Ping timeout: 276 seconds]
tristanp has joined #ruby
navneet_ has quit [Ping timeout: 250 seconds]
aeterne has joined #ruby
<jackdaniel> /quit
<jackdaniel> doesn't work
<jackdaniel> ;)
tristanp has quit [Ping timeout: 268 seconds]
Chillphill has joined #ruby
<Chillphill> Does anyone here know Ruby fluently? If so how long did it take you to learn Ruby fluently? Thanks
<tobiasvl> Chillphill: what does "fluently" mean?
idletask has quit [Quit: .]
<Chillphill> tobiasvl: Sorry if I didn't sound very clear, but I meant to ask how long it took people to become experienced in Ruby.
dc3 has quit [Ping timeout: 260 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
malcolmva has quit [Ping timeout: 250 seconds]
shredding has joined #ruby
moeabdol has joined #ruby
william3 has quit [Read error: Connection reset by peer]
idletask has joined #ruby
bronson has joined #ruby
xall has quit [Ping timeout: 276 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
ur5us has quit [Remote host closed the connection]
GodFather has joined #ruby
aganov has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malcolmva has joined #ruby
pawnbox has joined #ruby
william3 has joined #ruby
aganov has joined #ruby
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
Xeago has joined #ruby
nevynxxx has joined #ruby
<gregf_> Chillphill: theres no time limit as such, unfortunately :/, you 'always' learn new things as you go along because you would've never to use some method/class/module
rodfersou has joined #ruby
<gregf_> *never had
sdothum has joined #ruby
<gregf_> i doubt if anyone can say they know it all.. but i guess ruby is much more neater than some other languages :)
shayan has quit [Quit: shayan]
elico has joined #ruby
PedramT has quit [Remote host closed the connection]
sepp2k has joined #ruby
yasha_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
freerobby has joined #ruby
Shashikant86 has joined #ruby
zacstewart has joined #ruby
PedramT has joined #ruby
terlar has joined #ruby
Devalo has joined #ruby
jaguarmagenta has joined #ruby
ur5us has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
johnmilton has joined #ruby
jds_ has joined #ruby
zacstewart has quit [Ping timeout: 276 seconds]
Devalo has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 260 seconds]
navneet_ has joined #ruby
Yiota has joined #ruby
navneet has quit [Ping timeout: 244 seconds]
william3 has joined #ruby
<arahael> Fernando-Basso: but you can't change it, can you?
ur5us has joined #ruby
<arahael> Chillphill: i became experienced in ruby in about 5 minutes.
<Chillphill> araheal: ???
<arahael> Chillphill: mind you. it's 5 minutes worth of experience, but that's what you asked, isn't it?
ponga has joined #ruby
jds_ is now known as jds
shredding has quit [Ping timeout: 276 seconds]
<Fernando-Basso> arahael: I don't know. I just assume that most languages run using a default locale unless the programmer explicitly set one.
<Fernando-Basso> It is like encodign, there is always one being used, no mater if it is set explicitly or not.
<Fernando-Basso> But I may be (and often am, more than I would like to) wrong.
<arahael> Fernando-Basso: arguably. encoding in ruby is a concept, which can be wrong (as i found out recently)
araujo has joined #ruby
navneet_ has quit [Remote host closed the connection]
<arahael> Fernando-Basso: infact, i recently tried, and failed, to use a (non-ruby) library that tried to guess the encoding of a text file. my mbox file.
ur5us has quit [Ping timeout: 268 seconds]
william3 has quit [Ping timeout: 276 seconds]
lxsameer has joined #ruby
<arahael> Fernando-Basso: it was trying to convert the file to unicode. (ha)
<Fernando-Basso> I don't think it is possible to detect encoding properly.
<Fernando-Basso> At most, a good guess.
guardian has joined #ruby
<arahael> Fernando-Basso: impossible, by point of fact. mbox files contain multiple, specified and unspecified, encodings.
<Fernando-Basso> It is easier if the file really have "non-ascii" chars at the beginning, so the parsers can make more informed and educated guesses.
<arahael> Fernando-Basso: that was the trap this parser assumed.
<Fernando-Basso> I see. That is why I said "easier", not "guaranteed" :|
<Fernando-Basso> Anyway, this is a subject I want to learn more about.
<arahael> Fernando-Basso: so, the question is: wjat encoding is used for an mbox file? NONE.
<Fernando-Basso> I know next to nothing about this topic, but it interests me a lot.
Snowy has quit [Quit: ragequit]
<Fernando-Basso> arahael: Okay, but to display the contents, any tool must assume a encodign, even if it the wrong one.
<arahael> Fernando-Basso: nope.
ldnunes has joined #ruby
p0wn3d has joined #ruby
<arahael> Fernando-Basso: the tools assume that the messages are deliminated by short byte sequences, which happen to be ascii.
<Fernando-Basso> Let's say I use nano to open a mbox file. Wiill it NOT assume any encoding and show only zeros and ones as text?
<arahael> specifically, "FROM " and "\n" are the only tokens you can recognise.
<toretore> ascii is an encoding like any other
<workmad3> Fernando-Basso: chances are nano will assume ASCII, but that doesn't make it correct
<workmad3> Fernando-Basso: or it'll say "You're trying to view a binary file"
<toretore> thus, ascii is the assumed encoding
<arahael> tercenya: ascii is 7-bit.
<arahael> tercenya: you can have non-ascii characters in the file.
skade has quit [Quit: Computer has gone to sleep.]
<Fernando-Basso> Yes.
<workmad3> arahael: mbox stores emails in raw form, right?
p0wn3d has quit [Client Quit]
<arahael> workmad3: sort of.
<workmad3> arahael: which means any requirements on encodings will probably track with the email RFCs
<Fernando-Basso> But anyway, to display text, be it wrong or correct, any "file viewer" has to pick an encoding and try to format it to the user using that guessed encoding.
<arahael> workmad3: sort of.
<toretore> arahael: so i find 01000001 in a file, how do i know what it's supposed to be?
giz|work has quit [Ping timeout: 250 seconds]
<arahael> workmad3: some mbox readers and writers (the better ones), will munge the raw email slightly.
<arahael> toretore: you don't.
<Fernando-Basso> You guess.
<tobiasvl> toretore: that's impossible to know without knowing the encoding.
<arahael> Fernando-Basso: no, you don't guess.
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Fernando-Basso> Then you open the file to the user and display 01000001 ?
<toretore> right. i can *assume* it's ascii compatible, then it's an a
<arahael> Fernando-Basso: why would the user do that?
<arahael> toretore: nope.
<toretore> so to parse bytes as text you must always assume an encoding.
<tobiasvl> Fernando-Basso: in that case you fall back to a default (if "you" is an editor)
<arahael> toretore: you have no business, as an mbox parser, to care about the character 'a'.
<toretore> arahael: i'm not an mbox parser
<Fernando-Basso> arahael: you save foo.txt with the content asdf. Open it in any text editor and it will display it as asdf.
<toretore> i'm a text parser
gnufied has joined #ruby
<arahael> Fernando-Basso: you'd pass the blob, unchanged, to an email parser.
Chillphill has quit [Quit: Leaving]
nofacade has joined #ruby
<tobiasvl> there's nothing wrong in assuming what encoding is used, on a general basis. many programs guess/assume encoding. sometimes it will fail horribly of course.
<Fernando-Basso> And if you save ✓ in a text file, many will detect it as utf-8 or something and also display it correctly (and many will not).
<arahael> but consider that tick here.
<arahael> how did the irc server cope with that?
skade has joined #ruby
<tobiasvl> the server did not
giz|work has joined #ruby
<tobiasvl> the irc server did what arahael said you should do with mbox: it passed it on
<arahael> it did. it handled it fine, it just didn;t interpret it, nor did it need to.
<arahael> tobiasvl: exactly.
<tobiasvl> wait you are arahael
<tobiasvl> lol
<tobiasvl> sorry
<tobiasvl> æøå
* arahael checks himself :)
p0wn3d has joined #ruby
<arahael> the irc server makes no assumptions about the client's encodings.
<toretore> everybody's talking past each other because everybody thinks everyone else doesn't understand when in fact everyone does understand
<Fernando-Basso> But the clients do.
<arahael> Fernando-Basso: indeed.
CloCkWeRX has quit [Read error: Connection timed out]
<workmad3> ah, the mbox RFC is wonderfully underspecified :D https://tools.ietf.org/html/rfc4155
<arahael> workmad3: it's why i used it as an example. :)
<arahael> anyway. back to the original point.
<arahael> there isn't always a(n) encoding.
nofacade has quit [Ping timeout: 246 seconds]
<workmad3> arahael: what I find really amusing is that it specifies things like using 2 end-of-line delimiters to separate messages, but doesn't specify an encoding in order to determine what an end-of-line delimiter is :)
CloCkWeRX has joined #ruby
<arahael> workmad3: indeed. so you can only assume ascii substrings in an otherwose binary stream.
chipotle has joined #ruby
<arahael> workmad3: and hope/pray that the messages therein don't happen to have those sequences themselves.
<arahael> workmad3: if they do... you need to second-guess which implementation wrote it!
<arahael> workmad3: and munge them appropriately.
<Fernando-Basso> arahael: And my point was that a "client" for "something" assumes an encoding when displaying the contents.
<arahael> Fernando-Basso: ah. but only at the final point.
<workmad3> arahael: I'd disagree... there is always an encoding, otherwise you have no way to interpret the data... in mbox, it seems the encoding is an implicit ASCII with embedded arbitrary data that should probably be encoded in a suitable 7-bit stream
Mon_Ouie has joined #ruby
<arahael> Fernando-Basso: in the presentation layer. *hopefully* at a point where you don't toss away any information.
<workmad3> arahael: sometimes a format is shit about communicating the encoding, but that doesn't mean there isn't one
<arahael> workmad3: 7-bit? it could easily be 8-bit.
<Fernando-Basso> arahael: Also, I assume by "no encoding" you mean groups of 8 bits as default?
<workmad3> arahael: right, because mbox isn't really fully standardised... but in the 'standard' rfc and default layout, the stream is specified as 7-bit and if the data has a wider width, it should be encoded in a suitable fashion
<arahael> Fernando-Basso: by "no encoding", i mean, that it's a secret code of gibberish that needs to be faithfully handed over unchanged to someone/thing who understands it.
<arahael> workmad3: "should".
<Fernando-Basso> arahael: Okay. Got your point then.
<workmad3> arahael: yeah, that comes back to mbox being underspecified, not to there being 'no encoding'... again, there's always an encoding
<arahael> Fernando-Basso: excellent. all that said... encoding is a *concept*. a useful one perhaps, but none-the-less, a concept.
<arahael> workmad3: "an" is a singular term.
<workmad3> arahael: and in your 'secret code of gibberish' example, again there's an encoding, but some intermediate system just doesn't care about it and passes it on transparently to some other system that understands it
<arahael> workmad3: it is essentially a binary stream.
baweaver has joined #ruby
<Ox0dea> >> Encoding::BINARY
<ruby[bot]> Ox0dea: # => #<Encoding:ASCII-8BIT> (https://eval.in/559231)
<workmad3> arahael: right... but the encoding specifies how to tell the start/stop of the stream
DoubleMalt has joined #ruby
darkf has left #ruby ["Leaving"]
<workmad3> (even if it's ad-hoc in a non-standardised container format)
<arahael> workmad3: yes, but now you're using "encoding" in the sense that we usually refer to it as "protocol".
ruby-lang450 has joined #ruby
last_staff1 has joined #ruby
carella has joined #ruby
<arahael> Ox0dea: that doesn't mean anyhing though! that's just squeezing "unspecified" into ruby's concept of "encoding".
<arahael> i'm being sent to bed! g'night!
<Ox0dea> arahael: It's a dummy encoding for treating eight bits as a byte; I was mostly being facetious.
<workmad3> arahael: hmm... I see a protocol as related to an encoding along these lines, but I'll admit I'm getting into hazy territory anyway :)
<arahael> Ox0dea: i was hopig you were :)
<Ox0dea> workmad3: They're very different things.
<arahael> workmad3: at the end of the day, it's semantics.
_aeris_ has joined #ruby
<_aeris_> Hello #ruby !
<_aeris_> i found something "strange" with the rand function
<Ox0dea> Let's see it.
last_staff has quit [Ping timeout: 244 seconds]
last_staff1 is now known as last_staff
<_aeris_> 1000000.times.collect { Math.log2(rand 2**(20*8)) } .minmax => [138.76, 159.99]
baweaver has quit [Ping timeout: 250 seconds]
PedramT has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
navneet has joined #ruby
<Ox0dea> You think it's "strange" that you got such "round" numbers, or?
<_aeris_> seems only the high part of the range is possible, numbers less than 2**130 never occur
gagrio has quit [Ping timeout: 246 seconds]
<_aeris_> 100000000.times.collect { Math.log2(rand 2**(20*8)) } .minmax
<_aeris_> => [130.24908712522083, 159.99999999886674]
jdawgaz has joined #ruby
<_aeris_> ok, this is not a CSPRNG, but the gap is huge :P
jdawgaz has quit [Client Quit]
<Ox0dea> Doesn't look that huge to me.
PedramT_ has joined #ruby
<workmad3> _aeris_: that wouldn't surprise me... the internal state of the prime generator can only store so much entropy, and that entropy isn't going to be in the order of gigabytes required to generate random numbers in such a large range
roelof has joined #ruby
<workmad3> *random generator
<workmad3> (dunno why I typed prime there)
<roelof> I have a challenge where I have to convert a text to asci-art. Can someone give me some tips how I can solve this in plain ruby ?
<Ox0dea> &ri Array#transpose roelof
godzillaenlacasa has joined #ruby
<apeiros> not having the math readily available, but with random numbers from 0 to 2**160, in a tiny sample size of 1000000, how likely is it to get numbers below 2**130?
PedramT has quit [Ping timeout: 268 seconds]
<apeiros> because you see, 10-99 has 10 times as many numbers as 0-9
ruby-lang450 has quit [Ping timeout: 250 seconds]
<apeiros> so with rand(100), the likeliness to get a number between 10 and 99 is 10 times as high as getting one from 0-9
<Ox0dea> _aeris_: was getting random numbers between 2**159 and 2**160 just fine.
<_aeris_> apeiros > but you have 100% probability to go up to 2**160
<_aeris_> this is weird
<Ox0dea> ?
<apeiros> no, you have a 100/(2**80)*1000000 probability
last_staff1 has joined #ruby
<apeiros> well, actually that's not the correct formula
<roelof> Ox0dea: thanks, I think I need a good look and a lot of thinking how I can convert the 'e' to something like this : http://lpaste.net/161396
<apeiros> but it's a lot closer to the truth than 100%
PedramT has joined #ruby
PedramT_ has quit [Ping timeout: 240 seconds]
Shashikant86 has joined #ruby
<_aeris_> Ox0dea > yep, ok with 1 bit gap
last_staff has quit [Ping timeout: 268 seconds]
last_staff1 is now known as last_staff
<apeiros> actually, you've got 0% chance of getting 2**160
<_aeris_> apeiros > in all my test case, upper bound is targeted, not the lower bound
blaxter has joined #ruby
<Ox0dea> _aeris_: rand(2**160) *can* give you 2**160 - 1, but don't hold your breath.
<apeiros> because rand(2**160) is 0-(2**160 - 1)
shayan has joined #ruby
<apeiros> anyway, I think your strangeness is almost certainly already explained by ordinary probability calculations.
<_aeris_> sorry i reformulate. all test case give number with arround 160 bits, but no number less than 130 bits
<Ox0dea> roelof: The trick is to convert your "font" to columns rather than rows, piece together your output, then transpose it back into rows for printing.
<yardenbar> Hello, I'm trying to open a SFTP connection, getting "500 Illegal PORT command" exception. reading SE I understand that I need to set the connection to passive mode, however, when I try to access the sftp.passive within a 'do' block, it unavailable. Can I set the passive option using a options hash?
Shashikant86 has quit [Max SendQ exceeded]
<_aeris_> i always got 159+ bits number, but never 130- bits
<apeiros> _aeris_: yes, do me a favor. calculate the probablity of a number with less than 130 bits to occur in 1e6 tries.
crime has joined #ruby
<_aeris_> apeiros > the same probability to have one of 150 bits
<apeiros> _aeris_: no
<apeiros> that's wrong and I just told you why.
<_aeris_> hum…
<apeiros> with every bit you add, there's twice as many numbers you can get.
<_aeris_> ><
<roelof> Ox0dea: oke, I will experiment with it. I get the idea that I need to use convert the char to binary
* _aeris_ noob ><
* _aeris_ hurt his fingers
jinie_ has joined #ruby
<apeiros> _aeris_: ad-hominem is not welcome here
<Ox0dea> roelof: No, that's not strictly necessary.
Chagel_ has joined #ruby
<apeiros> and saying it when you're wrong too makes you look even worse.
<workmad3> apeiros: ah, good point (it's monday morning, I'm not doing well today)... it's basically the chance of generating 160 bits with 30 leading zeros...
<Ox0dea> apeiros: I believe _aeris_ was referring to themself?
<apeiros> Ox0dea: let's hope so… I didn't understand it that way.
<workmad3> apeiros: he did use `/me`
PedramT has quit [Ping timeout: 244 seconds]
<Ox0dea> ^
<Ox0dea> You're way too quick on the defense.
IrishGringo has joined #ruby
Chagel has quit [Ping timeout: 276 seconds]
PedramT has joined #ruby
<apeiros> Ox0dea: I'm not on the defense. ad-hominem is something which causes me to kick. but yes, I might have misread the intended meaning.
jinie has quit [Ping timeout: 276 seconds]
jinie_ is now known as jinie
<Ox0dea> apeiros: Your misreading is precisely to what I was referring, mind.
norc has joined #ruby
norc has left #ruby [#ruby]
norc has joined #ruby
<_aeris_> i refer to me, yep :D
<apeiros> Ox0dea: that's unrelated to defense/offense, though
<norc> Greetings.
<apeiros> moin norc
<norc> apeiros: I did it! I actually did it!
<roelof> Ox0dea: oke, I think I will to do some experiments to understand what you mean with this : convert your "font" to columns
valetudo has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
<norc> apeiros: My boss is considering EDB. (:
<apeiros> oooh
<roelof> this schould be a easy challenge from codingame but for the first time I have no clue where to start
<apeiros> EDB = enterprise db = postgres?
<norc> Yup.
<workmad3> _aeris_: btw, a quick calculation shows that 130-bit numbers constitute about 1e-9 of the total number of 160-bit numbers
<apeiros> damn you :D
<apeiros> congrats, I hope for you they'll follow through
<apeiros> now I'm jealous
stardiviner has quit [Ping timeout: 240 seconds]
<adaedra> Go back to your Oracle.
william3 has joined #ruby
<apeiros> adaedra: I wish. I have to go back to mssql now :<
<adaedra> Ah yes
PedramT has quit [Ping timeout: 244 seconds]
<adaedra> I hesitated between the two.
<apeiros> tho I'm not yet truly sure which is worse
araujo has quit [Quit: Leaving]
<adaedra> WorseDB
<apeiros> but who cares whether it's purgatory or inferno. it's just bad.
<adaedra> If I recall, purgatory < inferno
<adaedra> +well
<norc> Interestingly enough this time it is me who calls to move this discussion to #ot
<apeiros> I haven't actually read dante, so I wouldn't know :-|
<apeiros> and yupp, > ot
<apeiros> _aeris_: my apologies for jumping at you. I did misread your comment.
<adaedra> Stop insulting yourself!
SilverKey has joined #ruby
flashpoint9 has joined #ruby
Chagel_ has quit [Ping timeout: 268 seconds]
william3 has quit [Read error: Connection reset by peer]
gagrio has joined #ruby
<arahael> adaedra: there's always cockroachDB
<norc> arahael: Discussion was moved to #ruby-offtopic
<arahael> cool.
william3 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> Was really smart. First I disrupt the channel by introducing an OT topic, and then I end up being the hero that enforces channel rules.
<norc> apeiros: Do I get a cookie?
<adaedra> ?cookie
<ruby[bot]> here's your cookie:
<norc> :)
* adaedra was tempted to `!kick norc
<adaedra> We don't need another hero.
jdawgaz has joined #ruby
braincra has joined #ruby
synthroid has joined #ruby
braincrash has quit [Disconnected by services]
braincrash has joined #ruby
Snowy has joined #ruby
brendan- has joined #ruby
braincrash has quit [Disconnected by services]
tristanp has joined #ruby
<_aeris_> apeiros > no problem :)
braincrash has joined #ruby
stardiviner has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
braincra has left #ruby [#ruby]
djcp has joined #ruby
senayar has joined #ruby
tristanp has quit [Ping timeout: 268 seconds]
mdw has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
<roelof> Is codewars a good place to practice ruby problems
<benzrf> roelof: probably
p1k has joined #ruby
swills has quit [Ping timeout: 268 seconds]
mdw_ has joined #ruby
<roelof> benzrf: I use codingame but there the easy puzzles are very hard
CloCkWeRX has quit [Quit: Leaving.]
mdw has quit [Ping timeout: 250 seconds]
navneet_ has joined #ruby
p0wn3d has quit [Quit: WeeChat 1.2]
p0wn3d has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
carella has quit [Remote host closed the connection]
carella has joined #ruby
navneet has quit [Ping timeout: 260 seconds]
IrishGringo has quit [Ping timeout: 244 seconds]
skade has quit [Quit: Computer has gone to sleep.]
moeabdol has quit [Ping timeout: 252 seconds]
agit0 has quit [Read error: No route to host]
moeabdol has joined #ruby
bronson has joined #ruby
SilverKey has quit [Ping timeout: 240 seconds]
ChiefAlexander has joined #ruby
tref has joined #ruby
opentux has joined #ruby
ramortegui has joined #ruby
SilverKey has joined #ruby
tref has quit [Client Quit]
BSaboia has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
xue has joined #ruby
ChiefAlexander has quit [Ping timeout: 276 seconds]
siovene has joined #ruby
kareeoleez has quit [Read error: Connection reset by peer]
BrunoSaboia has quit [Ping timeout: 240 seconds]
kareeoleez has joined #ruby
elusiveother has quit [Ping timeout: 250 seconds]
ryotarai has quit [Ping timeout: 250 seconds]
tomphp_ has joined #ruby
RegulationD has joined #ruby
william3 has quit [Ping timeout: 246 seconds]
ryotarai has joined #ruby
CausaMortis_ has joined #ruby
freerobby has quit [Ping timeout: 250 seconds]
scottschecter has quit [Ping timeout: 250 seconds]
swistak35_ has quit [Ping timeout: 250 seconds]
ejnahc has joined #ruby
ChiefAlexander has joined #ruby
pietr0_ has joined #ruby
freerobby has joined #ruby
spacemud has quit [Ping timeout: 268 seconds]
wldcordeiro has quit [Ping timeout: 268 seconds]
zenspider has quit [Ping timeout: 268 seconds]
ldnunes has quit [Ping timeout: 250 seconds]
diegoaguilar has quit [Ping timeout: 250 seconds]
Ox0dea has quit [Ping timeout: 250 seconds]
paulgrmn2 has quit [Ping timeout: 250 seconds]
mg^ has quit [Ping timeout: 250 seconds]
davidcelis has quit [Ping timeout: 250 seconds]
ChiefAlexander has quit [Client Quit]
last_staff has quit [Quit: last_staff]
paulgrmn3 has joined #ruby
eregon_ has quit [Ping timeout: 250 seconds]
whyamievenhere has quit [Ping timeout: 250 seconds]
tomphp has quit [Ping timeout: 268 seconds]
pietr0 has quit [Ping timeout: 268 seconds]
pietr0_ is now known as pietr0
Es0teric has joined #ruby
roelof has quit [Quit: Page closed]
Es0teric has quit [Max SendQ exceeded]
eregon has joined #ruby
SilverKey has quit [Ping timeout: 268 seconds]
bazz_ has quit [Ping timeout: 268 seconds]
ropeney has quit [Ping timeout: 268 seconds]
yeticry has quit [Ping timeout: 268 seconds]
GodFather has quit [Ping timeout: 250 seconds]
jaruga___ has quit [Ping timeout: 250 seconds]
Tempesta has quit [Quit: AdiIRC is updating to v2.4 Beta Build (2016/04/25) 32 Bit]
ChiefAlexander has joined #ruby
Es0teric has joined #ruby
kriskropd has quit [Ping timeout: 250 seconds]
Guest31609 has quit [Ping timeout: 250 seconds]
jaruga___ has joined #ruby
greister has quit [Ping timeout: 268 seconds]
Tempesta has joined #ruby
okdas has quit [Ping timeout: 250 seconds]
CausaMortis has quit [Read error: Connection reset by peer]
crime has quit [Ping timeout: 268 seconds]
gagrio has quit [Ping timeout: 252 seconds]
skade has joined #ruby
chipotle has quit [Quit: cheerio]
rahult has quit [Max SendQ exceeded]
spacemud has joined #ruby
zenspider has joined #ruby
vondruch has quit [Quit: Ex-Chat]
RegulationD has quit [Ping timeout: 244 seconds]
mattp_ has quit [Ping timeout: 250 seconds]
astrobun_ has quit [Ping timeout: 250 seconds]
ryotarai has quit [Ping timeout: 260 seconds]
idletask has quit [Remote host closed the connection]
M-shine has quit [Ping timeout: 268 seconds]
ryotarai has joined #ruby
brianpWins has quit [Ping timeout: 250 seconds]
bafbomb has quit [Ping timeout: 250 seconds]
psmolen has quit [Ping timeout: 250 seconds]
dgncn has quit [Ping timeout: 268 seconds]
elusiveother has joined #ruby
elusiveother has joined #ruby
brianpWins has joined #ruby
vondruch has joined #ruby
j2k has quit [Ping timeout: 268 seconds]
bafbomb has joined #ruby
john3 has quit [Ping timeout: 250 seconds]
lxsameer has joined #ruby
scottschecter has joined #ruby
UserInNeed has joined #ruby
aegis3121 has joined #ruby
astrobunny has joined #ruby
banister has quit [Ping timeout: 250 seconds]
william3 has joined #ruby
davidcelis has joined #ruby
davidcelis has joined #ruby
idletask has joined #ruby
okdas has joined #ruby
okdas has joined #ruby
john3 has joined #ruby
codecop has quit [Remote host closed the connection]
swistak35 has joined #ruby
mattp_ has joined #ruby
callen92 has joined #ruby
edulix has quit [Ping timeout: 250 seconds]
IrishGringo has joined #ruby
marens has quit [Ping timeout: 268 seconds]
j2k has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
edulix has joined #ruby
M-shine has joined #ruby
rahult has joined #ruby
psmolen has joined #ruby
tildes has quit [Remote host closed the connection]
marienz has quit [Ping timeout: 633 seconds]
wldcordeiro has joined #ruby
dgncn has joined #ruby
ldnunes has joined #ruby
lkba has quit [Ping timeout: 268 seconds]
TvL2386 has quit [Ping timeout: 268 seconds]
lkba has joined #ruby
diegoaguilar has joined #ruby
ropeney has joined #ruby
bazz_ has joined #ruby
Ox0dea has joined #ruby
bluOxigen_ has joined #ruby
mjuszczak has joined #ruby
marens has joined #ruby
PedramT has joined #ruby
jaguarmagenta has joined #ruby
Devalo has joined #ruby
lkba has quit [Ping timeout: 268 seconds]
crime has joined #ruby
isxek has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
lkba has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
PedramT_ has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
ejnahc has quit [Quit: leaving]
prestorium has joined #ruby
j2k has quit [Ping timeout: 268 seconds]
TvL2386 has joined #ruby
sgambino has joined #ruby
PedramT has quit [Ping timeout: 246 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
Devalo has quit [Ping timeout: 246 seconds]
j2k has joined #ruby
gagrio has joined #ruby
PedramT_ has quit [Ping timeout: 246 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
ChiefAlexander has joined #ruby
navneet_ has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
marienz has joined #ruby
pawnbox has quit [Remote host closed the connection]
william3 has joined #ruby
jrafanie has joined #ruby
chipotle has joined #ruby
PedramT has joined #ruby
greister has joined #ruby
kriskropd has joined #ruby
bradleyprice has joined #ruby
saneax is now known as saneax_AFK
p0wn3d has quit [Ping timeout: 252 seconds]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
PedramT_ has joined #ruby
rodfersou has quit [Ping timeout: 276 seconds]
yeticry has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
polishdub has joined #ruby
GodFather has joined #ruby
PedramT has quit [Ping timeout: 268 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has joined #ruby
platzhirsch has joined #ruby
lkba_ has joined #ruby
PedramT has joined #ruby
william3 has joined #ruby
bradleyprice has quit [Ping timeout: 276 seconds]
lkba has quit [Read error: Connection reset by peer]
rodfersou has joined #ruby
navneet has joined #ruby
PedramT_ has quit [Ping timeout: 268 seconds]
vondruch has quit [Quit: Ex-Chat]
vondruch has joined #ruby
yasha_ has quit [Quit: Leaving]
haraoka has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
malconis has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
PedramT has quit [Ping timeout: 260 seconds]
emilford has joined #ruby
pawnbox has joined #ruby
PedramT has joined #ruby
tildes has joined #ruby
zacstewart has joined #ruby
PedramT_ has joined #ruby
djellemah has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
PedramT has quit [Ping timeout: 240 seconds]
navneet_ has joined #ruby
william3 has joined #ruby
PedramT has joined #ruby
PedramT_ has quit [Ping timeout: 240 seconds]
ferr has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
PedramT has quit [Read error: Connection reset by peer]
navneet has quit [Ping timeout: 244 seconds]
chipotle has quit [Quit: cheerio]
PedramT has joined #ruby
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
Mon_Ouie has joined #ruby
cdg has joined #ruby
Mon_Ouie has quit [Client Quit]
shayan has quit [Quit: shayan]
siaw has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
baweaver has joined #ruby
PedramT has quit [Remote host closed the connection]
rbennacer has joined #ruby
PedramT has joined #ruby
cdg has quit [Remote host closed the connection]
majjoha has quit [Quit: WeeChat 0.4.2]
SilverKey has joined #ruby
cdg has joined #ruby
kasisnu has joined #ruby
majjoha has joined #ruby
allcentury has joined #ruby
ta_ has quit [Remote host closed the connection]
SilverKey has quit [Client Quit]
baweaver has quit [Ping timeout: 276 seconds]
tristanp has joined #ruby
Guest38 has joined #ruby
pLaToOn has quit [Read error: Connection reset by peer]
Guest38 has quit [Remote host closed the connection]
agent_white has joined #ruby
<agent_white> Mornin'
navneet_ has quit [Read error: Connection reset by peer]
<crime> its 10 oclock, u gotta get up earlier than that, homie
futilegames has quit [Quit: futilegames]
elico has quit [Ping timeout: 252 seconds]
<Fernando-Basso> 11:08 a.m. here.
<Fernando-Basso> These people are getting nowhere in life bahving like this.
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banister has joined #ruby
<Fernando-Basso> crime: Perhaps we are being unfair. What if this person works on a night shift?
SilverKey has joined #ruby
<Fernando-Basso> crime: Another thesis: sie is using UGT.
<benzrf> Fernando-Basso: 'sie' is so ugly, why not just use 'they'?
<crime> excuses are the nails that seal the coffin of failure
<Fernando-Basso> Ugly? Well, then I don't understand the meaning.
<Fernando-Basso> agent_white: Sorry, I didn't mean to sound offensive.
<crime> rise at dawn, code til dusk, die when tests are all green
<crime> p much it
aganov has quit [Remote host closed the connection]
* Fernando-Basso looks up “sie”
<Fernando-Basso> benzrf: Thanks for the tip. You are right.
<benzrf> uhh
n008f4g_ has joined #ruby
zast has joined #ruby
jhack has joined #ruby
theunraveler has joined #ruby
tubuliferous has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspiers_ has joined #ruby
banister has joined #ruby
<agent_white> Fernando-Basso: Pardon?
mlakewood has joined #ruby
ramirio has joined #ruby
<Fernando-Basso> I didn't want to sound offensive when using “sie”. I had a wrong understanding of that word.
godzillaenlacasa has quit [Ping timeout: 260 seconds]
stannard has joined #ruby
<benzrf> Fernando-Basso: oh, well, it's not *offensive
<benzrf> *offensive*
<benzrf> Fernando-Basso: it's just that it sounds less natural than 'they', in my opinion
callen92 has quit [Ping timeout: 240 seconds]
DaniG2k has joined #ruby
tubuliferous has quit [Ping timeout: 252 seconds]
smathy has joined #ruby
PedramT has quit [Ping timeout: 246 seconds]
<Fernando-Basso> Well, it is a relief to know it is not _that_ offsensive at least.
<Fernando-Basso> According to urban dict, it looked like it may sound offenseive at times.
yardenbar has quit [Quit: Leaving]
newjersey has joined #ruby
colegatron has joined #ruby
Sandman has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
slackbotgz has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
xqwzts has joined #ruby
theunraveler has quit [Remote host closed the connection]
theunraveler has joined #ruby
crameth has joined #ruby
kareeoleez has quit [Read error: Connection reset by peer]
northrup has joined #ruby
djellemah has joined #ruby
troulouliou_div2 has joined #ruby
kareeoleez has joined #ruby
jds has quit [Quit: Connection closed for inactivity]
chouhoulis has quit [Remote host closed the connection]
chipotle has joined #ruby
chouhoulis has joined #ruby
djellemah_ has joined #ruby
vishwa has joined #ruby
SilverKey has quit [Quit: Halted.]
tubuliferous has joined #ruby
<vishwa> How do you use map with a function that you want to use to modify each value of the array?
<vishwa> is that function supposed to return a value?
northrup has quit [Client Quit]
<crime> preferred pronouns are so stupid. the english language doesn't change for your feelings. ugh
kasisnu has quit [Remote host closed the connection]
norc has quit [Ping timeout: 250 seconds]
itsnwa has joined #ruby
kasisnu has joined #ruby
djellemah has quit [Ping timeout: 244 seconds]
hxegon has joined #ruby
aegis3121 has quit [Ping timeout: 252 seconds]
<vishwa> when I use myarr.map { |x| get_only_domain(x) } , what's get_only_domain supposed to return?
aegis3121 has joined #ruby
<toretore> vishwa: are you talking about mutating myarr?
chipotle has quit [Quit: cheerio]
twistedbot^^ has joined #ruby
callen92 has joined #ruby
<vishwa> toretore: yes, I want to modify myarr
twistedbotYYY has joined #ruby
blackmesa has joined #ruby
twistedbot^^ has quit [Remote host closed the connection]
twistedbotYYY has quit [Remote host closed the connection]
twistedbotYYY has joined #ruby
rkazak has joined #ruby
<toretore> vishwa: use map! instead of just map
mjuszczak has quit []
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has quit [Ping timeout: 260 seconds]
aufi has quit [Ping timeout: 246 seconds]
noway_ has joined #ruby
GodFather has quit [Ping timeout: 246 seconds]
banister is now known as banisterfiend
geek876 has joined #ruby
nemoNoboru has joined #ruby
tref has joined #ruby
rippa has joined #ruby
<geek876> Guys, I have 2 string variables, time 2016-04-25 15:47:34 and msec = 199000. I want to format time from these two. Will doing this work ? Time.at(time, msec).strftime("%Y-%m-%dT%H:%M:%S.%L%z") ?
polysics_ has joined #ruby
<vishwa> toretore: is there a way to find which particular variable caused an error? I use backtrace but
<vishwa> i dont think bt gives you the variable
dionysus69 has quit [Ping timeout: 246 seconds]
kareeoleez has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 244 seconds]
<dsimon> vishwa, the backtrace should show the method name that caused the problem, is that not enough to narrow it down?
ptierno has joined #ruby
<vishwa> dsimon: it hasn't been so far
<vishwa> anyway, another question: are there any ruby libraries to expand shortened urls?
WaqasA has joined #ruby
robbyoconnor has joined #ruby
alec_ has joined #ruby
RegulationD has joined #ruby
aspiers_ has quit [Ping timeout: 276 seconds]
tuxiano has joined #ruby
tuxiano has left #ruby [#ruby]
<vishwa> dsimon: hah, much appreciated
<nemoNoboru> lol
slackbotgz has quit [Remote host closed the connection]
<dsimon> np :-)
zacstewart has quit [Ping timeout: 260 seconds]
<dsimon> sorry, that was a bit snarky of me
andikr has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
chipotle has joined #ruby
troulouliou_div2 has quit [Ping timeout: 276 seconds]
newjersey has quit [Read error: Connection reset by peer]
andikr has joined #ruby
PedramT has joined #ruby
vondruch has quit [Quit: Ex-Chat]
RegulationD has quit [Ping timeout: 252 seconds]
crameth has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
<adaedra> Just a bit.
twistedbotYYY has quit [Remote host closed the connection]
GodFather has joined #ruby
sneakerhax has quit [Ping timeout: 246 seconds]
CausaMortis_ has quit [Ping timeout: 260 seconds]
sepp2k has quit [Quit: Leaving.]
crime has quit [Ping timeout: 244 seconds]
mdw_ has quit [Quit: Sleeping Zzzzz]
DaniG2k_ has joined #ruby
elifoster has joined #ruby
x77686d has joined #ruby
zacstewart has joined #ruby
aspiers_ has joined #ruby
DaniG2k has quit [Ping timeout: 260 seconds]
DaniG2k_ has quit [Client Quit]
<geek876> sorry, I am new with ruby. I have a function like this Time.strptime("2016-04-19 22:17:41,079000", "%F %T,%N"), how do i pass variables to it so that 2016-04-19 for example is a variable t and so it time and millisec ?
jaguarmagenta has joined #ruby
<machty> i'd like to spin up a quick server that just barfs the request payload so that i can debug/test webhooks. is there a one-liner httpd esque thing i could use in ruby or what's the easiest way to do this?
ChiefAlexander has quit [Remote host closed the connection]
RegulationD has joined #ruby
terlar has quit [Ping timeout: 260 seconds]
ChiefAlexander has joined #ruby
marr has quit [Ping timeout: 276 seconds]
solars has quit [Ping timeout: 250 seconds]
<ironcamel> machty: maybe whip up a quick sinatra app http://www.sinatrarb.com
jaguarmagenta has quit [Ping timeout: 250 seconds]
PedramT_ has joined #ruby
noService has quit [Ping timeout: 260 seconds]
p1k has quit [Ping timeout: 250 seconds]
PedramT_ has quit [Read error: Connection reset by peer]
PedramT_ has joined #ruby
troulouliou_div2 has joined #ruby
Shashikant86 has joined #ruby
<xqwzts> I have an assert failure problem in a test suite. The asserts fail when run in one test method and pass when in individual test methods. Can someone please take a look? https://gist.github.com/sumproxy/5da24716ffe456c288dec44c4107e22e
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
moeabdol has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
<ironcamel> require sinatra; get '/*' { request.body }
GodFather has quit [Ping timeout: 276 seconds]
Shashikant86 has quit [Max SendQ exceeded]
PedramT has quit [Ping timeout: 268 seconds]
Shashikant86 has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
tubuliferous has quit [Ping timeout: 244 seconds]
ur5us has joined #ruby
Shashikant86 has quit [Max SendQ exceeded]
Shashikant86 has joined #ruby
Regulati_ has joined #ruby
kareeoleez has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
<xqwzts> anyone?
bradleyprice has joined #ruby
freerobby has quit [Quit: Leaving.]
crime has joined #ruby
JBlazeCoder21 has joined #ruby
sharkman has joined #ruby
frem has joined #ruby
<sharkman> what does, def [](k); @hash[k.to_s]; end
<sharkman> do?
moeabdol has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
dionysus69 has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
nando293921 has joined #ruby
<hxegon> sharkman looks up the stringified version of k on @hash
<hxegon> I'm guessing the #to_s is to make sure :symbol calls still work.
PedramT_ has quit [Remote host closed the connection]
aspiers_ has quit [Ping timeout: 250 seconds]
fmcgeough has joined #ruby
<sharkman> hxegon i understand the .to_s part, the part that i dont understand is really the def[]
<sharkman> sorry got disconected. hxegon i understand the .to_s part, the part that i dont understand is really the def[]
<ironcamel> it is defining a [] operator
platzhirsch has quit [Quit: Leaving.]
bradleyprice has quit [Ping timeout: 252 seconds]
carella has quit [Read error: Connection timed out]
PedramT has joined #ruby
<hxegon> sharkman if you def[] on an object, than you can do object[] like arrays and hashes can
n008f4g_ has joined #ruby
<sharkman> sorry i dont understand, can you point me to an example online somewhere or further explanation i can see
synthroid has quit [Remote host closed the connection]
carella has joined #ruby
PedramT_ has joined #ruby
<hxegon> >> class Foo; def[](bar); bar; end; end; Foo.new["arbitrary input"]
<hxegon> > class Foo; def[](bar); bar; end; end; Foo.new["arbitrary input"]
solars has joined #ruby
<hxegon> Did the bot change? anyway sharkman that would return "arbitrary input".
<adaedra> hxegon: you need to be registered and authenticated.
platzhirsch has joined #ruby
<sharkman> ah okay thanks hxegon i think i get it now
Xeago has quit [Remote host closed the connection]
PedramT has quit [Ping timeout: 240 seconds]
aspiers_ has joined #ruby
<adaedra> sharkman: when you do object[...], you actually call the [] method on it.
<hxegon> np sharkman
n008f4g_ has quit [Ping timeout: 250 seconds]
goodroot has joined #ruby
rodfersou is now known as rodfersou|lunch
davedev24 has joined #ruby
PedramT_ has quit [Ping timeout: 276 seconds]
dhollinger has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Xeago has joined #ruby
elaptics is now known as elaptics`away
mlakewood has quit [Quit: mlakewood]
ramfjord has joined #ruby
GodFather has joined #ruby
[Butch] has joined #ruby
bradleyprice has joined #ruby
anisha has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 276 seconds]
AlexJakeGreen has quit [Remote host closed the connection]
berserk_ren has joined #ruby
kits has quit [Quit: Leaving]
GodFather has quit [Ping timeout: 276 seconds]
SCHAAP137 has joined #ruby
Coldblackice_ has joined #ruby
SilverKey has joined #ruby
<shevy> sharky shark
amclain has joined #ruby
IrishGringo has joined #ruby
mwlang has joined #ruby
aspiers_ has quit [Ping timeout: 250 seconds]
xqwzts has quit [Quit: Page closed]
platzhirsch has quit [Quit: Leaving.]
frem has quit [Remote host closed the connection]
norc has joined #ruby
baweaver has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
CausaMortis_ has joined #ruby
TomyLobo has joined #ruby
hobodave has joined #ruby
n008f4g_ has joined #ruby
kristofferR has joined #ruby
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
antgel has quit [Ping timeout: 260 seconds]
EdwardIII has quit [Ping timeout: 246 seconds]
mark_66 has quit [Remote host closed the connection]
ta_ has joined #ruby
freerobby has quit [Quit: Leaving.]
baweaver has quit [Ping timeout: 268 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
hobodave_ has joined #ruby
nemoNoboru has quit [Remote host closed the connection]
giz|work has quit [Ping timeout: 260 seconds]
mlakewood has joined #ruby
SilverKey has quit [Quit: Halted.]
mrgrieves has quit [Ping timeout: 260 seconds]
mjuszczak has joined #ruby
senayar has quit []
hobodave has quit [Ping timeout: 276 seconds]
tristanp has quit []
moeabdol has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
kam270 has quit [Ping timeout: 276 seconds]
wldcordeiro has quit [Ping timeout: 250 seconds]
tristanp has joined #ruby
VeryBewitching has joined #ruby
Couch has quit [Ping timeout: 252 seconds]
cschneid has joined #ruby
<cschneid> whats the current-hotness for debuggers? Running ruby 2.2 - just want the classic command line debugger
<norc> cschneid, byebug
Pupeno has joined #ruby
Pupeno has joined #ruby
<norc> cschneid, pry-byebug might be something to look at too.
aegis3121 has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
sneakerhax has joined #ruby
bluOxigen has joined #ruby
<igam> cschneid: perhaps you could implement swank for ruby, then you could debug your ruby programs with slime?
karapetyan has joined #ruby
wilbert has joined #ruby
EdwardIII has joined #ruby
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen_ has quit [Ping timeout: 276 seconds]
Regulati_ has quit [Remote host closed the connection]
<crime> "just implement swank"
<shevy> everyone wants a big fat debug IDE
noService has joined #ruby
<crime> yeah, only 3k lines of dense common lisp written over years by many different developers, forming the backbone of one of most powerful debuggers ever conceived
<crime> and thats just swank. slime is huge
marr has joined #ruby
SilverKey has joined #ruby
weemsledeux has joined #ruby
infra-red has quit [Remote host closed the connection]
aspiers_ has joined #ruby
<cschneid> norc: thanks. igam... sounds ... fun :)
rbennacer has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has quit [Remote host closed the connection]
Snowy has quit [Quit: ragequit]
william3 has quit [Remote host closed the connection]
skislak has quit [Ping timeout: 240 seconds]
jaruga___ has quit [Quit: jaruga___]
diegoaguilar has joined #ruby
RegulationD has joined #ruby
william3 has joined #ruby
ptierno has quit [Quit: leaving]
sgambino has joined #ruby
JBlazeCoder21 has quit [Remote host closed the connection]
bluOxigen_ has joined #ruby
ghoti has joined #ruby
tomphp_ has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
<igam> shevy: slime/swank is not that big/fat. And swank has been ported to R and scheme, so it's possible and shouldn't be to hard to port to ruby too.
wldcordeiro has joined #ruby
<igam> The only thing is that it would rely heavily on introspection, so you would have to know this part of ruby very well. (And unfortunately, I'd expect also a few variants depending on the version of ruby).
<cschneid> what's a swank.
Gasher is now known as GasherL
<cschneid> classic hyper-interactive lisp programming it seems?
<norc> It is very dangerous.
<norc> But delicious.
william3 has quit [Ping timeout: 276 seconds]
ta_ has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 276 seconds]
pandaant has quit [Remote host closed the connection]
<igam> cschneid: swank is the CL backend to slime, the Superior Lisp Interaction Mode for Emacs.
<igam> slime includes sldb, the slime debugger.
mikecmpbll has quit [Ping timeout: 260 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
shayan has joined #ruby
evidex has quit [Remote host closed the connection]
<igam> the last two would give you example and an idea of the complexity of what you'd have to do in Ruby to integrate with slime.
<igam> swank.scm is only 1594 sloc.
mikecmpbll has joined #ruby
PaulCapestany has quit [Quit: .]
perlgod has joined #ruby
<dsimon> seconding byebug, it's super neat
Pupeno has quit [Remote host closed the connection]
rbennacer has joined #ruby
solars has quit [Ping timeout: 244 seconds]
PaulCapestany has joined #ruby
sarbs has joined #ruby
mfb2 has joined #ruby
JBlazeCoder21 has joined #ruby
kareeoleez has quit [Remote host closed the connection]
kareeoleez has joined #ruby
<Authenticator> The default JSON library doesn't seem to handle ASCII-8BIT strings, but Oj does. Is there a setting in the default library that I'm missing?
Gasher has joined #ruby
ramfjord has joined #ruby
Xeago has quit [Remote host closed the connection]
mfb2_ has joined #ruby
davedev2_ has joined #ruby
Xeago has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
mfb2_ has quit [Remote host closed the connection]
<crime> Authenticator: cursory google brought me to this: https://github.com/JoshCheek/seeing_is_believing/issues/46
<crime> maybe it will help?
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
nando293921 has quit [Quit: Lost terminal]
nemoNoboru has joined #ruby
Yiota_ has joined #ruby
Emmanuel_Chanel has joined #ruby
navneet has joined #ruby
xxneolithicxx has joined #ruby
mfb2 has quit [Ping timeout: 268 seconds]
antgel has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
Yiota has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 276 seconds]
Spami has joined #ruby
SilverKey has quit [Quit: Halted.]
bronson has joined #ruby
<apeiros> Authenticator: json is specified to be utf-8
symm- has joined #ruby
<apeiros> Authenticator: if you do ascii-8bit in your json, it isn't json. simple as that.
<Authenticator> crime: Yeah, that looks similar.
igam has quit [Ping timeout: 240 seconds]
mfb2 has joined #ruby
makufiru has joined #ruby
<crime> Authenticator: glad I could help, hope u get ur bug fixed <3
makufiru has left #ruby [#ruby]
roelof has joined #ruby
<crime> apeiros is always right btw, he knows everything, i can vouch
<Authenticator> crime: Well, with Ape's answer I might just doc the other end (which accepts ascii-8bit JSON strings) as broken, and skip it. :D
amclain_ has joined #ruby
<crime> yeah, it's weird that that happened, probably some sort of tooling issue on the other end. who know
<roelof> why is row not known here. when I do a put row in the loop row has contents : http://lpaste.net/161417
shinnya has joined #ruby
<apeiros> roelof: a block has its own lexical scope
<apeiros> you can assign nil to row before the block, then it'll work since the block will close over it
<Authenticator> The odd thing is that it's a Tomcat server and it's normally pretty picky about every bit.
amclain has quit [Ping timeout: 246 seconds]
<roelof> oke, I will try that, thanks, apeiros
amclain_ has quit [Client Quit]
amclain has joined #ruby
giz|work has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
tref has quit [Quit: tref]
ChiefAlexander has joined #ruby
antgel has quit [Ping timeout: 276 seconds]
blaxter has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
aspiers_ has quit [Ping timeout: 250 seconds]
frem has joined #ruby
infra-red has joined #ruby
<roelof> anyone a tip how I can make this work : http://lpaste.net/161418
<roelof> the characters are all messed up after reading in
<apeiros> seems you forgot the newlines
Karunamon|2 is now known as Karunamon
<roelof> the part that reads in is given in the challenge , see the code : http://lpaste.net/161419
<apeiros> roelof: tell me in your words, in english, step by step what the code does
<roelof> it seems that it reads in colums where I need to have it in rows
<apeiros> that's not what I asked for.
SilverKey has joined #ruby
SilverKey has quit [Client Quit]
blackmesa has quit [Ping timeout: 252 seconds]
wldcordeiro has quit [Quit: WeeChat 1.3]
mfb2 has quit [Remote host closed the connection]
<roelof> I know, I was typing a idea when you asked another question
<apeiros> ok
<roelof> apeiros: here is the whole challenge. http://lpaste.net/161420 . I think that is more clear then that I try to explain everything
SilverKey has joined #ruby
<apeiros> I don't care about that
<shevy> hehe
Gasher has quit [Remote host closed the connection]
nofxx has joined #ruby
<apeiros> > roelof: tell me in your words, in english, step by step what the code does
<apeiros> this is what I'm asking from you
<shevy> roelof!!!
<roelof> the code reads the asci code string colum by colum
mfb2 has joined #ruby
<roelof> shevy: yes
<apeiros> roelof: that's not step by step
freerobby has joined #ruby
<apeiros> and it's not what the code actually does either.
<roelof> apeiros: are we still talking about this : http://lpaste.net/161419
<apeiros> yes, even though I've no idea why you created another paste.
<shevy> :D
<shevy> roelof on gist pasties you can highlight via numbers alone btw
alec_ has quit [Remote host closed the connection]
alec_ has joined #ruby
<roelof> oke, h is the height of the letter. so for the height of the letter do (line 1)
<roelof> apeiros: is this what you mean ?
<apeiros> yes
<apeiros> and height is columns or rows?
firstdayonthejob has joined #ruby
<roelof> colums
* al2o3-cr deary me
infra-red has quit []
<apeiros> I think you should buy a new dictionary then ;-)
alec_ has quit [Remote host closed the connection]
freerobby has quit [Client Quit]
<roelof> oke, then it are the rows, I always mixed them up
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
jaguarmagenta has joined #ruby
<apeiros> but let's go on, ok, for the number of rows there are, do what?
jackjackdripper has joined #ruby
<roelof> read a line and put it into row
ssiris has joined #ruby
<apeiros> what part reads the line?
jackjackdripper1 has joined #ruby
<roelof> gets.chomp , apeiros ?
<shevy> he returns a question to a question :)
<apeiros> roelof: how many methods do you see in gets.chomp?
<roelof> two
<crime> i love this conversation so far
<apeiros> ok, what's the first and what does it do?
<roelof> gets which reads and chomp which deletes the newline
<shevy> crime apeiros is like a surgeon, he gets to the nasties
<apeiros> roelof: great. "deletes the newlines"
bradleyprice has quit [Remote host closed the connection]
freerobby has joined #ruby
<apeiros> rememer how I told you that you seem to lack the newlines?
<roelof> yes
<crime> one of my all-time favorite books is the little schemer, that's what apeiros reminds me of
<apeiros> +b, finding where it belongs to is left as an exercise
replay has joined #ruby
<crime> guiding but not condescending
replay has quit [Max SendQ exceeded]
tildes has joined #ruby
<shevy> hmm I don't know that book... title reminds me of a kids book :P
<crime> it teaches scheme socratically
<crime> absolutely fantastic read
replay has joined #ruby
<roelof> so I schould delete the chomps part , apeiros ?
<crime> little schemer -> seasoned schemer -> reasoned schemer
<shevy> ah
<apeiros> roelof: so now you know that your newlines are not in row. if you print the rows without adding newlines back in, your result will happen
navneet has quit [Read error: Connection reset by peer]
<apeiros> roelof: I don't know what you should do. after all, I don't know what goal you want to achieve. I just tell you why you get what you get. and that it is in no way weird.
<crime> its like these damn computers only do what I tell them to
<apeiros> yupp
<roelof> I m trying to find out how I can convert a character to the responding asci character in the row variable
<apeiros> hate them for that. do what I mean, not what I tell you to :D
jackjackdripper has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 250 seconds]
<hxegon> That feeling when a SaaS your project is relying on can't even get password resets right: https://i.imgur.com/7s8APdU.gif
<apeiros> roelof: moment, phone
aspiers_ has joined #ruby
Pupeno has joined #ruby
aupadhye has quit [Ping timeout: 250 seconds]
theunraveler has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
theunraveler has joined #ruby
KensoDev has joined #ruby
<crime> i've noticed a lot of websites will let me reset passwords to passwords that dont meet the spec of the original password they wanted
<crime> but hey, they want to run bug bounty programs, cool. I gotta pay rent and eat anyways
<hxegon> crime I should try that with sites that have dumb restrictions like "first character must be a capital letter", or "only alphanumeric characters please :D"
<hxegon> like my bank... :|
<crime> yeah, just make one up, forget your password to your email, and like nine times out of ten it's just a textarea and they check to make sure the old password was correct
<crime> well, banks SHOULD 2fa anyways so it wouldnt matter
<crime> but yeah
<crime> i actually hate the web
blackmesa has joined #ruby
<roelof> apeiros: so I thougth if I could "convert" it to look like the columns I just could count lines and compose the requested character
pawnbox has quit [Remote host closed the connection]
<hxegon> crime At this rate I'm not too far off.
pawnbox has joined #ruby
ljames has joined #ruby
<crime> we should start over. html was a mistake. css made it worse. js has literally driven people to a rabid insanity. i feel like dante, tbh
[Butch]_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<hxegon> At least the flash nightmare is coming to an end, although I'm sure "legacy" software will continue to beat that horse.
<crime> I mean, AS3 suffered from all the same issues modern JS does.
<crime> prototypal inheritance still blows ass, V8 is a nightmare of "oh well it's not terrible if it's really fast, right?"
<crime> and deeper we go
edwinvdgraaf has joined #ruby
[Butch] has quit [Ping timeout: 260 seconds]
[Butch]_ is now known as [Butch]
<crime> then of course people absolutely lose their shit at the mere *thought* of onboarding Dart VM into chrome for fear of fragmentation. its like, look around! the entire web is already fragmented. it sucks
swills has joined #ruby
moeabdol has joined #ruby
<hxegon> I wish there was a Joker-esque character IRL that was like "For every 24 hours that a sane JS replacement isn't implemented on all major browsers, a hospital will explode."
n008f4g_ has quit [Ping timeout: 276 seconds]
mfb2 has quit [Remote host closed the connection]
<hxegon> as a wise man once said about the JS VMs, "A lot of PHD bodies have been thrown on that burning pile of shit."
JagaJaga has joined #ruby
<hxegon> whoops, just realized this isn't offtopic.
amclain has quit [Ping timeout: 250 seconds]
carella has quit [Remote host closed the connection]
carella has joined #ruby
djbkd has joined #ruby
mfb2 has joined #ruby
mdw has joined #ruby
pikajude has quit [Quit: Quit]
last_staff has joined #ruby
Xeago has joined #ruby
baweaver has joined #ruby
pikajude has joined #ruby
pikajude has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
bradleyprice has joined #ruby
amclain has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
User458764 has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
Xeago has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
sarlalian has quit [Ping timeout: 264 seconds]
navneet has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
AnoHito has joined #ruby
baweaver has joined #ruby
<apeiros> roelof: yeah, sure. converting to columns isn't a bad idea. but that's not part of what you've shown.
<roelof> correct , that part I schould make code myself
tubuliferous has joined #ruby
<roelof> I thought about using transpose but then I have to convert row first to a array
<apeiros> transpose is a good idea, yes
<apeiros> and yes, converting the line to an array is the precondition
<apeiros> it's only 1 method call away ;-)
<roelof> 1 method ? I thought about using 2 . split and transpose
sarlalian has joined #ruby
vishwa has quit [Ping timeout: 240 seconds]
<shayan> I am attempting a beginner Ruby question, where I am creating a loop for numbers 1 through 20. In this exercise, I must use the “next” keyword so that you skip to the next iteration if the number ‘i’ is odd. What are some ways I can skip to the next iteration if the number ‘i’ is odd?
<apeiros> I meant 1 method to convert a line to an array
<apeiros> split works. there's an easier one: chars
mfb2 has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan_ has quit [Remote host closed the connection]
<roelof> oke, I will google about chars. I have not used or learned it on rubymonk
<apeiros> don't use google
<apeiros> use the docs
<apeiros> &ri String#chars
mfb2 has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
ule has left #ruby [#ruby]
aspiers_ has quit [Ping timeout: 260 seconds]
rodfersou|lunch is now known as rodfersou
SilverKey has quit [Quit: Halted.]
<adaedra> USE THE DOCS
norc has quit [Ping timeout: 268 seconds]
<roelof> apeiros: oke, I will try that part and look how it looks like then
<roelof> thanks so far for the help
baweaver has joined #ruby
kasisnu has quit [Remote host closed the connection]
ramfjord_ has joined #ruby
weemsledeux has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
djbkd has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 260 seconds]
y2mq37 has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
noService has quit [Ping timeout: 268 seconds]
blaix has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
noway_ has quit [Quit: Leaving]
<roelof> apeiros: sorry, first problem, When I use this code : http://lpaste.net/161421. I see this error : no implicit conversion of String into Array (TypeError)
<apeiros> you've three problems
vishwa has joined #ruby
<apeiros> problem 1 is that you don't paste your actual code. seriously - don't. ever. do. that.
<roelof> apeiros: oops, that is not good
<roelof> apeiros: this is the actual code
_djbkd has joined #ruby
<apeiros> no. it isn't. this code would get you a NoMethod error
<apeiros> it's .chars, not .char
_djbkd has quit [Read error: Connection reset by peer]
tubuliferous has quit [Ping timeout: 240 seconds]
<roelof> wierd, when I use it on codingame I see the output as pasted
_djbkd has joined #ruby
<roelof> yep, when I use chars I see output
<roelof> because the docs sayed it was a array , I could use transpose to switch to a column layout
symm- has joined #ruby
<apeiros> that'd be your 2nd problem
newjersey has joined #ruby
<apeiros> you should run the code locally and inspect `row`.
_djbkd has quit [Remote host closed the connection]
kasisnu has joined #ruby
<roelof> oke, then I have to figure out how I can do this locally
djbkd has joined #ruby
<roelof> I will experiment with that the next few hours I think so again thanks
<Ox0dea> roelof: After all this time, you don't have a local install? :(
mdw_ has joined #ruby
baweaver has quit [Remote host closed the connection]
jmignault has joined #ruby
_djbkd has joined #ruby
_djbkd has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
mdw has quit [Ping timeout: 276 seconds]
<roelof> I have a local install of ruby
<roelof> not a local install of this problem
kasisnu has quit [Ping timeout: 276 seconds]
<roelof> I use the debug of the codingame site
<roelof> I think the biggest problem will be how I can locally use the input of the asci characters
<roelof> on the site is given
vishwa has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
karapetyan has joined #ruby
vishwa has joined #ruby
zast has quit [Remote host closed the connection]
moss has joined #ruby
infra-red has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
flashpoint9 has quit [Remote host closed the connection]
<Ox0dea> roelof: You... don't know how to provide input to your program?
sauvin has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shayan has quit [Quit: shayan]
symm- has quit [Ping timeout: 276 seconds]
flashpoint9 has joined #ruby
<roelof> Yes, I could use the same code
blaxter has joined #ruby
newjersey has quit [Read error: Connection reset by peer]
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
<roelof> the asci-characters are given in that site as a text. I have to input them as rows
jmignault has quit [Quit: rcirc on GNU Emacs 24.5.1]
saneax_AFK is now known as saneax
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
tomphp has joined #ruby
Cohedrin_ has joined #ruby
kristofferR has joined #ruby
tomphp has quit [Client Quit]
anisha has joined #ruby
Cohedrin has quit [Ping timeout: 250 seconds]
<roelof> oke, chars gives this as output : "[\"#\", \" \", \"#\", \" \", \"#\", \"#\", \" \", \" \", \" \", \"#\", .....] so every # has one place in the array
tomphp has joined #ruby
shinnya has quit [Ping timeout: 250 seconds]
axisys has joined #ruby
ferr has joined #ruby
navneet has quit [Remote host closed the connection]
iamvery has quit [Ping timeout: 276 seconds]
<roelof> then split gives I think a better output : "[\"#\", \"#\", \"##\", \"##\", \"##\", \"###\", \"#\", \"##\", \"#\", .... ]
cdg has quit [Ping timeout: 276 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
pawnbox has quit [Remote host closed the connection]
tomphp has quit [Client Quit]
pawnbox has joined #ruby
Guest32036 has quit [Quit: Leaving]
blaix has quit [Quit: Leaving.]
<roelof> but on both cases the orginal ending is gone so I think I have to store the input
djbkd has joined #ruby
dopieee has joined #ruby
blackmesa has joined #ruby
<shevy> roelof are you sure that output is right?
<roelof> I did p row.split.inspect so I think so
<shevy> looks like a stringified array
tagaulap has quit [Quit: Connection closed for inactivity]
lsmola has quit [Ping timeout: 276 seconds]
isxek has quit [Remote host closed the connection]
<Ox0dea> roelof: You don't need to explicitly #inspect when you use #p.
<Ox0dea> `p foo` is `puts foo.inspect`.
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> not exactly
<adaedra> it's closer to foo.tap { |foo| puts foo.inspect }
polishdub has quit [Quit: Leaving]
<adaedra> so you can `p` anywhere and still get the value.
<moss> hi. i'm writing a puppet facter script to check if an interface is using dhcp or not. i want to exclude the loopback device but can't figure out how to do so. Here is what I've written so far: https://dpaste.de/8ysk
naftilos76 has joined #ruby
tomphp has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
opentux has quit [Quit: Leaving.]
<roelof> oke, when I use this code : http://lpaste.net/1681767042581004288 . I see the output I paste into the paste
<roelof> that looks promosing
iamvery has joined #ruby
thegunbuster has joined #ruby
tomphp has quit [Client Quit]
<smathy> adaedra, TIL - nice.
Dimik1 has joined #ruby
<Ox0dea> roelof: How come that looks promising?
<roelof> I can see where the orginal input is ending
kasisnu has joined #ruby
<roelof> So I hope I can now make the conversion from row to columns
noService has joined #ruby
mfb2 has joined #ruby
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
pawnbox has quit [Remote host closed the connection]
mwlang has quit [Quit: mwlang]
BTRE has quit [Quit: Leaving]
finisherr has joined #ruby
Ishido has joined #ruby
saneax is now known as saneax_AFK
shayan has joined #ruby
pawnbox has joined #ruby
<roelof> shevy: when I use chars instead of split I see this : ["#", " ", "#", " ", "#", "#", " ", " ", " ", "#", "#", " ", "#", "#", " ", " ", "#", "#", "#", " ", "#", " ", " ", " ", " ", "#", "#", " ", "#", " ", "#", " ", "#", "#", "#", " ", " ", "#", " ", " ", "#", " ", "#", " ", "#", "#", "#", " ", "#", " ", "#", " ", "#", " ", "#", " ", " ", "#", " ", " ", "#", " ", " ", " ", " ", " ", "#", " ", "#", " ", "#", " ", "#", "#", " ", " ", " ",
CausaMortis_ has quit [Ping timeout: 260 seconds]
<roelof> Time to sleep now. Maybe I get tomorrow a idea how I can compose the characters back
<crime> i p anywhere i want
<crime> the world is my object
tomphp has joined #ruby
bronson has joined #ruby
DotKite has joined #ruby
giz|work has quit [Ping timeout: 260 seconds]
n008f4g_ has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
<DotKite> Anyone know how to use the eratosthenes sieve in the Prime class? ruby-doc.org isn't very clear
jackjackdripper has joined #ruby
<roelof> oke, to use transpose I have to take care that all rows are all arrays
<shevy> roelof yeah that looks more like an Array now
<shevy> roelof I don't entirely understand why you must split on every character. can't you just output per line? if you match the desired output format (on that line)
<crime> DotKite: thats an internal thing, I think.
antgel has joined #ruby
pietr0 has quit [Quit: pietr0]
<weaksauce> DotKite Prime.each do |prime| puts prime end
tomphp has quit [Client Quit]
<roelof> shevy: I think you are right if I look at the docs of transpose
<crime> Prime.each takes arguments to choose which prime generator it uses DotKite
<crime> so you could do Prime.each(9999, Prime::TrialDivision) {|n| p n}
PedramT has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<weaksauce> DotKite you can pass in the generator type to each if you want.
<Ox0dea> roelof: Without #transpose, you're going to be doing nasty string slicing and unnecessary arithmetic to pull the right pieces of each character out of the font.
_whitelogger has joined #ruby
emilford has quit [Ping timeout: 268 seconds]
<norc> Ox0dea, given a string A, what do you reckon would be the fastest way to determine whether any element in a list of strings starts with A?
<norc> My intuition kinda suggests some proper hash map, but what do I know..
mostlybadfly has joined #ruby
<Ox0dea> norc: The only unorthodox approach that comes to mind would be to get tricksy with a regex.
<norc> Ox0dea, the problem is that it is still extremely expensive since it has to be applied against every element of the list.
<norc> My list is large, which makes this unfeasible.
tomphp has joined #ruby
ramfjord_ has quit [Ping timeout: 276 seconds]
<Ox0dea> norc: Then #find and #start_with? is probably your best bet. :/
mfb2 has quit [Remote host closed the connection]
<norc> Ox0dea, I forgot one tiny detail. A is an element of the same list.. and I have to test this for any element.
<norc> I do not want some O(n2) complexity just for accessing, and another O(n) for the string length n.
baweaver has quit [Ping timeout: 246 seconds]
<Ox0dea> norc: Might be you're looking for a Bloom filter or the like.
<norc> Maybe packing this into a tree would improve this, since it might reduce access time to O(1)
Fernando-Basso has quit [Quit: WeeChat 1.3]
mfb2 has joined #ruby
<norc> Ox0dea, possible. Bloom tests for actual member though, doesnt it?
freerobby has quit [Quit: Leaving.]
<Ox0dea> norc: I mean, they're malleable?
nanoz has joined #ruby
<Ox0dea> You can parameterize the search however you please, really; it's essentially just bitsets.
ta_ has joined #ruby
drusepth has joined #ruby
<norc> Ox0dea, heck this is actually a classic problem to be solved with a simple hash table.
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
<norc> I can guarantee that the strings are at least 6 characters long and 12 at most.
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
<norc> Or. Bloom. I dont know..
jaguarmagenta has joined #ruby
<weaksauce> how large is large norc
<norc> That is the price for being a school dropout rather than someone who spent 5 years studying CS...
SilverKey has joined #ruby
<Ox0dea> norc: Using an arbitrarily deep Hash as a "tree" would work pretty well.
<norc> weaksauce, currently Im working with lists between 100,000 and 200,000 (sizes where the naive solution just takes half an hour to calculate)
<Ox0dea> Then you'd just test `h['f']['o']['o']` for non-nility.
<weaksauce> perhaps build up a trie?
iamvery has joined #ruby
<norc> I see.
<norc> Ox0dea and weaksauce both concluding that I really just want a tree.
<Ox0dea> Overkill.
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
elifoster has quit [Ping timeout: 250 seconds]
allcentury has quit [Ping timeout: 250 seconds]
<drusepth> that feel when you're re-running everything for logs to ask a question and everything magically starts working
<drusepth> thanks guys
<weaksauce> Ox0dea h['f']['o']['']
<Ox0dea> norc: https://eval.in/559451
djbkd has quit [Remote host closed the connection]
<weaksauce> Ox0dea h['f']['o']['o'] would error if there was no ['f']['o'] element
<Ox0dea> weaksauce: I got dis.
anisha has quit [Read error: Connection reset by peer]
GinoMan2440 has joined #ruby
anisha has joined #ruby
berserk_ren has quit [Ping timeout: 246 seconds]
<Ox0dea> norc: It might be that you'd want to use a sentinel so that you don't have to treat the empty Hash as false, but that's otherwise trees for free.
elifoster has joined #ruby
<norc> Ox0dea, have you digged into ruby Hash? What mechanism does it use for access?
karapetyan has quit [Remote host closed the connection]
<norc> Object#hash?
<Ox0dea> norc: Well, yeah... :P
<norc> *dug even.
<Ox0dea> #eql? comes into it as well if the #hash values collide.
<norc> Ox0dea, I have to ask. Tons of things dont make any sense at all in the implementation.
finisherr has quit [Quit: finisherr]
<norc> Ever since I fell into the super super() trap, I no longer trust Ruby.
karapetyan has joined #ruby
<Ox0dea> That's documented, though.
<Ox0dea> As is `super &nil`, I'd imagine.
tildes has quit [Ping timeout: 276 seconds]
<norc> You just started another wtf moment.
<norc> What is super &nil
whippythellama has joined #ruby
<norc> asm>> &nil
nemoNoboru has quit [Remote host closed the connection]
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/559452
<norc> asm>> super &nil
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/559453
<norc> asm>> super
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/559454
<norc> o_o
<Ox0dea> It's for explicitly not passing along your block.
<norc> The headache.
infra-red has quit [Read error: Connection reset by peer]
<norc> Is real.
SCHAAP137 has quit [Quit: Leaving]
infra-red has joined #ruby
finisherr has joined #ruby
rikai has quit [Ping timeout: 244 seconds]
jdawgaz has joined #ruby
<norc> Ox0dea, 6 hours into my compiler (really hard to find the time for it) by the way. Lexing and parsing done (and damn, stay the fuck away from the C++ parser/scanner from bison/flex), I can generate sexp expressions now.
<norc> Hooray.
<norc> Code generation started now.
Fernando-Basso has joined #ruby
<Ox0dea> norc: Sexps are just the best.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crime> (funcall #'agree (get-topic))
<Ox0dea> McCarthy tried to preempt a half-century of syntax flamewars. :/
<norc> crime, out of lazyness mine are in immediate Ruby parseable form.
aspiers_ has quit [Ping timeout: 276 seconds]
jdawgaz has quit [Client Quit]
al2o3-cr has quit [Quit: WeeChat 1.4]
IrishGringo has quit [Ping timeout: 240 seconds]
<crime> I've realized that that's what academia actually is. Whitepaper flame wars
sharkman has quit [Ping timeout: 260 seconds]
<crime> thats how smart people talk shit
<norc> Though if I use llvm, code generation is so unbelievable simple. You do not even have to know what you are doing.
<crime> they write a paper
drusepth has quit [Quit: Lost terminal]
Pupeno has quit [Remote host closed the connection]
mlakewood has quit [Quit: mlakewood]
polysics_ has quit [Read error: Connection reset by peer]
ule has joined #ruby
<ule> Hey guys.. I'm trying to find something similar with CodeSniffer for Rails
polysics has joined #ruby
jeff1 has joined #ruby
Es0teric has joined #ruby
<ule> I know there is one called something like Tendle
<norc> ?rubyonrails ule
<ruby[bot]> norc: I don't know anything about rubyonrails
<norc> &rubyonrails ule
<crime> ule: rubocop?
<ule> could be ruby doesn't matter
<norc> ule, rubocop but do not use it.
<ule> crime: No.. it starts with T
<ule> but I can't remember the name
<norc> It leads to really horrible tendencies.
<ule> yeah.. like 80 chars per line maximum
djbkd has joined #ruby
<ule> totatlly agree
<norc> ule, things like that can be configured, but the problem is a different one.
<ule> sure.. but first I need to remember the name of the gem
mfb2 has quit [Remote host closed the connection]
<norc> Either you work alone, in which case you should not need it. If you work together, specify the coding guidelines and reject PRs if ppl do not follow it.
<norc> It is how everybody in the serious world does it.
<ule> tailor!!
<crime> i was about to write ruby to find every gem name that starts with t
<crime> i think i still will
<Ox0dea> Why would you need to write Ruby?
ramfjord has joined #ruby
jdawgaz has joined #ruby
<crime> i write ruby all the time
<norc> I dont.
<crime> its like this thing i do
pawnbox has quit [Remote host closed the connection]
<Ox0dea> $ gem search ^t | wc -l
<Ox0dea> 5959
<ule> wtf lol
<ule> thanks guys.. found it.. gonna learn how to use this tool now
<Ox0dea> crime: Still gonna write it in Ruby?
mfb2 has joined #ruby
<norc> Ox0dea, struct f { void : 0 } f; I think this might be valid C++ grammar. o_o
<Ox0dea> norc: Yikes.
<norc> Semantic checks will choke on this for sure, but grammar wise it should be fine. :D
allcentury has joined #ruby
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
<adaedra> It looks fine
<adaedra> should even be valid C
mfb2 has quit [Remote host closed the connection]
<adaedra> But here we #include <offtopic>
wilbert has quit [Ping timeout: 276 seconds]
<norc> Oh.
jdawgaz has quit [Client Quit]
al2o3-cr has joined #ruby
jeff1 has quit [Quit: WeeChat 1.4]
jeff1 has joined #ruby
<crime> Ox0dea: yes, gisting now
<shevy> long live #include "ruby.h" !
<Ox0dea> crime: I'm excited.
jdawgaz has joined #ruby
<crime> no ur not
<crime> ur just gonna golf w/e I write and then I feel stupid
<Ox0dea> That's a shell script.
<crime> but thats why i come here anyways
<crime> it counts
* Ox0dea gives crime a gold star.
<crime> im gonna print that out irl and frame it
<Ox0dea> That's counterfeiting.
<crime> you can photocopy us currency for historical and educational purposes
hobodave_ has quit [Quit: Computer has gone to sleep.]
rikai has joined #ruby
<shevy> pictures of love
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Es0teric has quit [Quit: Computer has gone to sleep.]
<shevy> or a matz muscles t-shirt!
jdawgaz has quit [Client Quit]
JakFrist has joined #ruby
beawesomeinstead has quit [Ping timeout: 268 seconds]
<crime> i want to arm-wrestle matz
<shevy> lol
<crime> i emailed him to ask if he would but he wouldnt so i just assume its because he'd get rekt
n008f4g_ has quit [Ping timeout: 240 seconds]
mfb2 has joined #ruby
<shevy> perhaps at some conference you could challenge him
<crime> ya know i thought about that
<crime> the thing about conferences is that you have to pay to get in to most of them
<shevy> where is the next conference where matz will be at?
<shevy> and when
<crime> doesnt seem very FLOSS to me, i never go
<shevy> havenwood tell me, you know these things
beawesomeinstead has joined #ruby
jeff1 has quit [Quit: WeeChat 1.4]
mfb2 has quit [Remote host closed the connection]
jeff1 has joined #ruby
<Fernando-Basso> I watch conferences in youtube. Would it help me more if I were present?
<Fernando-Basso> I mean, would I learn more by being there?
<ule> no
<norc> Fernando-Basso, if I was the guy earning money from them it would help if you were.
dionysus69 has quit [Ping timeout: 250 seconds]
<weaksauce> Fernando-Basso possibly? more so making connections or being able to do the 1-1 sessions if they have any
Yiota_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Fernando-Basso> What helps for me is getting my butt in the char and the fingers on the keyboard.
n008f4g_ has joined #ruby
<Fernando-Basso> chair*
<Fernando-Basso> Sorry, I didn't mean to offend chars.
<crime> they seem like such a huge scam to me. why should i pay organizers for paying the conference hall? if they gave a shit about open source they'd just pay it and let me in
<crime> esp if they're just gonna put it on youtube afterwards
freerobby has joined #ruby
<Ox0dea> Fernando-Basso: It's okay; uint8_ts are superior.
nanoz has quit [Read error: Connection reset by peer]
<Fernando-Basso> ule, Hey pal!
mfb2 has joined #ruby
<Fernando-Basso> Ox0dea, :D
jeff1 has quit [Client Quit]
<Fernando-Basso> weaksauce, Yeah, that could perhaps be worth my while.
jeff1 has joined #ruby
roelof has quit [Ping timeout: 250 seconds]
Yiota has joined #ruby
baweaver has joined #ruby
mfb2 has quit [Read error: Connection reset by peer]
<crime> there's a gem called 'fuck' and more surprisingly, it actually does stuff
mfb2 has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<shevy> Fernando-Basso always depends on who will talk, how good any presentations will be, how good a talker you got... tenderlove's presentations are funny. But I think, the only ones I really watch are from matz
<crime> tenderlove is the cringiest presented I've ever seen
mikecmpbll has joined #ruby
hobodave has joined #ruby
<Fernando-Basso> shevy, But still, any "learning" difference being there and being home while watching?
<crime> shevy, you should watch sandi metz. Nothing is Something is a great talk about ruby/smalltalk parallels
jeff1 has quit [Client Quit]
<ule> I started watching youtube videons on 2X speed.. I can see 3 conferences in the same timeframe
<crime> lol
<ule> only possible from my chair here
<Fernando-Basso> shevy, Well, being there might be more memorable.
paulgrmn3 has quit [Ping timeout: 244 seconds]
lemur has joined #ruby
<weaksauce> crime sandy is good stuff. also advi does some pretty good talks
aspiers_ has joined #ruby
cabargas has joined #ruby
SCHAAP137 has joined #ruby
<crime> avdi's blog has deterred me from wanting to hear avdi's voice
cabargas has quit [Remote host closed the connection]
mfb2 has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 250 seconds]
ChiefAlexander has joined #ruby
mfb2 has joined #ruby
<crime> yeah, the long hair, stud belt, weird pseudo-cali-midwest accent. irl cringing
perlgod_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mlakewood has joined #ruby
<weaksauce> lol
Moosashi has joined #ruby
<Ox0dea> crime: How old're you?
<crime> 21
<Ox0dea> I see.
jdawgaz has joined #ruby
KensoDev has quit [Quit: Textual IRC Client: www.textualapp.com]
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<crime> Ox0dea.thoughts["irc"]["crime"].call
dionysus69 has joined #ruby
<crime> what r u thinking
<Ox0dea> # => nil
GasherL has quit [Ping timeout: 252 seconds]
<crime> mm
skade has joined #ruby
<crime> ok
perlgod has joined #ruby
<crime> p Ox0dea
yfeldblum has joined #ruby
<Ox0dea> # => 3562
<crime> that explains it, you're a Fixnum
<crime> u dont respond to thoughts
jdawgaz has quit [Client Quit]
<norc> We can coerce him into something else if you prefer.
<Ox0dea> >> 0x0dea.methods.size
<ruby[bot]> Ox0dea: # => 133 (https://eval.in/559458)
<adaedra> What's happening here?
<crime> hex
<crime> i think
<crime> thats cheating, since Ox0dea ~= 0x0dea
<crime> thats a bug
<Ox0dea> Blame the relevant RFCs.
<Ox0dea> It's a stupid limitation.
<norc> crime, hold on. I can fix that. PR incoming...
<crime> so im trying to listen to avdi and he just said that trying to model object reality is hubristic
william3 has quit [Remote host closed the connection]
<crime> which is a self-admission that he doesn't even exist in the real world and only the in the fantasy world where he thinks he knows what he's talking about
cpup has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
<Ox0dea> This is why I asked your age, for what that's worth.
<Ox0dea> The Dunning-Kruger is strongest in the very young.
<crime> than he used the word hermeneutics, clearly a thesaurus 'what would make me sound smart' move
cpup has joined #ruby
<crime> Ox0dea: I dont pride myself with the illusion that I'm superior to anybody
wilbert has joined #ruby
<crime> I just dont mind calling people out doing exactly that
<crime> avdi's blog is littered with those little "well gee I'm so smart" tidbits
william3 has joined #ruby
<norc> Ox0dea, I do think of myself as being superior than everybody else. But this is not based on competency, because I am not very competent. That is just my attitude towards humans in general...
<norc> That is not Dunning-Kruger, is it?\
djbkd has quit [Remote host closed the connection]
<Ox0dea> norc: I think that's a God complex?
<adaedra> Well at least you noticed it.
shinnya has joined #ruby
<crime> I'm not suffering from Dunning-Kruger, I'm just mean and snarky.
<norc> Ox0dea, that does not sound too bad..
<Ox0dea> norc: Being God a shit.
<ule> How can I do something like this?
<ule> 3.times.('1'..'9').to_a.sample
emilford has quit [Ping timeout: 276 seconds]
<ule> actually I want letters
<ule> 3.times.('A'..'Z').to_a.sample
Dimik1 has quit [Ping timeout: 246 seconds]
swills has quit [Ping timeout: 244 seconds]
BTRE has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
<norc> ule, what is the 3.times supposed to do?
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ule> generate a random string with 3 chars
<crime> just ('A'..'Z').sample(3)
<al2o3-cr> no
GasherL has joined #ruby
<crime> you are sampling three times and throwing away the first two values
<ule> crime: NoMethodError: undefined method `sample' for "A".."Z":Range
<crime> just ('A'..'Z').to_a.sample(3)
<ule> ok but now I need to convert it back to a string
<ule> concatenating all elements
<crime> ('A'..'Z').to_a.sample(3).join
<Ox0dea> crime: No.
<Ox0dea> That won't ever have duplicates.
<ule> crime: worked thanks!
<crime> uhh wait
<crime> really?
Fernando-Basso has quit [Quit: Leaving]
<Ox0dea> Really.
<crime> how is that?
<Ox0dea> >> [1].sample 3
<ruby[bot]> Ox0dea: # => [1] (https://eval.in/559460)
william3 has quit [Remote host closed the connection]
<crime> thats weird
<Ox0dea> That's just how sampling works.
<Ox0dea> It's not a repeated sampling.
<crime> so then Array.new(3) {('A'..'Z').to_a.sample} ?
<norc> >> (0...3).map { (65 + rand(26)).chr }.join
<ruby[bot]> norc: # => "WNJ" (https://eval.in/559461)
<crime> >> Array.new(25) {('A'..'Z').to_a.sample}
<ruby[bot]> crime: # => ["N", "K", "U", "K", "C", "K", "E", "W", "U", "R", "Y", "E", "I", "D", "U", "O", "G", "H", "M", "L", ...check link for more (https://eval.in/559462)
<crime> mk
pietr0 has joined #ruby
cdg has joined #ruby
<lemur> you do realize that avdi is on this channel right?
lemur is now known as baweaver
blackgoat has joined #ruby
<crime> tis a big channel
<baweaver> so you make 25 instances of that array.
<Ox0dea> Wicked smaht.
<crime> no?
<Ox0dea> Yes.
<baweaver> yes
<norc> Yes.
<norc> (For good measure)
<Ox0dea> crime: And you grill Avdi. The fucking nerve.
<crime> isnt the argument the SIZE of the array?
<Ox0dea> crime: We're talking about the one in the block.
<crime> ah
<crime> it golfs tho
tomphp has joined #ruby
cpup has quit [Ping timeout: 268 seconds]
<baweaver> Methinks you're a few strokes shy of a full par there.
cpup has joined #ruby
<crime> >> a = ('A'..'Z').to_a; Array.new(10){a.sample}
<ruby[bot]> crime: # => ["D", "M", "B", "H", "R", "R", "G", "R", "D", "J"] (https://eval.in/559464)
<crime> there?
<norc> Bah! That is two statements.
<norc> Better memoize inline!
<norc> Array.new(3) { (@_||=('A'..'Z').to_a).sample}
k8k8k has joined #ruby
<norc> Actually.
<crime> thats perl
<norc> >> Array.new(3) { ($_||=('A'..'Z').to_a).sample}
<ruby[bot]> norc: # => ["I", "U", "G"] (https://eval.in/559465)
<norc> That is perl.
tomphp has quit [Client Quit]
<k8k8k> that's ruby not perl you faggot
nando293921 has quit [Quit: Lost terminal]
<norc> >> (0...3).map { (65 + rand(26)).chr }.join
<ruby[bot]> norc: # => "MEV" (https://eval.in/559466)
<baweaver> !troll k8k8k
k8k8k was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
<baweaver> bye
<crime> lol
shinnya has quit [Ping timeout: 252 seconds]
<crime> death by peer review, i guess
<norc> Oh that is neat.
<norc> Just learned that you can also create an array like this:
<norc> >> [*"A".."B"]
<ruby[bot]> norc: # => ["A", "B"] (https://eval.in/559467)
<adaedra> Actually
<norc> Granted.. not the best example..
william3 has joined #ruby
<norc> >> *"A".."B"
<ruby[bot]> norc: # => /tmp/execpad-f4ebc63d80c3/source-f4ebc63d80c3:2: syntax error, unexpected .., expecting &. or :: or ...check link for more (https://eval.in/559468)
<adaedra> !badnick k8k8k
<baweaver> fine fine
blaix has joined #ruby
<crime> that could be katekatekay tho
moei has quit [Quit: Leaving...]
<baweaver> anyways, that's enough of that
perlgod has quit [Quit: Textual IRC Client: www.textualapp.com]
<crime> how can I complete the puzzle we were doing without using perl magic and without 2 statements, without copying the array?
<crime> seems like its possible
elifoster has quit [Quit: school]
allcentury has quit [Ping timeout: 268 seconds]
<avdi> crime: that Avdi character is a total fraud. I hear he smells like feet.
ledestin has joined #ruby
<crime> never smelt him
<Ox0dea> You're missin' out.
<norc> crime, check my last snippet in that discussion?
<crime> norc, missed it, thats slick tho
<baweaver> avdi: Thought he smelled like Tapas
<norc> crime, courtesy of SO.
<eam> luckily we don't need to argue over self worth, we can simply refer to a neutral, objective measure: $$$$$
<baweaver> Might read up on ruby splatting some time later, there are more tricks you can use splat for.
<crime> if I had to guess what avdi smelled like, it'd be whatever scent of Axe body spray is selling right now, maybe with like Mtn Dew zest
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
<baweaver> >> head, *tail = [1,2,3,4]; "head #{head} tail #{tail}"
<ruby[bot]> baweaver: # => "head 1 tail [2, 3, 4]" (https://eval.in/559470)
moei has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
<norc> >> (0...3).map { (?a.ord + rand(26)).chr }.join
<ruby[bot]> norc: # => "ofa" (https://eval.in/559471)
<norc> crime, for readability points
<crime> that ? throws me off, whats happening there
<norc> >> ?a
<ruby[bot]> norc: # => "a" (https://eval.in/559472)
<crime> oh, character literal
<crime> gotcha
replay has quit [Ping timeout: 276 seconds]
<norc> >> ?????:??
<ruby[bot]> norc: # => /tmp/execpad-7fe7be2951f8/source-7fe7be2951f8:2: warning: string literal in condition ...check link for more (https://eval.in/559474)
<norc> Fun things you can do with that.
<crime> neat-o
infernix has quit [Ping timeout: 250 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<baweaver> anyways, let's avoid the personal attacks / comments crime
tomphp has joined #ruby
andikr has quit [Remote host closed the connection]
* baweaver just read through the past chat logs
Pupeno has joined #ruby
Moosashi has quit [Quit: Moosashi]
<shevy> crime yeah the ? can be confusing, I remember it for when before the lonely operator came to be
<shevy> foo.?what?.?is_going_on?
<crime> but asking my age isn't inappropriate?
<crime> k
william3 has joined #ruby
<baweaver> Ox0dea: let's keep age out of it
<Ox0dea> baweaver: Nonsense.
<crime> not what i meant
<adaedra> You don't have to answer, technically.
<shevy> HOW OLD ARE YOU ALL
<crime> Ox0dea: <3
<Ox0dea> crime: <3
<apeiros> 42
<adaedra> 7 years old in average.
<apeiros> always been, always will be
<shevy> I don't think I can trust the internet answers there
<Ox0dea> The median age of the planet probably is right up around 42.
tomphp has quit [Client Quit]
shinnya has joined #ruby
<baweaver> ?ot
<ruby[bot]> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
norc has quit [Quit: Leaving]
<crime> >> a = ('A'..'Z').to_a;Array.new(10){nil}.collect{a.sample}
<ruby[bot]> crime: # => ["L", "S", "N", "K", "E", "Z", "B", "Q", "G", "S"] (https://eval.in/559491)
<crime> still 2 statements though
<Ox0dea> The hell?
<crime> trying to solve mystery
<adaedra> >> Array.new(10) {('A'..'Z').sample)
<ruby[bot]> adaedra: # => /tmp/execpad-9d01fe6286ea/source-9d01fe6286ea:2: syntax error, unexpected ')', expecting '}' ...check link for more (https://eval.in/559496)
<adaedra> er.
<crime> that copies it
<adaedra> >> Array.new(10) {('A'..'Z').sample}
<ruby[bot]> adaedra: # => undefined method `sample' for "A".."Z":Range (NoMethodError) ...check link for more (https://eval.in/559497)
<Ox0dea> We'll get there.
<adaedra> .... it's late.
<baweaver> deja vu
<crime> I did that same thing and they all yelled at me
<adaedra> that copies what, the original range?
<baweaver> makes a new array n times
<crime> yeah, each time the block is called
<adaedra> yeah, right.
<Ox0dea> >> 10.times.reduce('') { |s| s << rand(65..90) }
<ruby[bot]> Ox0dea: # => "LQCNFEARVO" (https://eval.in/559499)
mfb2_ has joined #ruby
<adaedra> Can you stop yelling?
<Ox0dea> Not my department.
Pupeno has quit [Remote host closed the connection]
mfb2 has quit [Read error: Connection reset by peer]
<adaedra> But I'm sorry, I was kind of looking by bits, didn't catch everything.
<crime> that wouldnt work for arbitrary arrays though
<adaedra> Arbitrary arrays?
<crime> [:symbol, 454545, "a string"]
<crime> idk what im trying to solve anymore actuall
alexherbo2 has quit [Ping timeout: 276 seconds]
itsnwa has quit [Quit: leaving]
<crime> does ruby have like a cascade operator so I could do like a = [4,5,6] ..other stuff, and a would get bound to the array and then I could call methods on a without a semicolon?
nfk has joined #ruby
<Ox0dea> &ri #tap crime
Yiota has joined #ruby
<baweaver> >> 1.tap { 'foo' }
<ruby[bot]> baweaver: # => 1 (https://eval.in/559524)
<crime> ah
<adaedra> Object#tap <3
<baweaver> >>class Object;def pipe;yield(self) end end; 1.pipe { |v| v * 5 }
<ruby[bot]> baweaver: # => 5 (https://eval.in/559533)
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
<baweaver> (granted not a great example of why that'd be useful)
banisterfiend has quit [Remote host closed the connection]
<adaedra> I've made a pipe method earlier, not sure I should release it in the wild.
<crime> >> a = ('A'..'Z').to_a.tap {|o| Array.new(10) {o.sample}}
<ruby[bot]> crime: # => ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", ...check link for more (https://eval.in/559535)
<Ox0dea> crime: That'll give you back the receiver, though, as baweaver demonstrated. You probably want something more like #instance_eval.
<Ox0dea> Toldja so.
<crime> shit, yep
Es0teric has joined #ruby
banister has joined #ruby
rdark has joined #ruby
rdark has quit [Changing host]
rdark has joined #ruby
Lomex has joined #ruby
<baweaver> >>class Object;def pipe;yield(self) end end; ('A'..'Z').to_a.pipe {|o| Array.new(10) {o.sample}}
<ruby[bot]> baweaver: # => ["D", "R", "U", "P", "C", "S", "M", "P", "B", "F"] (https://eval.in/559538)
<crime> more than one statement though
Devalo has quit [Remote host closed the connection]
<Ox0dea> >> rand(36**10).to_s(36).upcase
<ruby[bot]> Ox0dea: # => "69X0OYL1QC" (https://eval.in/559541)
<Ox0dea> Darn.
n008f4g_ has quit [Ping timeout: 260 seconds]
<Ox0dea> Small odds of getting all letters. :/
<Ox0dea> >> 26/36r ** 10
<ruby[bot]> Ox0dea: # => (13/1828079220031488) (https://eval.in/559548)
<crime> >> a = ('A'..'Z').to_a.instance_eval{|o| Array.new(10){o.sample}}
<ruby[bot]> crime: # => ["Q", "S", "E", "H", "X", "R", "F", "E", "Y", "L"] (https://eval.in/559549)
<Ox0dea> *Way* small.
<crime> thats it
bazz_ has left #ruby ["Leaving"]
<crime> i did it
<Ox0dea> ?cookie
<ruby[bot]> here's your cookie:
<baweaver> >> rand(36**10).to_s(36).upcase.delete '0-9'
<ruby[bot]> baweaver: # => "OONNIXGO" (https://eval.in/559555)
polysics has quit [Remote host closed the connection]
<Ox0dea> Looks like the start of a Pokémon battle.
Yiota_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
tomphp has joined #ruby
<crime> subtle, love it
Es0teric has quit [Quit: Computer has gone to sleep.]
x77686d has quit [Quit: x77686d]
Pupeno has joined #ruby
jdawgaz has joined #ruby
william3 has quit [Remote host closed the connection]
Yiota has quit [Ping timeout: 276 seconds]
Guest00-ru has joined #ruby
infra-red has quit []
anisha has quit [Quit: Leaving]
infernix has joined #ruby
alexherbo2 has joined #ruby
jdawgaz has quit [Client Quit]
aspiers_ has quit [Ping timeout: 276 seconds]
mfb2_ has quit [Remote host closed the connection]
Moosashi has joined #ruby
tax has joined #ruby
mfb2 has joined #ruby
synthroid has quit []
callen92 has quit [Quit: Leaving]
baweaver has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
sharkman has joined #ruby
bobbycvi has joined #ruby
mfb2 has quit [Remote host closed the connection]
bronson has joined #ruby
hoylemd_ has left #ruby [#ruby]
noService has quit [Ping timeout: 246 seconds]
<benzrf> nice
Moosashi has quit [Client Quit]
jdawgaz has joined #ruby
allcentury has joined #ruby
yfeldblum has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
rodfersou is now known as rodfersou|dinner
Moosashi has joined #ruby
baweaver has joined #ruby
crime has quit [Ping timeout: 250 seconds]
mfb2 has joined #ruby
DotKite has quit [Ping timeout: 250 seconds]
dhollinger has quit [Quit: WeeChat 1.4]
bronson has quit [Ping timeout: 252 seconds]
y2mq37 has quit [Quit: Leaving]
mfb2 has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Pupeno has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 252 seconds]
rodfersou|dinner has quit [Quit: leaving]
SilverKey has quit [Quit: Halted.]
goodroot has quit [Ping timeout: 276 seconds]
ChiefAlexander has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
mfb2 has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdw has joined #ruby
mdw has quit [Client Quit]
emilford has joined #ruby
wedgwood has left #ruby ["Goodbye"]
yfeldblum has quit [Ping timeout: 268 seconds]
Billias has quit [Ping timeout: 250 seconds]
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
Zarthus_ has joined #ruby
ddfreyne_ has quit [Ping timeout: 250 seconds]
ddfreyne_ has joined #ruby
Zarthus has quit [Ping timeout: 250 seconds]
mfb2 has quit [Ping timeout: 246 seconds]
Zarthus_ is now known as Zarthus
pawnbox has joined #ruby
moeabdol1 has joined #ruby
PedramT has quit [Remote host closed the connection]
ta_ has quit [Read error: Connection reset by peer]
Billias has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
Guest54-ru has joined #ruby
ta_ has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
karapetyan has quit [Remote host closed the connection]
cpup has joined #ruby
karapetyan has joined #ruby
GinoMan2440 has quit [Ping timeout: 276 seconds]
Guest00-ru has quit [Ping timeout: 268 seconds]
allcentury has quit [Ping timeout: 250 seconds]
moeabdol has quit [Ping timeout: 268 seconds]
mfb2 has joined #ruby
ldnunes has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 246 seconds]
mjuszczak has quit []
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
jaguarmagenta has joined #ruby
ta___ has joined #ruby
ta____ has joined #ruby
emilford has joined #ruby
cpup has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wldcordeiro has quit [Ping timeout: 252 seconds]
axion_ has quit [Quit: Textual IRC Client: www.textualapp.com]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
cpup has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
ta____ has quit [Read error: Connection reset by peer]
GinoMan2440 has joined #ruby
bluOxigen_ has quit [Ping timeout: 260 seconds]
ta___ has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
ixti has quit [Read error: Connection reset by peer]
ixti has joined #ruby
GinoMan2440_ has joined #ruby
Azure|dc has quit [Quit: Oops.]
GinoMan2440 has quit [Ping timeout: 268 seconds]
Rodya_ has joined #ruby
moeabdol1 has quit [Ping timeout: 260 seconds]
sharkman has quit [Quit: Leaving]
ramortegui has quit [Quit: Ex-Chat]
yfeldblum has joined #ruby
rbennacer has quit [Ping timeout: 276 seconds]
FernandoBasso has quit [Quit: Leaving]
toretore has quit [Ping timeout: 240 seconds]
chipotle has quit [Ping timeout: 276 seconds]
stannard_ has joined #ruby
stannard_ has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 260 seconds]
diegoaguilar has quit [Ping timeout: 276 seconds]
ramirio has quit [Quit: Leaving ;O zZzZ]
Fernando-Basso has joined #ruby
_ht has quit [Ping timeout: 244 seconds]
_ht has joined #ruby
prestorium has quit [Quit: Leaving]
fmcgeough has quit [Quit: fmcgeough]
benlieb has quit [Quit: benlieb]
ejnahc has joined #ruby
thegunbuster has quit [Quit: Leaving]
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
Lomex has quit [Remote host closed the connection]
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
A124 has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
Guest54-ru has quit [Ping timeout: 260 seconds]
chipotle has joined #ruby
Devalo has joined #ruby
wldcordeiro has joined #ruby
sepp2k has joined #ruby
shayan has quit [Quit: shayan]
workmad3 has quit [Ping timeout: 252 seconds]
al2o3-cr1 has joined #ruby
speakingcode has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Ping timeout: 276 seconds]
ta_ has quit [Remote host closed the connection]
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
diegoaguilar has joined #ruby
symm- has joined #ruby
al2o3-cr1 is now known as al2o3-cr
Xeago has joined #ruby
speakingcode has joined #ruby
rdark has quit [Quit: leaving]
Devalo has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
Dimik has joined #ruby
howdoicomputer has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
spider-mario has joined #ruby
mfb2_ has joined #ruby
aclearman037 has joined #ruby
mfb2__ has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
mfb2__ has quit [Read error: Connection reset by peer]
mfb2 has quit [Ping timeout: 268 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
mfb2 has joined #ruby
mfb2_ has quit [Ping timeout: 240 seconds]
flashpoint9 has quit [Remote host closed the connection]
Spami has joined #ruby
flashpoint9 has joined #ruby
bradleyprice has quit [Remote host closed the connection]
nando293921 has joined #ruby
bradleyprice has joined #ruby
jud has quit [Read error: Connection reset by peer]
n008f4g_ has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
flashpoint9 has quit [Remote host closed the connection]
speakingcode has quit [Ping timeout: 260 seconds]
mfb2 has quit [Ping timeout: 276 seconds]
ChiefAlexander has joined #ruby
BSaboia has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
mlakewood has quit [Read error: Connection reset by peer]
aclearman037 has quit [Quit: Textual IRC Client: www.textualapp.com]
[Butch] has joined #ruby
arthurnn has quit [Ping timeout: 246 seconds]
drbrain has quit [Ping timeout: 246 seconds]
mlakewood has joined #ruby
GasherL has quit [Quit: Leaving]
Azure has joined #ruby
ta_ has joined #ruby
mfb2 has joined #ruby
dh64 has quit [Excess Flood]
sarlalian has quit [Ping timeout: 246 seconds]
dh64 has joined #ruby
deadnull has joined #ruby
aibot__ has joined #ruby
bradleyprice has quit [Read error: Connection reset by peer]
w1lson has joined #ruby
drbrain has joined #ruby
droptone has quit [Ping timeout: 246 seconds]
sarlalian has joined #ruby
mfb2 has quit [Remote host closed the connection]
Todd has quit [Ping timeout: 246 seconds]
dostoyevsky has quit [Remote host closed the connection]
deadnull has quit [Max SendQ exceeded]
alexherbo2 has quit [Ping timeout: 260 seconds]
dostoyevsky has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
droptone has joined #ruby
aibot_ has quit [Remote host closed the connection]
deadnull has joined #ruby
Cohedrin_ has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
JagaJaga has quit [Ping timeout: 260 seconds]
arthurnn has joined #ruby
Cohedrin has quit [Ping timeout: 250 seconds]
frem has quit [Remote host closed the connection]
kasisnu_ has joined #ruby
swills has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
ta_ has quit [Remote host closed the connection]
Weavel has quit [Ping timeout: 260 seconds]
kasisnu has quit [Ping timeout: 268 seconds]
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
crystal77 has joined #ruby
gnufied has quit [Quit: Leaving]
karapetyan has joined #ruby
flashpoint9 has joined #ruby
kasisnu_ has quit [Ping timeout: 276 seconds]
TomyLobo has quit [Ping timeout: 260 seconds]
Todd has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
w1lson has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tax has quit [Ping timeout: 250 seconds]
boboc has joined #ruby
karapetyan has quit [Ping timeout: 268 seconds]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
Rodya_ has quit [Remote host closed the connection]
flashpoint9 has quit [Ping timeout: 276 seconds]
SilverKey has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
JBlazeCoder21 has quit [Remote host closed the connection]
edwinvdgraaf has quit [Read error: Connection reset by peer]
ChiefAlexander has quit [Quit: Leaving...]
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
siaw has quit [Quit: siaw]
edwinvdgraaf has joined #ruby
Rodya_ has joined #ruby
ensyde has joined #ruby
theunraveler has quit []
xxneolithicxx has quit [Quit: Leaving.]
shayan has joined #ruby
vishwa has quit [Ping timeout: 246 seconds]
aspiers_ has joined #ruby
crystal77 has quit [Quit: Textual IRC Client: www.textualapp.com]
crime has joined #ruby
mjuszczak has joined #ruby
tax has joined #ruby
WaqasA has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
baweaver has joined #ruby
zenlot6 has joined #ruby
Rickmasta has joined #ruby
boboc has quit []
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenlot has quit [Ping timeout: 250 seconds]
biberu has quit []
w1lson has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
weemsledeux has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennace_ has joined #ruby
hobodave has quit [Ping timeout: 252 seconds]
Rodya_ has quit [Remote host closed the connection]
kareeoleez has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
Rodya_ has joined #ruby
stannard has joined #ruby
rbennacer has quit [Ping timeout: 260 seconds]
kam270 has joined #ruby
kasisnu has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
mikecmpbll has joined #ruby
heyimwill has quit [Ping timeout: 264 seconds]
UserInNeed is now known as whyamievenhere
firstdayonthejob has quit [Ping timeout: 268 seconds]
Rodya_ has quit [Quit: Leaving...]
krasnus has quit [Ping timeout: 264 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
arescorpio has joined #ruby
skade has joined #ruby
RegulationD has quit [Remote host closed the connection]
IrishGringo has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 250 seconds]
guest789 has joined #ruby
rodfersou has joined #ruby
deadnull has quit [Quit: AFK]
bronson has joined #ruby
GodFather has joined #ruby
mfb2 has joined #ruby
<guest789> Hello, I am new to ruby. I have a need to construct a date in ISO format. I have g_date:2014-09-09 g_time:12:01:56 g_msec:456. How do i contruct a date out of it ? Ideally using Time.at ?
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
freerobby has quit [Quit: Leaving.]
bronson has quit [Ping timeout: 252 seconds]
cschneid has quit [Remote host closed the connection]
<darix> guest789: Time#strftime
<darix> and for parsing
<darix> strptime
blackwell has quit [Max SendQ exceeded]
n008f4g_ has joined #ruby
<guest789> thanks darix. I am absolutely new to ruby. Could you please elaborate ?
blackwell has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: brbwhenhome]
JBlazeCoder21 has joined #ruby
<baweaver> darix: the bot is handy
<baweaver> &ri Time#strftime
<crime> dang baweaver, that socratic delegation, its like ur a real teacher
<baweaver> hm?
blackmes1 has joined #ruby
blackmesa has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
wuieoo has joined #ruby
<wuieoo> herro
<crime> just bored
<crime> and yet, not bored enough to do anything productive
<wuieoo> i are jap and can't prorource the rerrer r
<Radar> !troll wuieoo
wuieoo was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
ta_ has joined #ruby
saneax_AFK is now known as saneax
CausaMortis has joined #ruby
aclearman037 has joined #ruby
<Radar> crime: so it seems
<crime> do u ever feel that way?
aclearman037 has quit [Client Quit]
rahult has joined #ruby
Es0teric has joined #ruby
aclearman037 has joined #ruby
shayan has quit [Quit: shayan]
flashpoint9 has quit [Remote host closed the connection]
Es0teric has quit [Client Quit]
ta_ has quit [Ping timeout: 240 seconds]
rodfersou has quit [Quit: leaving]
bkxd has quit [Ping timeout: 244 seconds]
jaguarmagenta has joined #ruby
DotKite has joined #ruby
aclearman037 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Radar> Yes. Then I go for bike rides / hikes instead.
w1lson has quit [Ping timeout: 276 seconds]
benlieb has quit [Quit: benlieb]
s1kx has joined #ruby
jaguarmagenta has quit [Ping timeout: 246 seconds]
shinnya has quit [Ping timeout: 260 seconds]
<crime> thats a good idea
krasnus has joined #ruby
<DotKite> I am trying to implement a prime gap function. I decided to use an enumerator, but when I call my gap function more than once it is as if it isn't creating a new enumerator when I call the gap function more than once. Here is the paste http://pastebin.com/YmnMz9Lr
<ruby[bot]> DotKite: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7e8669de9b03369d743cb52e23dbeff9
<ruby[bot]> DotKite: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
wilbert has quit [Ping timeout: 250 seconds]
rbennace_ has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
CausaMortis_ has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<guest789> would anyone know what format is this time 2014-04-07T000:00:00-00:00
CausaMortis has quit [Ping timeout: 244 seconds]
<baweaver> ISO 8601 UTC
<arahael> nope.
pawnbox has joined #ruby
<arahael> that's not iso 8601, though could be a typo.
Xentil has joined #ruby
bkxd has joined #ruby
<guest789> arahael: I am confused too
<guest789> this is for elasticsearch
<arahael> iso 8601 has a maximum of 2 digits in the hours column, for a max value of 24.
<guest789> T000:00:00-00:00, not sure how i would represent hh:mm:ss,SSS
<arahael> guest789: elasticsearch uses iso8601.
<arahael> guest789: ah. use a . for decimal seconds, not comma.
siaw has joined #ruby
<guest789> arahael: With milliseconds
heyimwill has joined #ruby
<arahael> guest789: but some broken parsers deal with milliseclnds poorly.
nando293921 has quit [Quit: Lost terminal]
<arahael> *milliseconds.
<smathy> The three digit hour is more concerning there.
<arahael> indeed.
<crime> maybe its iso 8601 but on a planet with a longer orbit
<smathy> I'd rather be some milliseconds off than an order of magnitude of hours.
<smathy> crime, longer rotation.
<crime> you meant what i knew
mjuszczak has quit []
<smathy> :)
<crime> :)
<guest789> trying to understand that
<smathy> guest789, that's a standard parser for ISO 8601
<smathy> ...where did you get the three digit hours or "-00:00" part from that?
freerobby has joined #ruby
<Radar> That's a timezone.
<smathy> Oh, heh :)
<Radar> "2016-04-26T09:40:11+10:00"
<smathy> I'm not used to seeing a colon there.
nando293921 has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
<Radar> Looks familar to the one that they provided, no?
<guest789> smathy. On line 42, what should be time ?
<arahael> Radar: still, that has only 2-digits in the hours part.
<guest789> specifically, what format ?
spider-mario has quit [Remote host closed the connection]
<Radar> correct
<Radar> guest789: where did you get the time from?
<smathy> guest789, YYYY-MM-DDThh:mm:ss.milisecZ
SilverKey has quit [Quit: Halted.]
CausaMortis_ has quit [Read error: Connection reset by peer]
paulgrmn3 has joined #ruby
<guest789> can I do Time.at('2014-10-10 10:20:30', record[@msec_key].to_i * 1000).strftime("%Y-%m-%dT%H:%M:%S.%L%z")
<arahael> guest789: you're totally ignoring all of us.
<guest789> Radar: This is for fluentd.
<smathy> guest789, sorry, as Radar mentioned, the %z is the zone offset, although I'd expect just three or four digits without a semi colon like +1000 -0600 or -600
<guest789> sorry
<arahael> smathy: the semicolon is optional.
<smathy> ...but he's probably right that the ... ^ that.
flashpoint9 has quit [Remote host closed the connection]
rodfersou has joined #ruby
<guest789> this is so complicated...sorry
<arahael> but anyway, why help him - we all asked about the 3-digit hour, and he's ignored us. it must be significant, because hree times he mentioned it.
<guest789> arahael: I did not ignored it. I myself don't know sorry...
<arahael> guest789: well, where. did. you. get. it. from?
<guest789> see time_key section
<arahael> guest789: you cut*pasted that line here?
Devalo has joined #ruby
<guest789> {"@timestamp":"2014-04-07T000:00:00-00:00"}
<guest789> arahael ^^
sepp2k has quit [Read error: Connection reset by peer]
<arahael> right. yeah, that looks wrong.
<al2o3-cr> >> require 'time'; Time.parse(Time.now.to_s).iso8601
<ruby[bot]> al2o3-cr: # => "2016-04-25T23:48:40+00:00" (https://eval.in/559581)
chipotle has quit [Ping timeout: 244 seconds]
aspiers_ has quit [Ping timeout: 260 seconds]
<Radar> >> require 'time'; Time.parse("2014-04-07T000:00:00-00:00")
<ruby[bot]> Radar: # => 2014-04-07 00:00:00 UTC (https://eval.in/559582)
<Radar> Seems valid according to Time.parse
<smathy> Heh :)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
<crime> >> require 'time'; Time.parse("2014-04-07T123:23:23-23:23")
<ruby[bot]> crime: # => 2014-04-12 03:23:23 -2323 (https://eval.in/559583)
<crime> >> require 'time'; Time.parse("2014-04-07T023:23:23-23:23")
<ruby[bot]> crime: # => 2014-04-07 23:23:23 -2323 (https://eval.in/559584)
<crime> hmm
finisherr has quit [Quit: finisherr]
mjuszczak has joined #ruby
<crime> we should just all use UTC milliseconds
<crime> would be way easier to deal with
<Radar> "meet me at the cafe at 1461628331409037
<Radar> Sure sounds good lets do it
deadnull has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
Devalo has quit [Ping timeout: 268 seconds]
<crime> i'd prefer it
<Radar> xkcd.com/927
sneakerhax has quit [Ping timeout: 250 seconds]
<crime> einstein said time was relative, what if we only described time relatively?
<crime> lets meet at cafe tomorrow
skade has quit [Quit: Computer has gone to sleep.]
SilverKey has joined #ruby
<Radar> what even is tomorrow
<crime> doesnt matter, thats for u to decide
<crime> its implementation specific
<Radar> I can't have a serious discussion with you if you're going to abbreviate a three-letter word into a single letter.
<crime> maybe its a stylistic choice
ryanneufeld has joined #ruby
<smathy> I think he's assuming that.
<crime> radar we can just not be serious then
<crime> lets keep it casual until u r ready
fsapo has joined #ruby
<crime> i mean, i wasnt serious anyways
<ryanneufeld> can someone help me figure out why this isn't working for me https://gist.github.com/ryanneufeld/11b83ba96fd80b56d06951117961571f
<ryanneufeld> basically what I'm trying to do is take an envvar which is a string, and make it a boolean
RegulationD has joined #ruby
<ryanneufeld> so i can pass it into ansible correctly
flashpoint9 has joined #ruby
<ryanneufeld> I'm not a ruby dev
<smathy> ryanneufeld, that's a lot of lines to do that.
<ryanneufeld> well, in any other language, i'd have it beat, but ruby mystifies me
<ryanneufeld> I'm well open to suggestions