havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.1, 2.5.3, 2.4.5: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
Autolycus has quit []
orbyt_ has joined #ruby
Creatornator has joined #ruby
xrexeon has quit [Ping timeout: 240 seconds]
lukelukeluke has quit [Ping timeout: 245 seconds]
t0xik has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
sagax has quit [Quit: Konversation terminated!]
cnsvc has quit [Ping timeout: 256 seconds]
skyikot has joined #ruby
tdy has quit [Ping timeout: 250 seconds]
<al2o3-cr> &>> [[1234].pack('V'), 0x04d2]
<rubydoc> # => ["\xD2\x04\x00\x00", 1234] (https://carc.in/#/r/6h1w)
tiogrand has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiogrand has quit [Max SendQ exceeded]
tiogrand has joined #ruby
Creatornator has joined #ruby
nowhere_man has joined #ruby
laaron has quit [Remote host closed the connection]
bjpenn has quit [Quit: leaving]
stryek has quit [Quit: Connection closed for inactivity]
r29v has joined #ruby
laaron has joined #ruby
tdy has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 272 seconds]
AJA4351 is now known as AJA4350
SeepingN has quit [Quit: The system is going down for reboot NOW!]
cnsvc has joined #ruby
jrafanie has joined #ruby
mangold has joined #ruby
r29v has quit [Quit: r29v]
ansraliant has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
kapil____ has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower2 has quit [Ping timeout: 246 seconds]
jrafanie has joined #ruby
gnufied has quit [Read error: Connection reset by peer]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
AJA4350 has quit [Remote host closed the connection]
Swyper has joined #ruby
skyikot has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lytol has quit [Remote host closed the connection]
Swyper has joined #ruby
arescorpio has joined #ruby
memofun has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
code_zombie has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
memofun has quit [Ping timeout: 250 seconds]
conta has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
conta has quit [Ping timeout: 246 seconds]
segy has joined #ruby
sagax has joined #ruby
Creatornator has joined #ruby
lukelukeluke has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
tiogrand has quit [Ping timeout: 246 seconds]
tau has quit [Remote host closed the connection]
arescorpio has quit [Remote host closed the connection]
iMadper|NanShou is now known as iMadper|Happy
braincrash has quit [Quit: bye bye]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
braincrash has joined #ruby
iMadper|Happy has quit [Remote host closed the connection]
Azure has quit [Ping timeout: 250 seconds]
imadper has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
crankharder has joined #ruby
emilford has joined #ruby
Devalo has joined #ruby
Devalo has quit [Ping timeout: 245 seconds]
gregf_ has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
emilford has quit [Ping timeout: 272 seconds]
dionysus70 has quit [Ping timeout: 272 seconds]
emilford has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
mangold has joined #ruby
imadper is now known as iMadper|Unsuppor
iMadper|Unsuppor is now known as Madper|Unsupport
emilford has quit [Ping timeout: 252 seconds]
emilford has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
mangold has quit [Quit: This computer has gone to sleep]
lukelukeluke has quit [Ping timeout: 246 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
emilford has quit [Ping timeout: 252 seconds]
emilford has joined #ruby
emilford has quit [Ping timeout: 246 seconds]
mangold has joined #ruby
emilford has joined #ruby
laaron has quit [Remote host closed the connection]
sleetdrop has joined #ruby
laaron has joined #ruby
emilford has quit [Remote host closed the connection]
emilford has joined #ruby
ausmat has joined #ruby
sauvin has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Cthulu201 has quit [Ping timeout: 246 seconds]
Inline has quit [Quit: Leaving]
akem has joined #ruby
darkphnx4 has joined #ruby
emilford has quit [Ping timeout: 252 seconds]
emilford has joined #ruby
haylon_ has joined #ruby
Prira has joined #ruby
Devalo has joined #ruby
wget has joined #ruby
wget has joined #ruby
wget has quit [Changing host]
ausmat has quit [Remote host closed the connection]
ausmat has joined #ruby
daemonwrangler_ has joined #ruby
akem__ has quit [Remote host closed the connection]
infernix has quit [Ping timeout: 246 seconds]
darkphnx has quit [Quit: Ping timeout (120 seconds)]
haylon has quit [Remote host closed the connection]
c0san0stra has quit [Ping timeout: 246 seconds]
cgfbee has quit [Ping timeout: 246 seconds]
michael_mbp has quit [Ping timeout: 246 seconds]
j416 has quit [Ping timeout: 246 seconds]
eldritch has quit [Ping timeout: 246 seconds]
daemonwrangler has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
al2o3-cr has quit [Ping timeout: 246 seconds]
al2o3-cr has joined #ruby
ablackack has quit [Ping timeout: 246 seconds]
al2o3-cr is now known as Guest63017
emilford has quit [Ping timeout: 246 seconds]
j416 has joined #ruby
c0san0stra has joined #ruby
ablackack has joined #ruby
themsay has quit [Ping timeout: 246 seconds]
n13z has quit [Ping timeout: 246 seconds]
ausmat has quit [Ping timeout: 255 seconds]
emilford has joined #ruby
eldritch has joined #ruby
infernix has joined #ruby
Mon_Ouie has joined #ruby
cgfbee has joined #ruby
Devalo has quit [Remote host closed the connection]
michael_mbp has joined #ruby
Creatornator has joined #ruby
conta has joined #ruby
Swyper has quit [Remote host closed the connection]
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qual has joined #ruby
Devalo has joined #ruby
bambanx has joined #ruby
bambanx has quit [Max SendQ exceeded]
bambanx has joined #ruby
bambanx has quit [Max SendQ exceeded]
bambanx has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
am0123 has joined #ruby
Devalo has quit [Remote host closed the connection]
am0123 has quit [Ping timeout: 252 seconds]
am0123 has joined #ruby
bambanx has quit [Quit: Leaving]
alem0lars has joined #ruby
t0xik is now known as t0x
skyikot has joined #ruby
Tharbakim has quit [Ping timeout: 245 seconds]
laaron has quit [Remote host closed the connection]
Tharbakim has joined #ruby
Tharbakim has quit [Changing host]
Tharbakim has joined #ruby
laaron has joined #ruby
themsay has joined #ruby
nowhere_man has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
cnsvc has quit [Ping timeout: 256 seconds]
Dbugger has joined #ruby
aupadhye has joined #ruby
reber has joined #ruby
skyikot has quit [Ping timeout: 256 seconds]
andikr has joined #ruby
hightower2 has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
Onwarion has joined #ruby
clemens3_ has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
GreyHame has joined #ruby
aufi has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
r3m has quit [Remote host closed the connection]
r3m has joined #ruby
TomyWork has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
segy has quit [Ping timeout: 245 seconds]
alem0lars has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
Tuor has joined #ruby
Ai9zO5AP has joined #ruby
<Tuor> Hi, this is how my code is right now: https://dpaste.de/ok5i
segy has joined #ruby
Cthulu201 has joined #ruby
ansraliant has quit [Quit: My planet needs me]
<Tuor> Are there any "don't do that!" in it? Or do you have any sugsetion what I should do differently for reason x? I wrote ruby befor like 3 or 4 years ago and learned a lot with this channel. But don't hit me if I can't remember all of what you told me. ;)
stan has quit [Ping timeout: 252 seconds]
<Tuor> So I'm still a beginner. ;)
stan has joined #ruby
DaRock has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
sagax has quit [Ping timeout: 272 seconds]
ur5us has joined #ruby
schleppel has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
themsay has quit [Ping timeout: 246 seconds]
Devalo has joined #ruby
Dbugger has quit [Ping timeout: 240 seconds]
emilford has quit [Ping timeout: 255 seconds]
emilford has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
qual has quit [Ping timeout: 252 seconds]
schleppel has quit [Read error: Connection reset by peer]
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
powerbit has quit [Ping timeout: 250 seconds]
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
qual has joined #ruby
schleppel has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
dhollin3 has joined #ruby
dhollinger has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
emilford has quit [Ping timeout: 252 seconds]
emilford has joined #ruby
mikecmpbll has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
claudiuinberlin has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
SegFaultAX has quit [Ping timeout: 258 seconds]
SegFaultAX has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
GodFather has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
tdy has quit [Ping timeout: 252 seconds]
ericboehs has quit [Read error: Connection reset by peer]
alem0lars has quit [Read error: Connection reset by peer]
ericboehs has joined #ruby
alem0lars has joined #ruby
sylario has joined #ruby
emilford has quit [Ping timeout: 246 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
r3m has quit [Remote host closed the connection]
r3m has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
themsay has joined #ruby
DaRock has joined #ruby
<canton7> Tuor, don't use 'and', use '&&'
emilford has joined #ruby
aupadhye has quit [Ping timeout: 245 seconds]
<canton7> line 33, you access `params['path']` a *lot*, which means a lot of hash lookups
<canton7> line 7, I'd make 'default_config_file_path' a constant
<canton7> personally as a user I'd expect some sort of warning or message if I supplied a path, but the code decides to ignore it for some reason
ur5us has quit [Ping timeout: 245 seconds]
Guest63017 has quit [Quit: WeeChat 2.4]
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
al2o3-cr has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
aqd has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 245 seconds]
aupadhye has joined #ruby
marmotini_ has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #ruby
alem0lars has joined #ruby
TomyWork has joined #ruby
gregf_ has joined #ruby
mangold has joined #ruby
code_zombie has quit [Quit: Leaving]
DaRock has quit [Read error: Connection reset by peer]
aupadhye has quit [Ping timeout: 245 seconds]
aupadhye has joined #ruby
<Tuor> Thx for your comments, this is what I got up with: https://dpaste.de/C0u4
nowhere_man has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<Bish> can somebody tell me what problem conditionvariable solves
dionysus69 has joined #ruby
<Bish> i don't quit get it what its good forẞ
<Bish> canton7: why does and or && matter
emilford has quit [Ping timeout: 252 seconds]
<canton7> Bish, the precedence is different. '&&' is meant for combining conditions, 'and' is meant for control flow
emilford has joined #ruby
<canton7> `puts 1 > -1 and 257 < 256` #=> false, but `puts 1 > -1 && 257 < 256` #=> true
alem0lars has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
<Bish> oh i see
nowhere_man has quit [Ping timeout: 246 seconds]
ellcs has joined #ruby
schleppel has quit [Read error: Connection reset by peer]
schleppel has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
<ljarvis> Tuor: just use "path = params[:path] || DEFAULT_CONFIG_FILE_PATH; if path.to_s.empty? # error code; else # normal flow end"
<Bish> does Hash check existence of a thing with === ?
<ljarvis> no
alem0lars has joined #ruby
<ljarvis> Bish: what do you mean "check existence of a thing"?
<Bish> well, if i do h[some_method_creating_a_new_object] = true
<Bish> twice
alem0lars has quit [Read error: Connection reset by peer]
<Bish> == of those 2 objects is false, === of these 2 objects is true
<ljarvis> do you have code?
<Bish> not really, trying to artificially create one right now
<ljarvis> ok, I don't really understand the question
alem0lars has joined #ruby
<Bish> class Test; def === b;true;end;end;
<Bish> h={};class Test; def === b;true;end;end;h[Test.new] = 1; h[Test.new] = 1;h
<Bish> can i somehow make that hash check for equality with === ?
<Bish> >> h={};class Test; def === b;true;end;end;h[Test.new] = 1; h[Test.new] = 1;h
<ruby[bot]> Bish: # => {#<Test:0x406b9848>=>1, #<Test:0x406b980c>=>1} (https://eval.in/1082865)
<ljarvis> what do you mean check for equality? none of your code is doing that
alem0lars has quit [Read error: Connection reset by peer]
<Bish> well Hash has 2 elements i want it to be one
apparition has joined #ruby
alem0lars has joined #ruby
<Bish> at some point Hash checks for equality
<ljarvis> oh
ski7777 has quit [Ping timeout: 244 seconds]
<Bish> oh im guessing i might be able to do that with the default proc
emilford has quit [Ping timeout: 272 seconds]
ski7777 has joined #ruby
<ljarvis> &>> h = {}; class Test; def eql?(_); true; end; def hash; 1; end; end; h[Test.new] = 1; h[Test.new] = 1; h.size
<rubydoc> # => 1 (https://carc.in/#/r/6h2w)
<ljarvis> you want #eql? and #hash
<Bish> well that's not what i am asking
<Bish> i don't want to change == of "Test"
<ljarvis> you're not..
<ljarvis> try it?
<ljarvis> Test.new == Test.new will be false
<ljarvis> &>> h = {}; class Test; def eql?(_); true; end; def hash; 1; end; end; h[Test.new] = 1; h[Test.new] = 1; [h.size, Test.new == Test.new]
<rubydoc> # => [1, false] (https://carc.in/#/r/6h2x)
<Bish> isn't eql? a alias of == or the other way around?
<ryouba> good morning everybody!
<ljarvis> no
<ljarvis> eql? is for hashing
<Bish> well for the object im working on, it is :(
<Tuor> I have the rescue part in my code, how can I fail in a part of the script and jump to that rescue part. Like `error = 'failure reason; go to rescue`
<Tuor> (?)
<ljarvis> well eql? is the same as == for a lot of classes, because that makes sense for hashing
<Bish> Tuor: wrap it the code inside begin; <code>; rescue ErrorType => e; end;
<Bish> and lines behind that rescue will work for that errortype
<ljarvis> Tuor: either use exceptions and rescue, or simplify with multiple methods
<Bish> ljarvis: yeah and my question is if i can change that :/, i want a hash that uses ===
<ljarvis> Bish: ok i dont think i can help
<Bish> ljarvis: background is my ORM, it uses equality(==) if content of rows are the same and === for the database ids
<ljarvis> that sounds like a bad idea
alem0lars has quit [Read error: Connection reset by peer]
<Bish> i liked it until now
<Bish> and why?
<ljarvis> because [open arms to demonstrate current situation]
emilford has joined #ruby
<ljarvis> you need to be careful overriding standard operators like that
<Bish> i don't follow
alem0lars has joined #ruby
<Bish> last time i checked === can be whatever you like there is no "standard"
<Bish> and == works correctly
<ljarvis> my point is that === is a standard operator, and you have to be careful when overriding them. Why do you want == and === to return differently? surely if the DB id refers to the same value then so with the contents?
mangold has quit [Quit: This computer has gone to sleep]
alem0lars has quit [Read error: Connection reset by peer]
<Bish> why do == and === exists if you want them to be the same, the fuck?
<ljarvis> ok well i hope someone else can help you
alem0lars has joined #ruby
<Bish> ljarvis: yes, to the last part
<Bish> and sure, === is a standard operator.. but NOWHERE used in the codebase of ruby standardlibrary (atleast as i hae seen)
<Bish> just for "case" and everyone knows that
<Bish> afaik === is exactly that the "case" equality
<Tuor> ljarvis: I'm trying to put it into a function. but how can I let the function fail? If I'm not happy with the given path the function should fail.
<Tuor> I tried it but it doesn't fail on an empty string: https://dpaste.de/QL2u
ski7777 has quit [Remote host closed the connection]
ski7777 has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
TomyWork has joined #ruby
ski7777 has quit [Ping timeout: 246 seconds]
ski7777 has joined #ruby
<Tuor> It is working like this: https://dpaste.de/tWbz
* Tuor is going afk, but come back later and will read if someone mentions him!
emilford has quit [Ping timeout: 252 seconds]
ski7777 has quit [Ping timeout: 246 seconds]
themsay has quit [Ping timeout: 252 seconds]
themsay has joined #ruby
emilford has joined #ruby
steve_ has joined #ruby
steve_ has left #ruby [#ruby]
ski7777 has joined #ruby
mangold has joined #ruby
_whitelogger has joined #ruby
conta has quit [Ping timeout: 252 seconds]
DTZUZO has joined #ruby
am0123 has quit [Ping timeout: 245 seconds]
conta has joined #ruby
kapil____ has joined #ruby
ski7777 has quit [Ping timeout: 240 seconds]
t0x has quit [Quit: Connection closed for inactivity]
ski7777 has joined #ruby
laaron has quit [Remote host closed the connection]
ubuntuisloved has joined #ruby
laaron has joined #ruby
<al2o3-cr> Bish: just use the shit handed to you, know?
mangold has quit [Quit: This computer has gone to sleep]
laaron has quit [Remote host closed the connection]
<al2o3-cr> and i know you know!
<al2o3-cr> can ruby do this, can ruby do that...
<Bish> al2o3-cr: what?
<al2o3-cr> wut?? Bish
ellcs has quit [Ping timeout: 252 seconds]
laaron has joined #ruby
<Bish> al2o3-cr: i don't follow, what are you refering to?
<al2o3-cr> this, that andtother
<Bish> get a better hobby than trolling
<al2o3-cr> OK! Bish...
tiogrand has joined #ruby
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aufi has quit [Read error: Connection reset by peer]
aufi has joined #ruby
<al2o3-cr> Bish: what is your language of choice?
<Bish> that depends on the purpose
ldnunes has joined #ruby
<al2o3-cr> Bish: so... you use ruby?
<Bish> for web, yes
<al2o3-cr> OK
<ljarvis> lol
emilford has quit [Quit: Lost terminal]
<al2o3-cr> LOL
<al2o3-cr> ljarvis: how good is the zen shit?
<ljarvis> its fine
<al2o3-cr> upload?
<ljarvis> depends which plan, 30mbps here
AJA4350 has joined #ruby
<al2o3-cr> shit then.
<ljarvis> ok
<al2o3-cr> ljarvis: that business?
conta has quit [Ping timeout: 246 seconds]
nowhere_man has joined #ruby
ubuntuisloved has joined #ruby
conta has joined #ruby
<ljarvis> al2o3-cr: no I don't think so
nowhere_man has quit [Ping timeout: 252 seconds]
am0123 has joined #ruby
nowhere_man has joined #ruby
apparition has quit [Quit: Bye]
am0123 has quit [Read error: Connection reset by peer]
<Bish> cache.each do |k,(last_filled:,data:)| pattern matching like this possible in ruby?
sagax has joined #ruby
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has quit [Ping timeout: 246 seconds]
alem0lars has quit [Remote host closed the connection]
am0123 has joined #ruby
<Bish> gotta know what "shit" is handed to me
ubuntuisloved has joined #ruby
conta has quit [Ping timeout: 255 seconds]
naught-fowl has joined #ruby
DaRock has joined #ruby
ellcs has joined #ruby
<Tuor> I improved failure handling. How does it look now? https://dpaste.de/o4Dt
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ubuntuisloved has joined #ruby
tiogrand has quit [Ping timeout: 246 seconds]
aqd has joined #ruby
ski4x7 has joined #ruby
ski7777 has quit [Ping timeout: 272 seconds]
conta has joined #ruby
<al2o3-cr> Bish: ruby is what's handed to you.
orbyt_ has joined #ruby
<Bish> al2o3-cr: so i better write my own brainfuck interpreter so i don't have to know about it's features
mangold has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
tiogrand has joined #ruby
tiogrand has quit [Max SendQ exceeded]
tiogrand has joined #ruby
griffindy has joined #ruby
<Bish> how bad is spawning a thread that is sleeping all day, unless it's woken up
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
segy has joined #ruby
AJA4350 has quit [Ping timeout: 252 seconds]
jrafanie has joined #ruby
faces has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
memofun has joined #ruby
face has quit [Ping timeout: 250 seconds]
ams__ has joined #ruby
tiogrand_ has joined #ruby
tiogrand_ has quit [Max SendQ exceeded]
tiogrand_ has joined #ruby
tiogrand has quit [Ping timeout: 246 seconds]
<c-c> Bish: why would you do that?
<Bish> c-c: puh... i have a call inside my code that gets a Coupon code from a database
<Bish> it has to be a single code (bad software design)
<Bish> but it also has to be fast, because it gets called thousand times a second
<Bish> so i have a thread in background, that manages the cache (gets codes from the database ⇒ ram, when neeeded)
<c-c> Bish: and the coupon code is so hot it can't wait for a process to be spawned. So much hotter than f.ex. unicorns or similar.
<Bish> no, it's just i have to start that thread somewhere, and doing it in the "get" call would mean, if i have to check if that thread is already spawned every call
<c-c> I wouldn't use threads, just an extra complexity layer
<Bish> so, the get methods manages the cache itself?
<c-c> So, its sleeping all day but gets called thousand times a second. Ok I think this is beyond my skill, bordering on paradoxical.
Rapture has joined #ruby
<Bish> why is everyone in this channel in troll mood today? if you got so much better to do, go ahead and do it
<Bish> jeebus
AJA4350 has joined #ruby
<c-c> Bish I have zero patience for antisocial comments.
qual_ has joined #ruby
cd has joined #ruby
<c-c> Bish: if ppl don't understand your question, you need to rephrase your q. Not call channel members "trolls".
* c-c thats an order
qual has quit [Ping timeout: 246 seconds]
<Bish> i did an antisocial comment?
<Bish> "that is beyond my skill"? do you mean that one?
ellcs has quit [Ping timeout: 240 seconds]
<phaul> Tuor: why don't you raise something that has the info about the error instead of using globals to store the error?
<phaul> RuntimeError can have a message raise message, just raise it, and when rescue, rescue it into a variable, then you can get your message via #message
Creatornator has joined #ruby
Onwarion_re has joined #ruby
gnufied has joined #ruby
clemens3 has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
garyserj has joined #ruby
fmccann_ has joined #ruby
Junaos_ has joined #ruby
LenPayne_ has joined #ruby
chihhsin_ has joined #ruby
wmoxam_ has joined #ruby
mkroman_ has joined #ruby
marens_ has joined #ruby
marens_ has quit [Changing host]
marens_ has joined #ruby
raddazong has joined #ruby
VladGh_ has joined #ruby
_phaul has joined #ruby
Nilium_ has joined #ruby
<_phaul> Tuor: ^
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xMopx- has joined #ruby
priodev_ has joined #ruby
Axy has quit [*.net *.split]
bga57 has quit [*.net *.split]
phaul has quit [*.net *.split]
dhollin3 has quit [*.net *.split]
lxsameer has quit [*.net *.split]
Onwarion has quit [*.net *.split]
clemens3_ has quit [*.net *.split]
fmccann has quit [*.net *.split]
VladGh has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
Eiam has quit [*.net *.split]
barg has quit [*.net *.split]
snapcase has quit [*.net *.split]
mkroman has quit [*.net *.split]
LenPayne has quit [*.net *.split]
wmoxam has quit [*.net *.split]
priodev has quit [*.net *.split]
Junaos has quit [*.net *.split]
Nilium has quit [*.net *.split]
chihhsin has quit [*.net *.split]
sirecote has quit [*.net *.split]
madhatter has quit [*.net *.split]
xMopx has quit [*.net *.split]
Koshian has quit [*.net *.split]
Davey has quit [*.net *.split]
Nilium_ is now known as Nilium
mkroman_ is now known as mkroman
priodev_ is now known as priodev
sirecote has joined #ruby
Leopere has joined #ruby
Davey has joined #ruby
Davey has quit [Changing host]
Davey has joined #ruby
_phaul is now known as phaul
Creatornator has joined #ruby
bga57 has joined #ruby
Emmanuel_Chanel has joined #ruby
dhollin3 has joined #ruby
lxsameer has joined #ruby
Koshian has joined #ruby
<Tuor> phaul: I'll read and try to understand. ;)
<Tuor> ah I understand. This would be a lot better then what I do. :) I will change it. thx!
<phaul> yw
lukelukeluke has joined #ruby
spacesuitdiver has joined #ruby
dberger has joined #ruby
<Tuor> done and some other small changes (comments most of it): https://dpaste.de/58qd
Swyper has joined #ruby
krawchyk has joined #ruby
<dberger> hm, i thought [[:word]] was unicode aware? but /[[:word]]/.match("Ἑλλάς123_456") returns nil
<dberger> whereas /\p{L}/.match("Ἑλλάς123_456") gives me a match
<al2o3-cr> dberger: never use posix shit
<dberger> lol, ok
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dberger> because it doesn't work as advertised? or it's just generally unwise? or ????
<al2o3-cr> dberger: you want to match unicode?
<dberger> yes
<al2o3-cr> use character properties.
lukelukeluke has quit [Remote host closed the connection]
<TomyWork> I have a certain HTTP server I need to deal with, that sends chunked encoding in an odd way. With chunked encoding, you have a CRLF following each chunk. Unfortunately, this server delays that CRLF until the start of the next chunk, which can be hours later. Do you think there's a ruby library that can deal with that and still timely call handlers, even though that CRLF hasn't arrived yet?
<dberger> al2o3-cr, roger roger
segy has quit [Ping timeout: 246 seconds]
<dberger> TomyWork, https://github.com/ggiamarchi/ruby-uploader perhaps?
Inline has joined #ruby
marmotini_ has quit [Ping timeout: 250 seconds]
aqd has quit [Quit: Leaving]
ellcs has joined #ruby
segy has joined #ruby
za1b1tsu has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
bnd__ has joined #ruby
Creatornator has joined #ruby
krawchyk_ has joined #ruby
polishdub has joined #ruby
krawchyk_ has quit [Client Quit]
krawchyk has quit [Ping timeout: 252 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
mangold has quit [Quit: This computer has gone to sleep]
akem has quit [Ping timeout: 272 seconds]
Nicmavr has joined #ruby
<TomyWork> dberger wrong direction :)
<TomyWork> the server sends chunks
<TomyWork> it's basically an event system
<TomyWork> every event is a chunk
bnd__ has quit [Quit: bnd__]
<Tuor> Thx for all your help today! I'll leave now. bye.
Tuor has left #ruby ["cu"]
ellcs1 has joined #ruby
rippa has joined #ruby
hightower2 has quit [Ping timeout: 252 seconds]
akem has joined #ruby
<dberger> TomyWork, dunno if this helps: https://github.com/excon/excon#chunked-requests
<dberger> another popular client lib is faraday, maybe it has something
aupadhye has quit [Ping timeout: 252 seconds]
conta has quit [Ping timeout: 246 seconds]
crankharder has quit [Ping timeout: 272 seconds]
DaRock has quit [Ping timeout: 250 seconds]
<TomyWork> dberger the thing is, to make this work with python's "requests" library, i had to write this beauty: https://gist.github.com/TomyLobo/9700b225aa4bffa283b34c1a1604ffb1
<TomyWork> and i would like to simultaneously get rid of the python (i'm really not that good at python and i prefer ruby) and get rid of that kludge, if possible
qual_ is now known as qual
clemens3 has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
jaddison has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Remote host closed the connection]
stryek has joined #ruby
crankharder has joined #ruby
orbyt_ has quit [Ping timeout: 272 seconds]
tdy has joined #ruby
xMopx- is now known as xMOpx
xMOpx is now known as xMopx
skyikot has joined #ruby
skyikot has quit [Ping timeout: 256 seconds]
crankharder has quit [Ping timeout: 252 seconds]
<Bish> if a coniditonvariable#wait times out, does i still hold the mutex lock? i guess so, right?
millerti has joined #ruby
<Bish> s/i/it
TomyWork has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
crankharder has joined #ruby
mikecmpbll has joined #ruby
shlomif2 has joined #ruby
e has joined #ruby
am0123 has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
dberger has quit [Quit: Leaving]
griffindy has quit [Read error: Connection reset by peer]
shlomif2 is now known as rindolf
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
griffindy has joined #ruby
aufi has quit [Ping timeout: 246 seconds]
saysjonathan has joined #ruby
crankharder has quit [Ping timeout: 252 seconds]
BrianWGray has joined #ruby
Brian-W-Gray has quit [Ping timeout: 250 seconds]
BrianWGray has quit [Read error: Connection reset by peer]
BrianWGray has joined #ruby
saysjonathan has quit [Ping timeout: 245 seconds]
Devalo has joined #ruby
am0123 has joined #ruby
hightower2 has joined #ruby
GreyHame has quit [Remote host closed the connection]
GreyHame has joined #ruby
Onwarion_re has quit [Quit: Leaving]
BrianWGray has quit [Read error: Connection reset by peer]
GreyHame has quit [Client Quit]
andikr has quit [Remote host closed the connection]
GreyHame has joined #ruby
BrianWGray has joined #ruby
GreyHame has quit [Client Quit]
Devalo has quit [Remote host closed the connection]
GreyHame has joined #ruby
n13z has joined #ruby
BrianWGray has quit [Read error: Connection reset by peer]
dalpo has joined #ruby
am0123 has quit [Ping timeout: 245 seconds]
BrianWGray has joined #ruby
dhollin3 is now known as dhollinger
Eiam has joined #ruby
renich has quit [Remote host closed the connection]
Ai9zO5AP has quit [Ping timeout: 252 seconds]
hello_world has joined #ruby
<hello_world> so many people here
<hello_world> hi :)
[Butch] has joined #ruby
<hello_world> not sure if I should ask a question about ROR here though
orbyt_ has joined #ruby
<hello_world> hmmm okay :)
renich has joined #ruby
i9zO5AP has joined #ruby
jcarl43 has joined #ruby
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 246 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
Zarthus is now known as TimApple
<phaul> ?rails hello_world
<ruby[bot]> hello_world: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
cthu| has joined #ruby
i9zO5AP has quit [Quit: WeeChat 2.4]
hello_world has quit [Quit: Page closed]
cthulchu_ has quit [Ping timeout: 272 seconds]
skyikot has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
shansen has joined #ruby
tau has joined #ruby
BrianWGray has quit [Ping timeout: 252 seconds]
whoami has joined #ruby
notZarthus is now known as Zarthus
whoami has quit [Client Quit]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
cthu| has quit [Ping timeout: 272 seconds]
Swyper has quit [Remote host closed the connection]
qual has quit [Quit: qual]
memofun has quit [Ping timeout: 246 seconds]
cthu| has joined #ruby
jordanm has quit [Remote host closed the connection]
catphish has joined #ruby
jordanm has joined #ruby
<catphish> i'd like to represent some integers in a base-26 alpha format, is there a trivial approach to this?
<ellcs> i just googled the answer: 46.to_s(26).tr( "0123456789abcdefghijklmnopq", "abcdefghijklmnopqrstuvwxyz" )
<catphish> ellcs: that's clever, thanks!
skyikot has quit [Ping timeout: 256 seconds]
ubuntuisloved has joined #ruby
catphish has quit [Quit: Leaving]
<ytti> i'm noting that the offset between each of those characters is identical
mikecmpbll has quit [Quit: inabit. zz.]
<ytti> which suggests alternative, more programmatic implementation
Swyper has joined #ruby
Ai9zO5AP has joined #ruby
<ytti> actually no
<ytti> otherwise something like this would have worked 46.to_s(26).each_char.map{|c|(c.ord+49).chr}.join
Swyper has quit [Remote host closed the connection]
Macrobiotic has joined #ruby
Ai9zO5AP has quit [Client Quit]
Ai9zO5AP has joined #ruby
claudiuinberlin has joined #ruby
Devalo has joined #ruby
Rapture has quit [Ping timeout: 252 seconds]
t0x has joined #ruby
gix has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.4]
Swyper has joined #ruby
Ai9zO5AP has joined #ruby
hiroaki has joined #ruby
conta has joined #ruby
gix has quit [Read error: Connection reset by peer]
gix has joined #ruby
mochiyoda has left #ruby ["Konversation terminated!"]
conta has quit [Ping timeout: 272 seconds]
laaron has quit [Remote host closed the connection]
crankharder has joined #ruby
laaron has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has quit [Ping timeout: 245 seconds]
cthu| has quit [Ping timeout: 246 seconds]
tiogrand_ has quit [Ping timeout: 246 seconds]
cthu| has joined #ruby
Xiti has quit [Quit: Xiti]
sauvin has quit [Remote host closed the connection]
ozzloy has quit [Ping timeout: 252 seconds]
ozzloy has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
Xiti has joined #ruby
am0123 has joined #ruby
orbyt_ has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has joined #ruby
tiogrand has joined #ruby
millerti has joined #ruby
ellcs has joined #ruby
Dbugger has joined #ruby
Devalo has quit [Remote host closed the connection]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Devalo has joined #ruby
xco has joined #ruby
<sagax> hi all!
<sagax> what best way to execute some external script in ruby?
<sagax> execute and get output
Devalo has quit [Ping timeout: 246 seconds]
<sagax> backtick/system/exec/sh/popen/popen2e/process.spawn
<sagax> %-|
postmodern has quit [Quit: Leaving]
segy has quit [Ping timeout: 255 seconds]
<sagax> well, i need backticks
segy has joined #ruby
hightower2 has quit [Ping timeout: 246 seconds]
Yxhuvud has quit [Remote host closed the connection]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
NoidedSuper has joined #ruby
laaron has joined #ruby
Yxhuvud has joined #ruby
<sagax> yes, backticks and system - all what i need
hiroaki has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
laaron has quit [Remote host closed the connection]
Swyper has joined #ruby
sameerynho has joined #ruby
ravenousmoose has joined #ruby
laaron has joined #ruby
s00pcan has quit [Remote host closed the connection]
agent_white has quit [Quit: bbl]
hiroaki has joined #ruby
am0123 has quit [Ping timeout: 252 seconds]
memofun has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
AJA4350 has joined #ruby
conta has joined #ruby
conta has quit [Ping timeout: 246 seconds]
tiogrand has quit [Remote host closed the connection]
tiogrand has joined #ruby
tiogrand has quit [Max SendQ exceeded]
tiogrand has joined #ruby
crankharder has joined #ruby
ur5us has joined #ruby
naught-fowl has quit [Quit: Leaving]
dar123 has joined #ruby
<dar123> where does ruby (not rails) get gem list from?
jrafanie_ has joined #ruby
jrafanie has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
jrafanie_ has quit [Ping timeout: 272 seconds]
NoidedSuper has quit [Ping timeout: 252 seconds]
SeepingN has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ravenousmoose has joined #ruby
mniip has quit [Ping timeout: 600 seconds]
stan has quit [Quit: No Ping reply in 180 seconds.]
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 246 seconds]
tiogrand has quit [Remote host closed the connection]
tiogrand has joined #ruby
am0123 has joined #ruby
tiogrand has quit [Ping timeout: 246 seconds]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
laaron has joined #ruby
yqt has joined #ruby
Madper|Unsupport has quit [Ping timeout: 272 seconds]
cnsvc has joined #ruby
Madper|Unsupport has joined #ruby
dustym has joined #ruby
Guest78365 has joined #ruby
dustym has quit [Client Quit]
Celmor has joined #ruby
Guest78365 has quit [Client Quit]
<Celmor> I'm learning ruby and rails and wondering why I don't need the curly brackets when specifying a hash in a function, e.g. Subject.where(:visible => true)
<Celmor> is it only allowed to omit them in that case where a hash is expected as a parameter?
cnsvc has quit [Ping timeout: 256 seconds]
cnsvc has joined #ruby
Caeso has joined #ruby
stan has joined #ruby
ldnunes has quit [Quit: Leaving]
yqt has quit [Ping timeout: 245 seconds]
dellavg__ has quit [Ping timeout: 250 seconds]
stan has quit [Quit: No Ping reply in 180 seconds.]
claudiuinberlin has quit [Ping timeout: 252 seconds]
stan has joined #ruby
schleppel has quit [Quit: Konversation terminated!]
mochiyoda has joined #ruby
mniip has joined #ruby
stooj has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
am0123_ has joined #ruby
dar123 has quit [Ping timeout: 250 seconds]
stooj has joined #ruby
am0123 has quit [Ping timeout: 246 seconds]
nowhere_man has joined #ruby
gfawcett has joined #ruby
xco has left #ruby [#ruby]
orbyt_ has joined #ruby
Swyper has quit [Remote host closed the connection]
mozzarella has quit [Ping timeout: 245 seconds]
skyikot has joined #ruby
gfawcett has quit [Read error: Connection reset by peer]
mochiyoda has left #ruby ["Konversation terminated!"]
xrexeon has joined #ruby
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gfawcett has joined #ruby
stooj has quit [Quit: ZNC 1.7.2 - https://znc.in]
stooj has joined #ruby
skyikot has quit [Ping timeout: 256 seconds]
Swyper has joined #ruby
reber has quit [Remote host closed the connection]
Caeso has quit [Ping timeout: 252 seconds]
ausmat has joined #ruby
<phaul> Celmor: it's probably to do with keyword arguments.
skyikot has joined #ruby
<phaul> f({:a => 1}) is the same as f(:a => 1) is the same as f(a: 1)
priodev has quit [Ping timeout: 245 seconds]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ricer2 has quit [Read error: Connection reset by peer]
spacesuitdiver has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Swyper has quit [Remote host closed the connection]
priodev has joined #ruby
Swyper has joined #ruby
laaron has quit [Remote host closed the connection]
gnufied has quit [Ping timeout: 252 seconds]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 255 seconds]
ellcs has quit [Ping timeout: 240 seconds]
laaron has joined #ruby
sameerynho has quit [Ping timeout: 252 seconds]
memofun has quit [Ping timeout: 246 seconds]
moei has joined #ruby
Dbugger has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
Swyper has quit [Remote host closed the connection]
crankharder has joined #ruby
orbyt_ has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
dar123 has joined #ruby
<Celmor> t hanks
spacesuitdiver has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
Caeso has joined #ruby
eddof13 has joined #ruby
nowhere_man has quit [Remote host closed the connection]
snapcase has joined #ruby
nowhere_man has joined #ruby
Macrobiotic has quit [Quit: Connection closed for inactivity]
polishdub has quit [Quit: leaving]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
code_zombie has joined #ruby
SeepingN has joined #ruby
Macrobiotic has joined #ruby
am0123_ has quit [Ping timeout: 245 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 272 seconds]
xrexeon has quit [Ping timeout: 240 seconds]
laaron has quit [Remote host closed the connection]
Swyper has joined #ruby
laaron has joined #ruby
dar123 has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xrexeon has joined #ruby
jrafanie has joined #ruby
Swyper has quit [Remote host closed the connection]
skyikot has quit [Quit: skyikot]
cnsvc has quit [Ping timeout: 256 seconds]
Swyper has joined #ruby
code_zombie has quit [Quit: Leaving]
tau has quit [Remote host closed the connection]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
xrexeon has quit [Remote host closed the connection]
hell0h0la has joined #ruby
Caeso has quit [Ping timeout: 252 seconds]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
markoong has joined #ruby
mozzarella has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]