Lompat ke konten utama
EP 89

Ngobrolin Elixir

Ringkasan Episode

Bantu Koreksi

Episode ini membahas tentang Elixir, bahasa pemrograman fungsional yang berjalan di BEAM (Erlang Virtual Machine), bersama tamu spesial Alan Weimah. Diskusi dimulai dengan latar belakang Alan yang berpindah dari Ruby ke Elixir karena ketertarikannya pada pemrosesan multi-core dan concurrent programming. Topik utama meliputi perbedaan antara concurrency dan parallelism, konsep green thread, keunggulan model pemrosesan Elixir yang menggunakan copy of data untuk menghindari mutex dan locking, serta perbedaan mindset antara OOP dan functional programming. Alan juga menjelaskan tentang OTP (Open Telecom Platform), Phoenix framework, Phoenix LiveView untuk real-time web applications, serta berbagai use case yang cocok untuk Elixir seperti aplikasi web, sistem telekomunikasi, dan aplikasi real-time.

Poin-poin Utama

  • Elixir adalah bahasa pemrograman fungsional dinamis yang berjalan di atas BEAM (Erlang Virtual Machine) dengan keunggulan pada concurrent dan parallel processing menggunakan konsep green thread yang sangat ringan (sekitar 1 kilobyte per proses)
  • Model pemrosesan Elixir menggunakan copy of data antar proses sehingga tidak memerlukan mutex atau locking, berbeda dengan pendekatan shared memory pada bahasa lain yang rentan terhadap race conditions
  • Perbedaan mindset antara OOP dan functional programming: OOP fokus pada methods di dalam object, sementara functional programming fokus pada transformasi data melalui pipeline dengan pipe operator
  • OTP (Open Telecom Platform) adalah koleksi library pattern yang telah teruji selama 30 tahun, mencakup supervisor untuk monitoring proses, GenServer untuk background processes, dan Mnesia untuk database
  • Phoenix framework dengan LiveView memungkinkan pembuatan real-time web applications yang sangat efisien menggunakan WebSocket dan hanya mengirimkan perubahan HTML (diff) ke klien
  • Elixir mampu menskalakan aplikasi secara vertikal (menambah resource pada satu mesin) maupun horizontal (menambah lebih banyak mesin dengan networking built-in)
  • Beberapa perusahaan besar telah berhasil mengurangi penggunaan server secara drastis dengan bermigrasi ke Elixir, contoh yang dibahas adalah Bleacher Report yang mengurangi dari 120+ server menjadi hanya 5 server

Halo-halo-halo selamat malam.

Halo selamat malam semua, apa kabar?

Selamat malam.

Inggris mood, Inggris mood.

Inggris mood.

Let's like, let's speak Inggris.

Let's speak Inggris.

Bisa jadi tutorial belajar bahasa ya.

Let's learn Inggris tonight.

Ya karena malam hari ini kita cukup spesial ya karena kita kedatangan tamu yang berbahasa Inggris.

Jadi kita harus bertanya dan menjawab juga dalam bahasa Inggris.

Halo Mas IT.

Halo Cet.

Halo Cet.

Ya kalau mau komen bahasa Indonesia boleh ya?

Nanti kita terjemahin.

Good evening. Ya kalau mau bahasa Indonesia boleh silahkan.

Selamat malam semuanya.

Dan malam hari ini kita kedatangan tamu spesial karena topiknya juga cukup spesial.

Di channel ini sering dibawahkan tapi biar yang lebih ahli lah ya.

Terlalu ditanyain, sering dibahas tapi enggak pernah, eh sering ditanyain cuman enggak pernah dibahas secara mendalam.

Ya karena saya, karena saya agak susah menjual, menjual sesuatu.

Karena kan apa ya, bahasa pemulgaman itu sifatnya apa ya, personal kan ya.

Ada yang suka, kurang suka, atas segala macam.

Tapi kita nggak bisa menjelaskan, kita nggak bisa menjelaskan kenapa kita suka satu bahasa dan lainnya.

So, let's tonight, let's invite Mr. Alan Wyma.

Wyma.

Hello, good evening.

Hello Alan, good evening.

Hello, how are you?

Lihat transkrip lengkap (1494 segmen lagi)

We are good.

Oh I'm center stage now, okay.

You are on spotlight.

So, let's start, let's start with who you are, what you do and your background story.

Oh wow, that's, I always hate these very open large questions.

Yeah, so, who am I?

That's such an existential question, right?

That's very deep meaning, who are you.

Yeah, but you can type it on your CLI, you know, who am I?

Okay, I need to ask.

Who am I?

In short, I would say, yeah, I'm just a software engineer.

I've been here in Hong Kong for about around 10 years and around three and a half years in Shanghai before here.

And of course grew up in USA.

It's kind of a long story about how I got over here as you can see.

So basically after I graduated from school, it was like about 2010, I think it was.

No jobs, you know, because we had the financial crisis.

So I thought, okay, why not go to China for a couple of years, go back home.

I did part A, part B, still haven't gone back yet.

So that's kind of the real short story.

I studied computer science and Mandarin Chinese.

So that's why I went to mainland China first, was in Shanghai.

Then, yeah, I got an opportunity to work in a startup and spin the business from one type of business to another.

And then, yeah, I can keep going, but, you know, you're talking about 10 years of history over here, right?

So I can keep going if you really want, but I don't think that's interesting.

More interested how you end up to Elixir.

Elixir, wow, that's a really great question.

So I don't know about you guys, but so when I went to school, we first we learned C++, not C, and then we did Java.

And I was always interested in how to do parallel multi-core programming.

Okay. Have you guys ever done that stuff before or no?

With C++, yeah.

Yeah, it's not fun, I think. I haven't tried with C++, but I'm sure it's not that fun.

C# also can do that. I did long, long, long time ago. Java can do that too, yeah.

So basically, I mean, languages I knew at the beginning of the course of C++, probably the most.

And I was always interested in multi-core processing, right? Multi-core, multi-thread CPU processing.

And I had this project that I wanted to do, and I can't remember what it was.

It was some freelance project. If I'm speaking too fast, let me know.

No, it's fine.

It's okay, yeah. I always speak too fast usually, maybe because I get too excited.

And so I kept hearing about this language called Elixir, and I had no idea what it was.

But I heard interesting things. At the time I was doing Ruby, which I think a lot of people do Ruby, right?

Anybody here not do Ruby? I think everybody do Ruby.

You should give it a try. It's really a lot of fun.

And so one of the big names in Ruby was Jose Valim. He worked at a company called Plataformatec.

They did a lot of libraries for Rails. And he was working on Elixir, and I said, "Okay, good thing."

I did Ruby for a while. I did Rails, of course. And I know Jose. I know the name.

And I looked into it, and I said, "Wow, that's interesting stuff."

Because it was doing what I wanted to do, which was multi-core processing.

I know Riza. Is it Riza, right? Riza or Riza?

Riza, yeah.

Riza, you've played around with Elixir before, so you know what I'm talking about.

It's easy to do multi-core processing with Elixir.

Yeah, it's like by default.

Yeah, it's out of the box, right? The way the whole system works is called a process,

which is similar to a process on your computer, but it's a process within its own virtual machine.

So they have this virtual machine called the Beam, B-E-A-M.

And it manages its own processes, and they're basically green threads.

I'm not sure if you guys know what a green thread is or not.

Can you explain a bit, maybe?

Yeah, but I'm always really bad at explaining this stuff.

I know approximately what it is, but when it comes to explaining it, it's really hard to explain.

So my understanding of what a green thread is, it's not a real thread,

but it kind of acts like a thread in terms of it has its own memory and its own kind of thread of processing.

That's why they call it a thread.

But you can easily start and stop it.

In any case, Google green thread, and you understand more and more about it.

Yeah, let Wikipedia explain it.

So it's a pretty interesting thing.

The problem with threads is that they take a lot of resources to run.

They're really quite expensive.

But green threads are much more efficient in terms of the resources that they require.

Now, I can keep going on and on, but that's kind of how I got into it.

Because I wanted to be able to run a lot of work at the same time, and it was work that was parallel.

And so I'm guessing your audience is a little bit kind of newer to programming.

So I like to explain something that's quite important.

There's parallel, and then there's concurrent.

They are different, but they're kind of required.

