profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/marcandre/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Marc-André Lafortune marcandre Montreal, Canada blog.marc-andre.ca ♥ Ruby ♥ Elixir ♥ TypeScript ♥ Core team of Ruby, RuboCop. Author of Backports, ractor-server Maintainer of Parsley.js, Featherlight.js.

guillaumepotier/Parsley.js 9020

Validate your forms, frontend, without writing a single line of javascript

marcandre/backports 394

The latest features of Ruby backported to older versions.

geemus/googleajax 55

Ruby wrapper to the Google AJAX API REST interfaces(Feeds, Language and Search).

francois/counters 24

Easily record any metric in your system

marcandre/commander 3

The complete solution for Ruby command-line executables

marcandre/calendar_date_select 2

A popular and flexible JavaScript DatePicker for RubyOnRails (and others)

marcandre/bb-ruby 1

BBCode implementation for Ruby

marcandre/client_side_validations 1

ClientSideValidations for Ruby on Rails

pull request commentruby/ruby

Use Rational for Float#round with ndigits > 14

Sorry, just saw this. I'll have to look at this while less tired, but going through rationals (I realize I talked about this first) might not be the correct approach, as that rational can be smaller than the equivalent decimal representation. Also, the criteria n > 14 seems like it should be relative to the exponent of the float, not absolute.

jeremyevans

comment created time in 13 hours

pull request commentguillaumepotier/Parsley.js

Add Welsh (cy)

Thank you!

Michael-HEIW

comment created time in 6 days

push eventguillaumepotier/Parsley.js

Michael

commit sha fc6134cc5bf4b16293a661f7a2c1ae426d028b71

