al2o3-cr

Activity Graph

Page 1 of 64 | Next »

2019-06-16

[03:04:07] al2o3-cr: Ping timeout: 246 seconds
[04:36:40] al2o3-cr: has joined #ruby-offtopic
[04:36:40] al2o3-cr: has joined #ruby
[12:55:12] al2o3-cr: sagax: Hash#slice

2019-06-15

[22:33:43] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[22:40:55] al2o3-cr: has joined #ruby-offtopic
[22:40:55] al2o3-cr: has joined #ruby

2019-06-14

[07:37:01] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[07:45:30] al2o3-cr: has joined #ruby-offtopic
[07:45:30] al2o3-cr: has joined #ruby

2019-06-10

[01:58:33] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[02:04:47] al2o3-cr: has joined #ruby
[05:08:21] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[05:12:24] al2o3-cr: has joined #ruby
[07:36:00] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[08:08:07] al2o3-cr: has joined #ruby
[12:01:29] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[15:21:33] al2o3-cr: has joined #ruby

2019-06-09

[05:14:49] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[05:20:09] al2o3-cr: has joined #ruby
[20:22:46] al2o3-cr: hash.keys.sample

2019-06-05

[15:47:10] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[15:58:21] al2o3-cr: has joined #ruby

2019-06-04

[20:22:47] al2o3-cr: has joined #ruby

2019-06-03

[18:56:22] al2o3-cr: Ping timeout: 246 seconds

2019-06-02

[00:18:34] al2o3-cr: Ping timeout: 246 seconds
[00:19:52] al2o3-cr: has joined #ruby
[00:19:56] al2o3-cr: has joined #ruby-offtopic
[02:23:52] al2o3-cr: Ping timeout: 246 seconds
[02:25:03] al2o3-cr: has joined #ruby
[02:25:05] al2o3-cr: has joined #ruby-offtopic
[02:30:10] al2o3-cr: Ping timeout: 246 seconds
[02:33:54] al2o3-cr: has joined #ruby
[02:33:56] al2o3-cr: has joined #ruby-offtopic
[13:43:51] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[13:49:33] al2o3-cr: has joined #ruby-offtopic
[13:49:33] al2o3-cr: has joined #ruby

2019-06-01

[00:37:55] al2o3-cr: Ping timeout: 246 seconds
[00:39:12] al2o3-cr: has joined #ruby
[00:39:16] al2o3-cr: has joined #ruby-offtopic

2019-05-31

[01:15:15] al2o3-cr: comet23: blocks are just closures
[01:18:38] al2o3-cr: say lua e.g: function foo(n) return function() n * 2 end
[01:20:17] al2o3-cr: say lua e.g: function foo(n) return function() return * 2 end end; foo(42)()
[01:22:18] al2o3-cr: comet23: it stops execution of the current thread
[01:30:14] al2o3-cr: ruby as block/proc/lambdas because it's not a functional ... what baweaver said.
[01:33:01] al2o3-cr: baweaver: that's why constucts exist
[01:34:39] al2o3-cr: blocks are closures. nothing more, nothing less.
[01:38:02] al2o3-cr: baweaver: what a closure in python|lua|php etc...
[01:39:24] al2o3-cr: are blocks closures?
[01:40:21] al2o3-cr: baweaver: are blocks closures?
[01:40:50] al2o3-cr: brool: they're closures
[01:41:17] al2o3-cr: like any other language
[01:45:31] al2o3-cr: function add(a, b) return function(a,b) return a+b end end; is the same as def add(a, b) yield/&block.call
[01:48:35] al2o3-cr: [1,2,3].select { |n| n.even? }
[01:50:43] al2o3-cr: baweaver: :P
[01:51:37] al2o3-cr: blocks are the shit of ruby
[01:52:00] al2o3-cr: but many people don't understand them
[01:55:13] al2o3-cr: all they are is closures
[01:59:42] al2o3-cr: comet23: u 2
[02:00:12] al2o3-cr: good band that
[02:00:55] al2o3-cr: trust ruby is shit hot
[02:06:06] al2o3-cr: brool: exactly that
[02:09:40] al2o3-cr: you can't return a symbol or nil
[02:10:46] al2o3-cr: method -> closure -> end of method
[02:18:04] al2o3-cr: &>> def foo(n) yield(n * 2) end; foo(42) { |n| n }
[02:18:49] al2o3-cr: fuck blocks
[02:19:51] al2o3-cr: use &blocks if need to pass around; otherwise use yield
[02:29:08] al2o3-cr: b.call(n * 2) that's where people get confused
[02:29:33] al2o3-cr: passing &b in the method