Well, if you have concurrent work, then you can parallelize it.

So concurrent, you can think about something that's self-contained.

And parallel is something that you run multiple concurrent processes work at the same time in parallel.

So in order to have parallel programming, you have to have concurrent programming to it.

Is there a race condition or something like that?

Race condition, wow.

Well, that's the funny thing about Elixir is that it actually solves a lot of the parallel programming that you need to do.

So is it Yvonne or Yvonne, or how do you pronounce it?

It's Yvonne.

Yvonne, have you ever played around with Elixir before, Erlang?

No, I heard about it.

I learned a couple of it, but I never really tried to make it into production.

So yeah, just a little bit.

Okay, then one of the problems, because you said you did some stuff with C/C++ with parallel concurrent work.

So with that, did you use mutexes?

Yup, I did mutexes.

And well, in my experience, like when handling this race condition, I really chunk the data out.

So it's actually concurrent process just one way.

So it doesn't affect one another.

That's how I do it.

But to be honest, I still don't know how to handle this condition in parallel processing.

Well, I think we are more familiar with Node.js in terms of concurrency.

Yeah, I mean, I can go either way.

So if you want to explain more, if you want me to talk about a little bit more with Node.js.

I think Node.js still has a shared model of concurrency in terms of the memory.

I'm not too sure about the memory, but I believe it might be shared.

But in general, Node.js, unless something's changed, is single thread, single process.

So if you want multi, you have to spin up multiple instances.

I think you guys' English is better than mine.

But yeah, you have to spin up multiple processes, right?

That's correct, yeah.

If you think about it, that's actually the way that Elixir works is that you have multiple processes,

not as heavy as multiple instances of Node.js, much, much, much, much, much lighter.

But the other thing too is that it follows the same path of no sharing data.

So in your previous work where you had mutexes, there's no need for mutex because you never share the data.

You actually send a copy from one process to the other.

So if you have an integer, you would send the integer copy to somebody else.

What you're doing is just sending a copy to it.

So if you edit that piece of data or you throw it away or whatever, it never hurts anybody else because they have their own copy.

So there's no need for any mutexes. There's no need for any locks. There's no need for any kind of protection of data.

So it's something like in the Git terms, you fork the data and do whatever with the data.

But you merge it back in the end with the expectation to merge it back in the end after you're done with whatever it's supposed to do.

I think it depends.

Not in that case. You're merging back a copy, right?

So if you say, give me an integer and you say, why don't you add one to it and send it back?

I'm sending you back a copy of that one.

So the data is actually immutable.

So the data in the memory part is never changed, right?

Correct.

When I get the result is that actually new allocations in the memory, which if another process changes, I don't care because I get the copy of it.

Exactly.

That makes sense now.

So that solves a lot of issues already.

But the one issue that it doesn't solve is if you have a very big chunk of data and you send a copy of that, that's a problem.

But actually, there's kind of a solving with that, if I remember correctly.

I mean, the only reason you have a big piece of data is like a big piece of binary data, right? Maybe if you have like two gigabytes of DVD, you know, video, you have that, right?

You actually don't send a copy of that. You send a copy of the reference.

But nonetheless, like we talked about before, the data is actually immutable.

How long did you learn Elixir?

I'm just curious, what is your main programming language before until you...

Ruby, right?

Exactly.

Ruby to Elixir is easy because I know that. Is Phoenix inspired by Ruby?

Ruby on Rails.

Ruby on Rails is, sorry, Rails is inspired, Phoenix is inspired by Rails, Ruby on Rails.

So Ruby is the programming language, Rails is the framework.

Framework.

Yeah.

And Phoenix is the framework on top of Elixir.

Yeah. So Phoenix was heavily inspired by Rails.

Do you use Phoenix?

Do you use Phoenix?

It's every day?

Do you use Phoenix?

Every day, yeah. Approximately.

This is a good question in this context.

You came from the object-oriented programming, right?

Like Ruby, Java, or C++.

How to change the mindset to be functional?

OOP, the functional.

Yeah.

Because for me, myself, compared to Ruby, the syntax is similar, right?

But the mindset and the paradigm is different, way much different.

So how you come...

Elixir is a dynamic functional, right?

Yes.

Yeah, it's a dynamic functional language, but now they're adding types to it.

But coming back to the main question, how do you change your mindset from OOP to functional?

Practice.

Practice.

Yeah, it's a big one.

Just being able to practice, reading lots of code.

It's really the truth, right?

And it takes time to get into it.

Some tips is that when you become functional, you start to break out stuff and you focus on the data.

It sounds kind of weird, right?

This is my interpretation.

I think I've seen other people say the same thing.

What I notice is that when I went from object-oriented to functional is that I actually start thinking more and more about the data that I have.

And you find yourself thinking more about that.

And then you find yourself operating on the data rather than the...

If it's OOP, you'd encapsulate the data, and then you would call methods on it, and that would in turn manipulate the inside data.

Which actually sounds very complicated if you think about it.

To me, it sounds quite complicated.

And so for functional, you definitely spend more time thinking about the data structure that you have.

And then you think about transforming that data through different steps.

If somebody can pull up some code sample of a pipeline, it would be really helpful to kind of understand how that works.

Because I find functional to be so much easier to follow than OOP.

Because OOP, anything can happen.

You have getters and setters.

But actually, when you use a getter, you actually have the real reference to that data.

As opposed to functional, where you're always going to get a copy of that data.

So I think basically every single functional language that I can think of runs the same way.

So this is a great example.

So you have a function called setupUser.

You have parameters that come in.

That's probably something from form submit.

So if you just read this from top to bottom, it's basically you have three steps happening.

First you create the user.

Then you're going to send an email.

And then you're going to start the trial.

It really reads like steps, one, two, three, four.

If you look at this same thing using OOP, it could be simple like this.

But it could also be very, very complicated.

Because you could have one method that does all this.

You could have who knows what.

You could have all kinds of stuff.

But to me, this one is very, very clear.

It just reads step one, two, three.

And for those of you who are brand new to Elixir, this is called a pipe operator in line 10, 11, 12.

All it means is take the previous data and put it into the first parameter.

Parameter, yes.

It's piping.

I think this came from F# actually.

And JavaScript will have this too actually.

I'm not sure if it's out yet or not.

But they're supposed to have the same thing.

Yeah, not yet.

But it's still in proposal.

And so basically every single step, you're actually transforming the data.

You're not changing the original data.

You're actually making a copy, mutating that copy, and then keep going on.

But its function need to return something, right?

Return something with that piping.

Yeah, so every function has a return value.

Same with Ruby.

Python, I think not.

Even Python, I think it returns none if you return nothing.

But for sure, Ruby returns something all the time.

Well, in PHP, you can just return void or nothing.

In PHP, I don't know what it is anymore.

It's always something new every year.

It's becoming more and more like Java is what I see.

Yeah, but in Indonesia, it's still the most popular language.

Oh, it is, yeah.

But it's really complicated.

I tend to be wary of languages where the creator is just backed away from it.

If I remember correctly, the creator of PHP just wants nothing to do with it.

That's what I remember.

Maybe I remember wrong.

Things have changed.

But that gives me a little bit of worrisome if the creator is kind of backed away from it.

Well, lately they changed a lot since PHP 8.

Is it 8 now?

Last time I remember it was 7.

It must be 20 by now, no?

8.3 now.

They have types now.

They have types? Really?

No, types. They introduce types.

Oh, types.

You never had types before?

Okay.

Well, in PHP now you can declare strict types.

And now the order of the parameter or argument is no longer absolute.

As long as the parameter name is the same, you can just put the parameter anywhere you want.

It doesn't matter anymore.

And yeah, they have a spread operator now.

So they're just absorbing from different languages.

Trying to keep up.

Yeah, trying to keep up.

There's a benefit for coming late is that you can take all the good ideas that work.

But then I think PHP sounds like a Franken-language now.

All these different things.

That's true.

Okay.

We have some more questions in here.

What is this? Hello, Kong Alan.

What does the Kong mean?

Brother.

Brother.

Oh, brother. It literally means elder brother.

Elder brother.

Older brother.

Yeah, I'm kidding. That's not my comment.

Okay.

We have a very good question.

So, Andre said he's a main language.

One technical question.

He wants to be an elixir as his main language, but like me, we cannot get any elixir jobs.

