00:00:24 | * | tk quit (Quit: Well, this is unexpected.) |
00:00:49 | * | tk joined #nim |
00:02:53 | FromDiscord | <noow> i gotta get used to half the stdlib's being gotchas |
00:03:11 | FromDiscord | <noow> and to half of them modifying things i'm passing as arguments |
00:03:23 | FromDiscord | <noow> (edit) "and to half of them modifying things i'm passing as arguments ... " added "instead of returning values based on them" |
00:06:22 | FromDiscord | <Yepoleb> no just write your own functions that do things the sane way |
00:06:35 | FromDiscord | <Yepoleb> or copy them from somewhere |
00:37:05 | NimEventer | New thread by Nycto: Void as a type in a tuple, see https://forum.nim-lang.org/t/8877 |
00:42:39 | FromDiscord | <Tuatarian> is there anything i can do about this? |
00:42:41 | FromDiscord | <Tuatarian> this code |
00:42:54 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3OTY |
00:43:05 | FromDiscord | <Tuatarian> gives an internal error on 1.4.4 |
00:43:10 | FromDiscord | <Tuatarian> `Error: internal error: proc has no result symbol` |
00:43:22 | FromDiscord | <Tuatarian> sorry forgot to include some stuff |
00:43:25 | FromDiscord | <Tuatarian> `C:\Program Files\nim-1.4.4\lib\pure\strutils.nim(517, 10) Error: internal error: proc has no result symbol` |
00:43:46 | FromDiscord | <Tuatarian> a more split version of the (I think) offending line is |
00:44:20 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3OTZ |
00:44:38 | FromDiscord | <Tuatarian> also, I get this warning |
00:44:40 | FromDiscord | <Tuatarian> `d:\Scripts\Misc\Nim\Nim\games\sPuzPic\rayutils.nim(1, 67) Warning: imported and not used: 'sequtils' [UnusedImport]` |
00:44:47 | FromDiscord | <Tuatarian> even though I have very much used sequtils |
00:44:56 | FromDiscord | <Tuatarian> neither of these errors show up in vscode |
00:45:11 | FromDiscord | <Tuatarian> wasn't able to do the ./koch c thing, not sure how to |
00:49:31 | FromDiscord | <ynfle> @Tuatarian Can you share more of the code? |
00:54:53 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3OU0 |
00:55:30 | FromDiscord | <ynfle> (edit) "https://play.nim-lang.org/#ix=3OU0" => "https://paste.rs/d2H" |
00:59:01 | FromDiscord | <Tuatarian> Didn't realize endswith existed, that's super useful |
00:59:12 | FromDiscord | <Tuatarian> I'll copy paste the whole file |
00:59:25 | FromDiscord | <Tuatarian> onto pasteofcode |
00:59:38 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3OU2 |
01:00:13 | FromDiscord | <Tuatarian> main.nim : https://paste.ofcode.org/tdSrfrZ4wAw6nSPgctSmiX |
01:00:47 | FromDiscord | <noow> try putting that strformat into its own var and using it |
01:00:58 | FromDiscord | <noow> does it still error |
01:02:39 | FromDiscord | <Tuatarian> In reply to @noow "this code compiles for": I get an IO error if I run that line in isolation |
01:03:20 | FromDiscord | <noow> but that's a runtime error, I thought we were talking about a compiler error |
01:03:43 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3OU6 |
01:03:44 | FromDiscord | <Tuatarian> In reply to @noow "try putting that strformat": yes |
01:04:05 | FromDiscord | <Tuatarian> In reply to @ynfle "Just remove strformat and": the thing is appending another path |
01:04:25 | FromDiscord | <Tuatarian> can you do it like `"assets" / folders[i]`? |
01:04:31 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "can you do it": Ya |
01:04:32 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3OU7 |
01:04:41 | FromDiscord | <ynfle> Is `.path` a field? |
01:04:44 | FromDiscord | <Tuatarian> ok so then the internal error thing is from elsewhere |
01:04:45 | FromDiscord | <Tuatarian> yes |
01:05:00 | FromDiscord | <ynfle> If you comment out the line it compiles? |
01:05:01 | FromDiscord | <Tuatarian> walkdir gives a tuple of kind and path |
01:05:17 | FromDiscord | <Tuatarian> no |
01:05:28 | FromDiscord | <Tuatarian> ok so the error is elsewhere which is odd |
01:06:24 | FromDiscord | <Tuatarian> also, why is it saying that I didn't use sequtils? |
01:07:18 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "also, why is it": If it doesn't compile properly, so then import may not be used |
01:07:22 | FromDiscord | <Tuatarian> ok so the issue is in this function |
01:07:26 | FromDiscord | <noow> there's another line with sequtils in it |
01:07:30 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3OU9 |
01:07:34 | FromDiscord | <Tuatarian> I rewrote the split func to try to identify it |
01:07:47 | FromDiscord | <Tuatarian> it gives `internal error: proc has no result symbol` |
01:07:54 | FromDiscord | <Tuatarian> not really sure what to make of that |
01:08:13 | FromDiscord | <huantian> what is this function supposed to do |
01:08:17 | FromDiscord | <Tuatarian> split |
01:08:20 | FromDiscord | <Tuatarian> its the split iterator |
01:08:40 | FromDiscord | <Tuatarian> can confirm the variable being named result is not the issue, if I rename it the problem persists |
01:08:48 | FromDiscord | <huantian> wait why not just use split? |
01:09:01 | FromDiscord | <ynfle> Try compile with `--verbosity:2` |
01:09:10 | FromDiscord | <noow> is the `in` defined for strings? |
01:09:22 | FromDiscord | <Tuatarian> In reply to @huantian "wait why not just": I was using split initally but I copied it over to another file to try to find the issue more easily |
01:09:29 | FromDiscord | <Tuatarian> In reply to @noow "is the `in` defined": pretty sure |
01:09:36 | FromDiscord | <Tuatarian> almost 100% sure |
01:09:39 | FromDiscord | <ynfle> Not for char I don't think |
01:09:47 | FromDiscord | <Tuatarian> you can't do char in string? |
01:09:54 | FromDiscord | <Tuatarian> the regular split iterator causes the same issue btw |
01:10:00 | FromDiscord | <ynfle> Nver mind |
01:10:14 | FromDiscord | <Tuatarian> In reply to @ynfle "Try compile with `--verbosity:2`": same error |
01:10:29 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "same error": I know, but it may give more information |
01:10:37 | FromDiscord | <Tuatarian> it didn't I mean |
01:10:40 | FromDiscord | <Tuatarian> sorry I phrased that badly |
01:10:43 | FromDiscord | <Tuatarian> it gave the same error |
01:11:07 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3OUa |
01:11:11 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3OUb |
01:11:49 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3OUc |
01:11:54 | FromDiscord | <Tuatarian> just copied it over to test |
01:12:25 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3OUd |
01:12:42 | FromDiscord | <noow> wait maybe it's the combination of iterators with toSeq or something |
01:13:29 | FromDiscord | <huantian> I mean if you're using toSeq, just use the function version of split |
01:13:31 | FromDiscord | <noow> imgtxt[imgid].spsplit("&!&").pairs |
01:13:33 | FromDiscord | <noow> you're doing this |
01:13:49 | FromDiscord | <noow> lemme try including this as well in my small test |
01:13:57 | FromDiscord | <Tuatarian> In reply to @huantian "I mean if you're": there's a funciton version of split? |
01:14:04 | FromDiscord | <huantian> https://nim-lang.org/docs/strutils.html#split%2Cstring%2Cchar%2Cint |
01:14:10 | FromDiscord | <Tuatarian> also I changed the orignal line to use the proc version of readlines so no split there |
01:14:18 | FromDiscord | <Tuatarian> In reply to @huantian "https://nim-lang.org/docs/strutils.html#split%2Cstr": lmao I had no idea |
01:14:43 | FromDiscord | <noow> are you sure line 189 is possible to do? |
01:14:55 | FromDiscord | <Tuatarian> if shown? |
01:15:10 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3OUe |
01:15:36 | FromDiscord | <Tuatarian> huh |
01:15:40 | FromDiscord | <Tuatarian> does that work for normal split? |
01:15:51 | FromDiscord | <Tuatarian> gives the same issue for me with normal split |
01:15:54 | FromDiscord | <Tuatarian> that's really weird |
01:16:34 | FromDiscord | <Tuatarian> ok the error disappears if I dont' use pairs here |
01:16:43 | FromDiscord | <noow> pairs is only defined for a few builtin types |
01:16:44 | FromDiscord | <noow> https://nim-lang.org/docs/iterators.html#pairs.i%2Ccstring |
01:16:51 | FromDiscord | <Tuatarian> placing inx outside the loop and incrementing it manually compiles fine |
01:16:52 | FromDiscord | <huantian> this works |
01:16:56 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3OUf |
01:17:14 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3OUg |
01:17:29 | FromDiscord | <huantian> actaully the .pairs is redundant |
01:17:37 | FromDiscord | <Tuatarian> ok so split needs to be function not iterator |
01:17:44 | FromDiscord | <Tuatarian> but if I put split there it assumes it's iterator not a function |
01:17:53 | FromDiscord | <Tuatarian> so you need to manually make it a seq instead of an iterator |
01:18:03 | FromDiscord | <Tuatarian> or just count the inx outside and not deal with pairs |
01:18:05 | FromDiscord | <noow> if split returns a seq you can also just iterate over seq's |
01:18:17 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3OUh |
01:19:15 | FromDiscord | <Tuatarian> so enumerate is kind of a generalization of pairs? |
01:19:38 | FromDiscord | <Tuatarian> or is it that enumerate takes an iterator? |
01:19:39 | FromDiscord | <noow> i think pairs guarantees that the index belongs to the value in case of things like tables? |
01:19:47 | FromDiscord | <noow> and pairs is used for data types |
01:20:05 | FromDiscord | <Tuatarian> oh I see |
01:20:06 | FromDiscord | <noow> (edit) "used" => "an iterator itself" |
01:20:11 | FromDiscord | <Tuatarian> and enumerate doesn't guarantee order necessarily |
01:20:12 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "so enumerate is kind": Ya |
01:20:23 | FromDiscord | <Tuatarian> ok thanks guys |
01:20:28 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "and enumerate doesn't guarantee": It should |
01:20:30 | FromDiscord | <Tuatarian> this was a gigantic help |
01:20:31 | FromDiscord | <noow> In reply to @iWonderAboutTuatara "and enumerate doesn't guarantee": i think enumerate keeps the order of the iterator passed? |
01:20:44 | FromDiscord | <Tuatarian> in the examples enumerate is enumerating over non iterator things also |
01:20:50 | FromDiscord | <ynfle> Did you issue get solved? |
01:20:54 | FromDiscord | <Tuatarian> yep |
01:20:57 | FromDiscord | <Tuatarian> compiling perfectly |
01:20:59 | FromDiscord | <ynfle> How? |
01:21:07 | FromDiscord | <Tuatarian> I removed pairs |
01:21:20 | FromDiscord | <noow> In reply to @iWonderAboutTuatara "in the examples enumerate": it's a macro though, so it should work for anything i think |
01:21:22 | FromDiscord | <Tuatarian> am counting inx manually, declared the var prior to the loop and increment each time |
01:21:42 | FromDiscord | <Tuatarian> In reply to @noow "it's a macro though,": yeah, if its loopable enumerate should work |
01:21:43 | FromDiscord | <ynfle> Please file a bug, internal errors, shouldn't exist |
01:22:00 | FromDiscord | <ynfle> Which pairs did you remove? |
01:22:24 | FromDiscord | <noow> https://paste.ofcode.org/tdSrfrZ4wAw6nSPgctSmiX line 189 |
01:22:28 | FromDiscord | <Tuatarian> on line 191 |
01:22:31 | FromDiscord | <Tuatarian> oh 189? |
01:22:37 | FromDiscord | <Tuatarian> ok it's different in my vscode |
01:22:42 | FromDiscord | <Tuatarian> not sure how to file a bug report |
01:22:52 | FromDiscord | <Tuatarian> it says to run the ./koch thing but I don't really know what to do for that |
01:23:17 | FromDiscord | <noow> that's for recompiling the compiler so it shows more info |
01:23:27 | FromDiscord | <Tuatarian> you have to import enumerate as std/enumerate |
01:23:31 | FromDiscord | <Tuatarian> you can't just do import enumerate |
01:23:32 | FromDiscord | <Tuatarian> that's strange |
01:23:34 | FromDiscord | <noow> but trying to reduce the issue to a small nim code that also doesn't compile with the same internal error should be enough probably |
01:23:57 | FromDiscord | <ynfle> @Tuatarian for the file extension stuff you can use this https://nim-lang.org/docs/os.html#splitFile%2Cstring |
01:24:25 | FromDiscord | <Tuatarian> it's recombining not separating |
01:24:29 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "not sure how to": Open an issue on https://github.com/nim-lang/Nim/issues with a minimal reproducible example |
01:24:35 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "it's recombining not separating": For the filtering? |
01:24:40 | FromDiscord | <Tuatarian> yeah |
01:24:50 | FromDiscord | <Tuatarian> &"assets/{folders[i]}" |
01:24:59 | FromDiscord | <Tuatarian> folders[i] is a directory in assets |
01:25:17 | FromDiscord | <ynfle> No I meant `filterIt(it.path[^4..^1] == ".imdat")` |
01:25:31 | FromDiscord | <ynfle> it.splitFile.ext |
01:25:42 | FromDiscord | <Tuatarian> does `walkDir(relative=false)` give paths relative to the file or like the system path? |
01:25:55 | FromDiscord | <Tuatarian> In reply to @ynfle "No I meant `filterIt(it.path[^4..^1]": oh I see, that's a good idea probably |
01:25:59 | FromDiscord | <huantian> In reply to @iWonderAboutTuatara "does `walkDir(relative=false)` give paths": > Walking is not recursive. If relative is true (default: false) the resulting path is shortened to be relative to dir. |
01:26:03 | FromDiscord | <Tuatarian> I think there's also an endsWith proc that I could use |
01:26:10 | * | jmdaemon joined #nim |
01:26:11 | FromDiscord | <noow> what nim version are you using? |
01:26:12 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "does `walkDir(relative=false)` give paths": Docs say `relative = true` makes the returned paths relative |
01:26:18 | FromDiscord | <Tuatarian> relative to the dir it starts walking from right? |
01:26:37 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "I think there's also": Ya. But may be easier. 🤷♂️ Whatever you want |
01:26:43 | FromDiscord | <ynfle> In reply to @noow "what nim version are": 1.4.4 from above errors |
01:26:52 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "relative to the dir": Probably not |
01:27:00 | FromDiscord | <huantian> In reply to @ynfle "Ya. But may be": I'd say splitfile is more explicit |
01:27:05 | FromDiscord | <noow> yeah it's fixed in latest nim |
01:27:06 | FromDiscord | <Tuatarian> ie if it starts walking in `assets/` then you'd get, say, `assets/classic` as `classic` |
01:27:21 | FromDiscord | <Tuatarian> using 1.4.4. |
01:27:26 | FromDiscord | <noow> i could reproduce the bug in 1.4.4 by just trying to call .pairs on an iterator |
01:27:33 | FromDiscord | <noow> but in 1.6.2 it gives you a nice error message |
01:27:40 | FromDiscord | <ynfle> In reply to @noow "but in 1.6.2 it": 🥳 |
01:27:42 | FromDiscord | <Tuatarian> is choosenim working on windows btw? |
01:27:46 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "is choosenim working on": Ya |
01:27:54 | FromDiscord | <Tuatarian> it was broken for the longest time |
01:28:54 | FromDiscord | <Tuatarian> epic |
01:29:08 | FromDiscord | <Tuatarian> so happy to not have to deal with changing PATH every time I want to update |
01:29:25 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "it was broken for": From this post https://forum.nim-lang.org/t/8839#57877 it seems like it does |
01:30:12 | FromDiscord | <Tuatarian> yeah it worked for me |
01:30:52 | FromDiscord | <Tuatarian> though... it did not update PATH |
01:30:52 | FromDiscord | <noow> In reply to @ynfle "From this post https://forum.nim-lang.org/t/8839#57": they used the wrong arg no? it wasn't choosenim not working |
01:31:05 | FromDiscord | <noow> it doesn't update PATH on linux either |
01:31:12 | FromDiscord | <Tuatarian> oh so I have to do it manually? |
01:31:22 | FromDiscord | <ynfle> In reply to @noow "they used the wrong": Right, but it seems that that was the only issue |
01:31:25 | FromDiscord | <Tuatarian> that was the most painful part of updating lmao |
01:31:25 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "oh so I have": No |
01:31:27 | FromDiscord | <noow> on linux I had to add ~/.nimble/bin to PATH manually once |
01:31:44 | FromDiscord | <noow> I don't know where choosenim puts things on win |
01:31:56 | FromDiscord | <huantian> yeah you just add `export PATH="$HOME/.nimble/bin:$PATH"` to your rc file |
01:32:18 | FromDiscord | <noow> I think they use a "environment variables" program to do that on windows, i'm not sure |
01:32:25 | FromDiscord | <noow> (edit) "they" => "people" |
01:34:06 | FromDiscord | <Tuatarian> I'm on windows atm |
01:34:19 | FromDiscord | <ynfle> Did choosenim work? |
01:34:28 | FromDiscord | <Tuatarian> it downloaded it but doesn't seem to have changed path |
01:34:44 | FromDiscord | <Tuatarian> export PATH="$HOME/.nimble/bin:$PATH |
01:34:47 | FromDiscord | <Tuatarian> I have this in path |
01:34:57 | FromDiscord | <Tuatarian> but it still calls nim 1.4.4 compiler |
01:35:54 | FromDiscord | <ynfle> What's in your `$HOME/.nimble` dir? |
01:36:16 | FromDiscord | <huantian> In reply to @iWonderAboutTuatara "export PATH="$HOME/.nimble/bin:$PATH": I don't thinkt this works on windows |
01:36:28 | FromDiscord | <noow> In reply to @iWonderAboutTuatara "export PATH="$HOME/.nimble/bin:$PATH": that was a bash command |
01:36:29 | FromDiscord | <huantian> you have to add the path to the folder where choosenim is installed at the end |
01:36:39 | FromDiscord | <Tuatarian> II copied this from the path environment vairable |
01:36:58 | FromDiscord | <Tuatarian> it shows in the thing as C:/Users/Admin/.nimble\bin |
01:37:07 | FromDiscord | <Tuatarian> where is choosenim installed? |
01:37:12 | FromDiscord | <noow> that is it |
01:38:21 | FromDiscord | <noow> also, you should remove the path to 1.4.4 from PATH |
01:38:42 | FromDiscord | <noow> or else if it comes before the .nimble/bin, it will resolve it to 1.4.4 |
01:38:49 | FromDiscord | <Tuatarian> it's already not there |
01:39:18 | FromDiscord | <noow> is C:/Users/Admin/.nimble/bin (i'm not sure if you have to use backslashes or forward slashes) in your PATH? |
01:40:41 | FromDiscord | <Tuatarian> my old nim version was in programfiles |
01:40:52 | FromDiscord | <Tuatarian> having difficulty deleting it because something is using some files |
01:41:02 | FromDiscord | <noow> you don't need to delete the nim install |
01:41:07 | FromDiscord | <noow> it's enough to remove the path to it from PATH |
01:41:28 | FromDiscord | <Tuatarian> it's installed in `C:\Program Files\nim-1.4.4` |
01:41:37 | FromDiscord | <Tuatarian> which I don't think it's supposed to be in right? |
01:41:50 | FromDiscord | <noow> what is installed in there |
01:41:54 | FromDiscord | <ynfle> Just put choosenim before that in path |
01:41:56 | FromDiscord | <Tuatarian> Nim 1.4.4 |
01:42:01 | FromDiscord | <Tuatarian> that's not in path at all |
01:42:05 | FromDiscord | <Tuatarian> but somehow cmd still calls it |
01:42:20 | FromDiscord | <Tuatarian> ok now it works |
01:42:28 | FromDiscord | <Tuatarian> should I be using i386 or amd64? |
01:42:31 | FromDiscord | <ynfle> 👍 |
01:42:31 | FromDiscord | <noow> you need to close and reopen the cmd to get the updated PATH var |
01:42:42 | FromDiscord | <noow> amd64 if your windows is 64 bit |
01:42:44 | FromDiscord | <Tuatarian> I thought launching new guake windows from windows terminal counts |
01:42:45 | FromDiscord | <ynfle> In reply to @iWonderAboutTuatara "should I be using": Whatever you architechture is |
01:42:46 | FromDiscord | <Tuatarian> but apparently not |
01:42:56 | FromDiscord | <Tuatarian> I have intel 64 |
01:43:09 | FromDiscord | <noow> then amd64 |
01:43:37 | FromDiscord | <Tuatarian> how do I switch it? |
01:43:58 | FromDiscord | <noow> no idea how you set it |
01:44:12 | FromDiscord | <noow> did choosenim ask you? |
01:44:17 | FromDiscord | <Tuatarian> nope |
01:44:26 | FromDiscord | <ynfle> It should detech automatically |
01:44:31 | FromDiscord | <ynfle> (edit) "detech" => "detect" |
01:44:43 | FromDiscord | <Tuatarian> it seems to have botched something then |
01:44:48 | FromDiscord | <Tuatarian> my pc is definitely x64 |
01:45:01 | FromDiscord | <noow> your windows install could be 32 bit |
01:45:04 | FromDiscord | <Tuatarian> I have i5 7400 |
01:45:05 | FromDiscord | <Tuatarian> don't think so |
01:45:06 | FromDiscord | <Tuatarian> I |
01:45:13 | FromDiscord | <Tuatarian> I've run x64 executables and such before |
01:45:18 | FromDiscord | <noow> weird then |
01:45:20 | FromDiscord | <Tuatarian> https://media.discordapp.net/attachments/371759389889003532/940060631699177492/unknown.png |
01:45:26 | FromDiscord | <Tuatarian> from dxdiag |
01:45:53 | FromDiscord | <noow> sorry no idea where you can change it, i don't think we have a 32 bit option on linux |
01:46:21 | FromDiscord | <ynfle> How do you know nim insallation is 32? |
01:46:49 | FromDiscord | <Tuatarian> when I run nim -v |
01:46:55 | FromDiscord | <Tuatarian> Nim Compiler Version 1.6.2 [Windows: i386] |
01:47:12 | FromDiscord | <Tuatarian> apparently I need to put mingw64 somewhere annd add it to path |
01:48:13 | FromDiscord | <Tuatarian> where do I even download mingw 64? |
01:48:58 | FromDiscord | <Tuatarian> https://www.mingw-w64.org/downloads/ |
01:49:06 | FromDiscord | <Tuatarian> which one of these do I download? |
01:49:12 | FromDiscord | <noow> if it has to be in PATH, i'd guess anywhere as long as you add wherever it is to PATH |
01:49:33 | FromDiscord | <Tuatarian> lmao my question was even more basic |
01:49:43 | FromDiscord | <Tuatarian> like literally where do I download the files |
01:49:46 | FromDiscord | <Tuatarian> is it on choco? |
01:50:12 | FromDiscord | <noow> MingW-W64-builds i'd guess |
01:50:25 | FromDiscord | <huantian> <https://nim-lang.org/install_windows.html> |
01:50:29 | FromDiscord | <huantian> there are mingw64 installs here |
01:50:41 | FromDiscord | <noow> ah true ^ |
01:52:08 | FromDiscord | <Tuatarian> thanks |
01:52:20 | FromDiscord | <Arathanis> How could you make a decorator that just adds a proc to a sequence of procs? Like handler registration. |
01:53:25 | FromDiscord | <Elegantbeef> https://github.com/beef331/nettyrpc/blob/master/src/nettyrpc.nim#L229-L250 shows one way |
01:53:28 | FromDiscord | <Elegantbeef> Depending on what you're doing it can be very simple |
01:54:19 | FromDiscord | <Arathanis> you have a usage example for it? |
01:54:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OUj |
01:55:46 | FromDiscord | <Arathanis> ohhhh ok so its being used as a pragma, does that pass the body of the proc to the macro? |
01:55:56 | FromDiscord | <Arathanis> or the whole proc? |
01:56:09 | FromDiscord | <Elegantbeef> It passes the whole proc |
01:57:01 | FromDiscord | <Arathanis> let me chew on this for a while |
01:57:01 | FromDiscord | <Arathanis> thank you |
01:57:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/LuD |
01:57:37 | FromDiscord | <Elegantbeef> Whoops |
01:58:23 | FromDiscord | <Tuatarian> In reply to @huantian "<https://nim-lang.org/install_windows.html>": worked perfectly, thank you |
01:58:28 | FromDiscord | <Tuatarian> had to swap around a bit to reinstall 1.6.2 |
01:58:34 | FromDiscord | <Tuatarian> but after that I have the x64 version |
01:58:36 | FromDiscord | <Tuatarian> also hello beef! |
02:00:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OUl |
02:00:39 | FromDiscord | <Elegantbeef> There is a simple version of what my nettyrpc does |
02:00:51 | FromDiscord | <Elegantbeef> Hello tuatara |
02:03:46 | FromDiscord | <Elegantbeef> @Arathanis\: ^ if you left 😛 |
02:04:28 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3OUm |
02:04:35 | FromDiscord | <noow> and to compile time add them |
02:05:19 | FromDiscord | <noow> also, this means that anyone subscribing has to import the package where procTable and subscribe are defined right |
02:05:36 | FromDiscord | <Elegantbeef> Nop |
02:06:18 | FromDiscord | <Elegantbeef> `bindSym` means `procTable` can stay private |
02:20:20 | FromDiscord | <noow> cool |
02:25:24 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OUn |
02:26:55 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
02:27:12 | FromDiscord | <noow> ahh cool |
02:27:18 | NimEventer | New Nimble package! audius - Audius is a simple client library for interacting with the Audius free API., see https://github.com/ceebeel/audius |
02:27:35 | FromDiscord | <noow> CacheSeq is something new to me |
02:29:44 | * | jmdaemon joined #nim |
02:30:13 | FromDiscord | <Elegantbeef> `macrocache` is a cross module cache for nim code, so you can use it to cheat 😀 |
02:30:46 | FromDiscord | <Elegantbeef> you can subscribe from different modules then do `emitProcArr` and access procedures that are even hidden |
02:34:32 | * | rockcavera joined #nim |
02:34:32 | * | rockcavera quit (Changing host) |
02:34:32 | * | rockcavera joined #nim |
02:55:40 | * | arkurious quit (Quit: Leaving) |
02:55:59 | FromDiscord | <noow> woah nice |
02:56:22 | FromDiscord | <noow> sounds like a great power with great responsibility |
04:27:23 | * | rockcavera quit (Remote host closed the connection) |
06:39:44 | * | Gustavo6046 quit (Quit: Leaving) |
07:10:06 | * | neurocyte0917090 joined #nim |
07:18:17 | * | PMunch joined #nim |
08:09:24 | NimEventer | New thread by Kobi: Is there support for a network stream?, see https://forum.nim-lang.org/t/8878 |
08:36:35 | NimEventer | New post on r/nim by mavavilj: Nim has made me passionate about programming again., see https://reddit.com/r/nim/comments/smlecb/nim_has_made_me_passionate_about_programming_again/ |
10:04:44 | FromDiscord | <xx_ns> such a positive post |
10:04:54 | FromDiscord | <Hamid_Bluri> hey, how can i convert an `int` to `cuint` (uint32) ? |
10:05:29 | FromDiscord | <Elegantbeef> `cuint myInt` |
10:06:31 | FromDiscord | <Hamid_Bluri> thanks beef |
10:06:34 | FromDiscord | <Hamid_Bluri> you're my hero |
10:07:10 | FromDiscord | <Hamid_Bluri> did you get paid to be here and answer questions in community? |
10:07:16 | FromDiscord | <Hamid_Bluri> (edit) "did" => "do" |
10:07:50 | FromDiscord | <Elegantbeef> Nope |
10:09:38 | FromDiscord | <xx_ns> only in exposure |
10:09:54 | FromDiscord | <Elegantbeef> not that |
10:10:07 | FromDiscord | <Rika> thats lewd |
10:11:10 | FromDiscord | <Elegantbeef> thanks rika that's my go to joke about "exposure" |
10:12:00 | PMunch | @Hamid_Bluri, of course you can call that any way you like so `cuint(myInt)`, `cuint myInt`, or `myInt.cuint` |
10:12:24 | FromDiscord | <Elegantbeef> Pmunch you arent getting paid anymore than me, dont put in the extra effort 😛 |
10:13:57 | PMunch | I get paid in peers, the more people I can help getting started with Nim the more people I have to discuss Nim with in the future :P |
10:14:11 | FromDiscord | <Elegantbeef> Like i said same payment |
10:14:25 | FromDiscord | <xx_ns> that's what i said |
10:14:27 | FromDiscord | <xx_ns> exposure |
10:14:37 | FromDiscord | <xx_ns> ... exposure of Nim to other people |
10:14:41 | FromDiscord | <Elegantbeef> No my pants stay on |
10:14:46 | FromDiscord | <xx_ns> have it your way |
10:47:28 | FromDiscord | <konsumlamm> In reply to @hamidb80 "hey, how can i": note that a `cuint` may not always be 32 bits (it's only guaranteed to be at least 16 bits) |
10:48:27 | FromDiscord | <konsumlamm> (and an `int` may not always fit in a `uint32`, at least on 32 bit platforms) |
11:17:37 | FromDiscord | <Phil> In reply to @Elegantbeef "`cuint myInt`": these c integer types are always only one letter away from an insult |
11:17:41 | FromDiscord | <Phil> That thought keeps me up during work |
11:23:26 | FromDiscord | <Rika> good, its not a good idea to sleep at work |
11:23:30 | * | billypilgrim joined #nim |
11:24:46 | FromDiscord | <Phil> Every line of code I don't write is one that can't be buggy |
11:26:28 | billypilgrim | Howdy nimsters |
11:26:41 | FromDiscord | <Phil> Chers |
11:26:43 | FromDiscord | <Phil> (edit) "Chers" => "Cheers" |
11:27:34 | billypilgrim | I'm busy hacking something together which calls a nimscript using the compiler/nimeval package |
11:27:59 | billypilgrim | But the problem is that the methods which are supposed to be present in nimscripts (e.g. cd, exec etc.) don't seem to work |
11:28:22 | billypilgrim | Even if I manually add "import nimscript" to the script, calling e.g. exec seems to just be a no-op |
11:28:45 | billypilgrim | Am I right in thinking I'd have to pick the compiler apart to get these builtin functions in my interpreter? |
11:33:03 | FromDiscord | <zidsal> It's simple let's make a nft of the nim logo and pay helpers in nft. To the moon! |
11:41:20 | PMunch | @billypilgrim, not sure if it would solve your problem. But have you tried doing it with nimscripter? https://github.com/beef331/nimscripter |
11:42:47 | PMunch | @Phil, haha, we should have a template in Nim `template cunt*(x: varargs[untyped]): untyped = {.error: "What the fuck did you just call me?!".}` |
11:43:02 | PMunch | So if you ever spell it wrong the compiler will seem mad at you |
11:43:11 | FromDiscord | <Phil> I support this RFC |
11:43:14 | FromDiscord | <Phil> Somebody call ARAQ |
11:43:18 | FromDiscord | <Phil> (edit) "ARAQ" => "Araq" |
11:43:23 | NimEventer | New post on r/nim by mavavilj: Any idiomatic ways to do R-style seq in Nim?, see https://reddit.com/r/nim/comments/smo9e7/any_idiomatic_ways_to_do_rstyle_seq_in_nim/ |
11:44:45 | billypilgrim | @PMunch Thanks! That does look like it could be exactly what I'm looking for :-D |
11:52:25 | * | rockcavera joined #nim |
11:52:25 | * | rockcavera quit (Changing host) |
11:52:25 | * | rockcavera joined #nim |
11:55:57 | * | billypilgrim quit (Quit: Konversation terminated!) |
11:57:21 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://paste.rs/Q7i |
12:00:40 | FromDiscord | <Phil> Defined just means the flag is set I think, so you need the flag value, hmmmm |
12:02:31 | FromDiscord | <Phil> I'm reasonably certain that pmunch recalls how to get a flags value |
12:03:04 | FromDiscord | <xflywind> In reply to @hamidb80 "how can I check": use `compileOption("threads")` |
12:03:18 | FromDiscord | <xflywind> (edit) "`compileOption("threads")`" => "`echo compileOption("threads")`" |
12:04:45 | FromDiscord | <Hamid_Bluri> thanks |
12:05:13 | FromDiscord | <Phil> The docs: https://nim-lang.org/docs/system.html#compileOption,string,string |
12:06:16 | PMunch | @Phil, I didn't remember and @xflywind answered by the time I had looked it up :P |
12:07:00 | * | billypilgrim joined #nim |
12:07:49 | FromDiscord | <Phil> Impossible! |
12:08:02 | billypilgrim | @PMunch: Hmm... after upgrading my nim to v1.6.2 I now get this message when trying to use nimscripter: "Error: cannot open file: compiler/nimeval" |
12:08:13 | billypilgrim | Does choosenim not install the compiler stuff by default?! |
12:09:55 | PMunch | Hmm, it should |
12:11:17 | FromDiscord | <ynfle> In reply to @billypilgrim "Does choosenim not install": It doesn't install the compiler nimble package. Try `nimble install compiler` |
12:13:20 | billypilgrim | Ohhh that did the trick. Thanks! |
12:19:05 | billypilgrim | Heh I'm still running up against my original problem where cd and exec etc. don't actually do anything 🤷 |
12:25:10 | FromDiscord | <haolian9 (高浩亮)> is there an idomic way to tell whether a file is unix socket or not? like `pathlib.Path("path").is_socket()`;↵i am planning to use `posix_utils.stat` |
12:28:21 | PMunch | haolian9_(高浩亮), you do it the same way you would in C with Posix |
12:29:02 | PMunch | `var stat: Stat; discard fstat(myfile, stat); echo S_ISSOCK(stat.mode)` |
12:35:59 | FromDiscord | <haolian9 (高浩亮)> thanks, it's sad that i am not familiar with C↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
12:37:05 | PMunch | In general for the low-level Posix stuff you just do it with the low-level posix constructs. Knowing a little C helps, but it's not really required |
12:37:27 | FromDiscord | <Phil> I've only been exposed to C yesterday |
12:37:34 | FromDiscord | <Phil> The PTSD development has been steadily going since then |
12:40:23 | PMunch | Oh come on, it's not that bad |
12:41:30 | FromDiscord | <Phil> As far as I can tell, I can't safely distinguish between a pointer to a pointer to a single number and a pointer to a pointer of an array. Both go ptr ptr uint8 as far as I understood yesterday |
12:42:38 | FromDiscord | <Phil> Though why on earth I go ptr ptr has still not revealed itself to me |
12:43:57 | PMunch | Yes, in C an array is essentially just a pointer and the length is up to you to know. |
12:44:06 | PMunch | So `ptr int` and `int[]` is the same thing |
12:45:04 | PMunch | And `myIntArr[10]` is just shorthand for something like `cast[ptr int](cast[int](myIntArr.addr) + sizeof(int) * 10)[]` |
12:45:22 | PMunch | Of course you don't need that casting in C, because you can do arithmetic directly on pointers |
12:46:18 | PMunch | `ptr ptr` is generally used where we in Nim would use `var myObject` in a procedure call. You pass in the location of a pointer to something, and the procedure you call can then change the pointer you have for another one. |
12:48:47 | PMunch | So `int myInt; something(&myInt)` where `something(int* x)`, then `something` could change the integer behind the pointer and voila `myInt` has changed after your call. Since C returns everything by value by default this means you don't have to copy large object from the stack frame of `something` into the return field, and you don't have to `malloc` and `free` memory you got from a pointer. |
12:49:02 | PMunch | Not sure if that makes any sense :P |
12:56:44 | FromDiscord | <demotomohiro> `int` type also used to pass array of `int`. In that case, most of C functions have length parameter. |
12:57:11 | FromDiscord | <demotomohiro> And `int` can be used to pass array of pointer to int. |
12:57:43 | FromDiscord | <Rika> or the inverse |
12:57:48 | FromDiscord | <Rika> or could be double array |
12:57:56 | FromDiscord | <Rika> or could just be double pointer too |
12:58:04 | FromDiscord | <demotomohiro> So, you have to read refence or manual carefully to use C functions. |
12:58:38 | FromDiscord | <Rika> its not a great system but this is what you had to do when your computers had less ram than our current CPU has L3 cache |
12:58:53 | FromDiscord | <Rika> (im not sure if that exaggeration is true but i'd bet it is...) |
12:59:27 | FromDiscord | <Phil> With AMD L3 caches it is true for sure |
13:00:10 | FromDiscord | <Phil> They have triple digits L3 cache |
13:00:20 | FromDiscord | <Phil> (edit) "They have triple digits ... L3" added "MB" |
13:01:29 | FromDiscord | <Phil> They started out with RAM measured in KB |
13:02:16 | FromDiscord | <Phil> We have more L1 cache nowadays than the earliest computers had RAM total |
13:02:50 | PMunch | It's pretty crazy |
13:03:10 | PMunch | Also something which is fun about micro-controller programming. You have to basically fit your program into L1 cache |
13:03:29 | FromDiscord | <Phil> One of the things that was crazy for me to learn |
13:03:37 | FromDiscord | <Phil> And which I learned before I ever touched C or anything like it |
13:03:42 | FromDiscord | <Phil> It doesn't matter how shitty your algo is |
13:03:46 | FromDiscord | <Phil> If it fits in L1 cache it's fast |
13:04:09 | FromDiscord | <Phil> The sheer scale of difference that the effing cache makes is crazy |
13:04:29 | FromDiscord | <Phil> (edit) "It doesn't matter how shitty your algo is ... " added "(baring exponential complexity)" |
13:05:42 | FromDiscord | <demotomohiro> Modern CPU has large cache means modern memory is much slow compared to speed of CPU. |
13:08:02 | PMunch | https://i.stack.imgur.com/a7jWu.png |
13:08:19 | FromDiscord | <Rika> wow an L1 ref is half a ns?? |
13:08:28 | FromDiscord | <Rika> thats honestly fucking insane |
13:08:30 | PMunch | You get about 200 L1 cache lookups for a single main memory reference |
13:09:46 | PMunch | Those are numbers from 2010 by the way, not sure if they've gotten faster or slower since then |
13:15:34 | FromDiscord | <congusbongus> probably about the same, we got more cores and faster interconnects since then |
13:15:43 | FromDiscord | <Phil> There's a pretty decent talk about the difference of caching to algo speed |
13:15:51 | FromDiscord | <Phil> I'll have to see if I can find it again |
13:17:11 | FromDiscord | <ynfle> In reply to @Isofruit "I'll have to see": I'd be interested in that. thanks |
13:19:00 | FromDiscord | <Phil> In reply to @ynfle "I'd be interested in": You're in luck! https://www.youtube.com/watch?v=WDIkqP4JbkE |
13:19:07 | FromDiscord | <Phil> Scott Meyers was the presenter |
13:20:07 | FromDiscord | <ynfle> In reply to @Isofruit "You're in luck! https://www.youtube.com/watch?v=WDI": Thanks |
13:20:10 | FromDiscord | <Phil> It starts with talking about Multithreading |
13:20:21 | FromDiscord | <Phil> And why it is to be taken with care and can be useless |
13:20:43 | FromDiscord | <Phil> And moves on to why smart optimization for caching can be a more powerful tool to speed up your algo then multithreading |
13:21:43 | FromDiscord | <Phil> Starting from 19:00 there's a nice visual representation of cache speeds |
13:23:07 | FromDiscord | <Phil> Though it's reoccurring so eh |
13:30:26 | FromDiscord | <Phil> God damn 2014 is now almost 8 years ago |
13:37:58 | FromDiscord | <Rika> haha shh |
13:44:12 | FromDiscord | <Phil> You've got no reason to act like this, you're barely 20! |
13:44:22 | FromDiscord | <Phil> You were tiny when Lotr came out! |
13:44:42 | FromDiscord | <Phil> Aaaaaaaaand now I feel old |
13:44:56 | FromDiscord | <Phil> (edit) removed "you're barely 20!" |
13:45:01 | FromDiscord | <Phil> (edit) "this," => "this" |
14:06:22 | FromDiscord | <Professor Actual Factual> sent a long message, see http://ix.io/3OWf |
14:06:52 | FromDiscord | <Rika> i mean |
14:06:58 | FromDiscord | <Rika> what does a benchmark really signify? |
14:07:32 | FromDiscord | <Rika> the speed of code right? so you're testing the implementation mainly, not really everything else, thats just external factors |
14:07:40 | FromDiscord | <Rika> did someone actually post something to hn? |
14:08:51 | FromDiscord | <Professor Actual Factual> I agree with you rika.↵Benchmarks mean very little in this context, but its usually get posted on forums and people can get a bit fanboyish there which i dislike. Lol.↵Ya check hn front page |
14:09:00 | FromDiscord | <Rika> i dont want to |
14:09:07 | FromDiscord | <Rika> i just wanted to know if someone did |
14:10:12 | FromDiscord | <Rika> i cant tell you if either of these are equivalent, but for the most part they seem like they are? |
14:11:09 | FromDiscord | <Rika> well whatever, i dont want to care |
14:11:50 | FromDiscord | <Professor Actual Factual> Ya i could spend time pointing out the mistakes, but i think your approach might be best about not giving the post attention |
14:12:08 | FromDiscord | <Rika> if you want to bring out the big guns maybe ask mratsim to disassemble the whole argument 😛 |
14:12:13 | FromDiscord | <enthus1ast> can you share the hn post? |
14:12:53 | FromDiscord | <Rika> no |
14:12:58 | FromDiscord | <enthus1ast> kk |
14:12:59 | FromDiscord | <Rika> sharing it is not a good idea |
14:13:12 | FromDiscord | <Rika> hn has "safeguards" against those coming from a shared link |
14:13:49 | FromDiscord | <Professor Actual Factual> Its number 6 on front page rn. And as expected reading the comments people are confused about the results |
14:14:14 | FromDiscord | <enthus1ast> yeah the annual "my lang is faster than your's, since yours is just TRANSPILED" post |
14:14:54 | FromDiscord | <enthus1ast> i guess \:) |
14:15:54 | FromDiscord | <Rika> if you really want, just ask someone who knows both well |
14:16:02 | FromDiscord | <Rika> ive mentioned one person already |
14:16:46 | FromDiscord | <Rika> i really shouldnt have read this, i already have a lot on my plate so more stress is not ideal |
14:18:09 | FromDiscord | <Phil> For me it's a shame I'm not experienced enough yet to actually write "bollocks" and back it up with knowledge =/ |
14:18:33 | FromDiscord | <Rika> i dont know rust enough to deliberate the differences |
14:18:47 | FromDiscord | <Rika> nor to dispel the statements being made |
14:19:09 | FromDiscord | <Professor Actual Factual> Im experienced with performance optimization in nim, but i do not want to bother because i do not like multi lang benchmarks that take themselves too seriously |
14:19:11 | FromDiscord | <Rika> then again any statements being made on nim only i could prolly do, then again stress 🙂 |
14:19:30 | FromDiscord | <Rika> just upvote those that talk about "testing the code and not the language" |
14:19:38 | FromDiscord | <Rika> what does it mean to benchmark the language anyway? |
14:19:43 | FromDiscord | <Phil> But the entire ` Nim has runtime overhead whereas C and Rust do not. ` I'm not sure how far that is true, but even then I'd argue you can remove that overhead, you have the option |
14:19:49 | FromDiscord | <Rika> i could write horrible rust code and amazing nim code then bam easy |
14:20:16 | FromDiscord | <Rika> In reply to @Isofruit "But the entire `": runtime overhead like the GC |
14:20:24 | FromDiscord | <Rika> you can disable it of course |
14:20:28 | FromDiscord | <Phil> Yeah, afaik you can literally disable it |
14:20:31 | FromDiscord | <Rika> or turn ARC on, which is more in line with rust |
14:20:36 | FromDiscord | <Rika> so would be more """fair""" |
14:20:40 | FromDiscord | <Rika> whatever that would mean |
14:20:50 | FromDiscord | <Phil> At that point when you have a language that allows you literally anything |
14:20:54 | FromDiscord | <Phil> How fair is a comparison? |
14:21:01 | FromDiscord | <Rika> well yeah |
14:21:04 | FromDiscord | <Phil> I can go full C or not give a shit like in Python |
14:21:08 | FromDiscord | <Rika> how do you determine if something is fair or not |
14:21:18 | FromDiscord | <Rika> what are the rules of this game |
14:21:23 | FromDiscord | <Rika> they are ill defined |
14:21:26 | FromDiscord | <Rika> anyway |
14:21:50 | FromDiscord | <Phil> I agree, I was approaching it from the point that typically writing insanely complicated memory management code was either part of the language or not |
14:21:54 | FromDiscord | <enthus1ast> what runtime overhead btw? |
14:22:33 | FromDiscord | <Rika> gc |
14:22:37 | FromDiscord | <Phil> Nim is the only language I know (yeah, limited language knowledge on my head) that allows you to choose between both |
14:22:39 | FromDiscord | <Rika> thats technically overhead |
14:22:43 | FromDiscord | <enthus1ast> yea but with arc and orc? |
14:22:50 | FromDiscord | <Rika> i did mention that |
14:22:51 | FromDiscord | <enthus1ast> its the same as rust or? |
14:22:56 | FromDiscord | <Rika> not exactly for orc |
14:23:03 | FromDiscord | <Rika> not sure for arc but i think its close for arc |
14:23:09 | FromDiscord | <Rika> not exactly either but closer than orc |
14:23:15 | FromDiscord | <Rika> orc is more akin to rust with Rc() |
14:23:28 | FromDiscord | <Rika> i guess orc isnt needed for any of these cases though |
14:23:33 | FromDiscord | <Rika> guess -> assume |
14:23:39 | FromDiscord | <Rika> i didnt read into them too deeply |
14:23:44 | FromDiscord | <enthus1ast> yeah |
14:24:03 | FromDiscord | <Rika> again, what's fair game for this benchmark? |
14:24:07 | FromDiscord | <Rika> defaults? |
14:24:10 | FromDiscord | <Rika> code by beginners? |
14:24:15 | FromDiscord | <Rika> heavy optimisations? |
14:24:22 | FromDiscord | <Rika> as equal to each other as possible? |
14:24:32 | FromDiscord | <Rika> theyre all exclusive in one way from each other |
14:24:41 | FromDiscord | <Rika> and each combination is valid in some way as well |
14:24:48 | FromDiscord | <Rika> again, ill defined |
14:34:02 | FromDiscord | <Phil> This kinda reminds me of the time when I went on a masochistic googling spree on what SO thought about java speed |
14:34:23 | FromDiscord | <enthus1ast> slow EVERYONE knows this \:D |
14:34:56 | FromDiscord | <enthus1ast> (just kidding btw) |
14:34:58 | FromDiscord | <Rika> java is pretty w/e |
14:35:06 | FromDiscord | <Rika> the gc is still kinda fucked afaik |
14:35:18 | FromDiscord | <Rika> gotta swap it to some other kinda gc |
14:35:25 | FromDiscord | <Rika> otherwise i think its good |
14:35:35 | FromDiscord | <Rika> still, the caveats of it doesnt help |
14:37:30 | FromDiscord | <Phil> SO was pretty much "Java is super fast now, it's no longer bad" |
14:37:39 | FromDiscord | <Phil> Then you go to Stackexchange.softwaredesign |
14:38:04 | FromDiscord | <Phil> "Java has been time and time demonstrated to be fucked up in terms of performance and its GUI libraries are shite" |
14:39:55 | nrds | <enyc99> ACTION meows |
14:39:59 | FromDiscord | <Phil> It was pretty entertaining |
14:42:24 | FromDiscord | <Phil> What I do not comprehend is that java has so much money behind them |
14:42:32 | FromDiscord | <Phil> Where is the fundamental flaw that just makes their GC suck? |
14:43:17 | * | arkurious joined #nim |
14:54:18 | FromDiscord | <--HA--> Is it generally ok to use the `defer` statement? I've been reading about some possible issues with it. |
15:01:11 | * | PMunch quit (Quit: Leaving) |
15:15:21 | FromDiscord | <ynfle> In reply to @--HA-- "Is it generally ok": What are you using it for? |
15:16:38 | FromDiscord | <--HA--> Basically like in the example in the manual. Open a file, defer the close. |
15:17:56 | FromDiscord | <--HA--> But if it gets removed in the future I'd rather be using try/finally from the beginning I guess. |
15:19:22 | FromDiscord | <Goel> @Professor Actual Factual https://github.com/kostya/benchmarks |
15:22:46 | FromDiscord | <Goel> @Phil What about D's GC? I was tempted more then once to give it a try but reading their forum most of their complaints is about their old (80's) design of GC with bad performance and the main devs are not willing to change that, exactly the opposite of was is doing Nim (fortunatly). In my opinion of all the GC prog languages Nim is the most performant |
15:23:57 | FromDiscord | <Phil> In reply to @Goel "<@!180601887916163073> What about D's": Never researched anything about D whatsoever |
15:23:58 | FromDiscord | <Phil> Sorry |
15:24:31 | FromDiscord | <Phil> All I can tell you is that for some reason java manages to live up in performance in select singular cases |
15:24:50 | FromDiscord | <Phil> But then when it goes across the board suddenly performance drops back to mid levels as opposed to excellent |
15:27:12 | FromDiscord | <Waldecir Santos> Is it possible to define a type and set is values, I've tried this but no luck |
15:27:13 | FromDiscord | <Waldecir Santos> https://media.discordapp.net/attachments/371759389889003532/940267462585360394/unknown.png |
15:31:05 | FromDiscord | <Rika> defaults? no(t yet) |
15:33:31 | * | rockcavera quit (Ping timeout: 256 seconds) |
15:36:17 | FromDiscord | <Phil> Setting defaults on an object type you say |
15:36:27 | FromDiscord | <Phil> Allow me to introduce you to the holy package |
15:36:30 | FromDiscord | <Phil> The package to always include |
15:36:32 | FromDiscord | <Phil> Constructor |
15:37:17 | FromDiscord | <Phil> For I can not be bothered to write construction procs for 40 types with 10 fields each |
15:37:19 | FromDiscord | <Phil> https://github.com/beef331/constructor |
15:39:00 | FromDiscord | <Phil> Now with really dope flags so you can choose if you want to a) get the generated construction proc exported and b) get signature as new(t: typedesc[MyType]): as opposed to newMyType() |
15:39:54 | FromDiscord | <Waldecir Santos> haha nice |
15:40:43 | * | rockcavera joined #nim |
15:40:43 | * | rockcavera quit (Changing host) |
15:40:43 | * | rockcavera joined #nim |
15:41:08 | NimEventer | New thread by Didlybom: Hacker News discussion abou the recently discussed Rust vs Nim performance comparison, see https://forum.nim-lang.org/t/8879 |
15:46:06 | * | xaltsc joined #nim |
15:47:45 | * | tiorock joined #nim |
15:47:45 | * | tiorock quit (Changing host) |
15:47:45 | * | tiorock joined #nim |
15:47:45 | * | rockcavera is now known as Guest1221 |
15:47:45 | * | tiorock is now known as rockcavera |
15:51:05 | * | Guest1221 quit (Ping timeout: 256 seconds) |
16:02:59 | FromDiscord | <--HA--> Is it correct to create my own exception like this `type MyException = object of CatchableError`? |
16:16:05 | anddam | I installed nimgl package and opengl from https://github.com/nimgl/opengl , then tried tests/test.nim from https://github.com/nimgl/imgui and got "/home/anddam/Development/GUI/nimgl-imgui-git/src/imgui/impl_opengl.nim(11, 23) Error: cannot open file: nimgl/opengl" |
16:16:10 | anddam | what am I doing wrong? |
16:30:31 | FromDiscord | <Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3OXf |
16:39:38 | FromDiscord | <demotomohiro> @anddam Did you installed it with nimble? |
16:42:37 | * | rockcavera quit (Remote host closed the connection) |
16:43:58 | * | rockcavera joined #nim |
16:43:58 | * | rockcavera quit (Changing host) |
16:43:58 | * | rockcavera joined #nim |
17:13:27 | * | tiorock joined #nim |
17:13:27 | * | tiorock quit (Changing host) |
17:13:27 | * | tiorock joined #nim |
17:13:27 | * | rockcavera is now known as Guest1059 |
17:13:27 | * | Guest1059 quit (Killed (zinc.libera.chat (Nickname regained by services))) |
17:13:27 | * | tiorock is now known as rockcavera |
17:22:13 | * | PMunch joined #nim |
17:27:37 | * | tiorock joined #nim |
17:27:37 | * | tiorock quit (Changing host) |
17:27:37 | * | tiorock joined #nim |
17:27:37 | * | rockcavera is now known as Guest566 |
17:27:37 | * | Guest566 quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
17:27:37 | * | tiorock is now known as rockcavera |
17:46:48 | PMunch | My talk is now live: http://bofh.nikhef.nl/events/FOSDEM/2022/D.nim/nim_ngmicrocontrollers.webm |
17:54:44 | * | neurocyte0917090 quit (Read error: Connection reset by peer) |
17:55:49 | * | neurocyte0917090 joined #nim |
18:02:26 | anddam | demotomohiro: yes I did |
18:02:42 | anddam | demotomohiro: "it" being nimgl/opengl right? |
18:02:54 | anddam | too bad I cannot tab-complete nicks carried from discord |
18:04:18 | * | billypilgrim quit (Quit: Konversation terminated!) |
18:07:06 | PMunch | anddam, with a little bit of scripting magic you can ;) |
18:07:54 | PMunch | I have this in a script: http://ix.io/3OXI that I load into HexChat |
18:08:08 | PMunch | And it strips the FromDiscord names and uses those as the nick instead |
18:08:21 | PMunch | Which means I get the nice colours back, and that I can tab complete names :) |
18:08:23 | * | PMunch quit (Quit: leaving) |
18:08:51 | FromDiscord | <geekrelief> I'm using weave https://github.com/mratsim/weave while going through https://raytracing.github.io/books/RayTracingInOneWeekend.html Is there a way to avoid having to put the `gcsafe` pragma all over my procs? |
18:21:04 | FromDiscord | <Phil> Unrelated sidenote as this just occurred to me as something that could be a pretty common need |
18:21:29 | FromDiscord | <Phil> Is there a "get" proc or sth like it for the variant field of object variants? |
18:21:40 | FromDiscord | <Phil> If not, has anyone ever made a mini lib for that? |
18:22:57 | FromDiscord | <vindaar> what would that look like in general? your variant object may have multiple fields in a single branch. And how do you deal with the different types (i.e. the return type of that get procedure) in general? |
18:23:16 | FromDiscord | <Phil> Ohhh fair, you can do more than just a single field definition |
18:23:21 | FromDiscord | <Phil> I was only considering my own usecases |
18:23:36 | FromDiscord | <Phil> I typically only do object variants where every case of an enum defines a single field |
18:24:31 | FromDiscord | <Phil> Which means you could have a template (return "untyped") that generates a switch statement over all enum possibilities to return the field defined for that kind |
18:24:45 | FromDiscord | <Phil> But as I'm writing this I'm realizing this sounds like macro stuff |
18:24:49 | FromDiscord | <vindaar> fair enough for that. I've written that kind of thing get thing before, but it always comes with constraints. So not sure how well that generalizes to be useful |
18:25:36 | FromDiscord | <Phil> I mean, I'd save like 50 lines of code... over the course of my project that spans several thousands but still ! |
18:26:54 | FromDiscord | <Phil> ~~I wonder if beef wants to add constructors for object variants~~ |
18:27:09 | FromDiscord | <Phil> (edit) "variants~~" => "variants to his constructor package~~" |
18:27:33 | FromDiscord | <vindaar> if you go the template route you just end up with your code in multiple branches. You can't return anything from that branch without a type conversion. In addition (in general) you have the problem that you cannot even force a type conversion as `T(foo)` in general↵(@Phil) |
18:27:52 | FromDiscord | <geekrelief> In reply to @geekrelief "I'm using weave https://github.com/mratsim/weave": nvm, I must be accessing a global somewhere. Would macros affect the `gcsafe`ness of a proc? |
18:28:37 | FromDiscord | <Phil> Not in general, I've got tons of procs (I think) that have macros that are gcsafe. HOWEVER if the macro generates code that does an unsafe thing that'll naturally be unsafe |
18:28:49 | FromDiscord | <Phil> (edit) "that" => " andthat" |
18:28:53 | FromDiscord | <Phil> (edit) " andthat" => "and that" |
18:30:29 | FromDiscord | <geekrelief> right, I guess it'd be nice to have a better way to hunt down why the compiler thinks a proc is unsafe. |
18:30:41 | FromDiscord | <Phil> Actually, nevermind the "I think", I know that I have at least some macro usage that is in gcsafe procs |
18:30:51 | FromDiscord | <vindaar> this file is a good example of why it's hard to provide something really useful in general\:↵https://github.com/SciNim/Datamancer/blob/master/src/datamancer/column.nimVery few of these templates & procs that `case` could reasonably be confined into some generic "get" thing |
18:39:05 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3OXR |
18:41:01 | FromDiscord | <Tetralux> In reply to @Isofruit "I typically only do": Can you put the common stuff in the object type, rather that in case statement? |
18:41:42 | FromDiscord | <Phil> In reply to @Tetralux "Can you put the": I don't think I follow |
18:43:55 | FromDiscord | <Tetralux> sent a code paste, see https://play.nim-lang.org/#ix=3OXV |
18:44:08 | FromDiscord | <Tetralux> (edit) "https://play.nim-lang.org/#ix=3OXV" => "https://play.nim-lang.org/#ix=3OXW" |
18:45:11 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OXX |
18:54:07 | FromDiscord | <demotomohiro> @anddam I think "nimgl/opengl" refer to the module in https://github.com/nimgl/nimgl.↵So I think you need to install it with `nimble install nimgl`.↵It contains opengl, imgui and glfw module. |
18:58:13 | anddam | demotomohiro: I installed both, one time opengl first then nimgl, the other time vice-versa |
18:58:39 | anddam | I still do not understand the logic of having those "subpackages" not in nibmle as well, seems one could avoid collision (if any) with proper naming |
18:58:56 | anddam | or have package nimgl depends on other packages like imgui, opengl and glfw |
18:59:41 | anddam | oh PMunch left, I was going to do something like that as well |
18:59:51 | anddam | obviously not as structured and not in nim (yet) |
19:08:30 | FromDiscord | <demotomohiro> It seems NimGL provides OpenGL, Vulkan, imgui and glfw as one package for convinience. But each of them are maintained in separate repository. |
19:09:36 | anddam | yes, but those separate repository (whence I installed nimgl/imgui from) says they have to be installed using "nimble https://reponame" and this is the bit I do not understand |
19:09:38 | anddam | anyway |
19:09:54 | anddam | as long as I can make this work I am happy, I can grind the details of why things work later |
19:11:59 | FromDiscord | <Waldecir Santos> can someone share a good hands on tutorial about Macros ? I've checked some but still black magic to me and I'll need that for "simulating" how django declare models |
19:13:37 | anddam | I watched the "Nim nuggets" video, intereseting and all but I think I am missing the point of having (almost) all the language available at compile time |
19:14:06 | anddam | to me it seems just like moving execution to another context, and I miss the big advantage the speaker was trying to make |
19:14:06 | FromDiscord | <Waldecir Santos> This one https://www.youtube.com/watch?v=d2VRuZo2pdA&t=1301s ? |
19:14:25 | anddam | yep |
19:15:35 | NimEventer | New post on r/nim by obfuscate: Nim FOSDEM 2022 videos are up, see https://reddit.com/r/nim/comments/smy766/nim_fosdem_2022_videos_are_up/ |
19:15:47 | FromDiscord | <Waldecir Santos> Thank you I will check, any other resource ? |
19:15:50 | anddam | I figure that makes the macro system powerful, and it allows the C++ interop he was talking about since you have templates |
19:16:09 | anddam | Waldecir Santos: are you asking me? |
19:16:36 | anddam | you got it wrong, I am the one making questions, I am almost at the newbiest level here |
19:16:57 | FromDiscord | <Waldecir Santos> I'm asking anyone, really. |
19:18:36 | FromDiscord | <Waldecir Santos> For me I'd like to mimic `python descriptors` in nim, and seems like macros are the answer but I'm not sure. |
19:18:51 | FromDiscord | <demotomohiro> Did you read https://dev.to/beef331/demystification-of-macros-in-nim-13n8 |
19:18:58 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/tut3.html |
19:19:13 | FromDiscord | <Waldecir Santos> I did not, thank you looks awesome |
19:19:45 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/macros.html |
19:21:07 | FromDiscord | <Waldecir Santos> Yeah I checked that one, but like I said still seems like black magic, maybe the first link you share is what I need |
19:37:52 | * | arkurious quit (*.net *.split) |
19:37:52 | * | happycorsair[m] quit (*.net *.split) |
19:37:52 | * | xiamx quit (*.net *.split) |
19:37:52 | * | crem1 quit (*.net *.split) |
19:37:52 | * | GnuYawk quit (*.net *.split) |
19:38:27 | FromDiscord | <Tetralux> In reply to @Isofruit "Yeah you can do": Maybe I misunderstood, but you mentioned about object variants with common data? |
19:39:05 | FromDiscord | <Phil> No common data, more there could be a common need |
19:39:27 | FromDiscord | <Phil> As in, it feels like a thing that could be generally useful in a lot of areas for a lot of people |
19:40:18 | FromDiscord | <Phil> To just have an object variant (where every kind defines a single field) and be able to get a "get" proc generated for it that just goes through every possible kind and returns the appropriate defined field |
19:42:04 | Amun-Ra | the first fosdem video is offline |
19:42:25 | * | arkurious joined #nim |
19:42:25 | * | happycorsair[m] joined #nim |
19:42:25 | * | xiamx joined #nim |
19:42:25 | * | crem1 joined #nim |
19:42:25 | * | GnuYawk joined #nim |
19:43:00 | FromDiscord | <Phil> Nuuuuu |
19:43:05 | FromDiscord | <Phil> Why? |
19:46:13 | * | cheer[m] quit (Ping timeout: 250 seconds) |
19:46:14 | * | nixfreaknim[m] quit (Ping timeout: 240 seconds) |
19:46:42 | * | happycorsair[m] quit (Ping timeout: 260 seconds) |
19:46:43 | * | xiamx quit (Ping timeout: 260 seconds) |
20:17:45 | * | cheer[m] joined #nim |
20:23:42 | * | nixfreaknim[m] joined #nim |
20:42:44 | FromDiscord | <tandy> the vfio one?↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>) |
20:43:04 | FromDiscord | <tandy> isnt this missing a bunch of talks?↵(<@709044657232936960_=4eim=45venter=5b=49=52=43=5d>) |
20:46:20 | Amun-Ra | concurrency one |
20:46:45 | Amun-Ra | oh, it's online now |
20:47:40 | * | xiamx joined #nim |
21:17:50 | FromDiscord | <Evrensel Kişilik> Unity made me crazy |
21:18:00 | FromDiscord | <Evrensel Kişilik> im making the game from stratch with Godot |
21:18:08 | FromDiscord | <Evrensel Kişilik> Unity is broken and buggy |
21:18:21 | FromDiscord | <Evrensel Kişilik> Netcode doesn't support WebSocket |
21:18:42 | FromDiscord | <Evrensel Kişilik> community's WebSocket thing is not usable for WebGL exports |
21:18:58 | FromDiscord | <Evrensel Kişilik> Unity's HTML5 export support is broken |
21:19:19 | FromDiscord | <Evrensel Kişilik> Godot is 10000000000000000000000x better for everything |
21:29:40 | * | jjido joined #nim |
21:35:23 | * | nixfreaknim[m] quit (Write error: Connection reset by peer) |
21:35:24 | * | cheer[m] quit (Read error: Connection reset by peer) |
21:35:25 | * | xiamx quit (Read error: Connection reset by peer) |
21:38:39 | * | cheer[m] joined #nim |
22:09:11 | anddam | how many times better? |
22:09:18 | * | happycorsair[m] joined #nim |
22:09:18 | * | xiamx joined #nim |
22:09:18 | * | nixfreaknim[m] joined #nim |
22:10:59 | * | jmdaemon quit (Ping timeout: 256 seconds) |
22:22:34 | * | jmdaemon joined #nim |
22:46:48 | * | vicfred joined #nim |
22:53:42 | FromDiscord | <Yepoleb> About twice as good |
22:56:23 | anddam | Yepoleb: are you from Discord? |
22:56:52 | FromDiscord | <Yepoleb> I am using discord |
22:57:05 | anddam | good so the nick-renamer-plugin thingy works |
22:57:41 | anddam | https://i.ibb.co/VgrgHW2/2022-02-07-235713-465x103-scrot.png |
22:57:58 | anddam | back to the nimgl topic |
23:17:49 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
23:20:40 | FromDiscord | <Evrensel Kişilik> In reply to @anddam "how many times better?": sooooooooooooooooooooooooooooooooooooooooooooooooo many times |
23:21:10 | FromDiscord | <Evrensel Kişilik> i saw some games written in Nim with Godot |
23:21:22 | FromDiscord | <Evrensel Kişilik> does it worth for performance? |
23:22:07 | FromDiscord | <Elegantbeef> Well it's native code so it'd be better than gdscript for performance |
23:22:28 | FromDiscord | <Evrensel Kişilik> In reply to @Elegantbeef "Well it's native code": sooooooooooooooooooooooooooooooooooooo |
23:22:32 | FromDiscord | <Evrensel Kişilik> i know but |
23:22:41 | FromDiscord | <Evrensel Kişilik> GDScript is already very fast |
23:22:55 | FromDiscord | <Elegantbeef> Sure but gdscript doesnt have many features that nim has 😜 |
23:22:56 | FromDiscord | <Evrensel Kişilik> how is Nim debugging with Godot? |
23:23:11 | FromDiscord | <Elegantbeef> No clue |
23:23:28 | FromDiscord | <Evrensel Kişilik> im waiting for my new keyboard's shipment |
23:23:40 | FromDiscord | <Evrensel Kişilik> damn keyboard is still in China |
23:25:25 | FromDiscord | <Evrensel Kişilik> https://cdn.shopify.com/s/files/1/0012/4957/4961/files/61_Keys_Compact_Mechanical_Keyboard_wWhite_and_Pink_Color_Keycaps.jpg?v=1631087168 |
23:25:28 | FromDiscord | <Evrensel Kişilik> this |
23:35:28 | * | jmdaemon quit (Ping timeout: 250 seconds) |
23:39:40 | * | jmdaemon joined #nim |