za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
kapil___ has joined #ruby
nickjj_ is now known as nickjj
nfk has joined #ruby
ciro has joined #ruby
FernandoBasso has joined #ruby
tristanp has joined #ruby
tristanp has quit [Ping timeout: 256 seconds]
Dbugger has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beefjoe has joined #ruby
<FernandoBasso>
I need some insights and help debugging a cucumber + capybara + site_prism project. I get warnings like this:
<FernandoBasso>
/banners/banner_seo.rb:9: warning: already initialized constant Desktop::BannerSeo::MIN_LINKS /banners/banner_seo.rb:9: warning: previous definition of MIN_LINKS was here
<FernandoBasso>
Running with --verbose doesn't seem to imply that files are being loaded twice, and what's more, we use `require' (duh) which should prove that files are _not_ being loaded twice.
<BlackBishop>
any way I can make it do 'gem install nokogumbo -- --with-ldflags=-L#{nokogiri_ext} -l:nokogiri.so' ?
<BlackBishop>
that should work, but I have no idea where I can tell gem to overwrite the build opts
AJA4350 has joined #ruby
conta has joined #ruby
alfiemax has joined #ruby
cagomez has joined #ruby
<FernandoBasso>
livcd: All right. Saved the link to watch over the weekend. Thanks.
<FernandoBasso>
Is there a way in a project with many third-party library for one to discover who and when and how are files being loaded?
bmurt has joined #ruby
cagomez has quit [Ping timeout: 248 seconds]
BlackBishop has left #ruby ["WeeChat 2.0.1"]
Dbugger has quit [Remote host closed the connection]
Dbugger has joined #ruby
lxsameer has quit [Quit: WeeChat 2.1]
lxsameer has joined #ruby
jottr has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
krawchyk has joined #ruby
nicesignal has quit [Ping timeout: 240 seconds]
yohji has quit [Remote host closed the connection]
za1b1tsu has quit [Ping timeout: 248 seconds]
TonyTheLion has joined #ruby
<TonyTheLion>
do you guys have any idea bout how to turn off SSL verification in Jekyll?
yohji has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
<apeiros>
all I read is "How do I aim that rocket launcher towards my foot and pull the trigger?"
<TonyTheLion>
lol
<apeiros>
(no, I don't know, but it does sound like a terrible idea and you should probably instead solve the problem which causes you to ask this)
Blaguvest has quit [Quit: Leaving]
za1b1tsu has joined #ruby
<TonyTheLion>
apeiros: I'll tell you what led me to asking this, I want to build a jekyll site using a nix package on a gitlab ci. nix runs in a sandbox and doesn't allow 'side effects' of any kind. Network communications are 'side effects'. Means I cannot build my jekyll site with a nix derviation.
<TonyTheLion>
nix people say 'don't use nix for this'; ruby people say 'don't lose SSL'
Inline has joined #ruby
GodFather has quit [Remote host closed the connection]
sinclair has quit [Ping timeout: 276 seconds]
alfiemax has quit [Remote host closed the connection]
GodFather has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 260 seconds]
AJA4351 is now known as AJA4350
krawchyk has quit [Quit: krawchyk]
rippa has joined #ruby
drale2k_ has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 260 seconds]
AJA4351 is now known as AJA4350
xall has joined #ruby
xall has quit [Quit: xall]
AJA4351 has joined #ruby
white_lilies has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
gnufied has joined #ruby
krawchyk has joined #ruby
mzo has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
conta has quit [Quit: conta]
gnufied has quit [Ping timeout: 240 seconds]
Rapture has joined #ruby
reber has quit [Remote host closed the connection]
<gray_-_wolf>
hm, what do you people think about adding block support for Array#join ? Is it something worth rising on the ticket tracker?
chrisarcand has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
<havenwood>
gray_-_wolf: What would the block do?
<havenwood>
gray_-_wolf: mapping, pre-join?
<gray_-_wolf>
basically allow you to change the "glue" for join base on the conditions... Something like ['foo', 'bar', 'foobar'].join { |i| i % 2 == 0 ? ',' : "\n" } would produce "foo, bar\nfoobar"
<havenwood>
gray_-_wolf: ah
<gray_-_wolf>
I needed it some time back and I just monkey patched it to the Array at the moment but then wondered if it could be useful in stdlib
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<gray_-_wolf>
true but this one locks me to having "a, b\nc, d". the other one with `s.join` I can just pass another value into slice_each to get "a, b, c\nd"
<havenwood>
it might be faster as well to set the String capacity up front, since it's known.
<havenwood>
With larger collections, that could really matter.
cats has joined #ruby
eugenmayer has joined #ruby
<havenwood>
Maybe not worth it to get the size, depends!
<havenwood>
>> String.new capacity: 999
<havenwood>
#=> ""
<eugenmayer>
i am using classic grape right now, but i need one endpoint to be a streamed response. Found Rack::Stream but its.horribly outdated Any hints on how to do streamed responses with grape?
* havenwood
checks the docs
<gray_-_wolf>
there does not seem to be way to set capacity of existing string, but still, setting it in advance could be usuful :)
agent_white has joined #ruby
akaiiro has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
gray_-_wolf: Yeah, it keeps it from having to keep growing the size repeatedly. Worth remembering it's an option. :-)
akaiiro has joined #ruby
eugenmayer has quit [Read error: Connection reset by peer]
cats has quit [Ping timeout: 244 seconds]
eugenmayer has joined #ruby
<havenwood>
SuperLag: Take a look at: response.body
<gray_-_wolf>
thanks for the options :) I'll play a bit with benchmarking this over the weekend and if by way would still be faster I'll try proposing it on the tracker
<gray_-_wolf>
my waw*
za1b1tsu has quit [Read error: Connection reset by peer]
<havenwood>
eugenmayer: Are you trying to chunk the response, use an event stream, websockets or?
<havenwood>
eugenmayer: Or fallback from one to the next?
augcesar has joined #ruby
<eugenmayer>
havenwood: its more a long running timeout and i want to stream to progress out of to reasons: having a progress but also, avoiding read timeouts on the client
<havenwood>
eugenmayer: So it's not for transferring something, but for giving status updates over?
<havenwood>
eugenmayer: To a browser?
Puffball has joined #ruby
<eugenmayer>
havenwood: exactly, we are not talking about a binary blob.
<eugenmayer>
havenwood: no, its rather different clients, mostly a ruby httpparty client, but also curl based cli clients
<havenwood>
eugenmayer: Or it sounds like you were on a good track with streaming via chunked long polling. So many ways to do it. H2, websockets, event stream, etc. etc.
<eugenmayer>
i think that is way to highly suffisticated. Thats for now a rather simple case, 2 of those. Not really planned to go further in this
<eugenmayer>
i think a streamed grape connection would probably do it for now
<havenwood>
eugenmayer: Would plain long polling suffice?
<havenwood>
eugenmayer: yeah, that seems reasonable
nowhere_man has joined #ruby
<eugenmayer>
i would say long polling is a little too complicated for the curl cli part, picking that would mean i replace those cli calls
<havenwood>
I'm not sure it's worth doing over plain 'ole polling.
<havenwood>
But event-stream would be an option with Grape too: "text/event-stream"
<havenwood>
For this type of one-directional communication - it's an optino!
<havenwood>
eugenmayer: Folk often ignore event-stream because they have to communicate both ways.
<SuperLag>
havenwood: does response.body require an argument? In the place I got the code from (a Chef cookbook) there was --> output = JSON.parse(response.body)['data'], but I couldn't find where the "data" attribute was referring to
<havenwood>
SuperLag: The response.body isn't properly deserializing from JSON - likely because it's not valid JSON.
<havenwood>
SuperLag: p response.body
<havenwood>
SuperLag: Take a look at what the `response.body` String contains.
<havenwood>
SuperLag: It's failing at the point that you try to `JSON.parse` it.
<eugenmayer>
SuperLag: pastebin.com has been hated since years
<eugenmayer>
due to way to agressive ads and even more obscure happenings with it
<vutral|kali>
more obscure happenings?
venmx has quit [Ping timeout: 264 seconds]
<eugenmayer>
AFAIR he called for donations ( site owner ) for his ill son (cancer) for surgency and thinks like that … and it was a pure hoak and fake.. but he got the money
<vutral|kali>
ic
bak1an has joined #ruby
<havenwood>
SuperLag: We recommend gist.github.com usually.
<havenwood>
SuperLag: gitlab.com/explore/snippets or bitbucket.org/snippets would be other options backed by git.
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
siaw23 has joined #ruby
schneider has joined #ruby
<siaw23>
Hi, is there a way I can open the Array class on my machine, check all array objects and perform #freeze on them?
<havenwood>
siaw23: Yes!
<siaw23>
i mean i know how to open the Array class, i’m not sure how to assign array objects and freeez/unfreeze them
venmx has quit [Ping timeout: 264 seconds]
jp has quit [Ping timeout: 264 seconds]
AJA4350 has quit [Ping timeout: 248 seconds]
jp has joined #ruby
AJA4350 has joined #ruby
<havenwood>
siaw23: It turns out it's not such a great idea to freeze every Array in Ruby, but: require 'objspace'; ObjectSpace.each_object(Array, &:freeze)
<havenwood>
siaw23: Or you just want to freeze newly allocated Arrays? Say more about why you're doing this?
<havenwood>
JJonah: There's both a ::Sequence() method and a Sequence class. With the version you showed, it's the method. With ::new, it's a the class.
mikecmpbll has quit [Quit: inabit. zz.]
<JJonah>
havenwood: ah! is that a common pattern?
<JJonah>
is it considered good practice?
chris349 has joined #ruby
<chris349>
I install Ruby for Windows and gem install fails with an SSL error. How do I resolve this? Same command works with Linux system.
<chris349>
havenwood, I need a path to ruby.exe for a Windows program. With the WSL can I use RVM and them point a Windows app to the correct ruby install?
GodFather has quit [Ping timeout: 264 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]