What do you think about that?

Indonesia or South East Asia, maybe?

Yeah, that's a really great question.

You kind of have to make them, if that makes sense.

So the current place I'm helping out at, they never did elixir.

They had no interest in it.

But they believed in me, and they let me choose what I thought was correct.

And I told them what I want to choose.

And I came there saying, "Listen, it's not going to be easy to find people who know this language, but the benefits are XYZ."

I think I've almost never -- I cannot say never for sure, but probably almost never have a problem with choosing elixir.

When I start a project, right?

So you may not be able to find a job doing that specific language.

But what you can do is you can do your own personal projects.

You can keep checking around, find a startup that is starting out, get hired, try to ask them to use this one.

There's many different ways to do it.

That's what I recommend, because I know that it's very difficult to find a job using elixir.

But I think there are some companies in Indonesia doing elixir, is that right?

Some of them, yeah.

They're hard to find, but what you can also do, you can start up a meetup group.

So I start up one, Riza, you come sometimes.

I need to start another one next month.

And that will allow you to network with other people who are doing elixir, or Erlang.

If you can do one or the other, I think that's great.

Because even if you can't do elixir now, but you're doing Erlang, once you have the opportunity to do elixir,

I think it's going to be straightforward.

It's going to be easy for you to find if you already have a Beam language, even Gleam, right?

Because it's pretty much all in the hood, it's about the same to me.

Gleam is probably a little bit different, but I haven't tried it out yet.

So I just talked about Gleam right now.

Gleam is another programming language on the Beam.

So Beam is the VM, so think about JVM for Java, Beam is for Erlang and elixir.

And another quick thing that we didn't talk about, and I'm going to try to relay the information now.

Erlang was the first language on the Beam, and then elixir came out later.

There's many other languages, but elixir is the most popular one.

And then the latest one that's becoming popular is called Gleam, G-L-E-A-M.

So Gleam is a type safe compiled version on the Beam.

So as we talked about before, elixir and Erlang both are dynamic, meaning that they're not strongly typed,

meaning that you can type whatever you want and it'll still run.

Nice logo.

Yeah, it's a very cool logo.

So Gleam is like TypeScript for Elixir.

Well, as you can see the syntax is kind of like, you see it's got this import kind of like Python.

Rust.

Well, the compiler is written in Rust. It's very interesting.

So unless something's changed, the way it works is you write Gleam like this,

and it's going to compile your code into core Erlang.

And then core Erlang will then be compiled into Erlang bytecode.

So the way it works is that you have your language, say you have Erlang,

Erlang gets compiled to some type of AST, which is Abstract Syntax Free.

And then that will be compiled into core Erlang.

Core Erlang then gets compiled into Erlang bytecode, if I remember correctly.

And so the compiler for this one is written in Rust, so Rust to core Erlang.

And Gleam also compiled to JavaScript, if I'm not mistaken.

Oh, interesting.

It probably can. I think nearly every language can now with pure JavaScript.

You're not talking about WebAssembly, right?

No, no, no.

To JavaScript, OK.

Gleam compile to JavaScript.

I've heard that, but yeah.

OK.

Show me.

Interesting.

This one.

Let's see the compiled one.

This one, the source code written in Gleam.

This one is JavaScript.

Oh, that's the compiled result.

Interesting.

OK, that's interesting.

Interesting.

But maybe it would lose something if it's not run on Erlang.

Well, you're not going to have the beam, which I think is...

Not having the beam I think is the worst part, because the beam is really a powerful machine.

I think they tend to be in the front end, because there is a query selector for DOM selection right here.

Just on flavor it seems.

There was a project, I think it might still be worked on, I'm not too sure, but it used to be called...

Oh wow, I forgot the name now.

Basically, they got Erlang to compile and run using WebAssembly in the front end.

Oh, I've heard that, but I don't remember the name.

I forgot the name. It's changed names at least one time.

Oh, they changed it?

I think it's called Lunar...Lunas?

Lean?

Or?

No, this is another one.

No?

I think it's still being worked on.

Orb? No.

Unless they change the name, I'm pretty sure it's not Orb.

Alright.

Firefly.

Firefly?

Yeah, that's the new name if I remember correctly.

I don't know, is it?

Yeah, I think so.

A new compiler and runtime for Blim Language.

This one?

But this is archive.

Read only.

Well, I'll look for it and then we can see if we can find it still.

I think it's still being worked on.

So, yeah, about that, about the Elixir ecosystem in...

Lumen.

Like a lot of Lumen?

Yeah, why all the frameworks use the same name?

Oh, it is called Firefly. It used to be called Lumen.

Oh, it used to be called Lumen and then become a Firefly.

That's called Firefly, yeah.

This one, Lumen?

Yeah.

Let's call Firefly now.

Oh.

Since September 1st of 2022.

From Dockyard.

Dockyard?

Yeah.

So if you go to getfirefly.org.

So you can run Elixir using Wasm.

Browser also... it's Wasm, if I remember correctly.

And that's something's changed. Yes, you heard it, target Wasm.

Since we lost Beam here, that means we cannot run it as a coin currency anymore, right?

So it's just like...

Well, I didn't say that, right?

So the thing is, these guys were actually in the group and talking...

So when I'm talking about the group, I'm talking about the consortium.

The group that was making the rules.

What your browser can and cannot do.

And so they were saying, "We need this feature and we don't need this feature."

And they were talking like what stuff they did.

So it may still run about the same.

I haven't tried it, but I believe that they're using web workers or something like that to do the processes.

But they may have its own thing, too.

Oh, interesting.

Okay.

If we can do that, that means it's really good for the pre-optimized large processes like compiling or rendering or compressing images.

That would be good.

Well, I mean, the Beam is not really made for very intensive things.

But you can shell out to see Rust, whatever, if you want to do some computation intensive stuff.

Okay.

If you need to. It's actually pretty simple with Rust.

But what it's great for is what we talked about, like having concurrent parallel work.

It's very, very good at that and very good at recovering from any types of errors.

And you can implement all kinds of retry operations, things like that.

Time to learn new language.

We didn't even talk about OTP, which OTP will blow your mind.

And not one time, by the way.

Open Telecom Platform, yes.

So we can touch a little bit on OTP since I mentioned it.

Sure, sure. Please do.

So yes, as they said, OTP stands for Open Telecom Platform.

If I remember correctly, that was a buzzword that their sales team came up with or somebody marketing something like that.

But basically nobody calls it Open Telecom Platform. They always call it OTP.

It's kind of like GNU, GNU.

Basically GNU stands for, I forgot, it's basically a recursive acronym with no real meaning.

So OTP has now become something like that.

What you can think about is that OTP is a collection of libraries that were battle tested over 30 years of working with Erlang.

And they take all of the features of Erlang and the Beam and put it together into some very great patterns.

And so there's things like a supervisor, which means that it's going to watch a process.

If that process breaks or fails, it'll automatically restart it for you.

It's got a GEN server, which is basically short for a generic server.

So if you need to have something that operates concurrently in the background, we can send it data and it does stuff with it.

GEN server is usually your case.

And there's a lot of other things in there.

So that's kind of the short thing about what is OTP.

It's got a lot more things into it.

Also, if you look at this page, Amnesia is a big one.

So Amnesia, as you hear, it sounds like Amnesia, which is forgetting things, but it's actually a database for storing data.

So it's obviously a programmer joke.

As you can see, it's written by Robert Verding.

He usually hangs around my meetup group I throw up every month when he talked a little bit about Amnesia.

I think Amnesia is also the database of RabbitMQ, but now they're replacing that because it's an old database and it doesn't work for everything.

But yeah, it's kind of cool.

Amnesia, I believe, is distributed and it runs through the networking.

Sorry, I'm a little bit blank right now.

Anyways, maybe we have more questions, people in the audience.

Yep.

Wait, let me check.

Yeah, there's a highlighted one.

This is actually my question, too.

I haven't used Elixir.

If I want to learn it, where should I start?

Sure.

I think really great introduction.

So it depends on if you have cash or not, because there's, of course, some really great resources.

But nonetheless, if you go to elixirlang.org, they have basically a learning and docs section.

I think the learning section itself will give you a pretty good -- sorry, not learning.

Is it guides?

Maybe not guides.

Things have changed a little bit.

