manveru

Activity Graph

Page 1 of 7 | Next »

2019-08-22

[00:56:13] manveru: *.net *.split
[07:54:25] manveru: has joined #elixir-lang
[07:54:33] manveru: has joined #ruby
[12:31:26] manveru: has joined #ruby-offtopic

2019-08-21

[14:14:58] manveru: Ping timeout: 250 seconds
[14:19:23] manveru: has joined #elixir-lang
[14:19:23] manveru: has joined #ruby-offtopic
[14:19:36] manveru: has joined #ruby

2019-08-01

[22:37:19] manveru: *.net *.split

2019-07-15

[10:34:09] manveru: Tuor: yeah, depending on what you'd like to do...
[10:34:31] manveru: `puts ARGF.readlines.map{|l| l.split[1] }.join(" ")` like that
[10:35:08] manveru: but `ruby -ne 'print $_.split[1], " "'` is also possible if you don't mind a trailing space
[11:02:32] manveru: Tuor: you can find it in the manpage of ruby :)
[11:02:38] manveru: the -n flag
[11:03:46] manveru: the benefit is that it doesn't have to fit all input in memory like my first version or yours
[11:04:10] manveru: but also means you won't know what the last item will be, so you get the additional space

2019-07-12

[09:33:26] manveru: %x still needs escaping, while `"" ""` may look like two separate strings, they actually become one
[09:34:54] manveru: >> "a" "b"
[09:37:23] manveru: guess that's not documented
[09:53:39] manveru: &>> %x(echo $3.50)
[10:38:25] manveru: &>> Array.new(3){|x| Array.new(3){|y| (x+1) * (y+1) }}
[10:38:53] manveru: but not sure if that's what you expect as result... :)

2019-07-09

[11:56:00] manveru: *.net *.split
[12:01:28] manveru: has joined #ruby-offtopic
[12:01:31] manveru: has joined #elixir-lang
[12:01:33] manveru: has joined #ruby

2019-06-19

[08:48:10] manveru: frojnd: require 'json'; JSON.parse(string)
[08:48:47] manveru: because irb calls .inspect before printing
[08:49:16] manveru: that way you can copy&paste it easily
[08:49:58] manveru: `puts` calls `to_s`, so no need to for that :)

2019-05-27

[19:17:30] manveru: Ping timeout: 252 seconds
[19:43:09] manveru: has joined #elixir-lang
[19:43:09] manveru: has joined #ruby-offtopic
[19:43:17] manveru: has joined #ruby

2019-05-20

[06:48:09] manveru: Read error: Connection reset by peer
[06:48:23] manveru: has joined #elixir-lang
[06:48:23] manveru: has joined #ruby-offtopic
[06:48:29] manveru: has joined #ruby

2019-05-11

[21:46:22] manveru: can someone please explain to me this bit of erlang? `L32 = [I || <<I:32/unsigned-big>> <= A]` it kinda looks like a list comprehension? how would i translate that to Elixir?
[21:51:47] manveru: ah, thanks :D

2019-05-05

[13:26:51] manveru: sh7d: there's rchardet if you don't know the real encoding
[13:31:46] manveru: you can force encode it to ascii and replace any non-ascii chars then
[13:34:11] manveru: something like: 'what is this: わからない'.encode('ASCII', undef: :replace)
[13:41:18] manveru: did you try passing the IO to nokogiri directly?
[15:01:09] manveru: wbollui: something like `rooms = [*room]`, and then always iterate over `rooms`
[15:03:29] manveru: personally, i'd just pass `rooms` always, it's not really clear from the method signature that it can take multiple

2019-05-02

[01:19:05] manveru: Ping timeout: 250 seconds
[01:49:12] manveru: has joined #elixir-lang
[01:49:12] manveru: has joined #ruby-offtopic
[01:49:20] manveru: has joined #ruby

2019-04-28

[06:14:53] manveru: Ping timeout: 268 seconds
[06:15:47] manveru: has joined #elixir-lang
[06:15:47] manveru: has joined #ruby-offtopic
[06:15:55] manveru: has joined #ruby

2019-04-18

[01:02:41] manveru: *.net *.split

2019-04-16

