<     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 _2_5 26 27  
28 29 30 31
00:00 <hexkey[m]> Apparently not, because I seem to have gotten away without them.
00:00 <hexkey[m]> Not necessarily in a clean/sane way, but still
00:01 <icecreamcohen> sorry, when I say require, I meant “needs it if you want it to be fast"
00:01 <hexkey[m]> okay, got some stats
00:02 amitchellbullard joined
00:02 zpconn__________ joined
00:02 <icecreamcohen> did you remove the inspect calls?
00:04 <hexkey[m]> they don't seem to have too much impact, especailly when comparing to the built-in sort's time
00:04 jleon joined
00:05 <icecreamcohen> that’s bad ;)
00:05 <icecreamcohen> IDK if this really counts as a bucket sort, you’re kind of just filtering things into buckets in order
00:05 <icecreamcohen> and then flattening them
00:06 <hexkey[m]> that's what I kind of suspected
00:06 <patientplatypus> hi
00:06 <hexkey[m]> also: I got a time of 14162 ms for the bucket sort
00:06 <patientplatypus> i need help
00:06 <hexkey[m]> same task for mergesort took 3.54 ms
00:07 <patientplatypus> i have an image in my /priv/static file but when i try and include the relative path to that image it does not find it
00:07 <icecreamcohen> hexkey[m]: if you have two items that get put in the same bucket and are out of order, they won’t be sorted
00:07 josevalim joined
00:07 <icecreamcohen> hexkey[m]: How many items? BTW, that’s why you didn’t notice the puts calls
00:08 PaReeOhNos joined
00:08 <patientplatypus> so i have /priv/static/platypus.jpg but <img src='./platypus.jpg'/> does not work
00:08 <patientplatypus> does anyone know why?
00:09 <icecreamcohen> hexkey[m]: it still won’t be fast, but you can try to emulate buckets by using a map keyed by integers
00:09 codestorm joined
00:09 <icecreamcohen> patientplatypus: sorry, not a phoenix user.
00:09 <patientplatypus> SADNESS
00:10 <icecreamcohen> there’s a phoenix channel somewhere around here, I think.
00:10 <icecreamcohen> hexkey[m]: You could do something evil if you had a fixed number of buckets.
00:11 <hexkey[m]> ..evil?
00:11 <icecreamcohen> yes
00:12 <hexkey[m]> If by evil you mean laggy I got that covered already
00:12 <icecreamcohen> say you have 20 buckets
00:12 <icecreamcohen> lol
00:12 <icecreamcohen> no, it’d be fast
00:12 wpcarro joined
00:13 <icecreamcohen> nm, say you have 5 buckets
00:14 <icecreamcohen> you can define def add_to_bucket(0, item, {b0, b1, b2, b3, b4}), do: {[item | b0], b1, b2, b3, b4}
00:15 <icecreamcohen> and add_to_bucket(1, item, {b0, b1, b2, b3, b4}), do: {b0, [item | b1], b2, b3, b4}
00:15 <icecreamcohen> etc
00:15 <icecreamcohen> and you could do it with macros
00:15 <hexkey[m]> macros? sounds scary.
00:16 <icecreamcohen> not really, they’re simple
00:16 <icecreamcohen> to save you writing code.
00:17 isubasti_ joined
00:17 <hexkey[m]> I know. I just tend to shy away from them since they make things harder to follow along with
00:18 <icecreamcohen> you can also use ets
00:20 <icecreamcohen> maybe not macros, give me a sec
00:21 <icecreamcohen> doh, you can just use elem/put_elem
00:21 wpcarro joined
00:21 ur5us joined
00:23 rkazak joined
00:23 kronicdeth joined
00:25 Cohedri__ joined
00:25 <hexkey[m]> something like this?
00:26 <hexkey[m]> `` put_elem(bucket_list, index, item)``
00:26 <icecreamcohen> check your gist
00:26 <hexkey[m]> wait, I think I still need a way to keep track of the range of each bucket
00:26 <icecreamcohen> yes
00:26 <icecreamcohen> you can make a fn that maps an item into a bucket index
00:30 Cohedrin joined
00:31 nighty-- joined
00:40 wpcarro joined
00:43 jleon joined
00:47 rbaezam joined
00:47 ssswitch joined
00:48 jleon joined
00:53 wpcarro joined
01:01 <hexkey[m]> ``range = Enum.min_max(list)
01:01 <hexkey[m]> |> Range.new()``
01:01 <hexkey[m]> Is there any way to do this?
01:03 codestorm joined
01:04 <hexkey[m]> I feel like there is
01:05 <cmk_zzz> range = Enum.min_max([1, 2, 3]) |> (fn({x, y}) -> Range.new(x, y) end).()
01:05 <cmk_zzz> but there may be better ways
01:10 rranelli joined
01:16 PaReeOhNos joined
01:18 shinesoleil joined
01:21 cdg joined
01:22 Cohedrin joined
01:24 <hexkey[m]> If I have a list of ranges that I've made with a for loop, is there a good way to convert them to a Map where the keys are other lists?
01:26 m00dy joined
01:29 <hexkey[m]> nvm got it.
01:33 akeating joined
01:34 <hexkey[m]> one other question: is there an easy way to split a range into a list of ranges? Enum.chunk works, but it converts them to lists
01:36 Jam666_ joined
01:39 tomterl joined
01:39 Jam666_ joined
01:41 fhoffmann joined
01:41 LastWhisper____ joined
01:42 <LastWhisper____> hello!
01:42 <LastWhisper____> I'm trying to see if my phantomjs process is running via an elixir app; and if it isn't, I'd like to spawn it... something like `System.cmd("phantomjs --wd", [])`
01:42 <LastWhisper____> Is this even possible or am i making stuff up ?
01:42 <hexkey[m]> ohai
01:42 pufuddled joined
01:48 justelex_ joined
01:53 patientplatypus joined
01:57 codestorm joined
02:09 kronicdeth joined
02:23 PaReeOhNos joined
02:25 codestorm joined
02:30 gvaughn_ joined
02:30 rkazak joined
02:33 wpcarro joined
02:42 gvaughn_ joined
02:52 jleon joined
02:55 jleon joined
03:02 elgenie joined
03:12 m00dy joined
03:18 justelex_ joined
03:23 mozzarella joined
03:31 gvaughn joined
03:31 PaReeOhNos joined
03:32 RexM_ joined
03:32 gvaughn_ joined
03:41 wpcarro joined
03:43 codestorm joined
03:47 meh` joined
03:53 refriedchicken joined
04:11 elgenie joined
04:16 <hexkey[m]> anyone know how I can make a for loop not return nil?
04:16 <hexkey[m]> in something like this:
04:16 <hexkey[m]> ``for item <- list do
04:16 <hexkey[m]> if Enum.member?(1..4, item), do: item
04:16 <hexkey[m]> end``
04:21 patientplatypus joined
04:22 <sevenseacat> err, are you using a `for` instead of an `Enum.filter` or something like that? what do you want it to return?
04:23 <hexkey[m]> oh yeah, enum.filter is a thing. thanks, that's what I needed.
04:27 Guest joined
04:33 notdaniel joined
04:36 PaReeOhNos joined
04:37 mrEngineer joined
04:38 Nycatelos joined
04:38 jimmyrcom_ joined
04:39 Ioyrie joined
04:53 <asonge> hexkey[m]: btw, flat_map is one of the most useful map functions. you can use it to simultaneously filter and return results (multiple even) into the collection
04:54 <hexkey[m]> thanks, that's probably going to save me at least 2 for loops
04:54 <asonge> hexkey[m]: but `for` has a filter built in as well, `for item <- list, Enum.member?(1..4, item), do: item`, though in this *particular* instance, you could use `in` or even better, just use a conditional.
04:55 <asonge> comprehensions in elixir/erlang are really powerful
04:55 Tica2 joined
04:56 jleon joined
05:01 proteusguy joined
05:04 bitmod joined
05:04 icecreamcohen joined
05:09 dec0n joined
05:12 srxa_ joined
05:15 codestorm joined
05:17 meandi_2 joined
05:28 craigp joined
05:36 srxa joined
05:43 pusewicz joined
05:44 __charly__ joined
05:44 PaReeOhNos joined
05:57 PSvils joined
05:57 gvaughn joined
06:01 isubasti joined
06:08 wpcarro joined
06:10 codestorm joined
06:12 l14n joined
06:24 tuacker joined
06:25 Cohedrin joined
06:28 <micmus> What's with all the spam on the forum?
06:29 <Nicd-> wow
06:29 <Nicd-> that's bad
06:31 <Nicd-> I'll email them about it
06:35 akeating joined
06:36 <micmus> Nicd-: I unlisted them (I have moderator powers on the forum)
06:37 akeating joined
06:50 rickj joined
06:51 PaReeOhNos joined
06:52 gvaughn joined
06:52 Ven joined
06:55 jkreeftmeijer joined
06:56 pusewicz joined
06:58 arquebus joined
06:59 jleon joined
07:04 craigp joined
07:04 jleon joined
07:04 Guest67 joined
07:10 notdaniel joined
07:10 craigp joined
07:14 codestorm joined
07:17 blahdodo joined
07:20 beilabs joined
07:20 craigp joined
07:27 mark_66 joined
07:29 cemilowski joined
07:30 PaReeOhNos joined
07:31 dignifiedquire joined
07:32 m00dy joined
07:32 jleon joined
07:34 josevalim joined
07:37 jleon joined
07:40 inoas joined
07:42 awea joined
07:44 jleon joined
07:45 justelex_ joined
07:47 craigp joined
07:48 nbg joined
07:49 dec0n joined
07:50 PSvils joined
07:53 Ven joined
07:56 mozzarella joined
07:57 wpcarro joined
07:57 mattyw joined
07:57 m00dy joined
07:58 timbuchwaldt joined
08:04 akeating joined
08:08 codestorm joined
08:12 marr joined
08:19 PaReeOhNos joined
08:24 mattyw joined
08:33 jkreeftm_ joined
08:35 jleon joined
08:39 m00dy joined
08:40 gvaughn joined
08:40 jleon joined
08:41 m00dy joined
08:46 gregman_ joined
08:47 jleon joined
08:51 jleon joined
08:52 wpcarro joined
08:54 MotherFlojo joined
08:54 srxa joined
08:56 jleon joined
08:56 isubasti joined
09:02 codestorm joined
09:03 jleon joined
09:06 mattyw joined
09:07 jleon joined
09:12 jleon joined
09:15 m00dy joined
09:17 jleon joined
09:21 jleon joined
09:24 craigp joined
09:25 m00dy joined
09:26 jleon joined
09:30 jleon joined
09:35 gvaughn joined
09:43 codestorm joined
09:45 ur5us joined
09:47 mikker joined
09:50 m00dy joined
09:54 m00dy joined
09:55 Ven joined
10:01 nhooyr joined
10:02 Guest67 joined
10:04 ephe_meral joined
10:05 cschneid_ joined
10:07 nhooyr joined
10:07 junsuijin joined
10:07 cemilowski joined
10:08 mk[] joined
10:11 nhooyr joined
10:24 glasz joined
10:25 lopex joined
10:29 isubasti joined
10:31 vmoravec joined
10:32 jimmyrcom_ joined
10:35 akeating joined
10:37 codestorm joined
10:41 wpcarro joined
10:46 Guest95 joined
10:47 jo joined
10:48 <jo> hee guys, im having troubles with my phoenix project recompiling every time I change a file
10:49 <jo> one file change results in a big compile hit, compiling around 80 files. My project is getting large and I'm using Ecto schemes all over the place
10:49 isubasti joined
10:50 <jo> is there a solution how to speed this up, the bigger the project gets the slower it becomes ..
10:50 <gazler> jo: any file change?
10:50 <micmus> jo: mix xref graph will show dependencies between files that compiler finds
10:50 <jo> yes, I did run that, there are many references between files
10:50 <jo> usually echo stuff I think
10:51 <jo> ecto
10:51 <micmus> Ecto shouldn't create dependencies between files on it's own
10:53 <OliverMT> the only thing that recompiles all your project is if you change any of the top level imports
10:53 <OliverMT> like your Web.ex or the config
10:53 <jo> hmm, maybe im looking in the wrong direction then
10:53 <OliverMT> in theory
10:53 <OliverMT> :D
10:55 m00dy joined
10:55 <jo> will check my web.ex
10:56 <micmus> one thing to note is that every time you use a struct you create a compile-time dependency between modules
10:59 mattyw joined
11:01 <jo> an Echo scheme is also considered a struct right?
11:03 Tica2_ joined
11:10 isubasti joined
11:13 <jo> hmm, I found one controller which is importing like crazy, up to 10 levels deep in xref graph
11:14 <jo> but im not sure what is causing this, looks ok ......
11:19 <jo> ├── web/models/row.ex (compile)
11:19 akeating joined
11:19 <jo> │ ├── web/models/project.ex (compile)
11:19 <jo> │ │ ├── web/models/list.ex (compile)
11:19 <jo> │ │ │ ├── web/models/task.ex (compile)
11:19 <jo> │ │ │ │ ├── web/models/list.ex (compile)
11:19 <jo> │ │ │ │ ├── web/models/project.ex (compile)
11:19 <benwilson512> jo: please use a gist or something for a lot of multiline content
11:21 <jo> sorry :)
11:21 <jo> https://gist.github.com/anonymous/23d0c8ac4ee5c19f6678c9d5c9ccaf30
11:22 <jo> and it goes deeper and deeper ...
11:22 gvaughn joined
11:24 mattyw joined
11:26 <asonge> jo: row looks pretty generic, and a lot of things seem to depend on it, so...
11:26 <benwilson512> micmus: if I have an association in an ecto schema from schema A to B, does A have a compiletime dep on B now?
11:27 <OliverMT> yes
11:27 <OliverMT> if you belongsto or similar to a module that doesnt exist it wont compile
11:28 <micmus> no. We can't do this, since the reverse association would introduce circular dependency
11:29 <OliverMT> but, it wont compile if your model is missing
11:29 <micmus> it will
11:29 <OliverMT> maybe I am aliasing
11:29 <OliverMT> will that fail?
11:29 <micmus> not sure...
11:30 <benwilson512> heh, so my xref graph depth tops out at 32...
11:30 <jo> hmm, then mine is not so bad ;)
11:31 <benwilson512> ehh my project is way too big at this point
11:31 <benwilson512> 242 files
11:31 <benwilson512> need to umbrella it badly
11:31 isubasti joined
11:31 codestorm joined
11:31 <OliverMT> 32 wtf
11:31 <OliverMT> I have five levels
11:31 <benwilson512> there' something weird up that's for sure
11:33 <benwilson512> changing the following module in any way (adding a comment) recompiles 76 files
11:33 <benwilson512> https://www.irccloud.com/pastebin/S1zXfD5S/
11:33 jleon joined
11:33 <OliverMT> https://gist.github.com/olivermt/6f35c535f0ec58399eea588934ff007b
11:33 <OliverMT> fairly big project
11:33 <OliverMT> 57 db tables
11:34 <benwilson512> interesting
11:34 <benwilson512> you see that pyramid that forms with web/models ?
11:35 <benwilson512> my version of that is the thing that goes 32 deep, no idea how it's so connected
11:36 <jo> im using many many_to_many relations, so A -> B and B <- A
11:36 <benwilson512> yea
11:36 <OliverMT> I have a few of those as well
11:36 <OliverMT> but I generally only use many to many to do rich join tables
11:36 Jam666 joined
11:37 <benwilson512> ah I think I've using the source / sink backwards, maybe that will make this clearer
11:38 <OliverMT> you do the query in model thing
11:38 <benwilson512> hm?
11:38 <OliverMT> is that some kind of norm now?
11:38 <OliverMT> you have a query builder in there
11:38 <OliverMT> def measuring(query \\ __MODULE__, mq) do
11:39 <benwilson512> ah yea
11:39 <benwilson512> which specifically are you asking about, the query \\ __MODULE__ bit or having queries in the module at all?
11:39 <OliverMT> no, queries in the module
11:39 <benwilson512> ah IIRC that was the very first ecto convention
11:39 jleon joined
11:40 <benwilson512> I tend to just do it for queries that are incredibly common
11:40 cristianR_ joined
11:40 <benwilson512> and not tied to any particular work flow
11:40 <benwilson512> I have plenty of queries that exist co-located with some particular data need
11:40 <jo> yes, I only do queries in de models
11:41 <jo> but only building the query in the model, the actual querying is done in the controllers
11:42 <gazler> My poor project has gone through a series of Ecto and Phoenix conventions.
11:42 <gazler> It makes it easy to identify earlier code.
11:42 <benwilson512> heh yea
11:42 <gazler> At least I started with an umbrella.
11:43 <gazler> Except for one part of the project, which I brought into the umbrella with a subtree merge.
11:43 <gazler> benwilson512: Pro tip if you have 242 modules, some umbrella is better than no umbrella! :P
11:43 <OliverMT> I am not sold on umbrellas unless you have like 30 developers
11:44 <gazler> I am not sold on not umbrellas unless you are building a library.
11:44 <benwilson512> heh
11:44 <benwilson512> bleh, I can't figure out this xref thing, there's literally no files listed as compile time dependencies
11:44 <benwilson512> but if I change the file, 76 things recompile
11:45 <jo> boom :)
11:46 <benwilson512> to the forums!
11:48 wpcarro joined
11:48 harrow joined
11:49 Hawkheart joined
11:54 justelex_ joined
11:57 karreiro joined
12:00 m00dy joined
12:01 mk[] left
12:02 justelex_ joined
12:04 proteusguy joined
12:05 ctp joined
12:06 cemilowski joined
12:07 jerel joined
12:10 nighty-- joined
12:11 m00dy joined
12:12 PaReeOhNos joined
12:13 m00dy joined
12:17 gvaughn joined
12:18 jkreeftmeijer joined
12:19 craigp joined
12:21 dimitarvp joined
12:25 codestorm joined
12:29 wpcarro joined
12:33 proteusguy joined
12:37 jimmyrcom_ joined
12:41 Douman joined
12:42 <Douman> hej, anyone know where is phoenix web site repository is stored? not sure if i'm blind but i wasn't able to find it on github
12:42 m00dy joined
12:42 <gazler> Douman: It's hosted on readme.io at the moment.
12:43 ctp joined
12:43 <gazler> We will be moving it soon.
12:43 <Douman> hm... i wanted to fix version selection menu... it is lame cuz you get options from oldest versions...
12:44 <Douman> gazler: can i at least riase issue to improve site?
12:44 <Douman> raise*
12:44 <gazler> Douman: It won't be a problem when 1.3 is out. Check out https://github.com/phoenixframework/phoenix_guides/issues/680
12:44 <Douman> oh. ok
12:45 <Nicd-> Douman: your attitude is commendable :)
12:45 <Douman> um...? ok
12:45 <Nicd-> meaning it's good that you want to help
12:51 griffinbyatt joined
12:52 wpcarro joined
12:57 <Douman> gazler: i suppose seeing this issue, the documentation for 1.3 is not ready yet?
12:57 <gazler> Douman: It is in progress.
12:58 <Douman> i guess i gonna wait for 1.3 and they try out this phoenix stuff
12:58 <gazler> Douman: The only changes for 1.3 are the generators.
12:59 <Douman> oh? i remember seeing some upgrade instructions so i thought it wasn't so simple
12:59 <Douman> ok then
13:00 <gazler> The upgrades are optional, the big changes are to the file structure, however the same directory structure will work with phoenix 1.2 too.
13:01 <gazler> The release candidate of 1.3 is pretty stable too though, just some of the guides won't match up at the moment.
13:02 <Douman> yeah i was just thinking whether should i go for RC or try out 1.2 only
13:02 cdg joined
13:02 wpcarro joined
13:02 <Douman> well if basic concepts are the same i can use 1.2 guides for 1.3 then :D
13:03 ramortegui joined
13:04 <gazler> Douman: Yeah, the big thing about 1.3 is using "contexts" which are modules you interface with from your web layer. https://youtu.be/tMO28ar0lW8 describes the differences well.
13:04 <gazler> Although if it was me, I'd just jump straight in with starting a project. :)
13:04 <gazler> If you are going through the guides, replace `mix phoenix.*` with `mix phx.*`
13:06 <Douman> well i actually never used framewors such as phoenix. It produces lots of folders and files... not exactly easy without some guides
13:09 <benwilson512> yeah if you want the step by step process I'd either wait till 1.3 guides are finished, or just go with 1.2 and know that there will be a bit of reorganization required
13:09 <benwilson512> but nothing terrible
13:10 <OliverMT> no reason to reorganize to 1.3 structure just to use 1.3 imo
13:10 <OliverMT> the two can certainly coexist
13:11 <Douman> can anyone share actual working examples of phoenix btw?
13:11 <Nicd-> good or shitty? :D
13:12 <Douman> good :P
13:12 <benwilson512> Douman: hex.pm elixir's package manager is built with phoenix and is open source
13:12 <benwilson512> https://github.com/hexpm/hexpm
13:12 <Douman> ah yeah i forgot about hex.pm. thanks
13:12 <Douman> gonna take a peek eventually
13:13 <Douman> i'm not sure yet what exactly i'm going to build :D
13:13 kronicdeth joined
13:13 <benwilson512> the books are a pretty good place to start
13:13 <benwilson512> I'd make sure you're comfortable writing elixir code before jumping into phoenix
13:13 <benwilson512> otherwise you're gonna be doing a bunch of things and not understanding why
13:14 <Douman> i made some simple project to learn elixir :)
13:14 <Douman> so more or less i'm familiar with syntax
13:14 <Douman> though i also needed to learn a bit of erlang to easily read OTP docs :D
13:15 <benwilson512> fair enough
13:16 <Douman> I'm though not sure about elixir use cases... It seems to be fitting for web servers but other than that i'm not sure what else you could do with it
13:18 <benwilson512> well "web server" is an increasingly large umbrella these days but as an example of a very different scenario
13:18 <benwilson512> at cargosense we end up managing a bunch of sensor hardware that needs periodic upgrading and so forth
13:19 <benwilson512> so we have an elixir application that sits on a raspberry pi, hooked to 2x 49 port USB hubs
13:19 <benwilson512> and you plug in sensors to the hubs and it manages upgrading firmware and configuring those sensors
13:19 codestorm joined
13:19 <benwilson512> this works rather well because you can hold a state machine process per sensor that handles events as the upgrade process happens
13:20 maxbeizer joined
13:20 <benwilson512> of course we also hooked that up to a UI that shows the upgrade process in realtime w/ phoenix channels
13:21 <benwilson512> broadly speaking I'd say any situation that has significant concurrent IO is a situation where Elixir could do very well
13:23 <OliverMT> shuffling packets around works pretty well
13:23 <Nicd-> Douman: ok, then I won't show my own projects :D
13:23 <Douman> benwilson512: well considering that coding is more or less hobby it is really difficult to think of something more simple than just back-end
13:24 <benwilson512> sure I mean as far as starter projects go a basic web backend is a good wa yto go
13:25 wpcarro joined
13:25 <Douman> though by mentioning raspberry pi you reminded me that i need to revive my raspberry pi
13:29 jerel joined
13:30 Guest95 joined
13:31 <Douman> Nicd-: is your code so bad? :D
13:31 <Nicd-> eh, it's messy
13:31 <Nicd-> because I was learning a lot and it's only hobby stuff
13:31 <Nicd-> should refactor a lot to use contexts and stuff
13:32 jordan0day joined
13:33 kronicdeth joined
13:36 fernandomm joined
13:36 wpcarro joined
13:36 ssswitch joined
13:37 hbraun joined
13:40 patientplatypus joined
13:45 isubasti joined
13:47 jerel joined
13:50 boid joined
13:50 <OliverMT> my xref above here is pretty darn good imo
13:50 <OliverMT> very well defined service boundaries
13:50 <OliverMT> I love using lean services as the fourth component, and then chain services
13:50 <OliverMT> keeps it very functional style and clean and very easy to track
13:51 <OliverMT> and since repo.transaction is indempotent you can just keep calling it when nesting
13:51 <OliverMT> if you are doing complex chained deletes and whatnot
13:58 gvaughn joined
14:02 wpcarro joined
14:06 tuacker1 joined
14:13 codestorm joined
14:16 lexmag joined
14:17 karmajunkie joined
14:20 Sgeo joined
14:25 __charly__ joined
14:30 Sgeo joined
14:38 <dimitarvp> OliverMT: have a live example anywhere?
14:40 justelex_ joined
14:53 <benwilson512> OliverMT: I have to be very careful with my use of Repo.transaction
14:54 <benwilson512> because I do a lot of job queues, and if I try to enqueue something while the transaction is still running then the record won't exist yet
14:54 <benwilson512> or rather, won't be visible outside the transaction
14:54 <benwilson512> I need a composable after_transaction thing with multi
14:54 <benwilson512> that'd be an interesting proposal to make
14:58 <jer> benwilson512, i feel that pain, currently dealing with almost basically the same thing
14:58 <benwilson512> yeah in the end I solved it by trying to be more data driven
14:59 <jer> nod
14:59 <benwilson512> I have code that writes stuff to the DB and returns relevant data, and then I can use that to enqueue necessary things
14:59 <benwilson512> this has the handy side effect that if I ever need to re-run based on existing data
14:59 <benwilson512> I just pull the data I need out of the DB and push it at the queue oriented functions
14:59 <benwilson512> previously when the enqueing was deep in the db writing code it was too intermixed for that
15:00 <benwilson512> so all in all it's a largely positive limitation, but it does mean I have to be careful about composing transactions
15:00 <benwilson512> I can't just take something that expects to be top level and throw it in a transaction with something else
15:04 danguita joined
15:05 smt joined
15:08 codestorm joined
15:12 Sgeo joined
15:12 justelex_ joined
15:18 icecreamcohen joined
15:18 rlmccants joined
15:19 laut joined
15:20 wpcarro joined
15:20 strykerkkd joined
15:21 srxa joined
15:22 tuacker joined
15:24 flaviodesousa joined
15:24 refriedchicken joined
15:31 cschneid_ joined
15:32 chrismccord joined
15:33 meh` joined
15:34 gvaughn_ joined
15:34 gvaughn joined
15:37 SouvikB joined
15:37 greengriminal joined
15:39 wpcarro joined
15:41 codestorm joined
15:47 rozap joined
15:49 srxa_ joined
15:59 chenghiz joined
16:01 isubasti joined
16:03 superherointj joined
16:03 SouvikB joined
16:03 abort joined
16:04 <href> OA
16:04 <superherointj> href :)
16:04 <href> su :)
16:04 <href> er
16:04 <href> superherointj: :)
16:04 <href> sorry my terminal keeps doing shit :(
16:08 pusewicz_ joined
16:08 m00dy joined
16:13 ianclark joined
16:15 rlmccants joined
16:16 <icecreamcohen> hexkey[m]: any luck with bucket sort?
16:17 <hexkey[m]> I got it working, and even slightly faster than before
16:19 <icecreamcohen> want to update the gist so I can comment? I have a solution
16:19 <icecreamcohen> what were you testing with?
16:19 justelex_ joined
16:20 <hexkey[m]> just something like ``{elapsed, sorted} = :timer.tc(sorter, [list_segment])``
16:21 <icecreamcohen> how big were the lists, and how many buckets?
16:22 <hexkey[m]> I have something I need to take care of right now, but I can explain in detail in a few hrs
16:23 <icecreamcohen> ok.
16:24 PaReeOhNos joined
16:27 ianclark joined
16:28 elgenie joined
16:32 jeffweiss joined
16:32 msantos joined
16:35 davidw joined
16:39 bin7me[m] left
16:39 rodolfojcj joined
16:39 ejpcmac joined
16:42 mattyw joined
16:43 jleon joined
16:44 wpcarro joined
16:48 zv joined
16:48 akeating joined
16:50 kronicdeth joined
16:51 drincruz joined
16:53 superherointj joined
16:58 wpcarro joined
17:01 chrismccord joined
17:03 jleon joined
17:05 codestorm joined
17:11 jleon joined
17:14 MarioBranco joined
17:15 justelex_ joined
17:18 Cohedrin joined
17:20 OtherAllan joined
17:21 ianclark left
17:21 ianclark joined
17:21 ianclark left
17:23 ianclark joined
17:27 PaReeOhNos joined
17:31 <OliverMT> benwilson512: what do you use for the queues? genservers that poll psql?
17:41 chenghiz joined
17:44 jkreeftmeijer joined
17:47 jkreeftm_ joined
17:54 sp4rrow joined
17:58 d10n-work joined
17:59 codestorm joined
18:00 <benwilson512> OliverMT: postgres, polling genserver, BUT I also call the genserver immediately after writing the record so pre-empt polling
18:01 <benwilson512> polling is really used to catch stuff where the call failed for some reaosn
18:02 isubasti joined
18:05 PaReeOhNos joined
18:06 vircung joined
18:07 <OliverMT> same design as I have, just havent gotten around to implementing it yet
18:07 <OliverMT> still pondering using sqs now that they have fifo exactly once semantics
18:07 <OliverMT> the db is loaded enough as it is
18:09 <benwilson512> ah yeah I haven't had any issues there yet
18:10 <benwilson512> do you have a single queue table?
18:10 MarioBranco joined
18:11 <OliverMT> as I said, not gotten around to implementing yet
18:11 <OliverMT> but the plan was one table
18:11 <OliverMT> with a type column indexed
18:11 <OliverMT> so its quick to lookup specific queues
18:15 <benwilson512> ah yea
18:15 <benwilson512> that's what I do
18:17 rozap joined
18:19 wsieroci joined
18:22 Antiarc joined
18:22 vircung joined
18:23 josevalim_ joined
18:23 jleon joined
18:23 jschneck joined
18:26 potatosalad joined
18:26 smt joined
18:28 Alexander joined
18:29 josevalim joined
18:33 josevalim_ joined
18:36 josevalim_ joined
18:37 <bitmod> is there an official release date for 1.3 yet?
18:37 justelex_ joined
18:38 <bitmod> i see programming phoenix 1.3 has been pushed to december, was this following the projects suit?
18:39 josevalim joined
18:44 <chrismccord> bitmod : phoenix 1.3 has taken me longer to get out than planned. We also have to revamp the guides for 1.3 (currently underway) before the book
18:44 wsieroci joined
18:45 rlmccants joined
18:47 <bitmod> chrismccord: ok no worries chris, looking forward to its release
18:50 lexmag joined
18:51 karmajunkie joined
18:52 greengriminal joined
18:53 codestorm joined
18:55 cemilowski joined
18:55 m00dy joined
19:02 <notriddle> benwilson512: What you're describing seems very similar to what bors-ng does https://github.com/bors-ng/bors-ng/blob/master/apps/bors_worker/lib/batcher.ex
19:02 jdqx joined
19:02 <notriddle> Not sure if the way I'm doing it is very good, though...
19:03 rozap joined
19:08 PaReeOhNos joined
19:09 inoas joined
19:12 codestorm joined
19:16 justelex_ joined
19:21 PaReeOhNos joined
19:21 mozzarel1 joined
19:23 rozap joined
19:28 justelex_ joined
19:37 wsieroci joined
19:44 sp4rrow joined
19:45 <hexkey[m]> I'm back
19:46 <hexkey[m]> and with a functional bucket sort, too!
19:46 <hexkey[m]> https://gist.github.com/anonymous/bb43d774c6bd8e37bea69407df4a7f94
19:46 notdaniel joined
19:46 justelex joined
19:47 <hexkey[m]> I know it's not likely, but if anyone sees any space for improvments/ optimizations, could you give me some pointers?
19:48 <hexkey[m]> icecreamcohen: got that mergesort working if you're here
19:49 <icecreamcohen> hexkey[m]: why is num_buckets Enum.count(list) ?
19:49 <icecreamcohen> also, did you check mine out?
19:49 codestorm joined
19:50 <hexkey[m]> I must have missed it. have a link?
19:50 <hexkey[m]> also: https://en.wikipedia.org/wiki/Bucket_sort
19:50 <hexkey[m]> I was following along with the second paragraph under psuedocode
19:50 <icecreamcohen> i attached it to your gist
19:50 <icecreamcohen> yeah, n is the number of buckets
19:50 <icecreamcohen> but len(n) != len(array)
19:51 <icecreamcohen> otherwise, it’s insertion sort.
19:51 hashpuppy joined
19:54 <hexkey[m]> It looks like each bucket is within a tuple. Doesnt that make them as costly to update as the tuple?
19:54 <hexkey[m]> or am i reading this wrong?
19:54 <icecreamcohen> no, you’re right.
19:55 <icecreamcohen> adding to each bucket is cheap, as is setting / getting an element of a tuple
19:56 <icecreamcohen> it’s only 2x slower than Enum.sort
19:59 inoas joined
19:59 <icecreamcohen> hexkey[m]: Enum.map(…) |> Enum.flatten can be replaced by Enum.flat_map
19:59 <icecreamcohen> and I ran your new impl; with 1000 elems, it takes 49ms.
20:00 gazler_ joined
20:01 <hexkey[m]> I'm still trying to figure out how wikipedia's suggestion to use n buckets fits in here
20:01 <icecreamcohen> i don’t understand it; they later say that making it the size of the list makes it counting sort.
20:02 <icecreamcohen> also, for the same size data, Enum.sort == 170 microseconds my impl == 375 microseconds
20:02 <icecreamcohen> bbl
20:03 cdg joined
20:03 <hexkey[m]> I did a quick google and got sqrt(n) as another suggestion
20:03 <hexkey[m]> that at least makes more sense
20:04 <hexkey[m]> wait
20:04 <hexkey[m]> hmmm
20:04 <hexkey[m]> https://cs.stackexchange.com/questions/69962/number-of-buckets-for-bucket-sort-most-significant-bits
20:10 cemilowski joined
20:14 PSvils joined
20:17 isubasti joined
20:27 elgenie joined
20:33 wpcarro joined
20:43 codestorm joined
20:44 meh`_ joined
20:46 isubasti joined
20:47 justelex joined
20:50 mrEngineer joined
20:53 southpawlar joined
20:57 jkreeftmeijer joined
21:04 smt joined
21:06 srxa joined
21:07 wpcarro joined
21:09 papachan joined
21:09 <hexkey[m]> so I found that the bucket sort you wrote does work for small lists, but it seems to croak at larger ones
21:10 <icecreamcohen> hexkey[m]: define small / large
21:11 <icecreamcohen> I tested with 100k elements FYI
21:12 <hexkey[m]> I suppose I should mention that I did modify it a bit
21:13 <icecreamcohen> so, for 100k elements, the initial implementation in the gist basically never completes.
21:13 <hexkey[m]> here: https://gist.github.com/anonymous/77656ad762972fcf714e9b2569039095
21:14 pjhampton joined
21:15 ur5us joined
21:15 <icecreamcohen> all you changed was the bucket size, correct?
21:16 <hexkey[m]> I do also have a framework of sorts feeding it lists, but that shouldnt be an issue
21:16 jleon joined
21:17 rozap joined
21:17 <icecreamcohen> me too
21:17 <hexkey[m]> the think works fine when run from iex, too
21:17 <icecreamcohen> and changing out the modules that sort.
21:18 <icecreamcohen> How many items make it not return?
21:18 <icecreamcohen> I’m really curious.
21:18 <benwilson512> question
21:18 <benwilson512> could you sort the list up front?
21:18 <benwilson512> then you can just walk through the list and build just 1 bucket at a time
21:18 <icecreamcohen> well, it defeats the point of bucket sort.
21:18 <benwilson512> oooh
21:18 <benwilson512> duh
21:18 <benwilson512> missed that bit
21:18 <icecreamcohen> not really sure about bucket sort tbh
21:19 <hexkey[m]> I know, I just want to make it work
21:19 <hexkey[m]> so I can say I did
21:19 <icecreamcohen> hexkey[m]: how many elements make it crash?
21:20 <hexkey[m]> as it turns out: any number
21:20 <hexkey[m]> I get this:
21:20 <icecreamcohen> my algorithm or yours?
21:20 sp4rrow joined
21:20 <* hexkey[m]> sent a long message: hexkey[m]_2017-05-24_21:20:34.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/sEohbrPkDwhjCcCbqvPzkcWP>
21:20 <hexkey[m]> Yours, but run in my test framework
21:21 jleon joined
21:22 <hexkey[m]> I can upload the whole framework too if you want
21:22 mrEngineer joined
21:23 <icecreamcohen> so it crashes with one?
21:23 <hexkey[m]> with any number of items, really
21:23 <icecreamcohen> it crashes with [1] ?
21:24 <hexkey[m]> but not in iex
21:24 <hexkey[m]> okay, [1] gives a different error
21:25 jleon joined
21:25 <hexkey[m]> in that case it records no runtimes at all
21:27 sourpus5 joined
21:27 <hexkey[m]> okay, think I found something of note
21:28 <sourpus5> Hello everyone. I'm currently struggling to get decent editor support with elixir. I'm using emacs, and whenever I attempt to jump to a definition, it tells me it "doesn't know how to jump to that definition".
21:28 <sourpus5> I'm using the alchemist.el mode
21:28 <hexkey[m]> I have a decent setup I can share
21:28 <icecreamcohen> hexkey[m]: i’m all ears
21:28 <icecreamcohen> share it
21:29 <sourpus5> I've been writing a lot of go, and I came back to elixir, and I tried to goto, and it didn't work
21:29 <sourpus5> and I realized it makes live unlivable XD
21:29 <hexkey[m]> most of the stuff in here, minus any explicitly Windows things if that doesnt apply to you
21:29 <hexkey[m]> https://medium.com/@rpw952/elixir-development-on-windows-10-ff7ca03769d
21:30 <hexkey[m]> I also have a toolbar setup that's not included in this article
21:30 refriedchicken joined
21:30 <sourpus5> ahh, you're using atom
21:30 <sourpus5> I might have to give it a try
21:31 <hexkey[m]> yep, it's really nice
21:31 <hexkey[m]> also
21:31 <hexkey[m]> you might want these packages:
21:31 <* hexkey[m]> sent a long message: hexkey[m]_2017-05-24_21:31:15.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/yQTTwAWZjrGbQGpSnOrDJVZF>
21:31 <sourpus5> I've tried it, I just like to live in the command line
21:32 jleon joined
21:32 <hexkey[m]> It is nice, but a lot of them have so many ancient unixy relics that I have a hard time adjusting to
21:32 <hexkey[m]> one other thing:
21:32 <hexkey[m]> credo is a nice package, but I think you also have to include it as a dep
21:32 <hexkey[m]> I had a hard time gettting it to lint for me in realtime
21:33 <hexkey[m]> still usefull when run as `mix credo`
21:33 ciawal joined
21:33 <hexkey[m]> also, if you install tool-bar and tool-bar-almighty
21:33 <hexkey[m]> I have a really nice setup for those
21:35 <hexkey[m]> https://gist.github.com/anonymous/5842d548564632614ef35ff532a26bef
21:35 <hexkey[m]> there we go
21:36 <hexkey[m]> nice things it includes: insta-compile button with go-to links for errors, a 'open terminal' button, and an insta-git-commit button
21:36 jleon joined
21:37 codestorm joined
21:39 <* hexkey[m]> uploaded an image: Attachment (86KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/KkJUKmBpHfPyCvylnbzzVWOg>
21:39 <hexkey[m]> also, insta-docs with F2 key
21:40 <hexkey[m]> although that scrollbar bug is annoying
21:40 proteusguy joined
21:41 <hexkey[m]> what OS are you using/ planning on using for development?
21:41 <hexkey[m]> I really can't recommend windows, getting syntax highlighting, autocomplete etc to work is obnocious
21:41 dabe_ joined
21:41 <dabe_> clear
21:42 <hexkey[m]> or at the very least, run the code in unix
21:43 <hexkey[m]> I have a vm set up on my non-linux (due to lack of choice) box.
21:43 <hexkey[m]> also: clear? wat?
21:43 ejpcmac left
21:45 bphogan joined
21:49 <hexkey[m]> icecreamcohen: could you tell me specifically what `case round(num / bucket_range)` is doing?
21:49 <bphogan> Hi Elixir folks. I’m really curious about patterns for handling validations and collecting errors. I’ve seen a few ways… but is the general pattern that you just have many validation functions that each receive and return a list of error messages? Would love some pointers to example approaches.
21:51 <hexkey[m]> I am fairly new to the language, but having a process dedicated to handling errors is something I've seen some amount of
21:51 <hexkey[m]> writing them to a registry is also something I'd possibly suggest
21:51 <hexkey[m]> when needed, I mean
21:52 <hexkey[m]> as for validation, that's something I haven't gotten into yet much
21:52 <hexkey[m]> right now I just use `raise` gratuitously
21:53 <bphogan> hahah
21:53 <bphogan> I’m just sorta curious about the pattern.
21:54 <bphogan> It’s something I’ve taken for granted when a lot of libraries do it for me
21:55 Ilyes512 joined
21:55 <hexkey[m]> If you just ask yourself "what would this look like in a microservices approach?" you will usually start off on the right track
21:56 <hexkey[m]> that much I can tell you for sure
21:56 jleon joined
21:57 <bphogan> hahah
21:57 rozap joined
21:57 <hexkey[m]> one sec
21:57 <bphogan> The general consensus is that I’m on the right track - create some data structure that holds my data and an errors collection. Pass it through a bunch of validators that return the new structure, with any new errors added.
21:57 <hexkey[m]> I have an article that's really relevant to this
21:58 jkreeftmeijer joined
21:59 <hexkey[m]> here we go
21:59 PaReeOhNos joined
21:59 <hexkey[m]> big ugly pdf, slide 104
21:59 <hexkey[m]> http://www.erlang-factory.com/static/upload/media/1474809327462227martingausbyimplementingbittorrentinelixireuc2016.pdf
22:00 <hexkey[m]> the rest of the doc has a lot of other insight as well
22:00 jleon joined
22:01 chrismccord joined
22:03 squallstter joined
22:04 <fredsir> Im playing with elixir and phoenix, and reading a lot about it... One concern I have is, BEAM and thus elixir is famously not good for "number crunching" tasks compared to say python or go or rust and so on. Is that something that can be a problem in a phoenix project?
22:04 elgenie joined
22:04 jleon joined
22:05 <benwilson512> well
22:05 <chrismccord> fredsir this is repeated a lot, but no one ever offers up concrete examples. Unless you are doing some hard cmputations at scale, then likely not
22:06 <benwilson512> right, if you're doing machine learning, don't use elixir to do the computations, but if you're doing machine learning you're gonna want your python library anyway
22:06 <benwilson512> we use a phoenix / elixir backend to control a wide variety of ML and statistics jobs across several languages
22:06 <fredsir> right, makes sense
22:06 <benwilson512> it moves the data around effortlessly
22:07 <icecreamcohen> chrismccord: FWIW, I had to update a map 675,000 times and it was pretty slow.
22:07 <fredsir> chrismccord: how is it going with phoenix 1.3? any release date yet? (I havent been able to find any)
22:07 <chrismccord> icecreamcohen : seems unrelated to "number crunching"
22:07 <benwilson512> fredsir: it is not out quite yet, whether you know it or not you're probably the 10th person today to ask chris hahaha
22:08 <benwilson512> today
22:08 <chrismccord> fredsir : Soon^tm
22:08 <icecreamcohen> number crunching often relies on mutating data.
22:08 <fredsir> benwilson512: ha, well, alright, I could have guessed that :)
22:09 <fredsir> chrismccord: alright
22:09 <chrismccord> icecreamcohen did you consider ets instead?
22:09 <benwilson512> fredsir: as an aside, python isn't really any faster than Elixir, it's just that there's more C libraries with a python wrapper for number crunching
22:09 jleon joined
22:09 <benwilson512> fredsir: if you look at say the python dynamic time warping library all the heavy lifting is C
22:10 <fredsir> yeah, same with ruby, no?
22:10 <benwilson512> yup
22:10 <icecreamcohen> chrismccord: yes; also slow.
22:10 <icecreamcohen> in the end, I found a way to reduce the number of updates and it was acceptable.
22:11 <icecreamcohen> but in three years of elixir, that was the first time it wasn’t fast for me.
22:11 <fredsir> but the thing is, im not evaluating elixir vs ruby or python, im evaluating elixir vs rust, among others. I want something with web-stuff in a better language (to my taste) that is more performant and less old garbage laying around holding the ecosystem back
22:11 <asonge> icecreamcohen: just curious, what kind of algorithm were you implementing?
22:11 <icecreamcohen> asonge: I was building an inverted index
22:11 <fredsir> I love rust, but i dont find it ready yet (if ever) for web stuff tbh
22:12 <chrismccord> icecreamcohen : i read that as "i had to update a map of 675 *items*"
22:12 <fredsir> elixir and phoenix is interesting tho
22:12 <chrismccord> I see now you had to update the map 675k times
22:12 <icecreamcohen> chrismccord: lol… only two orders of magnitude off ;)
22:12 MarioBranco joined
22:12 <icecreamcohen> yeah, 675 times == NBD
22:12 <chrismccord> icecreamcohen : sorry, typo, I read it as "675k items"
22:12 jleon joined
22:13 <chrismccord> not performing at update 675k times
22:13 <alisdair> fredsir: elixir is competitive for io bound problems (like serving web pages) but rust is going to be better for cpu bound problems
22:13 <icecreamcohen> I even tried using the process dictionary
22:13 cemilowski joined
22:13 <icecreamcohen> (which was faster, but has significant drawbacks)
22:13 <fredsir> alisdair: thats what ive been told
22:13 <fredsir> ...indeed
22:14 <icecreamcohen> fredsir: Most web tasks are actually I/O bound, so Elixir / Phoenix work very well in the problem space.
22:14 <chrismccord> alisdair : but be careful framing it that way because elixir is fantastic for cpu bound systems because it load balances on both io and cpu
22:14 <fredsir> chrismccord: interesting
22:14 <icecreamcohen> *and* they provide a lot of friendly abstractions around error handling that are worthwhile.
22:14 <chrismccord> number crunching gets brought up a lot, but people have to compare the tradeoffs and why we are where we are
22:15 <fredsir> icecreamcohen: good to know
22:15 <icecreamcohen> hexkey[m]: You around any more?
22:15 <asonge> also, if you look at latency figures, they're very very steady, even under full load.
22:15 <chrismccord> when you are designing orchestration systems that "run forever" (years), you don't want an int overflow to take out the system a year from now
22:15 <icecreamcohen> +1000000^^
22:15 <asonge> and latency is actually more important than requests per second, but that's something benchmarkers aren't moving to yet.
22:15 <chrismccord> beam will happily allocate all of system memory to represent an int if it has to
22:15 <hexkey[m]> yes, and I found a list of numbers that crashes both iex and mix
22:16 <hexkey[m]> `[157,137,91,181,144]`
22:16 <asonge> crashes?
22:16 <asonge> are you still compiling with weird flags?
22:16 <chrismccord> works on my box^tm
22:16 <hexkey[m]> gives an argument error, I mean.
22:17 <alisdair> for what function?
22:17 <icecreamcohen> it’s probably my assignment fn
22:17 <icecreamcohen> which is dumb.
22:17 <hexkey[m]> I'm trying to make a bucketsort for the lulz
22:17 <asonge> otp 20 is going to be so nice, tbqh.
22:18 <hexkey[m]> sorry, which assigment function?
22:18 jleon joined
22:19 <hexkey[m]> the one in `build_distro_fn`?
22:20 <fredsir> chrismccord: would you mind commenting on what the best source is (to your knowledge and in your opinion) for explaing and mapping the differences between phoenix 1.2 and 1.3? As a beginner, the book i've read (programming phoenix) and the book i'm reading (function web development with elixir, otp and phoenix) as well as a lot of other sources is focused on 1.2, but i'm not really interested in 1.2
22:20 <fredsir> since 1.3 is here really soon... I've seen your ...
22:20 <fredsir> ... talk at, which conf was it (?) where you explained the differences, and i've read some articles on the topic, but I still feel I need a better source for it.
22:20 <icecreamcohen> hexkey[m]: yes
22:20 <alisdair> asonge: the os signals thing is nice. the rest is kinda meh
22:20 <asonge> alisdair: i'm more excited about some of the :crypto internals shuffling around
22:20 <chrismccord> fredsir https://www.youtube.com/watch?v=tMO28ar0lW8
22:21 <chrismccord> fredsir : oh you've seen the talk... then that's all there is to it
22:21 <bphogan> hexkey[m]: thank you!
22:21 <asonge> i think it has to do with improving nif support and improving the nifs/dirty schedulers, etc.
22:21 <asonge> but they added support for generating aes keys, for instance.
22:21 <hexkey[m]> for the setup details? in that case, you're welcome :)
22:22 <fredsir> chrismccord: yes thats the one ive watched... It might be all there is to it, a write up would be easier to navigate and utilize tho. In any case, thanks!
22:22 <hexkey[m]> so for that function,: is it written awkwardly, does it assign numbers in an ugly way, or both?
22:23 <icecreamcohen> hexkey[m]: let’s do this on a 1:1 chat
22:23 <hexkey[m]> sure
22:23 <icecreamcohen> can you see my messages?
22:26 <chrismccord> fredsir here's the writeup https://elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947
22:27 <fredsir> chrismccord: thanks!
22:28 sourpus5 joined
22:31 codestorm joined
22:32 squall joined
22:37 notdaniel joined
22:38 segmond joined
22:41 Cohedrin joined
22:41 jleon joined
22:42 isubasti joined
22:44 jleon joined
22:48 jleon joined
22:57 sp4rrow joined
23:01 <fredsir> Are there any _good_ benchmarks done compared phoenix against something like spring (java) and go (net/http, gorilla and so on) and rails and django and others?
23:05 maxbeizer joined
23:05 <icecreamcohen> fredsir: I haven’t seen any that take into account maintenance or correctness.
23:06 <fredsir> right, well, what im looking for is speed :)
23:06 <icecreamcohen> speed is a funny thing.
23:06 <fredsir> indeed
23:07 <fredsir> and one thing among a lot of things to take into account
23:07 <icecreamcohen> what type of speed?
23:07 <icecreamcohen> do you care about your p99 p999 p9999 ?
23:08 <icecreamcohen> what will your app do?
23:08 <fredsir> well, I could see page render speed being interesting (where pages is dynamically rendered with content from say postgres), and also stress how many users a typical phoenix app can service on x hardware compared to the other platforms
23:09 karmajunkie joined
23:09 <icecreamcohen> phoenix / elixir / erlang do some neat tricks when rendering templates
23:10 <icecreamcohen> Honestly, I don’t put much stock in benchmarks
23:10 jleon joined
23:10 <fredsir> icecreamcohen: im more evaluating phoenix and elixir for a set of tools to use for not one, but for many different apps as a kind of thing to bet on in the spectrum of "web site/app toolset" where django and rails also could be competitors, although i've never used rails in depth... I used django for years, but lately its been flask
23:10 <fredsir> but im looking for something new
23:11 <fredsir> icecreamcohen: sure sure, but they are still interesting to take into account, i find
23:11 <icecreamcohen> IDK, I’ve never found my use-cases to be what benchmarks measure
23:11 <fredsir> alright :)
23:11 <icecreamcohen> there’s almost always something else slowing you down.
23:11 <icecreamcohen> anyway, I used flask a lot in my last job
23:12 <icecreamcohen> and also elixir
23:12 <icecreamcohen> but not phoenix
23:12 <fredsir> right
23:12 <fredsir> i kinda like flask, but i despise python
23:12 <icecreamcohen> why don’t you like python?
23:12 <fredsir> part the language, but mostly the "ecosystem"
23:13 <icecreamcohen> what about the language don’t you like?
23:13 PaReeOhNos joined
23:13 <icecreamcohen> (I’m trying to see if elixir would make you happy)
23:13 <fredsir> and community ... too many "python 2 is good enough", and the whole deployment debugle and general tooling (pip is native but doesn't feel like it and should u use requirements.txt or setup.py or both and so on)
23:14 <icecreamcohen> that’s a fair criticism.
23:14 <icecreamcohen> I’ve found python’s tooling to be lacking.
23:14 <icecreamcohen> especially compared to Ruby’s bundler, Clojure’s leiningen and Elixir’s mix.
23:15 <fredsir> icecreamcohen: i dont like its indent based, i dont like how it handles (or doesnt) closures, and that its so non functional (i prefer functional to oop, if you set it up black and white like that)
23:15 bvcosta joined
23:16 <icecreamcohen> WRT closures, not call/cc ?
23:16 <icecreamcohen> sorry, not having call/cc ?
23:17 <fredsir> welll
23:17 <fredsir> well*
23:17 <fredsir> yes but also simply the syntax of lambda
23:17 <fredsir> its just
23:17 <fredsir> inadequite
23:17 <icecreamcohen> yeah
23:17 <icecreamcohen> totally
23:18 <fredsir> inadequate*
23:18 <icecreamcohen> and defs in the middle of functions are also weird
23:18 <fredsir> indeed
23:18 <icecreamcohen> personally, I couldn’t tell what python’s idea was; OO felt bolted on, functional was discouraged
23:19 <fredsir> yeah, its not to my taste, no doubt about it
23:19 <fredsir> although it has probably been "the best in a bunch of bad stuff" for a while
23:20 wpcarro joined
23:20 <icecreamcohen> I always preferred ruby
23:21 <fredsir> well, back in the day when i needed a language like python and ruby, and ended up choosing python
23:21 <icecreamcohen> so, if you find flask acceptable, I’ve found Elixir’s perf to be at least several orders of magnitude faster
23:21 <fredsir> dunno why
23:21 <icecreamcohen> without really trying.
23:21 <icecreamcohen> and it has really good runtime tools for figuring out where things went wrong
23:21 <fredsir> but today, i really like not using neither python nor ruby :D
23:22 <fredsir> well, flask is usable performance wise, although i'm also hoping for performance gain now that im switching
23:22 <icecreamcohen> Elixir has replaced ruby as my favorite lang, btw.
23:22 <fredsir> i can see why - familiar syntax, and a lot of cool stuff like pattern matching
23:23 Cohedrin joined
23:23 <icecreamcohen> the syntax is the least of it, honestly.
23:23 <icecreamcohen> It’s ruby-ish
23:23 <icecreamcohen> but that wasn’t the draw for me.
23:23 <fredsir> yeah, but it probably wasnt a negative factor either
23:24 <fredsir> like, syntax wise, there were no reason not to switch
23:24 <fredsir> and then came all the cool features
23:24 <icecreamcohen> well, I was doing python
23:24 <icecreamcohen> last 5 years
23:24 <icecreamcohen> I saw elixir 3 years ago, and deployed it 2 years ago.
23:25 <icecreamcohen> chances are, if your app is at all I/O bound, elixir / phoenix will be fast enough
23:25 <fredsir> and its been silky clouds ever since ? :P
23:26 codestorm joined
23:26 <icecreamcohen> I guess.
23:26 <icecreamcohen> I’ve been using it primarily as a backend server architecture though
23:27 <icecreamcohen> but arguably, that’s tougher than a web-tier thing
23:27 <fredsir> when you say backend server thing, you mean?
23:28 <fredsir> backend server archutecture*
23:28 <fredsir> architecture*
23:28 <icecreamcohen> sorry, I’ve been using it for backend servers
23:28 <icecreamcohen> stuff that takes data from databases, munges it and returns it
23:28 <icecreamcohen> stuff that takes data from kafka, munges it and writes it somewhere
23:29 <icecreamcohen> stuff that takes requests and decides if they should be rate limited
23:29 <fredsir> gotcha
23:29 jleon joined
23:29 <icecreamcohen> but not stuff that takes requests, reads from databases and emits HTML
23:29 <icecreamcohen> I _have_ emitted JSON
23:29 <fredsir> alright
23:29 <icecreamcohen> elixir is super good at that.
23:30 <fredsir> good to know
23:30 <icecreamcohen> also, this is good: http://www.evanmiller.org/elixir-ram-and-the-template-of-doom.html
23:33 isubasti joined
23:33 jleon joined
23:33 karmajunkie joined
23:34 <fredsir> icecreamcohen: yeah, i actually read about io list the other day
23:34 Cohedrin joined
23:35 <icecreamcohen> IIRC, phoenix makes heavy use of them
23:36 <fredsir> yeah, that was the context i read about it in - why it was very performant for outputting html/json and so on :)
23:37 <fredsir> found it on HN
23:37 <icecreamcohen> “performant” —pet peeve of mine
23:37 <icecreamcohen> *shudder*
23:37 <icecreamcohen> yeah, good article though
23:38 <icecreamcohen> Oh, elixir also has fast DB drivers if that’s any help.
23:38 jleon joined
23:39 Cohedrin joined
23:40 <fredsir> yeah, i read something about that yesterday too, so that was also my impression
23:40 <fredsir> also that it (with ecto i believe) can stream lazily from a db
23:40 <icecreamcohen> let’s put it this way; I have serious doubts that elixir wil be your bottleneck. Even at significant scale.
23:40 <fredsir> which in some cases can be very beneficient
23:41 <fredsir> icecreamcohen: i dont dout it either, but im on a quest to do the most amount of primature optimization possible
23:41 <fredsir> :)
23:41 <fredsir> doubt*
23:42 <icecreamcohen> don’t do that!
23:42 <fredsir> its a joke
23:42 <fredsir> but really, im evaluating languages to see which has most reasons to use it
23:42 <fredsir> languages/ecosystems
23:42 wpcarro joined
23:42 <icecreamcohen> is this a personal project?
23:43 jleon joined
23:43 <fredsir> not a single project, more of a "which direction to spend time to specialize"
23:43 <fredsir> and it will be used for both professional and personal projects
23:44 <fredsir> which has the best community, best libraries, which is "faster than the next one", and so on and so on are all interesting factors to consider
23:47 <hexkey[m]> one good speed resource: https://benchmarksgame.alioth.debian.org/
23:48 sp4rrow joined
23:48 hugo_dc joined
23:49 <fredsir> yes :)
23:50 ssswitch joined
23:55 Cohedrin joined
23:56 wpcarro joined
23:57 cschneid_ joined
23:59 wpcarro joined
23:59 dj_goku joined
23:59 dj_goku joined