I think it's guides.

Guides, yeah?

Yeah, the guides -- actually, probably the guides which you want to take a look at.

They go pretty in-depth about the different things within Elixir that will give you a nice overview.

If you have a little bit of cash, I highly recommend you pick up Elixir in action.

That will get you a very good in-depth knowledge of OTP.

If you like videos, if you go to Pregmak Studio, they have an Elixir OTP course.

Fantastic course, in my opinion.

Okay.

Pregmak Studio.

Yep, Pregmak Studio.

They have very great Elixir OTP courses.

This one?

So the Elixir OTP one.

Yeah, this is a good one.

Also Phoenix Live View, which is also really great.

Yeah, we need to talk about Live View.

Wait, wait, wait.

Lisa, go up a little bit.

Go up?

On top, yes.

So we have a purchasing penalty from Indonesia.

Oh, 60%?

Nice.

The perks of being a country with poor exchange rate.

Okay.

It's quite expensive, but I highly recommend it.

I'm not telling you guys what to do, but if you have friends come together, that's all I'm going to say.

I highly recommend the course.

It's really good.

They go pretty in-depth with stuff.

And even on YouTube, there's a lot of different resources.

But I mean, again, if you just study some of the projects that are out there that are open source, you're going to learn a lot.

Do you have any reference or project to learn?

Yeah, open source projects.

Open source project or something?

Yeah.

To learn.

I mean, if you look at Phoenix, it's probably a really great one to take a look at.

Phoenix Live View is probably another good one.

Those two alone are already pretty good.

If you want something simpler, wow.

I don't know.

I think to be honest, if you want to get started and you have a Rails background, picking up Phoenix is really, really simple in comparison.

They used to be much, much more similar, but now they definitely have some differences to them.

But the nice part about Phoenix is that it abstracts all the complications that you would typically have if you have a brand new Elixir project.

So Phoenix to Elixir is like, say, Laravel to PHP, is that right?

Yes.

The web framework that sorts everything for you.

I'm not too sure.

I haven't done Laravel in a while, for sure over 10 years.

What I can say for sure, because I've done a lot of Rails and Ruby, when you have a Rails app, you can't add any Ruby library to a Rails app.

You have to have a Rails plugin for a Rails app.

That's what's been my experience.

Things may have changed recently, but you always have to look for a Rails plugin.

Now for a Phoenix app, there's actually no such thing as a Phoenix app necessarily.

They're all Elixir applications.

So basically, you can use any Elixir library that you want within Phoenix.

There's no special thing that you need to do.

Including the library that comes with OTP, that means you can use it inside Phoenix.

Yeah, you can use it out of the box.

The way that Phoenix does things is that they put all of the web stuff in one folder, and you're supposed to put all of your applications specific into another folder.

You don't have to follow the pattern, but it helps you follow the pattern because it helps you to separate and make sure that you can actually have different types of entry points into your code.

So basically, you could actually create another app that just has a CLI, so basically a command line interface.

Or even a GUI application.

Is it time for pray right now?

No.

Alright, here's some weird sounds. I don't know what that was.

That's probably from my side.

Okay.

Alright, so one thing that I think, in my opinion, is one thing good about Elixir is the community.

It's the warming and very intimate, like we can accidentally meeting the author, Joseph Halim, in your meetup.

That's a good community vibes for me.

So no drama like JS JavaScript community?

JavaScript or PSP or anything.

Yeah, I have to say there's definitely less drama in Elixir community compared to other communities because I'm also in the Rust community and in, what else am I in?

Flutter?

Flutter? Okay.

I'm not too much into Ruby. I mean, it's not like I hate Ruby, it's just I just don't use it much anymore.

But yeah, Flutter, Elixir, and Rust are the three languages I really focus on.

But yeah, out of those three communities, I would say for sure Elixir is relatively drama-free.

It's not totally drama-free, but it's relatively drama-free as opposed to JavaScript. I don't know what's going on with them.

Again, the creator, he disappeared somewhere. I think he's working on Dino, right?

Yeah.

That's the node JS.

The node JS, yeah.

So he's gone. Python, he stepped down because of drama. What's his name? Guido.

Guido, yeah.

So most of the creators, they kind of left, I think.

I mean, Bijorn is retired, I believe. I don't know. I don't think he's doing much now as a consortium of people.

So most of the creators actually kind of back away after some time, but Jose is still there. He's still doing stuff.

But he's definitely more of a shepherding kind of style.

Okay. So what kind of application that you usually choose Elixir, let's say, offer Rust because you know Rust as well?

Yeah, if I'm doing a web-based application, for sure I choose Elixir because the Phoenix and Phoenix Live View, as we really talked about,

there's no comparison. It just works. It works great. It takes very little resource to run.

The story, the web, how easy it is to create a website using Elixir and Phoenix is just too easy compared to other languages that I've talked about.

I mean, obviously PHP, maybe it's easier. I mean, you have Laravel, you have Rails, of course, can be quite quick.

But with the amount of resource that it uses, with the ease of use, with the innovations that they're doing, I just don't see a reason to not use it,

especially because the resource and the real-time features of Phoenix that you have out of the box.

What about Rust? What kind of application that you built with Rust?

Well, I could talk about, you know, an actual application I created using both Elixir and Rust together.

Maybe that's more interesting because it kind of shows the power of the two.

So I had this client. They're a pretty big MNC. You definitely heard of them. I'm not going to name who they are.

But I had to integrate with their ERP system and actually create PHP files using that for their website.

So basically they wanted to integrate all the products into their existing website. So I had to go there, I had to pull all the files.

So one product would have, so for instance, Hong Kong, we have basically two or three languages. You got traditional Chinese, you have simplified Chinese, and you have English.

And then you have other countries. Indonesia, I don't know if you have more than one language or not. For sure you probably have English.

And you have, is it Bahasa? Bahasa Indonesia, ya? Yes, Indonesian language.

And so you may have more than that, but if you think about one country, Indonesia has two. Hong Kong, which is not really a country, by the way, because I don't want to get in trouble.

It has at least three languages, two to three languages. And, you know, in USA, we have at least two, I think.

You know, we have Spanish and English. You probably want to support those two at least, maybe even French.

But yeah, so every country they have usually a couple, right? Exactly.

So for this MNC, they had basically everything, every single country and then all different languages.

And so I had to create all this for, and then they have hundreds of products. So that's probably, you know, I don't know what that would be. Tons of files, right?

And to me, I'm like, well, obviously I want to do this not sequential, but in parallel.

And so that's what I did. But the problem is it took at least about a half hour and four gigabytes of RAM using just Elixir.

So I had, you know, I don't remember how many, I had thousands of these XML files and I had to go through the file and go up and down XML in order to get the data that I needed.

So originally I tried XPath, it was too slow. And then I tried another method, which is basically read the file line by line and pattern match out the data I needed, which we can talk about pattern matching later on.

But basically hold the data that I need. That was also too slow. And so what I did was I did XPath with Rust. So I just put it, gave it to Rust.

And the whole process end to end was just tens of megabytes and 10 seconds. So it went from a half hour, four gigabytes of data down to 10 seconds and tens of megabytes of data.

Wow. Hmm. Nice.

I know that parsing XPath with XML on PHP is really, really slow.

Too slow, right?

Yeah, too slow.

So as you can see, there's no language that does it all. But that's why I focus on those three languages. But you can see specifically Rust and Elixir, putting the two together, you get something quite powerful.

Hmm. Okay. So what in your opinion, in your own opinion, why Elixir is not more popular than it is now?

So wait, or maybe is it just Indonesia, maybe in Hong Kong or maybe in the States, it's different?

It depends upon what you're doing. It depends on what you're doing, right? So let's kind of roll back a little bit, right?

Erlang datang dari Ericsson, yang pasti kalian pernah dengar dari Sony Ericsson.

Mereka popular karena mereka membuat pindah telefon, kan?

Jadi, secara asli, Erlang datang karena mereka memiliki perlukan yang sangat sulit untuk diikuti.

Ya, mereka memiliki kotak yang memanfaatkan pindah telefon, menggunakan pindah telefon dari satu tempat ke lain.

Hmm.

Jadi, kalian memiliki perlukan yang sangat besar, karena ketika kalian mengubah kotak-kotak itu, mereka tidak bisa turun lama, karena kemudian kalian akan mendapatkan pindah.