[06:33:23] manveru: Read error: Connection reset by peer
[06:40:16] manveru: has joined #ruby-offtopic
[06:40:18] manveru: has joined #elixir-lang
[06:40:28] manveru: has joined #ruby
[06:44:58] manveru: Max SendQ exceeded
[06:53:49] manveru: has joined #elixir-lang
[06:53:49] manveru: has joined #ruby-offtopic
[06:53:57] manveru: has joined #ruby

2019-04-13

[16:49:50] manveru: *.net *.split

2019-04-10

[19:51:20] manveru: should write a bot that plays hangman for me...

2019-03-31

[09:47:01] manveru: anyone here played with phoenix liveview and tried passing a list of ints in phx-value? it arrives as a binary in my handler but i actually need integers...
[09:48:18] manveru: do i have to make them a binary and parse the ints out instead? tried pattern matching like `<<x, y>>`, but that fails for the numbers 11, 12, 13
[14:06:50] manveru: josevalim: might be nice to have an error for this case?
[14:07:17] manveru: not sure if that's easy to detect...
[14:07:30] manveru: but it confused the hell out of me :)
[14:10:40] manveru: when encoding for transfer, if i try to pass a list of ints?
[14:12:15] manveru: my approach was doing something like `def handle_event("click", [x, y], socket) do`, then i saw in the error that it tried to match it like `"value" => <<15, 8>>`, so instead i matched on `<<x, y>>`, which worked... except for the numbers 11, 12, and 13 :)
[14:13:28] manveru: i assume elixir is trying to do some magic there to figure out if it's a list or bitstring, and tbh, i'm still not sure how it does that
[14:15:22] manveru: ideally `phx-value` would encode into some kind of AST, so type isn't lost during the transfer :D
[14:17:50] manveru: also, in case you're interested, here's how i handled mouseover/mouseout, would be nice if `closestPhxBinding` was exported somewhere https://www.irccloud.com/pastebin/aZhn8Doi/app.js
[14:27:00] manveru: lpil: i'm mostly wondering how this happened, i can't find a way to reproduce it in iex :(
[14:30:33] manveru: basically there must be some value that causes this to fail: `<<11,12>> = [11,12] |> List.to_string`
[14:34:06] manveru: i only have 0-19 though
[14:34:23] manveru: unless they somehow got combined into the same byte

2019-03-20

[12:26:34] manveru: anyone know why dialyzer runs the compilation for all deps every single time i modify a file in lib?
[12:34:32] manveru: actually, it's `mix compile` that does it, just not sure why
[18:30:48] manveru: Ping timeout: 252 seconds
[18:33:00] manveru: has joined #elixir-lang
[18:33:00] manveru: has joined #ruby-offtopic
[18:33:11] manveru: has joined #ruby

2019-03-19

[16:53:48] manveru: is there documentation somewhere about syntax like ~r or ~S?
[16:54:17] manveru: ah, thanks, found it :)

2019-02-12

[00:59:41] manveru: has joined #ruby-offtopic
[00:59:47] manveru: has joined #ruby

2019-02-11

[23:46:56] manveru: *.net *.split

2018-09-06

[19:29:44] manveru: has joined #ruby
[19:30:01] manveru: has joined #ruby-offtopic

2018-09-03

[19:10:25] manveru: *.net *.split

2018-07-20

[00:07:24] manveru: *.net *.split
[00:15:47] manveru: has joined #ruby

2018-06-20

[03:52:32] manveru: Ping timeout: 276 seconds
[05:33:52] manveru: has joined #ruby
[05:58:52] manveru: Ping timeout: 265 seconds
[06:21:35] manveru: has joined #ruby

2018-06-19

[08:31:34] manveru: >> 'Hello %{foo} %{bar}'.scan(/%{([^}]+)}/)
[08:32:42] manveru: .+? would also work i think

2018-06-15

[08:00:40] manveru: ELLIOTTCABLE: *wave*

2018-05-29

[02:47:18] manveru: *.net *.split
[02:48:08] manveru: has joined #ruby

2018-05-06

[15:54:13] manveru: has joined #ruby

2018-04-25

[12:25:52] manveru: *.net *.split
[12:27:28] manveru: has joined #ruby
[15:01:22] manveru: *.net *.split
[15:03:12] manveru: has joined #ruby

2018-03-02

