01:16:04 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
01:25:10 | * | krux02 quit (Remote host closed the connection) |
01:49:05 | * | beholders_eye quit (Ping timeout: 248 seconds) |
02:28:52 | * | rockcavera joined #nim |
02:45:51 | * | SchweinDeBurg joined #nim |
03:19:10 | * | tiorock joined #nim |
03:19:10 | * | tiorock quit (Changing host) |
03:19:10 | * | tiorock joined #nim |
03:19:10 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
03:19:10 | * | tiorock is now known as rockcavera |
04:01:51 | * | xet7 quit (Remote host closed the connection) |
04:03:59 | * | rockcavera quit (Remote host closed the connection) |
06:36:08 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
06:40:34 | * | Lord_Nightmare joined #nim |
07:50:18 | FromDiscord | <peachey2k2> In reply to @Amun-Ra "peachey2k2: int64 will be": yup that does it |
07:50:35 | FromDiscord | <peachey2k2> thank you so much |
08:12:15 | * | ntat joined #nim |
09:41:45 | Amun-Ra | peachey2k2: mind that anything that goes above the limit is going to give you interesting results |
09:42:25 | Amun-Ra | JS switches the type to float in that case, Nim code will end up not as you'd like |
09:42:47 | Amun-Ra | I'd keep the switch on and convert to uint32 on nim side |
10:34:26 | FromDiscord | <ravinder387> i can't able to install nim in windows |
10:35:22 | FromDiscord | <ravinder387> I'm using nim in wsl since 6 month what should i do |
10:35:39 | FromDiscord | <nnsee> what do you mean exactly? what error are you getting? |
10:38:07 | * | ensyde joined #nim |
10:38:11 | FromDiscord | <ravinder387> In reply to @nnsee "what do you mean": https://media.discordapp.net/attachments/371759389889003532/1330848846695370763/Screenshot_7.png?ex=678f7913&is=678e2793&hm=29d2a0bdecda3237d48f86446d1b736061bd8f9464d41f02ca9d2ecfda19cf4f& |
10:38:57 | FromDiscord | <nnsee> what antivirus product are you using? |
10:39:20 | FromDiscord | <nnsee> you should add an exception for the zip. it's a false positive |
10:39:47 | FromDiscord | <ayex> ..if the sha matches.. |
10:39:55 | FromDiscord | <ravinder387> how to add exception for zip |
10:40:14 | FromDiscord | <nnsee> In reply to @ravinder387 "how to add exception": well if you don't tell me what antivirus product you're using, i can't tell you |
10:40:43 | FromDiscord | <ravinder387> I don't hv any antivirus. it's default window defender |
10:41:19 | FromDiscord | <ravinder387> i disabled everything but still i get this error |
10:41:27 | FromDiscord | <nnsee> then you go into defender settings. there should be a list of recently detected threats with the zip in them. you have to select "Allow" on the zip, instead of "quarantine" or whatever it's selected |
10:42:19 | FromDiscord | <nnsee> either that or you add `C:\Users\[your username]\Downloads\nim-2.2.0_x64.zip` to exceptions manually |
10:45:11 | FromDiscord | <ravinder387> In reply to @nnsee "then you go into": do u mean i should off realtime protection https://media.discordapp.net/attachments/371759389889003532/1330850605035683842/Screenshot_8.png?ex=678f7ab6&is=678e2936&hm=56f19ec74f1da3cff7aa10b3b3464a2cbcd6488c433f5c1c71c408665f7169ef& |
10:45:37 | FromDiscord | <ravinder387> i hv done it it don't work |
10:48:00 | Amun-Ra | I wonder whether self-signing exe helps |
10:48:47 | FromDiscord | <nnsee> In reply to @ravinder387 "do u mean i": no, that's not what I'm saying |
10:49:17 | FromDiscord | <nnsee> please google "how to add exception in windows defender" |
10:51:33 | * | beholders_eye joined #nim |
11:06:39 | * | beholders_eye quit (Ping timeout: 272 seconds) |
11:11:20 | FromDiscord | <peachey2k2> In reply to @Amun-Ra "I'd keep the switch": but i can't do that because some webgl stuff in the bindings are typed for 64 bit ints |
11:11:52 | FromDiscord | <peachey2k2> i doubt i'll have 2^52 vertices tho so it's not a big deal |
11:11:57 | Amun-Ra | right |
11:12:06 | Amun-Ra | I see |
11:24:26 | * | beholders_eye joined #nim |
11:29:20 | FromDiscord | <pmunch> How can you compare two symbols? |
11:30:40 | FromDiscord | <pmunch> I have a `Sym "string"` from a proc definition and another `Sym "string"` from a call to `getTypeImpl` but the normal `==` compare doesn't match |
11:32:42 | Amun-Ra | hmm, would $x == $y work? |
11:33:04 | Amun-Ra | I alway try these things as I type (macros) |
11:33:27 | Amun-Ra | give me two weeks and I'll forget ast details |
12:04:44 | FromDiscord | <pmunch> That's ugly though.. |
12:05:09 | FromDiscord | <pmunch> Figured out that `sameType` was a thing 🙂 |
12:06:14 | FromDiscord | <pmunch> Hmm, the `treeRepr` for `varargs[string]` and `varargs[string, $]` is identical |
12:09:29 | FromDiscord | <solitudesf> In reply to @pmunch "Hmm, the `treeRepr` for": not on my machine |
12:19:10 | * | xaltsc quit (Quit: WeeChat 4.5.1) |
12:22:51 | FromDiscord | <pmunch> Really? |
12:26:07 | FromDiscord | <solitudesf> sent a code paste, see https://play.nim-lang.org/#pasty=QutPLXbA |
12:27:39 | FromDiscord | <solitudesf> with typed macro too, just varargs and string are `Sym` |
12:33:07 | * | beholders_eye quit (Ping timeout: 264 seconds) |
12:47:14 | * | beholders_eye joined #nim |
12:49:27 | FromDiscord | <pmunch> Hmm |
12:56:17 | * | krux02 joined #nim |
13:34:02 | FromDiscord | <peachey2k2> In reply to @Amun-Ra "give me two weeks": you can forget anything in 2 weeks |
13:36:26 | FromDiscord | <jseb> sent a code paste, see https://play.nim-lang.org/#pasty=nhWiBsLQ |
13:37:40 | FromDiscord | <solitudesf> nimble install nimble |
13:38:37 | FromDiscord | <jseb> ah it's `install` now, thank you |
13:38:48 | * | ensyde quit (Ping timeout: 276 seconds) |
13:41:19 | FromDiscord | <jseb> « faild to clone vendor/zippy » |
13:41:44 | FromDiscord | <jseb> (edit) "»" => "»↵same error than yesterday, though i've all reinstalled from scratch following the manual" |
13:43:03 | FromDiscord | <jseb> (edit) "« faild to clone vendor/zippy »↵same error than yesterday, though i've all reinstalled from scratch following the manual" => "sent a code paste, see https://play.nim-lang.org/#pasty=iyoQLREM" |
14:01:39 | FromDiscord | <Clonkk> |
14:02:21 | FromDiscord | <Clonkk> In reply to @.sneakybaguette "": Replying you here to avoid spamming the other channel. Yes, Nim can replace C in the sense that everything you can do with C, you can do with Nim - including using other C library (like firmware / driver) |
14:03:25 | FromDiscord | <Clonkk> For example, I once wrote binding to the C library of some user-space Linux driver, and then made a higher level, nicer to use Nim API |
14:03:55 | FromDiscord | <Clonkk> Alternative to C, usually means "you can use C library, you can do everything C can do, and you can target the same HW architecture as C" |
14:04:14 | FromDiscord | <zimzozaur> In reply to @.sneakybaguette "Replying you here to": You replace the 2nd layer of abstraction the language to do the thing but you do not change the eco this way right (like C based Linux instead of Unikernel in Odin for example)? |
14:04:59 | FromDiscord | <zimzozaur> (edit) "instead of" => "to" |
14:06:19 | FromDiscord | <Clonkk> From C file (.c / .so / .a + .h usually), you derive C function in Nim using `importc` . Then you can handle those C style function better in Nim. For example, C function that require a `char` , `len` pair you can easily create a Nim function that takes `string` as input and from that string passes a `mystr.cstring, mystr.len` |
14:06:47 | FromDiscord | <Clonkk> There's library like [Futhark](https://github.com/PMunch/futhark) that can do that automatically |
14:09:28 | FromDiscord | <Clonkk> Another example, can be for error handling. C-style error handling will usually be : passing the output argument as mutable parameters and returning an int from the function. Then checking the returned value against a table of error message (`errno` style). This is extremely verbose and non-intuitive and that's something you can easily change with Nim; a simple template can convert a C-error into an exception |
14:09:52 | FromDiscord | <Clonkk> Or if you know what the C library is doing, you can re-implement it natively in Nim 🙂 |
14:10:01 | FromDiscord | <zimzozaur> In reply to @.sneakybaguette "From C file (.c": Hmmm it sounds interesting. Do you import C for convince or/and performance? |
14:10:11 | FromDiscord | <Clonkk> For convenience mostly |
14:11:04 | FromDiscord | <Clonkk> The perf in difference between naive C and naive Nim is at best negligible (although it's easier to write better code in Nim than in C IMO). Optimised Nim will run just as fast as optimised C assuming same level of optimisation |
14:11:22 | FromDiscord | <Clonkk> (edit) "(although" => "(sometimes even in favor of Nim since" |
14:14:06 | FromDiscord | <Clonkk> Also there's no need to re-write from scratch fundational C library who have had decade of work and battle-tested |
14:14:17 | FromDiscord | <Clonkk> (edit) "Also there's no need to re-write from scratch fundational C library who have had decade of work and ... battle-tested" added "are" |
14:15:33 | FromDiscord | <zimzozaur> How about use cases. I am for now only a Humble Python Intern. Learning ASM and C (I am at the beginning) but wanted to learn something niche and new but fast (I believe thing should be fast by default) and Nim sounded very very intriguing that looks like Python, but is much faster and allows you to play with memory to make it even faster. But I don’t found much on Internet which means it is really niche and I didn’t hear about use |
14:16:36 | FromDiscord | <zimzozaur> In reply to @.sneakybaguette "Also there's no need": Right! It is a little like with Power Plants in Fortran. Why would you update if it works. |
14:19:07 | FromDiscord | <Clonkk> sent a long message, see https://pasty.ee/tEPzAEaE |
14:19:40 | FromDiscord | <Clonkk> To interact with python there's an excellent bindings to libpython : https://github.com/yglukhov/nimpy |
14:20:23 | FromDiscord | <Clonkk> We actually wrote a guide a while ago about using Python and Julia from Nim to extend the ecosysten https://scinim.github.io/getting-started/external_language_integration/index.html |
14:20:40 | FromDiscord | <Clonkk> For ML, the most important Nim library would be https://github.com/mratsim/Arraymancer |
14:20:57 | FromDiscord | <Clonkk> (edit) "ML," => "ML or numerical computation," |
14:21:29 | FromDiscord | <zimzozaur> How about backend. How would you compare Nim to Go? |
14:21:29 | FromDiscord | <Clonkk> For backend stuff I'd probably start with Happyxhttps://github.com/HapticX/happyx |
14:21:31 | FromDiscord | <nervecenter> For data frames there's https://github.com/SciNim/Datamancer which is pretty fantastic |
14:21:54 | FromDiscord | <Clonkk> Yeah @vindaar has done an excellent work as a dataframe library with that 🙂 |
14:22:08 | FromDiscord | <Clonkk> Favorite ORM in Nim is https://github.com/moigagoo/norm |
14:22:34 | FromDiscord | <Clonkk> I think lots of people have used https://github.com/planety/prologue as well |
14:22:42 | FromDiscord | <Clonkk> (edit) "I think lots of people have used https://github.com/planety/prologue as well ... " added "for backend" |
14:25:09 | FromDiscord | <Clonkk> sent a long message, see https://pasty.ee/KfmcMqBI |
14:26:59 | FromDiscord | <Clonkk> There's nothing you can do in Go you can't do in Nim. There's lots of things you can do in Nim you CAN'T do in Go. ↵BUT you may find Go has libraries that don't exists in Nim (especially if you're looking into ops stuff or database drivers) |
14:28:25 | FromDiscord | <zimzozaur> @Clonkk thank you for all your input. Now I have to digest it 😊 |
14:30:43 | FromDiscord | <Clonkk> My overall opinion is that Nim is worth learning, and it's nice enough to work with (especially with the recent improvement on tooling and the work of @jmgomez ). That said, it all depend on the environment you're in (are you working for a big company ? Is it a personnal project ?) and the goal you have |
14:31:50 | FromDiscord | <Clonkk> If all you want is "faster python" you could also look into alternative Python compiler (either using JIT like Numba or through "Python-compatible" language like Mojo or Codon are doing) |
14:43:11 | FromDiscord | <ravinder387> i successfully extract nim-2.2.0 but when i tried to run finish.exe window remove this file https://media.discordapp.net/attachments/371759389889003532/1330910500027891722/Screenshot_9.png?ex=678fb27e&is=678e60fe&hm=13321f63d719b724b649b6b44a3b7daa00e5f1b4bb3c199e25a10da3339c43e5& |
14:43:35 | FromDiscord | <ravinder387> do i need to again install nim in windows |
14:44:19 | FromDiscord | <jseb> there is still the AV problem with nim in windows ? I thought it was history |
14:49:57 | FromDiscord | <peachey2k2> wait you can just use |block:` as an expression? |
14:50:04 | FromDiscord | <peachey2k2> (edit) "|block:`" => "`block:`" |
14:50:25 | FromDiscord | <lainlaylie> https://nim-lang.github.io/Nim/manual.html#statements-and-expressions-block-expression |
14:50:54 | FromDiscord | <lainlaylie> In reply to @ravinder387 "i successfully extract nim-2.2.0": windows doesnt like finish.exe but it's not difficult to do what it does manually |
15:01:18 | FromDiscord | <peachey2k2> In reply to @lainlaylie "https://nim-lang.github.io/Nim/manual.html#statemen": yeah cool shit |
16:16:12 | * | fallback joined #nim |
17:21:41 | * | beholders_eye quit (Quit: WeeChat 4.1.2) |
17:23:16 | FromDiscord | <michael.lenz.> @zimzozaur as far as I know nim directly generates js code. |
17:33:29 | FromDiscord | <michael.lenz.> So to compile directly into machine code, you needed your own assembler, compiler, and linker. What's a bit difficult to create a piece of software |
17:38:16 | FromDiscord | <michael.lenz.> Having an intermediate translation to C gives ability to utilize top optimizations that clang and gcc has. Most operating systems are also written in C/C++. |
17:39:19 | FromDiscord | <muddmaker> It also lets nim support all of the CPU architectures that have C compilers without needing to implement all of that as part of the project |
17:40:07 | FromDiscord | <muddmaker> Which is all of them (except for m88k, which GCC dropped support for in v4, therefore is too old for nim's c generator) |
17:40:42 | FromDiscord | <muddmaker> (edit) "Which is all of them ... (except" added "that are supported by modern operating systems" |
17:45:33 | FromDiscord | <solitudesf> also allows for source level interop, which can matter if you're using a cpp library. |
17:47:12 | * | beholders_eye joined #nim |
17:48:12 | FromDiscord | <muddmaker> Also true for macro heavy C libraries |
17:51:23 | FromDiscord | <lainlaylie> what even are the benefits of going straight to binary? one fewer dependency? |
17:52:04 | FromDiscord | <muddmaker> You could say "one" fewer dependency, but it is a giant complex dependency |
17:52:49 | FromDiscord | <muddmaker> And it would also be faster to compile if nim didn't need to first translate to C and invoke a C compiler |
17:52:59 | FromDiscord | <muddmaker> Getting good debug symbols might also be easier |
17:53:15 | FromDiscord | <muddmaker> But is it worth it? Probably not |
17:53:18 | FromDiscord | <Robyn [She/Her]> In reply to @lainlaylie "what even are the": You could say optimisations specific to your language? Though that's with LLVM IR backing you, if you wanna go directly to ASM it'll probably be a lot more work on your part |
17:54:12 | FromDiscord | <Robyn [She/Her]> Even going to LLVM is some effort and it's still another dependency you gotta ship with the compiler, a rather large one at that |
17:54:37 | FromDiscord | <Robyn [She/Her]> Though there is a LLVM compiler backend at https://github.com/arnetheduck/nlvm |
17:55:33 | FromDiscord | <muddmaker> And if you chain yourself to LLVM, then you also need to track LLVM's development cycle and are also limited to LLVM's architectures |
17:56:17 | FromDiscord | <muddmaker> Which is what happened to zig, for example |
17:56:47 | FromDiscord | <Robyn [She/Her]> Yeah, which is why they've been working on their own compiler IR for a while now, right? |
17:56:52 | FromDiscord | <muddmaker> Yeah |
17:57:04 | FromDiscord | <muddmaker> But that's a _huge_ effort, but it may pay off |
17:57:22 | FromDiscord | <Robyn [She/Her]> mhm for sure |
17:57:46 | FromDiscord | <muddmaker> If it does, and they are able to support every arch that people care about, maybe a Nim->Zig set up can be made... |
17:57:54 | FromDiscord | <lainlaylie> we will watch with interest but to me it looks very reinventingthewheel-y |
17:57:58 | FromDiscord | <Robyn [She/Her]> Though they still do need to maintain their LLVM stuff because of the easy interop with C |
17:58:09 | FromDiscord | <muddmaker> I think they are making a C compiler as well |
17:58:21 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "I think they are": Jeez, really? Good luck to them |
17:58:24 | FromDiscord | <Robyn [She/Her]> In reply to @lainlaylie "we will watch with": Fair |
17:58:27 | FromDiscord | <muddmaker> C isn't _that_ hard |
17:58:35 | FromDiscord | <muddmaker> C++ is _way_ harder |
17:58:38 | Amun-Ra | there's no need to dig into llvm if the target you'd like to port nim code to can be adopted to posix; I ported my nim code to good old AmigaOS |
17:58:41 | FromDiscord | <Robyn [She/Her]> Doesn't Rust support Cranelift for debug builds now? Or is that a fantasy thing |
17:59:11 | FromDiscord | <muddmaker> Yeah, they have some support for Cranelift, and it's faster than LLVM, but far more limited in hardware support |
17:59:11 | FromDiscord | <Robyn [She/Her]> (edit) "Doesn't Rust support Cranelift for debug builds now? Or is that a fantasy thing ... " added "I had" |
17:59:44 | FromDiscord | <Robyn [She/Her]> Yeah, but I'd say the benefit of rapid debug builds outweigh it, especially since it's still pretty fast despite having less optimisations as LLVM |
17:59:51 | FromDiscord | <Robyn [She/Her]> (edit) "as LLVM" => "than /LVM" |
17:59:54 | FromDiscord | <Robyn [She/Her]> (edit) "/LVM" => "LLVM" |
18:00:42 | FromDiscord | <muddmaker> For sure |
18:01:05 | FromDiscord | <Robyn [She/Her]> Araq did look into a Cranelift backend for NIF briefly but quickly dumped it because of no decent ASM format |
18:01:16 | FromDiscord | <Robyn [She/Her]> And it'd be a time sink to work on that too |
18:01:25 | FromDiscord | <muddmaker> I thought it was because of a lack of documentation |
18:01:30 | FromDiscord | <Robyn [She/Her]> this was a while ago in #internals |
18:01:33 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "I thought it was": that too |
18:05:47 | FromDiscord | <michael.lenz.> In reply to @muddmaker "I think they are": Who? Zig team? |
18:06:15 | FromDiscord | <muddmaker> In reply to @michael.lenz. "Who? Zig team?": Here: <https://github.com/ziglang/zig/tree/master/lib/compiler/aro> |
18:07:01 | FromDiscord | <lainlaylie> must be nice having the hype and the people-hours that come with it on your side |
18:07:15 | FromDiscord | <Robyn [She/Her]> yeahh |
18:08:51 | FromDiscord | <michael.lenz.> Crazy, translate to zig to have llvm again? |
18:09:14 | FromDiscord | <muddmaker> Zig has an LLVM backend, but they are also trying to make their own code gen backend that doesn't require it |
18:09:29 | FromDiscord | <michael.lenz.> Ah, ok |
18:09:34 | FromDiscord | <muddmaker> Along with a complete toolchain down to the low level, e.g. a linker and the like |
18:10:09 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "Along with a complete": huh, why their own linker? |
18:10:14 | FromDiscord | <muddmaker> They want incremental linking |
18:10:21 | FromDiscord | <muddmaker> Hot reloading for native code |
18:10:22 | FromDiscord | <michael.lenz.> Sounds like scifi |
18:10:31 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "They want incremental linking": linkers don't have that stuff? |
18:10:38 | FromDiscord | <michael.lenz.> Do they have huge team? |
18:10:51 | FromDiscord | <muddmaker> I think it was just 1 or 2 guys that were working on the linker part of it |
18:10:54 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "Hot reloading for native": huh... |
18:11:10 | FromDiscord | <muddmaker> It's a large group of people for the complete project, but people can find their own niches |
18:11:36 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "I think it was": focus will probably be adjusted once other crucial parts are closer to a complete implementation |
18:12:02 | FromDiscord | <michael.lenz.> Its not like a kernel or os userspace apps development. Way too complicated |
18:12:05 | FromDiscord | <muddmaker> It's nothing we couldn't use for inspiration either. It's all MIT licensed |
18:12:26 | FromDiscord | <muddmaker> <https://github.com/ziglang/zig/tree/master/src/link> |
18:12:52 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "It's nothing we couldn't": that's true, maybe someone will work on a pure Nim C compiler and linker, but certainly not me |
18:13:05 | * | xaltsc joined #nim |
18:13:30 | FromDiscord | <muddmaker> There was already a little interest in nimony, with preasm + direct asm generation (with no optimizations) as part of nifc |
18:13:37 | FromDiscord | <michael.lenz.> There’s no need to have own compiler toolchain. Even intel uses clang |
18:13:55 | FromDiscord | <muddmaker> It's not about needs, but wants |
18:17:00 | FromDiscord | <Robyn [She/Her]> honestly if i ever manage to make my own language, I'm probably jumping off of the Nim train for that |
18:17:21 | FromDiscord | <Robyn [She/Her]> Since I'd get to customise it to my heart's content since I'd be familiar with the internals |
18:17:38 | FromDiscord | <Robyn [She/Her]> Nim is a great language but some features it lacks that macros can't fill |
18:18:20 | FromDiscord | <Robyn [She/Her]> Or some tasks just feel too big for someone like me to take the time to properly dive into (I did wanna make a JVM backend, probably revisiting the idea once NIF lands) |
18:20:02 | FromDiscord | <muddmaker> I think for now, focusing on nimony is a good thing for the nim team |
18:20:40 | FromDiscord | <muddmaker> Building a nim-native "lower end" of the compiler toolchain could be a nice to have, but it is not a must have, for the language |
18:20:43 | FromDiscord | <Robyn [She/Her]> yeah, gives a chance to work with a fresh codebase without legacy cruft |
18:21:32 | FromDiscord | <nervecenter> So much of this work has already been done to an extensive level by existing compiler toolchains, you'd need a really good justification to reinvent a very very refined wheel |
18:22:15 | FromDiscord | <nervecenter> Most complaints about compiler backends I've seen concern C++ binary output |
18:22:31 | Amun-Ra | rolling your own language nowadays is just like rolling your own crypto |
18:25:46 | FromDiscord | <zimzozaur> In reply to @muddmaker "And it would also": I listened to one cppcon talk where a guy from Google said that there were compiling one file from dozens of them for 15Â min each. Jonathan Blow was saying that completion times are important for him when desiging Jai. |
18:27:19 | FromDiscord | <zimzozaur> In reply to @muddmaker "And if you chain": GingerBill was complaining about it and saying that you shouldn't use LLVM. |
18:27:47 | FromDiscord | <michael.lenz.> And what they use? Gcc? |
18:27:55 | FromDiscord | <muddmaker> Yeah, LLVM is very sophisticated, but it also sucks to actually use |
18:28:32 | FromDiscord | <muddmaker> In reply to @michael.lenz. "And what they use?": Odin uses LLVM |
18:28:58 | FromDiscord | <zimzozaur> In reply to @muddmaker "Odin uses LLVM": Aren't they moving to their own compiler? |
18:29:14 | FromDiscord | <muddmaker> I don't follow its development close enough to know. Maybe? |
18:34:15 | FromDiscord | <zimzozaur> In reply to @muddmaker "There was already a": Is it not common to look at ASM that Nim produces? |
18:35:03 | FromDiscord | <zimzozaur> In reply to @battery.acid.bubblegum "Nim is a great": What does it lacks? |
18:35:14 | FromDiscord | <muddmaker> IIRC, that was an experiment of Araq's that he was trying to demonstrate for nimcon |
18:35:35 | FromDiscord | <muddmaker> It hasn't really been maintained since |
18:36:21 | * | mengu1 joined #nim |
18:36:23 | FromDiscord | <bostonboston> In reply to @zimzozaur "Is it not common": Not that I've heard of |
18:36:36 | FromDiscord | <muddmaker> But also, this is in _nimony_, not _nim_, which is a highly WIP compiler rewrite |
18:36:54 | FromDiscord | <muddmaker> I don't know if the current nim implementation even does direct ASM generation |
18:37:48 | FromDiscord | <nervecenter> In reply to @muddmaker "I don't know if": It does not |
18:38:00 | Amun-Ra | all these third party implementations will be lost like tears in rain |
18:38:12 | FromDiscord | <zimzozaur> In reply to @nervecenter "It does not": Sad |
18:38:18 | FromDiscord | <muddmaker> In reply to @Amun-Ra "all these third party": ? |
18:38:34 | FromDiscord | <bostonboston> In reply to @zimzozaur "Sad": Why |
18:38:55 | FromDiscord | <nervecenter> In reply to @zimzozaur "Sad": Like I said in #internals, that's extraordinarily difficult, and gcc and llvm have decades and millions of man-hours invested into doing that already |
18:39:26 | FromDiscord | <zimzozaur> In reply to @bostonboston "Why": I like to see ASM. Recently, I started learning ASM and C. In CLion you can easily go through ASM and learn a lot from it |
18:39:49 | FromDiscord | <bostonboston> In reply to @zimzozaur "I like to see": Then view the ASM output of the c compiler you're not stopped from doing that |
18:39:52 | FromDiscord | <zimzozaur> In reply to @nervecenter "Like I said in": I am not disagreeing with you. |
18:39:57 | FromDiscord | <muddmaker> I mean, there's nothing stopping you from looking at the ASM generated from Nim -> C -> ASM |
18:40:02 | FromDiscord | <zimzozaur> In reply to @bostonboston "Then view the ASM": True |
18:40:18 | FromDiscord | <bostonboston> Them has two maybe three core developers and as a result that's not enough people to write an entire compiler but because we are built on top of c compilers we have a very powerful very functional language |
18:40:27 | FromDiscord | <bostonboston> (edit) "Them" => "Nim" |
18:40:53 | FromDiscord | <zimzozaur> In reply to @muddmaker "I mean, there's nothing": man I could just write Nim. Look at C in CLion with ASM on the split panel, that's a suitable option. |
18:41:01 | FromDiscord | <zimzozaur> (edit) "man" => "Man," |
18:41:58 | FromDiscord | <nervecenter> In reply to @zimzozaur "Man, I could just": Nim is supported on Godbolt if you want to see the breakdown of specific procedures. `-d:release` generates more optimized code.↵https://godbolt.org/ |
18:42:00 | FromDiscord | <zimzozaur> In reply to @bostonboston "Nim has two maybe": I hope I will enjoy it too. Not { } is awesome :nim1: |
18:42:01 | FromDiscord | <muddmaker> In reply to @bostonboston "Nim has two maybe": And this is also ok because when looking at the nimony development process, there's a lot in flux as they try to figure out what it _should_ look like |
18:42:27 | FromDiscord | <zimzozaur> In reply to @nervecenter "Nim is supported on": Nice, thanks for info! |
18:42:52 | FromDiscord | <zimzozaur> Btw I get the point of translating to C but to JS? |
18:43:02 | FromDiscord | <muddmaker> Running nim in the browser is a lot easier |
18:43:23 | FromDiscord | <muddmaker> WASM isn't actually good outside of _very_ niche uses |
18:44:03 | FromDiscord | <zimzozaur> In reply to @muddmaker "Running nim in the": How do you access all of the DOM API etc with it? Do you mean I can use it instead of React? |
18:44:34 | FromDiscord | <muddmaker> There's DOM bindings. Nim has karax and a few other frontend frameworks to use instead of React |
18:44:42 | FromDiscord | <nervecenter> In reply to @zimzozaur "How do you access": https://nim-lang.org/docs/dom.html |
18:44:51 | FromDiscord | <zimzozaur> In reply to @muddmaker "WASM isn't actually good": I remember when year ago on my feed there was quite a lot of WASM and people saying not JS finally LOL |
18:45:36 | FromDiscord | <nervecenter> Has anyone tried using Nim with Emscripten? |
18:45:39 | FromDiscord | <muddmaker> WASM was an opportunity to do something awesome and it was very poorly done |
18:45:55 | FromDiscord | <zimzozaur> In reply to @nervecenter "https://nim-lang.org/docs/dom.html": Wait, can I learn Nim instead of JS? Too good to be true! |
18:46:25 | FromDiscord | <zimzozaur> In reply to @muddmaker "WASM was an opportunity": Can you elaborate? |
18:47:14 | FromDiscord | <bostonboston> In reply to @nervecenter "Has anyone tried using": I've heard mention of it around here, I think one or two people have apps using it |
18:48:00 | FromDiscord | <muddmaker> In reply to @zimzozaur "Can you elaborate?": The browser works as a specific VM, and instead of being a bytecode for shipping optimized code for that VM, Wasm is a _completely separate VM_ that does not provide anything that the browser's VM gives you |
18:48:36 | FromDiscord | <muddmaker> So actually binding to things in the DOM or JS world is slow and requires a lot of string copying |
18:49:04 | FromDiscord | <muddmaker> Wasm is good if you are doing some compute heavy things |
18:49:10 | FromDiscord | <zimzozaur> In reply to @muddmaker "The browser works as": Now I thought why the browser cannot read any byte code so you write any Lang to it like LLVM? |
18:49:16 | FromDiscord | <muddmaker> But it's horrible as a JS replacement |
18:50:22 | FromDiscord | <muddmaker> In reply to @zimzozaur "Now I thought why": ? |
18:50:59 | FromDiscord | <muddmaker> In reply to @muddmaker "But it's horrible as": If you look at the bundle sizes and performance of wasm frameworks, they are significantly bigger, use more memory, and are typically slower than equivalent JS frameworks |
18:51:09 | FromDiscord | <muddmaker> Slower by 4% at minimum |
18:51:13 | FromDiscord | <muddmaker> And that's with a lot of optimization |
18:51:40 | FromDiscord | <zimzozaur> In reply to @muddmaker "?": Why do browser not read bytecode instead of JS? |
18:51:42 | FromDiscord | <muddmaker> Leptos (Rust/wasm) is slower than Solid (JS) and they are architecturally very similar |
18:52:05 | FromDiscord | <muddmaker> In reply to @zimzozaur "Why do browser not": Ask the wasm team, not me lol |
18:52:10 | FromDiscord | <zimzozaur> In reply to @muddmaker "If you look at": Yeas sound bad |
18:52:16 | FromDiscord | <muddmaker> Wasm _should_ have been that bytecode format |
18:52:21 | FromDiscord | <muddmaker> But it _wasn't_ |
18:52:29 | FromDiscord | <nervecenter> In reply to @zimzozaur "Why do browser not": Historyical reasons |
18:52:31 | FromDiscord | <mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=GEtIvuHI |
18:52:35 | FromDiscord | <nervecenter> (edit) "Historyical" => "Historical" |
18:52:53 | FromDiscord | <zimzozaur> In reply to @muddmaker "Ask the wasm team,": I am asking because maybe you know some secret stuff and want to share it with use! |
18:52:54 | FromDiscord | <muddmaker> Now, the question is with WebGPU compute shaders on the way, how many of the tasks that Wasm was actually better at could be done _even_ better with those |
18:53:06 | FromDiscord | <zimzozaur> In reply to @muddmaker "Wasm _should_ have been": Even more sad |
18:53:48 | FromDiscord | <muddmaker> In reply to @zimzozaur "I am asking because": I don't really know any secrets. I just follow the development of web frameworks and browsers and observe what people complain about lol |
18:53:57 | FromDiscord | <muddmaker> I'm a web dev for my day job |
18:54:13 | FromDiscord | <zimzozaur> In reply to @muddmaker "Wasm _should_ have been": It sounds like a good 5 billion seed first phase startups. Browser with a good bytecode engine and clear docs on how to use it. |
18:54:33 | FromDiscord | <muddmaker> It's not about the browser, but about the standards |
18:54:37 | FromDiscord | <zimzozaur> In reply to @muddmaker "I don't really know": That's somehing |
18:55:49 | FromDiscord | <zimzozaur> In reply to @muddmaker "It's not about the": Yeah. So you can be the first Nim-based Browser company that is not a next trash Chromium homunculus but the real safe and private open for any language browser. |
18:55:57 | FromDiscord | <muddmaker> LOL |
18:56:27 | FromDiscord | <muddmaker> First of all, building a browser is an insanely expensive endeavor. The only new browser engine of interest is Ladybird |
18:56:43 | FromDiscord | <muddmaker> But also, developers aren't going to make anything browser-exclusive |
18:56:52 | FromDiscord | <zimzozaur> In reply to @muddmaker "First of all, building": This is why I said - `It sounds like a good 5 billion seed first phase startups. ` |
18:56:56 | FromDiscord | <zimzozaur> (edit) "startups. `" => "startups.`" |
18:57:11 | FromDiscord | <muddmaker> For it to be mainstream, a standards body MUST standardize it so that multiple browsers can implement it |
18:57:40 | FromDiscord | <muddmaker> And I don't think the standards bodies are going to standardize a _second_ attempt at WASM |
18:57:45 | FromDiscord | <muddmaker> Targetting JS is fine |
18:57:52 | FromDiscord | <muddmaker> (edit) "Targetting" => "Targeting" |
18:58:05 | FromDiscord | <zimzozaur> In reply to @muddmaker "Targeting JS is fine": You like JS more then me I think |
18:58:13 | FromDiscord | <zimzozaur> In reply to @muddmaker "And I don't think": XD |
18:58:15 | FromDiscord | <odexine> In reply to @muddmaker "But also, developers aren't": except if its of the majority browser |
18:58:29 | FromDiscord | <muddmaker> Which your new browser _isn't going to be_ |
18:58:40 | FromDiscord | <odexine> prolly never tbh |
18:59:17 | FromDiscord | <muddmaker> I'd like to see Ladybird try, but yeah, I'd rather contribute to that instead of trying to _make my own browser engine_ |
18:59:24 | * | beholders_eye quit (Ping timeout: 252 seconds) |
18:59:26 | FromDiscord | <muddmaker> Unless I were a billionaire and just wanted to throw money around |
19:00:04 | FromDiscord | <zimzozaur> In reply to @muddmaker "For it to be": How said it has to start with being standardized. Windows is used everywhere, and it wasn't standardized, I think. Just build so people want to use it and the rest will come naturally. |
19:00:30 | FromDiscord | <odexine> well it was a different time then |
19:00:36 | FromDiscord | <muddmaker> Well, for it to be standardized, you'd need to make a prototype and talk with the committees and the like |
19:00:41 | FromDiscord | <odexine> then there wasnt a very strong majority of operating systems |
19:00:51 | FromDiscord | <odexine> then you could still fuck around and maybe get a good amount of people onboard |
19:01:28 | FromDiscord | <muddmaker> Windows was the one that won because Microsoft both understood what businesses needed and was willing to use criminal means to crush competition |
19:02:44 | FromDiscord | <zimzozaur> You have DuckDuckGo that does not use chrome nor Firefox engine. Why not adopt DOM/HTML related API, write good docs make it open source? I think it is just a matter of money and will to do it |
19:02:52 | FromDiscord | <muddmaker> ? |
19:03:03 | FromDiscord | <muddmaker> DDG is a search engine that is a thin wrapper around Bing |
19:03:13 | FromDiscord | <zimzozaur> In reply to @muddmaker "DDG is a search": They have browser |
19:03:37 | FromDiscord | <muddmaker> https://en.wikipedia.org/wiki/DuckDuckGo_Private_Browser |
19:03:55 | FromDiscord | <muddmaker> It's Chrome or Safari depending on the platform |
19:04:42 | FromDiscord | <zimzozaur> https://en.wikipedia.org/wiki/DuckDuckGo_Private_Browser |
19:06:31 | FromDiscord | <zimzozaur> In reply to @muddmaker "It's Chrome or Safari": Even if. It does not matter. My statement is. Build a browser with a byte code API that is good and allow people to use it and make it open source, so others can build it something that is a real tech. |
19:06:44 | FromDiscord | <muddmaker> >Build a browser |
19:07:31 | FromDiscord | <muddmaker> The problem with this is that I don't think this is a good idea. Targeting JS is _fine_ |
19:08:01 | FromDiscord | <muddmaker> We don't need browsers to adopt a second bytecode system |
19:08:57 | FromDiscord | <muddmaker> The most you could save is a little bit of parsing time, but even then, it's typically not the case that the browsers are slow from _parsing_ JS |
19:09:45 | FromDiscord | <bostonboston> You would dramatically save on used bandwidth |
19:09:58 | FromDiscord | <Robyn [She/Her]> In reply to @Amun-Ra "rolling your own language": why's that? Is it not good for a portfolio? |
19:09:59 | FromDiscord | <muddmaker> Dramatically? |
19:10:17 | FromDiscord | <zimzozaur> Who likes writing JS here. Maybe I am alone in this conversion |
19:11:18 | FromDiscord | <Robyn [She/Her]> In reply to @zimzozaur "What does it lacks?": Sane sum types is the main one I want (Beef's fungus lib doesn't count because it doesn't integrate with the type system well, and my attempt explodes with generics and still lacks match statements like Rust), and I'd also like to be able to hack away at a small codebase |
19:11:31 | FromDiscord | <muddmaker> In reply to @bostonboston "You would dramatically save": JS bandwidth has a lot more to do with shipping too much code than how the code is encoded |
19:12:14 | FromDiscord | <muddmaker> (As long as you are using a code minifier, of course) |
19:13:56 | FromDiscord | <zimzozaur> In reply to @battery.acid.bubblegum "Sane sum types is": Maybe it is a naive question, but if you are talking about creating a new lang. Why not create PR that solves part of what it lacks? |
19:14:26 | FromDiscord | <zimzozaur> In reply to @muddmaker "JS bandwidth has a": Do you mean all dependencies? |
19:15:02 | FromDiscord | <muddmaker> In reply to @zimzozaur "Who likes writing JS": TypeScript is good enough for most client-side work. Writing in Nim instead would be good because I do not want to use it for server-side stuff, but there are massive advantages to using the same language for both client and server |
19:15:13 | FromDiscord | <muddmaker> (For specific types of websites) |
19:15:54 | FromDiscord | <muddmaker> (edit) "it" => "JS/TS" |
19:15:59 | FromDiscord | <Robyn [She/Her]> In reply to @zimzozaur "Maybe it is a": Because then I have complete freedom over a small codebase rather than trying to familiarise myself with a large codebase, especially since I'm a Uni student, i can't dedicate much time |
19:16:51 | FromDiscord | <muddmaker> In reply to @battery.acid.bubblegum "Because then I have": I can almost completely guarantee that familiarizing yourself with Nim's codebase and making a PR to it would be less time intensive than writing a codebase from scratch |
19:16:56 | FromDiscord | <muddmaker> (edit) "codebase" => "new language" |
19:17:10 | FromDiscord | <muddmaker> In reply to @zimzozaur "Do you mean all": This is def part of it |
19:18:30 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "I can almost completely": ...how? |
19:19:19 | FromDiscord | <muddmaker> Do you know how much work it is to make a new language from scratch, including all of the libraries and dev tools to make it possible to be productive in it? |
19:20:26 | FromDiscord | <zimzozaur> In reply to @muddmaker "TypeScript is good enough": So you can write full stack nim? |
19:20:50 | FromDiscord | <muddmaker> Yes. See the forum for an example: <https://github.com/nim-lang/nimforum> |
19:21:20 | FromDiscord | <nnsee> In reply to @muddmaker "Do you know how": to play devil's advocate, i don't think making a new language is hard at all. but making your language useful is something else entirely |
19:21:57 | FromDiscord | <muddmaker> That was part of what I was getting at. A new "language" can be easy. A new _useful_ language is very very hard |
19:22:27 | FromDiscord | <zimzozaur> In reply to @nnsee "to play devil's advocate,": Do you mean writing a parser in Python is easy and writing something that is no useless is hard? |
19:23:14 | FromDiscord | <muddmaker> In reply to @zimzozaur "So you can write": One thing I will say about nim's web frameworks is that they are still fairly rudimentary compared to a lot of the stuff you see elsewhere, but it _can_ be done |
19:23:47 | FromDiscord | <zimzozaur> In reply to @muddmaker "Yes. See the forum": Sound so sexy |
19:24:16 | FromDiscord | <nnsee> In reply to @zimzozaur "Do you mean writing": not even python, there are specialized tools specifically for writing languages, ie lex/yacc etc |
19:24:38 | FromDiscord | <muddmaker> Writing a parser in Python would be easier than using lex/yacc to be fair |
19:24:47 | FromDiscord | <nnsee> fair point |
19:24:58 | FromDiscord | <muddmaker> Especially using some Python parser library |
19:26:23 | FromDiscord | <Robyn [She/Her]> In reply to @muddmaker "Do you know how": Yeah making it useful is a different matter, since I'm gonna be targeting the JVM primarily, everything I'd want is already made, it's easy to create bindings via reflection |
19:27:00 | FromDiscord | <muddmaker> That's fair |
19:27:45 | FromDiscord | <nnsee> being able to leverage an existing ecosystem is almost always a smart move, but then you're still at the whims of whoever is writing the standard, as your language has to implement that correctly |
19:27:59 | FromDiscord | <nnsee> which is not as easy as it may at first seem |
19:28:39 | FromDiscord | <nnsee> if you're going the jvm route, iirc graal has an extensive test suite for verifying jvm bytecode behaves as it should |
19:28:53 | FromDiscord | <nnsee> not sure how easy it would be to shoehorn that into your project though |
19:29:57 | * | mengu1 quit (Quit: Client closed) |
19:31:14 | FromDiscord | <nnsee> or, well, you're emitting jvm not writing an implementation |
19:31:18 | FromDiscord | <nnsee> never mind me i'm tired |
19:31:44 | FromDiscord | <zimzozaur> In reply to @battery.acid.bubblegum "Yeah making it useful": Btw why do you want to use JVM? |
19:38:01 | * | ntat_ joined #nim |
19:38:20 | FromDiscord | <Robyn [She/Her]> In reply to @zimzozaur "Btw why do you": Minecraft modding :) |
19:38:22 | * | ntat quit (Ping timeout: 272 seconds) |
19:38:38 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "or, well, you're emitting": Yeah I'm emitting, not implementing :P |
19:44:56 | FromDiscord | <muddmaker> In reply to @battery.acid.bubblegum "Minecraft modding :)": I'm surprised it wasn't Android development or similar |
19:49:10 | * | ntat_ is now known as ntat |
19:52:03 | FromDiscord | <fabric.input_output> In reply to @zimzozaur "Do you mean writing": the parser is simply a chore and maybe the least significant part of a compiler/interpeter |
19:56:06 | FromDiscord | <Elegantbeef> Hey the parse looks hard until you get to type analysis and code generation |
20:31:53 | FromDiscord | <zimzozaur> In reply to @battery.acid.bubblegum "Minecraft modding :)": In nim? |
20:43:55 | FromDiscord | <Robyn [She/Her]> In reply to @zimzozaur "In nim?": I wish, it might be a possibility with Nimony, or maybe with Chicory and a WASM language adapter for Fabric or something |
20:51:53 | FromDiscord | <zimzozaur> In reply to @battery.acid.bubblegum "I wish, it might": And then the main use case of Nim will be Minecraft and Roblox modding |
21:14:23 | FromDiscord | <kapendev> A language optimized for Minecraft and Roblox. Should be on the main site. |
21:39:26 | * | ntat quit (Quit: Leaving) |
22:01:02 | * | rockcavera joined #nim |
22:22:23 | * | beholders_eye joined #nim |