Karena jelas, orang-orang harus menyebut 911 atau 110 atau apa saja nombor yang kalian punya untuk nombor pertahanan.

Jadi, mereka bisa turun, tapi tidak lama.

Yang lain yang kalian harus khawatirkan juga adalah, kalian tidak ingin panggilan seseorang mendengar panggilan seseorang lain.

Mungkin semuanya akan turun, karena ada bug.

Jadi, error harus diisolasi. Sekarang kalian bisa melihat kenapa mereka memiliki proses, dan proses-proses bisa diisolasi.

Karena satu proses, satu thread atau apa saja yang kalian ingin menyebutkan.

Jadi, dalam kesempatan ini, proses beam termon itu turun.

Ia tidak akan menerima panggilan lain.

Yang lainnya, yang kita tidak membahas juga, yang sangat menarik.

Jadi, bahasa ini muncul pada tahun 80-an.

Oh, wow.

Kotak-kotak yang panas, sebenarnya lebih tua dari Java, lebih tua dari Python, Erlang.

Jadi, itu juga memiliki upgrade kod panas.

Jika kalian tidak tahu apa itu, itu berarti, setelah sistem itu berjalan,

itu dapat diupgrade ke versi selanjutnya.

Tidak ada "down time".

Tidak, tidak ada "down time".

Tidak ada "down time".

Ini dipanggil upgrade kod panas.

Upgrade kod panas.

Upgrade kod panas adalah sesuatu yang lain, tapi ini dipanggil upgrade kod panas.

Ya.

Dan jika kalian pikirkan, itu sempurna, karena sebenarnya ada video yang dipanggil "Earlang Movie".

Kalian harus menontonnya di YouTube.

Itu sangat menyenangkan.

Jadi, mereka menunjukkan, sebenarnya dalam perkembangan, mereka menunjukkan bahwa,

"Hei, ada bukaan".

"Earlang Movie", lihatnya setelah show ini.

Dia membuat panggilan, menetapkan panggilan,

mengambil panggilan lain, membuat panggilan,

dan itu menyebabkan bukaan.

Panggilan itu sendiri turun.

Mereka menemukan bukaan,

mereka menetapkan bukaan, mereka rekompilasi kod,

mereka menekan kod ke panggilan telepon,

dan kemudian mereka mengambil panggilan lama,

dan mereka bilang, "Oke, mari kita coba lagi".

Tidak apa-apa saja.

Ini adalah awal 80-an, kan?

Ya.

Bukan banyak bahasa yang bisa saya pikirkan memiliki upgrade kod panas.

Ya.

Dan ini dari box, kita tidak perlu melakukan apa-apa saja untuk menggunakannya, kan?

Anda harus bisa membangun upgrade,

tetapi ini dibangun ke VM,

ini dibangun ke barang-barang.

Ya, tanpa memasang library tertentu atau sesuatu seperti itu, ya?

Bagi Elixir, mereka tidak mendukung dari box,

jadi mungkin ada lebih banyak barang yang harus Anda lakukan,

tetapi dalam kesalahan, ini mungkin.

Ini pasti mungkin karena dibangun ke VM.

Baiklah.

Saya penasaran tentang bagaimana

lifecycle Elixir dan Phoenix adalah aplikasi web.

Maksudnya,

saya bayangkan seperti Anda memiliki Beam sebagai VM,

seperti JVM dengan Tomcat atau Apache Tomcat,

Anda harus memiliki web server, ya?

Jadi, apa itu? Anda masih memerlukan web server seperti Nginx

yang akan menguasai PM di port tertentu,

sesuatu seperti itu,

dan Anda masih memiliki load balancer di atasnya?

Anda tidak perlu, sebenarnya.

Anda tidak perlu.

Ini tidak perlu memiliki proxy depan, tetapi Anda bisa.

Ya, Anda bisa melakukannya.

Maksudnya, Anda mengatakan Beam bisa menggunakan port 80 dan 443?

Ya.

Berarti Anda memiliki routing tertentu di dalam aplikasi itu sendiri.

Dan ini berhasil, karena jika Anda memikirkan,

ingat, kita sudah berbicara tentang proses, ya?

Jadi, setiap permintaan yang dimasukkan adalah prosesnya sendiri.

Satu-satunya alasan yang saya gunakan adalah,

jika Anda memikirkan tentang telepon, seperti yang telah saya jelaskan tadi,

ini cocok dengan situasi...

masalah telepon itu memasukkan masalah yang sama dengan sekarang.

Anda ingin bisa memiliki satu permintaan yang tidak menghancurkan pengalaman orang lain di website Anda.

Jadi, Anda memiliki isolasi proses.

Anda ingin bisa mengubah kod Anda sementara orang masih menggunakannya.

Anda tidak ingin orang memiliki down time, seperti yang terlihat di Facebook.

Dan satu lagi hal yang kita tidak bicarakan juga adalah,

Anda bisa menghadapi banyak load.

Anda berpikir tentang itu, kan? Saya pikir kita hanya memiliki pertandingan cricket.

Saya pikir saya mendengar dari seorang lelaki india.

Saya pikir India hanya memenangkan, itulah kenapa dia memberitahu saya.

Jadi, dia ingin mereka menghubungi semua orang.

"Hey, kita menang, blah, blah, blah."

Jadi, pertandingan itu berlaku, kan?

Setiap hal terjadi, semua orang akan menghubungi pertandingan itu.

Anda ingin dapat menghadapi banyak permintaan tanpa mengambil down time server Anda.

Jadi, cara Elixir itu berfungsi adalah,

Anda bisa menghadapi banyak traffic,

tetapi itu akan memberikan waktu yang sama untuk setiap proses.

Jadi, jika Anda memiliki banyak orang menggunakan server Anda,

mereka akan memberikan waktu respons yang lebih lambat,

tetapi pada dasarnya mereka masih akan mendapatkannya.

Sehingga sementara, tetapi itu adalah hal yang berbeda.

Tetapi itu masih dapat menghadapi banyak traffic,

yaitu yang harus dihadapi oleh Telefon Switch,

dan juga website Anda juga harus dapat menghadapi banyak traffic.

Ya, saya belum memiliki gambaran mental

tentang bagaimana untuk mengembangkan aplikasi web Phoenix,

tetapi saya menemukan artikel itu.

Riza, bolehkah Anda buka artikel itu?

Ya, tentu.

Di Elixir Graz, mereka menunjukkan cara untuk mengembangkannya.

Sebenarnya cukup mudah.

Seperti command Mix Release yang dilatihkan di aplikasi.

Ya, saya pernah dengar tentang Mix untuk membangun aplikasi,

yang mirip dengan NPM.

Ini...

Anda bisa lihat dalam dokumentasi juga.

Ya, ada deployment di sini.

Ya, mereka memiliki servis yang berbeda,

seperti Fly.io atau apapun.

Fly.io adalah yang paling konfiden.

Seperti Heroku dan sebagainya.

Ini server cloud?

Fly.io?

Ya.

Ini servis P-A-A-S,

jadi Anda hanya bisa dikembangkan secara dasarnya.

Sebenarnya tidak, mereka memiliki hal-hal sendiri.

Ia mirip dengan kembangkan.

Ya, Anda bisa menunjukkan Fly.io.

Dan mereka memotong semua hal-hal,

termasuk menciptakan file Docker atau sesuatu.

Ini mirip dengan perangkat app Google juga, kan?

Perangkat app Google pada waktu itu?

Saya pikir ini menggunakan sesuatu seperti perangkat app Google.

Anda memiliki versi sendiri seperti Postgres dan sebagainya.

Ya.

Saya juga memiliki beberapa video di YouTube saya juga,

yang menunjukkan bagaimana untuk memasang VPS.

Ini tidak begitu sulit seperti yang Anda pikirkan.

Pertama kali dengan api api,

ini akan mengambil Anda waktu.

Tetapi setelah Anda melakukannya pertama kali, ini cukup mudah.

Tapi Anda masih memiliki latensi karena

mungkin menggunakan Postgres di belakangnya,

dan database berwarna hijau.

Dalam koneksi database,

app ini menjadi lebih rendah, dan Anda harus memotong secara dasarnya, kan?

