<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for hubertlepicki</title><link>http://disqus.com/by/hubertlepicki/</link><description></description><atom:link href="http://disqus.com/hubertlepicki/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 19 Apr 2018 02:58:58 -0000</lastBuildDate><item><title>Re: Mock current time in Elixir - Adam Niedzielski</title><link>https://blog.sundaycoding.com/blog/2018/01/12/mock-current-time-in-elixir/#comment-3862206601</link><description>&lt;p&gt;Hey, so if you are still looking on a way to do it concurrently, I think you can use &lt;a href="https://github.com/plataformatec/mox" rel="nofollow noopener" target="_blank" title="https://github.com/plataformatec/mox"&gt;https://github.com/platafor...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 19 Apr 2018 02:58:58 -0000</pubDate></item><item><title>Re: Ketoza i dieta ketogeniczna: FAQ / Q&amp;#038;A</title><link>http://livethenature.com/ketoza-i-dieta-ketogeniczna/#comment-3743321160</link><description>&lt;p&gt;Bardzo fajny artykuł. Mam co linkować znajomym pytającym o dietę ketogeniczną.&lt;/p&gt;&lt;p&gt;Pierwszy problem który znalazłem to że:&lt;br&gt;- stewia może powodować wzrost poziomu insuliny. To jest błąd, który może wynikać z tego że w sprzedaży są słodziki które zawierają stewię *oraz inny słodzik* np. maltodekstrynę. Trzeba czytać skład. Czysta stewia nie ma prawa podwyższać poziomu insuliny, nie jest cukrem, nie jest trawiona jak cukry a nawet sama ilość stewii wystarczająca do słodzenia jest tak mała że gdyby nawet była cukrem to nie miała by znaczenia. Podobnie rzecz ma się z resztą z sukralozą (którą można z powodzeniem stweię zastąpić jeśli nie lubimy posmaku stewii).&lt;/p&gt;&lt;p&gt;Drugi problem to że wymieniasz że na diecie musisz jeść ekologiczne i zdrowe produkty. Wcale nie, możesz zjadać 8 hamburgerów z makdonalda i dopychać się wysoko przetworzonymi parówkami i mortadelą i ketoza będzie działać. Jedzenie zdrowszych produktów będzie miało pozytywne skutki oczywiście ale jeśli chodzi nam jedynie o spalanie tłuszczu to nie ma znaczenia czy jemy jagnięcinę wypasaną na Islandzkich łąkach, czy wieprzowinę z polskiej fabryki.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Mon, 05 Feb 2018 04:55:15 -0000</pubDate></item><item><title>Re: Things I wish ActiveRecord had after using Ecto</title><link>https://infinum.co/the-capsized-eight/267#comment-3722570259</link><description>&lt;p&gt;You missed two fairly important and big features:&lt;/p&gt;&lt;p&gt;1. Ecto.Multi - a way to wrap up transactions in a monad-like thingy&lt;br&gt;2. Different way database connections are handled, i.e. are used only when needed. ActiveRecord / Rails wastes a lot of time keeping idle connections open, because of the way ithandles transactions and associations it needs to keep those open. &lt;a href="https://www.amberbit.com/blog/2016/2/24/how-elixirs-ecto-differs-from-rubys-activerecord/#Handling" rel="nofollow noopener" target="_blank" title="https://www.amberbit.com/blog/2016/2/24/how-elixirs-ecto-differs-from-rubys-activerecord/#Handling"&gt;https://www.amberbit.com/bl...&lt;/a&gt; database connections&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Tue, 23 Jan 2018 14:13:10 -0000</pubDate></item><item><title>Re: Things I wish ActiveRecord had after using Ecto</title><link>https://infinum.co/the-capsized-eight/267#comment-3722565618</link><description>&lt;p&gt;but it's not the kind of composition you might know from ActiveRecord...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Tue, 23 Jan 2018 14:10:39 -0000</pubDate></item><item><title>Re: 

