00:05:28 | FromDiscord | <retkid> @treeform you are like my productivity idol |
00:05:34 | FromDiscord | <retkid> give me productivity tips |
00:05:58 | FromDiscord | <Elegantbeef> Cocaine, lots and lots of cocaine |
00:06:12 | FromDiscord | <retkid> will cocaine cure my chronic depression |
00:06:26 | FromDiscord | <Elegantbeef> No only mental health care will |
00:06:36 | FromDiscord | <retkid> 😭 |
00:07:30 | FromDiscord | <!Patitotective> are the supported `--cpu` options listed somewhere? are they these https://github.com/nim-lang/Nim/wiki/Consts-defined-by-the-compiler#cpu-architectures ? |
00:07:44 | FromDiscord | <!Patitotective> or just `i386` and `x86_64` |
00:07:53 | FromDiscord | <Elegantbeef> It's those |
00:08:13 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "It's those": :] |
00:08:21 | FromDiscord | <retkid> what if i wanna compile for 16 bit x86 |
00:08:32 | FromDiscord | <Zectbumo> In reply to @Elegantbeef "You cannot change the": Lol, I have high confidence that there is no useful "functioning" code using readLines iterator that would constitute keeping readLines how it is |
00:08:56 | FromDiscord | <Elegantbeef> Well i'd personally say `readLines` is not very useful |
00:09:06 | FromDiscord | <retkid> what if i wanna compile for a 8086 |
00:09:40 | FromDiscord | <!Patitotective> In reply to @retkid "what if i wanna": cocaine |
00:09:49 | FromDiscord | <Zectbumo> In reply to @Elegantbeef "Well i'd personally say": It looks like someone stubbed out the code to support whatever "functioning" code and walked away |
00:09:51 | FromDiscord | <retkid> how is cocaine gonna let me do that |
00:10:07 | FromDiscord | <Elegantbeef> Dont look at me↵(@Zectbumo) |
00:10:34 | FromDiscord | <!Patitotective> In reply to @retkid "how is cocaine gonna": its gonna stop you from doing it |
00:11:21 | FromDiscord | <Zectbumo> 😁 |
00:11:27 | FromDiscord | <retkid> is cocaine the answer for all problems non-mental health related |
00:11:33 | FromDiscord | <retkid> "how do i make n-dimensional array" |
00:11:35 | FromDiscord | <retkid> "cocaine" |
00:12:47 | FromDiscord | <treeform> In reply to @retkid "will cocaine cure my": Start out by eating and sleeping well. I love cooking my own food. It's important to sleep on fixed times. Meditation also helps. |
00:13:03 | FromDiscord | <retkid> sleep schedule is ruined |
00:13:04 | FromDiscord | <retkid> need to fix |
00:13:11 | FromDiscord | <retkid> i take so much time to cook my meals but its worth it |
00:13:47 | FromDiscord | <!Patitotective> do not eat, you waste time |
00:14:20 | FromDiscord | <treeform> In reply to @Elegantbeef "Also do you know": I don't know about this, will explode. |
00:14:34 | FromDiscord | <Elegantbeef> Jeez you're going to explode, sorry |
00:15:41 | FromDiscord | <treeform> In reply to @Elegantbeef "I did find it": I think this works great in 3d, but for 2d ui, might not look as good. |
00:16:50 | FromDiscord | <Elegantbeef> Yea I guess I come at it primarly from 3D post processing 😄 |
00:40:53 | * | noeontheend joined #nim |
00:41:53 | * | noeontheend quit (Remote host closed the connection) |
00:45:36 | FromDiscord | <Psych0p4th.nim> anyone hear can explain me about parseopt lib ?, i read the documentation but i don't understood how this works, this is not like the flags from go or the argparse from python.... |
00:46:15 | FromDiscord | <Alea> Oh, new app dev channel? |
00:46:18 | FromDiscord | <Elegantbeef> It allows you to iterate over the commandline arguments and operate on them |
00:46:46 | FromDiscord | <Psych0p4th.nim> yeah, i'm building one tool for web dir enum, but i need one argparse |
00:47:00 | FromDiscord | <Psych0p4th.nim> and i don't understood how parseopt lib works |
00:48:02 | FromDiscord | <Elegantbeef> https://github.com/c-blake/cligen you could checkout cligen |
00:50:56 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/L2S |
00:51:55 | FromDiscord | <Psych0p4th.nim> hummmm |
00:52:12 | FromDiscord | <Psych0p4th.nim> i take a look that, thanks |
00:53:14 | * | ltriant quit (Read error: Connection reset by peer) |
00:53:29 | * | ltriant joined #nim |
01:08:28 | FromDiscord | <!Patitotective> In reply to @Alea "Oh, new app dev": yea :] |
01:16:09 | FromDiscord | <Psych0p4th.nim> ok using this mode i have very much work, because i need give very much attention on CLI interface, so sorry the question but don't have some lib like argparse from python or flags from go ? |
01:17:02 | FromDiscord | <Elegantbeef> https://nimble.directory/search?query=argparse |
01:22:51 | * | arkurious quit (Quit: Leaving) |
01:23:09 | FromDiscord | <Psych0p4th.nim> thanks man |
01:23:49 | FromDiscord | <!Patitotective> beef is not a man, hes a beef |
01:25:36 | FromDiscord | <Psych0p4th.nim> sorry, thanks beef |
01:29:35 | * | noeontheend joined #nim |
01:30:55 | FromDiscord | <huantian> huh |
01:30:55 | FromDiscord | <Elegantbeef> New name server? |
01:30:55 | FromDiscord | <huantian> yeah just trying it out to see what it's like lol |
01:33:27 | FromDiscord | <huantian> I cannot remember how to make my name be different color |
01:42:04 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3YRk |
01:42:15 | FromDiscord | <Elegantbeef> You also need to use a 32bit c compiler |
01:44:23 | FromDiscord | <!Patitotective> how? do i download a new gcc version? |
01:44:33 | FromDiscord | <!Patitotective> (edit) "new gcc" => "another gcc/clang" |
01:44:34 | FromDiscord | <Elegantbeef> No you download a 32bit c compiler |
01:44:44 | FromDiscord | <Elegantbeef> The default gcc is not 32bit |
01:49:26 | FromDiscord | <Yardanico> In reply to @Patitotective "beef, im trying to": what's your distro? |
01:49:41 | FromDiscord | <!Patitotective> ubuntu 22.04 :] |
01:50:09 | FromDiscord | <Yardanico> passing -m32 should just work provided ubuntu 22.04 has multilib repos and you enabled them |
01:50:12 | FromDiscord | <Yardanico> it works on arch for example |
01:50:36 | FromDiscord | <Yardanico> `nim c --cpu:i386 --passC:"-m32" --passL:"-m32" -r program.nim` |
01:50:45 | FromDiscord | <Elegantbeef> It does have multilib repos they're lacking them probably |
01:51:28 | FromDiscord | <!Patitotective> thanks yard↵it worked :] |
01:57:17 | FromDiscord | <!Patitotective> for windows will i need to download mingw32? |
01:57:55 | FromDiscord | <!Patitotective> (edit) "mingw32?" => "mingw32 or something?" |
01:58:22 | FromDiscord | <Yardanico> In reply to @Patitotective "for windows will i": to cross-compile, yes |
01:58:32 | FromDiscord | <!Patitotective> crosscompile cpu, only |
01:58:47 | FromDiscord | <!Patitotective> (edit) "only" => "only↵not from linux" |
01:58:48 | FromDiscord | <Yardanico> your C compiler on windows might already have 32-bit support |
01:58:53 | FromDiscord | <Yardanico> mingw-w64 usually has it |
01:59:16 | FromDiscord | <!Patitotective> soo, just `--cpu:i386`? |
01:59:40 | FromDiscord | <Yardanico> In reply to @Yardanico "`nim c --cpu:i386 --passC:"-m32"": same command as this |
01:59:49 | FromDiscord | <Yardanico> because otherwise the C compiler won't know that you want to compile for 32-bit |
01:59:58 | FromDiscord | <Yardanico> --cpu:i386 only tells that to Nim, not to the C compiler |
02:00:05 | FromDiscord | <!Patitotective> oh ok, thanks :]] |
02:02:34 | FromDiscord | <!Patitotective> btw dont you guys think https://nim-lang.org/docs/nimscript.html#exec%2Cstring should accept `varargs[typed, $]` and join them with spaces? its much more convenient↵just like nake https://fowlmouth.github.io/nake/gh_docs/master/nakelib.html#shell |
02:03:48 | FromDiscord | <Yardanico> you can just use strformat nowadays, so I don't think it's a big deal |
02:04:06 | FromDiscord | <Yardanico> strformat didn't exist back when nake was used, there was only third-party strfmt |
02:04:40 | FromDiscord | <Yardanico> "Made with Nim. Generated: 2015-05-02 20:55:36 UTC" heh :) |
02:05:35 | FromDiscord | <!Patitotective> In reply to @Yardanico ""Made with Nim. Generated:": lol |
02:13:57 | FromDiscord | <!Patitotective> it would be cool to create a github action that generates docs for your nim library for each version and made an `index.html` just like https://fowlmouth.github.io/nake↵but it seems the one nake used does not exist anymore https://github.com/gradha/gh_nimrod_doc_pages |
02:14:09 | FromDiscord | <!Patitotective> (edit) "it would be cool to create a github action that generates docs for your nim library for each version and made an `index.html` just like https://fowlmouth.github.io/nake↵but it seems ... the" added "like" |
02:27:41 | FromDiscord | <retkid> as someone who used a 32 bit operating system |
02:27:49 | FromDiscord | <retkid> i think we shouldn't support 32bit anymore |
02:28:32 | FromDiscord | <retkid> 32 bit should be limited to lazy asm demonstrations |
02:30:20 | * | vicecea quit (Remote host closed the connection) |
02:30:52 | * | vicecea joined #nim |
02:35:13 | FromDiscord | <!Patitotective> oh @Yardanico i forgot that im actually compiling to cpp hehe↵how would it be then? |
02:35:17 | FromDiscord | <!Patitotective> In reply to @retkid "i think we shouldn't": :[ |
02:35:21 | FromDiscord | <Yardanico> In reply to @Patitotective "oh <@177365113899057152> i forgot": what be? |
02:35:25 | FromDiscord | <Yardanico> there's no difference |
02:36:04 | FromDiscord | <retkid> In reply to @Patitotective ":[": 32 bits you can only read 2 gb files |
02:36:07 | FromDiscord | <retkid> At that point |
02:36:20 | FromDiscord | <retkid> What practical purpose |
02:37:24 | FromDiscord | <!Patitotective> In reply to @Yardanico "there's no difference": 🤨 with `nim cpp --passC:"-m32" --passL:"-m32" src/niprefs` i get the initial error |
02:37:39 | FromDiscord | <Yardanico> 🤦♂️ `--cpu:i386` where? |
02:38:14 | FromDiscord | <Yardanico> with your command you're telling Nim to compile with default (so 64-bit most of the time) but tell the C compiler to compile to 32-bit |
02:39:31 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3YRr |
02:39:38 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3YRr" => "https://paste.rs/hHm" |
02:39:45 | FromDiscord | <Yardanico> might be a VM bug or a bug in your code |
02:39:50 | FromDiscord | <Yardanico> why are you running a `cast` at compile-time ? |
02:40:05 | FromDiscord | <Yardanico> if you want to convert an int to a float (like 5.3 to 5), you do `int(myfloat)` |
02:40:10 | FromDiscord | <Yardanico> not `cast[int](myfloat)` |
02:40:37 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/980299594095276042/unknown.png |
02:40:44 | FromDiscord | <Yardanico> why |
02:40:50 | FromDiscord | <!Patitotective> 🤨 noob patito |
02:40:57 | FromDiscord | <!Patitotective> that code is old |
02:40:59 | FromDiscord | <!Patitotective> hehe |
02:41:04 | FromDiscord | <Yardanico> just do `float(lex.parseHexInt())` and similar |
02:41:37 | FromDiscord | <Yardanico> ah, this code is for floats, yeah I get what you want to do |
02:42:32 | FromDiscord | <Yardanico> as a workaround for the VM try to do `cast[float](int64 lex.parseBinInt)` |
02:42:50 | FromDiscord | <!Patitotective> In reply to @Yardanico "just do `float(lex.parseHexInt())` and": actually this does owrk |
02:42:56 | FromDiscord | <Yardanico> no, that won't work correctly |
02:42:56 | FromDiscord | <!Patitotective> (edit) "owrk" => "work" |
02:43:14 | FromDiscord | <!Patitotective> 🤨 |
02:43:15 | FromDiscord | <Yardanico> you want to actually parse the binary/octal/hexadecimal representation of a float into a float |
02:43:24 | FromDiscord | <Yardanico> i just thought you did something different so offered the conversion thing |
02:43:41 | FromDiscord | <Yardanico> In reply to @Yardanico "you want to actually": with this you have to cast, yes, because Nim doesn't have parseHexFloat and alternatives |
02:43:47 | FromDiscord | <Yardanico> the cause of the error seems to come from the fact that if you're compiling in 32-bit Nim's `int` is 32-bit but Nim's `float` is 64-bit so it can't cast at compile time |
02:43:54 | FromDiscord | <Yardanico> In reply to @Yardanico "as a workaround for": this should probably work |
02:43:59 | FromDiscord | <Yardanico> and will actually be correct |
02:44:15 | FromDiscord | <Yardanico> more correct even if it were to be executed at runtime |
02:44:33 | FromDiscord | <Yardanico> but there's an inherent problem with these procs |
02:44:40 | FromDiscord | <Yardanico> on 32-bit they're limited to 32-bit values |
02:44:56 | FromDiscord | <Yardanico> so if you make a config file with niprefs that has a big int, it won't get parsed by 32-bit niprefs |
02:45:06 | FromDiscord | <!Patitotective> im pretty sure once you said you were gonna go through niprefs code to fix it hehe |
02:45:37 | FromDiscord | <!Patitotective> In reply to @Yardanico "so if you make": 🤔 |
02:45:41 | FromDiscord | <Yardanico> yes |
02:46:02 | FromDiscord | <Yardanico> since you use `int` in niprefs it's limited to parsing configs that have 32-bit ints only, anything more won't work |
02:46:19 | FromDiscord | <Yardanico> so maybe you should either clarify that in the spec/manual/whatever or make it always use 64-bit ints |
02:46:33 | FromDiscord | <Yardanico> In reply to @Yardanico "since you use `int`": when compiled for 32-bit that is |
02:47:07 | FromDiscord | <Yardanico> And for parsing 64-bit ints from binary/hex/octal there are corresponding generic procs in parseutils |
02:47:22 | FromDiscord | <!Patitotective> In reply to @Yardanico "so maybe you should": same for floats? |
02:47:30 | FromDiscord | <Yardanico> no, for floats you still have to cast to have correct behaviour |
02:47:59 | FromDiscord | <!Patitotective> i mean, should i use `float64`? |
02:48:07 | FromDiscord | <Yardanico> float == float64 in Nim |
02:48:20 | FromDiscord | <Yardanico> so `float` is always 64-bit in NIm |
02:48:34 | FromDiscord | <huantian> In reply to @Patitotective "i mean, should i": You should make 32 bit users suffer mwahhahaha |
02:48:44 | FromDiscord | <Yardanico> well, it's actually defined to be the biggest float value type, so when CPUs support 128 floats natively `float` might start to equate to `float128` |
02:49:01 | FromDiscord | <!Patitotective> In reply to @huantian "You should make 32": bad huan |
02:52:05 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3YRs |
02:53:40 | FromDiscord | <!Patitotective> oh ok, thanks yard :] |
02:53:57 | FromDiscord | <Yardanico> ah yeah, forgot to add one more check |
02:54:07 | FromDiscord | <!Patitotective> hard work https://media.discordapp.net/attachments/371759389889003532/980302990936252436/niprefs.mp4 |
02:54:18 | FromDiscord | <!Patitotective> (edit) "hard work ... https://media.discordapp.net/attachments/371759389889003532/980302990936252436/niprefs.mp4" added "(joke)" |
02:54:40 | FromDiscord | <Yardanico> check compilation with 32-bit cpu, with 64-bit it'll complete successfully since on 64-bit `int` == `int64` |
02:54:51 | FromDiscord | <Yardanico> In reply to @Yardanico "ah yeah, forgot to": `parseBin` is really meant for more general parsing, so it won't error if the string has something after the number stuff |
02:55:37 | FromDiscord | <Yardanico> so a more proper check would be `if parseBin[uint64](binFloatStr, tempIntVal, 0) == binFloatStr.len:` |
02:55:46 | FromDiscord | <Yardanico> to check that there are no leftover characters left in the number string |
03:01:28 | FromDiscord | <!Patitotective> In reply to @Yardanico "so a more proper": and if use `maxLen`? |
03:01:33 | FromDiscord | <Yardanico> ? |
03:01:49 | FromDiscord | <Yardanico> parseBin returns the number of characters it parsed for the resulting number that is stored in `tempIntVal` |
03:02:07 | FromDiscord | <Yardanico> if the number is too big parseBin will just return 0 |
03:02:20 | FromDiscord | <!Patitotective> ooooh ok |
03:02:48 | FromDiscord | <Yardanico> ah actually, it won't, hm |
03:03:07 | FromDiscord | <Yardanico> so you really have to use both maxLen and the return value |
03:03:49 | FromDiscord | <!Patitotective> In reply to @Yardanico "so a more proper": uint? |
03:04:00 | FromDiscord | <Yardanico> doesn't really matter, you can use both int64/uint64 here |
03:04:01 | FromDiscord | <Yardanico> you cast them anyway |
03:04:58 | FromDiscord | <!Patitotective> In reply to @Yardanico "so a more proper": would it better for this _check_, to be an assert, raise an exception...? 🤔 |
03:05:10 | FromDiscord | <Yardanico> i don't know, it depends on how your niprefs generally works |
03:05:19 | FromDiscord | <Yardanico> it certainly should be mandatory |
03:07:19 | FromDiscord | <!Patitotective> parseBin doesnt parse negative numbers, does it? |
03:07:27 | FromDiscord | <Yardanico> that's not how it works |
03:07:36 | FromDiscord | <Yardanico> "negative" is a part of the number's binary representation |
03:08:33 | FromDiscord | <!Patitotective> !eval echo -0b011 |
03:08:36 | NimBot | -3 |
03:08:42 | FromDiscord | <Yardanico> yes, but this is Nim and it treats `-` as an unary operator |
03:08:44 | FromDiscord | <Yardanico> not as a part of the number |
03:09:15 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3YRu |
03:09:46 | FromDiscord | <!Patitotective> hmm, niprefs is kind of like nim, isnt it? |
03:09:51 | FromDiscord | <Yardanico> it's a config format, no? |
03:09:59 | FromDiscord | <Yardanico> I don't think it really makes sense to allow `-` for binary/hex/octal in a config format |
03:10:06 | FromDiscord | <!Patitotective> but a nim-like one |
03:10:28 | FromDiscord | <Yardanico> If people want a negative value, they just put it into the value itself, not make a positive value and then append - in front of it |
03:10:39 | FromDiscord | <Elegantbeef> Yea i mean it doesnt make anysense |
03:10:43 | FromDiscord | <Yardanico> In reply to @Patitotective "but a nim-like one": but no one in Nim uses `-` for that, because if you're using a binary literal you want to show it as-is |
03:10:49 | FromDiscord | <Elegantbeef> is a `-someNegativebin` positive or negative? |
03:10:53 | FromDiscord | <Yardanico> otherwise you would've just used decimal |
03:12:33 | FromDiscord | <!Patitotective> niprefs is more of a preferences format soo most of the times youll most of times dont write it manually (and when you do decimal is easier) |
03:12:47 | FromDiscord | <!Patitotective> soo its more like i should remove binary/hex/oct support Lol |
03:13:06 | FromDiscord | <Yardanico> they can be useful in configs, but just don't add `-` to them |
03:13:09 | FromDiscord | <!Patitotective> (edit) "most of times" => "" |
03:13:12 | FromDiscord | <Yardanico> it's a config language, not a programming language |
03:14:38 | FromDiscord | <!Patitotective> does parseFloat allow negative numbers? |
03:14:46 | FromDiscord | <!Patitotective> it should, right? |
03:14:46 | FromDiscord | <Yardanico> yes, of course |
03:23:48 | FromDiscord | <!Patitotective> it looks like tomorrows patito is gonna fix that |
03:23:50 | FromDiscord | <!Patitotective> 🌃 |
03:24:03 | FromDiscord | <!Patitotective> goodnight everybody |
03:43:55 | FromDiscord | <aph> good night |
03:44:34 | FromDiscord | <aph> anyways, i'm new to pointers, not sure what they do, anyways im trying to do something like `"some random string"[index]` (`index` changes), maybe this can make use pointers? but i don't know how because i dont know what are pointers or how to use it |
03:45:12 | FromDiscord | <Yardanico> if you want it for learning, then fine |
03:45:29 | FromDiscord | <Yardanico> you can easily get a pointer to a string by taking a pointer to its first element, since sequences/strings hold data continuously |
03:45:46 | FromDiscord | <Yardanico> that is, the second element is placed right after the first one in the memory, so you can just increment the pointer by 1 to access the next element |
03:46:10 | FromDiscord | <aph> ooh |
04:06:27 | * | noeontheend quit (Ping timeout: 240 seconds) |
05:02:18 | FromDiscord | <elvis.x.zhou> this simple typo crash the compiler: cast(char)(42) |
05:03:54 | FromDiscord | <elvis.x.zhou> is it a known issue or is supposed to be filed as a new one? |
05:14:18 | FromDiscord | <huantian> What do you mean by crashing the compiler? |
05:14:35 | FromDiscord | <Elegantbeef> It causes a deg fault |
05:14:37 | FromDiscord | <Elegantbeef> seg fault\ |
05:14:42 | FromDiscord | <huantian> Ah that’s fun |
05:14:53 | FromDiscord | <Rika> So it doesn’t crash the compiler |
05:14:53 | FromDiscord | <huantian> Actually idk why I thought it meant anything else |
05:15:18 | FromDiscord | <Rika> In reply to @huantian "Actually idk why I": Because it can mean something else |
05:32:47 | * | ltriant quit (Ping timeout: 240 seconds) |
06:17:26 | * | ltriant joined #nim |
06:22:39 | * | ltriant quit (Ping timeout: 258 seconds) |
07:18:40 | * | jjido joined #nim |
07:20:03 | FromDiscord | <ynfle> Is it possible to import other nimscript files when using nimscript? |
07:20:47 | FromDiscord | <Elegantbeef> May need to be `.nim` files but it can have submodules |
07:25:09 | FromDiscord | <ynfle> Can .nim be called as nimscript? |
07:25:16 | FromDiscord | <Elegantbeef> I think so now |
07:30:20 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
07:31:29 | FromDiscord | <ynfle> No way |
07:31:37 | FromDiscord | <Elegantbeef> Perhaps |
07:31:45 | FromDiscord | <ynfle> What kind of error is Error: 'tuple' expected |
07:31:48 | FromDiscord | <ynfle> (edit) "Error:" => "`Error:" | "expected" => "expected`" |
07:31:59 | FromDiscord | <Elegantbeef> Attempting to unpacking a tuple? |
07:32:26 | FromDiscord | <ynfle> Ya |
07:32:59 | FromDiscord | <ynfle> Nvm |
07:33:03 | FromDiscord | <ynfle> Mistype on my part |
07:53:03 | NimEventer | New post on r/nim by mavavilj: Where can I read about the technical choices made in Nim as opposed to what its influences are?, see https://reddit.com/r/nim/comments/v06d14/where_can_i_read_about_the_technical_choices_made/ |
08:34:35 | * | jjido joined #nim |
08:40:50 | * | wallabra quit (Ping timeout: 255 seconds) |
08:41:24 | * | wallabra joined #nim |
08:43:42 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:08:33 | * | pro joined #nim |
10:09:27 | * | pro quit (Client Quit) |
10:09:32 | * | tk quit (Quit: Well, this is unexpected.) |
10:12:17 | * | tk joined #nim |
10:34:22 | * | tk quit (Quit: Well, this is unexpected.) |
10:35:40 | * | tk joined #nim |
11:12:51 | * | noeontheend joined #nim |
11:14:56 | * | tk quit (Quit: Well, this is unexpected.) |
11:16:08 | FromDiscord | <Forest> Is there a way to print the compiler version? |
11:16:52 | * | tk joined #nim |
11:24:45 | FromDiscord | <Rika> In code? |
11:25:16 | FromDiscord | <Rika> https://nim-lang.org/docs/system.html#NimVersion |
11:26:31 | * | noeontheend quit (Remote host closed the connection) |
11:37:33 | FromDiscord | <Turgut> Hey, I'm new to exploring Nim and I'm trying to use parseExpr as follows: |
11:37:41 | FromDiscord | <Turgut> sent a code paste, see https://paste.rs/DOx |
11:37:55 | FromDiscord | <Turgut> I just want to parse an expression using parseExpr and then print it |
11:38:00 | FromDiscord | <Turgut> what am I doing wrong here? |
11:39:40 | * | krux02 joined #nim |
12:07:30 | FromDiscord | <aph> maybe it needs to run inside a macro |
12:07:37 | FromDiscord | <aph> im not sure with these stuff though |
12:07:59 | FromDiscord | <Forest> In reply to @Rika "In code?": Yeah |
12:08:04 | FromDiscord | <Forest> In reply to @Rika "https://nim-lang.org/docs/system.html#NimVersion": Thanks! |
12:12:50 | * | jjido joined #nim |
12:17:32 | FromDiscord | <ynfle> @Turgut What are you trying to do? Read code from a string? Usually it's done in a macro |
12:18:30 | FromDiscord | <Turgut> I'm just exploring Nim, i want to use parseExpr to show an AST. But I think it can only be used in a macro :/ |
12:18:56 | FromDiscord | <Rika> No |
12:18:57 | FromDiscord | <ynfle> If you want to explore the ast, use `macros.dumpTree` |
12:19:03 | FromDiscord | <Rika> Just echo with treeRepr |
12:19:08 | FromDiscord | <Rika> Or repr |
12:26:36 | * | ltriant joined #nim |
12:29:25 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
12:40:54 | FromDiscord | <aph> how to slice per character instead of per byte, im getting some weird characters when slicing chinese characters |
12:41:03 | FromDiscord | <aph> thx |
12:41:35 | NimEventer | New thread by Mardiyah: How is default argument before code line one?, see https://forum.nim-lang.org/t/9182 |
12:45:23 | NimEventer | New question by Shoaib Mirzaei: realign controls inside a layout in NiGui, see https://stackoverflow.com/questions/72423748/realign-controls-inside-a-layout-in-nigui |
12:46:38 | FromDiscord | <ynfle> In reply to @aph "how to slice per": You needs to use the unicode module. Maybe something like https://nim-lang.org/docs/unicode.html#runeSubStr%2Cstring%2Cint%2Cint? |
12:46:42 | FromDiscord | <ynfle> (edit) "https://nim-lang.org/docs/unicode.html#runeSubStr%2Cstring%2Cint%2Cint?" => "https://nim-lang.org/docs/unicode.html#runeSubStr%2Cstring%2Cint%2Cint ?" |
12:46:54 | FromDiscord | <aph> thanks |
12:47:01 | FromDiscord | <aph> ill look into it :) |
12:47:29 | FromDiscord | <ynfle> Nim strings aren't utf8, they are just 8 bit characters |
12:47:59 | FromDiscord | <aph> ah |
12:54:44 | FromDiscord | <⃟⃟> that works on code points not characters |
12:55:54 | FromDiscord | <aph> hmm |
12:57:02 | FromDiscord | <⃟⃟> that should be fine for 99% of cases tho |
13:00:55 | FromDiscord | <aph> hopefully, if i found a bug ima use another method then |
13:01:04 | FromDiscord | <aph> thanks to all |
13:04:04 | FromDiscord | <Rika> Some characters are comprised of more than one code point |
13:23:01 | FromDiscord | <Turgut> sent a code paste, see https://play.nim-lang.org/#ix=3YSV |
13:23:26 | FromDiscord | <Turgut> I want to write this as a macro, how could I do that? |
13:28:49 | FromDiscord | <ynfle> Which part do you want to write as a macro, and why do you need a macro (or just for funsies? |
13:34:04 | FromDiscord | <Turgut> @ynfle so i don't want template, but macro |
13:34:11 | FromDiscord | <Turgut> just for funsies |
13:34:39 | FromDiscord | <ynfle> Unpack varargs is a macro, I believe |
13:34:52 | FromDiscord | <Turgut> yes, it is |
13:40:05 | FromDiscord | <ynfle> So look at how it's implemented |
13:40:10 | FromDiscord | <ynfle> https://github.com/nim-lang/Nim/blob/version-1-6/lib/core/macros.nim#L1627 |
13:43:37 | FromDiscord | <Turgut> @ynfle thanks very much 🙂 |
13:45:06 | * | arkurious joined #nim |
13:52:15 | * | resumin joined #nim |
13:58:27 | * | Guest36 joined #nim |
13:58:43 | * | Guest36 quit (Client Quit) |
14:25:59 | FromDiscord | <!Patitotective> In reply to @Yardanico "check compilation with 32-bit": how would i do that? duplicate the tests module 😕 |
14:26:07 | FromDiscord | <!Patitotective> (edit) "😕" => "🤨" |
14:26:15 | FromDiscord | <!Patitotective> (edit) "module" => "module?" |
14:27:40 | FromDiscord | <!Patitotective> actually this worked `nimble --cpu:i386 --passC:"-m32" --passL:"-m32" test` :] |
14:43:29 | FromDiscord | <!Patitotective> sent a code paste, see https://paste.rs/B8X |
14:43:45 | FromDiscord | <Yardanico> You don't have 32bit libgl |
14:43:53 | FromDiscord | <Yardanico> Install 32bit version of graphics drivers |
14:50:52 | FromDiscord | <!Patitotective> thanks :] |
15:21:20 | FromDiscord | <d4rckh> why does fgDefault make my foreground black? |
15:21:31 | FromDiscord | <d4rckh> (edit) "why does ... fgDefault" added "std/terminal's" |
15:28:07 | FromDiscord | <Psych0p4th.nim> guys, I am writing a client and server using net lib, and the following happens, when I program the server recv to receive 1024 bytes, and the client sends only 4 bytes, the data is only displayed when the program ends, on the contrary if I set only 4 bytes in receive which is the exact value, it receives and displays normally and the program continues, how do I correct this ?, to set 1024 bytes, receive 4 and display the 4 bytes i |
15:32:06 | FromDiscord | <Turgut> is there a way to make macros not hygenic in Nim? |
15:32:27 | FromDiscord | <Turgut> this does not work, any way to make it work? |
15:32:28 | FromDiscord | <Turgut> sent a code paste, see https://play.nim-lang.org/#ix=3YTo |
15:38:50 | FromDiscord | <Rika> Give it the dirty pragma |
15:59:56 | FromDiscord | <d4rckh> i cant get the length of a ref sequence? 🤔 |
16:00:26 | FromDiscord | <Psych0p4th.nim> In reply to @Psych0p4th.nim "guys, I am writing": i discover the problem, have one option in func newSocket called buffered is just set false in this option.... |
16:01:20 | NimEventer | New thread by Noxnivi: Adding Nim to System default base, see https://forum.nim-lang.org/t/9183 |
16:01:47 | FromDiscord | <Rika> In reply to @d4rckh "i cant get the": theThing[].len |
16:02:12 | FromDiscord | <d4rckh> amazing, now i got to add `[]` everywhere in my code lol |
16:02:25 | FromDiscord | <d4rckh> i made my sequence a ref because i wanted to kind of sync another sequence to it |
16:02:38 | FromDiscord | <d4rckh> so as soon as i add something to a sequence, it would add to my other sequence the same thing |
16:03:00 | FromDiscord | <d4rckh> and enable and disable that relationship at runtime |
16:04:40 | FromDiscord | <Hamid_Bluri> need someone explaining the differences between `object of` and `ref object of` |
16:04:56 | FromDiscord | <d4rckh> ref just creates a reference |
16:05:22 | FromDiscord | <Hamid_Bluri> why use `ref` then |
16:05:36 | FromDiscord | <huantian> Because you want it to have reference semantics |
16:05:36 | FromDiscord | <Hamid_Bluri> ref object of `antoherRefObj` |
16:13:22 | NimEventer | New thread by Noxnivi: GUI: Nim + QML unable to compile, see https://forum.nim-lang.org/t/9184 |
16:21:05 | FromDiscord | <Mike> sent a code paste, see https://paste.rs/97n |
16:21:10 | FromDiscord | <Mike> ... should this work? |
16:21:39 | FromDiscord | <Mike> Do I not understand nilability? |
16:25:50 | FromDiscord | <ynfle> In reply to @Turgut "is there a way": https://play.nim-lang.org/#ix=3YTA |
16:27:24 | FromDiscord | <Rika> a not nil tp is not a tp |
16:27:32 | FromDiscord | <Rika> putting it behind an if statement will not change the type |
16:27:39 | FromDiscord | <Rika> nim does not have flow typing |
16:27:47 | FromDiscord | <Rika> you must cast it into a not nil tp |
16:28:01 | FromDiscord | <ynfle> Even with the experimental flag? |
16:30:09 | FromDiscord | <Mike> Damn, that kinda sucks for the nilability thing. I get it though↵(@Rika) |
16:30:16 | FromDiscord | <huantian> Huh that seems like it would work though, using the object constructor should make a not nil |
16:34:02 | FromDiscord | <Rika> In reply to @ynfle "Even with the experimental": the flag does nothing about flow typing? |
16:34:25 | FromDiscord | <Rika> wait |
16:35:20 | FromDiscord | <Rika> i checked the experimental manual, it should apparently work |
16:36:15 | FromDiscord | <Rika> oh you got the type def wrong |
16:36:30 | FromDiscord | <Rika> `tp not nil` |
16:36:46 | FromDiscord | <Rika> @Turgut |
16:38:27 | FromDiscord | <Mike> Oh, hey. There we go |
16:38:33 | FromDiscord | <Mike> Awesome |
16:40:41 | FromDiscord | <Mike> And I guess I don't need the nil check because the compiler knows it's not nil after the assignment |
16:42:25 | FromDiscord | <Mike> Ah that's so nice. Feels better than swift's optional system already |
16:49:52 | * | def- quit (Quit: -) |
16:50:07 | * | def- joined #nim |
16:50:13 | FromDiscord | <huantian> Still not perfect though unfortunately |
16:50:27 | FromDiscord | <!Patitotective> In reply to @Patitotective "i want to be": i got it working using a `FLAGS` env variable hehe |
16:50:36 | FromDiscord | <huantian> Probably the biggest issue being that neither Option nor not nil is used very much in stdlib |
16:51:38 | FromDiscord | <Mike> Browsing the roadmap it sounds like it might be maturing a bit in nim 2.0? |
16:51:57 | FromDiscord | <huantian> Fingers crossed |
16:52:10 | FromDiscord | <huantian> I think it is planned tho |
16:52:56 | FromDiscord | <Mike> Sure hope so. I've been using Swift so much it's kinda hard for me to think without it |
17:49:55 | FromDiscord | <Phil> ... TFW your webapplication's binary is larger than all of an alpine container |
17:56:43 | FromDiscord | <Yardanico> In reply to @Isofruit "... TFW your webapplication's": too many generic instantiated procs :) |
17:56:52 | FromDiscord | <Yardanico> but generally try LTO and `strip -s` if you want to reduce binary size |
17:57:34 | FromDiscord | <Phil> In reply to @Yardanico "too many generic instantiated": Why would you wound me so, generics are my friends! |
17:58:11 | FromDiscord | <Phil> Nah, it's fine, just found it amusing |
17:58:25 | FromDiscord | <Phil> One of these days I'll even understand how to actually execute said binary inside of my alpine image |
18:00:55 | FromDiscord | <Yardanico> In reply to @Isofruit "One of these days": if you want to execute it in alpine image, you must either statically compile it, or dynamically link with musl |
18:02:21 | FromDiscord | <Phil> In reply to @Yardanico "if you want to": Assume I have no idea what I'm doing. Is the sanest way for me to approach this so I can gain a little experience before I go the harder route to just take an ubuntu nginx as base for my own? |
18:02:46 | FromDiscord | <Phil> (edit) "Is" => "↵Is" |
18:02:58 | FromDiscord | <Yardanico> I mean statically linking is quite easy, especially with cross-compilers like zig cc |
18:03:29 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3YTX |
18:03:52 | FromDiscord | <Phil> Which I think does dynamic linking? |
18:04:45 | FromDiscord | <Phil> Overall the binary is just an application server that I want to hide behind a rev proxy ala nginx |
18:08:47 | FromDiscord | <Yardanico> usestd, opt:speed are redundant |
18:09:00 | FromDiscord | <Yardanico> or actually maybe not, idk if prologue uses its fork of httpbeast otherwise |
18:09:03 | FromDiscord | <Yardanico> but opt:speed is redundant, yes |
18:09:06 | FromDiscord | <Phil> In reply to @Yardanico "I mean statically linking": Going over https://forum.nim-lang.org/t/6905 and what I find there, given that I only use nim packages and libs I'm not sure linking statically makes a difference? |
18:09:12 | FromDiscord | <Yardanico> In reply to @Isofruit "Which I think does": that depends on your system's C compiler |
18:09:23 | FromDiscord | <Yardanico> by default C compilers dynamically link against the system C library on most OSes |
18:09:34 | FromDiscord | <Yardanico> In reply to @Isofruit "Going over https://forum.nim-lang.org/t/6905 and": it does, Nim uses stuff from the libc |
18:09:39 | FromDiscord | <Yardanico> the main C runtime library |
18:09:55 | FromDiscord | <Yardanico> typical distros like Ubuntu/Debian etc use glibc, while Alpine uses musl, and glibc isn't ABI compatible with musl |
18:10:12 | FromDiscord | <Yardanico> so you either statically link the static lib into your binary, or dynamically link against musl |
18:10:27 | FromDiscord | <Yardanico> in almost all cases you just statically link against musl, then the binary will work on almost all linux distros |
18:12:17 | FromDiscord | <Phil> In reply to @Yardanico "typical distros like Ubuntu/Debian": First, thanks a ton, I had absolutely no idea |
18:12:39 | FromDiscord | <Phil> Given that my compiler is gcc on arch I'd assume it dynamically links them then.↵Is that what the `--dynlibOverride:SYMBOL` flag is for? I download musl on my local system and then somehow can do `--dynlibOverride:musl`? |
18:13:03 | FromDiscord | <Yardanico> no, dynlibOverride is only for the `dynlib` pragma |
18:13:16 | FromDiscord | <Yardanico> to statically link against the libc you provide options directly to the C compiler only |
18:13:19 | FromDiscord | <Yardanico> also, have you seen https://hub.docker.com/r/frolvlad/alpine-glibc/ ? |
18:14:13 | FromDiscord | <Phil> In reply to @Yardanico "also, have you seen": I didn't think that far ahead yet given that I only just learned there are differences there↵I'll check if there's an alpine-nginx-glibc image |
18:15:25 | FromDiscord | <Yardanico> you can just use that container and install nginx into it |
18:15:28 | FromDiscord | <Yardanico> alpine has nginx in repos |
18:15:28 | FromDiscord | <Phil> I wonder why nginx has so many different alpine perl images |
18:17:13 | FromDiscord | <Yardanico> also why not just use a docker image like nginx debian |
18:17:25 | FromDiscord | <!Patitotective> yard, im pretty confused about which libgl ubuntu package should i install for compiling i386, not sure if you know↵https://packages.ubuntu.com/bionic/libgl1-mesa-dev↵https://packages.ubuntu.com/bionic/libgl1 |
18:17:37 | FromDiscord | <d4rckh> is there any way i can clean the screen using std/terminal? |
18:17:52 | FromDiscord | <Yardanico> In reply to @Patitotective "yard, im pretty confused": what GPU drivers are you using? |
18:18:03 | FromDiscord | <Yardanico> In reply to @d4rckh "is there any way": https://nim-lang.org/docs/terminal.html#eraseScreen%2CFile |
18:18:09 | FromDiscord | <d4rckh> ah |
18:18:10 | FromDiscord | <d4rckh> oops |
18:18:11 | FromDiscord | <d4rckh> thanks |
18:19:35 | FromDiscord | <Phil> In reply to @Yardanico "also why not just": I wanted to originally just have small thing because my server only has like a gig of RAM and if the entire image lives in memory I don't necessarily want it to be huge |
18:19:56 | FromDiscord | <Yardanico> why do you want it to be in memory? :P |
18:19:59 | FromDiscord | <Phil> (That is filled with me assuming things because I barely understand or have used docker) |
18:20:16 | FromDiscord | <Yardanico> it really doesn't matter if your image itself is in memory or not, since binaries will generally just be read into RAM on start |
18:20:20 | FromDiscord | <Yardanico> what matters is where your DB is |
18:20:34 | FromDiscord | <Phil> My db is an sqlite file, its size is trivial pretty much |
18:20:40 | FromDiscord | <Phil> Wait |
18:20:40 | FromDiscord | <Phil> No |
18:20:41 | FromDiscord | <Phil> Kill me |
18:20:45 | FromDiscord | <Phil> It'll be outside the docker file |
18:20:46 | FromDiscord | <d4rckh> In reply to @Yardanico "https://nim-lang.org/docs/terminal.html#eraseScreen": hmm, that does not seem to my cursor at the top |
18:20:47 | FromDiscord | <Phil> Noooooooo |
18:20:50 | FromDiscord | <d4rckh> (edit) "In reply to @Yardanico "https://nim-lang.org/docs/terminal.html#eraseScreen": hmm, that does not seem to ... my" added "move" |
18:21:04 | Amun-Ra | mmap it |
18:21:10 | FromDiscord | <Yardanico> In reply to @Isofruit "My db is an": but then it really doesn't matter if your thing is in RAM or not |
18:21:30 | FromDiscord | <!Patitotective> In reply to @Yardanico "what GPU drivers are": h-how do i see that? hehe↵also installing libgl1-mesa-dev works on my ubuntu 22.04 machine↵but this is meant to be run on github actions ubuntu 18.04 |
18:21:52 | FromDiscord | <Yardanico> it will work there probably as well |
18:22:16 | FromDiscord | <!Patitotective> https://github.com/Patitotective/ImTemplate/runs/6644673763?check_suite_focus=true#step:5:11 |
18:22:17 | FromDiscord | <Yardanico> but generally I don't see much use in providing 32-bit builds of your binaries for Linux if they'll be dynamically linked |
18:23:12 | FromDiscord | <!Patitotective> then let me remove it |
18:24:48 | FromDiscord | <Phil> Yeah I'll shift all those issues to sometime next week, really don't feel like dealing with them right now |
18:25:00 | FromDiscord | <Yardanico> you mean to tomorrow |
18:25:09 | FromDiscord | <Phil> Possibly tomorrow if I can find time |
18:25:09 | FromDiscord | <Yardanico> tomorrow is next week :P |
18:25:44 | FromDiscord | <Phil> ~~By the time I'm fucking done with this I can literally triple fill as frontend dev, backend dev and effing devops as things are going~~ |
18:27:07 | FromDiscord | <Yardanico> you have to deploy 15 microservices to be a devops |
18:28:09 | FromDiscord | <Phil> I mean... I assume you mean from scratch and without tooling because through our jenkins tooling I've easily surpassed that already in terms of deploying to our staging environments 😛 |
18:31:52 | * | om3ga quit (Ping timeout: 248 seconds) |
18:42:35 | * | om3ga joined #nim |
19:34:25 | * | kenran joined #nim |
19:54:44 | * | noeontheend joined #nim |
19:55:25 | * | jjido joined #nim |
20:01:01 | * | jmdaemon joined #nim |
20:06:47 | * | xet7 quit (Remote host closed the connection) |
20:10:49 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:26:25 | * | xet7 joined #nim |
20:31:23 | FromDiscord | <luteva> Hi! I thought that -d:release would be the default now, but i see: ↵Hint: gc: refc; opt: none (DEBUG BUILD, `-d:release` generates faster code)↵so -d:relase it is not set, right?↵What is the correct way to set compiler options in a nimble prorject? |
20:31:58 | * | jmdaemon joined #nim |
20:33:13 | FromDiscord | <Yardanico> In reply to @luteva "Hi! I thought that": i don't see a reason why -d:release would be the default - it disables a lot of stuff useful for debugging and takes longer to compile |
20:33:53 | FromDiscord | <Yardanico> In reply to @luteva "Hi! I thought that": if you want to set some flags to always be there, you can just add them to the nim config |
20:34:18 | FromDiscord | <Yardanico> either `yournimfile.nim.cfg` or `yourfile.nims` or `nim.cfg` or `config.nims` |
20:34:32 | FromDiscord | <Yardanico> the first two apply only when compiling your file as the main one, and they must be placed in the same folder as the file itself |
20:34:44 | FromDiscord | <Yardanico> the latter two apply to all files in all dirs in the folder they're in and below |
20:36:33 | FromDiscord | <luteva> thanks! |
20:37:24 | FromDiscord | <Yardanico> and remember that .nim.cfg and .nims have different syntaxc |
20:37:25 | FromDiscord | <Yardanico> (edit) "syntaxc" => "syntax" |
20:37:54 | FromDiscord | <Yardanico> .nim.cfg files are just "dumb" configs where you have some if branches, .nims files are full blown NimScript (the subset of Nim that runs via the Nim VM that's in the compiler) and support most of the stdlib |
20:44:13 | FromDiscord | <luteva> thanks again i just want to test something like the strictFuncs etc. |
21:01:01 | * | kenran quit (Quit: WeeChat info:version) |
21:08:32 | * | xet7 quit (Ping timeout: 258 seconds) |
21:22:04 | * | xet7 joined #nim |
21:31:15 | FromDiscord | <Ayy Lmao> Are template parameters with no type untyped by default? As in `template foo(a)` vs `template foo(a: untyped)` |
21:31:32 | FromDiscord | <Elegantbeef> Yes |
21:31:39 | FromDiscord | <Elegantbeef> Just annotate them anyway is what i say |
21:32:12 | FromDiscord | <Ayy Lmao> That's what I usually do. It's probably better to annotate to avoid surprises when putting another typed parameter afterward. |
21:32:58 | FromDiscord | <Ayy Lmao> Also, is there a difference between using `auto` and `untyped` as the return type? |
21:34:05 | FromDiscord | <Elegantbeef> Nope |
21:34:14 | FromDiscord | <Elegantbeef> They both basically mean the same thing |
21:35:07 | * | FromDiscord quit (Remote host closed the connection) |
21:35:21 | * | FromDiscord joined #nim |
21:36:21 | FromDiscord | <Ayy Lmao> Awesome, thanks! I'll probably use auto then since it works with procs too. I feel like it is more clear that you are returning something too. I thought untyped as a return parameter basically meant you were returning nim code or something for a while. |
21:59:41 | * | noeontheend quit (Ping timeout: 246 seconds) |
22:03:46 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:39:10 | * | noeontheend joined #nim |
22:56:49 | FromDiscord | <martinium> dealing with an error where compiler is complaining about a proc not being declared.... |
22:57:07 | FromDiscord | <voidwalker> can i have a proc named reverse and use the reverse proc from algorithm unit, in the same unit ? |
22:58:04 | FromDiscord | <Yardanico> In reply to @voidwalker "can i have a": yes, of course |
22:58:11 | FromDiscord | <Elegantbeef> Code? |
22:58:12 | FromDiscord | <Andreas> In reply to @martinium "dealing with an error": where in your sourcefile is your proc declared - before you use it or behind |
22:58:16 | FromDiscord | <Yardanico> nim supports overloading |
22:58:24 | FromDiscord | <Yardanico> but you have to make sure that the number of arguments or their types are different |
22:58:34 | FromDiscord | <Yardanico> if the call is ambiguous nim will not compile the code |
22:58:50 | FromDiscord | <voidwalker> this worked |
22:58:53 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=3YV5 |
22:58:56 | FromDiscord | <Elegantbeef> In the case it's ambiguous you either need `myModule.reverse` or `algorithm.reverse` |
22:59:05 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3YV6 |
22:59:30 | FromDiscord | <Yardanico> 1) there's https://nim-lang.org/docs/algorithm.html#reversed%2CopenArray%5BT%5D that is out of place |
22:59:41 | FromDiscord | <Yardanico> 2) generally you can use dup from the sugar module to turn in-place procs to out-of-place |
22:59:58 | FromDiscord | <voidwalker> ohh nice |
23:00:00 | FromDiscord | <Yardanico> ah right 1 won't work for string |
23:00:27 | FromDiscord | <Yardanico> btw, do you want to reverse an ASCII string or it can possibly contain unicode characters? |
23:00:49 | FromDiscord | <voidwalker> just ascii |
23:01:06 | FromDiscord | <Yardanico> oh okay, then yeah, just sugar.dup is enough to make it out of place |
23:01:17 | FromDiscord | <Yardanico> just asked because for general string reversing there's https://nim-lang.org/docs/unicode.html#reversed%2Cstring |
23:03:11 | FromDiscord | <voidwalker> I see, so either that, or 1) but I convert it back to string from seq |
23:03:20 | FromDiscord | <Yardanico> In reply to @Yardanico "ah right 1 won't": ^yeah |
23:03:58 | FromDiscord | <Yardanico> but the proc itself is just 3 lines, so you can easily declare your own that works on string |
23:04:54 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3YV9 |
23:05:00 | FromDiscord | <Yardanico> just copied the impl of https://nim-lang.org/docs/algorithm.html#reversed%2CopenArray%5BT%5D and changed the type to string |
23:05:35 | FromDiscord | <voidwalker> well, i know how to reverse a string, the whole point was to use a one liner : P |
23:05:49 | FromDiscord | <Yardanico> well, I just meant that your proc wasn't optimal :P |
23:05:58 | FromDiscord | <Elegantbeef> cmon yard make it a `a: openarray[char]` like a good code reuser |
23:06:13 | FromDiscord | <Yardanico> there's reversed for seq already beef |
23:06:16 | FromDiscord | <Yardanico> https://nim-lang.org/docs/algorithm.html#reversed%2CopenArray%5BT%5D |
23:06:29 | FromDiscord | <Yardanico> or do you want a reversed overload that for a seq[char] returns string |
23:06:31 | FromDiscord | <Yardanico> but what for 🤔 |
23:06:54 | FromDiscord | <Elegantbeef> Cause openarray[char] is the optimal usage of `string` in 99% of cases |
23:07:05 | FromDiscord | <Elegantbeef> If it's a read only you might aswell use `openarray[char]` |
23:11:11 | FromDiscord | <!Patitotective> is there a flag to tell nim to warn for unused procs? |
23:11:25 | FromDiscord | <Elegantbeef> It warns by default |
23:11:27 | FromDiscord | <Yardanico> it already does that |
23:11:32 | FromDiscord | <Yardanico> it doesn't for exported ones, but that's logical |
23:11:37 | FromDiscord | <!Patitotective> hm |
23:11:54 | FromDiscord | <Yardanico> it's a hint, did you turn off hints? |
23:11:59 | FromDiscord | <Elegantbeef> Not using an exported proc isnt a warning it's a library 😄 |
23:12:40 | FromDiscord | <!Patitotective> In reply to @Yardanico "it's a hint, did": oh, i think nimline does that by default |
23:12:50 | FromDiscord | <!Patitotective> (edit) "nimline" => "nimlime" |
23:12:53 | FromDiscord | <Yardanico> this is how it looks in vscode https://media.discordapp.net/attachments/371759389889003532/980609702696198174/unknown.png |
23:12:58 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/980609724292661278/unknown.png |
23:14:13 | FromDiscord | <!Patitotective> vscode 💀 |
23:14:20 | FromDiscord | <Yardanico> In reply to @Patitotective "vscode 💀": sublime isn't much better really |
23:14:24 | FromDiscord | <Elegantbeef> Could use Kate |
23:14:27 | FromDiscord | <Yardanico> it also uses hundreds of MB of RAM |
23:14:45 | FromDiscord | <!Patitotective> In reply to @Yardanico "sublime isn't much better": its not an ide neither, i dont get warnings nor errors |
23:14:52 | FromDiscord | <huantian> I like M-x butterflies |
23:15:09 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Could use Kate": kate crashes my whole computer :) |
23:15:12 | FromDiscord | <Elegantbeef> Time to use Kate huan |
23:15:32 | FromDiscord | <Elegantbeef> Time to update from ubuntu patito |
23:15:32 | FromDiscord | <huantian> In reply to @Patitotective "kate crashes my whole": skill issue |
23:15:53 | FromDiscord | <Elegantbeef> I've been using Kate as my main editor for the past few months it's quite nice |
23:16:18 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Time to update from": to arch? no thank you Lol |
23:16:24 | FromDiscord | <Elegantbeef> No |
23:16:27 | FromDiscord | <Elegantbeef> I'm on debian sid |
23:16:59 | FromDiscord | <Yardanico> more or less the same :) |
23:17:07 | FromDiscord | <Elegantbeef> As arch? |
23:17:23 | FromDiscord | <Yardanico> yes |
23:17:31 | FromDiscord | <Yardanico> maybe even more fresh than arch |
23:17:34 | FromDiscord | <Yardanico> more in line with fedora rawhide |
23:17:47 | FromDiscord | <Elegantbeef> It's nice to have recent packages/tools and not have snapd shoved down your throat |
23:17:51 | FromDiscord | <Yardanico> yes |
23:18:06 | FromDiscord | <huantian> but pacman is cooler than apt don't @ me |
23:18:12 | FromDiscord | <Yardanico> @ you |
23:18:15 | FromDiscord | <Elegantbeef> I used ubuntu derived for years but recently got annoyed with the out of date packages and the like |
23:18:55 | FromDiscord | <Elegantbeef> I did see this nala(I think that's it's name) package manager which is written in python with libapt and does things better like async downloading |
23:19:08 | FromDiscord | <huantian> apt subcommands make too much sense ↵I actually really like pacman more than apt though, I like the flag system |
23:19:11 | FromDiscord | <Elegantbeef> Kinda want to use it but dont want to depend on python 😄 |
23:19:16 | FromDiscord | <huantian> same mood |
23:19:49 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Kinda want to use": once i removed python3.8 to install to python3.9 and i broke most of gnome apps and firefox |
23:19:53 | FromDiscord | <Elegantbeef> Yea apt is funny cause it's 2022 and does synchronous downloads |
23:20:08 | FromDiscord | <huantian> ever |
23:20:09 | FromDiscord | <huantian> this is why you never touch system python↵(@!Patitotective) |
23:20:18 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Yea apt is funny": even ImAppImage does asynchronous download |
23:20:35 | FromDiscord | <Elegantbeef> Yea but we all cant use shit software patito |
23:21:23 | FromDiscord | <Elegantbeef> So who wants to document libapt and give me their knowledge so i can make my own apt API |
23:21:47 | FromDiscord | <huantian> I'm good |
23:21:57 | FromDiscord | <Elegantbeef> Awww you're going to do it thanks! |
23:22:31 | FromDiscord | <Yepoleb> Apt does parallel downloads when you have multiple mirrors |
23:22:50 | FromDiscord | <huantian> that's interesting... |
23:23:00 | FromDiscord | <Elegantbeef> Does this work if you add multiple mirrors of the same location? |
23:23:01 | FromDiscord | <Yepoleb> So it definitely supports it, it's just disabled by default |
23:23:30 | FromDiscord | <Yepoleb> I never looked that far into it 😄 |
23:23:33 | FromDiscord | <!Patitotective> In reply to @Yepoleb "So it definitely supports": smart decisions, just like snap |
23:23:46 | FromDiscord | <Elegantbeef> https://github.com/ilikenwf/apt-fast so this exists |
23:24:03 | FromDiscord | <Yepoleb> I just see google chrome downloading at the same time as my regular packages |
23:24:41 | FromDiscord | <Yepoleb> (I use it just for testing btw please no judge) |
23:24:48 | FromDiscord | <!Patitotective> sus beef https://media.discordapp.net/attachments/371759389889003532/980612701959098378/unknown.png |
23:24:54 | FromDiscord | <Yardanico> why "sus"? |
23:24:56 | FromDiscord | <Elegantbeef> What? |
23:24:58 | FromDiscord | <!Patitotective> unstable |
23:25:01 | FromDiscord | <Yardanico> so? |
23:25:04 | FromDiscord | <Elegantbeef> It's a rolling release |
23:25:06 | FromDiscord | <Elegantbeef> You get modern software and libraries |
23:25:11 | FromDiscord | <Yardanico> arch is also "unstable", so is fedora rawhide |
23:25:14 | FromDiscord | <huantian> I don't understand how people live without rolling release |
23:25:19 | FromDiscord | <Yepoleb> It's debians interpretation of unstable |
23:25:28 | FromDiscord | <Elegantbeef> Developers should be on rolling |
23:25:30 | FromDiscord | <!Patitotective> ubuntu 22.04 LTM lol |
23:25:37 | FromDiscord | <!Patitotective> (edit) "LTM" => "LTS" |
23:25:39 | FromDiscord | <Yardanico> every .04 ubuntu release is an LTS |
23:25:47 | FromDiscord | <Yardanico> the even releases |
23:25:48 | FromDiscord | <Elegantbeef> No |
23:25:59 | FromDiscord | <Elegantbeef> Isnt it ever 2 0.4s? |
23:26:08 | FromDiscord | <Elegantbeef> 16/18/20/22/... |
23:26:16 | FromDiscord | <Yardanico> In reply to @Yardanico "the even releases": ^ |
23:26:22 | FromDiscord | <!Patitotective> i never understand why tech companies have such ugly websites https://media.discordapp.net/attachments/371759389889003532/980613096840241282/unknown.png |
23:26:23 | FromDiscord | <Yardanico> guess matrix is lagging as always |
23:26:29 | FromDiscord | <Yardanico> In reply to @Patitotective "i never understand why": how is it ugly? |
23:26:31 | FromDiscord | <Elegantbeef> A bit |
23:26:48 | FromDiscord | <huantian> It's just not bloated |
23:26:51 | FromDiscord | <huantian> 😛 |
23:26:52 | FromDiscord | <Elegantbeef> "Tech companies" |
23:26:56 | FromDiscord | <Yardanico> yes, we need to add 500MB of JS |
23:26:59 | FromDiscord | <Elegantbeef> Debian is now a tech company, they made it! |
23:27:03 | FromDiscord | <!Patitotective> In reply to @Yardanico "how is it ugly?": the font↵theres no padding, text is almost cropped off the screen |
23:27:14 | FromDiscord | <Yardanico> but that's the footer |
23:27:19 | FromDiscord | <Elegantbeef> "PRs welcomed" |
23:27:31 | FromDiscord | <!Patitotective> and the header https://media.discordapp.net/attachments/371759389889003532/980613384976343100/unknown.png |
23:27:41 | FromDiscord | <!Patitotective> In reply to @Elegantbeef ""PRs welcomed"": _if i knew about webdev_ |
23:27:47 | FromDiscord | <Yardanico> In reply to @Patitotective "and the header": looks totally fine for me |
23:27:54 | FromDiscord | <Yardanico> no wasted space |
23:28:10 | FromDiscord | <Yepoleb> they need to switch to a react based website |
23:28:26 | FromDiscord | <Elegantbeef> But yes patito Debian isnt a tech company it's not ran by a for profit like canonical |
23:28:45 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "But yes patito Debian": so what is it |
23:28:49 | FromDiscord | <huantian> it's based |
23:29:07 | FromDiscord | <Elegantbeef> > The Debian Project is a worldwide group of volunteers who endeavor to produce an operating system distribution that is composed entirely of free software. The principle product of the project to date is the Debian GNU/Linux software distribution, which includes the Linux operating system kernel, and thousands of prepackaged applications. Various processor types are supported to one extent or another, including 32 and 64 bit x86, ARM |
23:29:27 | FromDiscord | <!Patitotective> isnt that the description of gnome? LOL |
23:29:41 | FromDiscord | <Yardanico> ??? |
23:29:48 | FromDiscord | <!Patitotective> replace operating system with desktop enviroment |
23:29:54 | FromDiscord | <Yardanico> what |
23:29:58 | * | krux02 quit (Remote host closed the connection) |
23:30:11 | FromDiscord | <Elegantbeef> Wow non profits are ... non profits |
23:30:18 | FromDiscord | <Elegantbeef> Gnome isnt a tech company either |
23:30:27 | FromDiscord | <Elegantbeef> It's a non profit dedicated to FOSS aswell |
23:30:28 | FromDiscord | <!Patitotective> In reply to @Yardanico "what": https://www.gnome.org/about-us/ |
23:30:38 | FromDiscord | <Yardanico> In reply to @Patitotective "https://www.gnome.org/about-us/": yes, so, where does it say this |
23:30:49 | FromDiscord | <!Patitotective> also yard, please add a favicon to your blog |
23:31:00 | FromDiscord | <!Patitotective> In reply to @Yardanico "yes, so, where does": :[ |
23:31:09 | FromDiscord | <Yardanico> In reply to @Patitotective "also yard, please add": i haven't posted anything there so it doesn't matter for now |
23:31:22 | FromDiscord | <huantian> favicons are bloat!!!! |
23:31:29 | FromDiscord | <huantian> window titles bloatttt |
23:31:31 | FromDiscord | <Elegantbeef> Point being Debian sid is a fantastic rolling releease for ex ubuntu users |
23:31:47 | FromDiscord | <Yepoleb> btw i use debian sid |
23:31:51 | FromDiscord | <Elegantbeef> It's not drastically different to what you're used to and installs easy with your choice of DE |
23:32:19 | FromDiscord | <Yardanico> but "unstable" word is very scary !! |
23:32:22 | FromDiscord | <!Patitotective> yes |
23:32:28 | FromDiscord | <Yardanico> ubuntu says "lts" and it surely never breaks |
23:32:39 | FromDiscord | <!Patitotective> all the reason yard |
23:32:39 | FromDiscord | <huantian> not unless you install xorg |
23:32:54 | FromDiscord | <Elegantbeef> What version of kate is the present version on ubuntu |
23:32:55 | FromDiscord | <Yardanico> In reply to @Patitotective "all the reason yard": except that i was being sarcastic 😔 |
23:33:03 | FromDiscord | <Elegantbeef> I know when i tried to use kate it was so out dated it couldnt use NimLsp |
23:33:07 | FromDiscord | <!Patitotective> In reply to @Yardanico "except that i was": not funny now |
23:33:14 | FromDiscord | <Yardanico> In reply to @Elegantbeef "What version of kate": 4:21.12.3 |
23:33:14 | FromDiscord | <Yepoleb> bUT DEbIan nEvER geTS UpdaTES! |
23:33:22 | FromDiscord | <Yardanico> 21.12.3 in 22.04 |
23:33:39 | FromDiscord | <!Patitotective> i have 21.12.1 installed 🤷♂️ |
23:33:50 | FromDiscord | <Elegantbeef> Bit outdated |
23:34:04 | FromDiscord | <Yardanico> In reply to @Patitotective "i have 21.12.1 installed": have you tried updating your system 🤔 |
23:34:19 | FromDiscord | <!Patitotective> In reply to @Yardanico "have you tried updating": yes and now i have 22.04 |
23:34:37 | FromDiscord | <Yepoleb> i checked apt.conf(5) and there seems to only be a setting between one connection per host and one connection per URI type |
23:34:50 | FromDiscord | <Yardanico> In reply to @Patitotective "yes and now i": no, updating the packages in your system |
23:34:58 | FromDiscord | <Yardanico> in rolling release distros there's no difference between the two |
23:35:22 | FromDiscord | <huantian> which honestly is so nice |
23:35:24 | FromDiscord | <huantian> you don't get massive updates |
23:35:26 | FromDiscord | <Yardanico> yes |
23:35:39 | FromDiscord | <!Patitotective> btw beef, if sometime you convince me to _update_ to debian sid and my pc breaks↵youll be roasted beef (because im the best reading installation manuals) |
23:36:01 | FromDiscord | <Yardanico> @!Patitotective it's a losing battle from the start, most developers use rolling release because it's objectively better to have the newest software to try unless you code in Fortran |
23:36:04 | FromDiscord | <huantian> I mean beef installed debian sid like 3 tims |
23:36:25 | FromDiscord | <!Patitotective> In reply to @Yardanico "<@762008715162419261> it's a losing": sometimes i code in fortran |
23:36:44 | FromDiscord | <Yepoleb> life hack: find a debian mirror that does not care about the host header and add one CNAME subdomain record per connection to your domain. now you can use as many parallel connections as you want |
23:37:03 | FromDiscord | <Yepoleb> (i did not test this) |
23:37:24 | FromDiscord | <Yardanico> wow, it's so easy to have parallel downloads in apt and it's totally not a hack :P |
23:37:41 | FromDiscord | <Yepoleb> thinking about it, it's probably IP based |
23:37:47 | FromDiscord | <!Patitotective> just updated my packages yard |
23:37:57 | FromDiscord | <huantian> haters when I edit `/etc/pacman.conf` |
23:38:13 | FromDiscord | <huantian> and set `ParallelDownloads = 8` |
23:38:49 | FromDiscord | <Yepoleb> and that is when i started writing a bunch of iptables rules to fool apt into thinking i'm connection to multiple hosts |
23:39:38 | FromDiscord | <!Patitotective> now kate works beeef https://media.discordapp.net/attachments/371759389889003532/980616434554130492/unknown.png |
23:40:07 | FromDiscord | <Yardanico> now install nimlsp and be happy |
23:40:11 | FromDiscord | <Yepoleb> but do parallel connections even do anything in current year? |
23:40:20 | FromDiscord | <Yardanico> In reply to @Yepoleb "but do parallel connections": is this a joke or a real question |
23:40:26 | FromDiscord | <Yepoleb> a real question |
23:40:37 | FromDiscord | <Yardanico> with my 500Mbit/sec parallel downloads make updates much faster |
23:40:42 | FromDiscord | <huantian> super very much |
23:40:47 | FromDiscord | <Elegantbeef> Having multiple downloads is only really efficient when you have fast speeds |
23:40:57 | FromDiscord | <Elegantbeef> It's about splitting your download getting small files faster |
23:41:01 | FromDiscord | <Yepoleb> are you connecting to the same host |
23:41:04 | FromDiscord | <Yardanico> yes |
23:41:08 | FromDiscord | <Yepoleb> 🤔 |
23:41:09 | FromDiscord | <Yardanico> how would that affect anything |
23:41:24 | FromDiscord | <Yardanico> mirrors have like 10Gbit links or even more |
23:41:36 | FromDiscord | <Yardanico> it takes time for the download to speed up from slow to max speed, and if the package manager does that for each package it's slow |
23:41:50 | FromDiscord | <Yardanico> with multiple downloads it starts (duh) multiple downloads so in the end it is quite faster |
23:42:17 | FromDiscord | <Elegantbeef> Much much faster it's one reason people love dnf |
23:42:38 | FromDiscord | <Yepoleb> it does not need to ramp up when reusing the same connection though |
23:42:45 | FromDiscord | <!Patitotective> beef, kate's color scheme is not updating↵its night and my eyes wont support _Breeze Light_ longer |
23:42:49 | FromDiscord | <!Patitotective> (edit) "beef, kate's color scheme is not updating↵its night and my eyes wont support _Breeze Light_ ... longer" added "any" |
23:42:54 | FromDiscord | <Yardanico> can you request multiple files in the same connection with HTTP so that it doesn't stop? I don't think you can |
23:43:01 | FromDiscord | <huantian> gnome issue↵(@!Patitotective) |
23:43:03 | FromDiscord | <Yardanico> you request one file after another |
23:43:21 | FromDiscord | <Elegantbeef> The editor uses a different theme to the GUI |
23:43:22 | FromDiscord | <Yepoleb> http/2 has been a thing since 2015 |
23:43:33 | FromDiscord | <Yardanico> i think you're trying to divert the thing we're arguing about |
23:43:42 | FromDiscord | <Yardanico> I don't know any mirrors or package managers that support HTTP/2 |
23:43:47 | FromDiscord | <Yardanico> so we are talking about the current state of things |
23:43:59 | FromDiscord | <Elegantbeef> Concurrent downloads make life better there is no debate! |
23:44:03 | FromDiscord | <Yardanico> also let's move to #offtopic since there's an ontopic discussion kind of |
23:44:07 | FromDiscord | <Yardanico> about kate and nimlsp |
23:44:44 | FromDiscord | <Elegantbeef> Patito you set the theme and the GUI didnt change? |
23:44:56 | FromDiscord | <Yepoleb> deb.debian.org supports HTTP/2 |
23:45:33 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Patito you set the": #offtopic :p |
23:45:37 | FromDiscord | <Yardanico> #offtopic |
23:45:47 | FromDiscord | <martinium> In reply to @Andreas "where in your sourcefile": Declared before I use it. Had to refactor it from slacklib which needs to change nil checks on strings |
23:45:48 | FromDiscord | <Yepoleb> which is the offtopic conversation now? |
23:45:59 | FromDiscord | <Yardanico> the one we're having about PMs, let's just move to offtopic |
23:46:19 | FromDiscord | <Yardanico> In reply to @martinium "Declared before I use": can you show the exact error? |
23:46:24 | FromDiscord | <Yardanico> the one that the compiler shows |
23:46:28 | FromDiscord | <Elegantbeef> Does Settings \> Editor Color Theme not work for you pat? |
23:47:01 | FromDiscord | <Yardanico> beef we're already in offtopic |
23:51:13 | FromDiscord | <martinium> In reply to @Yardanico "the one that the": fixed the issue |