2019-05-30

[11:40:59] al2o3-cr: the problem is body calls read_body which calls stream_check which checks @socket.closed?
[11:42:00] al2o3-cr: which obviously @socket is nil at this time.
[11:50:04] al2o3-cr: just too late :(
[11:50:18] al2o3-cr: phaul: they might be back as they ping out
[11:50:28] al2o3-cr: pinged timed out
[11:52:18] al2o3-cr: &>> require 'net/http'; Net::HTTPResponse.new("1.1", 503, "").then { |r| r.instance_variable_set(:@socket, def closed?() false end); [r.http_version, r.code, r.body] }
[11:52:33] al2o3-cr: ah, oh well.
[11:55:19] al2o3-cr: phaul: i tested in irb
[11:56:22] al2o3-cr: phaul: hows that working in pry
[11:57:06] al2o3-cr: i'm confused
[11:58:36] al2o3-cr: hmm, i'm not sure why that should work now
[11:59:38] al2o3-cr: i thinks it's to do with bindings
[12:00:22] al2o3-cr: but i could be wrong
[12:01:08] al2o3-cr: phaul: start pry with: pry -c TOPLEVEL_BINDING
[12:01:19] al2o3-cr: then try, same errror
[15:07:15] al2o3-cr: Any ideas how to pass a struct by value using fiddle?
[15:21:17] al2o3-cr: ACTION is pulling s hair out
[17:02:53] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[17:08:37] al2o3-cr: has joined #ruby-offtopic
[17:08:37] al2o3-cr: has joined #ruby
[18:10:02] al2o3-cr: havenwood: you beat baweaver to it again :P
[22:34:33] al2o3-cr: Anthony Joshua v Andy Ruiz Jr what a shit fight that's gonna be

2019-05-29

[00:17:51] al2o3-cr: haxx0r: in my gambling days i've seen 6 zeros come out in a row on roulette. trust me 13 blacks numbers ain't...
[00:26:54] al2o3-cr: &>> [*1..20].shuffle random: Random.new("01a111ba362fc3340608d8f33a9838e7449be319".to_i(16))
[00:27:01] al2o3-cr: &>> [*1..20].shuffle random: Random.new("01a111ba362fc3340608d8f33a9838e7449be319".to_i(16))
[00:27:04] al2o3-cr: &>> [*1..20].shuffle random: Random.new("01a111ba362fc3340608d8f33a9838e7449be319".to_i(16))
[00:30:43] al2o3-cr: leftylink: nice ;)
[00:37:59] al2o3-cr: &>> [*1..20].shuffle random: Random.new(Time.now.usec + $$ + Process.ppid)
[00:45:24] al2o3-cr: &>> [*1..20].sample random: Random.new("\x00P\x01\xC5".unpack1('N'))
[01:36:31] al2o3-cr: havenwood: hehe nice :)
[01:37:55] al2o3-cr: that is clever tbf
[05:02:33] al2o3-cr: havenwood: i want to see to 100
[05:28:58] al2o3-cr: run them cores hot :P
[06:36:37] al2o3-cr: Ping timeout: 246 seconds
[06:37:54] al2o3-cr: has joined #ruby
[06:37:57] al2o3-cr: has joined #ruby-offtopic
[06:48:31] al2o3-cr: Ping timeout: 246 seconds
[06:49:34] al2o3-cr: has joined #ruby
[06:49:37] al2o3-cr: has joined #ruby-offtopic

2019-05-28