(Abusing) Ecto as Elixir data casting and validation library

</title><link>https://www.amberbit.com/blog/2017/12/27/ecto-as-elixir-data-casting-and-validation-library/#comment-3681313851</link><description>&lt;p&gt;in short: I have two extra layers. Dumb "schemas" that only have generic 'changeset' function allowing you to set any attributes, and they also declare associations. No business logic here. And then I have a layer of entities managers, that take data from business layer (services) and persist it using database access layer (schemas).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 28 Dec 2017 04:45:45 -0000</pubDate></item><item><title>Re: 

(Abusing) Ecto as Elixir data casting and validation library

</title><link>https://www.amberbit.com/blog/2017/12/27/ecto-as-elixir-data-casting-and-validation-library/#comment-3681313015</link><description>&lt;p&gt;I am putting together a (mini) book that will get to that topic in details. The above is pretty much extract from one of the chapters. I will put together a readable beta version shortly.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 28 Dec 2017 04:44:18 -0000</pubDate></item><item><title>Re: 

(Abusing) Ecto as Elixir data casting and validation library

</title><link>https://www.amberbit.com/blog/2017/12/27/ecto-as-elixir-data-casting-and-validation-library/#comment-3681267045</link><description>&lt;p&gt;good point!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 28 Dec 2017 03:19:16 -0000</pubDate></item><item><title>Re: 

(Abusing) Ecto as Elixir data casting and validation library

</title><link>https://www.amberbit.com/blog/2017/12/27/ecto-as-elixir-data-casting-and-validation-library/#comment-3680499596</link><description>&lt;p&gt;yeah... that's probably the most confusing part. The missing `:action` got me more than once, so just had to write this stuff down, will better remember myself :D&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Wed, 27 Dec 2017 13:58:56 -0000</pubDate></item><item><title>Re: 

AmberCasts #1 Ruby on Rails development environment with Docker and docker-compose

</title><link>https://www.amberbit.com/blog/2017/6/14/ruby-on-rails-development-environment-with-docker-and-docker-compose/#comment-3633232135</link><description>&lt;p&gt;hey, that's just Gnome on Arch Linux over there :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Sun, 26 Nov 2017 02:50:27 -0000</pubDate></item><item><title>Re: 

Time zones in PostgreSQL, Elixir and Phoenix

</title><link>https://www.amberbit.com/blog/2017/8/3/time-zones-in-postgresql-elixir-and-phoenix/#comment-3609271632</link><description>&lt;p&gt;See this is some sort of compromise. Yes, it is unsafe, but if you have events that span across multiple time zones you will never have a silver bullet. In case of a time zone change, the event's start date would change for at least some of your users.&lt;/p&gt;&lt;p&gt;That was the exact choice I was given in fact and we decided that having a common denominator in form of UTC is not the worst decision ever.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Fri, 10 Nov 2017 02:01:32 -0000</pubDate></item><item><title>Re: 

Elixir :applications vs :extra_applications - a guide

</title><link>https://www.amberbit.com/blog/2017/9/22/elixir-applications-vs-extra_applications-guide/#comment-3560683961</link><description>&lt;p&gt;Glad I could be of a help&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Tue, 10 Oct 2017 11:53:34 -0000</pubDate></item><item><title>Re: A different approach to testing elixir with mocks/doubles</title><link>http://teamon.eu/2017/different-approach-to-elixir-mocks-doubles/#comment-3542003016</link><description>&lt;p&gt;ah. I like the callbacks, it warns you if something is defined in mock but not in real implementation. Does the other thing do that too?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Fri, 29 Sep 2017 06:48:25 -0000</pubDate></item><item><title>Re: A different approach to testing elixir with mocks/doubles</title><link>http://teamon.eu/2017/different-approach-to-elixir-mocks-doubles/#comment-3541994047</link><description>&lt;p&gt;You should check out mox. &lt;a href="https://github.com/plataformatec/mox" rel="nofollow noopener" target="_blank" title="https://github.com/plataformatec/mox"&gt;https://github.com/platafor...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;the current (unreleased) version of master has the support for Rspec-like mocks and stubs, i.e. function calls that are required to be called and function calls that are optional. It's pretty handy.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Fri, 29 Sep 2017 06:37:05 -0000</pubDate></item><item><title>Re: 

