Writing My Own Text Editor | Prime Reacts

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2023
  • Recorded live on twitch, GET IN
    / theprimeagen
    Reviewed post: www.reddit.com/r/neovim/comme...
    Author: / hi_im_bored13
    MY MAIN YT CHANNEL: Has well edited engineering videos
    / theprimeagen
    Discord
    / discord
    Have something for me to read or react to?: / theprimeagenreact
    Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
    turso.tech/deeznuts
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 160

  • @TheSulross
    @TheSulross 8 หลายเดือนก่อน +494

    programmers eventually can't resist the urge to write their own OS kernel, their own programming language, or their own text editor
    probably is just how programmers deal with their mid-life crisis

    • @stevefan8283
      @stevefan8283 8 หลายเดือนก่อน +49

      what, i'm just 24 i've been doing my own OS kernel and my own C compiler (i used to make my own programming language before). are you implying that I'm already a mid-life crisis facing oji-san now?

    • @redpillsatori3020
      @redpillsatori3020 8 หลายเดือนก่อน

      @@stevefan8283🍪

    • @crimsonbit
      @crimsonbit 8 หลายเดือนก่อน +16

      Ngl I HAVE been thinking about designing and writing my own programming language with LLVM...

    • @josephmalham725
      @josephmalham725 8 หลายเดือนก่อน +4

      Making a text editor was my first ever real project that I did. I built it using PyQt, and I learned a lot about how to code which helped me a lot when I started building more complicated C# programs, but BOY was it shit

    • @aCrumbled
      @aCrumbled 8 หลายเดือนก่อน +9

      damnit im already at a mid life crisis at 17 (ive made a language and an editor)

  • @thegreatbambino3358
    @thegreatbambino3358 8 หลายเดือนก่อน +38

    I mean it is easier to write your own text editor than configure neovim

    • @soupnoodles
      @soupnoodles 4 หลายเดือนก่อน

      I concur

    • @iatheman
      @iatheman 2 หลายเดือนก่อน

      It can at least take as long.

    • @debajyatidey9468
      @debajyatidey9468 2 หลายเดือนก่อน +1

      Really?
      You think so?
      I was trying to follow a tutorial to Build the kilo text editor in C and couldn't just keep up because of the endless C macros.
      termios.h almost destroyed me.

  • @josetobias8084
    @josetobias8084 8 หลายเดือนก่อน +131

    I mean... from the way he explained everything, and if he's down to make it - with other engineers, as he mentioned... all I can say is:
    *LET HIM COOK*
    This is how software evolves, and people like this are the ones that make most difference in our day-to-day jobs - quality tools should never be underestimated.
    All power to him.

  • @tauiin
    @tauiin 8 หลายเดือนก่อน +75

    Variable width fonts are important for non-ascii text and other unicode features that cant fit inside a perfect rectangular grid of "letters", plain text that is just LTR graphemes does not exist. TUI first also has other issues like imposing one font size for everything and severely limiting you in what you can do with things like popups and other appearance related things.

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +11

      Indeed, even if you don't care for writing essays/emails in your text editor, programs who work with BIDI text (e.g. devanagari) or hindi/arabic can have far better shaping and joining support than what would otherwise be available through a TUI (or even neovim guy). In emacs i personally prefer having proportional fonts for comments, but I can understand why it would throw some users off.

    • @TheSulross
      @TheSulross 8 หลายเดือนก่อน +23

      Monotheism => monospace
      God wrote the universe simulation in a monospace font
      And clearly vi comes straight fromm the mind of God
      Don't fall to the devil's snares

    • @tauiin
      @tauiin 8 หลายเดือนก่อน +4

      @@TheSulrossIf this is the best god can do with vi I dont want to see what a world written in emacs would look like 😉

    • @mattymerr701
      @mattymerr701 8 หลายเดือนก่อน +2

      ​@@tauiin No, it's not that you don't want to, it's that you can't. Do you even understand what the performance issues are like when editing the universe? Takes way longer than 6 days!

    • @tauiin
      @tauiin 8 หลายเดือนก่อน

      @@mattymerr701hahahaha

  • @technocidal
    @technocidal 7 หลายเดือนก่อน +10

    This is happening everywhere! A bunch of Indie Apple Devs are currently writing their own code editors as well 😂
    - Runestone
    - Code Edit
    - Swift Studio
    - …
    It seems like a pattern

  • @ea_naseer
    @ea_naseer 8 หลายเดือนก่อน +43

    The final destiny of a text editor is an email reader.

    • @TheSulross
      @TheSulross 8 หลายเดือนก่อน +2

      so far every attempt to supplant bash and vim I've eventually given up on and gone back - no longer bother to check them out as am already at the promised land

  • @gus2603
    @gus2603 8 หลายเดือนก่อน +29

    This is what programming does to your brain, you want to rewrite everything.
    to make it to your liking, to your image. IT COMPELS YOU TO PLAY GOD!!

    • @fuzzy-02
      @fuzzy-02 7 หลายเดือนก่อน +1

      I got a few issues here myself. How can I pull request to GOD?

    • @MsHofmannsJut
      @MsHofmannsJut 3 หลายเดือนก่อน +1

      spot on

  • @wesleyoliveira6570
    @wesleyoliveira6570 8 หลายเดือนก่อน +61

    Funny thing, the name "Nyoom" is a onomatopoeia for the sound of a very fast object.

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +52

      Thats the original inspiration. I used to be a motorsports engineer before settling down and doing embedded, during that time I used to run my personal bike with some self-designed parts and aerokit, which I sold under a brand referred to as "nyoom-engineering" for fun
      Then I was writing a doom alternative for neovim a few years later, figured "I need something that rhymes with doom and sounds fast, nyoom!"

    • @Pedro-jj7gp
      @Pedro-jj7gp 8 หลายเดือนก่อน

      ​@@bored2171 Very interesting read, thanks for sharing man! I have an eye on some of your neovim projects and I really like the code quality. I am a subpar programmer, could you recommend some resources & practices that helped you along the way?

    • @regbot4432
      @regbot4432 8 หลายเดือนก่อน

      Yeah the brand name is cool! It's so cool, I'm going to actually keep an eye on the project.

    • @sagasofreddit_
      @sagasofreddit_ 8 หลายเดือนก่อน +1

      BLAZINGLY FAAAAAAAAAAST

    • @Epic501
      @Epic501 7 หลายเดือนก่อน

      ​@@bored2171it's a great name

  • @rezzor_
    @rezzor_ 8 หลายเดือนก่อน +12

    At some point, just open another window

  • @Muttisuri
    @Muttisuri 8 หลายเดือนก่อน +9

    As someone who likes the concept of Emacs but has often ended up fighting lisp instead of enjoying the configuration aspect, I'm kinda interested on this project, if it aims to be a modern replacement / rewrite of emacs I hope it does well.

  • @LaPingvino
    @LaPingvino 7 หลายเดือนก่อน +6

    Yeah, Lisp changes the way you think about programming for sure. I used to have a paying Common Lisp job. Emacs was basically a compromise when going from Lisp Machines to Unix and C. You have no idea how much people thought Lisp Machines would be the future.

  • @Ked_gaming
    @Ked_gaming 8 หลายเดือนก่อน +15

    I don't understand the need to do this but I can appreciate the commitment, kudos

    • @rushyscoper1651
      @rushyscoper1651 8 หลายเดือนก่อน +6

      reinventing the wheel is the best way to level up as a dev even senior dev sometimes need that tip.

    • @Ked_gaming
      @Ked_gaming 8 หลายเดือนก่อน

      @@rushyscoper1651 It's more than a side project at this point imo

    • @0ia
      @0ia 8 หลายเดือนก่อน +1

      ​@@rushyscoper1651The wheel gets reinvented all the time for niche uses (sports cars for example), and I prize niche far above generalized equipment.

    • @rushyscoper1651
      @rushyscoper1651 8 หลายเดือนก่อน +8

      @@0ia doesn't matter what reinventing, its something that dev culture need to push so we don't end up with iseven() dependency

    • @0ia
      @0ia 8 หลายเดือนก่อน +1

      @@rushyscoper1651 hah, very true, iseven as a dependency is horrid :)

  • @kagsdev
    @kagsdev 8 หลายเดือนก่อน +16

    1 indexing is awesome, it reminds me everytime that I cannot trust zero-or-one-indexes anyway

    • @NibbleMeTwice
      @NibbleMeTwice 8 หลายเดือนก่อน +1

      It's only weird to me because of pointer arithmetic.

  • @ryanleemartin7758
    @ryanleemartin7758 8 หลายเดือนก่อน +7

    The LISP must flow!

  • @genejas
    @genejas 8 หลายเดือนก่อน +5

    3:15 for a second i thought prime was talking about SPICE, the command line circuit simulator

  • @vitluk
    @vitluk 8 หลายเดือนก่อน +13

    Why helix hate tho? It's good, and does pretty much everything i need it to at this point + default keybinds are more sensible imo. Yes, no plugin system (being worked on) and a bit cumbersome to configure the LSPs, but it's one time operation, and you're good, especially if you have your dotfiles backed up (I use NixOS for example, so i dont have to even do much to have the exact same experience on a totally different machine). I also use a multiplexer (Zellij, cuz Rust and floating panes (very useful, can't live without them now)) + broot for fuzzy searching, and it's all I need really, been working like this for about 4-5 months now and can barely use normal IDE's at this point.

    • @covoeus
      @covoeus 8 หลายเดือนก่อน +2

      He despises that it uses kakoune style bindings (select->action) instead of vim binds (verb->object). I'm personally impartial but the OOTB experience of Helix simply can't be beat.

    • @vitluk
      @vitluk 8 หลายเดือนก่อน

      @@covoeus I haven't gotten that far into vim (cuz bindings were driving me crazy + I personally dislike Lua) so I'm not sure I understand what the difference is. To me as an average consumer, (n)vim just has "more steps" to achieve something in many cases, which I personally don't like.

    • @gus2603
      @gus2603 8 หลายเดือนก่อน

      ​@@covoeusootb?

  • @pif5023
    @pif5023 8 หลายเดือนก่อน +1

    “… he is trying to make Neovim into his operating system”
    Objection your honor! Factious speculation!

  • @ebn__
    @ebn__ 8 หลายเดือนก่อน +5

    Although I use Emacs I do agree with prime boi when it comes his take on vim, that is, GNU/Linux is your environment and vim is its editor.
    Emacs on the other hand is very different and it is hard for someone coming from vim (or any other text editor) to understand why a lot of people like Emacs simply by "trying it out". You most likely won't "get it" until you have learnt lisp in order to take advantage of the extensibility of Emacs, for while the biggest selling point of vim is its editing capabilities, extensibility is what makes Emacs great as well as the introspectability and interactive development experience that comes with being built on lisp.

    • @gus2603
      @gus2603 8 หลายเดือนก่อน

      Damn I have to learn lisp

  • @chofmann
    @chofmann 8 หลายเดือนก่อน +1

    I always wonder what the general opinion is on something like MuJS over lua. While I am well aware that lua is really tiny, it feels horrible to write in for me, and I would much prefer using JS for those instances.

  • @JayLooney
    @JayLooney 7 หลายเดือนก่อน +1

    I saw a chat go by that said "In the absence of history, 1-based indexing is more intuitive." And I presume they're referring only to programming history, because in mathematical history, ever since right around 5,000 years ago all number systems start with zero. And, w.r.t common number systems on computers binary, octal, decimal, and hexadecimal all start with 0, but what else would you choose for binary? 1, 2? I don't think so.

  • @rickwoods5274
    @rickwoods5274 8 หลายเดือนก่อน +1

    7:00 truly ascend: simplicity _is_ sophistication

  • @windowsrefund
    @windowsrefund 8 หลายเดือนก่อน

    So happy to hear you speak to using tmux to manage context switching between projects. The tmux-sessionist plugin rules. Great stuff.

  • @morganaverynz
    @morganaverynz 8 หลายเดือนก่อน +12

    Let him cook.

  • @didyoustealmyfood8729
    @didyoustealmyfood8729 8 หลายเดือนก่อน +2

    I remember when i wanted to program my own shell.😂😂

  • @Ryan-in3ot
    @Ryan-in3ot 8 หลายเดือนก่อน +17

    joe tried this challenge and it went pretty well for him

    • @nefrace
      @nefrace 8 หลายเดือนก่อน +9

      Wasn't that Joe Mama?

    • @gus2603
      @gus2603 8 หลายเดือนก่อน +1

      ​@@nefraceBro you are in a programming channel and don't know Joe?

    • @LARathbone
      @LARathbone 7 หลายเดือนก่อน +1

      JOE - Joe's Own Editor

  • @kumerolier11111
    @kumerolier11111 8 หลายเดือนก่อน +9

    0:33 - After I saw this video from Casey Muratoi - "How fast should an unoptimized terminal run?" and couple others - I will never just believe, that editors are just what they are, and that there is no more juice to be squeezed
    th-cam.com/video/hxM8QmyZXtg/w-d-xo.html&ab_channel=MollyRocket

    • @Qiaoster
      @Qiaoster 8 หลายเดือนก่อน

      th-cam.com/video/GB_oTjVVgDc/w-d-xo.htmlsi=mrKeCbx1syWAGEy2&t=2433 this is imo a very interesting direction we could take things

    • @TheSulross
      @TheSulross 8 หลายเดือนก่อน

      vi and vim still the best, most wholesome, non pasterized juice

  • @someman7
    @someman7 5 หลายเดือนก่อน

    What is the difference between php and lua? Honest question. I used both (besides many other languages) and I don't understand why one is hated and the other is not

  • @samarnagar9699
    @samarnagar9699 8 หลายเดือนก่อน +4

    Yes but what editor did he used to write the editor

    • @bored2171
      @bored2171 8 หลายเดือนก่อน

      Neovim.

  • @AM-yk5yd
    @AM-yk5yd 8 หลายเดือนก่อน +4

    Mandatory reminder, you wanted to use ed some time ago. (I barely managed to solve AoC2022 day 1 part 1 - managing python indentation from ed was a pain)

    • @LaPingvino
      @LaPingvino 7 หลายเดือนก่อน +1

      Python indentation is a pain*

  • @sord444
    @sord444 8 หลายเดือนก่อน +2

    Emacs version 25 makes you old?! 😂 (ehem started on version 20 here…)

  • @FreddyRangel85
    @FreddyRangel85 8 หลายเดือนก่อน +1

    lol what that a Dune reference @2:57? hahaha

  • @anasouardini
    @anasouardini 8 หลายเดือนก่อน +1

    When is the day that I can switch from VSCode to a modularly preconfigured editor; something in between a bare bones die-hard nvim and a "bloatedly/bloatfully" preconfigured distro/cult.
    A simple nvim setup + a more powerful version of packer or lazy would make the experience of using nvim super duper cool, even my mom would love using it if the extension managers are fledged enough yet modularly.

    • @heroe1486
      @heroe1486 3 หลายเดือนก่อน

      Why do you call nvim distros "cults" ? What is wrong with lazynvim as a plugin manager (especially since you don't want bloat) ?
      Seems you're the one not really understanding the landscape since all the options are here, namely nvim and "do it yourself", kickstart for a minimal but working config and LazyVim for a modular distro

  • @samgould8567
    @samgould8567 8 หลายเดือนก่อน +2

    If I was as skilled as OP, I would probably try the same thing.

  • @captainfordo1
    @captainfordo1 8 หลายเดือนก่อน +1

    I like Vim’s keybinds and motions, but I do not like Vim/Neovim as a text editor. 4coder seems like a far better option

  • @Microphunktv-jb3kj
    @Microphunktv-jb3kj 8 หลายเดือนก่อน

    if emacs configuration language would not be lisp, i would use it.
    i dont wanna learn lisp , period
    I dont mind having mail, irc and other stuff in one place. it just makes sense actually if ur developer and sit hours on end on the computer and in editor, that the editor becomes ur pseudo-OS

  • @user-hy5oo3vf5c
    @user-hy5oo3vf5c 8 หลายเดือนก่อน +6

    “This mentat is not a retard, he’s just suffering a Segfault” - CHOAM engineer probably

  • @Sameer.Trivedi
    @Sameer.Trivedi 8 หลายเดือนก่อน

    is it written in JDSL?

  • @fuzzy-02
    @fuzzy-02 7 หลายเดือนก่อน +1

    Behold a programmer reaching the critical state of transcendence.
    They will either ascend and unlock a new way for everyone else, or they will fall.
    But even if they do fall. They would still land at a pretty good altitude kekw

  • @vivraan
    @vivraan 8 หลายเดือนก่อน

    Nvim configuration is a great pain in the rear

  • @freesoftwareextremist8119
    @freesoftwareextremist8119 8 หลายเดือนก่อน +2

    > "elisp sucks!"
    > uses fennel

    • @weakspirit_
      @weakspirit_ 8 หลายเดือนก่อน +1

      unfortunately, it's true. elisp is just not a good lisp

    • @freesoftwareextremist8119
      @freesoftwareextremist8119 8 หลายเดือนก่อน

      @@weakspirit_ It's a better Lisp than fennel.

  • @Xtrit
    @Xtrit 8 หลายเดือนก่อน

    Does anyone know if he uses a Dvorak layout or something?

    • @vivraan
      @vivraan 8 หลายเดือนก่อน +1

      Yes, he uses Dvorak.

  • @joeyhills212
    @joeyhills212 8 หลายเดือนก่อน +4

    IM STILL READING DUNE STOP SPOILING IT

    • @nandoflorestan
      @nandoflorestan 8 หลายเดือนก่อน

      Portuforrakis dies.

  • @Kane0123
    @Kane0123 8 หลายเดือนก่อน +3

    Is 1 indexing really all that bad? It matches the way we speak/think. I think heads would explode if I asked what the zeroth item on the todo list is.

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +7

      1 indexing isn't inherently bad, just like 0 indexing isn't inherently good. I think 1 indexing is more natural for newer users, but it does get quite annoying when you have to implement c/c++/ffi bindings for lua and constantly have to think about 1vs0 indexed lists. I wish it just stuck with 0 indexing.

    • @ea_naseer
      @ea_naseer 8 หลายเดือนก่อน

      it's one of those things when you master most people can't wrap their heads around the alternative.

    • @JiggyJones0
      @JiggyJones0 8 หลายเดือนก่อน +1

      It doesn't make sense if you understand how pointers and indexing work.

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +3

      lua indices are actually indices, in c it means the item address offset of the array address. Just take advantage of for/ipairs and you don't need to keep track of indices anyways

    • @sub-harmonik
      @sub-harmonik 8 หลายเดือนก่อน +1

      because number systems are actually based around 0, not 1. for instance if you want to look up into a table with the result of a modulo you always have to add 1 it's super annoying.
      or even if you have some function in a table, you always have to add 1 after some math operation. e.g. I have a 2048 element table that stores a sine wave, and a phase value that goes from 0 to 1 (exclusive). so after multiplying by the size of the table and doing floor or some other interpolation I have to add 1 before lookup.
      I love lua but in retrospect trying to combine arrays and hashtables into 1 general data structure was probably a mistake.

  • @whig01
    @whig01 8 หลายเดือนก่อน +3

    I uninstalled Neovim and went back to Vim. Neovim was way too powerful with accidentally deleting things as a consequence, and gone it is.

    • @GreyDeathVaccine
      @GreyDeathVaccine 8 หลายเดือนก่อน

      That's why you should do daily backup 🙂

    • @whig01
      @whig01 8 หลายเดือนก่อน +1

      @@GreyDeathVaccineNo worries, I didn't lose anything. But I don't like it.

  • @PinakiGupta82Appu
    @PinakiGupta82Appu 8 หลายเดือนก่อน +3

    I wrote (modified to do what I wanted the code to do) some Lisp back in 2004 since I needed to automate some tasks (finding a basic celluloid film cartridge and paper purchase strategy for my shop) in XMaxima. A plain LPP solver, nothing's extraordinary. The CAS can be extended to do anything imaginable in mathematics via Lisp scripts.

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +2

      I still use M-x calc every single day. No RPN/RPL calculator, standalone or otherwise, even barely touches its capabilities, configurability, and scriptability.

    • @MH_VOID
      @MH_VOID 8 หลายเดือนก่อน

      ​@@bored2171 I've been looking for a calculator to use for a while. My goto is currently just dc (usually through `calc() { dc

  • @samuelschwager
    @samuelschwager 8 หลายเดือนก่อน +1

    lisp is helluva drug

  • @jankampling3574
    @jankampling3574 8 หลายเดือนก่อน

    Nice place here!

  • @astronemir
    @astronemir 8 หลายเดือนก่อน

    Simplicity is good to arrive back to but when you start there and see caveman like code all over its hell

  • @MrAlanCristhian
    @MrAlanCristhian 8 หลายเดือนก่อน +2

    I have a pet project that is an code editor 😅

  • @dmytrk
    @dmytrk 6 หลายเดือนก่อน

    Nyooooooom cars😊

  • @esra_erimez
    @esra_erimez 8 หลายเดือนก่อน +1

    "boomering really hard" 🤣

  • @lmnts556
    @lmnts556 8 หลายเดือนก่อน

    I really like lua, but I also really hate lua for one reason. That it indexes from 1 instead of 0. Why? And it embeds into a bunch of other languages who index from 0, it's just wrong.

  • @dinckelman
    @dinckelman 8 หลายเดือนก่อน +3

    What prime said is basically what it is. You can spin up a "text editor" in like 2 minutes. You won't get a proper editor, or an "IDE" that fast though. Just look at something like nvim vs helix. At the top level, they do basically exactly the same thing, except one grew based on two decades of decisions, and the other one doesn't have any plugin support. This is very similar to Jetbrains' Fleet, which is essentially... useless

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +8

      Thats a bit of a shallow way of looking at helix. Helix has the benefit of seeing where neovim went wrong and what they can do right. Notably, dap support from the start, integrated completion, and most importantly representing the buffer as a rope. Helix runs o(n) complexity throughout as opposed to neovim's o(n^2) at times.

    • @dinckelman
      @dinckelman 8 หลายเดือนก่อน

      @@bored2171 You're right, will admit that. I did use it myself for quite a bit, before it was popularized in socials, and I really appreciated what it does out of the box, but it let me wanting more

    • @anderdrache8504
      @anderdrache8504 8 หลายเดือนก่อน +1

      This just furthers the point that writing your own text editor is a great, fun idea. I tried out helix and I don't really miss anything from neovim which i had to configure much more.
      Your text editor doesn't need many features, just a solid experience when interacting with code via tree-sitter and lsp and navigation between files.
      I started writing my own text editor for fun and so far have integrated tree-sitter and some lsp features. I feel like discouraging people from doing that is a bad idea because it's fun!

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +1

      @@anderdrache8504 Indeed! I think that even if nothing comes out of this project, hopefully it inspires someone to get into lisp, write their own text editor, etc.
      Writing a language and writing language tooling are IMO two of the greatest things you can do as a programmer to further your knowledge on how computing works.

  • @jeremycoleman3282
    @jeremycoleman3282 8 หลายเดือนก่อน

    Core yootles

  • @catcatcatcatcatcatcatcatcatca
    @catcatcatcatcatcatcatcatcatca 8 หลายเดือนก่อน

    That sounds like a modern version of emacs. They want emacs.

    • @eriklundstedt9469
      @eriklundstedt9469 8 หลายเดือนก่อน

      I actually prefer writing fennel over elisp
      The syntax just feels more modern to me, and this from someone using Emacs on a regular basis, mainly to write fennel...

  • @robmorgan1214
    @robmorgan1214 7 หลายเดือนก่อน +4

    Using a text editor to write a text editor is cheating. Punch cards and dip switches or GTFO!!!

  • @slowjocrow6451
    @slowjocrow6451 7 หลายเดือนก่อน

    Helix is the best so far

  • @TerrenceLP
    @TerrenceLP 8 หลายเดือนก่อน +1

    Hilarious 😂 no one tool can fit all the needs of many. This reminds me of how much time is wasted on bs 🎉

  • @spikespaz
    @spikespaz 6 หลายเดือนก่อน

    kakuone

  • @omarabuabdullah4862
    @omarabuabdullah4862 3 หลายเดือนก่อน

    being a Linux user mean that you have to spend your time configuring your environment
    instead of using it

  • @Handola
    @Handola 8 หลายเดือนก่อน

    uwu

  • @Handola
    @Handola 8 หลายเดือนก่อน

    vscode better uwu

  • @awesomedavid2012
    @awesomedavid2012 8 หลายเดือนก่อน +6

    Lua is kind of an abomination to me, but there's one thing I have to give it: Factorio. Factorio is written in lua and it's a mess of complex. And yet, somehow, the devs have made it so damn optimized.
    Perhaps it would be more optimized in Go, Rust, or C. But the fact that it can be that optimized at all is very impressive

    • @343N
      @343N 8 หลายเดือนก่อน +19

      Factorio is written in C++. It just has a Lua API interface for modders.

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +3

      The main issue with luajit isn't that you can't write fast code, it's just that you can't write idiomatic code fast. It's one or the other. Luau has made some project on that front though (by pretty much rewriting the entire interpreter), but well-written lua (especially with luau type hints) can still hold up to certain compiled languages!

    • @raiguard
      @raiguard 8 หลายเดือนก่อน +6

      If Factorio was entirely written in Lua the performance would be laughably bad. Lua is very fast for a scripting language, but it's still a scripting language. Factorio itself is written in highly optimized C++.

    • @bored2171
      @bored2171 8 หลายเดือนก่อน +1

      @@raiguard Completely agree, hence why the graphical framework, rope implementation, semantic parsing, and all of the performance-critical bits for the editor will be written in rust. However, just wanted to point out that luajit is still more than performant enough for most higher-level tasks (including templating and configuration) and that implementing the majority of code in lua shouldn't be a bottleneck.

    • @raiguard
      @raiguard 8 หลายเดือนก่อน +2

      ​@@bored2171Right, writing something like a text editor in Lua is fine. Factorio has to scale to immense sizes, and has to be deterministic for multiplayer, meaning that we had to heavily customize Lua to make it entirely deterministic. LuaJIT would be practically impossible for this use case.

  • @haruruben
    @haruruben 8 หลายเดือนก่อน

    Meh

  • @e.alvarez2843
    @e.alvarez2843 8 หลายเดือนก่อน

    @theprimetime you're using vim the way UNIX was designed. UNIX is the IDE, vi/vim is the text editor (btw I have zero qualms with Emacs)

  • @kopuz.co.uk.
    @kopuz.co.uk. 8 หลายเดือนก่อน

    Can't watch this, i bet this is a emacs video i disguise