Ya, dengan api api, biasanya database ini akan menjadi yang paling rendah.

Ya.

Itu yang paling rendah.

Ya, itu bagus.

Sebenarnya, case penggunaan yang menarik,

kalian berdua...

Kisah penggunaan yang sudah lama berubah,

tapi itu adalah kisah penggunaan yang bagus.

Ada...

Tunggu.

Ada sebuah perusahaan yang dipanggil...

Bench?

Oh, wow. Apa namanya?

Saya lupa namanya sekarang.

Saya akan lihat apakah itu terjadi pada pikiran saya.

Mereka memiliki 100 dan...

sekurang-kurangnya 120 server.

Mereka memiliki campuran Java dengan Ruby dan beberapa hal lain.

Kemudian mereka menggantikan segalanya dengan Elixir.

Mereka menggunakan sekurang-kurangnya 120 server hingga 5.

Dan mereka berkata mereka bisa...

Leecher Report?

Ya, Leecher Report. Itu benar.

Leecher Report.

Ini benar-benar diberitahu. Mereka banyak berbicara tentangnya.

Ini artikel yang sangat lama.

Dan juga Leecher Report.

Mereka bilang mereka memiliki 5 server.

Dan mereka bisa mengambilnya menjadi 2.

Hanya karena mereka membutuhkan redundansi.

Mereka menghilangkan semua layer caching mereka juga.

Jadi mereka tidak memiliki caching.

Mereka hanya menulis dari database.

Atau apa saja yang mereka punya.

Dan mereka memiliki banyak konten yang sangat spesifik.

Jadi jika kalian suka Sport A dan bukan Sport B atau C...

Jika kalian login, kalian tidak akan melihat Sport B atau C.

Kalian hanya akan melihat alat Sport A.

Itu sangat istimewa bagaimana kalian suka konten Sport A.

Ya, ini Leecher Report, tahun 2017.

Maaf, saya sudah memberitahu.

Ini sekurang-kurangnya 120.

Ini 150 dalam artikel ini.

Untuk 5.

Dan mereka juga berkata mereka bisa mengambilnya menjadi 3.

Tiga dari mereka, jika saya ingat dengan tepat.

Dari Ruby on Rails Monolith ke Elixir Venisia.

Mereka juga memiliki Java juga, jika saya ingat dengan tepat.

Saya pikir itu hanya untuk mengurangkan push atau sesuatu.

Untuk beberapa pekerjaan spesifik.

Saya faham.

Oh, menarik.

Bagaimana mengurangkan streaming atau seperti Websocket?

Websocket.

Itu mudah.

Mereka memiliki sesuatu yang dipanggil Channel.

Bila saya bilang itu mudah untuk mengurangkan segalanya.

Mereka menambahkan sesuatu di bagian atas Websocket.

Ya, mereka memiliki sesuatu yang dipanggil Channel.

Jadi dengan 1 Websocket, kalian bisa melanggan untuk berbagai Channel.

Jadi dengan 1 Websocket Connection, kalian bisa memiliki berbagai topik yang berbeda.

Baiklah.

Sekarang saya penuh.

Saya akan mencoba ini.

Ya, saya akan mencoba itu juga.

Sekarang saya penuh.

Saya tidak tahu, itu aneh.

Jadi saya kembali dalam pembangunan web.

Sekitar 8 atau 9 atau 10 tahun lalu.

Seperti saya belajar sendiri.

Mencari sumber online.

Tidak ada sumber yang saya temukan.

Seperti tidak ada website atau CSS Tricks atau apa-apa.

Mereka jarang menyebut Phoenix sebagai pilihan untuk belajar dari web framework.

Itu selalu...

Ya.

Biasanya, tentu saja, ACML, CSS, JavaScript, tentu saja.

Tapi kemudian, apabila menikmati framework...

Setidaknya, Laravel.

Ya, PHP dan Laravel sangat popular di Indonesia.

Jadi tentu saja, ada banyak resursi.

Tapi selain itu, React baru saja dimulai.

Dan setelah itu, Swale, Vue, tapi...

Saya tidak tahu...

Berikutnya.

Ya, dan semua spin off dari framework React.

Tapi jarang ada orang di luar komunitas Phoenix dan Elixir.

Ecosistem itu.

Seperti memulai banyak konten tentang Phoenix.

Saya tidak tahu, itu perasaan saya.

Saya tidak tahu jika itu berubah sekarang setelah bertahun-tahun.

Ada beberapa streamer besar yang berbicara tentangnya sekarang.

Ada orang namanya Theta, T-H-E-T-A.

Dia banyak berbicara tentangnya sejak ini.

Theo?

Ada Theo? Maaf, saya lupa.

Theo?

Ya.

Tidak.

Oh tidak.

Dia memiliki rambut dan rambut.

Itu saja yang saya ingat.

Ya.

Ya.

Ya.

Ya.

Ya.

Jadi dia memulai banyak hal.

Seperti yang kamu lihat, dia memiliki 299K.

Saya pikir dia lebih besar daripada itu.

Saya pikir dia di juta-juta.

Mereka banyak berbicara tentangnya.

Itu hanya...

Itu mengambil waktu.

Karena...

Salah satu hal yang saya lakukan untuk Elixir dalam pekerjaan sebelumnya.

Dan...

Jawaban yang saya dapat dari pengurus saya adalah...

Jika kamu lihat di lantai, kita semua sedang melakukan Java dan React.

Maksudnya, idea kamu tidak akan berhasil.

Maksudnya, bukan karena tidak akan berhasil.

Lebih seperti dia ingin mengatakan idea kamu itu bodoh.

Maksudnya, mungkin saya membaca terlalu banyak.

Tapi itu adalah maksudnya dia.

Seperti yang kamu lihat, kami semua smart.

Kami tidak menggunakan Elixir.

Kami melakukan hal yang bagus.

Kami menggunakan Java dan React.

Oleh itu, kami melakukan hal yang tepat.

Dan idea kamu terlalu radikal dan tidak masuk akal.

Tapi itu...

Ada banyak keuntungannya.

Maksud saya, bagaimana kamu bisa menggunakan 150 server ke 5?

Betul?

Maksud saya, bagaimana banyak duit yang bisa kamu menyimpan?

Ada banyak artikel...

Jika kamu melihat Elixir dan menyimpan duit...

Kamu akan menemukan banyak artikel tentang orang yang berubah...

Dan mereka menyimpan banyak duit.

Dari itu.

Ya, saya pikir juga Pinterest.

Pinterest, ya.

Mereka menggunakannya untuk spam atau sesuatu seperti itu.

Mengecek...

Mereka menggunakannya untuk sesuatu.

Google menggunakannya juga, sepertinya.

Adakah kamu ingat leak Google yang muncul beberapa bulan lalu?

Mereka memiliki Elixir di sana di mana-mana.

Ya, ya, ya.

Paling kurang mereka menyebutnya.

Saya tidak tahu bagaimana mereka menggunakannya.

Ya, dalam leak itu.

Mereka menyebutkan Elixir di mana-mana.

Saya lupa apa itu.

Oke.

Tapi kita tidak bahas Phoenix Live View, yang menurut saya adalah game-changer yang besar.

Itu sangat bagus.

Phoenix Live View.

Apa yang saya perhatikan sangat adalah Rail.

Apa yang saya suka tentang Rail adalah Rail selalu merasa seperti membawa sesuatu yang baru ke meja.

Mereka memiliki pipeline aset ini.

Mereka memiliki banyak hal lain yang berbeda dengan MVC.

Semua hal-hal ini adalah ide baru.

Setelah saya memiliki Elixir dan Phoenix...

Phoenix mulai memiliki ide baru yang orang tidak pernah memiliki sebelumnya.

Satu-satunya ide yang terbaik yang terjadi terakhir adalah Live View.

Jadi Live View adalah server-side rendering SSR.

Jadi kita sudah berbicara tentang channels sebelumnya, ya.

Jadi yang ini dibina di atas channels.

Jadi apa yang terjadi adalah Anda memiliki sebuah template.

Web browser Anda pergi ke sana.

Ia mengeluarkan seluruh page sebagai template statis.

Kemudian Anda menghubungi web socket.

Dan Anda akan mendapatkan rendering baru dari site yang sama.

Dan apapun yang terjadi di latar belakang akan dihantar ke Anda melalui web socket.