Time zones in PostgreSQL, Elixir and Phoenix

</title><link>https://www.amberbit.com/blog/2017/8/3/time-zones-in-postgresql-elixir-and-phoenix/#comment-3449511777</link><description>&lt;p&gt;@Michał Muskała thanks for the tips! I have corrected the article. I have also copied your example for reference (and attributed to you) hope that's fine!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 03 Aug 2017 07:26:32 -0000</pubDate></item><item><title>Re: 

How learning Elixr made me better Ruby developer

</title><link>https://www.amberbit.com/blog/2017/7/27/how-learning-elixir-made-me-better-ruby-developer/#comment-3439775787</link><description>&lt;p&gt;I don't see how this is related. You don't modify the data in place, you return new objects from each step in the pipeline.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Fri, 28 Jul 2017 05:41:12 -0000</pubDate></item><item><title>Re: 

How learning Elixr made me better Ruby developer

</title><link>https://www.amberbit.com/blog/2017/7/27/how-learning-elixir-made-me-better-ruby-developer/#comment-3438335620</link><description>&lt;p&gt;That's true! I'm missing true pipe operator *and* pattern matching in function heads a lot when writing Ruby code :(. Would not hurt if it checked compile-time function names for typos either. Those are the 3 things Elixir does better for sure :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 27 Jul 2017 10:24:24 -0000</pubDate></item><item><title>Re: 

How learning Elixr made me better Ruby developer

</title><link>https://www.amberbit.com/blog/2017/7/27/how-learning-elixir-made-me-better-ruby-developer/#comment-3438235387</link><description>&lt;p&gt;True that!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 27 Jul 2017 09:20:52 -0000</pubDate></item><item><title>Re: 

AmberCasts #1 Ruby on Rails development environment with Docker and docker-compose

</title><link>https://www.amberbit.com/blog/2017/6/14/ruby-on-rails-development-environment-with-docker-and-docker-compose/#comment-3360911426</link><description>&lt;p&gt;I know that docker-compose down will discard those volumes. But they persist after reboots for me... Hmm I'm pretty new to the whole thing so may not be understanding something and I may be doing something wrong.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Wed, 14 Jun 2017 14:55:14 -0000</pubDate></item><item><title>Re: 

AmberCasts #1 Ruby on Rails development environment with Docker and docker-compose

</title><link>https://www.amberbit.com/blog/2017/6/14/ruby-on-rails-development-environment-with-docker-and-docker-compose/#comment-3360864446</link><description>&lt;p&gt;ok, but somehow docker-compose always mounts the same volume for me. So unless I want to specify my own directory I don't really have to specify anything more than:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;  db:&lt;br&gt;    image: postgres&lt;br&gt;&lt;/pre&gt;&lt;p&gt;&lt;br&gt;Unless I am mistaken? :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Wed, 14 Jun 2017 14:38:11 -0000</pubDate></item><item><title>Re: 

Handling URL redirects in Phoenix with Plug

