jokke

Activity Graph

Page 1 of 23 | Next »

2019-03-29

[01:10:52] jokke: Quit: WeeChat 2.3

2019-03-25

[16:53:04] jokke: has joined #ruby
[16:53:09] jokke: hey there o/
[16:53:38] jokke: i'm trying to set the temp dir to be used for Tempfiles under ruby 2.4.2
[16:53:47] jokke: it seems that Dir.tmpfile doesn't yet exist
[16:54:02] jokke: and setting the TMPDIR env var doesn't have any effect
[16:55:58] jokke: ah never mind
[16:56:03] jokke: i had to require 'tempfile'

2019-01-03

[23:29:56] jokke: Read error: Connection reset by peer

2018-12-12

[03:26:47] jokke: Ping timeout: 272 seconds
[04:00:52] jokke: has joined #ruby

2018-11-19

[22:40:05] jokke: Ping timeout: 268 seconds

2018-11-07

[08:21:27] jokke: Ping timeout: 252 seconds
[08:33:54] jokke: has joined #ruby

2018-10-30

[23:01:14] jokke: Ping timeout: 272 seconds
[23:02:59] jokke: has joined #ruby

2018-10-29

[14:48:24] jokke: hi! i'm using anyenv with rbenv on my system and i have a gem that i want to uninstall. This gem provides an executable that is put into rbenv/shims by rbenv. uninstalling it wont' work though. the gem command just doesn't do anything and the gem is still there (and so is the shim also after rehashing)
[14:48:46] jokke: i also tried this: for version in $(rbenv versions | cut -c3- | awk '{print $1}'); do rbenv shell $version; rbenv exec gem uninstall fogtrack; done
[14:49:08] jokke: didn't help either
[14:52:57] jokke: rbenv whence fogtrack tells me 2.3.1
[14:53:40] jokke: oh now it worked...
[14:54:17] jokke: well, case closed. Thanks! :)

2018-09-11

[07:42:39] jokke: Ping timeout: 268 seconds
[08:08:58] jokke: has joined #ruby

2018-06-27

[09:09:11] jokke: Ping timeout: 256 seconds

2018-06-09

[18:04:14] jokke: Ping timeout: 245 seconds

2018-06-04

[09:14:47] jokke: has joined #RubyOnRails
[09:16:04] jokke: hey, i'm supposed to maintain this old rails app and recently it was put behind https. now there's a mailer which sends out a link using polymorphic_url. the resulting url has http scheme but port 443.. any idea what might be going on?
[09:16:40] jokke: this is the call: <%= polymorphic_url([:confirm, @application], token: @application.token) %>
[09:25:39] jokke: config.action_mailer.default_url_options ?
[09:25:59] jokke: do i have to specify host?
[09:26:20] jokke: as in, is it merged with the action_controller default_url_options/
[09:27:12] jokke: the host has been correct thus far
[09:30:46] jokke: i will. thanks a lot!
[09:31:22] jokke: good point

2018-05-27

[15:00:01] jokke: Quit: WeeChat 2.1

2018-05-10

[22:50:59] jokke: Ping timeout: 260 seconds
[22:51:26] jokke: has joined #RubyOnRails

2018-05-07

[14:20:33] jokke: has joined #RubyOnRails
[14:21:23] jokke: according to EU law you now need to inform your users that you're using cookies on a site. Are there any easy methods for opt-in session usage for rails?
[14:22:37] jokke: as in: only use a session cookie if the user has confirmed that it's okay to do so via an ajax request to some route or sth
[14:23:53] jokke: well all sites i've seen have a button you'll have to click to "dismiss" the banner
[14:24:04] jokke: and until you do, no cookies are set
[14:47:29] jokke: yeah you're right
[14:47:32] jokke: just checked

2018-04-22

[14:04:33] jokke: Quit: WeeChat 2.1

2018-04-16

[13:18:06] jokke: had the same experience
[13:18:21] jokke: i like the concept, but it turned out not to work in practice
[13:19:27] jokke: not only ruby

2018-04-12