Terus terdapat Live Wire atau Live View?

Kenapa disebut Live Wire? Karena itu berasal dari Live View.

Itu berasal dari Live View, tapi itu berasal dari Live View.

Terlebih dahulu adalah Live View, kemudian terdapat Live Wire di Ruby on Rails.

Dan Live Wire di RRVL.

Keluarga Wire.

Keluarga Wire.

Banyak-banyak hidup.

Dan mereka benar-benar menghabiskan banyak waktu untuk membuat ini efisien.

Jadi Anda menghubungkan perubahan setelah Anda menghubungkan web socket.

Jadi jika hanya satu perubahan karakter, Anda hanya akan menghubungkan satu perubahan karakter.

Super, super, super efisien.

Dan biasanya apa yang terjadi adalah, Anda melakukan event.

Anda menghubungkan event dari Wire ke web socket ke sisi lain.

Logik berlaku, Anda menghubungkan back to Diff dari HTML ke Anda.

Anda juga bisa memiliki arah satu-satunya.

Anda berdiri di sana, dan Anda dapat menghubungkan update Pub/Sub di bagian server yang dihubungkan.

Seperti aplikasi chat, Anda bisa membangun.

Atau alat AI seperti stream respons.

Apa saja yang Anda inginkan.

Tapi pointnya adalah Anda tidak harus selalu melakukan sesuatu atau mendapatkan sesuatu kembali.

Yang bagus tentang bagian ini adalah sangat jelas.

Jadi Anda memiliki...

Kita bisa melihatnya dengan sangat cepat.

Anda memiliki usePhoenixLiveView.

Itu memiliki sedikit magi.

Saya tidak akan berbicara tentang itu.

Funksi render ini adalah template Anda.

Jadi Anda memiliki...

Apa itu bahasa template?

Seperti H-A-M-L?

Tidak, ini dipanggil HEX.

H-E-E-X, HEX.

HEX.

Jadi apa yang HEX...

Jadi Elexor datang dengan E-E-X.

Yang dipanggil Elexor Embedder.

Itu dipanggil Elexor Embedder.

Bisa menjadi apa saja.

Bisa menjadi teks file.

Saya menggunakan E-E-X untuk menciptakan file PHP.

Tapi HEX adalah E-E-X yang mengenai HTML.

Jadi itu harus benar-benar HTML.

Jadi jika Anda memiliki HTML yang tidak benar,

Jika Anda memiliki tag yang tidak benar, ia tidak akan mengumpulkan.

Anda bisa menggunakan string seperti ini.

Atau Anda bisa membuat file HEX baru.

Yang memiliki file HEX ini.

Seperti partials.

Ya, partials.

Jadi itu adalah template.

Kemudian fungsinya dihubungkan dua kali.

Seperti yang saya katakan, penyimpanan page ini.

Dan juga perhubungan websocket.

Inisial state.

Ini adalah inisial state, kan?

Ya.

Sebenarnya, jadi Anda menandatangani...

Jadi pada kes ini Anda menandatangani varian temperatur ke 70.

Dan kemudian Anda menandatangani temperatur ke socket.

Dengan 70.

Untuk klien.

Untuk template, ya.

Dan socket kemudian menggunakan tanda dan template.

Jadi Anda melihat temperatur di sana.

Yang ini?

Ya.

Dan kemudian Anda memiliki handle event.

Jadi itu apabila event terjadi.

Anda bisa melakukan hover, apa-apa saja.

Apa-apa jenis event yang bisa Anda hantar.

Dan Anda bisa melihat di sini, ini hxclick.

Ya, nama event ini adalah pssclick.

Dan itu akan mengerangkan temperatur increment.

Handle event di sini.

Ya.

Jadi, jika Anda belum menggunakan Elixir sebelumnya, ini bisa menjadi sedikit mengganggu.

Biasanya ini dipanggil pattern match.

Jadi Anda melihat temperatur ink.

Maksudnya itu harus 100% sama dengan nilai.

Ya.

Oke.

Yang ini.

Ya, antara server dan klien.

Seperti ping pong, Websocket, kan?

Selalu terbuka, kan?

Karena seperti Websocket.

Ya.

Sesetengah orang bilang Websocket koneksi sangat mahal.

Mengapa Elixir di Phoenix sangat murah?

Ya, proses Elixir di Phoenix, atau proses Elixir secara umum, mahal.

Mereka sekitar 1 kilobit memori.

2,000 kilobit, ya?

2,000 kilobit.

Ya?

Yang berbeda dari Threads.

Threads itu cukup besar.

Ya, jadi jika Anda memiliki Threads, akan mengambil lebih dari itu saja.

Mereka bisa membangun lebih besar dari 1 kilobit, tapi mereka mulai dari 1 kilobit.

Ya.

Jadi bukan Threads, hanya proses.

Tapi ada satu.

Anda harus memiliki satu aplikasi yang berjalan, yaitu Beam, VM.

Yang selalu berjalan.

Tapi dalam Beam akan ada proses, proses kecil.

Mari kita bicara sedikit tentang Beam, sehingga menjadi lebih masuk akal.

Karena jika saya bilang ini, tidak akan membuat banyak masuk akal.

Jadi mari saya bilang sedikit lebih.

Jadi cara Beam berhasil adalah ia memiliki sesuatu yang dipanggil scheduler.

Atau sebenarnya memiliki beberapa scheduler.

Jadi komputer tipe sekarang, bagaimana?

Sepuluh hingga empat core?

Sesuatu seperti itu?

Ya, server web mungkin.

Jika itu sebuah mesin, mungkin hanya dua atau empat core.

Ya, apa saja. Saya hanya berbicara tentang mesin lokal.

Tapi oke, kita bilang server web yang tipe, Anda memiliki dua core, ya?

Yang murah.

Maksudnya, Anda memiliki dua scheduler.

Maksudnya, Anda bisa menggunakan dua proses di sebaliknya.

Jadi jika Anda melihat gambar, terima kasih, Riza.

Ini adalah website Anda, menurut saya.

Ya, ya.

Saya mengambil ini dari Sasayuri.

Anda mengambil, Anda mengambil, ya?

Mengambil, ya.

Jadi, untuk setiap core yang Anda memiliki, Anda memiliki scheduler sendiri.

Dan proses ini akan menjadi sebuah kondisi hibernasi.

Jika tidak, jika tidak ada apa-apa yang harus dilakukan.

Jadi tidak akan dilakukan.

Jadi Anda tidak menghampirkan apa-apa.

Dan jadi, itu bagaimana scheduler ini berfungsi.

Ia mencari proses yang memiliki kerja untuk dilakukan.

Ia menggunakan mereka untuk sekitar 2,000 panggilan menurut reduksi.

Sekitar 2,000 panggilan fungsi.

Dan kemudian, ia menghampirkan dan melakukan proses berikutnya.

Itulah bagaimana Anda memiliki kerja yang sama.

Dan jika satu scheduler memiliki lebih banyak kerja daripada satu lain,

Sebenarnya, scheduler lain bisa mencuri beberapa kerja dari scheduler lain.

Jadi, Anda memiliki balansasi kerja yang berlaku.

Jadi, scheduler ini berfungsi seperti Q mesaj?

Ya, berfungsi seperti Q.

Anda melakukan 2,000 panggilan fungsi.

Baiklah, Anda selesai.

Anda menuju ke akhir talian.

Dan itu berfungsi.

Dan jika proses tidak ada apa-apa untuk dilakukan.

Tidak ada apa-apa kerja untuk dilakukan.

Ia tidak akan dilakukan.

Ini hanya menghabiskan waktu.

Jadi, jika Anda memiliki perhubungan WebSocket yang tidak ada apa-apa untuk dilakukan.

Itu murah.

Ia hanya berada di situ dan tidak melakukan apa-apa.

Ia memakan waktu CPU yang tidak ada.

Hanya memori.

Oke, itulah kenapa itu murah.

Ya, proses itu sangat murah.

Anda bisa mengembangkan lebih dari 1 juta proses pada masin Anda.

Itu sangat murah.

1 juta proses itu sangat murah untuk dilakukan.

Oke, jadi WebSocket itu tidak berjalan melalui Engine X.

Tetapi melalui Beam.

Itu yang membuat perbezaan dari WebSocket yang biasa.