</title><link>https://www.amberbit.com/elixir-cocktails/phoenix/handling-url-redirects-in-phoenix-with-plug/#comment-3266563885</link><description>&lt;p&gt;So your plug should look like something like this:&lt;/p&gt;&lt;p&gt;defmodule RedirectsPlug do&lt;br&gt;  import Plug.Conn&lt;/p&gt;&lt;p&gt;  def init(options), do: options&lt;/p&gt;&lt;p&gt;  def call(conn, options) do&lt;br&gt;    to = options[conn.request_path]&lt;br&gt;    do_redirect(conn, to)&lt;br&gt;  end&lt;/p&gt;&lt;p&gt;  defp do_redirect(conn, nil), do: conn&lt;/p&gt;&lt;p&gt;  defp do_redirect(conn, to) do&lt;br&gt;    conn&lt;br&gt;    |&amp;gt; Phoenix.Controller.redirect(to: to)&lt;br&gt;    |&amp;gt; halt&lt;br&gt;  end&lt;br&gt;end&lt;/p&gt;&lt;p&gt;and don't forget to also include it in endpoint.ex *before* call to router plug since putting it in router will no longer work either.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Fri, 21 Apr 2017 05:34:45 -0000</pubDate></item><item><title>Re: 

Handling URL redirects in Phoenix with Plug

</title><link>https://www.amberbit.com/elixir-cocktails/phoenix/handling-url-redirects-in-phoenix-with-plug/#comment-3266559730</link><description>&lt;p&gt;As the comment above suggests, you should use request_path instead.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Fri, 21 Apr 2017 05:28:29 -0000</pubDate></item><item><title>Re: 

Elixir - different kind of promises

</title><link>https://www.amberbit.com/blog/2017/3/7/elixir-different-kind-of-promises/#comment-3194299467</link><description>&lt;p&gt;name a serious project where this wasn't the case eventually...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Thu, 09 Mar 2017 07:07:11 -0000</pubDate></item><item><title>Re: 

Creating Elixir libraries as OTP applications

</title><link>https://www.amberbit.com/blog/2016/5/10/creating-elixir-libraries-as-otp-applications/#comment-3130091810</link><description>&lt;p&gt;Than you so much @sasajuric on clarifying this. I'll update the post.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Tue, 31 Jan 2017 08:26:18 -0000</pubDate></item><item><title>Re: 

How to deploy Rails App on a VPS

</title><link>https://www.amberbit.com/blog/2015/11/28/how-to-deploy-rails-on-a-vps/#comment-3127778691</link><description>&lt;p&gt;The easiest way to do it, is to create multiple users on the server. I usually do it this way:&lt;/p&gt;&lt;p&gt;/home/app1&lt;br&gt;/home/app2&lt;br&gt;/home/app3&lt;/p&gt;&lt;p&gt;etc. For each app, you can then use very similar capistrano deployment strategy, just replace the username with name of server user.&lt;/p&gt;&lt;p&gt;You also want to create multiple nginx server config files (we put them in /etc/nginx/sites-available and symlink to /etc/nginx-sites-enabled), where your server_name will be unique, and upstream name as well (it's a gotcha). You point each nginx config file to individual app.&lt;/p&gt;&lt;p&gt;This way you can enable/disable those individual apps as you please, by simply removing the symlink from sites-available directory and reloading nignx. Hope that helps!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Mon, 30 Jan 2017 04:19:41 -0000</pubDate></item><item><title>Re: Getting ready for new concurrency in Ruby 3 with Guilds</title><link>https://mensfeld.pl/2016/11/getting-ready-for-new-concurrency-in-ruby-3-with-guilds/#comment-3043686783</link><description>&lt;p&gt;Do you have any idea if Ruby 3 will have some sort of mechanism for dynamically controlling the guilds? I mean, what guilds are started, catching the exceptions, restarting them when needed etc?&lt;/p&gt;&lt;p&gt;I am mind blown with Eralng's handling of concurrency. Not only it's pretty easy to understand parallelism (thanks to immutable data structures), but the supervision / control mechanism is quite awesome.&lt;/p&gt;&lt;p&gt;Threads are a mess in most languages. Erlang's the only solution that seems elegant to me, one that we, programmers with limited brain capacity can actually understand, design and control.&lt;/p&gt;&lt;p&gt;Guilds so far look like another layer of abstraction, and APIs to learn, not sure if that will do more harm or good in the end.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hubertlepicki</dc:creator><pubDate>Fri, 09 Dec 2016 04:45:18 -0000</pubDate></item></channel></rss>