[14:51:08] jokke: has joined #RubyOnRails
[14:51:35] jokke: how do i enforce trailing slashes on every path generated by path helpers?
[14:51:42] jokke: in rails 5
[14:52:02] jokke: config.action_controller.default_url_options = { :trailing_slash => true } doesn't seem to work
[14:55:26] jokke: hm yeah that's one part of it
[14:55:44] jokke: but i wouldn't want each and every link i generate to result in a permanent redirect
[14:56:12] jokke: i just have to read the whole thing :P
[14:57:26] jokke: but this looks like would have to add trailing_slash: true to each and every call of a path helper...
[15:02:01] jokke: pwnd_nsfw: you mean monkeypatching the helpers?
[15:02:13] jokke: i wouldn't see that as beauty
[15:02:25] jokke: (don't get me wrong, i love ruby)
[15:02:53] jokke: thanks for the gem tip
[15:03:27] jokke: i still don't see how this would affect any rails helpers
[15:03:30] jokke: it's a rack gem
[15:18:44] jokke: pwnd_nsfw: yeah i'm gonna do the redirecting on nginx level but i still have to generate correct links

2018-04-06

[15:22:48] jokke: has joined #ruby
[15:23:03] jokke: any ideas how to reduce the cyclomatic complexity for this? https://p.jokke.space/799/
[15:24:27] jokke: yeah. i'll try it out first
[15:27:41] jokke: https://p.jokke.space/Up2BM/
[15:42:24] jokke: but that would give me sth like [60, nil]
[15:42:42] jokke: so it'd be find { ... }.last or so
[15:42:46] jokke: which i don't like
[15:59:46] jokke: havenwood: ummm
[15:59:56] jokke: havenwood: how do you mean?
[16:00:14] jokke: 31_536_000 would be a year
[16:00:26] jokke: 60 * 60 * 24 * 365

2018-04-04

[09:09:39] jokke: Quit: WeeChat 2.0.1

2018-03-01

[08:04:26] jokke: Ping timeout: 276 seconds
[08:05:47] jokke: has joined #RubyOnRails
[08:05:49] jokke: has joined #ruby

2018-02-27

[18:29:04] jokke: hi! i have a rails 4 project and want to use respond_to / respond_with. I need to customize the rendering for json though. Here's what i've tried: https://p.jokke.space/hmP6/
[18:29:24] jokke: this doesn't however affect the output of the json format at all

2018-02-20

[12:10:32] jokke: Ping timeout: 276 seconds
[12:16:07] jokke: has joined #RubyOnRails
[12:16:09] jokke: has joined #ruby
[12:31:18] jokke: Ping timeout: 240 seconds
[12:47:35] jokke: has joined #RubyOnRails
[12:47:37] jokke: has joined #ruby

2018-02-07

[10:27:58] jokke: has joined #ruby
[10:28:22] jokke: is it possible to do lookups on a set/hash just with the hash of a contained element?
[10:30:47] jokke: i'm trying to figure out how to implement an array, which dedups the elements. i need to be able to access the elements by index so set is not an option because << with an existing element does nothing
[10:31:58] jokke: references it once
[10:32:05] jokke: well that's not a problem
[10:32:22] jokke: references arent' big
[10:32:26] jokke: the data is
[10:33:00] jokke: no you're absolutely right
[10:33:04] jokke: of course
[10:35:59] jokke: alright, so lets say i have a data structure that implement #hash, how would i keep track of all existing elements and if i were to create an equal element, how would i get the reference of the element i created before
[10:40:04] jokke: that sounds about right
[10:41:29] jokke: dminuoso:no i can't
[10:41:52] jokke: because i will need to add it to an array
[10:42:05] jokke: so something like objects = (foo[bar] ||= bar)
[10:42:14] jokke: objects <<
[10:42:29] jokke: so i can access it by index
[10:43:17] jokke: apeiros: i don't follow. I looked at the docs, but i don't see the connection
[10:45:02] jokke: well i don't know if there's something wrong with ruby per-se
[10:45:19] jokke: it's easy enough to implement a DeduppedArray based on what we discussed
[14:06:44] jokke: apeiros: yeah i did it like this: https://p.jokke.space/xzL/
[14:06:58] jokke: not sure why i write dedup with double p :D
[14:07:15] jokke: ignore the Vertex class
[14:07:36] jokke: apeiros: yeah
[14:08:04] jokke: apeiros: but it's for parsing close to millions of lines of highly duplicated data
[14:10:29] jokke: hash defines the bucket
[14:10:33] jokke: not equality
[15:23:09] jokke: apeiros: https://p.jokke.space/2pJAt9/
[15:24:33] jokke: it won't be
[15:24:58] jokke: can i assign constants in methods?
[15:25:24] jokke: FOO ||= 'bar' won't really work, will it :P
[15:28:38] jokke: can i somehow auto-freeze every object that's being initialized of a class that implements Dedupable
[22:32:11] jokke: Ping timeout: 256 seconds
[22:33:02] jokke: has joined #ruby

2018-01-22

[15:03:06] jokke: Quit: WeeChat 2.0.1

2018-01-20

[23:00:53] jokke: Ping timeout: 246 seconds
[23:03:03] jokke: has joined #ruby

2018-01-08

[13:50:43] jokke: Quit: WeeChat 2.0.1
[14:09:41] jokke: has joined #ruby

2018-01-04

[08:56:46] jokke: Quit: WeeChat 2.0.1
[08:59:26] jokke: has joined #ruby
[14:49:53] jokke: Ping timeout: 252 seconds
[15:03:26] jokke: has joined #ruby

2018-01-03

[17:01:50] jokke: Quit: WeeChat 1.9
[17:16:06] jokke: has joined #ruby
[21:52:04] jokke: i'm having some trouble with Array#|
[21:52:56] jokke: i have an array with some objects. i've implemented hash and eql? in the class for this object
[21:53:30] jokke: if i now try to make a union of two arrays i always get duplicates
[21:53:44] jokke: even though the hashes are equal
[21:54:13] jokke: for some reason #eql? returns false
[21:54:20] jokke: axsuul: i use yard
[21:54:26] jokke: i think most do
[21:55:00] jokke: https://gist.github.com/d79d46018632ab8b931f1e8e0925dd70
[21:55:12] jokke: these are the methods
[21:59:32] jokke: https://gist.github.com/0ea9f402f7daa028660c8812b57eb774
[21:59:42] jokke: why the hell is it not overridden?
[21:59:50] jokke: the hash method is
[21:59:55] jokke: but not eql?

2018-01-02

[22:09:22] jokke: Ping timeout: 264 seconds
[22:09:57] jokke: has joined #ruby
[22:10:03] jokke: has joined #RubyOnRails

2017-12-14

[13:42:12] jokke: has joined #RubyOnRails
[13:42:27] jokke: is it possible to have multiple names for a single route?
[13:42:38] jokke: (the root)
[13:43:01] jokke: something like as: [:root, :homepage]
[13:43:19] jokke: same route
[13:43:26] jokke: just multiple names
[13:43:45] jokke: in my case it would provide root_url and homepage_url methods for example
[14:04:11] jokke: pwnd_nsfw: yup worked like a charm

2017-12-07

[14:48:15] jokke: *.net *.split
[14:54:20] jokke: has joined #ruby
[21:43:03] jokke: *.net *.split
[21:48:17] jokke: has joined #ruby
[22:36:59] jokke: *.net *.split
[22:42:08] jokke: has joined #ruby

2017-12-01

[02:28:56] jokke: has joined #ruby
[10:11:31] jokke: Quit: WeeChat 1.9
[10:12:34] jokke: has joined #ruby
[10:19:14] jokke: Quit: WeeChat 1.9
[10:19:50] jokke: has joined #ruby

2017-11-23

[09:58:17] jokke: i have something in my codebase which causes my tests to block indefinately
[09:59:01] jokke: it's before the actual test is run and after the test setup
[09:59:25] jokke: is there a easy way to find the actual code responsible for the blocking?
[10:12:21] jokke: anyone? :/
[10:13:30] jokke: yes i did that
[10:13:37] jokke: but as soon as it's blocking it's too late
[10:15:33] jokke: you mean pry?
[10:18:11] jokke: hmm it's only vendor code: https://gist.github.com/3f6ba2314330686496890fbbcbcf2624
[10:20:31] jokke: couldn't i just trap interrupt?
[10:25:04] jokke: it just launches the test apparently
[10:25:05] jokke: from rake
[10:25:27] jokke: this is the command line: /home/jokke/.anyenv/envs/rbenv/versions/2.4.2/bin/ruby -Ilib:test -I/home/jokke/code/meso/energybox/bridge/vendor/bundle/gems/rake-12.1.0/lib /home/jokke/code/meso/energybox/bridge/vendor/bundle/gems/rake-12.1.0/lib/rake/rake_test_loader.rb test/acceptance/protocols/databox/stream_data_message/request_forwarding_2_test.rb
[10:30:22] jokke: Bish: awesome!
[10:30:24] jokke: https://gist.github.com/ba532f80888a550de424e020a24a004a
[10:52:15] jokke: well i guess it's just that the mongodb connection is blocking
[10:52:31] jokke: or retrying indefinetly
[11:06:29] jokke: yeah i don't know about that. :P now it's even harder to find the error

2017-11-15

[12:46:40] jokke: hi, anyone here using "rr"? I'm having trouble with doubles bleeding into other tests...

2017-11-10

[15:52:53] jokke: what stubbing lib would you recommend for minitest. i need something like rspec's instance_double(...) and allow(foo).to receive(...)
[15:53:21] jokke: i tried Spy but i hate the interface
[15:54:28] jokke: dminuoso: i need to be able to check if the method has been called
[15:54:39] jokke: and if so with what args
[15:55:02] jokke: i'm unit testing something that reads from and writes to sockets
[15:55:13] jokke: so i'm stubbing out the socket
[15:57:32] jokke: what do you mean
[16:02:10] jokke: another thing: what happens with stderr in IO.popen?
[16:02:40] jokke: i thought it would be forwarded to STDERR but seems like it goes nowhere
[18:10:57] jokke: i'll just ask again
[18:11:07] jokke: what stubbing lib would you recommend for minitest. i need something like rspec's instance_double(...) and allow(foo).to receive(...)
[18:14:18] jokke: baweaver: lucky you
[18:14:24] jokke: minitest is pita
[18:22:13] jokke: Sparky2: there's a style guide though

2017-11-08

[09:43:34] jokke: *.net *.split
[09:49:06] jokke: has joined #ruby

2017-11-07

[22:55:40] jokke: what would you recommend as fast non-cryptographic hashing algorithm in ruby?
[22:58:31] jokke: i want to maintain a cache
[22:58:39] jokke: see if files have changed
[23:00:17] jokke: for me it is, even with md5
[23:00:52] jokke: good point
[23:00:59] jokke: i will have to check that
[23:02:48] jokke: no it's something completely different ;)