bonhoeffer has quit [Remote host closed the connection]
bigblind has joined #ruby
bonhoeffer has joined #ruby
KramerC has quit [Ping timeout: 248 seconds]
schneider has quit [Ping timeout: 276 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
bigblind has quit [Ping timeout: 256 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
KramerC has joined #ruby
vondruch has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
schneider has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
devil_tux has joined #ruby
devil_tux has quit [Client Quit]
bonhoeffer has quit [Remote host closed the connection]
devil_tux has joined #ruby
bonhoeffer has joined #ruby
luminous has quit []
Burgestrand has joined #ruby
guardianx has quit []
ryzokuken has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
ryzokuken has joined #ruby
hahuang61 has joined #ruby
bonhoeffer has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
hahuang61 has quit [Ping timeout: 248 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
mtkd has joined #ruby
karapetyan has quit [Remote host closed the connection]
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
bonhoeffer has quit [Remote host closed the connection]
karapetyan has joined #ruby
bonhoeffer has joined #ruby
vikas027 has joined #ruby
<vikas027>
Hey All, Can someone pls help me why my script is not working with bundle but working otherwise https://dpaste.de/asLt Strangely, this behavior is only on Alpine not OSX
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
TomyWork has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
sidx64 has joined #ruby
bauruine has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
roshanavand has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
aupadhye has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
bigblind has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
kapil___ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bonhoeffer has quit [Remote host closed the connection]
ohcibi has quit [Quit: No Ping reply in 180 seconds.]
klaas has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
iNs has quit [Ping timeout: 260 seconds]
mlehrer_ has quit [Excess Flood]
ohcibi has joined #ruby
mlehrer has joined #ruby
klaas has joined #ruby
brodul_ has joined #ruby
Yxhvd has quit [Quit: No Ping reply in 180 seconds.]
brodul has quit [Ping timeout: 255 seconds]
jamesaxl has quit [Ping timeout: 268 seconds]
nicesignal has quit [Ping timeout: 256 seconds]
izaac has quit [Ping timeout: 240 seconds]
izaac has joined #ruby
Yxhuvud has joined #ruby
iNs has joined #ruby
nicoulaj has quit [Ping timeout: 240 seconds]
Drakevr has quit [Ping timeout: 240 seconds]
morfin has quit [Ping timeout: 240 seconds]
nicesignal has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
nicoulaj has joined #ruby
bonhoeffer has joined #ruby
morfin has joined #ruby
Drakevr has joined #ruby
devil_tux has quit [Ping timeout: 265 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
claudiuinberlin has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
jottr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
marr has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
McSoFake has joined #ruby
bonhoeffer has joined #ruby
riotjones has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
cdg has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
cdg has quit [Ping timeout: 265 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
guille-moe has joined #ruby
KeyJoo has quit [Ping timeout: 248 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has quit [Ping timeout: 252 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
cthulchu_ has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
Beams has joined #ruby
claudiuinberlin has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
sjums has quit [Quit: Connection reset by beer]
sjums has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
sjums has quit [Client Quit]
bonhoeffer has joined #ruby
sidx64 has joined #ruby
akm980 has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
schneider has quit [Ping timeout: 265 seconds]
Beams_ has joined #ruby
goatish has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
Beams has quit [Ping timeout: 256 seconds]
sjums has joined #ruby
sjums has quit [Client Quit]
bonhoeffer has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bonhoeffer has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
akm980 has quit [Quit: Page closed]
bonhoeffer has quit [Remote host closed the connection]
tomphp has joined #ruby
bonhoeffer has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
phaul has joined #ruby
bigblind has quit [Ping timeout: 256 seconds]
bonhoeffer has quit [Remote host closed the connection]
bigblind has joined #ruby
bonhoeffer has joined #ruby
marius has quit [Quit: baj]
leitz has joined #ruby
jaruga has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 276 seconds]
jaruga has left #ruby [#ruby]
bonhoeffer has joined #ruby
hahuang61 has joined #ruby
marius has joined #ruby
soniya29 has joined #ruby
<leitz>
I feel like a pariah; getting stuff done with Ruby and barely using objects I create.
bonhoeffer has quit [Remote host closed the connection]
adlerdias has joined #ruby
bonhoeffer has joined #ruby
marius has quit [Remote host closed the connection]
marius has joined #ruby
faces has joined #ruby
InfinityFye has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
Bish has quit [Quit: leaving]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
marius has quit [Quit: baj]
marius has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 260 seconds]
bonhoeffer has joined #ruby
marius has quit [Client Quit]
mtkd has joined #ruby
marius has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
sameerynho has joined #ruby
marius has quit [Client Quit]
ryzokuken has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has quit [Quit: conta]
conta has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
soniya29 has quit [Quit: Leaving]
bonhoeffer has joined #ruby
xfbs has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
schneider has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
sidx64 has joined #ruby
InfinityFye has left #ruby ["Leaving"]
bigblind has quit [Ping timeout: 260 seconds]
bigblind has joined #ruby
<tbuehlmann>
so, what's a nice way to programmatically call `foo.or(bar).or(baz)` for a an array `conditions = [foo, bar, baz]`?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
ryzokuken has joined #ruby
InfinityFye has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
tomphp has quit [Client Quit]
InfinityFye has left #ruby [#ruby]
bonhoeffer has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
<darix>
tbuehlmann: hm?
tomphp has joined #ruby
tomphp has quit [Client Quit]
bonhoeffer has quit [Remote host closed the connection]
tomphp has joined #ruby
tomphp has quit [Client Quit]
bonhoeffer has joined #ruby
ryzokuken has quit [Client Quit]
<phaul>
tbuehlmann: can you inject &:or on the array? Depends on what you need...
<tbuehlmann>
I'd like to do that, but what'd be your initial object?
claudiuinberlin has joined #ruby
<tobiasvl>
yeah, it would be [foo, bar, baz].reduce(&:or)
<phaul>
you dont need one with inject, either you start with initial object or not
<tbuehlmann>
the first element will be the initial object, AFAIR
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
<phaul>
I mean if the array is empty you can default to false or something, as in my examle
<phaul>
but it depends n your needs.
marius has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
bonhoeffer has quit [Remote host closed the connection]
sjums has joined #ruby
bonhoeffer has joined #ruby
bigblind has quit [Ping timeout: 245 seconds]
sjums has quit [Client Quit]
<tbuehlmann>
ah, I misread the documentation!
sjums has joined #ruby
cschneid has joined #ruby
<tbuehlmann>
I thought when omitting the initial object the first element is going to be the memo object, effectively calling foo.or(foo).or(bar).or(baz), but it really will be foo.or(bar).or(baz). thanks a lot
jrabe has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
12:11 tobiasvl | yeah, it would be [foo, bar, baz].reduce(&:or)
<dminuoso>
This.
<dminuoso>
Is the way to do it.
<dminuoso>
tbuehlmann: btw, want a cool notion of inject/reduce?
ReinH has quit [Quit: Connection closed for inactivity]
bonhoeffer has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
<tbuehlmann>
now tell me which one is slighty faster, [foo, bar, baz].reduce(&:or) or [foo, bar, baz].reduce(:or) :P
<dminuoso>
asm>> [foo, bar, baz].reduce(&:or)
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966671
yonahw has joined #ruby
<dminuoso>
asm>> [foo, bar, baz].reduce(:or)
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966672
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
cschneid has quit [Ping timeout: 268 seconds]
<dminuoso>
tbuehlmann: Intuition says &:or
ryzokuken has joined #ruby
marius has quit [Quit: baj]
kapil___ has quit [Quit: Connection closed for inactivity]
yonahw_ has quit [Ping timeout: 240 seconds]
<dminuoso>
tbuehlmann: this picture makes it much easier to properly utilize reduce/inject, because you can think of it as a structural transformation from a list into a calculation.
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cavallari has joined #ruby
Cavallari has quit [Client Quit]
<jrabe>
Are there any known differences in the behavior of Kernel#trap on Linux vs. FreeBSD when multiple threads are active?
bonhoeffer has quit [Remote host closed the connection]
<dminuoso>
if you had some `app = -> a, b { a << b }`, then list.inject([], &add) is a noop
<dminuoso>
which is really cool to look at
bonhoeffer has joined #ruby
Psybur has joined #ruby
marius has joined #ruby
<dminuoso>
so you can reverse a list like this
<dminuoso>
>> prep = -> a, b { p a; a.prepend b }; [1,2,3].inject([], &prep)
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has quit [Quit: conta]
tomphp has joined #ruby
tomphp has quit [Client Quit]
conta has joined #ruby
ldnunes has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
mcr1 has quit [Ping timeout: 252 seconds]
_aeris_ has quit [Ping timeout: 255 seconds]
<dminuoso>
Let's play a game. Who here can give me a gist, listing the exact semantics of the keyword "next" ?
fribmendes has joined #ruby
_aeris_ has joined #ruby
RougeR has joined #ruby
Flonk has joined #ruby
tcopeland has joined #ruby
bigblind has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
ryzokuken has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
ryzokuken has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
karapetyan has joined #ruby
Burgestrand has joined #ruby
karapetyan has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 240 seconds]
<TomyWork>
isnt there a spec?
SynSynack has quit [Quit: Не разучиться мечтать... любить...]
karapetyan has joined #ruby
DTZUZO has quit [Ping timeout: 256 seconds]
Ltem has quit [Remote host closed the connection]
Ltem has joined #ruby
bigblind has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
schneider has quit [Ping timeout: 260 seconds]
<dminuoso>
TomyWork: Hah. There's an ISO standard that no longer is relevant. But the point is just whether regular ruby users understand their language well enough.
schneider- has joined #ruby
fribmendes has quit [Quit: Zzzz...]
drewmcmillan has joined #ruby
<TomyWork>
well, i have yet to use it in non-trivial circumstances ^^
fribmendes has joined #ruby
memo1 has joined #ruby
<TomyWork>
HNNNNNG, why does Time.new accept strings as its first parameter
<TomyWork>
took me way too long to figure out why it's cutting off everything but the year
luminous has joined #ruby
luminous has quit [Client Quit]
fribmendes has quit [Client Quit]
<dminuoso>
TomyWork: So what do you think "next" does?
luminous has joined #ruby
luminous has quit [Changing host]
luminous has joined #ruby
luminous has joined #ruby
<TomyWork>
dminuoso returns a value from a block to the caller, instructing it to go to the next item
<TomyWork>
i'm pretty sure there's more involved behind the scenes, but that's how i use it
luminous has quit [Client Quit]
karapetyan has joined #ruby
luminous has joined #ruby
luminous has quit [Client Quit]
tubbo has joined #ruby
karapetyan has quit [Remote host closed the connection]
mcr1 has joined #ruby
<dminuoso>
TomyWork: Alright! So how is `next` different from `return` ?
karapetyan has joined #ruby
<dminuoso>
TomyWork: And furthermore, you dont always use `next` from inside a block.
<dminuoso>
For loops for example.
<TomyWork>
tbh i have no idea what exactly happens if you return from a block
<TomyWork>
i'd rather just not do it
<dminuoso>
asm>> for i in (1..3); puts 1; end
<TomyWork>
seems unclean, if it works
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966751
<dminuoso>
Or well, I guess it formally creates a block. TIL.
<dminuoso>
TomyWork: It absolutely works.
<dminuoso>
Just begs the question what it does.
<dminuoso>
TomyWork: And then there's break.
<dminuoso>
So now you have `break`, `next`, `return`. All three are effectively non local gotos.
joe_from_maine has joined #ruby
<TomyWork>
basically
<TomyWork>
and i'd rather avoid non-local gotos :)
<dminuoso>
TomyWork: they are the essence of imperative programming
<TomyWork>
err, how is next non-local?
schneider- has quit [Ping timeout: 265 seconds]
<dminuoso>
asm>> proc{ next }
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966758
<TomyWork>
the thing is, return crosses scopes
cdg has joined #ruby
<TomyWork>
what happens if your block is run on another thread?
<dminuoso>
TomyWork: ^- see the disassmbled bytecode? See that "jump" instruction?
<dminuoso>
Oh I guess next is a local goto _here_
<dminuoso>
but how about
<dminuoso>
asm>> p { next }
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966759
<TomyWork>
does the original function still return?
<dminuoso>
Oh well! Next is a local goto indeed.
<dminuoso>
asm>> p { break }
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966760
<dminuoso>
There we go!
<dminuoso>
break was the non local goto.
<TomyWork>
nopnop
<TomyWork>
yeah i figured break was something like a throw
<dminuoso>
TomyWork: and return is a throw too.
<TomyWork>
that's how i implemented it in my expression parser ^^
<dminuoso>
asm>> proc{ return 10 }
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966761
<dminuoso>
TomyWork: So the reason both are non local, is that they jump into preset catch tables.
<dminuoso>
TomyWork: you can observe this from the fact that if you return from a _proc_, it doesn't straight up transfer control to the caller of the proc, but into.. well this is where things get really messy.
<TomyWork>
and that is why i avoid it :)
<TomyWork>
one does not simply walk out of a procedure from a block
<dminuoso>
(the reason is that its incorrect is that the semantics of `return` are far more bizarre)
cdg has quit [Ping timeout: 260 seconds]
<TomyWork>
funny how return has the simplest description
<dminuoso>
I think out of all, "next" is best described with "transfer control to end of current block"
<TomyWork>
yet is the biggest mindfuck
<dminuoso>
TomyWork: It doesn't. It's wrong.
cdg has joined #ruby
<TomyWork>
line 10 is wrong too
<TomyWork>
you discount the condition
<dminuoso>
TomyWork: well I now know how to phrase next correctly
<dminuoso>
the correct form is very simple
<TomyWork>
yup
synthroid has quit [Remote host closed the connection]
<dminuoso>
"transfer control to end of current block"
<dminuoso>
+ stack maintainance
<dminuoso>
asm>> loop { next}
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966771
_aeris_ has quit [Remote host closed the connection]
<dminuoso>
asm>> loop { next 10; }
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/966773
<dminuoso>
so "push on stack, transfer control"
_aeris_ has joined #ruby
<TomyWork>
what stack maintenance is there to do?
<TomyWork>
oh right, dynamic language
<TomyWork>
discarding locals
<dminuoso>
no it just pushes the argument on the current stack thats all
<dminuoso>
so that it becomes the return value of the block
fribmendes has joined #ruby
Guest9062 has quit [Ping timeout: 276 seconds]
<dminuoso>
TomyWork: So how about this
ananth99 has joined #ruby
<dminuoso>
TomyWork: without running this, tell me how this would behave
synthroid has joined #ruby
<dminuoso>
def m(); yield; end; m &proc{ break }
dionysus69 has quit [Ping timeout: 260 seconds]
<dminuoso>
TomyWork: The basic notion is, that during compilation the catch table has to be known.
<dminuoso>
But from that scope there exists no catch table
eb0t- has quit [Quit: WeeChat 1.9.1]
<dminuoso>
It doesnt fit completely tohugh
mcr1 has quit [Ping timeout: 256 seconds]
<dminuoso>
>> def q; yield; end; def m; while true; q &proc{ break }; end; end; m
<ruby[bot]>
dminuoso: # => break from proc-closure (LocalJumpError) ...check link for more (https://eval.in/966775)
<TomyWork>
"def m(); yield; end" is equivalent to "def m(&block); block.call; end", right?
<dminuoso>
>> >() { proc{ break }.() }.()
<ruby[bot]>
dminuoso: # => /tmp/execpad-03c2d6e47620/source-03c2d6e47620:2: syntax error, unexpected '>' ...check link for more (https://eval.in/966776)
<dminuoso>
>> ->() { proc{ break }.() }.()
<ruby[bot]>
dminuoso: # => break from proc-closure (LocalJumpError) ...check link for more (https://eval.in/966777)
<dminuoso>
TomyWork: Usually yes.
<TomyWork>
dminuoso you got a slight lisp there
<dminuoso>
>> ->() { proc{ break }[] }[]
<ruby[bot]>
dminuoso: # => break from proc-closure (LocalJumpError) ...check link for more (https://eval.in/966779)
<dminuoso>
if you prefer
eb0t has quit [Quit: WeeChat 1.9.1]
<dminuoso>
>> def m; break; end
<ruby[bot]>
dminuoso: # => /tmp/execpad-9136ce6ca1f1/source-9136ce6ca1f1: /tmp/execpad-9136ce6ca1f1/source-9136ce6ca1f1:2: Inva ...check link for more (https://eval.in/966780)
<dminuoso>
>> define_method(:m, &proc{ break }); m
<ananth99>
I have no idea as to why the image seems to be damaged after it's downloaded. Any pointers on this would be really helpful! TIA
<dminuoso>
>> proc{ break }[]
<dminuoso>
TomyWork: No matter how hard I try, I cant find any satisfactory explanation for all of this.
<TomyWork>
ananth99 next time, please pastebin your code
<dminuoso>
Apart from "Lots of if/else" spaghetti in the YARV compiler.
<TomyWork>
especially if you markdown it ^^
<ananth99>
TomyWork Duly noted. :)
<TomyWork>
ananth99 what happens if you curl/wget the file
zanoni has left #ruby [#ruby]
<dminuoso>
arahael: What is your `open` here?
<dminuoso>
Is that supposed to be Kernel#open?
<ananth99>
TomyWork I tried saving the file from chrome as well. Same issue persists.
<TomyWork>
ananth99 so it's not a ruby problem?
<ananth99>
open is from OpenURI
jcalla has joined #ruby
<ananth99>
TomyWork trying to figure that out. I mean can this issue be fixed by fetching the photo in a different way?
<ananth99>
I'll try cURL and post here
<Burgestrand>
ananth99 Your image is a WebP, not jpg
<dminuoso>
Burgestrand: You! You're the guilty one.
<dminuoso>
You are the reason my simple view on return/break/next is kaputt.
<Burgestrand>
:)
<dminuoso>
You broke it without repairing it.
<Burgestrand>
ananth99 If you open your URL in e.g. Safari you'll also see a broken image, because Safari no like webp
<ananth99>
How did you figure out that it was a WebP
<Mon_Ouie>
What did your vision expect Thread.new { break 5 } to do?
<Burgestrand>
ananth99 I downloaded it and ran `file` on it: data: RIFF (little-endian) data, Web/P image, VP8 encoding, 1900x919, Scaling: [none]x[none], YUV color, decoders should clamp
ldepandis has joined #ruby
<Burgestrand>
Mon_Ouie it's nice to see an old familiar name in here, I'm glad you're still around :)
<Mon_Ouie>
Nice to see you too :)
alex`` has joined #ruby
Papierkorb has joined #ruby
n0m4d1c has joined #ruby
schneider- has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
lightstalker has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<ananth99>
Burgestrand thanks for the tip. :)
tubbo has quit [Ping timeout: 240 seconds]
<Burgestrand>
ananth99 yw :) managed to fix it?
<ananth99>
Burgestrand: Yes. We just went around using the "identify" cmd that imagemagick provides. Didn't know "file" cmd could do it. Very sweet ~!
riotjoe has quit [Remote host closed the connection]
bmurt has joined #ruby
riotjones has joined #ruby
lightstalker has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
<Burgestrand>
ananth99 Nice :)
memo1 has quit [Ping timeout: 256 seconds]
Cthulu201 has joined #ruby
tubbo has joined #ruby
k0mpa has joined #ruby
gheegh has joined #ruby
hahuang61 has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
terens has quit [Quit: Leaving]
DLSteve has joined #ruby
mtkd has joined #ruby
goatish has quit [Quit: Hibernating]
hahuang61 has quit [Ping timeout: 252 seconds]
griffindy has joined #ruby
Ltem has quit [Quit: bbl]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
griffindy has quit [Ping timeout: 245 seconds]
n0m4d1c has quit [Remote host closed the connection]
alex`` has quit [Ping timeout: 256 seconds]
nickjj_ has joined #ruby
jottr_ has joined #ruby
synthroi_ has joined #ruby
mozzarel1 has joined #ruby
hr3f has joined #ruby
universal has joined #ruby
eb0t has joined #ruby
craysiii_ has joined #ruby
eblip has joined #ruby
kspencer_ has joined #ruby
brodul_ has joined #ruby
mbr__ has joined #ruby
Phate has joined #ruby
mniip has quit [Quit: This page is intentionally left blank.]
McSoFake_ has joined #ruby
craysiii has quit [Ping timeout: 276 seconds]
kspencer has quit [Ping timeout: 276 seconds]
byte512 has quit [Ping timeout: 276 seconds]
universa1 has quit [Ping timeout: 276 seconds]
phate408 has quit [Read error: Connection reset by peer]
href has quit [Read error: Connection reset by peer]
McSoFake has quit [Remote host closed the connection]
nicoulaj has quit [Read error: Connection reset by peer]
brodul has quit [Ping timeout: 276 seconds]
synthroid has quit [Read error: Connection reset by peer]
n13z has quit [Ping timeout: 276 seconds]
mozzarella has quit [Ping timeout: 276 seconds]
saksida has quit [Ping timeout: 276 seconds]
mbr has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 276 seconds]
c0ncealed has quit [Ping timeout: 276 seconds]
nickjj has quit [Ping timeout: 276 seconds]
joast has quit [Ping timeout: 276 seconds]
balo has quit [Ping timeout: 276 seconds]
kspencer_ is now known as kspencer
brodul_ is now known as brodul
hr3f is now known as href
craysiii_ is now known as craysiii
Papierko- has joined #ruby
mozzarel1 is now known as mozzarella
mniip has joined #ruby
balo has joined #ruby
byte512 has joined #ruby
n13z has joined #ruby
c0ncealed has joined #ruby
Mia has quit [Read error: Connection reset by peer]
nicoulaj has joined #ruby
saksida has joined #ruby
psmolen has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
tubbo has quit [Ping timeout: 252 seconds]
n0m4d1c has joined #ruby
iNs has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
nowhere_man has joined #ruby
fribmendes has quit [Quit: Zzzz...]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
shoogz has quit [Read error: Connection reset by peer]
oleo has joined #ruby
karapetyan has quit [Remote host closed the connection]
psmolen has joined #ruby
iNs has joined #ruby
karapetyan has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
bigblind has quit [Ping timeout: 265 seconds]
karapetyan has quit [Remote host closed the connection]
synthroi_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
synthroid has joined #ruby
guille-moe has quit [Ping timeout: 256 seconds]
guille-moe has joined #ruby
kapil___ has joined #ruby
nickjj_ is now known as nickjj
fribmendes has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
nowhereman_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
Rapture has joined #ruby
karapetyan has joined #ruby
haxx0r has joined #ruby
<haxx0r>
can i post rails related question?
<dminuoso>
?rails haxx0r
<ruby[bot]>
haxx0r: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<kspencer>
why not use #rubyonrails
sagax has joined #ruby
haxx0r has left #ruby [#ruby]
aScottishBoat has joined #ruby
nowhereman_ has quit [Ping timeout: 260 seconds]
pastorinni has joined #ruby
tubbo has joined #ruby
nowhereman_ has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
milardovich has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
bonhoeffer has joined #ruby
tubbo has quit [Ping timeout: 252 seconds]
tubbo has joined #ruby
DTZUZO has joined #ruby
netherwolfe has joined #ruby
cschneid has joined #ruby
nielsk has quit [Quit: So Long, and Thanks for All the Fish]
joast has joined #ruby
nielsk has joined #ruby
nielsk has quit [Remote host closed the connection]
nielsk has joined #ruby
nielsk has quit [Remote host closed the connection]
ldnunes has quit [Read error: Connection reset by peer]
nielsk has joined #ruby
ldnunes has joined #ruby
momomo has joined #ruby
<momomo>
is there a deep_merge that actuall works ?
<momomo>
but I am getting a startup error saying the method include is private
<momomo>
on Hash
suhdood has joined #ruby
<momomo>
config.rb:210:in `initialize': private method `include' called for GeneralHelpers::Hash:Class (NoMethodError)
clemens3 has quit [Quit: upgrading vbox..]
inerthia has quit [Ping timeout: 240 seconds]
marxarelli|afk is now known as marxarelli
k0mpa has quit [Read error: Connection reset by peer]
jnollette has quit [Read error: Connection reset by peer]
_aeris_ has quit [Read error: Connection reset by peer]
aguestuser has quit [Write error: Connection reset by peer]
_aeris_ has joined #ruby
aguestuser has joined #ruby
schneider- has quit [Ping timeout: 256 seconds]
inerthia has joined #ruby
inerthia has joined #ruby
inerthia has quit [Changing host]
<Mon_Ouie>
Use `class Hash; include CoreExtensions::Hash; end' (include is private so it cannot be called with an explicit receiver)
schneider- has joined #ruby
<momomo>
Mon_Ouie: I am guessing that would be the same as just copy and paste that method into the class here ... i get no error but the method is still not available on other {} objects
<momomo>
doing just class Hash; def recursive_merge() ... ; is not enough
<momomo>
right after, config.rb:212:in `initialize': undefined method `merge_recursive' for {}:Hash (NoMethodError)
<Mon_Ouie>
When do you load the file in which you defined merge_recursive?
vutral|kali has quit [Ping timeout: 260 seconds]
<Mon_Ouie>
Also you recursive_merge != merge_recursive
jnollette has joined #ruby
<momomo>
The hastebin are all in the same file .. pasted in a config.rb which seems to run when I start middleman ..
schneider- has quit [Ping timeout: 268 seconds]
<Mon_Ouie>
The file you pasted runs just fine in Ruby
amatas has quit [Quit: amatas]
amatas has joined #ruby
synthroid has quit [Remote host closed the connection]
<momomo>
Does it matter if it is part of another file ... or does it have to be in a file of its own ?
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
adlerdias has quit [Quit: adlerdias]
adlerdias has joined #ruby
<Mon_Ouie>
It doesn't. One thing that may matter is if Hash does not refer to ::Hash but some other Hash class defined in a module. Does using 'class ::Hash' behave the same way?
conta has quit [Ping timeout: 268 seconds]
clemens3 has joined #ruby
cthulchu_ has quit [Ping timeout: 276 seconds]
Burgestrand has quit [Quit: Closing time!]
amatas has quit [Client Quit]
amatas has joined #ruby
starseed0000 has joined #ruby
adlerdias has quit [Client Quit]
adlerdias has joined #ruby
Serpent7776 has quit [Quit: Leaving]
memo1 has joined #ruby
cdg has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
cdg has joined #ruby
netherwolfe_ has joined #ruby
jnollette has quit [Remote host closed the connection]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnollette has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
synthroid has joined #ruby
amelliaa has joined #ruby
dviola has joined #ruby
netherwolfe has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
heftig has quit [Read error: Connection reset by peer]
vutral|kali has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
heftig has joined #ruby
hahuang61 has quit [Ping timeout: 256 seconds]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
aScottishBoat has joined #ruby
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
<momomo>
is there a deepmerge that can merge and take a lambda ?
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
Papierko- has left #ruby ["Konversation terminated!"]
<apeiros>
momomo: you can write one rather trivially
<apeiros>
blocks can accept blocks ever since ruby 1.9 iirc
<momomo>
apeiros: i am a stranger to ruby .. so difficult right now ... i found some incomplete examples .. here is one :
<warrshrike_>
TheMoonMaster: anything wrong with camel casing? :/
<apeiros>
progress. now the full exception.
<warrshrike_>
RubymineProjects/HelperBot/user.rb:29:in `insertUser': undefined method `<<' for false:FalseClass (NoMethodError) from /mnt/c/Users/ali_a/RubymineProjects/HelperBot/user.rb:72:in `<top (required)>' from -e:1:in `load' from -e:1:in `<main>'
kapil___ has quit [Quit: Connection closed for inactivity]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
warrshrike_: you probably should take a look at that yaml file
mcr1 has joined #ruby
<apeiros>
so yes, @users is a boolean. real code matters.
orbyt_ has joined #ruby
<warrshrike_>
there is no yml file...yet
<warrshrike_>
oh.
X-Jester is now known as X-Jester_
<apeiros>
also think about `bb.insertUser User.new 11, true`
<apeiros>
is true an argument for insertUser or for new? why? and how should ruby decide?
Xiti has quit [Quit: Xiti]
<warrshrike_>
okay yeah i need parenthesis
X-Jester_ is now known as X-Jester
<warrshrike_>
imo. ruby stresses a lot on no parens so its easy to go overboard
daveomcd has joined #ruby
<warrshrike_>
also ruby's runtime errors can be a ticking time bomb for some like me who is unable to do TDD
<daveomcd>
I'm getting the following error, I use rvm but from what I can tell my certs are up to date... anyone know some commands that I could use to verify that and even correct?: Faraday::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
tubbo has quit [Quit: WeeChat 2.0.1]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams_ has quit [Quit: .]
gheegh has joined #ruby
amelliaa has quit [Quit: -]
clemens3 has joined #ruby
dionysus69 has joined #ruby
<morfin>
SSLv3?
tubbo has joined #ruby
<daveomcd>
or perhaps the error isn't as much about my system but saying the destination's certificate is failing?
lytol has joined #ruby
jerikl has joined #ruby
starseed0000 has quit [Ping timeout: 260 seconds]
anisha has joined #ruby
\void has joined #ruby
Xiti has joined #ruby
starseed0000 has joined #ruby
<dostoyevsky>
> undefined method `type_suffix' for #<struct :"CommonTree type_suffix"=nil> (NoMethodError)
rstandy has joined #ruby
<dostoyevsky>
I wonder what kind of struct data type antlr is using here
<apeiros>
looks like a normal Struct
<rstandy>
hello, is there a way to silence ruby deprecation warnings for a specific command line program?
sameerynho has joined #ruby
<apeiros>
though the name looks funny
<apeiros>
oh lol, it's not the name. it's the struct member.
hahuang61 has quit [Ping timeout: 260 seconds]
<apeiros>
dostoyevsky: the struct member's name is "CommonTree :type_suffix", not just type_suffix
jnollette has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<apeiros>
ule: you want to print the keys, not the values.
<apeiros>
also you want breadth first, not depth. so before recurring, you should print all keys first.
claudiuinberlin has joined #ruby
karapetyan has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 260 seconds]
warrshrike_ has quit [Quit: Page closed]
orbyt_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Ping timeout: 240 seconds]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
logoscoder has joined #ruby
<ule>
apeiros: ok
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamiejackson has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<ule>
apeiros: at the first iteration it gives me A as key and the rest as value right
<ule>
so, I guess after getting this A, I should imidialy start recursivelly looking at each key inside value
<ule>
thats why I thought to call the recursion passing(v)
<ule>
:/
<apeiros>
recursion is the right approach, yes
<apeiros>
but since you have breadth first, you need two iterations. the first iteration is to print the current level. the second iteration is to recurse
nowhereman_ has joined #ruby
<ule>
yes, thats what I have there.. h.each (first iteration), and recursion inside that
<apeiros>
no, that's not what you have there. you have a single iteration which recurs. that gives you depth-first
cdg has joined #ruby
<ule>
so if I understood well, I need v.each as well
<ule>
let me try
herbmillerjr has quit [Excess Flood]
herbmillerjr has joined #ruby
tubbo has quit [Ping timeout: 255 seconds]
suukim has quit [Quit: Konversation terminated!]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
drewmcmillan has joined #ruby
milardov_ has quit [Remote host closed the connection]
hahuang61 has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<ule>
A -> B
<ule>
A -> F
<ule>
apeiros: I guess now its time to call the recursion right?
<dminuoso>
As you can see in this example, Im passing just a single argument.
mcr1 has quit [Ping timeout: 256 seconds]
meinside has quit [Quit: Connection closed for inactivity]
govg has quit [Ping timeout: 276 seconds]
stairmast0r has quit [Changing host]
stairmast0r has joined #ruby
<ule>
When using a recursive logic, how can I return the value instead of using "puts" in the middle of the method?
gheegh has joined #ruby
<ule>
if I add an acumulator like foo << x, or foo += x it doesn't work because I need to declare foo = '' when I start the method
Zaab1t has quit [Quit: Zaab1t]
bmurt has joined #ruby
bmurt has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
<dminuoso>
ule: Depends. If you are using a lambda you can just use "return", inside a block/proc you have to use "next" instead.
<dminuoso>
ule: Inside a proc/block "next" semantically means return in the way you would expect it.
suhdood has quit [Read error: Connection reset by peer]
<dminuoso>
ule: Personally I dont like to think of it as an "accumulator" either, because it kind of destroys the notion of what reduce/inject is algebraically.
<dminuoso>
that argument you pass into inject is because you have this asymmetric thing for the first argument. if you dont supply an argument, then the whole thing is shifted by one
<dminuoso>
ule: This gives rise to some powerful ideas
<dminuoso>
such as
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<dminuoso>
>> prepend = -> e, a { a.unshift e }; [1,2,3,4,5].reduce([], &prepend)
<ruby[bot]>
dminuoso: # => undefined method `unshift' for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/967052)
<dminuoso>
>> prepend = -> a, e { a.unshift e }; [1,2,3,4,5].reduce([], &prepend)