Saya tidak tahu apa yang Anda lakukan dengan WebSocket biasa.

Anda hanya perlu menyiapkan protokolnya, bukan?

Ya, mungkin.

Mungkin seperti ini.

Engine X bekerja dalam jalan pekerja.

Ia memiliki jalan pekerja.

Kalau kita menggunakan Engine X di server web 2 core,

maksudnya kita memiliki 2 proses,

tetapi kita bisa memiliki juta proses pekerja dari Engine X.

Tergantung pada konfigurasi Anda.

Tetapi ayo kita bilang juta proses pekerja.

Maksudnya, jika 1 WebSocket datang,

ia hanya menggunakan 1 proses pekerja dari Engine X.

Oh, benar? 1 WebSocket menggunakan 1 proses pekerja?

Ya, sehingga pekerja itu berhenti.

Tapi 1 proses pekerja itu sebenarnya berhenti atau tidak?

1 proses pekerja itu sebenarnya berhenti, jika tidak salah.

Oh, itu mengapa itu mahal.

Menjaga pekerja itu menjaga hidup sehingga berhenti.

Itulah kenapa itu mahal.

Ya, sehingga itu mahal.

Itulah kenapa jika kita memiliki banyak koneksi hidup,

itu bisa berakhir pada proses pekerja dari Engine X.

Itulah kenapa itu mahal.

Ya.

Itu dari Engine X.

Tidak untuk mengatakan Apache juga memiliki masalah yang sama.

Menjaga hidup atau koneksi streaming.

Oke.

Ya, maksud saya, tidak ada apa-apa yang perlu dibuat tentang Engine X.

Karena biasanya saya memiliki Engine X di depan.

Saya belum memiliki masalah, tapi saya tidak memiliki juta-juta orang yang menghubungi untuk servis saya.

Seperti yang saya katakan, Anda juga bisa menggunakannya secara langsung.

Anda tidak perlu memiliki load balancer secara langsung.

Anda bisa menghubungi secara langsung.

Seperti yang saya katakan sebelumnya, itu sekitar 1 kilobyte, maksud saya maksimal.

Berapa besar page HTML?

5 kilobyte x 10 x 1000.

Anda bisa memiliki banyak memori, tidak akan mengambil banyak.

Dan Anda juga bisa mengembangkan ini.

Jadi, hal lain yang kita tidak berbicara juga.

Sekali lagi, mari kita bicarakan tentang bagian networking.

Saya hanya memberi kalian sepeda-peda informasi di sini.

Karena ada banyak yang perlu dilakukan.

Ada networking yang dibuat dengan Erlang.

Oleh itu, Elixir juga memiliki.

Anda bisa menghubungi mereka.

Jadi, jika Anda bisa memiliki 5 mesin.

Anda bisa menghubungi horizontal, Anda bisa memiliki 5 mesin.

Dan Anda bisa menghubungi mereka.

Jadi, Anda bisa melihat semua orang terhubung.

Jadi, jika Anda memiliki 5 server.

Anda memiliki 10 orang di setiap server.

Jika mereka berhubung bersama, Anda bisa melihat satu sama lain.

Anda bisa memiliki informasi yang sama yang digunakan di antara mereka.

Saya rasa saya tidak bisa menjelaskan ini dengan mudah.

Saya pikir, VM ini sudah dihubungkan.

Ia memiliki sistem, bukan?

Ya.

Kita berbicara tentang sistem itu, bukan?

Ia memiliki sistem yang dihubungkan.

Mereka bisa menghubungi satu sama lain.

Anda bisa menghubungi 2 proses yang berfungsi di parallel.

Dan mereka ingin berfungsi bersama.

Mereka bisa menghubungi mesin ke depan dan ke depan.

Jika Anda menghubungi mesin, Anda bisa menghubungi data dari satu mesin ke lain.

Dan itu adalah metode yang sama.

Satu masalah yang Anda perlukan adalah PID, proses ID.

Jika Anda menghubungi proses ID, Anda bisa menghubungi PID.

Jika saya menghubungi proses ID, saya bisa menghubungi mesin.

Jika saya menghubungi PID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Dan jika saya menghubungi proses ID, saya bisa menghubungi proses ID.

Can we use Rust or Zip or C in Elixir?

Yes, so first they supported C, they meaning like the Erlang people, they built in something, so basically it's called a NIF, Native Implemented Function.

So the very first thing they supported was C, and then they also allowed Java.

And using J-interface, but nobody really uses that.

They say you shouldn't use that.

But yeah, nowadays you can definitely use Rust.

As I said, I used Rust before, I used something called Rustler.

A lot of people are using, what's the other one you call?

Is it called JIF? Is that what it's called? Or Zig, sorry.

Yeah, so there's something called Zigler, which is the same thing for, yeah, it's the same thing for Zig.

Oh, this is Erlang Function, not Elixir.

Yes, well no, Erlang NIFs are called Native Implemented Functions.

So you see over here, NIF as a function is implemented in C instead of Erlang.

Oh, okay.

So Zig and Rust both will compile to C-like thing.

So whether you use Rust or C or Zig, you're all compiling to a NIF basically.

NIF.

Thank you.

Yeah, and now I just realized that Erlang using Hex Docs or documentation framework from Elixir.

Yes, so Erlang has finally gone into the 21st century and started using, started using...

What did it use previously?

I think you can still find it if you go to, no, you have to be able to find the old ones.

It was really ugly basically. I mean, it was usable, but it's not as good as the Elixir one.

Oh, yeah. There is no, the old one, there is, I cannot find the old one because they changed it to the new one.

Yeah, they may have gotten rid of it completely. I'm not too sure how they do the old docs.

Way back time machine?

Way back time machine. Good idea.

It's like the first webpage built by Sun, the HTML, CSS and JavaScript with plain white and blue link.

Yeah. All right. Any other question that I missed?

Okay, let's wrap it up for now.

Oh, please plug your YouTube channel.

What is your YouTube channel?

Oh, my YouTube channel is, I have a couple of them, but you can, if it's specifically about Elixir stuff, just look for Plangora.

I'm not sure if I even have, yeah, I'm not sure if there's even a specific name for it or not.

Yeah, there is.

Is there a slash something? I don't even know.

Maybe /c/plangora.

Yeah, YouTube.

This one.

Yeah, so I plan to add more Elixir videos pretty soon because I used to create a lot of content, at least one to two a week.

But it's been a while since I've posted something.

Oh, nice. So, yeah, just hit subscribe and if you want to connect with you.

Where should they go?

Oh, Riza, you know that already because you were following me today.

Yes, on X or Twitter, yeah.

Yeah, yeah, I don't post a lot, but if you go to x.com/AlanWyma, A-L-L-E-N-W-Y-M-A, you'll find me there.

Okay, great.

Okay, that's it for tonight. Thank you very much, Alan, for the time, for the explanation.

Thank you for all the information.

Yeah, information overload, right?

Information overload.

Can the gears in our head are turning?

Yeah, hopefully we can do part two with a lot more audience.

And if people want to know more about Elixir and Erlang, maybe you can join the Erlang-Elixir Asia Meetup, right?

In the meetup.com, yeah.

Okay, that's it, maybe.

When?

When is the next one?

You definitely follow the group and you'll find out, because I'm not too sure.

Now, hopefully this month we'll try to see what we can do.

Okay, okay.

So, yeah, if you are interested in Elixir and Erlang, please do follow the meetup group and maybe see you next week.

That's it from us.

Bye-bye everybody.

Thank you, bye.

Deskripsi asli dari YouTube

Yuk mari kita diskusi dan ngobrol ngalor-ngidul tentang dunia web. Agar tetap up-to-date dengan teknologi web terkini. Topik, tautan dan pertanyaan menarik bisa dilayangkan ke https://bit.ly/ngobrolinweb Kunjungi https://ngobrol.in untuk catatan, tautan dan informasi topik lainnya.

Episode Terkait

Bagikan:

Suka episode ini?

Episode baru setiap Selasa malam. Dengarkan lewat YouTube, Spotify, atau feed podcast favoritmu.

Pilih Cara Langganan

Memuat komentar dari GitHub Discussions...

Jika komentar tidak muncul karena ekstensi privasi / adblocker, kamu bisa berdiskusi langsung di GitHub Discussions .