<     May 2017     >
Su Mo Tu We Th Fr Sa  
    1  2  3  4  5  6  
 7  8  9 10 11 12 13  
14 15 16 17 18 19 20  
21 22 23 24 25 26 27  
28 29 30 31
00:00 Guest_ joined
00:03 gvaughn_ joined
00:04 elgenie joined
00:08 zealsham_ joined
00:09 <zealsham_> is worthwile to read "introducing elixir" as a beginner in 2017
00:11 milad joined
00:12 bpmcd joined
00:18 nighty-- joined
00:20 <Ankhers> If I am building an abstract schema, is it possible to somehow pass in the type of the assoc field?
00:22 wpcarro joined
00:23 isubasti joined
00:23 gvaughn joined
00:24 <notriddle> zealsham_: Personally, I only read the Getting Started guide, and have been picking up the rest by soliciting feedback from other people, so that doesn't really help much.
00:24 gvaughn_ joined
00:25 griffinbyatt joined
00:27 nomicflux joined
00:28 jkreeftmeijer joined
00:33 <zodiak> Howdy, so, in python there is a pep8 tool to check/enforce the "approved" style guidelines, is there such a tool in elixir ?
00:35 wpcarro joined
00:35 MotherFlojo joined
00:36 <Ankhers> zodiak: There isn't anything like pep8 for the Elixir community. I know there are a handful of styleguides out there though.
00:37 <zodiak> roger roger. I was jst planning on having it sort of hooked into the git checkin as we did with the pep8 tool.. but if it's not there, then I will have to rely on peeps to perform code checks :)
00:44 <Ankhers> zodiak: Actually, I'm not entirely sure if it is the *same* thing as pep8, but there are linters like dogma and credo.
00:46 justelex_ joined
00:49 griffinb_ joined
00:53 rschmukler joined
00:55 wpcarro joined
01:05 milad joined
01:07 bpmcd joined
01:08 Lokathor joined
01:14 griffinbyatt joined
01:15 justelex joined
01:21 <jer> is there an accepted way to delay restarting a worker after it's crashed? i want to back off after a crash
01:24 rschmukler joined
01:26 elgenie joined
01:28 ssswitch joined
01:30 rkazak joined
01:35 steffkes joined
01:39 tomterl joined
01:41 mika__ joined
01:47 wpcarro joined
01:50 <vans163> is there a 1 command way to say mix deps.get && mix deps.update --all && iex -S mix ?
01:53 <cmk_zzz> vans163: mix aliases perhaps?
01:54 <cmk_zzz> no
01:55 <vans163> cmk_zzz: gotcha
01:59 milad joined
02:03 wpcarro joined
02:13 Cohedrin joined
02:14 bitmod joined
02:17 sfbw joined
02:18 Cohedrin joined
02:19 wpcarro joined
02:21 MotherFlojo joined
02:29 jkreeftmeijer joined
02:29 nomicflux joined
02:32 griffinbyatt joined
02:36 sfbw joined
02:38 nolan330 joined
02:38 <nolan330> hey team, wondering what the idiomatic way to typespec genservers is--do you spec the api, callbacks, or both? probably both?
02:43 sevenseacat joined
02:47 <okeuday_bak> nolan330: its normal to do all the exports that are not callbacks
02:48 wpcarro joined
02:48 <okeuday_bak> the behaviour callback functions already have typespecs defined, due to being a behaviour
02:49 <nolan330> ah ok
02:50 <nolan330> so typically it only matters to typespec the api being defined
02:54 <okeuday_bak> yeah
03:02 wong2 joined
03:02 nomicflux joined
03:12 bpmcd joined
03:13 rschmukler joined
03:20 wpcarro joined
03:23 refriedchicken joined
03:31 jkreeftmeijer joined
03:33 griffinbyatt joined
03:35 steffkes joined
03:35 steffkes joined
03:42 craigp joined
03:47 milad joined
03:58 jerel joined
04:04 hakunin joined
04:14 jerel joined
04:27 griffinbyatt joined
04:32 wpcarro joined
04:33 jkreeftmeijer joined
04:36 peterpp joined
04:44 rschmukler joined
04:46 notdaniel joined
05:01 dec0n joined
05:04 sfbw joined
05:08 rschmukler joined
05:12 m0d joined
05:13 rkazak joined
05:13 elgenie joined
05:19 gvaughn joined
05:24 Lykve joined
05:28 griffinbyatt joined
05:34 jushur joined
05:34 Cloudflare joined
05:34 Cloudflare joined
05:36 steffkes joined
05:49 InternetFriend joined
06:05 sfbw joined
06:07 justelex joined
06:14 dec0n joined
06:16 dkh joined
06:25 nii236 joined
06:26 elgenie joined
06:27 yourname joined
06:28 TarVanimelde joined
06:29 dignifiedquire joined
06:35 jkreeftmeijer joined
06:36 nii236 joined
06:36 jkreeftmeijer joined
06:38 rschmukler joined
06:39 tuacker joined
06:45 wpcarro joined
06:56 cemilowski joined
06:57 wsieroci joined
07:02 rschmukler joined
07:05 sfbw joined
07:07 gvaughn joined
07:10 PaReeOhNos joined
07:15 bigkevmcd joined
07:16 proteusguy joined
07:17 milad joined
07:17 milad joined
07:19 Cohedrin joined
07:22 mark_66 joined
07:22 ZippoWeb joined
07:23 justelex joined
07:24 mattyw joined
07:26 vmoravec joined
07:27 rschmukler joined
07:29 asabil joined
07:30 griffinbyatt joined
07:31 Reshi joined
07:32 elgenie joined
07:33 Guest67 joined
07:33 <Reshi> Hey, is anyone using the mongodb driver with Mongo Atlas. I am getting an error in trying to determine the wire_version and the connection is failing (ssl)
07:35 cemilowski joined
07:36 steffkes joined
07:36 steffkes joined
07:36 peterpp joined
07:40 <Reshi> Nevermind, I think using the master branch from git works, rather than hex
07:43 celyr joined
07:43 <smeevil_> o/
07:43 <Nicd-> hello smeevil_
07:47 m1dnight_ joined
07:48 _0xAX joined
07:49 <smeevil> how is it going Nicd- ?
07:50 celyr joined
07:51 InternetFriend joined
07:51 <Nicd-> going fine, working slooowly on my web service and I'm now the admin of the #elixirlang:matrix.org Matrix channel
07:51 <Nicd-> how about you?
07:53 jkreeftmeijer joined
07:55 m1dnight_ joined
07:56 PaReeOhNos joined
07:58 celyr joined
07:59 elgenie_ joined
08:00 Theodule joined
08:00 tozz_ joined
08:00 sepow_ joined
08:00 ZippoWeb joined
08:01 <smeevil> what kind of service are you making ?
08:01 <smeevil> going fine here ;) finally getting a firm grip on webpack, and closing in on a rewrite of my marketplace site.
08:02 <OliverMT> is this something you get paid for?
08:02 <OliverMT> the marketplace thing
08:02 <smeevil> no thats my own sandbox
08:03 <smeevil> how so ?
08:03 <Nicd-> smeevil: my coding statistics website
08:04 <Nicd-> making a big update fori t
08:04 <smeevil> nice :) something like wakatime ?
08:04 <Nicd-> yes, but free and more for fun
08:04 <OliverMT> just curious
08:05 wsieroci joined
08:05 <Nicd-> https://codestats.net/users/Nicd
08:06 sfbw joined
08:07 akeating joined
08:07 akeating joined
08:09 Licenser joined
08:09 <smeevil> \o/ jetbrains plugin :)
08:09 <celyr> Nicd-, javascript is the language of the future after all
08:09 __0xAX joined
08:10 milad joined
08:10 <Nicd-> celyr: my work programming is mostly AngularJS :)
08:10 <Nicd-> smeevil: limited time offer only for you, account 0 € monthly, normally free
08:11 <smeevil> :P
08:14 PaReeOhNos joined
08:20 __0xAX joined
08:22 eddd joined
08:26 micmus joined
08:31 griffinbyatt joined
08:33 josevalim joined
08:37 akeating joined
08:45 wsieroci joined
08:45 justelex joined
08:46 lexmag joined
08:47 akeating joined
08:53 InternetFriend joined
08:53 meh` joined
08:54 akeating joined
08:56 gvaughn joined
09:01 __0xAX joined
09:03 __0xAX joined
09:05 __0xAX joined
09:09 clemlais joined
09:12 __0xAX joined
09:14 rschmukler joined
09:16 akeating joined
09:16 __0xAX joined
09:23 gmcabrita joined
09:24 nd___ joined
09:30 <snuffi> Hello :)
09:30 akeating joined
09:30 <snuffi> anyone have any ideas how to pretty print xml in elixir / erlang?
09:31 <snuffi> I'm using xmerl to generate some xml
09:31 <snuffi> works fine, but is unreadable for humans
09:32 griffinbyatt joined
09:33 justelex joined
09:34 stuartb joined
09:35 mika__ joined
09:41 craigp joined
09:41 <ljarvis> snuffi: you could write a recursive function that includes a "padding" value that increments as you receive new elements
09:43 <snuffi> i could, but i don't want to :)
09:43 <snuffi> was wondering if there's an existing solution already
09:44 <ljarvis> fair enough, i don't know of anything that already exists. I remember xmerl doesn't have anything (export_simple just exports verbatim, including any (or not) whitespace)
09:44 marten joined
09:44 CornishPasty joined
09:44 wycats joined
09:45 elskwid__ joined
09:46 Scorchin joined
09:46 mroth joined
09:46 hemulen_ joined
09:46 bcardarella joined
09:46 dch joined
09:47 ckrailo joined
09:47 jpinnix joined
09:47 darach joined
09:47 l1x joined
09:47 benoitc joined
09:47 strmpnk joined
09:47 hosh joined
09:50 zkat joined
09:51 mkwiek joined
09:51 besc joined
09:52 c-rack_ joined
09:52 niccs joined
09:54 asonge joined
09:54 Hibame joined
09:55 pantech joined
09:56 ryanwinchester joined
09:57 nicooga_ joined
09:57 jkreeftmeijer joined
09:58 <snuffi> also, what's the best way to do phoenix deploys at the moment?
09:58 <snuffi> i want to get beyond the "tmux and mix phx.server" level
10:08 sfbw joined
10:09 <Nicd-> move it from tmux to an init script / service ;)
10:09 <Nicd-> on a serious note, I think distillery is now the preferred way
10:10 craigp joined
10:13 hmans joined
10:14 vcoinminer joined
10:15 bikefighter joined
10:16 danneu joined
10:16 micmus joined
10:16 jdqx joined
10:24 agit0 joined
10:27 nighty-- joined
10:32 griffinbyatt joined
10:38 <snuffi> thanks!
10:38 jkreeftmeijer joined
10:39 dimitarvp joined
10:40 wpcarro joined
10:42 <OliverMT> are you on aws snuffi ?
10:42 <OliverMT> distillery + docker + aws ecs = good stuff
10:43 <Nicd-> I will nevar stop my mix phoenix.server
10:44 <snuffi> no, i try to do deploys without docker / cloud
10:47 elgenie joined
10:47 marr joined
10:49 lattenwald joined
10:49 isubasti joined
10:53 jkreeftmeijer joined
10:57 <OliverMT> but the cloud is so fluffy and airy
10:57 <snuffi> old_man_yells_at_cloud.png
11:08 <smeevil> still using edelivery with quite some hacks around it
11:08 sfbw joined
11:10 isubasti joined
11:29 josevalim joined
11:30 Or1on joined
11:33 sfbw joined
11:33 griffinbyatt joined
11:35 sfbw joined
11:35 <OliverMT> hah, I have been lamenting how to run a global cronjob
11:35 <OliverMT> on only one node at the time
11:36 <OliverMT> doing all sorts of things to make it sure it runs exactly on one node
11:36 cevado joined
11:36 <OliverMT> the solution? I set up a scheduled aws lambda event that runs every 5 min
11:36 <OliverMT> that simply POSTs with api key back to phoenix
11:36 <OliverMT> and the aws load balancer will take care of picking a single node to do the work
11:37 ZippoWeb joined
11:39 cemilowski joined
11:41 whharris joined
11:42 jkreeftmeijer joined
11:51 inoas joined
11:56 InternetFriend joined
12:00 jkreeftmeijer joined
12:03 ssswitch joined
12:09 jerel joined
12:09 nomicflux joined
12:10 jkreeftmeijer joined
12:11 cristianR_ joined
12:23 dbarrett joined
12:23 Or1on joined
12:23 __0xAX joined
12:31 d10n-work joined
12:31 akeating joined
12:34 griffinbyatt joined
12:41 wpcarro joined
12:48 elgenie joined
12:52 justelex joined
12:56 hakunin joined
12:56 wpcarro joined
13:00 ramortegui joined
13:02 jerel joined
13:04 JEG2 joined
13:05 sfbw joined
13:12 cdg joined
13:12 hakunin joined
13:19 akeating joined
13:20 rschmukler joined
13:21 whharris joined
13:26 isubasti joined
13:31 bpmcd joined
13:32 mhutter joined
13:35 griffinbyatt joined
13:36 craigger joined
13:37 mika__ joined
13:42 hakunin joined
13:45 cemilowski joined
13:48 gvaughn joined
13:56 hakunin joined
13:58 InternetFriend joined
13:58 cemilowski joined
13:59 justelex joined
14:02 ikcerog joined
14:02 <Ankhers> OliverMT: What is the point of using distillery in docker?
14:03 <Ankhers> (legitimately wondering. I'm currently using docker to deploy my application too)
14:03 rkazak joined
14:05 wpcarro joined
14:07 <Siyo> what should happen when two Phoenix.Tracker nodes connect, when both are already tracking presences and have never been connected before?
14:09 InternetFriend joined
14:10 hakunin joined
14:10 hakunin joined
14:10 wpcarro joined
14:10 <Siyo> I tried the following: track N presences on node1, track N presences on node2, connect the nodes
14:11 akeating joined
14:11 <Siyo> with N=10 everything worked fine, I got 20 presences, and logged "falling back to sending entire crdt"
14:12 <Siyo> with N=100, presences didn't merge correctly, and logged "sending delta generation 1"
14:13 <Siyo> which is odd, how can it send a delta to a node that it has never connected to before
14:13 <Siyo> node 1 had 200 presences, node 2 only 100 (only it's local ones)
14:14 <Siyo> (after connecting them)
14:15 hakunin joined
14:18 <OliverMT> Ankhers remote console
14:18 <Ankhers> That is a really good point. I should probably start doing that myself...
14:18 <OliverMT> I guess you could connect to localhost with iex
14:19 <OliverMT> I havent looked into it
14:19 <OliverMT> remote_console works very well though
14:19 bpmcd_ joined
14:20 <smeevil> wouldn't it be nice is there was a verbose human readable regex library :)
14:20 <Ankhers> Like a parser?
14:22 <smeevil> something like https://changelog.com/posts/stop-writing-regular-expressions-express-them-with-verbal-expressions
14:22 <OliverMT> smeevil: its called a tokenizer
14:22 <OliverMT> :p
14:22 <OliverMT> so easy to recurse in elixir I rarely use regex anymore
14:22 <OliverMT> much more readable with patterns and an accumulator
14:23 whharris joined
14:23 <smeevil> true
14:24 akeating joined
14:24 <smeevil> oh...https://github.com/VerbalExpressions/ElixirVerbalExpressions :D
14:28 <smeevil> seems only the simple parts are in there though
14:28 whharris joined
14:29 <Ankhers> Siyo: It should show the same presences on all nodes.
14:30 hashpuppy joined
14:31 <Siyo> in that case it looks like a bug
14:32 <Siyo> it should send the whole crdt when they first connect, the way i understand it
14:34 <Ankhers> Do you have a project that can reproduce the issue?
14:35 <Siyo> yeah, I'm setting one up
14:35 griffinbyatt joined
14:37 eddd joined
14:39 gem joined
14:40 micmus joined
14:41 mark_66 joined
14:43 gvaughn_ joined
14:43 rschmukler joined
14:44 tonytonyjan joined
14:44 <Siyo> Ankhers https://github.com/szlend/tracker_test/
14:44 heroiceric___ joined
14:44 <Siyo> check the readme for instructions
14:45 hotpancakes joined
14:45 darach joined
14:45 ryanwinchester joined
14:46 Liquid_X joined
14:46 jrdnull joined
14:46 strmpnk joined
14:46 CornishPasty joined
14:46 abort joined
14:46 ec\ joined
14:46 niccs joined
14:46 gamache joined
14:46 Cidan joined
14:46 Cthalupa joined
14:47 arekinath_ joined
14:47 TheMoonMaster joined
14:47 mika_ joined
14:47 asonge joined
14:47 benoitc joined
14:47 cmk_zzz joined
14:47 modran joined
14:47 marten joined
14:47 jpinnix joined
14:48 Xikeon joined
14:48 chrisarcand joined
14:48 Hibame joined
14:48 vcoinminer joined
14:48 cryptomata joined
14:49 hmans joined
14:49 amontalenti joined
14:49 kiltzman joined
14:49 elskwid__ joined
14:49 Liothen joined
14:49 targaf joined
14:49 Whipstickgostop joined
14:49 lexmag joined
14:49 a| joined
14:50 DDR joined
14:50 bphogan joined
14:50 zkat joined
14:50 elgenie joined
14:51 pantech joined
14:51 nerdystreetrat joined
14:51 larshesel joined
14:52 chris__ joined
14:52 Ankhers joined
14:52 nicholaswyoung joined
14:52 Acidic joined
14:53 kiliankoe joined
14:53 riddle joined
14:53 loglaunch joined
14:53 ephemeron joined
14:54 t-richards joined
14:54 vikram__________ joined
14:54 pmarreck joined
14:54 sickill joined
14:56 andersh joined
14:56 antipax joined
14:58 niccs joined
14:58 avdi joined
14:59 tvaalen joined
14:59 bpmcd joined
15:00 benwilson512 joined
15:00 aaronjensen joined
15:00 guacamole joined
15:01 pmbauer joined
15:01 apotry joined
15:01 gmcabrita joined
15:02 whharris_ joined
15:02 fredsir joined
15:02 metalrain joined
15:03 steffkes joined
15:03 steffkes joined
15:03 sorentwo joined
15:03 sebhoss joined
15:04 bcavileer joined
15:05 raymorgan joined
15:05 msch joined
15:06 adamkittelson joined
15:06 chrismcg joined
15:07 dvim joined
15:07 bbhoss joined
15:07 manveru joined
15:08 mhutter joined
15:10 gottcha joined
15:11 mhutter joined
15:11 amaury joined
15:11 <Siyo> let me know if anyone manages to reproduce the issue
15:13 icecreamcohen joined
15:16 meh` joined
15:20 smeevil joined
15:20 cemilowski joined
15:23 rschmukler joined
15:23 wong2 joined
15:26 cevado joined
15:30 brycek joined
15:30 adamkittelson joined
15:33 bitmod joined
15:36 griffinbyatt joined
15:41 tuacker joined
15:41 isubasti joined
15:44 jkreeftmeijer joined
15:46 <hotpancakes> Phoenix question. If one wants to create a non-resource-backed controller (e.g. static_pages), is it best to create this manually, without a phoenix generator?
15:50 davidw joined
15:54 <ljarvis> hotpancakes: imo the generators are just great for quick development, and eventually you'll almost always end up manually writing them. That said; do whichever you want, if it gets you to the end result it's good
15:55 amclain joined
15:55 seggy joined
15:55 <hotpancakes> ljarvis: hmm, it doesn't seem like there's a generator for controllers w/o ecto resource.
15:56 <ljarvis> hotpancakes: right, i guess not :)
15:56 wpcarro joined
15:56 rkazak joined
15:58 [0__0] joined
15:59 cresten joined
16:00 whharris joined
16:02 apotry joined
16:04 mika_ joined
16:05 wpcarro joined
16:05 hotpancakes joined
16:06 PaReeOhNos joined
16:09 Cohedrin joined
16:11 <vans163> is there a way to do a mix deps.get && mix deps.update --only-which-head-changed from a running project?
16:11 <vans163> (psuedo command)
16:12 mika_ joined
16:12 <Nicd-> what would --only-which-head-changed do?
16:12 <vans163> only update the dep if the mix.lock hash != to the latest hash on that branch
16:13 meandi_2 joined
16:13 <Nicd-> you mean for git deps?
16:14 <vans163> yea
16:14 <vans163> it seems like mix deps.update --all forces a recompile (unless i missed something)
16:15 <vans163> even if deps didnt change
16:15 akeating joined
16:17 <asonge> vans163: i think this might be more of a consequence of git than anything mix is doing.
16:19 ikcerog joined
16:19 <vans163> running Mix.Tasks.Deps.Get.run [] after adding a new dep to mix.exs doesnt do anything. maybe theres a command to tell elixir the mix.exs updated?
16:20 <vans163> asonge: im not sure how git is involved here
16:20 <vans163> if pulling in git and the HEAD commit hash == the hash in mix.lock, it means the dep did not change
16:21 <asonge> but that's now how elixir figures out what to compile.
16:21 <asonge> it uses timestamps of the files on disk
16:21 <asonge> not how*
16:22 <ciawal> you need to restart the app when you change mix.exs anyway
16:22 <vans163> asonge: ohh that would make sense, yea checking out the same commit hash would updte all the timestamps
16:22 cevado joined
16:22 <asonge> vans163: and if you think about it, you can totally hand-edit and commit a dep, and things kinda work until someone cleans the deps and rebuilds :)
16:22 <vans163> i really think they should use hashing of files, its pretty cheap, docker does it and they hash a crapload more files then a elixir project woudl ever
16:23 <asonge> i think so too, and i think a PR request would be welcome.
16:23 PaReeOhNos joined
16:23 jleon joined
16:24 <asonge> though it might also work pretty weirdly.
16:24 wong2 joined
16:25 <asonge> there's an n:m relationship between files and modules. a module can depend on many files, and a file can generate many resources...
16:27 refriedchicken joined
16:31 <cresten> Does anyone in here have any experience with RAML? http://raml.org/
16:32 <cresten> We've got a very complicated and robust Phoenix application, and we went-down a bad path in terms of writing our tests, and we're trying to pivot to something more structured.
16:32 <cresten> Also, our authorization schema stuff has hit some walls.
16:35 LastWhisper____ joined
16:35 aeliton joined
16:37 griffinbyatt joined
16:38 meh` joined
16:39 <aeliton> Hi everyone, I'd like to know if there's a better way to change hour format from "HHMMSS" to "HH:MM:SS". I'm using now Regex.split(~r{[0-9][0-9]}, "081614", include_captures: true, trim: true) |> Enum.join(":")
16:42 <havenwood> aeliton: Hmm, here's one non-Regexp solution: "HHMMSS" |> Stream.unfold(&String.split_at(&1, 2)) |> Enum.take_while(&(&1 != "")) |> Enum.join(":")
16:42 pmonson joined
16:42 zpconn__________ joined
16:43 pranz2 joined
16:44 dignifiedquire joined
16:44 burbas joined
16:44 <aeliton> thanks havenwood
16:45 <havenwood> aeliton: Or for Regexp: Regex.scan(~r/\d\d/, "030209") |> Enum.join(":") #=> "03:02:09"
16:45 pchittum joined
16:46 <* ljarvis> was just writing that :(
16:46 <aeliton> this second option is cleaner =)
16:46 <aeliton> I'll stick to it
16:46 <aeliton> thanks guys
16:48 hotpancakes joined
16:52 elgenie joined
16:52 wpcarro joined
16:53 mika_ joined
16:54 cresten joined
16:55 jleon joined
16:57 gokr joined
16:59 <micmus> the simplest would be with pattern matching:
17:00 <micmus> <<h::binary-2, m::binary-2, s::binary-2>> = hhmmss; "#{h}:#{m}:#{s}"
17:01 <micmus> aeliton: ^
17:02 steffkes joined
17:03 cdg joined
17:04 milad joined
17:04 cevado joined
17:06 cevado joined
17:09 hotpancakes joined
17:12 hotpanca_ joined
17:13 Sgeo_ joined
17:13 ZippoWeb joined
17:14 jleon joined
17:15 JuanMiguel joined
17:19 meh` joined
17:19 rschmukler joined
17:24 milad joined
17:26 wsieroci joined
17:26 PaReeOhNos joined
17:30 lexmag joined
17:30 Cohedrin joined
17:31 rkazak joined
17:32 wpcarro joined
17:34 OtherAllan joined
17:35 jkreeftmeijer joined
17:38 griffinbyatt joined
17:38 rschmukler joined
17:40 wpcarro joined
17:42 Cohedrin joined
17:42 <aeliton> micmus: thanks!
17:42 <asonge> TIL that you can put the size in a - segment
17:42 hotpancakes joined
17:43 <asonge> is there a name for each - segment in a binary match?
17:44 akeating joined
17:44 rschmukler joined
17:46 kansi joined
17:47 hotpancakes joined
17:52 hotpancakes joined
17:52 elgenie joined
17:53 whharris joined
17:55 zealsham_ joined
17:56 <zealsham_> can someone send me "elixir in action " as a pdf
17:56 jeznet3 joined
17:56 <alisdair> zealsham_: sure, https://www.manning.com/books/elixir-in-action
17:57 __0xAX joined
17:57 <zealsham_> alisdair: aint got $$ to spend tho
17:57 <josevalim> zealsham_: please don't ask for pdf of the books here, instead support the authors and publishers
17:57 isubasti joined
17:58 <josevalim> zealsham_: contact the publisher, i am almost sure what you are asking here is ilegal
17:58 <zealsham_> josevalim: i know i should do that. but the book is pretty expensive when converted to my country's currency
17:58 <zealsham_> thanks tho
18:03 <Nicd-> zealsham_: the book author needs a living too
18:05 cdg_ joined
18:06 <asonge> so, i have a weird question. it seems that you cannot do `unquote(unquote(foo))`, but you can do `unquote(foo)` if foo is bound (i was defining a dynamic function name)...but like...why?
18:09 cresten joined
18:10 aeliton_ joined
18:11 PaReeOhNos joined
18:13 wpcarro_ joined
18:17 strykerkkd joined
18:20 rl1 joined
18:21 <rl1> Is it possible to see the right hand matching when I receive a 'no function clause matching in' error?
18:21 peterpp joined
18:23 <Nicd-> shouldn't the next line tell you?
18:25 cresten joined
18:26 <rl1> Nicd-: Got nothing. Is there a logger level issue?
18:28 icecreamcohen joined
18:33 <Nicd-> I'm not sure
18:36 soud joined
18:36 hotpancakes joined
18:37 eddd joined
18:37 wsieroci joined
18:37 akeating joined
18:38 jkreeftmeijer joined
18:38 akeating joined
18:39 griffinbyatt joined
18:39 CapNemo left
18:39 <soud> Hi, I'm using the arc (and arc_ecto) library for file uploading in combination with Phoenix and I'm trying to upload audio files with it. The problem I'm facing is I want an audio file to be associated to the post model. However, when I use the `cast_attachments` function in my model, I can't use the `id` field in my folder name because it nil (because the model hasn't bene inserted yet). Any way around
18:39 <soud> this?
18:39 hotpanca_ joined
18:39 PaReeOhNos joined
18:41 squallstter joined
18:42 __0xAX_ joined
18:43 __0xAX joined
18:45 whharris joined
18:52 milad joined
18:52 asabil joined
18:58 steffkes joined
19:01 rschmukler joined
19:03 <asonge> rl1: it should be part of the error?
19:07 rschmukler joined
19:09 <rl1> asonge: yes and should appear at mix test
19:09 <asonge> oh, hrm.
19:09 cschneid_ joined
19:10 <rl1> asonge: I'm doing tdd and everytime I had to bind and inspect to check
19:10 hotpancakes joined
19:11 <asonge> well, to save your binding, you can pipe through IO.inspect, it returns the value you pass in
19:11 <rl1> It used to appear in a red line
19:11 mhutter joined
19:11 <asonge> but yeah, it sounds like your error is getting swallowed or something.
19:18 justelex joined
19:18 asabil joined
19:21 jkraus joined
19:22 justelex_ joined
19:25 aeliton joined
19:25 kronicdeth joined
19:28 fckfreenode joined
19:28 <fckfreenode> how do I decide when to use SPA vs stand multi page archticture?
19:29 asabil joined
19:30 <asonge> fckfreenode: i think that has to do with effort and the quality of result you want. multipage stuff is still faster and simpler to develop, and error propogation is nicely bounded (click a link, get a new page, everything starts from scratch)
19:30 <asonge> SPAs are nice, and are good for a lot of interactivity, but you've got a lot of state management woes in javascript to deal with.
19:31 craigp joined
19:32 whharris joined
19:34 icecreamcohen joined
19:35 PaReeOhNos joined
19:35 asabil joined
19:36 steffkes joined
19:36 steffkes joined
19:38 Ven joined
19:38 eddd joined
19:39 gokr joined
19:39 dastagg joined
19:39 griffinbyatt joined
19:40 the_voice_ joined
19:42 wsieroci joined
19:44 <fckfreenode> asonge: even after knowing that stuff i still can't decide
19:44 <fckfreenode> spa is no doubt harder, but maybe it's a better user experience
19:45 <fckfreenode> and i'm worried i might choose SPA later on down the road, so why not do it now?
19:46 <the_voice_> I am just jumping in - but I wouldn't jump into a SPA early
19:47 <the_voice_> unless I had an awful lot of dynamic data
19:47 <fckfreenode> the_voice_: what do you mean by "dynamic data" exactly?
19:52 iamvery joined
19:53 <the_voice_> dynamic data is probably the wrong description. I tend to use things like react when I have highly interactive/constantly changing data
19:53 <kronicdeth> Where it's a nicer user experience to refresh part of the UI with new data as opposed to having the user refresh the whole page
19:53 <the_voice_> So for instance a realtime comment feed would be a perfect use case
19:54 <fckfreenode> the_voice_: what about using multi page architecture and only using reactive when needed?
19:54 <the_voice_> Yes
19:54 <fckfreenode> maybe that's better?
19:54 <the_voice_> That is what I prefer to do these days
19:54 elgenie joined
19:54 <the_voice_> That is also what facebook does btw
19:55 DisruptiveNL joined
19:56 mika_ joined
19:56 Cohedrin joined
19:57 <the_voice_> as does github I believe
19:58 rschmukler joined
19:58 eddd joined
19:59 <fckfreenode> the_voice_: maybe i
19:59 <fckfreenode> maybe ill do that
19:59 <fckfreenode> thanks
19:59 <the_voice_> Might be wrong about github.
20:00 <fckfreenode> honestly i don't even know if i need a SPA, i just want to because it's "new"
20:00 <rl1> anybody knows how to change repo timeout on test?
20:00 <the_voice_> launch early, that's more important :)
20:01 <the_voice_> You can always slowly move to a SPA app later on when/if you need to
20:04 <rl1> [self reply] ownership_timeout in repo config
20:06 <the_voice_> also fckfreenode some of the arguments you hear about SPA are also just incorrect - it does not lead to faster load times you just move most of the load time to the initial load which from a UX point of view is often one of the worst things you can do. It also increases the page size in significantly. If you want a good argument for not using a SPA app, take a look at hacker news where most pages come in at 12KB, then take a look at any spa
20:06 <the_voice_> app(without the images etc..) and the initial JS will come in at 20 times the entire hackernews page.
20:13 rschmukler joined
20:13 isubasti joined
20:13 <fckfreenode> the_voice_: to be fair the hacker news website is very minimal though
20:14 <the_voice_> Agreed, which is why it depends on what you are doing
20:15 <fckfreenode> the_voice_: yeah exactly
20:15 <fckfreenode> honestly the only part of my app where it would be good would be search functionality / filtering / ordering etc
20:15 <fckfreenode> but i could use algolia for that
20:23 Cohedrin joined
20:31 milad joined
20:38 pranz3 joined
20:39 jkreeftmeijer joined
20:40 griffinbyatt joined
20:42 rschmukler joined
20:48 asabil joined
20:48 elgenie joined
20:50 milad joined
20:51 <cresten> the_voice_ if you're doing an SPA, you're going to need to implement a restful interface in order for your website to interact with the backend. For old apps, you can use elixir templates to inject variables into the rendered HTML.
20:51 amclain joined
20:51 <cresten> the_voice_ I HIGHTLY recommend using something like the openapi spec when implementing your restful interface.
20:52 <the_voice_> I am not doing a SPA :)
20:53 <the_voice_> And when I do need things like a React component or Vue component I try to use phoenix channels
20:53 <cresten> the_voice_ that sounds reasonable.
20:53 <cresten> Seems like you're making the right decision based on your requirements :)
20:54 Ven joined
20:54 <cresten> Though in the case of a personal project RDD (Resume Driven Development) is a reasonable decision
20:54 <the_voice_> Also true
20:55 <cresten> Or if you hate your coworkers XD
20:55 <the_voice_> If you want a job right now where I live you learn React and node TBH
20:56 <DeadTrickster> where you live?
20:56 <the_voice_> Israel
20:57 <the_voice_> Of course it depends what you are doing, but the startups seem to be moving to react and node. Big companies use things like c# and Java etc..
20:57 <DeadTrickster> I know guys from here. no one does node though )
20:57 <the_voice_> Where do you live?
20:57 <DeadTrickster> russia
20:57 fckfreenode joined
20:58 <the_voice_> It depends what the company is doing. I would say young startups (with young founders) seem to be using node/react. React has one of the most active communities in Israel
20:58 <the_voice_> when I workedin corporate it was all Java
20:58 rschmukler joined
20:59 <the_voice_> We have started arranging Elixir meetups now. We have the second one in a week
20:59 <fckfreenode> the_voice_: one thing i forget to ask: do you recommend using bootstrap with phoenix, or pulling it out?
20:59 <DeadTrickster> thankfully I don't have to do any frontend
21:00 wpcarro joined
21:00 <DeadTrickster> and I hope I never will
21:00 <the_voice_> Meh, it's a css framework - just use the one you already know
21:00 <the_voice_> I started using foundation recently and I actually really like it.
21:02 cdg joined
21:02 <fckfreenode> the_voice_: hmm ok... guess i'll stick with flexboxgrid in that case
21:02 <fckfreenode> thanks
21:03 <the_voice_> DeadTrickster - I hear you
21:08 asabil joined
21:15 PaReeOhNos joined
21:17 eddd joined
21:21 sp4rrow joined
21:30 hotpanca_ joined
21:30 rschmukler joined
21:34 asabil joined
21:34 jeffweiss joined
21:37 wpcarro joined
21:40 steffkes joined
21:40 jkreeftmeijer joined
21:41 griffinbyatt joined
21:41 cdg_ joined
21:47 wpcarro joined
21:52 hotpancakes joined
21:57 hotpancakes joined
21:58 sillyotter joined
22:02 zealsham_ joined
22:03 elgenie joined
22:04 rschmukler joined
22:04 <zealsham_> so i was reading programming elixir and came across where the author said the "=" operator is not an assignment operator but a matching operator. i dont understand that because it works a hell lot like assignment operator
22:05 <Uniaika> how can I put it
22:05 <Uniaika> x = 3 works because x wasn't associated with a previous value
22:05 <Uniaika> so, if you type x, you get 3
22:05 <Uniaika> and 3 = x works because it matches
22:07 <Uniaika> hmm
22:07 <Uniaika> nah I'm not satisfied with that explanation
22:07 <zealsham_> ohhh
22:07 <cmk_zzz> it also becomes more obvious when you match on other data structures such as tuples. {:ok, x} = {:ok, 3} or, [a, b, _] = [1, 2, 3].
22:08 <Uniaika> yeah cmk_zzz +1
22:09 <zealsham_> does that means that once a match is made it is immutable?
22:10 <zealsham_> a=5
22:10 <cmk_zzz> elixir allows to rebind a variable. In erlang it is even more obvious because something like. X = 1, X = 2 then second statement fails because X matched with 1 therefore X = 2 can't match and will fail. x = 1 x = 2 in elixir works becuase the variable is rebound but still immutable. In elixir you do: x = 1, ^x = 2 for failure
22:10 <zealsham_> a=30
22:10 <Uniaika> zealsham_: under the hood, it goes like a0 = 3 then a1 = 31 if you do a = a +1
22:11 eddd joined
22:11 <zealsham_> its hard wrapping one's head around this
22:13 <micmus> zealsham_: a = 5; fun = fn -> a end; a = 30; a
22:13 rkazak joined
22:13 <micmus> and compare with fun.()
22:13 jleon joined
22:13 <micmus> a changed, but the captured value didn't - it never will
22:13 <micmus> you can only rebind a variable, but never mutate it
22:14 <zealsham_> ahh, i think i get it now
22:15 <micmus> For me, it also makes sense to think about "=" as giving a task to the system: "Can you make things on the left and right the same?"
22:15 cdg joined
22:18 <zealsham_> micmus: that analogy nailed it. i fully understand how it works. but what is the need or use of such
22:18 <micmus> zealsham_: first - it's handy with nested structures. I can unpack them in one go
22:19 <micmus> the other one - asserting types and shape of the data
22:20 <zealsham_> thanks man
22:20 <cmk_zzz> plus it enables pattern matching in function heads and case clauses. This is extremely powerful
22:24 <notriddle> Admittedly, pattern matching in function heads can be trivially desugared into a single big case clause.
22:29 hotpancakes joined
22:29 cdg_ joined
22:30 trevoke joined
22:33 <trevoke> Hi all, I have a question about Elixir's Logger tool and Erlang's SASL. I have what might seem like a defect. Create a new normal Elixir app, add https://github.com/onkel-dirtus/logger_file_backend as a dependency and the basic configuration to redirect the log out to a file, and make sure you tell Logger to handle SASL reports. Then in the extra applications, start `:os_mon`. Since that requires `:sasl` that will start it too... And
22:33 <trevoke> the SASL reports will be sent to the terminal. To turn that off I need to pass in the option `config :sasl, :sasl_error_logger, false` and then the logs disappear again, but that might now be because they're not being logged at all.
22:34 jleon joined
22:34 <trevoke> My expectation would be that Logger would handle all of the SASL reports, but it looks like maybe it's getting configured before SASL starts and when it does, it gets its own default logger anyway?
22:37 <trevoke> Should I open an issue on the Elixir repo about this?
22:42 griffinbyatt joined
22:44 bambanx joined
22:44 wpcarro joined
22:58 Cohedrin joined
22:58 wpcarro joined
22:58 rschmukler joined
23:02 proteus-guy joined
23:02 cresten joined
23:04 griffinbyatt joined
23:07 <zealsham_> if i precede a variable name with and underscore can i still use that variable?
23:09 rschmukler joined
23:11 cschneid_ joined
23:13 hotpancakes joined
23:18 elgenie joined
23:27 <Radar> trevoke: Yes, I think so. If anything it would provide a better place to discuss this than IRC :)
23:27 elgenie joined
23:27 cresten joined
23:29 <thurloat[m]> I'm writing a little plug app, and I'm working on handling some custom internal exceptions, but I'm running into a problem: here's the relevant code: https://hastebin.com/bategatove.ex
23:29 <thurloat[m]> 1. I've seen exceptions raised in both formats, my lack of elixir understanding isn't telling me which is right
23:29 <thurloat[m]> 2. no matter what status I return (404). the http client gets a 500 back.
23:30 icanhazbroccoli1 joined
23:30 <thurloat[m]> am I missing something?
23:31 <thurloat[m]> (nevermind the obvious Envot/Envoy typo, fat fingered the pastebin)
23:32 Cohedrin joined
23:34 rschmukler joined
23:40 steffkes joined
23:40 steffkes joined
23:42 jkreeftmeijer joined
23:42 cschneid_ joined
23:43 rschmukler joined
23:43 ajjahn joined
23:44 bigD joined
23:44 <ajjahn> bigD?
23:44 <bigD> ajjahn
23:45 merk joined
23:45 <merk> what
23:49 Cohedrin joined
23:52 mika_ joined
23:53 cresten joined
23:56 a| joined
23:56 isubasti joined
23:58 jarray52 joined