[04:11:22] manveru: Write error: Connection reset by peer
[04:29:16] manveru: has joined #RubyOnRails
[04:29:24] manveru: has joined #ruby
[15:30:54] manveru: Read error: Connection reset by peer
[15:34:15] manveru: has joined #RubyOnRails
[15:34:23] manveru: has joined #ruby

2018-02-28

[23:25:37] manveru: Ping timeout: 256 seconds
[23:27:48] manveru: has joined #RubyOnRails
[23:27:56] manveru: has joined #ruby
[23:28:16] manveru: Max SendQ exceeded
[23:28:34] manveru: has joined #RubyOnRails
[23:28:42] manveru: has joined #ruby

2018-02-09

[12:45:10] manveru: has joined #RubyOnRails
[12:45:26] manveru: has joined #ruby

2018-01-22

[15:40:38] manveru: *.net *.split
[15:41:50] manveru: has joined #RubyOnRails
[15:41:58] manveru: has joined #ruby-offtopic
[15:42:00] manveru: has joined #ruby
[23:26:40] manveru: Read error: Connection reset by peer
[23:27:11] manveru: has joined #RubyOnRails
[23:27:20] manveru: has joined #ruby-offtopic
[23:27:21] manveru: has joined #ruby

2018-01-12

[16:37:26] manveru: *.net *.split
[16:38:03] manveru: has joined #RubyOnRails
[16:38:11] manveru: has joined #ruby-offtopic
[16:38:13] manveru: has joined #ruby

2017-12-27

[19:12:52] manveru: Ping timeout: 240 seconds
[19:54:24] manveru: has joined #RubyOnRails
[19:54:32] manveru: has joined #ruby-offtopic
[19:54:34] manveru: has joined #ruby

2017-12-07

[14:48:17] manveru: *.net *.split
[14:54:19] manveru: has joined #ruby-offtopic
[14:54:21] manveru: has joined #ruby
[21:43:04] manveru: *.net *.split
[21:48:14] manveru: has joined #ruby-offtopic
[21:48:18] manveru: has joined #ruby
[21:48:41] manveru: Max SendQ exceeded
[21:49:37] manveru: has joined #ruby
[21:49:37] manveru: has joined #ruby-offtopic

2017-12-01

[02:28:28] manveru: has joined #ruby-offtopic

2017-11-10

[07:55:06] manveru: it's been a while
[07:56:51] manveru: no ramaze for quite some time now... people pay me to do rails though
[07:57:46] manveru: but the past few years i've been getting more into nix and functional programming
[07:58:36] manveru: right now i do some scheme and elm
[07:59:02] manveru: for a nixos installer, so also nix
[07:59:11] manveru: it's pretty fun :)
[07:59:41] manveru: can't say i've tried it
[08:00:08] manveru: i've done sbcl, chicken scheme, and guile
[08:00:52] manveru: if it weren't for the whole religious GPL thing
[08:02:03] manveru: there's just way more stuff in nixos, and it works with systemd, so packaging isn't as alien
[08:02:56] manveru: you could say that
[08:03:19] manveru: it's just fun to be able to write your whole OS in one file
[08:05:14] manveru: https://nixos.org/nixops/ :)
[08:06:06] manveru: besides semicolons?
[08:06:57] manveru: well, the hardest part is usually software that insists on downloading shit while running the installation
[08:07:18] manveru: looking at you passenger!
[08:08:11] manveru: it downloads an entire nginx :P
[08:08:54] manveru: otherwise... the nix UX isn't terribly good
[08:09:19] manveru: `nix-env -iA nixpkgs.htop` to install stuff takes some getting used too
[08:09:50] manveru: they're working on it, but it's taking a long time
[08:11:26] manveru: anyway, now i use nix to build tests running in qemu, docker images, virtualbox appliances, bare metal servers, development environments, my macbook and linux machines...
[08:11:38] manveru: it's pretty good once you get used to it
[08:11:47] manveru: and makes ruby dependency management sane again ;)
[08:12:11] manveru: i don't have to use rvm or bundler
[08:13:59] manveru: my dayjob is mostly ruby/rails/react atm
[08:14:39] manveru: that currying thing, right?
[08:21:42] manveru: Array.map [1,2,3] (\x -> x * x)
[08:21:46] manveru: you'd probably write it like that
[08:22:07] manveru: though at least in the languages i know, they take the array last
[08:22:43] manveru: elm doesn't even have arrays, only lists...
[08:22:53] manveru: well, as builtin types
[08:23:31] manveru: and all lookups in lists/arrays result in Maybes
[08:25:25] manveru: makes for extremely solid code
[08:26:13] manveru: just staying away from the JVM is enough... imho :P
[08:27:22] manveru: i'm staying away more for cultural reasons
[08:28:06] manveru: but next i wanna try purescript :)
[08:28:11] manveru: once i'm done with elm
[08:28:40] manveru: what could go wrong?
[08:29:11] manveru: as long as you kill them both regularly, it's fine ;)