[06:17:47] al2o3-cr: has joined #ruby-offtopic
[06:17:47] al2o3-cr: has joined #ruby
[13:32:54] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[13:42:02] al2o3-cr: has joined #ruby-offtopic
[13:42:02] al2o3-cr: has joined #ruby
[13:45:49] al2o3-cr: Client Quit
[13:51:10] al2o3-cr: has joined #ruby-offtopic
[13:51:10] al2o3-cr: has joined #ruby
[19:36:48] al2o3-cr: &>> X = Class.new; 20.times.map { X.new }; ObjectSpace.each_object(X).map(&:__id__).each_cons(2).map { |x, y| y - x }
[19:43:40] al2o3-cr: memory is weird.
[20:15:26] al2o3-cr: englosh: no
[20:22:47] al2o3-cr: englosh: on a 64bit system the byte size would be 13
[20:24:17] al2o3-cr: jhass: yep, no. you're right.
[20:25:30] al2o3-cr: jhass: i meant characters
[20:28:10] al2o3-cr: &>> require 'rbconfig/sizeof'; RbConfig::LIMITS['LONG_MAX'].to_s(36).size
[21:41:42] al2o3-cr: koala_man: my might want to consider sysread?
[21:42:54] al2o3-cr: jhass: none at all.
[21:43:46] al2o3-cr: just giving them the other alternative to read(2)
[21:44:26] al2o3-cr: jhass: whoa! sorry.
[21:45:07] al2o3-cr: jhass: they can at least read the docs for differences
[21:46:57] al2o3-cr: jhass: neither did van gogh's.
[21:48:35] al2o3-cr: they're pretty clear what each does imho.
[21:48:49] al2o3-cr: but whatever

2019-05-27

[16:40:24] al2o3-cr: havenwood: because in the Texecom class they've got device.readline.chomp
[16:40:45] al2o3-cr: havenwood: np
[17:01:44] al2o3-cr: migalenkom_1: np
[23:50:47] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.

2019-05-26

[09:43:33] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[09:49:34] al2o3-cr: has joined #ruby-offtopic
[09:49:34] al2o3-cr: has joined #ruby
[20:00:10] al2o3-cr: Ping timeout: 246 seconds
[20:01:31] al2o3-cr: has joined #ruby
[20:01:34] al2o3-cr: has joined #ruby-offtopic

2019-05-24

[00:34:11] al2o3-cr: has joined #ruby-offtopic
[00:34:11] al2o3-cr: has joined #ruby

2019-05-23

[08:43:54] al2o3-cr: has joined #ruby-offtopic
[08:43:54] al2o3-cr: has joined #ruby
[20:03:15] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.

2019-05-22

[10:09:40] al2o3-cr: has joined #ruby-offtopic
[10:09:40] al2o3-cr: has joined #ruby
[10:13:37] al2o3-cr: Read error: Connection reset by peer
[12:40:07] al2o3-cr: has joined #ruby-offtopic
[12:40:07] al2o3-cr: has joined #ruby
[13:35:03] al2o3-cr: Quit: WeeChat 2.4
[13:37:37] al2o3-cr: has joined #ruby-offtopic
[13:37:37] al2o3-cr: has joined #ruby
[16:48:14] al2o3-cr: Quit: WeeChat 2.4
[17:06:34] al2o3-cr: has joined #ruby-offtopic
[17:06:34] al2o3-cr: has joined #ruby
[21:27:33] al2o3-cr: Quit: WeeChat 2.4
[23:19:34] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.

2019-05-20

