closer changed the topic of #ruby-core to: check the latest release candidate for 1.9.1 release ftp.ruby-lang.org:/home/yugui/ruby-1.9.1-r26021+1.tar.bz2
<zzak> [ben z rf, irc.freenode.net] (py3, that is)
<zzak> [dea, irc.freenode.net] >>> 'ß'.upper().lower()
<zzak> [dea, irc.freenode.net] 'ss'
<zzak> [dea, irc.freenode.net] Whoops.
<zzak> [dea, irc.freenode.net] Surely that should've been a no-op?
<zzak> [arahael, irc.freenode.net] Ox0dea: no, that's correct. python doesn't take locale into consideration.
<zzak> [dea, irc.freenode.net] arahael: Shouldn't it?
<zzak> [arahael, irc.freenode.net] benzrf: but locale!
<zzak> [arahael, irc.freenode.net] Ox0dea: how can it, without the locale?
hsbt_away is now known as hsbt
<zzak> [Tariq Ali, irc.freenode.net] 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
<zzak> [Tariq Ali, irc.freenode.net] But Chrome adds a new cookie value, called rack.session.
<zzak> [Tariq Ali, irc.freenode.net] So the web server's cookie gets messed up...
<zzak> [Tariq Ali, irc.freenode.net] 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...
<zzak> [Tariq Ali, irc.freenode.net] This is how I get "rack.session"
<zzak> [Tariq Ali, irc.freenode.net] What should I do with rack.session? Just don't process it?
<zzak> [Tariq Ali, irc.freenode.net] Well, I guess that worked then. Thanks Rubby Duckies.
<zzak> [Tariq Ali, irc.freenode.net] *Rubbe
<zzak> [Tariq Ali, irc.freenode.net] *Rubber
<zzak> [the method of tikt, irc.freenode.net] 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"
<zzak> [the method of tikt, irc.freenode.net] so starting with "patients", I need patients to be an array, where each entry has two sub-arrays, "billiable_items" and "products"
<zzak> [the method of tikt, irc.freenode.net] what's the best way to design that?
rafaelfranca has joined #ruby-core
rafaelfranca has quit [Ping timeout: 240 seconds]
<zzak> [Tariq Ali, irc.freenode.net] droptone: { account: [ patient_one: { billiable_items: "foo", products: "bar" }, patient_two: { billable_items: "alpha", products: "beta" } ] }
<zzak> [Tariq Ali, irc.freenode.net] At least, that's what your spec claimed for it to be
<zzak> [Tariq Ali, irc.freenode.net] Is this what you want?
<zzak> [Tariq Ali, irc.freenode.net] And sorry for the actual ruby code, I couldn't think how to explain it using pseudocode
<zzak> [Jason King, irc.freenode.net] [] and [] instead of "foo" and "bar" - but yeah, what _Tariq said.
<zzak> [the method of tikt, irc.freenode.net] That sounds fine _Tariq, thank you.
n0kada has joined #ruby-core
nokada has quit [Quit: Leaving...]
<znz_jp> biff: [ruby-changes:42681] hsbt:r54755 (trunk): * encoding.c: Fix return value of `Encoding::ISO8859_1.name` - http://mla.n-z.jp/?ruby-changes=42681
<znz_jp> biff: [ruby-changes:42682] hsbt:r54756 (trunk): * doc/extension.rdoc: Improvements to english grammers. - http://mla.n-z.jp/?ruby-changes=42682
rafaelfranca has joined #ruby-core
rafaelfranca has quit [Ping timeout: 240 seconds]
Aethenelle has joined #ruby-core
<znz_jp> biff: [ruby-changes:42683] nobu:r54757 (trunk): configure.in: do not create unnecessary verconf.h - http://mla.n-z.jp/?ruby-changes=42683
rafaelfranca has joined #ruby-core
rafaelfranca has quit [Ping timeout: 240 seconds]
zzak has quit [Remote host closed the connection]
zzak has joined #ruby-core
tax has joined #ruby-core
rafaelfranca has joined #ruby-core
Aethenelle has quit [Quit: Aethenelle]
rafaelfranca has quit [Ping timeout: 240 seconds]
<znz_jp> biff: [ruby-changes:42684] nobu:r54758 (trunk): sizes.c.tmpl: extra semicolon - http://mla.n-z.jp/?ruby-changes=42684
<znz_jp> biff: [ruby-changes:42685] nobu:r54759 (trunk): rbconfig/sizeof: calculate at compilation time - http://mla.n-z.jp/?ruby-changes=42685
rafaelfranca has joined #ruby-core
rafaelfranca has quit [Ping timeout: 240 seconds]
tax has quit [Ping timeout: 268 seconds]
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] I have this puzzle : https://www.codingame.com/ide/4246062ab2f171097e7138af9673311b2fb0e0e
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] and this solution : http://lpaste.net/161374
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] Can I improve my solution somehow : http://lpaste.net/161374
toretore has joined #ruby-core
<zzak> [Zarthus, irc.freenode.net] roelof: the challenge link doesn't work / requires authorization, what is the challenge?
<zzak> [Zarthus, irc.freenode.net] 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
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] 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).
<zzak> [Zarthus, irc.freenode.net] 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
<zzak> [Zarthus, irc.freenode.net] oh, are you still on about that issue?
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] which isssue, this code solves all cases presented
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] I only want to know if I can do it a "better" way
<zzak> [Zarthus, irc.freenode.net] issue as in question; you came here yesterday with the same thing
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] correct, but now I solved it
<zzak> [Zarthus, irc.freenode.net] took you a while :P
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] 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
<zzak> [Zarthus, irc.freenode.net] 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)
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] for me these are challenges to learn ruby and learn how to solve "real" problems
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] you mean something like "1 2 -4 b 8 7 " ??
<zzak> [Zarthus, irc.freenode.net] yeah, b will be 0
<zzak> [Zarthus, irc.freenode.net] irb(main):002:0> "b".to_i
<zzak> [Zarthus, irc.freenode.net] => 0
<zzak> [Zarthus, irc.freenode.net] I also would not write code as that oneliner on rule 6, write your program full out - preserve your eyes and sanity
<znz_jp> biff: [ruby-changes:42686] nobu:r54761 (trunk): ripper: fix ripper.E - http://mla.n-z.jp/?ruby-changes=42686
<znz_jp> biff: [ruby-changes:42687] nobu:r54760 (trunk): extmk.rb: refactor - http://mla.n-z.jp/?ruby-changes=42687
<znz_jp> biff: [ruby-changes:42688] nobu:r54762 (trunk): net/http/header.rb: refactor - http://mla.n-z.jp/?ruby-changes=42688
<zzak> [Zarthus, irc.freenode.net] you can just use "puts temp" on line 10
<zzak> [Zarthus, irc.freenode.net] unless you want "the temperature is #{temp}", but your current code does not do that
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] oke, so something like if .. then temp = temp * - 1 end ?
<zzak> [Zarthus, irc.freenode.net] use newlines
<zzak> [Zarthus, irc.freenode.net] it helps you expand the code in the future (easier to maintain) and it makes it easier to read (catch errors quickly)
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] of course, I was checking if I understand what you mean
<zzak> [Zarthus, irc.freenode.net] if you want to chain some more things, there's room for that too (depends on what you want)
<zzak> [524ACD6D.cm-4-3d.dynamic.ziggo.nl/82.74.205.109, irc.freenode.net] I like readable code not putting everything on one line
<zzak> [Zarthus, irc.freenode.net] the 'temp' variable might be misleading (is it a temporary variable, or a temperature?)
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
<znz_jp> biff: [ruby-changes:42689] nobu:r54763 (trunk): tk/extconf.rb: refactor - http://mla.n-z.jp/?ruby-changes=42689
rafaelfranca has joined #ruby-core
rafaelfranca has quit [Ping timeout: 240 seconds]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
rafaelfranca has joined #ruby-core
hsbt_away is now known as hsbt
rafaelfranca has quit [Ping timeout: 240 seconds]
yasha_ has joined #ruby-core
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
rafaelfranca has joined #ruby-core
rafaelfranca has quit [Changing host]
rafaelfranca has joined #ruby-core
rafaelfranca has quit [Ping timeout: 240 seconds]
swistak35_ has quit [Ping timeout: 250 seconds]
eregon_ has quit [Ping timeout: 250 seconds]
eregon has joined #ruby-core
rafaelfranca has joined #ruby-core
swistak35 has joined #ruby-core
rafaelfranca has quit [Ping timeout: 240 seconds]
Aethenelle has joined #ruby-core
enebo has joined #ruby-core
yasha_ has quit [Quit: Leaving]
Aethenelle has quit [Read error: Connection reset by peer]
shinnya has joined #ruby-core
nagachika has joined #ruby-core
<znz_jp> biff: [ruby-changes:42690] nagachika:r54764 (ruby_2_3): merge revision(s) 54758: - http://mla.n-z.jp/?ruby-changes=42690
<znz_jp> biff: [ruby-changes:42691] nagachika:r54765 (ruby_2_3): merge revision(s) 54755: [Backport #12313] - http://mla.n-z.jp/?ruby-changes=42691
<znz_jp> biff: [ruby-changes:42692] nagachika:r54766 (ruby_2_3): merge revision(s) 53320, 54756: [Backport #12246] - http://mla.n-z.jp/?ruby-changes=42692
<znz_jp> biff: [ruby-changes:42693] nagachika:r54767 (ruby_2_3): version.h: bump up teeny. 2.3.0 -> 2.3.1. - http://mla.n-z.jp/?ruby-changes=42693
<znz_jp> biff: [ruby-changes:42694] nagachika:r54768: add tag v2_3_1 - http://mla.n-z.jp/?ruby-changes=42694
shinnya has quit [Ping timeout: 250 seconds]
rafaelfranca has joined #ruby-core
nagachika has quit [Remote host closed the connection]
_whitelogger has joined #ruby-core
shinnya has joined #ruby-core
shinnya has quit [Ping timeout: 252 seconds]
shinnya has joined #ruby-core
tax has joined #ruby-core
toretore has quit [Ping timeout: 240 seconds]
drbrain has quit [Ping timeout: 246 seconds]
drbrain has joined #ruby-core
tax has quit [Ping timeout: 250 seconds]
tax has joined #ruby-core
nagachika has joined #ruby-core
nagachika has quit [Ping timeout: 260 seconds]
enebo has quit [Quit: enebo]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
Aethenelle has joined #ruby-core
shinnya has quit [Ping timeout: 260 seconds]
hsbt is now known as hsbt_away