2017-10-16

[06:27:13] manveru: has joined #RubyOnRails
[06:27:21] manveru: has joined #ruby-offtopic
[06:27:23] manveru: has joined #ruby

2017-09-22

[08:03:58] manveru: Ping timeout: 255 seconds
[08:06:39] manveru: has joined #RubyOnRails
[08:06:49] manveru: has joined #ruby-offtopic
[08:06:50] manveru: has joined #ruby

2017-09-11

[20:24:09] manveru: *.net *.split

2017-08-06

[19:07:55] manveru: *.net *.split
[19:13:17] manveru: has joined #RubyOnRails
[19:13:27] manveru: has joined #ruby-offtopic
[19:13:29] manveru: has joined #ruby

2017-07-25

[17:42:19] manveru: tynamite: yo
[17:42:39] manveru: I didn't think anyone still users it
[17:45:30] manveru: well for puma you might need to fork Ramaze
[17:45:44] manveru: because innate uses very old rack
[17:47:47] manveru: I'm mobile at the moment. but I can maybe help you tonight

2017-07-11

[14:51:38] manveru: Bish: there's sidekiq i guess
[14:52:04] manveru: it doesn't do the cron part though, if you want to replace cron you can take a look at recurrent

2017-07-09

[18:46:34] manveru: gheegh: http://www.rubydoc.info/gems/ruby-si-units/0.0.8 maybe?

2017-07-06

[19:34:53] manveru: mistym: you're trying to debug this for 3 months now?
[19:55:04] manveru: well, i think a bisect is still the fastest way... even if it takes a day
[19:55:29] manveru: can't really find any easy hints for this issue

2017-07-05

[11:38:07] manveru: you could use ''.chars.any?

2017-07-04

[19:14:52] manveru: snowda: use system instead
[19:17:02] manveru: popen i'd use if i care about the output
[19:17:15] manveru: but system is perfectly safe for stuff you don't :)
[19:17:33] manveru: (just make sure you pass as separate arguments, not a long string)

2017-07-03

[14:00:05] manveru: anyone know how to tell rubocop not to complain about /(?<var>)/ =~ "something" ... it wants to replace it with Regexp#match? which won't assign the variable :(
[14:01:51] manveru: ah, guess https://github.com/bbatsov/rubocop/pull/4531 fixes that
[14:05:27] manveru: sure... but then i have to write `var = match_object[:var]`
[14:05:48] manveru: `next unless /^BEETLE_(?<config_key>.*)/ =~ key`
[14:05:50] manveru: i'm using it like this
[14:06:43] manveru: so after this line the config_key variable has what i need already
[14:07:07] manveru: it works with .match() as well, just not with .match?() :)
[14:07:51] manveru: sure, but then one line becomes 3
[14:08:59] manveru: assign in conditional
[14:09:33] manveru: either way, it's a bug in rubocop
[14:10:01] manveru: that check is meant for better performance, not to change the semantics
[14:10:44] manveru: there's just no new release yet... so i'll ignore it until then

2017-06-23

[07:27:57] manveru: hmm, no idea... it's working here :|

2017-06-20

[16:17:28] manveru: (if it was regex)
[16:19:05] manveru: you want something more like Dir['/etc/yum.repos.d/*'] - Dir['/etc/yum.repos.d/{oel,rhl}*']
[16:19:31] manveru: Chef3000: Dir.glob does not take regular expressions, it uses glob syntax
[16:20:02] manveru: see http://ruby-doc.org/core-2.0.0/Dir.html#method-c-glob
[16:20:43] manveru: Chef3000: try it in irb before to see how it works :)