[01:53:30] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[02:02:57] al2o3-cr: has joined #ruby-offtopic
[02:02:57] al2o3-cr: has joined #ruby
[02:04:26] al2o3-cr: marz_d`ghostman: you might be better off asking in the rails channel.
[02:12:02] al2o3-cr: &>> n = 2130706433; [n].pack('N').bytes
[02:12:25] al2o3-cr: &>> n = 2130706433; 24.step(0, -8).map { |shf| n >> shf & 0xff }
[04:18:43] al2o3-cr: DeBot: !hangman ruby
[04:21:13] al2o3-cr: DeBot: bnchk
[04:21:45] al2o3-cr: flawless victory!
[07:19:52] al2o3-cr: is Random.urandom as cryptically secure as SecureRandom.bytes?
[10:39:22] al2o3-cr: Ping timeout: 246 seconds
[10:40:24] al2o3-cr: has joined #ruby
[10:40:26] al2o3-cr: has joined #ruby-offtopic
[13:42:46] al2o3-cr: Ping timeout: 246 seconds

2019-05-19

[08:29:43] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[08:36:41] al2o3-cr: has joined #ruby-offtopic
[08:36:41] al2o3-cr: has joined #ruby
[09:11:54] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[09:16:11] al2o3-cr: has joined #ruby-offtopic
[09:16:11] al2o3-cr: has joined #ruby
[09:39:28] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[09:45:20] al2o3-cr: has joined #ruby-offtopic
[09:45:20] al2o3-cr: has joined #ruby
[12:37:01] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[12:41:21] al2o3-cr: has joined #ruby-offtopic
[12:41:21] al2o3-cr: has joined #ruby

2019-05-17

[20:00:53] al2o3-cr: has joined #ruby-offtopic
[20:00:53] al2o3-cr: has joined #ruby

2019-05-15

[20:01:37] al2o3-cr: Ping timeout: 246 seconds

2019-05-14

[05:51:52] al2o3-cr: syndikate: why not just: activerecord_object.relations.map.with_index { |x, i| manipulation_method(x, i) }
[05:55:22] al2o3-cr: ACTION can't believe he's still up watching netflix
[06:13:55] al2o3-cr: syndikate: in ruby 2.7 you can do: activerecord_object.relations.map.with_index(&.:manipulation_method))
[06:14:32] al2o3-cr: if you are using methods
[06:17:06] al2o3-cr: havenwood: is that syntax right?
[06:17:58] al2o3-cr: havenwood: no, i mean for ruby 2.7?
[06:19:26] al2o3-cr: havenwood: yeah, just looked wrong to me for a minute then
[06:22:01] al2o3-cr: havenwood: ah, yeah. didn't think of that.
[06:23:33] al2o3-cr: havenwood: (self).:<=>.(self) why is that return 0
[06:24:52] al2o3-cr: oh yeah, silly me
[06:24:59] al2o3-cr: couldn't see it then
[06:25:15] al2o3-cr: i see it now
[06:25:38] al2o3-cr: short hand call
[06:33:56] al2o3-cr: no, they'd have inject
[07:02:59] al2o3-cr: havenwood: because it's thread-local
[07:04:44] al2o3-cr: oh, sure. i've seen plenty of that about.
[07:14:25] al2o3-cr: havenwood: how did it work in 1.8 then?
[07:15:06] al2o3-cr: mind you, they were only green threads
[07:15:56] al2o3-cr: i try to keep well away from multi-threading :p
[07:22:05] al2o3-cr: havenwood: 👍

2019-05-13

[00:12:11] al2o3-cr: &>> module A module B module C Module.nesting end end end # xco your probably looking for this
[00:13:10] al2o3-cr: by the definition of your question
[00:13:54] al2o3-cr: but if Module.constants is what you need, np
[00:16:28] al2o3-cr: xco: yeah, no worries ;)
[09:46:31] al2o3-cr: mhlei: that'll be a yes.
[09:47:52] al2o3-cr: NL3limin4t0r: you could possibly use TracePoint
[09:51:32] al2o3-cr: mhlei: it should be a instance method on Mime::Type
[09:52:43] al2o3-cr: &>> TracePoint.trace(:class) { |tp| p [tp.path, tp.lineno] }; class X end
[09:53:09] al2o3-cr: something along those lines could work
[10:00:42] al2o3-cr: mhlei: i don't know what you're asking?
[10:01:11] al2o3-cr: is this rails?
[10:02:05] al2o3-cr: mhlei: https://www.rubydoc.info/docs/rails/4.1.7/Mime/Type#ref-instance_method
[10:09:01] al2o3-cr: mhlei: require 'action_dispatch/http/mime_type'
[10:09:21] al2o3-cr: if you've not already required it.
[11:09:19] al2o3-cr: Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.
[11:15:47] al2o3-cr: has joined #ruby-offtopic
[11:15:47] al2o3-cr: has joined #ruby
[12:37:42] al2o3-cr: NL3limin4t0r: np