Add Welsh (cy) (#1358) * Add Welsh translations from en v2.9.0

view details

push time in 6 days

PR merged guillaumepotier/Parsley.js

Add Welsh (cy)

I've had the en v2.9.0 translated into Welsh (cy-GB)

+28 -0

0 comment

1 changed file

Michael-HEIW

pr closed time in 6 days

pull request commentelixir-lang/elixir

Rely on modification time and hash to determine modified sources

@josevalim May not be related (directly or at all), but I'm getting some strange compiling errors today that resolve if I recompile the whole lib/:

$ mix phx.server
Compiling 5 files (.ex)

== Compilation error in file lib/bobby_web/views/admin/account_view.ex ==
** (CompileError) lib/bobby_web/views/admin/account_view.ex:2: module Bobby is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module
    (elixir 1.12.2) expanding macro: Kernel.use/2
    lib/bobby_web/views/admin/account_view.ex:2: BobbyWeb.Admin.AccountView (module)
    expanding macro: BobbyWeb.__using__/1
    lib/bobby_web/views/admin/account_view.ex:2: BobbyWeb.Admin.AccountView (module)
    (elixir 1.12.2) expanding macro: Kernel.use/2
    lib/bobby_web/views/admin/account_view.ex:2: BobbyWeb.Admin.AccountView (module)
    (elixir 1.12.2) lib/kernel/parallel_compiler.ex:319: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
$ touch mix.exs
$ mix phx.server
Compiling 405 files (.ex)
Compiling lib/postgres_types.ex (it's taking more than 10s)
Compiling lib/bobby_web/views/documents/life_view.ex (it's taking more than 10s)
Generated bobby app

Bobby is our MyApp. Just about everywhere we do use Bobby.

I am not sure how to reproduce it, but it has happened 3 times today (and never before today, no notable to our codebase either 🤷)

This is running elixir from 1.12 branch (at 5189b292a, I'm missing an unrelated commit)

Any idea what could be happening?

marcandre

comment created time in 7 days

PullRequestReviewEvent

pull request commentelixir-lang/elixir

Add `with_log` and `with_io`

Great, thanks!

marcandre

comment created time in 11 days

delete branch marcandre/elixir

delete branch : with_log_io

delete time in 11 days

push eventmarcandre/elixir

Marc-Andre Lafortune

commit sha f139c2b7a7e5bc7acaab91d85d837c7c25b48cc4

Add `CaptureLog.with_log`

view details

Marc-Andre Lafortune

commit sha eada38952a2aac628885e89cce45690bd48729ac

Add `CaptureIO.with_io`

view details

push time in 12 days

PR opened elixir-lang/elixir

Add `with_log` and `with_io`

I added very minimal testing for these, but they are indirectly tested with the existing tests as capture_log and capture_io rely entirely on them. Let me know if I should add more tests.

+104 -29

0 comment

4 changed files

pr created time in 12 days

create barnchmarcandre/elixir

branch : with_log_io

created branch time in 12 days

PullRequestReviewEvent

issue closedrvm/rvm

ambiguous `ruby-head`

Took me a while to understand what was going on when I entered rvm reinstall ruby-head and it failed with strange errors.

Install failed, and somehow truffle-ruby was somehow interferring?

See 10 lines before the end of: <details>

[2020-09-26 15:04:45] __rvm_make
__rvm_make () 
{ 
    \make "$@" || return $?
}
current path: /Users/mal/.rvm/src/ruby-head
GEM_PATH=/Users/mal/.rvm/gems/ruby-2.7.1:/Users/mal/.rvm/gems/ruby-2.7.1@global
GEM_HOME=/Users/mal/.rvm/gems/ruby-2.7.1
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/mal/.rvm/gems/ruby-2.7.1/bin:/Users/mal/.rvm/gems/ruby-2.7.1@global/bin:/Users/mal/.rvm/rubies/ruby-2.7.1/bin:/usr/local/opt/postgresql@9.6/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/mal/.ec2/api/bin:/Users/mal/ruby/dev/spec/mspec/bin:/Users/mal/.bin:/usr/local/Cellar/node/6.8.1/bin:/usr/local/bin:/usr/local/opt/fzf/bin:/Users/mal/.rvm/bin
command(2): __rvm_make -j4
++ make -j4
	BASERUBY = /Users/mal/.rvm/wrappers/truffleruby-20.0.0/ruby --disable=gems
	CC = gcc -fdeclspec
	LD = ld
	LDSHARED = gcc -fdeclspec -dynamiclib
	CFLAGS = -O3 -ggdb3 -Wall -Wextra -Werror=deprecated-declarations -Werror=division-by-zero -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-arith -Werror=shorten-64-to-32 -Werror=write-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Werror=extra-tokens -std=gnu99  -fno-common -pipe 
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/x86_64-darwin18 -I./include -I. -I./enc/unicode/12.1.0
	CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   
	DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib -install_name /Users/mal/.rvm/rubies/ruby-head/lib/libruby.3.0.dylib -compatibility_version 3.0 -current_version 3.0.0  -fstack-protector-strong -framework Security -framework Foundation  -fstack-protector-strong -framework Security -framework Foundation  
	SOLIBS = -lpthread -lgmp -ldl -lobjc
	LANG = en_CA.UTF-8
	LC_ALL = 
	LC_CTYPE = 
	MFLAGS = - --jobserver-fds=4,5 -j
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling ./main.c
compiling dmydln.c
generating id.h
generating miniprelude.c
compiling dmyext.c
making array.rbinc
/Users/mal/.rvm/wrappers/truffleruby-20.0.0/ruby --disable=gems ./tool/gen_dummy_probes.rb ./probes.d > probes.dmyh
translating probes probes.d
. ./vm_opts.h
making ast.rbinc
/Users/mal/.rvm/src/ruby-head/tool/ruby_vm/helpers/c_escape.rb:15:in `const_missing': uninitialized constant RubyVM (NameError)
	from /Users/mal/.rvm/src/ruby-head/tool/ruby_vm/helpers/c_escape.rb:15:in `<top (required)>'
	from ./tool/mk_builtin_loader.rb:5:in `require_relative'
	from ./tool/mk_builtin_loader.rb:5:in `<main>'
make: *** [array.rbinc] Error 1
make: *** Waiting for unfinished jobs....
make: *** [id.h] Error 1
/Users/mal/.rvm/src/ruby-head/tool/ruby_vm/helpers/c_escape.rb:15:in `const_missing': uninitialized constant RubyVM (NameError)
	from /Users/mal/.rvm/src/ruby-head/tool/ruby_vm/helpers/c_escape.rb:15:in `<top (required)>'
	from ./template/prelude.c.tmpl:9:in `require_relative'
	from ./template/prelude.c.tmpl:9:in `<main>'
	from /Users/mal/.rvm/rubies/truffleruby-20.0.0/lib/mri/erb.rb:901:in `eval'
	from /Users/mal/.rvm/rubies/truffleruby-20.0.0/lib/mri/erb.rb:901:in `result'
	from ./tool/generic_erb.rb:41:in `block (2 levels) in <main>'
	from ./tool/generic_erb.rb:41:in `call'
	from ./tool/generic_erb.rb:41:in `block in <main>'
	from ./tool/generic_erb.rb:34:in `map'
	from ./tool/generic_erb.rb:34:in `<main>'
/Users/mal/.rvm/src/ruby-head/tool/ruby_vm/helpers/c_escape.rb:15:in `const_missing': uninitialized constant RubyVM (NameError)
	from /Users/mal/.rvm/src/ruby-head/tool/ruby_vm/helpers/c_escape.rb:15:in `<top (required)>'
	from ./tool/mk_builtin_loader.rb:5:in `require_relative'
	from ./tool/mk_builtin_loader.rb:5:in `<main>'
make: *** [ast.rbinc] Error 1
make: *** [miniprelude.c] Error 1
++ return 2

</details>

First I thought it was trying to reinstall truffleruby, and next I did...

$ rvm uninstall ruby-head
truffleruby-head - #removing src/truffleruby-head..
truffleruby-head - #removing rubies/truffleruby-head..
$ rvm uninstall ruby-head
jruby-head - #removing src/jruby-head..
jruby-head - #removing rubies/jruby-head..
$ rvm uninstall ruby-head
ruby-head - #removing src/ruby-head..

??? Seems to me like ruby-head should never resolve to truffleruby/jruby and always to ruby (i.e. MRI)

It still wouldn't install ruby-head; I had to remove truffleruby-20.0.0 to be able to successfully install; I only got a small error at the end: mkdir: /Users/mal/.rvm/gems/ruby-head@global/bin: Not a directory

closed time in 12 days

marcandre

issue commentrvm/rvm

ambiguous `ruby-head`

🎉

marcandre

comment created time in 12 days

PullRequestReviewEvent

Pull request review commentrubocop/rubocop

[Fix rubocop#9328] Honour shareable_constant_value magic comment

+# frozen_string_literal: true++module RuboCop+  module Cop+    # Common functionality for dealing with Shareable Constant Value+    module ShareableConstantValue

Could you please:

  1. Add a comment about performance being bad
  2. Move this the the cop, in a private constant? I would rather not expose this code as it is.
thearjunmdas

comment created time in 16 days

Pull request review commentrubocop/rubocop

[Fix rubocop#9328] Honour shareable_constant_value magic comment

     end   end +  shared_examples 'freezing all constants' do |o|

My observation was more about naming your shared behaviours. If it's not clear to you, we can go ahead as is and eventually refactor.

thearjunmdas

comment created time in 16 days

PullRequestReviewEvent

Pull request review commentrubocop/rubocop

[Fix rubocop#9328] Honour shareable_constant_value magic comment

     end   end +  shared_examples 'literals that are frozen' do |o|+    let(:prefix) { o }++    it_behaves_like 'immutable objects', '[1, 2, 3]'+    it_behaves_like 'immutable objects', '%w(a b c)'+    it_behaves_like 'immutable objects', '{ a: 1, b: 2 }'+    it_behaves_like 'immutable objects', "'str'"+    it_behaves_like 'immutable objects', '"top#{1 + 2}"'+    it_behaves_like 'immutable objects', '1'+    it_behaves_like 'immutable objects', '1.5'+    it_behaves_like 'immutable objects', ':sym'+    it_behaves_like 'immutable objects', 'FOO + BAR'+    it_behaves_like 'immutable objects', 'FOO - BAR'+    it_behaves_like 'immutable objects', "'foo' + 'bar'"+    it_behaves_like 'immutable objects', "ENV['foo']"+    it_behaves_like 'immutable objects', "::ENV['foo']"

Oh, right. It's ok to not change the current behaviour then, and yes, it could be discussed elsewhere 👍

thearjunmdas

comment created time in 16 days

PullRequestReviewEvent

PR opened teamon/tesla

Tweak doc
+1 -1

0 comment

1 changed file

pr created time in 16 days

push eventmarcandre/tesla

Marc-André Lafortune

commit sha 58e327d443cbbf169a566e8eb1c0fb3177878d52

Tweak doc

view details

push time in 16 days

fork marcandre/tesla

The flexible HTTP client library for Elixir, with support for middleware and multiple adapters.

fork in 16 days

pull request commentaaronrenner/web_driver_client

Relax version requirement for `tesla` package

A release would be very much appreciated.

Users of wallaby are currently forced to use an older tesla and/or can run into issues like expecting that the latest wallaby would install when only an old version predating the use of web_driver_client will be installed.

marcandre

comment created time in 16 days

PR opened aaronrenner/web_driver_client

Relax version requirement for `tesla` package

This allows current version (1.4.2)

+1 -1

0 comment

1 changed file

pr created time in 16 days

push eventmarcandre/web_driver_client

Marc-André Lafortune

commit sha 9e3f5736f8b25b5a02d0bf9896137c9ee332988e

Relax version requirement for `tesla` package This allows current version (1.4.2)

view details

push time in 16 days

issue closedelixir-wallaby/wallaby

Warnings on compilation

With elixir 1.12.1 / OTP 24, I get compilation warnings:

==> wallaby
Compiling 33 files (.ex)
warning: redefining @doc attribute previously set at line 526.

Please remove the duplicate docs. If instead you want to override a previously defined @doc, attach the @doc attribute to a function head (the function signature not followed by any do-block). For example:

    @doc """
    new docs
    """
    def click(...)

  lib/wallaby/browser.ex:538: Wallaby.Browser.click/2

warning: Supervisor.Spec.supervise/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/wallaby/driver/process_workspace/server_supervisor.ex:22: Wallaby.Driver.ProcessWorkspace.ServerSupervisor.init/1

warning: Supervisor.Spec.supervise/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/wallaby/phantom.ex:72: Wallaby.Phantom.init/1

warning: Supervisor.Spec.supervise/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/wallaby/experimental/selenium.ex:23: Wallaby.Experimental.Selenium.init/1

warning: Supervisor.Spec.supervise/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/wallaby/experimental/chrome.ex:25: Wallaby.Experimental.Chrome.init/1

warning: Supervisor.Spec.worker/3 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/wallaby/driver/process_workspace/server_supervisor.ex:20: Wallaby.Driver.ProcessWorkspace.ServerSupervisor.init/1

warning: Supervisor.Spec.worker/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/wallaby/phantom.ex:69: Wallaby.Phantom.init/1

warning: Supervisor.Spec.worker/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
Found at 2 locations:
  lib/wallaby/experimental/chrome.ex:21: Wallaby.Experimental.Chrome.init/1
  lib/wallaby/experimental/chrome.ex:22: Wallaby.Experimental.Chrome.init/1

warning: Supervisor.Spec.supervisor/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
Found at 2 locations:
  lib/wallaby.ex:33: Wallaby.start/2
  lib/wallaby.ex:34: Wallaby.start/2

warning: Supervisor.Spec.worker/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/wallaby.ex:35: Wallaby.start/2

Let me know if you'd like a PR

closed time in 17 days

marcandre

issue commentelixir-wallaby/wallaby

Warnings on compilation

Not checking the right version 🤦‍♂️

marcandre

comment created time in 17 days

push eventruby/ruby

Burdette Lamar

commit sha a541fe1a7593f95c5b7d36993cf3fba0ec525574

Doc guide for class/module (#4600) Co-authored-by: Marivaldo Cavalheiro <marivaldo@gmail.com>

view details

push time in 18 days