00:00:08 | Mister_Magister | i don't need timezones |
00:00:11 | Mister_Magister | oh wait |
00:00:17 | Mister_Magister | @treeform TIS U |
00:00:20 | Mister_Magister | whoa |
00:00:22 | Mister_Magister | man himself |
00:02:38 | Mister_Magister | @treeform only issue i was having was no obvious conversion of Uri to your Uri and i couldn't just slap parseUrl(req.url.query) and had to instead do parseUrl("?" & req.url.query) tho if i used parseUrl($req.url) it would probably work in hindisight, and also i couldn't just check if query contains parameter and instead was doing query["param"] != "" |
00:26:02 | Mister_Magister | https://paste.opensuse.org/add00b12 what the hell |
00:26:36 | Mister_Magister | https://github.com/Michal-Szczepaniak/prometheus-proxy-nim/blob/master/proxy.nim heres sauce |
00:27:30 | Mister_Magister | types match, what are you talking about |
00:27:52 | Mister_Magister | var not let |
00:27:57 | Mister_Magister | jesus christ |
00:28:55 | * | NeoCron quit (Quit: Leaving) |
00:54:13 | FromDiscord | <Jakes1403> NimGL is making me lose my mind↵Anybody have recommendations for a simple, supported 2D graphics library?↵My only requirement is to be able to display a monochrome buffer |
00:54:45 | FromDiscord | <Jakes1403> (edit) "monochrome" => "1-bit color" |
00:55:19 | FromDiscord | <Jakes1403> or to just be able to draw rectangles |
00:56:16 | * | vicfred joined #nim |
00:57:31 | FromDiscord | <amadan> https://github.com/treeform/pixie would this be what you're looking for? |
00:57:34 | nrds | <R2D299> itHub: 7"Full-featured 2d graphics library for Nim." |
00:57:53 | Mister_Magister | treeform back at it again |
01:02:02 | FromDiscord | <ElegantBeef> In reply to @Jakes1403 "NimGL is making me": Nico, Drawim, Pixie are all pretty easy to use for drawing 2D |
01:02:21 | FromDiscord | <ElegantBeef> Matrix bridge really dieded 3 hours behind 😄 |
01:03:49 | FromDiscord | <ElegantBeef> Or if you want a loose underdeveloped abstraction over opengl my truss framework exists <https://github.com/beef331/truss3d/blob/master/examples/shapes.nim> |
01:30:28 | * | neurocyte01326 joined #nim |
01:31:47 | FromDiscord | <retkid> is lisp worth learnig? |
01:31:50 | FromDiscord | <retkid> (edit) "learnig?" => "learning?" |
01:31:53 | FromDiscord | <retkid> whats your takes on it? |
01:31:56 | FromDiscord | <retkid> do you like it? |
01:32:46 | * | neurocyte0132 quit (Ping timeout: 252 seconds) |
01:32:47 | * | neurocyte01326 is now known as neurocyte0132 |
01:50:57 | FromDiscord | <Professor Actual Factual> Hello all, ↵↵Does anyone know if threadpools send tasks to multiple processes or not? I am on a 4 core machine and the basic threadpool/spawn/sync code I wrote runs faster, but its printing the same PID. Whats up with that? |
01:51:14 | FromDiscord | <Professor Actual Factual> (edit) "processes" => "threads" |
01:51:41 | FromDiscord | <Professor Actual Factual> (edit) "PID." => "PID for each task." |
01:54:18 | FromDiscord | <Professor Actual Factual> Operating system is windows WSL2 if that helps |
01:57:33 | FromDiscord | <Professor Actual Factual> Nvm I found the answer, I was using `getPid` instead of `getThreadId` |
02:08:18 | FromDiscord | <Professor Actual Factual> Does anyone know if its possible to do multiprocessing in Nim akin to how the threadingpools implementation is made?↵↵Im trying to create a producer-consumer workflow where the producers create a stream of tasks that are distributed to a seperate process as opposed to a seperate thread |
02:34:42 | FromDiscord | <impbox [ftsf]> it's certainly possible, you'll just need to set up some form of interprocess communication like a FIFO pipe |
02:38:20 | FromDiscord | <Jakes1403> Is Nim considered a mature language to do production ready projects with? |
02:39:18 | FromDiscord | <Yardanico> yes |
02:41:43 | FromDiscord | <Rika> You can argue that rust isn’t mature enough |
02:42:03 | FromDiscord | <Rika> It depends on you |
02:45:57 | FromDiscord | <NullCode> i wonder if you can put an asset (eg. music file) and play it beside a nim exe |
02:46:16 | FromDiscord | <NullCode> or directly embedding the asset inside the exe |
02:47:07 | FromDiscord | <impbox [ftsf]> Yes, it's possible |
02:47:54 | FromDiscord | <impbox [ftsf]> Windows exes have "Resources" which go inside the exe file |
02:49:40 | * | pch_ is now known as kinkinkijkin |
02:49:49 | FromDiscord | <impbox [ftsf]> Is C mature enough for production? |
02:50:01 | FromDiscord | <NullCode> yeah obviously lmfao |
02:50:39 | FromDiscord | <impbox [ftsf]> Maturity and production readiness are not that related |
02:51:30 | FromDiscord | <exelotl> The less C in production the better 😅 |
03:02:13 | FromDiscord | <Jakes1403> My question was more along the lines of↵"will I run into any bugs that stop my from being able to have a production ready project" |
03:02:20 | FromDiscord | <Jakes1403> (edit) "my" => "me" |
03:03:19 | FromDiscord | <Rika> again depends on what youre using |
03:03:30 | FromDiscord | <Rika> you could argue that rust's slow compilation is a bug xdddd |
03:03:53 | FromDiscord | <Rika> also depends on how much effort youre willing to put in |
03:07:55 | FromDiscord | <impbox [ftsf]> There are bugs, not many are showstoppers |
03:07:56 | FromDiscord | <impbox [ftsf]> If any |
03:08:38 | FromDiscord | <impbox [ftsf]> Also depends what your requirements are for production readiness and if you just mean the language or all the libraries |
03:16:40 | FromDiscord | <Jakes1403> similar to what would happen when you hit "undefined behavior" in C++ |
03:17:20 | FromDiscord | <Jakes1403> will what I write do what I intended it to |
03:17:34 | FromDiscord | <Jakes1403> or will something weird happen' |
03:17:37 | FromDiscord | <Jakes1403> (edit) "happen'" => "happen" |
03:17:41 | FromDiscord | <Jakes1403> (edit) "will what I write do what I intended it to ... " added "every time" |
03:18:41 | FromDiscord | <Rika> many corners of nim has some sort of undefined behavior, but not because it was defined to be so (like it is in C++ sometimes) |
03:43:31 | * | arkurious quit (Quit: Leaving) |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:30 | * | supakeen joined #nim |
04:14:49 | * | mahlon_ joined #nim |
04:15:30 | * | Lord_Nightmare2 joined #nim |
04:16:34 | * | systemds1cks joined #nim |
04:16:36 | * | mst joined #nim |
04:16:52 | * | supakeen_ joined #nim |
04:17:28 | * | ozzz_ joined #nim |
04:19:07 | * | kayabaNerve_ joined #nim |
04:19:55 | * | neurocyte01322 joined #nim |
04:19:55 | * | neurocyte01322 quit (Changing host) |
04:19:55 | * | neurocyte01322 joined #nim |
04:20:20 | * | supakeen quit (*.net *.split) |
04:20:21 | * | mst_ quit (*.net *.split) |
04:20:21 | * | FromDiscord quit (*.net *.split) |
04:20:21 | * | ozzz quit (*.net *.split) |
04:20:21 | * | Lord_Nightmare quit (*.net *.split) |
04:20:21 | * | mahlon quit (*.net *.split) |
04:20:22 | * | systemdsucks quit (*.net *.split) |
04:20:22 | * | pch_ joined #nim |
04:20:28 | * | vicfred_ joined #nim |
04:20:46 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
04:21:17 | * | mahlon__ joined #nim |
04:22:03 | * | mahlon_ quit (Read error: Connection reset by peer) |
04:22:03 | * | kayabaNerve quit (Ping timeout: 252 seconds) |
04:22:03 | * | vicfred quit (Read error: Connection reset by peer) |
04:22:03 | * | neurocyte0132 quit (Read error: Connection reset by peer) |
04:22:03 | * | neurocyte01322 is now known as neurocyte0132 |
04:23:07 | * | kinkinkijkin quit (Ping timeout: 252 seconds) |
04:23:38 | * | FromDiscord joined #nim |
04:26:56 | * | Gustavo6046_ joined #nim |
04:28:24 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
04:29:13 | * | Lord_Nightmare quit (Ping timeout: 252 seconds) |
04:29:28 | * | Lord_Nightmare joined #nim |
04:29:41 | * | Gustavo6046_ is now known as Gustavo6046 |
04:29:46 | * | GreaseMonkey quit (Ping timeout: 252 seconds) |
04:30:23 | * | Freneticks quit (Ping timeout: 252 seconds) |
04:30:45 | * | greaser|q joined #nim |
04:33:34 | * | Freneticks joined #nim |
04:35:22 | * | pch__ joined #nim |
04:35:30 | * | vicfred__ joined #nim |
04:37:13 | * | pch_ quit (Read error: Connection reset by peer) |
04:37:13 | * | vicfred_ quit (Read error: Connection reset by peer) |
04:37:13 | * | FromDiscord quit (Read error: Connection reset by peer) |
04:37:55 | * | FromDiscord joined #nim |
04:47:22 | * | redj quit (Ping timeout: 252 seconds) |
04:47:42 | * | redj joined #nim |
04:49:01 | * | lain quit (Ping timeout: 252 seconds) |
04:49:54 | * | lain joined #nim |
05:13:28 | FromDiscord | <Jakes1403> sent a code paste, see https://play.nim-lang.org/#ix=3AE5 |
05:13:43 | FromDiscord | <Jakes1403> What would the equivalent be in Nim? |
05:13:43 | FromDiscord | <cabboose> An object |
05:14:42 | FromDiscord | <Jakes1403> Can you have functions inside of objects? |
05:15:06 | FromDiscord | <cabboose> What |
05:15:08 | FromDiscord | <Elegantbeef> Nim functions are free standing |
05:15:11 | FromDiscord | <cabboose> Yeah in the fields |
05:15:39 | FromDiscord | <cabboose> Oh you mean like objective orientated programming |
05:15:47 | FromDiscord | <Elegantbeef> You can store a function as a field in an object |
05:15:56 | FromDiscord | <Jakes1403> Okay thanks! I have been reading Nim doesn't do oo |
05:16:12 | FromDiscord | <cabboose> It does 😕 |
05:16:18 | FromDiscord | <cabboose> It’s just. Why would you |
05:16:20 | FromDiscord | <cabboose> Well |
05:16:21 | FromDiscord | <Elegantbeef> It does have OOP with single parent inheritance and overriding |
05:16:24 | FromDiscord | <cabboose> You “can” |
05:17:02 | FromDiscord | <impbox [ftsf]> it's even used within nim for exceptions! |
05:18:14 | FromDiscord | <Elegantbeef> The fun part is you can use the OOP mechanism to inherit fields and functions without any runtime dyanmism |
05:21:09 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3AE7 for example |
05:28:46 | NimEventer | New thread by Puruneko: Is there any default type of generic type [T], see https://forum.nim-lang.org/t/8474 |
05:52:20 | FromDiscord | <Dylan> Okay thanks |
06:26:07 | FromDiscord | <Dylan> sent a code paste, see https://play.nim-lang.org/#ix=3AEi |
06:27:05 | FromDiscord | <Dylan> I attempted to look at the nim github issues and found this funny message as an answer. |
06:27:11 | FromDiscord | <Dylan> image.png https://media.discordapp.net/attachments/371759389889003532/894108302085087332/image.png |
06:27:56 | FromDiscord | <Elegantbeef> Well you can use https://play.nim-lang.org/ for the code you're attempting to compile |
06:28:05 | * | mahlon__ is now known as mahlon |
06:28:13 | FromDiscord | <Dylan> It's bigger than one file |
06:29:59 | FromDiscord | <Elegantbeef> have a repo? |
06:30:17 | nrds | <Prestige99> What a gem |
06:30:35 | FromDiscord | <Dylan> > https://github.com/dylhack/matrix-nim-sdk/blob/core/src/matrix/core/client/js.nim↵Yeah. Currently this is the file being constructed out of all of this and causing the issues. |
06:31:07 | FromDiscord | <Dylan> Would it be best to move this to another room? I kinda have all the details laid out here\: [#matrix-nim-sdk\:newcircuit.io](https://matrix.to/#/#matrix-nim-sdk:newcircuit.io) |
06:31:17 | FromDiscord | <Elegantbeef> I'll hop over there |
06:31:27 | FromDiscord | <Elegantbeef> I mean it's not best but if you dont want to pollute 😀 |
06:31:46 | FromDiscord | <Dylan> yeah there's a lot of moving parts. |
07:30:05 | * | max22- joined #nim |
07:46:43 | FromDiscord | <Dylan> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/894109156049584148): > https://github.com/dylhack/matrix-nim-sdk/blob/core/src/matrix/core/client/js.nim↵Yeah. Currently this is the file causing the issue |
08:35:46 | * | supakeen_ is now known as supakeen |
08:55:18 | FromDiscord | <Archion> Hi |
08:55:25 | nrds | <Prestige99> heyllo |
08:55:43 | FromDiscord | <Archion> <Prestige> how are you |
08:55:52 | nrds | <Prestige99> Good, how are you? |
08:56:07 | FromDiscord | <Archion> Can be better |
08:57:16 | nrds | <Prestige99> code troubles? |
08:57:21 | FromDiscord | <Archion> No |
08:57:28 | FromDiscord | <Archion> Some user insulting me |
08:58:05 | nrds | <Prestige99> It's okay, their opinion probably doesn't matter :P just do your thing |
08:58:42 | FromDiscord | <Archion> They said i am a ||retard|| |
08:58:49 | FromDiscord | <Archion> :c |
09:06:47 | FromDiscord | <dom96> shitty word to use to insult someone |
09:10:13 | FromDiscord | <Elegantbeef> Implying insults are supposed to be nice? |
09:10:43 | FromDiscord | <dom96> no? |
09:10:50 | supakeen | https://twitter.com/supakeen/status/1444208750542401537 |
09:10:54 | supakeen | sorry mistell |
09:10:58 | FromDiscord | <Elegantbeef> Sorry i forgot 😛 |
09:27:45 | * | max22- quit (Remote host closed the connection) |
09:28:40 | * | max22- joined #nim |
09:41:50 | FromDiscord | <dom96> what'd you forget? |
09:42:17 | FromDiscord | <dom96> btw if anyone wants to give new choosenim a try before I properly release it: https://github.com/dom96/choosenim/releases/tag/v0.8.0 |
09:45:33 | FromDiscord | <xflywind> In reply to @dom96 "btw if anyone wants": It works perfectly! |
09:45:54 | FromDiscord | <dom96> yay, thanks for testing. Which platform did you test on? 🙂 |
09:46:01 | FromDiscord | <xflywind> windows |
09:46:05 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/894158350697254922/unknown.png |
09:46:58 | FromDiscord | <xflywind> It failed often because of anti-virus before |
09:47:47 | FromDiscord | <dom96> cool, can you test that it can build Nim too via `choosenim update devel --latest`? |
09:48:43 | FromDiscord | <xflywind> there is an issue which still exists |
09:48:45 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/894159026194112532/unknown.png |
09:49:06 | FromDiscord | <xflywind> Does this mean I need to clean cache somewhere? |
09:49:14 | NimEventer | New thread by FP: Nimx question, see https://forum.nim-lang.org/t/8475 |
09:50:44 | FromDiscord | <dom96> In reply to @flywind "Does this mean I": hm, can you try with `--debug` flag? |
09:52:59 | FromDiscord | <xflywind> In reply to @dom96 "hm, can you try": https://jpst.it/2DN3R |
09:55:25 | FromDiscord | <xflywind> In reply to @dom96 "cool, can you test": it doesn't work for me |
09:55:42 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/894160777303457822/unknown.png |
09:55:58 | FromDiscord | <dom96> hm, I should switch the analytics to use puppy I suppose |
09:56:00 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/894160850959618049/unknown.png |
09:57:11 | FromDiscord | <dom96> can you try running that `tar xf` command manually? |
10:01:51 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/894162321570693120/unknown.png |
10:03:35 | FromDiscord | <dom96> any ideas why that error might be happening for you? |
10:05:49 | FromDiscord | <xflywind> I have no idea |
10:09:02 | FromDiscord | <dom96> can you create the file it's trying to create manually? |
10:11:38 | FromDiscord | <xflywind> Well, if the path is `C:\\Users\\blue\\AppData\\Local\\Temp\\choosenim-extraction\\Nim-devel\\bin\\nim-gdb.bash`, I can create it. |
10:11:55 | FromDiscord | <xflywind> I'm not sure why there is \\\\?\ |
10:12:08 | FromDiscord | <xflywind> (edit) "I'm not sure why there is \\\\?\ ... " added "prefix" |
10:13:05 | FromDiscord | <dom96> hmm https://answers.microsoft.com/en-us/windows/forum/all/tar-on-windows-fails-to-extract-archive-containing/0ee9a7ea-9b1f-4fef-86a9-5d9dc35cea2f |
10:13:11 | FromDiscord | <dom96> implies this is a symlink |
10:14:17 | FromDiscord | <dom96> Oh cool, I can reproduce this |
10:18:42 | FromDiscord | <amadan> In reply to @dom96 "btw if anyone wants": Works perfect, was able to update to latest devel with no issues (tested on linux) |
10:18:49 | FromDiscord | <dom96> thanks! |
10:20:35 | FromDiscord | <dom96> so it doesn't seem I can ask tar to ignore symlinks |
10:46:50 | FromDiscord | <xflywind> In reply to @dom96 "so it doesn't seem": I find a workaround, it seems to work: https://gitlab.kitware.com/cmake/cmake/-/issues/19102#note_558431 |
10:48:19 | * | sagax joined #nim |
10:56:59 | FromDiscord | <xflywind> It now works |
10:57:03 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/894176208034598912/unknown.png |
10:58:10 | * | max22- quit (Ping timeout: 252 seconds) |
11:11:52 | * | xet7 quit (Remote host closed the connection) |
11:12:50 | * | xet7 joined #nim |
11:25:02 | FromDiscord | <dom96> cool, can you add it here? https://github.com/dom96/choosenim/wiki/Frequently-Asked-Questions 🙂 |
11:27:19 | FromDiscord | <xflywind> In reply to @dom96 "cool, can you add": yeah, and you need to allow users to edit wiki |
11:28:49 | FromDiscord | <dom96> done |
11:28:55 | FromDiscord | <dom96> surprised that's not allowed by default |
11:35:33 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=3AFC |
11:40:52 | FromDiscord | <cabboose> Integers don’t have leading 0’s though |
11:41:19 | FromDiscord | <cabboose> What’s the use case |
11:42:57 | FromDiscord | <impbox [ftsf]> If you just want the string just use the string, you could test it to make sure it's a valid number |
11:43:24 | FromDiscord | <impbox [ftsf]> ints won't have whatever formatting the string did |
11:49:58 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3AFT |
11:50:15 | FromDiscord | <haxscramper> (edit) "https://play.nim-lang.org/#ix=3AFT" => "https://play.nim-lang.org/#ix=3AFU" |
11:50:31 | FromDiscord | <haxscramper> Otherwise you need to store a number of leading zeros separately |
11:53:03 | FromDiscord | <Goel> Ok thanks i'll check it |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
13:06:39 | * | arkurious joined #nim |
13:07:23 | * | jjido joined #nim |
13:15:57 | * | max22- joined #nim |
13:30:59 | * | ozzz_ is now known as ozzz |
14:38:51 | FromDiscord | <NullCode> In reply to @flywind "": oh no what is that font |
14:39:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
14:44:49 | * | krux02 joined #nim |
14:45:15 | NimEventer | New post on r/nim by thelolrus: DAY 2 LIVE Nim Opossum Game programming - Ludum Dare 49, see https://reddit.com/r/nim/comments/q0j4pe/day_2_live_nim_opossum_game_programming_ludum/ |
14:58:05 | Mister_Magister | hmmm programming raspberry pi gpios us nim |
14:58:20 | Mister_Magister | doable? |
14:58:42 | FromDiscord | <dom96> of course |
14:58:52 | Mister_Magister | https://github.com/ThomasTJdev/nim_wiringPiNim |
14:58:54 | nrds | <R2D299> itHub: 7"Nim-lang wrapper for wiringPi for controlling a Raspberry Pi" |
14:58:56 | Mister_Magister | neat |
14:58:58 | Mister_Magister | imma try it |
14:59:20 | FromDiscord | <dom96> I'm programming an ESP32 using Nim, RPi is on a whole different level |
14:59:32 | Mister_Magister | oh esp32 you say? |
14:59:39 | Mister_Magister | i was talking about that with fren recently |
15:12:44 | FromDiscord | <dom96> so I think Nim might have some problems being statically linked with musl. I believe this was the source of these bugs: https://github.com/dom96/choosenim/issues/257 |
15:13:05 | FromDiscord | <dom96> or maybe it was statically linked openssl |
15:43:33 | FromDiscord | <tandy> oh nice, are you gonna make a library for that?↵(@dom96) |
15:43:50 | FromDiscord | <tandy> i wanted to write some firmware for the AirGradient with Nim maybe |
15:44:48 | FromDiscord | <dom96> maybe eventually, my focus is on the project so the code I'm writing is quite specific to it |
15:44:56 | FromDiscord | <dom96> there is actually an esp library in Nim by someone else though |
15:45:02 | FromDiscord | <dom96> but I'm not using it |
15:57:27 | FromDiscord | <zentoad> Good day nimdev peeps |
15:57:58 | FromDiscord | <zentoad> Is there a build system in nim like CMake? |
15:58:36 | krux02 | zentoad: CMake is horrible why do you want that? |
15:58:37 | FromDiscord | <zentoad> Or, more specifially, if I have a repo that needs to build C/C++ libraries and then run nim is that something available? |
15:58:43 | FromDiscord | <zentoad> exactly |
15:58:45 | FromDiscord | <zentoad> I don't XD\ |
15:59:09 | FromDiscord | <Rika> In reply to @krux02 "<@459174286104461312>: CMake is horrible": i can attest to that lmfao |
15:59:14 | krux02 | best thing is if you can use {.compile: "myfile.cpp".} for your dependencies |
15:59:28 | FromDiscord | <Rika> long time no see krux, unless ive been ootl? |
15:59:37 | FromDiscord | <zentoad> I'm loving nim but getting the other team members onboard means the git pull and build which I cannot figure out atm |
15:59:39 | krux02 | no I was actually not here |
15:59:50 | krux02 | I am not often here anymore |
15:59:58 | FromDiscord | <Rika> well that is unfortunate |
16:00:08 | FromDiscord | <zentoad> In reply to @krux02 "best thing is if": does that go in a nim-script file |
16:00:40 | FromDiscord | <dom96> you just put it in the module where you wrap the C/++ code |
16:00:40 | krux02 | zentoad: no just in a normal Nim source file |
16:00:57 | FromDiscord | <tandy> oh neat↵(@dom96) |
16:01:05 | FromDiscord | <zentoad> Ahh, ok. |
16:01:28 | FromDiscord | <zentoad> I figures because it's a crazy windows lib/dll will tons of dependencies this would be tricky |
16:01:37 | FromDiscord | <zentoad> figured |
16:02:06 | FromDiscord | <dom96> might be easier to just load that dll in Nim then |
16:02:35 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/ffQ |
16:02:39 | FromDiscord | <haxscramper> if you want to build nim app using cmake and supply things |
16:02:46 | FromDiscord | <zentoad> Although I hate CMake, so devs have Linux and some PC so it's always complicated |
16:03:00 | FromDiscord | <haxscramper> I did this |
16:03:02 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3AHR |
16:03:32 | FromDiscord | <zentoad> Ahh that's great |
16:03:38 | FromDiscord | <haxscramper> https://github.com/haxscramper/hcparse/blob/master/src/hcparse/boost_wave/CMakeLists.txt#L44-L55 |
16:03:48 | FromDiscord | <haxscramper> I had this for some time, right now I build nim externally |
16:04:10 | * | Zevv_ is now known as Zevv |
16:04:24 | FromDiscord | <haxscramper> in theory there is a better solution using cmake dependencies, and `add_custom_command`, but I wasnt able to figure it out correctly |
16:04:42 | FromDiscord | <haxscramper> nim generating C files is actually a huge problem, cmake has to know all it's inputs at the same time |
16:04:44 | FromDiscord | <haxscramper> there is a |
16:05:29 | FromDiscord | <Recruit_main707> nimble allows to compile c/c++ files afaik |
16:05:31 | krux02 | cmake also has globbing |
16:06:06 | krux02 | not sure how cmake works with generated source files |
16:06:08 | FromDiscord | <haxscramper> https://stackoverflow.com/questions/37703514/dynamically-generated-source-file-list-for-cmake |
16:06:10 | FromDiscord | <haxscramper> this |
16:06:14 | krux02 | that is a thing in the C/C++ world as well |
16:06:15 | FromDiscord | <haxscramper> haha funnyu↵(@Recruit_main707) |
16:06:32 | FromDiscord | <haxscramper> it has to glob files that exist at configuration time |
16:06:42 | FromDiscord | <haxscramper> and nim generates file as a part of build process |
16:07:10 | FromDiscord | <zentoad> In reply to @haxscramper "haha funnyu (<@386230567571554305>)": This was my original problem, I downloaded nimgl but it didn't actually compile on windows. And I ended up down a rabbit hole |
16:07:38 | krux02 | haxscramper, build once, glob, build again |
16:07:52 | krux02 | the generates files don't magically disappear |
16:08:13 | FromDiscord | <haxscramper> this would require multistaged cmake etc. |
16:08:20 | krux02 | yes |
16:08:26 | FromDiscord | <haxscramper> I wasn't that interested |
16:08:32 | krux02 | as I said, I CMake is horrible |
16:08:43 | FromDiscord | <zentoad> In reply to @krux02 "as I said, I": exaclty |
16:08:54 | FromDiscord | <zentoad> I usually have a hand written .bat file |
16:08:54 | FromDiscord | <haxscramper> `add_custom_target` works fine in theory, you just have to delegate build to nim fully |
16:09:01 | FromDiscord | <haxscramper> which might be the right solution |
16:09:09 | FromDiscord | <zentoad> but for supporting different OS this isn't sustainable |
16:09:10 | FromDiscord | <haxscramper> since teaching cmake about nim is even worse |
16:10:29 | * | greyrat quit (Quit: Bye) |
16:11:48 | FromDiscord | <NullCode> In reply to @zentoad "I usually have a": same |
16:11:57 | FromDiscord | <NullCode> working well for my shitty experiments rn |
16:12:05 | FromDiscord | <NullCode> but i believe ill suffer soon™️ |
16:12:25 | FromDiscord | <dom96> why write .bat when you can write nimscript? 🙂 |
16:12:55 | FromDiscord | <NullCode> because i still havent learnt about it (yet) :) |
16:12:55 | * | greyrat joined #nim |
16:13:39 | FromDiscord | <dom96> here is a great example https://github.com/nim-lang/nimforum/blob/master/nimforum.nimble#L28-L64 |
16:14:46 | FromDiscord | <NullCode> wait what |
16:14:50 | FromDiscord | <NullCode> thats really cool |
16:15:08 | FromDiscord | <NullCode> i can discard my .bat file then |
16:25:41 | FromDiscord | <zentoad> That’s what I was looking for |
16:39:27 | FromDiscord | <dom96> Choosenim 0.8.0 is here https://forum.nim-lang.org/t/8476 🙂 |
16:39:58 | NimEventer | New thread by Dom96: Choosenim 0.8.0 now available, see https://forum.nim-lang.org/t/8476 |
16:41:52 | NimEventer | New post on r/nim by dom96: Choosenim 0.8.0 is now available, see https://reddit.com/r/nim/comments/q0lgcq/choosenim_080_is_now_available/ |
16:47:31 | FromDiscord | <Schelz> "noob here", how do I run a nim file ? |
16:47:47 | FromDiscord | <dom96> `nim c -r file.nim` |
16:47:53 | FromDiscord | <Schelz> thx |
16:48:31 | FromDiscord | <enthus1ast> this however compiles the nim file to an executable, and then runs this executable |
16:49:10 | FromDiscord | <enthus1ast> the nim compiler does not "run" the nim file like the python interpreter would do (in this case) |
16:50:20 | FromDiscord | <dom96> true |
17:18:56 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3AIf |
17:19:08 | FromDiscord | <tandy> @dom96 i just did `choosenim update self` and updated devel and now iget this? |
17:20:46 | FromDiscord | <tandy> im going to make an isse |
17:24:39 | FromDiscord | <tandy> https://github.com/dom96/choosenim/issues/272 |
17:27:48 | FromDiscord | <tandy> I managed to fix the error by running sudo chmod +x \~/.choosenim/toolchains/nim-#devel/bin/nim. |
17:44:27 | FromDiscord | <dom96> thanks for reporting |
17:44:35 | FromDiscord | <dom96> choosenim has some logic that sets +x |
17:44:44 | FromDiscord | <dom96> I guess it didn't run in that instance |
17:49:19 | * | pro joined #nim |
17:49:22 | * | beshr joined #nim |
17:57:16 | * | neurocyte0132 quit (Read error: Connection reset by peer) |
17:57:45 | * | neurocyte0132 joined #nim |
17:57:45 | * | neurocyte0132 quit (Changing host) |
17:57:45 | * | neurocyte0132 joined #nim |
18:00:17 | * | jjido joined #nim |
18:00:53 | * | neurocyte01328 joined #nim |
18:00:53 | * | neurocyte01328 quit (Changing host) |
18:00:53 | * | neurocyte01328 joined #nim |
18:03:14 | * | neurocyte0132 quit (Ping timeout: 245 seconds) |
18:03:14 | * | neurocyte01328 is now known as neurocyte0132 |
18:13:40 | * | neurocyte0132 quit (Ping timeout: 252 seconds) |
18:15:45 | * | neurocyte01328 joined #nim |
18:15:45 | * | neurocyte01328 quit (Changing host) |
18:15:45 | * | neurocyte01328 joined #nim |
18:24:15 | * | vicfred__ quit (Quit: Leaving) |
18:24:40 | * | neurocyte013288 joined #nim |
18:24:40 | * | neurocyte013288 quit (Changing host) |
18:24:40 | * | neurocyte013288 joined #nim |
18:26:49 | * | neurocyte01328 quit (Ping timeout: 252 seconds) |
18:26:49 | * | neurocyte013288 is now known as neurocyte01328 |
18:31:29 | * | max22- quit (Ping timeout: 250 seconds) |
18:31:36 | * | neurocyte01328 quit (Quit: The Lounge - https://thelounge.chat) |
18:35:17 | * | neurocyte013288 joined #nim |
18:35:17 | * | neurocyte013288 quit (Changing host) |
18:35:17 | * | neurocyte013288 joined #nim |
18:51:06 | * | max22- joined #nim |
19:05:16 | FromDiscord | <retkid> so i have a json file thats enclosed in an array |
19:05:25 | FromDiscord | <retkid> how do i get into that array level |
19:05:27 | FromDiscord | <retkid> ie |
19:06:07 | FromDiscord | <retkid> "{hits : hits{["field" : 32, "field2" : 11]}}" |
19:06:28 | FromDiscord | <retkid> dont blame me this is just he way its delivered to me |
19:07:30 | FromDiscord | <retkid> you cant do "json["hits"]["hits"]{"field"} |
19:07:33 | FromDiscord | <retkid> (edit) ""json["hits"]["hits"]{"field"}" => ""json["hits"]["hits"]{"field"}"" |
19:10:02 | FromDiscord | <zidsal> Can you send us the actual json string as that's not valid json! |
19:11:22 | FromDiscord | <Yardanico> @retkid as zidsal said, this is not valid JSON |
19:11:31 | FromDiscord | <Yardanico> in JSON all keys are quoted |
19:11:33 | FromDiscord | <retkid> grabbing some valid jason |
19:11:39 | FromDiscord | <zidsal> Thanks ret |
19:13:22 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3AKj |
19:13:50 | FromDiscord | <retkid> (edit) "https://play.nim-lang.org/#ix=3AKj" => "https://play.nim-lang.org/#ix=3AKk" |
19:14:09 | FromDiscord | <Yardanico> `data["hits"]["hits"]` |
19:14:10 | FromDiscord | <Yardanico> will be your array |
19:14:14 | FromDiscord | <retkid> yea |
19:14:22 | FromDiscord | <Yardanico> so what's the issue? |
19:14:28 | FromDiscord | <retkid> but if i try to go to "total" it returns an assertion issue |
19:14:36 | FromDiscord | <Yardanico> because you should do data["hits"] |
19:14:38 | FromDiscord | <Yardanico> (edit) "because you should do data["hits"] ... " added "for total" |
19:14:56 | FromDiscord | <Yardanico> the JSON you sent is↵↵hits -> (total, max_score, hits -> [array of hits]) |
19:14:59 | FromDiscord | <zidsal> Just to check are you using the inbuilt Json library or the other one that people use ( can't remember the name!) |
19:15:04 | FromDiscord | <Yardanico> no |
19:15:08 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3AKl |
19:15:09 | FromDiscord | <Yardanico> check the JSON you have again |
19:15:12 | FromDiscord | <Yardanico> "total" is inside the first "hits" |
19:15:20 | FromDiscord | <Yardanico> so you just do jsonObject["hits"]["total"] |
19:15:26 | FromDiscord | <Yardanico> .getInt() |
19:15:30 | FromDiscord | <retkid> it is |
19:15:41 | FromDiscord | <retkid> oh wait sorry, im looking for _score |
19:15:43 | FromDiscord | <retkid> i meant to say |
19:16:01 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix= |
19:16:03 | FromDiscord | <Yardanico> well to get the score of a _first_ hit you need jsonObj["hits"]["hits"][0]["_score"] |
19:16:10 | FromDiscord | <retkid> AHHH |
19:16:11 | FromDiscord | <retkid> ok |
19:16:14 | FromDiscord | <Yardanico> it's an array |
19:16:17 | FromDiscord | <Yardanico> you need to index into it |
19:16:28 | FromDiscord | <retkid> yea it returns an iterable array |
19:16:32 | FromDiscord | <retkid> cool |
19:16:49 | FromDiscord | <retkid> thank you <3 |
19:17:29 | FromDiscord | <retkid> i thought it would return just a mush of strings and i would need a function to turn it into an array |
19:17:43 | FromDiscord | <Yardanico> it parses the _whole_ JSON object |
19:17:46 | FromDiscord | <Yardanico> not just some part of it |
19:18:12 | FromDiscord | <Yardanico> after you do parseJson you don't have the original json string data at all, you have a tree of `JsonNode`s |
19:18:54 | FromDiscord | <retkid> that is very useful to keep in mind |
19:18:57 | FromDiscord | <retkid> thank |
19:18:58 | FromDiscord | <retkid> (edit) "thank" => "thanks" |
19:22:06 | FromDiscord | <retkid> of all the trials and tribulations this is the thing i needed help with |
19:22:07 | FromDiscord | <retkid> lol |
19:22:21 | FromDiscord | <retkid> (edit) "of all the trials and tribulations ... this" added "I've been threw this week," |
19:33:15 | * | pro quit (Quit: WeeChat 3.3) |
19:36:06 | * | rockcavera joined #nim |
19:36:06 | * | rockcavera quit (Changing host) |
19:36:06 | * | rockcavera joined #nim |
19:37:53 | * | Guest5452 joined #nim |
19:40:52 | * | Guest5452 quit (Client Quit) |
19:57:49 | * | rockcavera quit (Ping timeout: 245 seconds) |
20:11:57 | * | krux02 quit (Quit: Leaving) |
20:13:05 | * | krux02 joined #nim |
20:16:53 | * | kayabaNerve_ quit (Ping timeout: 264 seconds) |
20:23:14 | * | kayabaNerve joined #nim |
20:32:30 | FromDiscord | <el__maco> hello, I started flailing with nim today and I'm afraid I might have some very noobish questions if you don't mind. My first confusion is about passing arrays efficiently to a procedure by reference |
20:33:34 | FromDiscord | <el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3AKH |
20:34:32 | FromDiscord | <el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3AKI |
20:35:05 | FromDiscord | <el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3AKJ |
20:35:29 | FromDiscord | <el__maco> what would be the sane way to achieve this? I'm concerned about the "var" keyword there, I suspect I might be doing a deep copy here |
20:35:59 | FromDiscord | <el__maco> also I would like to get rid of that uint8 cast somehow, and replace it with the actual type from the template |
20:37:06 | FromDiscord | <dom96> 'var' won't make a deep copy |
20:37:15 | FromDiscord | <dom96> but you can check the generated C sources if you'd like to make sure |
20:42:10 | * | neurocyte013288 quit (Ping timeout: 252 seconds) |
20:44:45 | FromDiscord | <el__maco> is there an easy way to do that? |
20:45:15 | FromDiscord | <auxym> compile with `--nimcache:nimcache`, the generated C sources will be in ./nimcache |
20:46:05 | FromDiscord | <el__maco> I see |
20:50:27 | FromDiscord | <Yardanico> @elmaco but yeah, in your case it would never generate a deep copy since you're using `var` |
20:50:48 | FromDiscord | <Yardanico> `var Type` in argument list means that you want to pass the argument by reference so you can modify the original one |
20:51:07 | FromDiscord | <Yardanico> and about uint8 thing - first of all, in Nim that's a type-safe conversion and not a cast, and what do you mean "from the template"? |
20:51:18 | FromDiscord | <Yardanico> you want it to automatically convert to whatever type Canvas has? |
20:51:27 | FromDiscord | <el__maco> yes |
20:54:37 | FromDiscord | <auxym> Then you'll probably want to make `Noise` generic with a similar def as your `Canvas` |
20:55:08 | FromDiscord | <Yardanico> Noise is already generic |
20:55:12 | FromDiscord | <Yardanico> it's an implicit generic |
20:55:47 | FromDiscord | <auxym> But if you need to extract the `T` integer type, wouldn't you need to make it explicitly generic? |
20:56:02 | FromDiscord | <Yardanico> not neccesarily |
20:56:03 | FromDiscord | <Yardanico> watch this |
20:56:23 | FromDiscord | <Yardanico> :D |
20:56:26 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3AKP |
20:56:30 | FromDiscord | <Yardanico> yes, that is a documented feature |
20:56:49 | FromDiscord | <auxym> neat, did not know this trick! |
20:57:32 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/894327329935990854/unknown.png |
20:57:37 | FromDiscord | <Yardanico> in https://nim-lang.org/docs/manual.html#generics-implicit-generics |
20:58:29 | FromDiscord | <Yardanico> fwiw, it works with `Canvas.T` too (as in that example above): |
20:58:30 | FromDiscord | <el__maco> that seems to work 👍 |
20:58:35 | FromDiscord | <auxym> Btw, proc params are never copied, whether they are `var` or not, right? Unless there's an assignment or something like that in the proc body, obviously |
20:58:41 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3AKQ |
20:59:05 | FromDiscord | <el__maco> I'm looking at the C code for the Noise procedure, and I have to say it looks kinda scary |
20:59:11 | FromDiscord | <Yardanico> it's totally fine |
20:59:19 | FromDiscord | <Yardanico> also, the debug C code has a lot of cruft |
20:59:24 | FromDiscord | <Yardanico> try with -d:danger --gc:arc --panics:on |
20:59:32 | FromDiscord | <Yardanico> @auxym nim optimizes big projects to pass them by-reference but they will still act as value types |
20:59:38 | FromDiscord | <el__maco> there's lots of memsets and memcmp's in there |
20:59:41 | FromDiscord | <Yardanico> but generally value types are passed by value, so they are copied (if they're under 24 bytes) |
20:59:59 | FromDiscord | <auxym> In reply to @Yardanico "<@!882793909246369864> nim optimizes big": Yes that was my impression. |
20:59:59 | FromDiscord | <el__maco> (edit) "memcmp's" => "memcpy's" |
21:00:09 | FromDiscord | <Yardanico> if you pass an int to a proc, it'll get copied |
21:00:13 | FromDiscord | <auxym> I see! |
21:00:13 | * | Gustavo6046 quit (Quit: In exile.) |
21:00:34 | FromDiscord | <Yardanico> @elmaco well, it's better to measure performance by running the resulting binary, not by checking the C code :) |
21:00:41 | FromDiscord | <auxym> so generally nim "does the right thing" |
21:00:52 | * | krux02 quit (Ping timeout: 252 seconds) |
21:01:16 | FromDiscord | <Yardanico> @elmaco if you're on latest nim, it's generally better to use --gc:orc (that's the future default Nim GC) |
21:01:36 | FromDiscord | <Yardanico> --gc:arc is just refcounting with move semantics and stuff like destructors, ORC is arc + cycle collector |
21:02:19 | FromDiscord | <Yardanico> so generally you can just use --gc:orc if you don't know if your program has cycles or not, ORC has a very low overhead over ARC when you don't have cycle types at all |
21:03:19 | FromDiscord | <el__maco> I intend to run some kind of benchmark against my c++ codes, but only when I have at least a rudimentary idea of what I'm doing. So far I quite like the language, especially the clean syntax is nice and ``{.experimental: "codeReordering".}`` is something I've wanted for a long time |
21:03:51 | FromDiscord | <Yardanico> well, if we get lazy semchecking, then codeReordering will be history |
21:04:05 | FromDiscord | <Yardanico> and of course codeReordering doesn't help when you have mutually recursive procedures |
21:04:27 | FromDiscord | <el__maco> what does lazy semchecking mean. I hope you don |
21:04:46 | FromDiscord | <el__maco> (edit) "don" => "don't have to forward declare everything" |
21:05:06 | FromDiscord | <Yardanico> https://github.com/nim-lang/RFCs/issues/416 |
21:05:41 | FromDiscord | <auxym> Yeah, lazy semcheck would be we could lose forward declares, and get circular imports |
21:06:04 | FromDiscord | <el__maco> that's good then |
21:20:07 | * | krux02 joined #nim |
21:35:16 | * | Gustavo6046 joined #nim |
21:48:22 | * | xet7 quit (Remote host closed the connection) |
21:49:22 | * | xet7 joined #nim |
21:54:52 | * | Gustavo6046 quit (Remote host closed the connection) |
21:55:05 | * | Gustavo6046 joined #nim |
22:08:34 | * | Guest36 joined #nim |
22:09:14 | Guest36 | Is nim-Lang.org down for anyone? It’s not loading for me in California |
22:09:46 | FromDiscord | <dom96> works here |
22:09:55 | Guest36 | forum.nim-Lang.org works though |
22:09:55 | FromDiscord | <dom96> (not in CA though) |
22:11:27 | FromDiscord | <Yardanico> @Guest36 what's the error you're getting? |
22:11:36 | FromDiscord | <Yardanico> if it's just not loading, then it's something to do with cloudflare in your region |
22:11:47 | FromDiscord | <Yardanico> because it the nim-lang backend was failing, cloudflare would show an error page |
22:12:23 | Guest36 | Not sure, I’m on an iPhone. It just hangs forever when loading |
22:12:37 | * | Guest36 quit (Client Quit) |
22:13:17 | * | Guest36 joined #nim |
22:13:38 | Guest36 | Never mind actually, just closed all of my Safari tabs and restarted Safari, and now it loads |
22:13:40 | Guest36 | weird |
22:31:23 | * | Guest36 quit (Quit: Client closed) |
22:52:57 | * | algae joined #nim |
22:53:20 | * | xet7 quit (Remote host closed the connection) |
22:54:21 | * | xet7 joined #nim |
23:12:25 | * | max22- quit (Remote host closed the connection) |
23:30:43 | FromDiscord | <retkid> are there any packages with algorithms such as like Tversky index |
23:31:27 | FromDiscord | <retkid> i wanna try string indexs without programming each one |
23:31:38 | FromDiscord | <retkid> i suppose Harmmon would be good enought ho |
23:31:53 | FromDiscord | <retkid> (edit) "Harmmon" => "Harmming" |
23:32:01 | FromDiscord | <retkid> (edit) "Harmming" => "Ha\mming" |
23:32:05 | FromDiscord | <retkid> (edit) "Ha\mming" => "Hamming" |
23:32:11 | FromDiscord | <el__maco> by the way, I downloaded the latest? 64 bit version (1.4.8) for windows, extracted the files and one of the exes were immediately caught and quarantined by Windows Defender for being a virus. Probably known thing at this point, but I thought I'd mention anyways 🤷♂️ |
23:35:21 | * | rockcavera joined #nim |
23:35:21 | * | rockcavera quit (Changing host) |
23:35:21 | * | rockcavera joined #nim |
23:50:40 | * | algae quit (Quit: WeeChat 3.3) |