00:18:18 | FromDiscord | <treeform> its cool, people talk about it, rather then boring names |
00:41:32 | NimEventer | New thread by Elcritch: Repurposing CDecl, now it's the 'Commonly Desired Edge Case Library', see https://forum.nim-lang.org/t/9249 |
00:49:33 | NimEventer | New thread by Morturo: Read and write from/to seq[byte], see https://forum.nim-lang.org/t/9250 |
01:02:26 | * | ehmry quit (Ping timeout: 246 seconds) |
01:07:03 | * | ehmry joined #nim |
01:15:16 | FromDiscord | <Elegantbeef> I assume morturo doesnt use realtime chats? |
01:20:58 | FromDiscord | <Elegantbeef> Hmm can anyone email them to tell them to stop deleting their posts? π |
01:43:27 | FromDiscord | <treeform> why do they delete post? |
01:43:49 | FromDiscord | <Elegantbeef> I assume cause they got their answer |
01:45:13 | FromDiscord | <treeform> hmm |
01:51:20 | * | mahlon quit (Ping timeout: 248 seconds) |
01:52:19 | * | wallabra_ joined #nim |
01:52:32 | * | wallabra_ quit (Remote host closed the connection) |
01:54:01 | * | wallabra quit (Ping timeout: 248 seconds) |
02:02:40 | * | wallabra joined #nim |
02:08:15 | FromDiscord | <ripluke> How can I convert a float to an int |
02:08:24 | FromDiscord | <Elegantbeef> `int(myFloat)` |
02:08:54 | FromDiscord | <ripluke> Oh... Lol I tried parseInt but it only works for strings |
02:09:20 | FromDiscord | <Elegantbeef> Type conversions in Nim are done the above way |
02:09:56 | FromDiscord | <ripluke> Yea but strutils has a parseInt() and other functions |
02:11:22 | FromDiscord | <haskellandchill> that's not a type conversion |
02:11:27 | FromDiscord | <haskellandchill> it's parsing |
02:13:36 | FromDiscord | <haskellandchill> you are free to do `int("1")` but it's not gonna work |
02:15:14 | FromDiscord | <Elegantbeef> I mean you're free to try but that's a compile time error π |
02:18:58 | * | krux02 quit (Quit: Leaving) |
02:34:32 | FromDiscord | <Prestige> Elegantbeef: (possibly) a challenge - with the current mock, we can only substitute the calls at compile time, yes? Ideally for tests, we would change what the mocked function returns for each test. I've just started contemplating a solution, don't know if you have any thoughts on this |
02:35:29 | FromDiscord | <Elegantbeef> You cannot really |
02:36:12 | FromDiscord | <Prestige> Was thinking maybe a global variable that's generated by the macro, or maybe a table to lookup the caller and the return value |
02:37:42 | FromDiscord | <Elegantbeef> I guess you can inject a table access instead of a call |
02:43:02 | * | arkurious quit (Quit: Leaving) |
02:49:13 | FromDiscord | <Elegantbeef> You could also just use a function pointer of course |
02:49:33 | FromDiscord | <Prestige> Good point |
03:11:43 | FromDiscord | <Prestige> I still haven't figured out how to import this mocker file btw |
03:12:04 | FromDiscord | <Elegantbeef> You have to use the `--import:mocker` part of the compiler |
03:14:40 | FromDiscord | <Prestige> So I've added `--import:mocker` to my `config.nims` and I have `mocker.nim` in the `src` dir of my `nimtest` project (which is the testing suite library/binary) |
03:16:41 | FromDiscord | <Prestige> ah changed to `switch("import", "mocker")` but |
03:17:09 | FromDiscord | <Prestige> `Error: expression ' {.noRewrite.}: newStmtList([])' is of type 'NimNode' and has to be used (or discarded)` |
03:17:26 | FromDiscord | <Prestige> Getting this from one of the files from my nimtest library |
03:17:50 | FromDiscord | <Elegantbeef> Annotate the template with `: untyped` |
03:18:07 | FromDiscord | <Elegantbeef> the template didnt have a return value since it didnt need one when i was using it |
03:20:12 | FromDiscord | <Elegantbeef> But like i said buh bye compile times due to that pesky noRewrite not being respected |
03:20:40 | FromDiscord | <Prestige> Like this will increase compile times using it? |
03:20:58 | FromDiscord | <Elegantbeef> Yea |
03:21:06 | FromDiscord | <Prestige> Getting an error in my little test example for some reason, about using `..<` or `countup` |
03:21:20 | FromDiscord | <Elegantbeef> Someone broke the `{.noRewrite.}` pragma apparently |
03:21:47 | FromDiscord | <Prestige> aw dang |
03:22:01 | FromDiscord | <Elegantbeef> Oh perhaps i never worked |
03:22:19 | FromDiscord | <Elegantbeef> I just tested on the playground and it applies it recursively all the way back to 1.0 |
03:23:01 | FromDiscord | <Prestige> π€ |
03:23:24 | FromDiscord | <Prestige> How can I convert an int to a char equivalent |
03:23:30 | FromDiscord | <Prestige> like uh, 64 = a or whatever |
03:24:44 | FromDiscord | <Prestige> oh I got it |
03:25:38 | FromDiscord | <Prestige> https://play.nim-lang.org/#ix=40vk |
03:26:08 | FromDiscord | <Prestige> Works in the playground but not locally |
03:26:21 | FromDiscord | <Prestige> `attempting to call routine: '..<' found ..<...<(a: int, b: int) [iterator declared in /home/avahe/.choosenim/toolchains/nim-1.6.6/lib/system/iterators_1.nim(117, 10)]` |
03:26:51 | FromDiscord | <Prestige> Stacktrace back to `mocker.nim replaceProcImpl` |
04:21:58 | * | euantorano quit (*.net *.split) |
04:21:59 | * | drewr quit (*.net *.split) |
04:22:13 | * | euantorano joined #nim |
04:23:39 | * | drewr joined #nim |
04:27:00 | * | nullsh quit (*.net *.split) |
04:27:00 | * | madprog quit (*.net *.split) |
04:27:01 | * | madprops quit (*.net *.split) |
04:27:01 | * | notchris quit (*.net *.split) |
04:27:01 | * | DixieFlatline quit (*.net *.split) |
04:27:12 | * | madprops joined #nim |
04:27:18 | * | DixieFlatline joined #nim |
04:27:28 | * | notchris joined #nim |
04:27:36 | * | madprog joined #nim |
04:27:44 | * | madprops quit (Changing host) |
04:27:44 | * | madprops joined #nim |
04:28:05 | * | nullsh joined #nim |
04:30:08 | * | dtomato quit (*.net *.split) |
04:30:08 | * | dom96 quit (*.net *.split) |
04:30:08 | * | dithpri[m] quit (*.net *.split) |
04:30:09 | * | gshumway quit (*.net *.split) |
04:30:40 | * | dtomato joined #nim |
04:31:22 | * | gshumway joined #nim |
04:32:28 | * | dom96 joined #nim |
04:37:55 | FromDiscord | <haskellandchill> works for me locally |
04:38:33 | FromDiscord | <haskellandchill> you might have copied the `..<` part wrong somehow |
04:39:28 | FromDiscord | <Elegantbeef> eh he's using a very wacky macro |
04:42:23 | FromDiscord | <Prestige> yah |
04:42:37 | FromDiscord | <Prestige> Elegantbeef what are you using for 3d in your game? |
04:43:07 | FromDiscord | <Elegantbeef> My framework |
04:43:15 | FromDiscord | <Elegantbeef> opengl |
04:43:37 | * | dithpri[m] joined #nim |
04:44:01 | * | dithpri[m] is now known as Guest6357 |
04:44:15 | FromDiscord | <Prestige> Was it difficult to get models properly rendering? |
04:45:18 | FromDiscord | <Elegantbeef> No libassimp is quite lovely |
04:47:17 | * | mahlon joined #nim |
04:48:05 | FromDiscord | <Prestige> https://github.com/barcharcraz/nim-assimp ? |
04:48:16 | FromDiscord | <Elegantbeef> I use my own fork but yea |
04:48:42 | FromDiscord | <Prestige> Neat, I'll look into this |
04:49:23 | FromDiscord | <Elegantbeef> https://github.com/beef331/truss3d/blob/master/src/truss3D/models.nim is how i handle uploading to the gpu |
04:49:31 | FromDiscord | <Elegantbeef> It's really quite simple with assimp |
04:49:46 | FromDiscord | <Elegantbeef> Are you thinking about making shade3d? |
04:50:13 | * | termer_ joined #nim |
04:50:30 | FromDiscord | <Prestige> Yeah |
04:50:43 | FromDiscord | <Prestige> Was thinking of maybe using vulkan, though |
04:50:59 | FromDiscord | <Elegantbeef> Well have fun with the 3 weeks to render a single triangle |
04:51:13 | FromDiscord | <Elegantbeef> I barely have the willpower to work with opengl vulkan is 99% boilerplate |
04:51:38 | * | greaser|q joined #nim |
04:51:43 | FromDiscord | <Prestige> Yep lol it's crazy verbose |
04:51:43 | FromDiscord | <Elegantbeef> opengl is good enough for most things people will work on |
04:52:24 | * | djanatyn1 joined #nim |
04:53:04 | * | djanatyn quit (Ping timeout: 272 seconds) |
04:53:04 | * | Amun-Ra quit (Ping timeout: 272 seconds) |
04:53:05 | * | termer quit (Ping timeout: 272 seconds) |
04:53:05 | * | GreaseMonkey quit (Ping timeout: 272 seconds) |
04:53:07 | FromDiscord | <Elegantbeef> Like yes opengl is just a giant state machine and it's just the worst, but it's also relatively easy to get anything done and has many features that are relatively easy to implement |
04:53:18 | FromDiscord | <Prestige> Hmm |
04:53:50 | FromDiscord | <Elegantbeef> Most of my code in truss3D is probably for GUI π |
04:54:31 | * | Amun-Ra joined #nim |
04:56:05 | FromDiscord | <Elegantbeef> My view is mostly that of indies and the like are better off spending their time with opengl as you actually can make a game instead of making a vulkan wrapper |
04:57:34 | FromDiscord | <Elegantbeef> But then again you arent making a game you're making tooling |
04:57:37 | FromDiscord | <Elegantbeef> So i guess you do you |
05:14:37 | FromDiscord | <Prestige> Any thoughts on the macro issue btw? |
05:14:48 | FromDiscord | <Elegantbeef> Cant say much without a repro |
05:15:51 | FromDiscord | <Prestige> I provided the code so you can repro |
05:16:27 | FromDiscord | <Elegantbeef> You did? |
05:17:27 | FromDiscord | <Prestige> https://play.nim-lang.org/#ix=40vk |
05:18:04 | FromDiscord | <Prestige> Erroring on the for line, when having the mocks file imported with config.nims |
05:18:15 | FromDiscord | <Elegantbeef> Can i get the mock file again? |
05:18:16 | FromDiscord | <Prestige> mocker.nim I mean |
05:18:18 | FromDiscord | <Prestige> sure |
05:18:39 | FromDiscord | <Elegantbeef> I think i know the issue, but we'll see |
05:18:49 | FromDiscord | <Prestige> https://play.nim-lang.org/#ix=40vy |
05:23:16 | FromDiscord | <Elegantbeef> Hmmm this breaks iterator calls |
05:24:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40vz |
05:24:22 | FromDiscord | <Elegantbeef> Wait seems that just kills the matching |
05:27:13 | FromDiscord | <Elegantbeef> It shouldnt/doesnt match on an iterator so i dont get why it breaks it |
05:28:10 | FromDiscord | <Elegantbeef> Also you're really the worst |
05:28:32 | FromDiscord | <Elegantbeef> Nim has a ton of amazing features and you're using rand + 97 like it's C |
05:28:38 | FromDiscord | <Elegantbeef> `rand('a'..'z')` |
05:30:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40vC |
05:35:29 | FromDiscord | <Elegantbeef> Yep this mocker method fucking sucks |
05:35:50 | FromDiscord | <Elegantbeef> Use the module method i guess |
05:36:49 | FromDiscord | <Elegantbeef> then your `myProc(args)` just works |
05:36:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40vD |
05:37:18 | FromDiscord | <Elegantbeef> @Prestige\: there's a lot of rambling above for you π |
05:37:21 | FromDiscord | <Prestige> In reply to @Elegantbeef "`rand('a'..'z')`": had no idea I could do that lol |
05:37:39 | FromDiscord | <Elegantbeef> Works for all ordinals + floats |
05:38:01 | FromDiscord | <Elegantbeef> There's also `sample` for set/openarray |
05:39:43 | FromDiscord | <Prestige> That change above is working for you? |
05:40:07 | FromDiscord | <Elegantbeef> It did work, but it also broke with a minor change |
05:40:14 | FromDiscord | <Elegantbeef> Give up on this solution we're not using TRMs for what they're for |
05:41:43 | FromDiscord | <Rika> ~~TRMs are too powerful to use in any useful form tho~~ |
05:42:20 | FromDiscord | <Elegantbeef> I really like what they can in theory enable you to do, they just are a bit broke apparently |
05:43:06 | FromDiscord | <Elegantbeef> The parameter matching syntax i do wish will stay for macros/templates |
05:44:00 | FromDiscord | <Elegantbeef> I dont think anyone's ever really used TRMs for anything that i know of, but i've used them a bit for toys like this |
05:45:36 | FromDiscord | <Prestige> D: |
05:46:04 | FromDiscord | <Elegantbeef> The module way is the way to go prestige π |
05:46:10 | FromDiscord | <Prestige> What do you mean? |
05:46:36 | FromDiscord | <Elegantbeef> The two modules that are imported/exported based off if a flag is passed |
05:46:42 | FromDiscord | <Prestige> ah.. |
05:46:44 | FromDiscord | <Prestige> terrible |
05:46:49 | FromDiscord | <Elegantbeef> Eh it's not |
05:46:55 | FromDiscord | <Elegantbeef> It's better than this shit |
05:47:09 | FromDiscord | <Elegantbeef> It's atleast clear and uses sensible/reasonable mechanisms |
05:47:26 | FromDiscord | <Elegantbeef> It's as flexible as this without any overhead on the compiler side or your brain |
05:49:03 | FromDiscord | <Elegantbeef> You just have to make pointer procs for all procedures you want to mock, and could make a template handle it for you |
05:50:43 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40vE |
05:51:12 | FromDiscord | <Elegantbeef> Actually quite a nice API imho, but ymmv |
05:52:03 | FromDiscord | <Elegantbeef> mock is a bit of a shortcut cause `var doThing: typeof(doThing)` is a biiiit long |
06:02:12 | FromDiscord | <Prestige> lot more boilerplate for the user though, eh? |
06:02:25 | FromDiscord | <Elegantbeef> Mostly the same |
06:03:24 | FromDiscord | <Elegantbeef> You could make a macro that turned proc defs into pointer procs if `mock` is defined |
06:03:55 | FromDiscord | <Elegantbeef> Not as easy as the trm mess but it's more approachable |
06:07:51 | FromDiscord | <Prestige> hm well |
06:08:02 | FromDiscord | <Prestige> I'll need to think of a solution I guess |
06:08:13 | FromDiscord | <Prestige> I'm not sure what you have in mind tbh |
06:08:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40vK |
06:09:18 | FromDiscord | <Prestige> So would this need to be imported in all files and it'd add the mock pragma to everything? |
06:09:35 | FromDiscord | <Elegantbeef> what? |
06:09:43 | FromDiscord | <Elegantbeef> This works just like your normal proc macros |
06:10:00 | FromDiscord | <Elegantbeef> If you want to mock a procedure you add `{.mock.}` to it and it'll let you mock it |
06:10:19 | FromDiscord | <Elegantbeef> You could try to use a TRM to enable that mocking but i'll have no fun attempting to fight that macro |
06:10:33 | FromDiscord | <Prestige> Yeah so like |
06:10:53 | FromDiscord | <Prestige> if I have a proc that i need to mock, I'd need to add that pragma to it right? |
06:10:58 | FromDiscord | <Prestige> in the actual code, not the test |
06:11:13 | FromDiscord | <Elegantbeef> You can try a TRM to add `{.mock.}` to it |
06:11:33 | FromDiscord | <Elegantbeef> It's less aggressive than the other TRM |
06:11:41 | FromDiscord | <Prestige> true |
06:11:48 | FromDiscord | <Prestige> I suppose that's probably the best route... |
06:12:03 | FromDiscord | <Prestige> Is it non-trivial to add a pragma to a proc? |
06:12:09 | FromDiscord | <Prestige> with a TRM |
06:12:17 | FromDiscord | <Elegantbeef> It's just like adding it using a normal macro |
06:12:29 | FromDiscord | <Prestige> oh, alright good |
06:12:42 | FromDiscord | <Elegantbeef> Actually this is much simpler than i thought |
06:15:50 | FromDiscord | <Elegantbeef> Or... not `nkProcDef` isnt matched π |
06:20:11 | FromDiscord | <Prestige> hmm |
06:24:51 | * | rockcavera quit (Remote host closed the connection) |
06:52:17 | * | PMunch joined #nim |
07:01:36 | * | gsalazar joined #nim |
07:34:30 | * | mahlon quit (Ping timeout: 240 seconds) |
07:42:17 | * | ltriant quit (Ping timeout: 248 seconds) |
08:22:52 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/bFN |
08:23:23 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=40vW" => "https://play.nim-lang.org/#ix=40vX" |
08:25:37 | FromDiscord | <Phil> Using the example with `useSSL`gives the same response, but in that one in the line when calling the `connect` proc |
08:26:18 | FromDiscord | <Elegantbeef> You did compile with `-d:ssl` in the `useSsl` version? |
08:27:21 | FromDiscord | <Phil> Yeah, I compiled this in my "playground" project where I have -d:ssl just as a default flag |
08:28:31 | FromDiscord | <Phil> `nim c -r -d:normDebug --warning=UnusedImport:off -d:ssl ./src/playground.nim` This is the command I compile anything in playground with |
08:30:25 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=40vZ |
08:30:45 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=40vZ" => "https://play.nim-lang.org/#ix=40w0" |
08:31:02 | FromDiscord | <Elegantbeef> Yea i cant say much |
08:31:50 | FromDiscord | <Phil> At least I know the error is almost definitely a runtime error caused by the way std/smtp interacts with the smtp server |
08:32:14 | FromDiscord | <Phil> Though where I use std/smtp wrong I don't know |
08:32:16 | FromDiscord | <Elegantbeef> "almost definitely a runtime error" is a funny read π |
08:48:53 | NimEventer | New question by Philipp Doerner: SMTP - 503 Bad sequence of commands when using nim's std/smtp, see https://stackoverflow.com/questions/72684418/smtp-503-bad-sequence-of-commands-when-using-nims-std-smtp |
08:52:06 | FromDiscord | <Phil> I'll throw this up on the forum as well and answer my own SO question (unless somebody answers it first) once I figured out what's wrong |
08:53:36 | FromDiscord | <xflywind> did you enable IMAP/SMTP serice in your email and get auth code? |
08:53:49 | FromDiscord | <xflywind> (edit) "did you enable IMAP/SMTP serice in your email ... and" added "settings" |
08:53:56 | FromDiscord | <Phil> I enabled SMTP, did not get an auth code though I was not aware there was one |
08:54:24 | FromDiscord | <Phil> Since the local mail providers page about that does not mention an auth code |
08:54:45 | FromDiscord | <Phil> Let me check if my python implementation needed such a thing |
08:56:54 | FromDiscord | <Phil> Hmm within my django app I didn't need to add some specific auth code of sorts (unless you mean login credentials for a user account, those I did have to provide but those I also try to provide in the nim examples, the server just never lets me get that far) |
09:01:53 | PMunch | Maybe have a look with Wireshark and see what the Python and Nim versions do differently? |
09:03:24 | NimEventer | New thread by Isofruit: SMTP - 503 Bad sequence of commands with std/smtp, see https://forum.nim-lang.org/t/9251 |
09:04:17 | FromDiscord | <Phil> Just to be on the safe side since I've got a suspicion, this is a problem with the mail provider, I take it others used this with googles smtp without issue? |
09:05:19 | FromDiscord | <xflywind> Yeah, I didn't use startTls though. |
09:05:35 | FromDiscord | <Phil> Hmmm I'll make a google dummy then |
09:09:33 | FromDiscord | <Phil> Yeeeeeh I'm pretty sure I'm doing something wrong on a more fundamental level, google is giving me the same responses |
09:14:28 | FromDiscord | <xflywind> Or `std/smtp` have regressions on stable. |
09:14:42 | FromDiscord | <xflywind> ref https://github.com/nim-lang/Nim/pull/15032#issuecomment-715912739 |
09:14:53 | FromDiscord | <xflywind> > This actually broke SMTP TLS support on nimforum for e.g. GMail SMTP, but no one noticed π¦ |
09:16:20 | FromDiscord | <enthus1ast> most smtp server these days want to see "ehlo" not "helo" |
09:16:34 | FromDiscord | <enthus1ast> you cannot just send helo you must check |
09:16:44 | FromDiscord | <enthus1ast> if the server understands esmtp |
09:16:54 | FromDiscord | <enthus1ast> then send ehlo |
09:17:39 | FromDiscord | <enthus1ast> eg the uni-frankfurt mailserver lets you connect with helo but all commands fail |
09:17:47 | FromDiscord | <Phil> Ohh wait, using google I get a different error, nice! |
09:18:05 | FromDiscord | <xflywind> What's you Nim version? |
09:18:35 | FromDiscord | <xflywind> (edit) "you" => "your" |
09:18:48 | FromDiscord | <Phil> > Expected 235 reply, got: 534-5.7.9 Application-specific password required. Learn more at [ReplyError]β΅With google, that one breaks on the call `smtpConn.auth` |
09:19:10 | FromDiscord | <Phil> sent a long message, see http://ix.io/40w9 |
09:19:49 | FromDiscord | <xflywind> Could you try devel which contains a fix for smtp tls https://github.com/nim-lang/Nim/pull/19077 ? |
09:20:00 | FromDiscord | <enthus1ast> you must create a new passwordβ΅(@Phil) |
09:20:19 | FromDiscord | <enthus1ast> you cannot use your google account password |
09:20:44 | FromDiscord | <enthus1ast> they create like an app token for you to use in your email client |
09:21:57 | * | ltriant joined #nim |
09:22:11 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/JHK |
09:22:25 | FromDiscord | <Phil> (edit) "https://paste.rs/k31" => "https://play.nim-lang.org/#ix=40wb" |
09:23:15 | FromDiscord | <Phil> In reply to @enthus1ast "you must create a": I'll take a look at this later, right now I have to leave and on the go coding is a bit hard ^^ |
09:46:33 | FromDiscord | <d4rckh> how could i only import % from std/json? |
09:46:41 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=40wc |
09:46:43 | FromDiscord | <d4rckh> this is saying % is not a valid module name |
09:57:28 | FromDiscord | <d4rckh> nvm |
09:57:43 | FromDiscord | <d4rckh> it took 2 minutes for the nim vs code extension to compile my file |
09:58:09 | FromDiscord | <enthus1ast> was is stuck in "checking nim ... " |
09:58:09 | FromDiscord | <enthus1ast> ? |
09:58:31 | FromDiscord | <enthus1ast> have the same issue idk what it actually does when it "checks" it |
10:48:52 | FromDiscord | <d4rckh> idk |
10:49:00 | FromDiscord | <d4rckh> yeah |
10:49:01 | FromDiscord | <d4rckh> it was |
11:21:41 | * | vicecea quit (Remote host closed the connection) |
11:21:59 | * | oddish joined #nim |
11:22:03 | * | arkanoid joined #nim |
11:22:11 | * | vicecea joined #nim |
11:23:00 | arkanoid | is std/json compatible with gc:orc? I'm receiving sigsegv in "lib/pure/json.nim(505) len" |
11:23:04 | arkanoid | nim 1.6.6 |
11:23:44 | * | jmdaemon quit (Ping timeout: 255 seconds) |
11:25:15 | arkanoid | nevermind, it was my fault |
11:42:15 | FromDiscord | <Firefell> Hello, Is it impossible to do this ? |
11:42:32 | FromDiscord | <Firefell> (edit) "Hello, Is it impossible to do this ?" => "sent a code paste, see https://paste.rs/cCs" |
11:43:40 | PMunch | @Firefell, enums has to be in the correct order |
11:43:46 | PMunch | So you'd have to start with -2 in this case |
11:44:29 | FromDiscord | <EchoPouet> In reply to @PMunch "@Firefell, enums has to": Ok thanks |
11:55:25 | * | oddish quit (Quit: nyaa~) |
12:03:44 | * | oddish joined #nim |
12:28:12 | * | crem joined #nim |
12:30:38 | * | noeontheend joined #nim |
13:08:27 | * | derpydoo joined #nim |
13:43:31 | FromDiscord | <tandy> is there any reason why responseContent is private? β΅https://github.com/nim-lang/Nim/blob/1561a83c49b446b0f2ed0eae00c847610f9ee310/lib/pure/httpclient.nim#L1161 |
13:47:39 | PMunch | I don't think so |
13:51:35 | * | arkurious joined #nim |
13:56:12 | FromDiscord | <ynfle> What do you need it for? |
14:07:53 | * | noeontheend quit (Ping timeout: 248 seconds) |
14:13:14 | FromDiscord | <Phil> Erm, has anyone where used hottie so far? |
14:14:02 | FromDiscord | <Phil> (Treeforms profiler) |
14:15:55 | * | noeontheend joined #nim |
14:17:31 | * | PMunch quit (Quit: Leaving) |
14:17:35 | FromDiscord | <Phil> Or profiled nim code with the normal profiler |
14:20:44 | FromDiscord | <xflywind> In reply to @Isofruit "Or profiled nim code": Use valgrind on linux https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#profiling-with-valgrind |
14:21:06 | FromDiscord | <Phil> Errr alright |
14:21:42 | FromDiscord | <Phil> Just as a headsup, both hottie and the normal profiler did not properly record my stacktraces despite me having the correct flags enabled, so I might come back with questions about valgrind due to the same underlying issue in my using it or sth |
14:22:52 | FromDiscord | <xflywind> What is the normal profiler? nimprof? |
14:23:38 | FromDiscord | <Phil> Yeh |
14:24:37 | FromDiscord | <Phil> Added the flags as demanded there ("--profiler:on", "--stacktrace:on",) and my output I got was solely `total executions of each stack trace:` |
14:24:40 | FromDiscord | <xflywind> nimprof is hard to use for me. |
14:24:43 | FromDiscord | <Phil> (edit) "Added the flags as demanded there ("--profiler:on", "--stacktrace:on",) and my output I got was solely ... `total" added "the line" |
14:25:16 | FromDiscord | <xflywind> I used Intel VTune on windows. |
14:25:23 | FromDiscord | <arnetheduck> if you're looking for sampling profilers, `vtune` is hard to beat |
14:26:07 | FromDiscord | <Phil> Erm... assume I have not ever debugged memory before and am fine with something feature limited if it can be understood by an idiot? |
14:26:52 | FromDiscord | <Phil> Like, the extent of my profiling previously consisted of consulting snakeviz for python and look at its cake-diagrams regarding execution time |
14:27:50 | FromDiscord | <Phil> Mostly doing this since Rika asked for some profilings of my various pbkdf2 cryptography implementations that imitate the way python's Django does it |
14:28:21 | FromDiscord | <Phil> (edit) "Mostly doing this since Rika asked for some profilings of my ... various" added "(well "my" in quotation marks, hotdog wrote one and the first one was built with massive help from here as well)" |
14:29:48 | FromDiscord | <Phil> As for valgrind, I'll download that later, train Wifi is too slow to download 100mb |
14:30:22 | FromDiscord | <xflywind> I think you need to check the source code of nimcrypto. Profiler may not help too much in this situation. |
14:31:01 | FromDiscord | <Phil> I mean, I personally do not care too much, mostly wanted to follow a request to provide some profiling data |
14:31:27 | FromDiscord | <Phil> And I wanted to go over the version using nimcrypto, the one using openssl through python and the one using openssl directly |
14:32:23 | * | noeontheend quit (Ping timeout: 268 seconds) |
14:36:16 | FromDiscord | <Xzayler> sent a code paste, see https://play.nim-lang.org/#ix=40wV |
14:36:31 | reversem3[m] | https://play.nim-lang.org/ |
14:36:59 | FromDiscord | <Xzayler> In reply to @reversem3 "https://play.nim-lang.org/": can I check performance differences on there? |
14:37:04 | reversem3[m] | So trying to figure why I am getting dbError even though the type reflects the query ? |
14:37:29 | reversem3[m] | what do you mean ? |
14:37:31 | FromDiscord | <ynfle> How would I go about transforming a pixie.Image into a arraymancer.Tensor? |
14:37:38 | FromDiscord | <Xzayler> In reply to @reversem3 "what do you mean": sorry I thought you were replying to me |
14:38:02 | FromDiscord | <ynfle> In reply to @reversem3 "https://play.nim-lang.org/": You didn't "Share to ix" |
14:38:03 | FromDiscord | <Rika> Reverse you didnβt send a link with code |
14:38:18 | reversem3[m] | shit , sorry |
14:38:26 | FromDiscord | <Phil> In reply to @Xzayler "can I check performance": Nah, he was posting his own stuff |
14:38:57 | reversem3[m] | https://play.nim-lang.org/#ix=40wW |
14:39:04 | FromDiscord | <Phil> In reply to @Xzayler "If I have ": As for performance...err.... write a function, run it 10.000.000 times and echo out the time that passes? |
14:39:14 | reversem3[m] | Error: unhandled exception: ERROR: syntax error at or near "." |
14:39:14 | reversem3[m] | LINE 1: ..."User".password, "User".id FROM "User" WHERE User.email = ? |
14:39:14 | reversem3[m] | ^ |
14:39:14 | reversem3[m] | [DbError] |
14:39:16 | FromDiscord | <Phil> Not even sure if that actually works |
14:40:07 | FromDiscord | <ynfle> In reply to @Xzayler "can I check performance": You can use benchy |
14:40:16 | FromDiscord | <treeform> In reply to @treeform "I am around to": We have published the 2nd part of the JPEG talk this time the more technical deep dive - again I am around to answer any questions https://www.youtube.com/watch?v=vYwD7OynFcg&t=328s |
14:40:27 | FromDiscord | <Phil> In reply to @treeform "We have published the": Nice! |
14:40:52 | FromDiscord | <ynfle> In reply to @ynfle "How would I go": @treeform any idea? |
14:40:59 | FromDiscord | <ynfle> Has anyone done this before? |
14:41:03 | FromDiscord | <Phil> In reply to @ynfle "You can use benchy": This sounds like a much better suggestion than mine, do what this guy suggested Xzayler |
14:41:20 | FromDiscord | <Xzayler> In reply to @ynfle "You can use benchy": ok I guess I'll have to do some tests. I just asked in case there was some established "better" way to do it already |
14:41:40 | FromDiscord | <treeform> In reply to @ynfle "Has anyone done this": I am sure its not hard, just for x, for y loop the image and insert the colors into tesor? |
14:41:43 | FromDiscord | <ynfle> In reply to @Xzayler "ok I guess I'll": What are you trying to acomplish? |
14:42:16 | FromDiscord | <ynfle> In reply to @treeform "I am sure its": Ok. I can give a pointer to the array, but it's or structs and I want to decompose the structucts. |
14:42:25 | FromDiscord | <treeform> In reply to @ynfle "<@107140179025735680> any idea?": Usually for ML you want to scale the image to some thing smaller first, like 64x64, and probably grayscale? |
14:42:36 | FromDiscord | <!Patitotective> In reply to @Xzayler "ok I guess I'll": im pretty sure the difference is subtle and you'll hardly notice |
14:42:50 | FromDiscord | <ynfle> It's not ML, it's traditional CV |
14:42:51 | FromDiscord | <Xzayler> In reply to @ynfle "What are you trying": nothing really, I just realised I'm using bools as "toggles" and often I have functions toggling the bool to one value when it's already that value and didn't know how wasteful it is compared to running an if check before toggling the value. |
14:43:18 | FromDiscord | <Phil> It's going to be comparatively negligible regardless of how you slice it I think |
14:43:24 | reversem3[m] | why doesn't the query work ? |
14:43:34 | FromDiscord | <ynfle> In reply to @Xzayler "nothing really, I just": Are really high performance? |
14:43:36 | FromDiscord | <Josef> How can I read & write into EAX register? |
14:43:41 | FromDiscord | <treeform> In reply to @ynfle "It's not ML, it's": Do you want to scale the image or grayscale it first? |
14:43:53 | FromDiscord | <ynfle> In reply to @treeform "Do you want to": grayscale, not scale |
14:43:59 | FromDiscord | <Xzayler> In reply to @ynfle "Are really high performance?": No, I'm just a beginner and paranoid. And my knowledge on what affects performance is close to 0 |
14:44:21 | FromDiscord | <ynfle> In reply to @Xzayler "No, I'm just a": So probably don't worry about it |
14:45:20 | FromDiscord | <Phil> In reply to @Xzayler "No, I'm just a": You'll be fine, start worrying if you do something in a loop and what happens in that loop executes upwards of 5000 lines of code or works on some sort of string that is several megabytes long and you do that 1000 times or sth |
14:46:36 | FromDiscord | <Phil> Copying around large objects a lot or doing a lot of work in a loop/repeating work in a loop is more likely to be an issue than reassigning a boolean |
14:46:55 | FromDiscord | <Phil> (edit) "Copying around large objects a lot or doing a lot of work in a ... loop/repeating" added "massive" |
14:50:08 | FromDiscord | <Phil> There is such a thing as premature optimization and there's a quote flying around that it is the root of all evil. The essence is focus only on performance when you notice issues |
14:51:25 | FromDiscord | <treeform> In reply to @ynfle "grayscale, not scale": How do you create new tensor of width, height? |
14:51:33 | FromDiscord | <Phil> That can of course be taken to extremes, but the spirit is too not worry about the small things in terms of performance. Your algorithm in general is much more likely to heavily impact performance |
14:52:00 | FromDiscord | <treeform> found it! |
14:53:47 | FromDiscord | <treeform> nope, I can't figure our arraymancer docs |
14:56:55 | FromDiscord | <treeform> it seems like arraymancer docs don't match its current state |
14:58:35 | FromDiscord | <Josef> How do you convert int to str? |
14:59:05 | FromDiscord | <Phil> Strutils |
14:59:22 | FromDiscord | <Phil> Std/strutils holds your answer |
14:59:22 | FromDiscord | <Josef> Is there something like Hoogle for Nim? |
14:59:28 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=40x0 |
15:01:27 | FromDiscord | <Phil> Though $ proc might also work, try $5 and whether that compiled |
15:01:34 | FromDiscord | <Phil> (edit) "compiled" => "compiles" |
15:08:25 | FromDiscord | <!Patitotective> !eval echo $5 |
15:08:28 | NimBot | 5 |
15:08:49 | FromDiscord | <Phil> Right that exists, I keep forgetting |
15:14:21 | FromDiscord | <Phil> !eval $5=="5" |
15:14:24 | NimBot | Compile failed: /usercode/in.nim(1, 3) Error: expression 'true' is of type 'bool' and has to be used (or discarded) |
15:17:38 | FromDiscord | <!Patitotective> !eval assert $5 == "5" |
15:17:42 | NimBot | <no output> |
15:21:52 | FromDiscord | <tandy> i want to do a get call, then get the response contentβ΅(@ynfle) |
15:59:52 | FromDiscord | <ynfle> In reply to @tandy "i want to do": So use get content. That's what it's designed for |
16:01:09 | FromDiscord | <ynfle> In reply to @treeform "I think this might": What is yuv? Is that how to convert to grayscale? |
16:09:08 | * | mahlon joined #nim |
16:10:31 | * | arkanoid quit (Ping timeout: 256 seconds) |
16:19:07 | FromDiscord | <dom96> In reply to @ynfle "So use get content.": precisely, don't export this |
16:29:30 | om3ga | looks like executing processes in threads, in parallel is not possible. My test example hangs, but works with Lock. So must the process be executed in subshell to achieve the parallelism? |
16:39:40 | FromDiscord | <vindaar> what specifically was hard to understand?β΅(@treeform) |
16:43:06 | om3ga | please ignore. execShellCmd not hangs when being used without locks |
17:03:00 | * | kayabaNerve joined #nim |
17:07:50 | FromDiscord | <xflywind> I like something like https://github.com/nim-lang/Nim/pull/19913 which improves user experience if on the right track. |
17:12:08 | FromDiscord | <Zoom> Just look at the amount of open issues with `startProcess` to get your expectations set. I got hangs starting processes from threads, for both arc/orc and refc, some issues with WaitForExit too. And selectors for process state aren't implemented for Windows.β΅(<@709044657232936960_om3ga=5b=49=52=43=5d>) |
17:12:10 | FromDiscord | <Yardanico> In reply to @flywind "I like something like": yes, but a lot of things are really superfluous |
17:14:30 | om3ga | Zoom, thanks for the info. good that execShellCmd works for now. |
17:15:28 | FromDiscord | <xflywind> In reply to @Yardanico "yes, but a lot": Yeah, so I send link here hoping other can review the PR π |
17:17:04 | * | rockcavera joined #nim |
17:17:04 | * | rockcavera quit (Changing host) |
17:17:04 | * | rockcavera joined #nim |
17:18:31 | FromDiscord | <xflywind> We probably can create a label "easy to review", so others can participate in the reviewing of PRs. |
17:20:49 | FromDiscord | <Phil> Huh.... I'm not sure what's happening with numpy but apparently calling python code through it isn't terribly expensive, at least when you just call a wrapped python library through it |
17:20:55 | FromDiscord | <Phil> (edit) "numpy" => "nimpy" |
17:21:09 | FromDiscord | <Phil> (edit) "Huh.... I'm not sure what's happening with nimpy but apparently calling python code through it isn't terribly expensive, at least when you just call a wrapped python library through it ... " added "(openssl in my scenario)" |
17:23:23 | FromDiscord | <xflywind> In reply to @flywind "We probably can create": The number of commits has been decreasing since early this year. |
17:23:26 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/988494298154668084/unknown.png |
17:23:30 | * | rockcavera quit (Ping timeout: 264 seconds) |
17:24:41 | FromDiscord | <Zoom> I bet to some degree ist's a function of speed of reviewing/merging. |
17:25:32 | FromDiscord | <konsumlamm> In reply to @flywind "The number of commits": hmm, i feel like part of that is that timothee isn't active anymore |
17:25:40 | FromDiscord | <konsumlamm> although now you're doing a lot of stuff |
17:29:41 | FromDiscord | <xflywind> In reply to @konsumlamm "hmm, i feel like": Yeah, I agree. I miss him very much. I cannot discuss prs with him these days , which makes me less motivated. |
17:31:54 | FromDiscord | <vindaar> you don't really expect any performance penalty using `nimpy` really compared to "native python'". It talks to a python interpreter straight via the CPython APIβ΅(@Phil) |
17:37:09 | FromDiscord | <jmgomez> hey guys, question, how can I specify the size of an enum to be int32? It does work with byte but not with int32? Is there a way? |
17:39:27 | FromDiscord | <jmgomez> nvm uint32 works, which makes sense |
17:43:47 | FromDiscord | <jmgomez> hmm turns out you cant set the value if you assign a concrete size? |
17:44:20 | FromDiscord | <Phil> In reply to @vindaar "you don't really expect": Was more calling openssl via python vs calling openssl directly, I did expect some performance penalty there but I can barely make one out with benchy, and even that I'm not sure of how much it is just normal fluctuation |
17:48:49 | FromDiscord | <geekrelief> In reply to @jmgomez "hey guys, question, how": How are you specifying the size? |
17:50:32 | FromDiscord | <U9G> Hey, I'm just trying to cionvert python to nim, and I'm stuck on this: |
17:50:41 | FromDiscord | <U9G> sent a code paste, see https://play.nim-lang.org/#ix=40xO |
17:50:43 | FromDiscord | <U9G> (edit) "cionvert" => "convert" |
17:51:18 | FromDiscord | <U9G> sent a code paste, see https://play.nim-lang.org/#ix=40xQ |
17:51:23 | FromDiscord | <Yardanico> you didn't `import std/tables` |
17:51:32 | FromDiscord | <U9G> at the top of my file I had `import os, httpclient, strformat, tables, strutils` |
17:51:40 | FromDiscord | <Yardanico> ah, right |
17:51:42 | FromDiscord | <Yardanico> `let itm` |
17:51:48 | FromDiscord | <Yardanico> then `itm` is immutable, but you want to change it |
17:51:52 | FromDiscord | <Yardanico> use `var itm` instead |
17:52:09 | FromDiscord | <Yardanico> also you don't have to call `initTable`, default initialized tables work just fine |
17:52:44 | FromDiscord | <U9G> thanks for the var tip |
17:52:59 | FromDiscord | <U9G> In reply to @Yardanico "also you don't have": so is `var itm = Intermediaries()` equivalent ? |
17:53:03 | FromDiscord | <Yardanico> yes |
17:53:21 | FromDiscord | <Yardanico> initTable docs say "Starting from Nim v0.20, tables are initialized by default and it is not necessary to call this function explicitly." |
17:53:34 | FromDiscord | <Yardanico> you only need to call initTable if you want to preallocate some non-default size to the table |
17:53:45 | FromDiscord | <Yardanico> to have less reallocations later, but that's just a minor optimization most of the time |
17:55:19 | FromDiscord | <U9G> thanks |
17:55:26 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=40xS |
17:55:42 | FromDiscord | <Yardanico> that's not how you do it |
17:56:06 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#set-type-bit-fields |
17:56:17 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=40xT |
17:56:56 | FromDiscord | <jmgomez> ohh, I saw somewhere else it being done like above. Thanks! Let's see i it allows me to set it now.. BTW why then is valid code what I just posted? |
17:57:31 | FromDiscord | <geekrelief> In reply to @jmgomez "ohh, I saw somewhere": Not sure, where did you see code like that? |
17:59:25 | FromDiscord | <geekrelief> you could also specify the size by setting a Max value: |
17:59:40 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=40xU |
17:59:55 | FromDiscord | <geekrelief> (edit) "https://play.nim-lang.org/#ix=40xU" => "https://play.nim-lang.org/#ix=40xV" |
18:01:14 | FromDiscord | <jmgomez> Cant recall where I see it. Maybe that was an older way of doing things? |
18:02:56 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=40xZ |
18:03:08 | FromDiscord | <geekrelief> Seems like you can set the values fine like above. |
18:04:50 | FromDiscord | <U9G> how would I skip the first line of an array? `arr[1..]` isnt valid, and neither is `arr[1..^0]` |
18:05:20 | FromDiscord | <geekrelief> `arr[1 ..< ^1]` |
18:06:40 | FromDiscord | <geekrelief> oops |
18:06:45 | FromDiscord | <geekrelief> that excludes the llast one |
18:06:57 | FromDiscord | <geekrelief> should be `arr[1 .. ^1]` |
18:10:37 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=40y2 |
18:15:34 | NimEventer | New thread by Morturo: Question about pointers, see https://forum.nim-lang.org/t/9252 |
18:15:38 | FromDiscord | <U9G> sent a code paste, see https://paste.rs/dUK |
18:15:55 | FromDiscord | <U9G> (edit) |
18:18:42 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=40y6 |
18:18:47 | FromDiscord | <Yardanico> (edit) "https://play.nim-lang.org/#ix=40y6" => "https://play.nim-lang.org/#ix=40y7" |
18:19:00 | FromDiscord | <Yardanico> Nim iterators can only be used in loop contexts, and if you need to get all values of an iterator outside of those, use sequtils.toSeq or sugar.collect |
18:19:16 | FromDiscord | <U9G> https://i.imgur.com/1CPEytY.png |
18:19:19 | FromDiscord | <U9G> thats my code now |
18:19:40 | FromDiscord | <Yardanico> just do `mnt in classes` |
18:19:48 | FromDiscord | <Yardanico> that'll check if a key is in the table |
18:20:02 | FromDiscord | <Yardanico> because Table type has `contains` defined for it that checks if the key is in the table |
18:20:09 | FromDiscord | <U9G> ah thanks |
18:20:13 | FromDiscord | <Yardanico> https://nim-lang.org/docs/tables.html#contains%2CTable%5BA%2CB%5D%2CA |
18:21:20 | FromDiscord | <Yardanico> In Nim you don't have to define an `in` operator for your type, instead you just define a `contains` proc and Nim will automatically use it for the `in` and `notin` operators |
18:21:38 | * | kayabaNerve quit (Ping timeout: 240 seconds) |
18:25:41 | * | termer_ is now known as termer |
18:26:32 | * | firq quit (Remote host closed the connection) |
18:30:55 | FromDiscord | <Phil> In reply to @flywind "Could you try devel": Alright, so I just played around with a version of my code that used google: That one worked. Whatever local email provider I'm using appears to be somehow fucked, not sure why it's not working with them |
18:36:41 | FromDiscord | <tandy> yes but that I can't get the status code of the requestβ΅(@ynfle) |
18:37:08 | FromDiscord | <tandy> I've asked in the PR, I don't understand why this proc must not be exportedβ΅(@dom96) |
18:38:01 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=40ya |
18:38:08 | FromDiscord | <tandy> I would like to do this |
19:25:02 | * | PMunch joined #nim |
19:26:46 | * | oddish quit (Quit: oddish) |
19:36:06 | FromDiscord | <ynfle> In reply to @tandy "yes but that I": Why don't you use just regular `client.get` |
19:36:33 | FromDiscord | <ynfle> Not saing it shouldn't be exported |
19:36:35 | FromDiscord | <Yardanico> In reply to @tandy "I've asked in the": but why do you need responseContent specifically |
19:36:40 | FromDiscord | <Yardanico> if you can just do `await resp.body` |
19:36:43 | FromDiscord | <Yardanico> ? |
19:37:01 | FromDiscord | <Yardanico> this is with async ofc, without async it's just resp.body |
19:42:08 | FromDiscord | <ynfle> What's the easiest way to draw a 2d matrix in nim? something like displaying an image in matlab. I currently have it in matlab, but don't mind putting it into another format |
19:42:25 | FromDiscord | <ynfle> (edit) "matlab," => "an `arraymancer.Tensor`," |
19:44:37 | * | gsalazar_ joined #nim |
19:46:38 | * | ltriant_ joined #nim |
19:46:53 | * | arkurious quit (Ping timeout: 268 seconds) |
19:46:58 | * | ltriant quit (Ping timeout: 240 seconds) |
19:47:30 | * | gsalazar quit (Ping timeout: 264 seconds) |
19:48:16 | FromDiscord | <U9G> I imported system but I still can't use createThread() from <https://nim-lang.org/docs/threads.html> |
19:48:23 | FromDiscord | <U9G> is there something I'm missing? |
19:48:48 | FromDiscord | <enthus1ast> do not import system but compile with --threads\:on |
19:50:59 | FromDiscord | <tandy> is that the same?β΅(@Yardanico) |
19:51:08 | FromDiscord | <U9G> In reply to @enthus1ast "do not import system": it runs, but vscode doesnt recognize the createThread function still? |
19:52:20 | FromDiscord | <enthus1ast> i'm not 100% sure, but i think it will recognize it when you create a yourApp.nims file with `switch("threads", "on")` |
19:52:31 | FromDiscord | <enthus1ast> at least worth a try |
19:52:46 | FromDiscord | <U9G> ah I needed a nim.cfg |
19:52:47 | FromDiscord | <huantian> or `config.nims` |
19:53:04 | FromDiscord | <huantian> then you don't need to add --threads:on in your compile command too |
19:53:06 | FromDiscord | <U9G> is there a difference between .nims and nims.cfg? |
19:53:26 | FromDiscord | <enthus1ast> .nims is nimscript |
19:53:52 | FromDiscord | <huantian> yeah I don't know if you can use nimscript in `nim.cfg` |
19:53:57 | FromDiscord | <huantian> but they might just be the same thing |
19:55:55 | FromDiscord | <Yardanico> In reply to @tandy "is that the same?": For getting the body yes |
19:56:07 | FromDiscord | <Yardanico> the internal behaviour is a bit different, but it'll get the body |
19:56:21 | FromDiscord | <Yardanico> And it won't raise since, as Dom mentioned in the issue, it doesn't look like you want that |
19:59:51 | * | arkurious joined #nim |
20:04:48 | FromDiscord | <tandy> use that code i shared and save it to an image then open itβ΅(@ynfle) |
20:04:56 | FromDiscord | <tandy> hmm okayβ΅(@Yardanico) |
20:09:24 | * | jmdaemon joined #nim |
20:11:43 | FromDiscord | <ynfle> In reply to @tandy "use that code i": Where did you share it? |
20:11:48 | FromDiscord | <ynfle> Are you treeform? |
20:12:05 | FromDiscord | <U9G> is there something like os.name in nim? |
20:12:18 | FromDiscord | <U9G> to check windows/linux |
20:14:45 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=40yw |
20:17:15 | FromDiscord | <U9G> thanks |
20:27:43 | * | noeontheend joined #nim |
20:34:29 | FromDiscord | <tandy> https://matrix.to/#/!IpFtPSbgfrZrVcVyti:envs.net/$YfUheltgy3K5k3GzgkEdeGZQ8y8QoZWKNUcwnLn6FZw?via=matrix.org&via=t2bot.io&via=envs.netβ΅(@ynfle) |
20:34:31 | FromDiscord | <Torbatti> sent a code paste, see https://play.nim-lang.org/#ix=40yz |
20:34:38 | FromDiscord | <tandy> noβ΅(@ynfle) |
20:35:11 | FromDiscord | <ynfle> In reply to @Torbatti "Hi ! how": Excatly that but put `-o` before the file name |
20:35:17 | * | PMunch quit (Quit: leaving) |
20:35:24 | FromDiscord | <ynfle> The rest are runtime command line args |
20:35:48 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=40yA |
20:36:11 | FromDiscord | <tandy> @ynfle\: ^ |
20:36:16 | FromDiscord | <tandy> i realised you arent on matrix |
20:38:07 | FromDiscord | <ynfle> Thanks |
20:38:21 | FromDiscord | <ynfle> I'm not sure why it doesn't work with the built in write_png |
20:39:06 | FromDiscord | <ynfle> This is my code |
20:39:07 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=40yC |
20:39:23 | FromDiscord | <ynfle> I get `Error: unhandled exception: index out of bounds, the container is empty [IndexDefect]` on the write_png |
20:46:13 | FromDiscord | <KatrinaKitten> How would one go about doing conditional compilation in Nim? I've received a request to adjust one of my libraries to use `jsre` instead of `re` when compiling for Javascript, but I'm not sure where to start. |
20:46:35 | FromDiscord | <Yardanico> `when` |
20:46:39 | * | oddish joined #nim |
20:47:46 | FromDiscord | <KatrinaKitten> That makes sense. What would I be looking for in the condition? |
20:57:53 | FromDiscord | <Yardanico> In reply to @KatrinaKitten "That makes sense. What": https://github.com/nim-lang/Nim/blob/version-1-6/lib/impure/re.nim#L10 |
20:58:01 | * | derpydoo quit (Quit: derpydoo) |
20:58:22 | FromDiscord | <Yardanico> Just `when defined(js):` is enough |
20:59:24 | FromDiscord | <U9G> sent a code paste, see https://play.nim-lang.org/#ix=40yF |
21:00:06 | FromDiscord | <Elegantbeef> What are you wanting to do with `txt` |
21:00:15 | FromDiscord | <Elegantbeef> the easiest way is `lines("path").toSeq` |
21:00:19 | FromDiscord | <ynfle> What are trying accomplish with `stripLineEnd` |
21:00:35 | FromDiscord | <ynfle> (edit) "`stripLineEnd`" => "`stripLineEnd`?" |
21:00:36 | FromDiscord | <Elegantbeef> `toSeq` is in `std/sequtils` |
21:01:11 | FromDiscord | <U9G> In reply to @ynfle "What are trying accomplish": strip empty line so I dont have an empty string at the end of the array of line? |
21:01:22 | FromDiscord | <U9G> oh okay Iβll use lines |
21:01:56 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/mOf |
21:01:58 | FromDiscord | <ynfle> In reply to @U9G "strip empty line so": You could just use strip |
21:02:25 | FromDiscord | <Elegantbeef> The above that i showed is how you use procs that expect `var T` with an immutable `T` |
21:02:29 | FromDiscord | <Elegantbeef> Not that it's the right solution here |
21:03:43 | FromDiscord | <Elegantbeef> Personally i'd ask "what are you doing with txt" anyway |
21:12:45 | FromDiscord | <haskellandchill> hm I wanna try dr nim |
21:12:50 | FromDiscord | <haskellandchill> is koch the best way? |
21:13:07 | FromDiscord | <Elegantbeef> No clue pretty much no one uses the profiler/dr nim |
21:13:13 | FromDiscord | <haskellandchill> yea figured |
21:13:22 | FromDiscord | <haskellandchill> I don't even have koch cause I used choosenim |
21:13:41 | FromDiscord | <Elegantbeef> Yea you need to build from source to get koch |
21:13:55 | FromDiscord | <Elegantbeef> And even then you dont really "get" it unless you desire it |
21:14:00 | FromDiscord | <haskellandchill> wah ok |
21:14:12 | FromDiscord | <haskellandchill> for science |
21:14:21 | FromDiscord | <Elegantbeef> Like i've never had koch in my path π |
21:15:22 | FromDiscord | <πΎ br4n_d0n> What are the options I can use with ``when``? |
21:15:30 | FromDiscord | <Elegantbeef> Any compile time statement |
21:15:43 | FromDiscord | <πΎ br4n_d0n> Is there a list somewhere? |
21:15:54 | FromDiscord | <Elegantbeef> No cause it's literally any compile time statement |
21:15:57 | FromDiscord | <ynfle> What's you question? |
21:16:05 | FromDiscord | <enthus1ast> when is the "compile time if" |
21:17:16 | FromDiscord | <enthus1ast> `when true:` `when 1 == 1:` |
21:18:10 | FromDiscord | <Elegantbeef> If you mean all the compiler defined defines there isnt a comprehensive list but generally it's just OS |
21:18:26 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/wiki/Consts-defined-by-the-compiler |
21:32:28 | * | greaser|q quit (Changing host) |
21:32:28 | * | greaser|q joined #nim |
21:32:32 | * | greaser|q is now known as GreaseMonkey |
21:35:33 | FromDiscord | <πΎ br4n_d0n> Hmm, can I alias a keyword? |
21:35:56 | FromDiscord | <Elegantbeef> Depends on what the keyword is |
21:36:07 | FromDiscord | <πΎ br4n_d0n> bitwise or |
21:36:13 | FromDiscord | <Elegantbeef> That's not a keyword |
21:36:28 | FromDiscord | <Elegantbeef> that's an operator and Nim allows userdefined operators |
21:37:14 | FromDiscord | <πΎ br4n_d0n> Sorry, I used the wrong term; I'm not great with them |
21:41:45 | FromDiscord | <KatrinaKitten> How do I check for a Javascript `null` from Nim? `== nil` gives me back type errors, `isNil` gives me "is an {.error.}", and I can't figure out what else to try |
21:42:28 | FromDiscord | <Elegantbeef> Is it a `ref object`? |
21:43:23 | FromDiscord | <KatrinaKitten> I don't think so, that's the issue; it's a `seq[cstring]`, but can be `null` |
21:43:41 | FromDiscord | <Elegantbeef> No it cannot be nil in nim land |
21:43:54 | FromDiscord | <Elegantbeef> you need to do `toJs(mySeq) != nil` probably |
21:44:07 | FromDiscord | <Elegantbeef> `seq[T]` is not nilable in Nim |
21:45:31 | FromDiscord | <KatrinaKitten> That worked, thank you! |
21:46:31 | FromDiscord | <Elegantbeef> Alternatively you can represent it as a `ref seq[T]` and it might give the semantics you want but i dont use the js backend much |
21:47:13 | FromDiscord | <KatrinaKitten> I don't need to use it extensively, just in a "patch" function that wraps `jsre` to be usable like `re` for my use cases, so `toJs` works fine here |
21:47:40 | FromDiscord | <Elegantbeef> Is there a reason you dont just use the pure Nim regex? |
21:48:17 | FromDiscord | <Elegantbeef> Though i'm sceptical about anyone using regex |
21:48:20 | FromDiscord | <KatrinaKitten> Normally I do, but I had a user request `jsre` support so I'm doing conditional compilation and patching in the functionality `jsre` doesn't support |
21:48:36 | FromDiscord | <KatrinaKitten> https://media.discordapp.net/attachments/371759389889003532/988561026683383818/unknown.png |
21:48:46 | FromDiscord | <Elegantbeef> `re` isnt pure Nim π |
21:49:02 | FromDiscord | <KatrinaKitten> Is there a pure Nim one? |
21:49:13 | FromDiscord | <ynfle> regex |
21:49:14 | FromDiscord | <Elegantbeef> https://github.com/nitely/nim-regex |
21:49:14 | FromDiscord | <Elegantbeef> yes |
21:49:34 | FromDiscord | <KatrinaKitten> Ah, yeah, I can't use that unfortunately. Part of the selling point of my library is that it has no third-party dependencies, it's stdlib only. |
21:49:48 | FromDiscord | <Elegantbeef> Except it has third party deps |
21:49:51 | FromDiscord | <ripluke> Can I have a function that returns void, but instead writes to the stdout |
21:50:03 | FromDiscord | <ynfle> re uses PCRE dll which is a third party dependency |
21:50:10 | FromDiscord | <Elegantbeef> `re` relies on PCRE |
21:50:12 | FromDiscord | <ynfle> In reply to @ripluke "Can I have a": Yes of coure |
21:50:20 | FromDiscord | <ripluke> Oh ok thx |
21:50:34 | FromDiscord | <ynfle> return void means not return any value |
21:50:48 | FromDiscord | <KatrinaKitten> In reply to @ynfle "re uses PCRE dll": I handwave that bit, because that's a third party dependency used by the stdlib itself. |
21:50:53 | FromDiscord | <Elegantbeef> You also dont need to annotate a procedure returns void |
21:51:15 | FromDiscord | <KatrinaKitten> (edit) "itself." => "itself, not one I'm adding on top of it." |
21:51:15 | FromDiscord | <ynfle> In reply to @KatrinaKitten "I handwave that bit,": Why no 3rd party deps? |
21:51:45 | FromDiscord | <Elegantbeef> Sure but it does have a third party dependancy and with a license attached to it |
21:51:46 | FromDiscord | <Elegantbeef> nim-regex is MIT licensed code |
21:51:51 | FromDiscord | <Elegantbeef> So you could if you really didnt want a third party dependency pull in nim-regex into your own repo and manage a fork that way |
21:52:32 | FromDiscord | <KatrinaKitten> It's admittedly a bit idiosyncratic on my part, but every dependency is a liability, so for a "tiny" library like this it doesn't make sense to depend on stuff the language doesn't already use in its "core" things. |
21:52:53 | FromDiscord | <Elegantbeef> I'd of course just say "use nim-regex through nimble" but if you really dislike third party deps the best thing is to have a fork in your project |
21:53:10 | FromDiscord | <Elegantbeef> This gives you the same API on every platform without issue |
21:53:46 | FromDiscord | <Elegantbeef> That makes no sense |
21:54:03 | FromDiscord | <Elegantbeef> Both carry the same risks |
21:54:19 | FromDiscord | <Elegantbeef> You're risking that the people ship the library with the code and also that the wrapping of it are proper |
21:55:10 | FromDiscord | <KatrinaKitten> In terms of same API, so does writing small extension functions to wrap `jsre` for the few `re` functions I use π€·ββοΈ What really doesn't make sense at the moment, for a library I'm barely maintaining consistently anyway, to rewrite my entire library to not use `re` when I only need to wrap two functions of `jsre` and all my tests pass. If it becomes an issue in the future, I can always make the shift then. |
21:55:19 | FromDiscord | <KatrinaKitten> (edit) "In terms of same API, so does writing small extension functions to wrap `jsre` for the few `re` functions I use π€·ββοΈ What really doesn't make sense at the moment, for a library I'm barely maintaining consistently anyway, ... to" added "is" |
21:56:44 | FromDiscord | <ripluke> Whatβs the equivalent to the python continue keyword in nim |
21:56:55 | FromDiscord | <huantian> `continue` |
21:56:55 | FromDiscord | <Elegantbeef> you arent going to believe this shit |
21:56:58 | FromDiscord | <Elegantbeef> It's `continue` |
21:57:07 | FromDiscord | <ripluke> Oh |
21:57:18 | FromDiscord | <ripluke> Ok that was a dumb question |
21:57:27 | FromDiscord | <d4rckh> In reply to @KatrinaKitten "": Wow nice font! |
21:57:27 | FromDiscord | <Elegantbeef> Continue |
21:57:33 | FromDiscord | <huantian> I can't believe nim would just shamelessly copy python like that tho |
21:58:10 | FromDiscord | <KatrinaKitten> In reply to @d4rckh "Wow nice font!": Ty, it's Comic Mono haha https://dtinth.github.io/comic-mono-font/ |
21:58:14 | FromDiscord | <Elegantbeef> Try why isnt it like "next iteration yous hitty PC" |
21:58:15 | FromDiscord | <KatrinaKitten> I use it for readability, mostly |
21:58:38 | FromDiscord | <d4rckh> In reply to @KatrinaKitten "Ty, it's Comic Mono": Pretty sick |
21:58:42 | FromDiscord | <Elegantbeef> Damn i cannot type that should be "true" |
21:58:46 | FromDiscord | <d4rckh> I like Cascadia Code |
21:58:52 | FromDiscord | <d4rckh> But I'll give comic mono a try too |
21:59:23 | FromDiscord | <Elegantbeef> Here i am bashing rocks together with iosevka |
22:03:03 | FromDiscord | <d4rckh> That also looks like a cool font |
22:03:55 | FromDiscord | <πΎ br4n_d0n> OK, I feel like this is another dumb question, but I'm struggling with it.β΅How do I get echo to display a binary number in the ``0bxxxx`` form? |
22:04:05 | FromDiscord | <Elegantbeef> `toBin` |
22:04:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40yQ |
22:05:10 | FromDiscord | <Elegantbeef> Nim's echo doesnt do any formatting it just calls the types `$` operator |
22:05:46 | FromDiscord | <huantian> you can also use strformat if you want too I think |
22:06:08 | FromDiscord | <Elegantbeef> You can indeed |
22:06:21 | * | noeontheend quit (Ping timeout: 276 seconds) |
22:06:53 | FromDiscord | <πΎ br4n_d0n> sent a code paste, see https://play.nim-lang.org/#ix=40yT |
22:07:11 | FromDiscord | <huantian> what type would it be if not an int? |
22:07:19 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40yU |
22:07:23 | FromDiscord | <πΎ br4n_d0n> (edit) "https://play.nim-lang.org/#ix=40yT" => "https://paste.rs/eul" |
22:07:25 | FromDiscord | <Elegantbeef> Are you trying to do bitflags |
22:07:28 | FromDiscord | <Elegantbeef> If so stop what you're doing |
22:07:58 | FromDiscord | <πΎ br4n_d0n> I was trying to use flipBits |
22:08:09 | FromDiscord | <πΎ br4n_d0n> and wanted to print the outcome |
22:08:21 | FromDiscord | <ripluke> So I have this echo statement, and I want it to detect keys such as ctrl + l |
22:09:18 | FromDiscord | <ripluke> How can I do that |
22:09:57 | FromDiscord | <Elegantbeef> echo then `readCh()` |
22:10:05 | FromDiscord | <ripluke> Oh |
22:10:09 | FromDiscord | <Elegantbeef> or is it `getCh()` i always forget |
22:10:17 | FromDiscord | <Elegantbeef> If you want an interactive terminal program look at illwill |
22:10:27 | FromDiscord | <ripluke> Ohk |
22:13:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40yV |
22:13:15 | FromDiscord | <Elegantbeef> `toBin` takes `int` |
22:13:15 | FromDiscord | <ynfle> In reply to @br4n_d0n "and wanted to print": all (non float) number irrespective of how the are defined are integers and are binary in the computer's memory. The compiler does not distinguish. 2342 printed in binary is the same os 0b101101111010101 printed in binary (not the deciman and binary value, of course) |
22:13:20 | FromDiscord | <ynfle> (edit) "deciman" => "decimal" |
22:13:39 | FromDiscord | <Elegantbeef> there is still the question of what are you using flipbits for |
22:13:49 | FromDiscord | <Elegantbeef> Cause if you're using it for flags and lying about it i'll send huan after you |
22:13:59 | FromDiscord | <πΎ br4n_d0n> lol |
22:14:45 | * | firq joined #nim |
22:14:47 | FromDiscord | <πΎ br4n_d0n> I was looking at potentially intefacing with some C code that uses bit flags |
22:15:04 | FromDiscord | <huantian> permabanned and deleted from the internet |
22:15:07 | FromDiscord | <Elegantbeef> So then why would you use manual bitflags do you dislike yourself? |
22:15:52 | FromDiscord | <πΎ br4n_d0n> I clearly don't know what I'm doing |
22:15:56 | FromDiscord | <πΎ br4n_d0n> lol |
22:16:23 | FromDiscord | <πΎ br4n_d0n> #not-low-level-gang |
22:16:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40yW |
22:16:57 | FromDiscord | <Elegantbeef> No this is highlevel bitflags |
22:17:02 | FromDiscord | <Elegantbeef> We dont live like monkeys here |
22:18:29 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40yX |
22:19:11 | FromDiscord | <Elegantbeef> Yes you can seemlessly interop with a bitset of a given C size using this method without causing headaches |
22:19:36 | FromDiscord | <πΎ br4n_d0n> Interesting |
22:20:09 | FromDiscord | <πΎ br4n_d0n> What's the reason for using ``'u8`` at the end? |
22:20:20 | FromDiscord | <Elegantbeef> To make it a byte? |
22:20:23 | FromDiscord | <Elegantbeef> or a uint8 rather |
22:20:37 | FromDiscord | <πΎ br4n_d0n> It cannot infer this? |
22:20:45 | FromDiscord | <Elegantbeef> Nim doesnt do backwards inference |
22:20:57 | FromDiscord | <Elegantbeef> the only inference it has is it's an integer with the first three bits set to x |
22:20:59 | FromDiscord | <ynfle> The default int type is int 64 or 32 depending on the machine |
22:21:23 | FromDiscord | <Elegantbeef> All unmarked literals are inferred to be the systems `int` type otherwise they're inferred of a callsite parameter |
22:22:25 | FromDiscord | <Elegantbeef> So where should it infer it's a uint8? |
22:23:14 | FromDiscord | <πΎ br4n_d0n> π€ I feel dumb |
22:23:24 | FromDiscord | <Elegantbeef> ok |
22:24:02 | FromDiscord | <ripluke> Can I use nim script as a config language for my nim project? |
22:24:08 | FromDiscord | <Elegantbeef> You can |
22:24:16 | FromDiscord | <Elegantbeef> `config.nims` next to your binary |
22:24:28 | FromDiscord | <ripluke> Ohk |
22:24:35 | FromDiscord | <Elegantbeef> I mean not binary |
22:24:45 | FromDiscord | <Elegantbeef> source file or root directory of your project |
22:25:16 | FromDiscord | <ripluke> What if I want the config file in the config dir (~/.config) |
22:25:34 | FromDiscord | <Elegantbeef> You'd need to use load the nimscript |
22:25:40 | FromDiscord | <Elegantbeef> So this is where i mention nimscripter |
22:25:45 | FromDiscord | <ripluke> Ok |
22:25:54 | FromDiscord | <Elegantbeef> It's a library that makes nim \<-\> nimscript interop easy at runtime |
22:26:09 | FromDiscord | <ripluke> Ok Iβll check it out |
22:26:25 | FromDiscord | <Elegantbeef> Just dont make any issues or have troubles as i'm feeling lazy as of late π |
22:26:44 | FromDiscord | <ripluke> Iβll try not to lol |
22:29:00 | FromDiscord | <πΎ br4n_d0n> @ElegantBeef can Nim do a nibble? π |
22:29:27 | FromDiscord | <Elegantbeef> Is this a joke or do you have an elaborated question |
22:29:46 | FromDiscord | <πΎ br4n_d0n> https://tenor.com/view/monkey-gangster-monkey-monk-monke-shaptic-gif-21239890 |
22:30:41 | FromDiscord | <πΎ br4n_d0n> (edit) "https://tenor.com/view/monkey-gangster-monkey-monk-monke-shaptic-gif-21239890" => "π" |
22:31:00 | FromDiscord | <Elegantbeef> So is there a serious question? |
22:31:42 | FromDiscord | <πΎ br4n_d0n> Half serious half joke; my guess is unsigned inter of 8 bits is as low as the language goes |
22:31:42 | FromDiscord | <Elegantbeef> Do you want to know if nim can make a 4bit bitset? |
22:32:11 | FromDiscord | <Elegantbeef> I mean `0b010` is an integer literal |
22:32:25 | FromDiscord | <Elegantbeef> just cause you dont write all 64bits doesnt mean you dont want it to be 64bits |
22:32:33 | FromDiscord | <Elegantbeef> And that's why we have the type declaration |
22:33:33 | FromDiscord | <πΎ br4n_d0n> ``0b1001'u4`` |
22:39:56 | FromDiscord | <Elegantbeef> You cannot do that cause the smallest allocatable memory is 1 byte on modern computers |
22:40:15 | FromDiscord | <Elegantbeef> You can do something similar inside type defs |
22:41:27 | FromDiscord | <haskellandchill> building from source wish me luck |
22:41:43 | FromDiscord | <Elegantbeef> Eh it's quite easy to run `./build_all.sh` |
22:41:53 | FromDiscord | <Elegantbeef> See you in 2-10 minutes π |
22:41:59 | * | gsalazar_ quit (Ping timeout: 246 seconds) |
22:42:20 | * | firq quit (Ping timeout: 246 seconds) |
22:42:35 | FromDiscord | <πΎ br4n_d0n> In reply to @Elegantbeef "You cannot do that": What if you were running on some embedded platform that allowed this and you NEEDED to save the space? |
22:42:57 | FromDiscord | <Elegantbeef> embedded platforms dont generally allow lower allocations either |
22:43:03 | FromDiscord | <Elegantbeef> we're a 8 bit word world |
22:43:14 | FromDiscord | <Elegantbeef> Does exist though |
22:43:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40z0 |
22:44:12 | FromDiscord | <Elegantbeef> for a u4 you'd do `myField {.bitSize: 4.}: 0u8..15u8` |
22:44:37 | FromDiscord | <Elegantbeef> Then you'd only be allowed to use 0..15 |
22:45:12 | FromDiscord | <πΎ br4n_d0n> Lol, so you're setting a range, but does that actually equate to a smaller size? |
22:45:24 | FromDiscord | <Elegantbeef> the `bitsize` is the important part |
22:45:29 | FromDiscord | <Elegantbeef> it forces it to be 4 bits |
22:46:45 | FromDiscord | <Elegantbeef> But if you only have a single field that's 4 bits the system is still going to allocate 8 cause it cannot allocate fewer |
22:46:51 | FromDiscord | <Elegantbeef> Like i said welcome to 8bit words |
22:47:13 | FromDiscord | <πΎ br4n_d0n> Yeah, but you can have 2 nibbles then |
22:48:05 | FromDiscord | <exelotl> lol I've been packing bits today a lot :p |
22:48:14 | FromDiscord | <haskellandchill> lots of warnings but appears to have worked |
22:48:28 | FromDiscord | <πΎ br4n_d0n> BTW, what are ``{. word .}`` in Nim so I can look up the documentation? |
22:48:45 | FromDiscord | <πΎ br4n_d0n> (edit) "are" => "is the term for" |
22:49:13 | FromDiscord | <exelotl> @πΎ br4n_d0n they're pragmas: https://nim-lang.org/docs/manual.html#pragmas |
22:49:16 | FromDiscord | <Elegantbeef> pragma |
22:49:21 | FromDiscord | <πΎ br4n_d0n> Thanks |
22:49:46 | FromDiscord | <haskellandchill> I can run tests with koch, some are failing, maybe I need setup |
22:51:22 | FromDiscord | <haskellandchill> I believe related to libgc.dylib |
22:53:04 | FromDiscord | <haskellandchill> I have libgc so curious |
22:53:17 | FromDiscord | <Elegantbeef> Eh i just pretend like test failures dont exist |
22:53:29 | FromDiscord | <Elegantbeef> If you arent contributing there isnt much reason to be concerned |
22:57:00 | FromDiscord | <haskellandchill> I'm not concerned and yeah it's beyond me I'm not great at C can't figure out how to link libgc |
23:01:14 | FromDiscord | <haskellandchill> more important to me is drnim |
23:01:17 | FromDiscord | <haskellandchill> I have z3 |
23:01:21 | FromDiscord | <haskellandchill> but apparently not libz3 |
23:02:28 | FromDiscord | <haskellandchill> > clang: error: no such file or directory: 'dist/z3/build/libz3.a' |
23:02:40 | FromDiscord | <haskellandchill> I take it I need to build z3 from source and put something where it's looking |
23:03:19 | FromDiscord | <Elegantbeef> Depending on your distro you'll have `libz3.a` |
23:03:19 | FromDiscord | <haskellandchill> oh what do you know it has z3 in dist already |
23:03:49 | FromDiscord | <haskellandchill> hm yeah I think I just have the executable on my path from homebrew which isn't good enough |
23:04:04 | FromDiscord | <Elegantbeef> Ah no clue for mac |
23:04:16 | * | kayabaNerve joined #nim |
23:05:49 | FromDiscord | <haskellandchill> I think I can build z3 from the provided dist/z3 |
23:06:58 | FromDiscord | <Elegantbeef> you can probably do `libz3-dev` or whatever your package manager calls dev packages to get static libraries but idk |
23:07:23 | FromDiscord | <haskellandchill> nah homebrew sucks |
23:21:41 | FromDiscord | <haskellandchill> hm it wants a libz3.a but I have a libz3.dylib |
23:22:55 | FromDiscord | <Elegantbeef> `.a` is a static library |
23:23:10 | FromDiscord | <Elegantbeef> .dylib ia dynamic |
23:24:22 | FromDiscord | <haskellandchill> yea last shot is `--staticlib` option |
23:26:27 | FromDiscord | <haskellandchill> I wish there was a book called How to Build Anything that teaches you this stuff |
23:28:35 | FromDiscord | <haskellandchill> nice I got it |
23:29:42 | FromDiscord | <haskellandchill> hot damn I think it works |
23:31:01 | FromDiscord | <haskellandchill> sweet |
23:31:04 | FromDiscord | <haskellandchill> sent a code paste, see https://play.nim-lang.org/#ix=40z7 |