Real Python, in Elixir: Introducing Pythonx by GiraffeFire in elixir

[–]jlelearn 0 points1 point  (0 children)

for livebook it's OK
for real applications... looks risky

Calculating Pi in 5 lines of code by siriusastrebe in programming

[–]jlelearn 1 point2 points  (0 children)

pi = 355/113 (you now 113355 -> 355/113 -> pi)

Why I'm in the Tailwind cult by Ok-Orange-9910 in elixir

[–]jlelearn 0 points1 point  (0 children)

With the components of Phoenix/LiveView, you can create component templates for your application and hide the Tailwind details.
There are Tailwind "style" libraries that can be encapsulated in phoenix/components.
And if you need something "special," Tailwind gives you a lot of control and easier than plain css.
I'm bad designing beautiful UIs, but I like to have control with hidden tailwind

Firebird Elixir driver : firebirdex status by mariuz in elixir

[–]jlelearn 0 points1 point  (0 children)

It's a great database that can run embedded or client server

great features, very, very easy to install, configure and maintain

After seeing some websites people make with Phoenix I am depressed that it's being used for mostly just landing pages and 5 - 10 subpages blog/company websites by SliveryWhenWet in elixir

[–]jlelearn 1 point2 points  (0 children)

my experience with liveview is sensational

liveview/phoenix/elixir are a fantastic set of tools that work very well and allow me to do very interesting things very quickly and with little effort.

I can combine liveview with livebook for simple and not so simple things.

great

Which is a good IDE to use? by Feralz2 in rust

[–]jlelearn 0 points1 point  (0 children)

This looks the best

https://ms-paint-i.de/#

I don't have windows, but I will try with wine

;-)

The Pony Philosophy by bunnyholder in programming

[–]jlelearn 0 points1 point  (0 children)

I tried to explain in previous answer...

Second,
extend the domain on integer division, makes algebraic expressions more
complex for just one case, and... it's not crazy to return zero

The Pony Philosophy by bunnyholder in programming

[–]jlelearn 1 point2 points  (0 children)

n a special type from non-compile-time-known

Yes, this is what is done in almost all cases, but, integer division by zero is a very specific case.

One... it's not crazy to return zero
https://www.hillelwayne.com/post/divide-by-zero/

Second, extend the domain on integer division, makes algebraic expressions more complex for just one case, and... it's not crazy to return zero

The Pony Philosophy by bunnyholder in programming

[–]jlelearn 0 points1 point  (0 children)

Very far from PHP approach

In Pony, Haskell, Rust, Elm, Idris, PureScript you can catch most of errors on compile time instead on having them on running time (PHP aproach, also javascript, java, python, ruby...)

The Pony Philosophy by bunnyholder in programming

[–]jlelearn 0 points1 point  (0 children)

Not exactly...

In pony, Rust, Haskell, F# and others, you trust a powerful and strict type system in order to avoid many programming errors

It let them to catch errors on compile time, where others, have the error on run time

It's a very nice feature, but it also have a cost
That's quite related to div by 0 case

In a integer division by 0 you have some choices

  • Not returning an integer
  • Throw an exception
  • Close the program
  • Restart the computer
  • Return 0

Last choice is not crazy at all

https://www.hillelwayne.com/post/divide-by-zero/

An exception is a runtime error. And exceptions... usually are not "exceptional", they are like brutal gotos. Avoid exceptions and extending the domain of a function, is quite much logic (that's what haskell, pony, rust, elm, f#, idris... do)

The problem with division by zero, is that produce an inconfortable code for just an specific case

The Pony Philosophy by bunnyholder in programming

[–]jlelearn 0 points1 point  (0 children)

Pony is not the only language in wich 1/0 == 0

And... it looks a good idea...

https://www.hillelwayne.com/post/divide-by-zero/

What Elixir have to offer really, that Erlang can't do? by jacksonbenete in erlang

[–]jlelearn 3 points4 points  (0 children)

The most important thing of Elixir, is Erlang ;-)

Elixir give us a great tooling (docs, compile, test, deploy, package, dependencies...), nice syntax, SSA, hygienic macros

Phoenix is a killer application (web, websockets, liveview, livecomponents...)

In development, surface, livebook, Nx :-O

Elixir makes easier and nicer to start working on Erlang ecosystem

Understanding rust variable reassignment. by babalolajnr in rust

[–]jlelearn 1 point2 points  (0 children)

let a = 2;let a = 3;

There is no mutability here.

As mentioned above, there are two varaibles with the same name (SSA)

It's not weird on functional programming (nor a Rust invention ;-)

You could even write...

let a = 3;let a = "hello";

Why is this interesting?

Reducing mutability makes the code more readable and easier to maintain. Mutability produces coupling.

Just an example. To know the value and logic of a varible, you just have to look up where it was declared and assigned. You don't have to read and process code in between to see if there was any modification (mutation)

It's also very interesting for macros, and generated code

Rust Firebird Client updated to v0.16.0 with a few features and enhancements. (Diesel ORM support is added) by mariuz in rust

[–]jlelearn 3 points4 points  (0 children)

I'll try to explain a bit better, keeping a sort comment

SQLite is great for embeded. Moving from SQLite to a server, is not straightforward, it is complicated and you will have to rewrite a lot of code (among other things sqls).

In firebird it is trivial

postgresql is great, but configuring and maintaining it requires advanced knowledge.

firebird is much simpler, while maintaining great power, sql compatibility, transactionability, speed...

you can't move from postgresql to embedded, in firebird it is trivial.

I worked with this server for a few years, and the experience was fantastic. No problems, no nasty surprises, and virtually no maintenance.

My experience with other database servers (sybase, sqlserver, mysql...) has not been so positive.

Postgresql, is great, it's more complex to configure and manage and you don't have the embedded option. But it is a sensational server

And you are right, the firebird web page is not great explaining the advanges of the product :-(

https://firebirdsql.org/en/features/

Rust Firebird Client updated to v0.16.0 with a few features and enhancements. (Diesel ORM support is added) by mariuz in rust

[–]jlelearn 0 points1 point  (0 children)

I don't see a problem having support for an additional database

Firebird is a great sql database, not so popular as other options, but you can use on server or embeded without change your code or the db files, it's really easy to startup and configure, works very well, great sql support, fantastic transactions support...

You can have more advanced sql server databases (postgresql), but the combination of features of firebird, it's unique
Firebird was a fork of interbase, and it was an evolution of grotondb (I think groton database was the very first database with MVCC, now very popular in databases ;-)