00:00:01 | * | junland quit (Quit: %ZNC Disconnected%) |
00:00:45 | * | junland joined #nim |
00:20:38 | * | aaronm joined #nim |
00:25:26 | * | aaronm quit (Ping timeout: 265 seconds) |
00:34:14 | * | vicfred joined #nim |
01:05:54 | FromDiscord | <Quibono> Does VSCode give nonsensical warnings to anyone else? |
01:07:33 | FromDiscord | <Quibono> Okay nvm, it seems that the tab sizing was giving it a headache. |
01:09:45 | FromDiscord | <Quibono> Nope, it still thinks I'm not using strformat when I've got a fmt() in there. |
01:12:30 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
01:14:42 | * | tane quit (Quit: Leaving) |
01:45:30 | FromDiscord | <nikki> can we see the code in question / screenshot? |
01:45:41 | FromDiscord | <nikki> but yeah some times nimsuggest keks out |
01:50:26 | FromDiscord | <Quibono> @nikki I think I might just be bad at Nim at this point. Like this code errors out (Generic instantiation of async for one) and I have no clue why. https://play.nim-lang.org/#ix=2F1z |
01:56:11 | FromDiscord | <Quibono> Okay, I figured out why it was unhappy with the headers. Still feel like I'm walking through sand. |
01:56:34 | * | xace quit (Ping timeout: 246 seconds) |
01:59:39 | FromDiscord | <Quibono> Can somebody explain what the hell "Generic instantiation of x" means, and how I avoid it? That seems to be a frequent error I see. |
02:03:37 | FromDiscord | <nikki> it's ok, it's just the string that happens to be in the compiler for that case, it's nothing personal ๐ |
02:05:08 | FromDiscord | <nikki> bc. of the amt of metaprogramming involved some times errors cause a chain reaction and the result is abstracted away from the specific fix you need some times; esp. if specific types of common human errors aren't explicitly watched out for by the compiler |
02:06:02 | FromDiscord | <nikki> anyways when you have `proc foo[T](... x: T ...): ... T ...` -- an instantiation is a when you materialize a specific version of that proc for a specific `T` like `int` or `string` or one of your own types like `HealthData` or whatever |
02:06:32 | FromDiscord | <nikki> the compiler is doing this when compiling the program, and refers to that concept in error messages |
02:07:57 | FromDiscord | <nikki> i haven't written a ton of code against the apis you're using in that code snippet, so it's hard to say without looking at the actual error message itself (which i can't get by running it on play-nim because it imports some module that isn't standard) |
02:08:34 | FromDiscord | <nikki> ah you ned to declare the `var` outside the `if` |
02:08:46 | FromDiscord | <nikki> so likes 10-13 |
02:08:48 | FromDiscord | <nikki> can you replace that with |
02:09:04 | FromDiscord | <nikki> `var baseUrl = if live: liveURL else: demoURL` |
02:09:28 | FromDiscord | <nikki> can explain once you try |
02:09:36 | FromDiscord | <nikki> it may also not solve the entire issue |
02:09:52 | FromDiscord | <Quibono> Yeah I realized that a little bit ago and fixed the issue, I guess I'm just salty the compiler can't read my mind. |
02:10:01 | FromDiscord | <nikki> the other thing is -- i honestly recommend not using `fmt` for what you're doing here (which is appending two strings) |
02:10:05 | FromDiscord | <nikki> just do `a & b` |
02:10:14 | FromDiscord | <nikki> but if you're planning to evolve this to a larger format, maybe i can see the reasoning |
02:10:38 | FromDiscord | <nikki> that's not a train of thought worth going down (whether the compiler can read your mind) |
02:11:21 | FromDiscord | <nikki> but yeah i just use `a & b` and also if i have a proc that tends to take a "long message" |
02:11:32 | FromDiscord | <nikki> i make it take a `varargs[string, $]`, like `echo` does |
02:11:48 | FromDiscord | <nikki> which lets you do `foo("hey there, ", name, "!")` type stuff |
02:13:19 | FromDiscord | <nikki> also just initializing a local `var buf: string` and then doing `buf.add("stuff"); buf.add($3)` etc. over and over is nice for a 'build things up' use case |
02:14:24 | FromDiscord | <nikki> --โตalso has anyone managed to get `collect` from 'sugar' working with constructing json collections? |
02:14:39 | FromDiscord | <nikki> like `collect(newJArray): for elem in something: elem` |
02:15:03 | FromDiscord | <nikki> maybe `%elem` in this case |
02:15:10 | FromDiscord | <nikki> haven't been having success here |
02:15:14 | FromDiscord | <Quibono> I didn't realize you could use &, thank you. |
02:15:40 | FromDiscord | <nikki> yeah `&` should work for most cases |
02:15:58 | FromDiscord | <nikki> the compiler usually figures out a nice string init + append + append + append ... for you behind the scenes |
02:21:13 | FromDiscord | <Quibono> Thank you. I'm trying to write an API interface and it's erm very interesting being new to Nim. |
02:21:18 | FromDiscord | <Quibono> And a fairly novice programmer. |
02:21:30 | * | aaronm joined #nim |
02:23:27 | * | xace joined #nim |
02:24:57 | FromDiscord | <nikki> is it fun |
02:25:59 | Zoom[m] | Eh, does std have a sorted table? |
02:26:03 | * | aaronm quit (Ping timeout: 260 seconds) |
02:27:40 | Zoom[m] | I'd like to iterate over countTable in order (by keys, not by value) |
02:28:57 | * | apahl quit (Ping timeout: 260 seconds) |
02:30:40 | * | apahl joined #nim |
02:39:04 | FromDiscord | <Quibono> have you looked through the tables library in the std? IDK if it has it, but it's the only tables one. |
02:54:10 | mipri | OrderedTable's .sort looks useful |
02:57:14 | * | clyybber quit (Quit: WeeChat 3.0) |
03:19:09 | FromDiscord | <nikki> is there some shortcut for `block: let thing = ...; ... stuff with thing ...; thing` |
03:19:23 | FromDiscord | <nikki> that maybe just names it `it` |
03:19:33 | FromDiscord | <nikki> in the standard library |
03:19:35 | FromDiscord | <nikki> looks like no |
03:19:58 | FromDiscord | <nikki> just have some code that looks like: https://play.nim-lang.org/#ix=2F1U |
03:20:33 | FromDiscord | <nikki> maybe i should make a `blockIt` macro lol |
03:20:59 | FromDiscord | <nikki> also wish `collect` worked on json types -- but maybe i'm just doing it wrong when i tried |
03:38:20 | FromDiscord | <ElegantBeef> @nikki so did you implement the blockit? ๐ |
03:44:08 | FromDiscord | <nikki> haha for now this doesn't happen often enough that i'd wanna |
03:44:12 | FromDiscord | <nikki> but maybe i will if it comes up |
03:44:32 | * | lritter quit (Remote host closed the connection) |
03:44:47 | FromDiscord | <nikki> still working toward reaching parity with the c++ engine; once that happens it'll be a good point to give the code a look over |
03:44:49 | FromDiscord | <nikki> have been collecting some notes |
03:45:30 | FromDiscord | <nikki> actually may just make `blockIt` anyways outside the project as an exercise |
03:45:51 | FromDiscord | <ElegantBeef> It's a rather quick to make macro |
03:46:00 | FromDiscord | <nikki> yeah seems like it should be |
03:46:14 | FromDiscord | <nikki> i think it's just a template |
03:46:34 | FromDiscord | <ElegantBeef> Yea you should be able to use a template |
03:47:04 | FromDiscord | <nikki> `template blockIt(expr, body): block: var it {.injected} = expr; body; it` |
03:47:06 | FromDiscord | <nikki> that seems like it right |
03:47:09 | FromDiscord | <nikki> where `;` is newlines |
03:47:39 | FromDiscord | <nikki> ugh sorry i barfed on the `: untyped =` at the end of the header |
03:52:05 | FromDiscord | <Quibono> Is there a better way to insert something in the middle of a string than fmt? |
03:52:24 | FromDiscord | <ElegantBeef> There are string templates |
03:52:43 | FromDiscord | <nikki> @Quibono depends on what exactly you mean tbh |
03:53:05 | FromDiscord | <nikki> if you have mostly literals on either side, that's different from inserting sth in the middle of a runtime string (say, something a variable is referring to) |
03:53:33 | FromDiscord | <Quibono> So I've got a url "/v3/accounts/{accountid}/instruments" |
03:53:55 | FromDiscord | <nikki> ah, this is actually a case to consider fmt |
03:54:08 | FromDiscord | <nikki> i'd probably just use `&` myself bc. /shrug |
03:54:24 | FromDiscord | <Quibono> Lol is either faster under the hood? |
03:54:30 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/os.html#/%2Cstring%2Cstring |
03:54:30 | FromDiscord | <nikki> like `"/foo/" & thingy & "/bar"` |
03:54:34 | FromDiscord | <Quibono> like double & vs fmt |
03:54:42 | FromDiscord | <ElegantBeef> Just use the proc i gave |
03:55:00 | FromDiscord | <nikki> that proc decides based on the os you're running on, which is probably not what you want for urls |
03:55:28 | FromDiscord | <ElegantBeef> ~~Fuck windows~~ |
03:55:42 | FromDiscord | <nikki> better just write good code instead |
03:56:02 | FromDiscord | <Quibono> lol |
03:56:06 | Prestige | I agree, Beef |
03:56:10 | FromDiscord | <nikki> @Quibono i can try out both and let you know on a bit, will just look at the generated C |
03:56:10 | FromDiscord | <ElegantBeef> I'm saying fuck windows using `\` as the default seperator |
03:56:27 | FromDiscord | <nikki> i just think using the os module for concatenating urls is just bad coding |
03:56:32 | FromDiscord | <nikki> because urls aren't about operating systems |
03:56:56 | FromDiscord | <nikki> the format is a separate spec from file system path specs |
03:57:00 | * | j-james quit (Quit: Leaving.) |
03:57:15 | FromDiscord | <nikki> even though it looks like the character is the same |
03:57:24 | FromDiscord | <ElegantBeef> I mean i didnt read url so... |
03:57:49 | FromDiscord | <nikki> yeah "/v3/accounts/{accountId}/instruments" seems like a v classic url situation |
03:58:05 | FromDiscord | <Quibono> Yeah it's a URL for a forex broker. |
03:58:20 | FromDiscord | <nikki> is there urlutils or sth |
03:58:49 | FromDiscord | <nikki> in any case, if it were to exist, that's what to use. otherwise, that's what to build up yourself or depend on. or just use `&` haha |
03:59:00 | FromDiscord | <ElegantBeef> the uri module possibly |
03:59:18 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/uri.html#basic-usage-combine-uris |
03:59:19 | * | j-james joined #nim |
03:59:39 | FromDiscord | <nikki> https://nim-lang.org/docs/uri.html#%2F%2CUri%2Cstring |
03:59:45 | FromDiscord | <nikki> @Quibono this is actually pretty spot on for what you wanna do |
04:00:45 | FromDiscord | <Quibono> Cool, thanks. |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:36 | * | supakeen joined #nim |
04:13:45 | * | azed joined #nim |
04:14:34 | FromDiscord | <treeform> Why does strformat raise ValueError? Should I wrap all of my $ to not raise it? Is there a way to use strformat so that it does not do that? |
04:15:03 | disruptek | concepts will let you down. stay away from them for now. |
04:15:21 | * | azed quit (Client Quit) |
04:15:41 | * | azed joined #nim |
04:16:30 | FromDiscord | <treeform> @nikki I made this url library because I found current urls not sufficient https://github.com/treeform/urlly |
04:18:34 | FromDiscord | <treeform> @Quibono So you want a url thing that can easily add paths to together? How do you think that should look like? |
04:20:03 | FromDiscord | <Quibono> Honestly I just want something that looks pretty and is fast. ๐ฎ |
04:22:39 | FromDiscord | <ElegantBeef> Treeform i noticed pixie doesnt end with a y, you have to legally change that |
04:24:10 | FromDiscord | <treeform> Original name was pixxy |
04:24:18 | FromDiscord | <treeform> but its to foreign looking |
04:24:33 | FromDiscord | <treeform> pixie is a real word and sounds like its ends on a y |
04:24:54 | FromDiscord | <treeform> so we went with a real word |
04:25:20 | FromDiscord | <ElegantBeef> I forgive you |
04:25:34 | FromDiscord | <treeform> thanks, means a lot. |
04:26:33 | FromDiscord | <ElegantBeef> Well i did respect you, but now you lie to my face |
04:26:47 | disruptek | get used to it. |
04:31:53 | FromDiscord | <treeform> @ElegantBeef I am not laying to you, just playing along, cheer up! |
04:32:08 | FromDiscord | <ElegantBeef> I was also joking around |
04:32:15 | disruptek | not me. |
04:33:26 | * | vicfred quit (Quit: Leaving) |
04:36:19 | * | azed quit (Quit: WeeChat 2.9) |
04:48:24 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:45:58 | planetis[m] | disruptek: whats genSym artifacts and how do i catch em? |
05:46:32 | planetis[m] | Oops wrong choice of words, this can go south |
05:48:11 | * | NimBot joined #nim |
05:56:40 | disruptek | a symbol created with genSym needs to be rendered as `ident(repr sym)` in order to capture the unique name correctly. |
06:12:06 | planetis[m] | ok thanks will try that |
06:16:11 | * | vicfred joined #nim |
06:17:05 | * | vicfred quit (Max SendQ exceeded) |
06:17:36 | * | vicfred joined #nim |
06:43:32 | FromDiscord | <iWonderAboutTuatara> Has anybody tried using raylib forever? |
06:43:45 | FromDiscord | <iWonderAboutTuatara> For me, the raylib.nim file has errors |
06:43:50 | FromDiscord | <iWonderAboutTuatara> and so I can't use it |
06:47:16 | FromDiscord | <ElegantBeef> What are the errors? |
06:56:50 | * | habamax joined #nim |
06:57:04 | FromDiscord | <iWonderAboutTuatara> I don't know |
06:57:06 | FromDiscord | <iWonderAboutTuatara> how do I tell |
06:57:34 | FromDiscord | <ElegantBeef> Compile it |
07:01:55 | FromGitter | <cupen> Hello guys. I'm experiencing a little problem. |
07:02:28 | FromGitter | <cupen> Here is my code. โ โ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fba0d046a738b71d35761f0] |
07:03:17 | FromGitter | <cupen> It compiled failed. beacuse https://github.com/nim-lang/redis/blob/c02d404aa3989fd4d464e9c4ed497e28c6926fa2/src/redis.nim#L92. |
07:04:11 | FromGitter | <cupen> So, what is `6379.Port` ? โ โ ```proc open*(host = "localhost", port = 6379.Port): Redis =``` [https://gitter.im/nim-lang/Nim?at=5fba0d6a0451324f152ac8d2] |
07:05:09 | FromDiscord | <ElegantBeef> Port is a distinct uint16, so that's converting 6379 to Port |
07:06:18 | FromGitter | <cupen> > *<FromDiscord>* <ElegantBeef> Port is a distinct uint16, so that's converting 6379 to Port โ โ Thanks, where is the `Port` 's define? |
07:06:28 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/nativesockets.html#%24%2CPort |
07:07:05 | FromGitter | <cupen> Thanks again. ๐ |
07:10:38 | FromGitter | <cupen> Another my stupid question. How to convert a int to Port? or how to convert a string to Port? |
07:10:58 | FromDiscord | <ElegantBeef> int to port is just the `Port(int)` or `int.Port` |
07:11:04 | FromDiscord | <ElegantBeef> string requires you to parseint from strutils |
07:11:30 | FromGitter | <cupen> > *<FromDiscord>* <ElegantBeef> int to port is just the `Port(int)` or `int.Port` โ โ Thank you very much. |
07:18:41 | * | narimiran joined #nim |
07:18:55 | * | narimiran quit (Remote host closed the connection) |
07:20:14 | * | narimiran joined #nim |
07:29:48 | bung | `await request.client.recvInto(request.buf[0].addr, maxLine,flags = {})` stucked but recvLine works on macos, any idea ? |
07:53:21 | * | Zevv quit (Quit: Lost terminal) |
07:53:50 | * | Zevv joined #nim |
08:01:02 | FromGitter | <deech> Why does calling `varargsLen` in a `proc` always `1` but in a `template` it returns the right number of `varargs`? โ โ `````` [https://gitter.im/nim-lang/Nim?at=5fba1abe0451324f152ae26d] |
08:01:05 | FromGitter | <deech> https://play.nim-lang.org/#ix=2F3a |
08:04:38 | FromGitter | <deech> Boy that was a train wreck, let me try again: โ Why does calling `varargsLen` in a `proc` always return `1` but in a `template` it returns the right number of `varargs`? eg. https://play.nim-lang.org/#ix=2F3a |
08:09:33 | FromDiscord | <ElegantBeef> I have no idea why, but you can just use `.len` in a proc |
08:10:05 | FromDiscord | <ElegantBeef> Actually it's a macro so that's probably the reason ๐ |
08:10:05 | FromDiscord | <iWonderAboutTuatara> I noticed this earlier |
08:10:07 | FromDiscord | <iWonderAboutTuatara> probably a bug |
08:10:14 | FromDiscord | <iWonderAboutTuatara> oh mayeb |
08:10:15 | FromDiscord | <iWonderAboutTuatara> probably |
08:10:29 | FromDiscord | <iWonderAboutTuatara> if it's a proc just use .len I think |
08:10:34 | FromDiscord | <iWonderAboutTuatara> yeah beef is right |
08:12:12 | FromGitter | <deech> That makes sense. Thanks! Should probably be part of `varargsLen` docs. |
08:12:46 | FromGitter | <deech> Or better yet a warning if used in a proc that way, it's almost certainly not what was intended. |
08:19:04 | * | audiofile joined #nim |
08:19:16 | * | audiofile quit (Client Quit) |
08:20:54 | FromDiscord | <ElegantBeef> Weirdly it's just `len` |
08:23:28 | * | aaronm joined #nim |
08:28:25 | * | aaronm quit (Ping timeout: 264 seconds) |
08:47:39 | * | andinus is now known as notandinus` |
08:50:50 | * | notandinus` quit (Quit: ERC (IRC client for Emacs 27.1)) |
10:02:11 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
10:07:25 | FromDiscord | <Elizabeth Afton> I have, could you please describe the error? |
10:09:49 | FromDiscord | <Elizabeth Afton> If you're using the files generated from https://github.com/Guevara-chan/Raylib-Forever, id on't know why it doesn't work even after i tried many things |
10:10:49 | FromDiscord | <Elizabeth Afton> But then i found https://github.com/tomc1998/nim-raylib which uses a few of those files and has some extra utilities and it works fine for me with no issues |
10:10:54 | FromDiscord | <Elizabeth Afton> Hope that helps! |
10:20:37 | FromDiscord | <iWonderAboutTuatara> I'll eb sure to take a look into that! thanks |
10:20:45 | FromDiscord | <Elizabeth Afton> No worries! |
10:21:28 | FromDiscord | <iWonderAboutTuatara> It seems slightly out of date |
10:21:43 | FromDiscord | <iWonderAboutTuatara> A month or so |
10:21:54 | FromDiscord | <iWonderAboutTuatara> shouldn't be a hueg problem, but idk |
10:22:01 | FromDiscord | <Elizabeth Afton> Yeah, but it works fine |
10:22:12 | FromDiscord | <iWonderAboutTuatara> I tried wrapping it myself using c2nim, but got the weirdest of errors |
10:22:23 | FromDiscord | <iWonderAboutTuatara> `/mnt/d/Scripts/Misc/Nim/Nim/raylib-nim/raylib/src/raylib.h(99, 1) Error: did not expect #` |
10:22:28 | FromDiscord | <Elizabeth Afton> I used it a few weeks ago and i tested out the examples (i rewritten them into Nim code but eh) |
10:22:35 | FromDiscord | <Elizabeth Afton> Hm |
10:22:51 | FromDiscord | <iWonderAboutTuatara> If I can get it to work, I think I will try using nimterop |
10:22:57 | FromDiscord | <Elizabeth Afton> I'm not an expert at that type of stuff but maybe Nimterop would be better? |
10:23:00 | FromDiscord | <Elizabeth Afton> Oki! |
10:24:18 | * | aaronm joined #nim |
10:24:50 | FromDiscord | <iWonderAboutTuatara> I tried using the toast tool |
10:24:57 | FromDiscord | <iWonderAboutTuatara> which is commandline for nimterop I think |
10:25:05 | FromDiscord | <iWonderAboutTuatara> but it doesn't seemt o want to actually convert the code |
10:25:12 | FromDiscord | <Elizabeth Afton> Hm |
10:25:17 | FromDiscord | <iWonderAboutTuatara> It just gives me the first x lines of the acualy raylib.h file |
10:25:28 | FromDiscord | <iWonderAboutTuatara> toast raylib.h -p -o=raylib.nim --check |
10:25:31 | FromDiscord | <iWonderAboutTuatara> is the ammand I used |
10:25:33 | FromDiscord | <iWonderAboutTuatara> command |
10:25:42 | FromDiscord | <Elizabeth Afton> There should be an alternative wrapper you can use which is better, but idk |
10:25:50 | FromDiscord | <iWonderAboutTuatara> I couldn't find any |
10:25:58 | FromDiscord | <Elizabeth Afton> Hm |
10:26:06 | FromDiscord | <iWonderAboutTuatara> Worst case I use the one you sent, which is completely ok |
10:26:14 | FromDiscord | <iWonderAboutTuatara> latest release I think was aug 1 |
10:26:22 | FromDiscord | <Elizabeth Afton> Yeah :/ |
10:26:22 | FromDiscord | <Elizabeth Afton> https://github.com/define-private-public/raylib-Nim |
10:26:28 | FromDiscord | <Elizabeth Afton> https://github.com/Skrylar/raylib-nim |
10:26:32 | FromDiscord | <Elizabeth Afton> Found those 2 |
10:26:51 | FromDiscord | <iWonderAboutTuatara> there are quite a few |
10:26:53 | FromDiscord | <iWonderAboutTuatara> but they're not update |
10:26:55 | FromDiscord | <iWonderAboutTuatara> d |
10:27:16 | FromDiscord | <Recruit_main707> whats the issue with raylib forever? |
10:27:23 | FromDiscord | <Elizabeth Afton> Yeah, that's the only issue :/ |
10:27:31 | FromDiscord | <iWonderAboutTuatara> raylib.nim has 9 compile errors |
10:27:33 | FromDiscord | <Elizabeth Afton> It gives an error |
10:27:52 | FromDiscord | <Elizabeth Afton> In the one by tomc? |
10:28:01 | FromDiscord | <iWonderAboutTuatara> no, the raylib forever bindings |
10:28:33 | FromDiscord | <Elizabeth Afton> Oh, yeah that's what happened when i tried using them too |
10:28:34 | FromDiscord | <iWonderAboutTuatara> oh the ones by tomc don't ahve raygui etc |
10:28:37 | FromDiscord | <iWonderAboutTuatara> I think I need raygui |
10:28:50 | * | aaronm quit (Ping timeout: 256 seconds) |
10:29:00 | FromDiscord | <Elizabeth Afton> I just used raygui from raylib forever, since there's no errors there |
10:29:06 | FromDiscord | <iWonderAboutTuatara> oh that's a good idea |
10:29:13 | FromDiscord | <Elizabeth Afton> Yeah haha |
10:29:15 | FromDiscord | <iWonderAboutTuatara> That's really smart |
10:29:25 | FromDiscord | <iWonderAboutTuatara> That pretty much solves all the problems |
10:29:31 | FromDiscord | <Elizabeth Afton> Yeah lmao |
10:29:33 | FromDiscord | <iWonderAboutTuatara> But I am interested to see if I can make bidnings for raylib |
10:29:57 | FromDiscord | <Elizabeth Afton> That'd be cool if you did, i'd definitely like to be updated on that |
10:30:11 | FromDiscord | <iWonderAboutTuatara> If I get it to work, I'll post it on nim forums |
10:30:15 | FromDiscord | <Elizabeth Afton> Although i don't use discord much anymore |
10:30:26 | FromDiscord | <iWonderAboutTuatara> @ElegantBeef sorry for the tag, but any idea why c2nim complains that |
10:30:28 | FromDiscord | <Elizabeth Afton> That'd be cool, looking forward to that! |
10:30:31 | FromDiscord | <iWonderAboutTuatara> `/mnt/d/Scripts/Misc/Nim/Nim/raylib-nim/raylib/src/raylib.h(99, 1) Error: did not expect #` |
10:30:56 | FromDiscord | <iWonderAboutTuatara> nimterop is being super weird, I think I can't wrap on commandline or something |
10:31:21 | FromDiscord | <Elizabeth Afton> Also i recommend using https://github.com/tomc1998/nim-raylib/blob/master/src/raylib_util.nim as it might help you with Raylib development |
10:31:43 | FromDiscord | <iWonderAboutTuatara> oh that's nice |
10:31:46 | FromDiscord | <iWonderAboutTuatara> just some utility stuff |
10:31:53 | FromDiscord | <Elizabeth Afton> Mhm |
10:32:06 | FromDiscord | <iWonderAboutTuatara> I'll use that regardless of whether or not I end up wrapping it myself |
10:32:20 | FromDiscord | <Elizabeth Afton> Cool! |
10:32:29 | FromDiscord | <Elizabeth Afton> Glad i was able to help |
10:52:19 | * | j-james quit (Quit: Leaving.) |
10:54:38 | * | narimiran quit (Ping timeout: 260 seconds) |
10:59:37 | * | ehmry joined #nim |
11:01:22 | FromDiscord | <Scarecrow> in python there are ctypes. What s about nim - is it possible to use some c/cpp code directly from it? |
11:02:26 | FromDiscord | <Scarecrow> also is it possible to use python or some other scripting language (lua, angelscript, etc) |
11:02:48 | Prestige | You can use C libs in Nim with a wrapper, yes |
11:03:33 | Prestige | This might be a good read: https://gist.github.com/zacharycarter/846869eb3423e20af04dea226b65c18f |
11:11:05 | FromDiscord | <Elizabeth Afton> And Nim has NimScript |
11:11:49 | FromDiscord | <Elizabeth Afton> Supports nearly most features from Nim iirc (not all because some things need to be compiled, but don't quote me on that) |
11:12:58 | FromDiscord | <flywind> python: !repo nimpy |
11:13:07 | FromDiscord | <flywind> !repo nimpy |
11:13:07 | disbot | query failed ๐ข |
11:13:21 | FromDiscord | <Elizabeth Afton> https://github.com/yglukhov/nimpy |
11:13:35 | FromDiscord | <Elizabeth Afton> Nimpy is awesome, but pure Nim is even better- |
11:13:42 | FromDiscord | <flywind> lua: https://github.com/jangko/nimLUA |
11:14:46 | FromDiscord | <Elizabeth Afton> Just about to send that haha |
11:14:49 | FromDiscord | <Recruit_main707> @Scarecrow as they said, you can wrap c/cpp code in a similar way to how you do it in ctypes |
11:14:59 | FromDiscord | <Elizabeth Afton> (edit) "Just" => "Was just" |
11:47:46 | Zoom[m] | Guys and ladies, doesn't it concern you that STD doesn't have a sorted table? I thought having something like a B-Tree was pretty standard these days |
11:56:14 | FromDiscord | <haxscramper> we have binary tree in fusion |
11:56:41 | FromDiscord | <haxscramper> https://nim-lang.github.io/fusion/src/fusion/btreetables.html |
11:58:13 | Zoom[m] | Ah, thanks. That's better. How stable fusion is? |
11:58:47 | Zoom[m] | I mean, chances it migrates into STD proper are slim, right? |
11:59:50 | FromDiscord | <haxscramper> Fusion is stable |
12:00:09 | FromDiscord | <haxscramper> And it is shipped by default now, so you don't need to install it |
12:00:10 | FromDiscord | <Recruit_main707> iirc nim didnt want to have a huge stdlib, and tries to keep it simple |
12:00:21 | FromDiscord | <haxscramper> !eval import fusion/btreetables |
12:00:23 | NimBot | <no output> |
12:00:56 | FromDiscord | <Recruit_main707> !eval import opengl |
12:00:57 | NimBot | Compile failed: /usercode/in.nim(1, 8) Error: cannot open file: opengl |
12:01:04 | FromDiscord | <haxscramper> Yeah, AFAIK for 1.4+ it is shipped with regular nim installation, no additional work needed. So it is kind of std++ |
12:02:51 | FromDiscord | <Recruit_main707> but i think there is no issue with having a simple stdlib, specially since nim has an official package manager and makes it very easy to add 3rd party libraries to your code |
12:04:43 | ForumUpdaterBot | New thread by Fxn: Are these constants effectively saving computations?, see https://forum.nim-lang.org/t/7138 |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:37 | * | supakeen joined #nim |
12:25:12 | * | aaronm joined #nim |
12:29:32 | * | aaronm quit (Ping timeout: 256 seconds) |
12:39:20 | * | PMunch joined #nim |
12:45:39 | PMunch | New stream tonight! Adding some features to notifishower, and showing how it can be used to create custom notifications for things. Aiming to start at 17UTC. |
12:47:01 | FromDiscord | <Quibono> @nikki I just benchmarked it and using two & is about twice as fast as fmt() |
13:00:48 | FromGitter | <alehander92> Araq I can just revert and rebase to a working state |
13:00:49 | FromGitter | <alehander92> my pr |
13:02:02 | * | hmmm joined #nim |
13:03:53 | * | ehmry quit (Read error: Connection reset by peer) |
13:07:11 | * | ehmry joined #nim |
13:11:51 | FromGitter | <HJarausch_gitlab> I'd like to write a proc 'Sum' which has a can be passed a Slice or 'countup(...)'. What type should this parameter have. I cannot pass 'countup(..)' to parameter of type Slice. Thanks for a hint, Helmut |
13:13:33 | PMunch | Well, unfortunately for you `countup` is an iterator |
13:13:59 | PMunch | And iterators (not closure iterators) work by rewriting the AST, so they don't really have a type as such |
13:15:05 | PMunch | There is a way around this however, and that is by creating an Iterateable concept and wrapping it in a closure iterator |
13:15:24 | PMunch | Or by making your sum proc a macro instead |
13:15:34 | * | tane joined #nim |
13:20:00 | * | luis_ joined #nim |
13:20:22 | * | habamax quit (Quit: leaving) |
13:22:03 | FromDiscord | <haxscramper> Or make a proc that returns closure iterator. https://play.nim-lang.org/#ix=2F5i |
13:22:21 | FromDiscord | <haxscramper> Kind of strange there is no `items` overload for closure iterators though |
13:22:56 | * | xace quit (Ping timeout: 240 seconds) |
13:25:03 | * | habamax joined #nim |
13:25:07 | * | xace joined #nim |
13:28:36 | FromGitter | <HJarausch_gitlab> @PMunch How to "Iterateable concept and wrapping it in a closure iterator". @FromDiscord thanks for the example, still, I don't see how to pass [in Python syntax] either 'range(0,7)' or 'range(0,7,2)' - and 'Sum' was only a simple example |
13:30:34 | PMunch | Weeeell, it's a bit tricky.. |
13:31:00 | PMunch | For now just create a template `wrap` that wraps an iterator into a closure iterator and use that instead |
13:32:42 | * | aaronm joined #nim |
13:33:11 | FromGitter | <cupen> In nim way, how to write `for (int i = 0; i < 100; i++) `?? |
13:33:23 | PMunch | `for i in 0..<100` |
13:33:51 | FromGitter | <cupen> Thanks |
13:35:14 | FromDiscord | <haxscramper> @HJarausch_gitlab if you only need something like python `range` you can do it just ifne with regular iterators - https://play.nim-lang.org/#ix=2F5t |
13:36:09 | FromDiscord | <haxscramper> Although `range` is an identifier name for a type from system, so you might want to use different name. That is, for python-like 'range' |
13:36:21 | PMunch | @haxscramper, I think he wants to take the equivalent of Pythons range as an argument |
13:37:57 | * | PMunch quit (Quit: leaving) |
13:38:30 | FromDiscord | <haxscramper> Then https://play.nim-lang.org/#ix=2F5y |
13:41:23 | FromDiscord | <haxscramper> Python's `range` is a class actually (I thought it is some kind of magic built-in) with `index` index defined, so example above should be pretty similar both from use-case standpoint and implementation (object (or object-like thing in case of `iterator(): int`) with some special magic going on inside). |
13:41:55 | FromGitter | <HJarausch_gitlab> @FromDiscord Yes thanks, that's exactly what I was looking for. Still, why do I need that 'iterator itemsT (it: iterator(): T): T', isn't that built into Nim already? |
13:42:24 | FromDiscord | <haxscramper> apparently no, although I was also surprised that it isn't |
13:42:55 | FromDiscord | <haxscramper> E.g. it is probably very logical thing to do |
13:43:22 | FromDiscord | <haxscramper> when you have closure iterator and want to use it in for loop |
13:44:17 | FromDiscord | <haxscramper> Maybe I should just PR it into stdlib now |
13:46:24 | FromGitter | <HJarausch_gitlab> I'd like to suggest to extend the 'collect' macro to include (standard Nim's bit) set. If that would be available I wouldn't need that "passing an iterator around" stuff in my current case. Still, it is very interesting. |
13:49:51 | FromDiscord | <lqdev> that's a good idea |
13:50:02 | FromDiscord | <lqdev> i'm quite surprised it doesn't support them |
13:50:11 | FromDiscord | <lqdev> probably an oversight |
13:50:25 | FromDiscord | <lqdev> @HJarausch_gitlab can you open an issue on github? |
13:53:24 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=2F5K |
13:53:24 | * | hmmm quit (Ping timeout: 240 seconds) |
13:53:30 | FromDiscord | <haxscramper> It does support `set[T]` |
13:53:53 | FromDiscord | <haxscramper> But again, you need to use some non-obvious `proc initSet[A](): set[A] = discard` thing |
13:54:21 | FromDiscord | <haxscramper> Which does not come with stdlib |
13:55:20 | FromDiscord | <haxscramper> I can add `initSet` too - will be PR'ing `items` for `iterator(): T` anyway so |
13:56:59 | FromDiscord | <haxscramper> Although I don't know where I should put it exactly. `newSeq` is in `std/system`, probably makes sense to add `initSet` too. |
14:05:22 | FromGitter | <HJarausch_gitlab> @FromDiscord I've tried to adapt your example (https://play.nim-lang.org/#ix=2F5R) but is crashes Nim 1.5.1 git hash: d9038ed792b923cfbb9593ab82825fdb48728adc) |
14:06:08 | FromDiscord | <lqdev> @haxscramper imo something like `collect(set[uint16] {})` should be supported too |
14:06:58 | FromGitter | <HJarausch_gitlab> I've fixed my example https://play.nim-lang.org/#ix=2F5T but it still crashes |
14:07:21 | FromDiscord | <lqdev> btw @HJarausch_gitlab, FromDiscord is the bot that bridges discord to IRC and Gitter. if you want to ping any of us, use the name in <> in the bot's message |
14:07:26 | FromDiscord | <haxscramper> `nnkCall, nnkIdent, nnkSym` - @HJarausch_gitlab you can only use identifier or call in `collect` argument |
14:08:24 | FromDiscord | <haxscramper> E.g. you probably expect it to work like this, but not it is not supported. But probablt should be though, |
14:09:06 | FromDiscord | <haxscramper> Becase it took me a good 10 minutes to figure out how return types are derived from argument+body |
14:09:31 | FromDiscord | <haxscramper> E.g. `collect(seq[int])` is perfectly reasonable way to write things |
14:09:53 | FromDiscord | <haxscramper> Well, not 'reasonable', but I can clearly see how someone tries to do this |
14:09:57 | FromDiscord | <lqdev> the details are revealed if you use `collect(set[uint16]({}))` - it does `set[uint16]({})[typeof(<body>)]` |
14:10:33 | FromDiscord | <lqdev> but you have to have an understanding of macros to actually know what the error message means |
14:12:07 | FromDiscord | <haxscramper> If only `expandMacros` worked for malformed code. But I guess it is quite hard to do right in the first place |
14:14:59 | * | kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in) |
14:21:32 | * | luis_ quit (Quit: luis_) |
14:26:46 | FromGitter | <cupen> Sorry, I have a new stupid question. why it's a syntax error? โ โ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fba7526771c185e0ebda9ed] |
14:29:46 | FromGitter | <cupen> oh, I see. โ โ ```code paste, see link``` โ โ this would be ok. [https://gitter.im/nim-lang/Nim?at=5fba75daabf6a739a6ab1dd9] |
14:58:29 | * | luis_ joined #nim |
15:07:43 | FromGitter | <HJarausch_gitlab> Oh well, yet another problem. If I invoke Nim as โ nim c -d:DEBUG:true -r mytest.nim โ how can I get at the value of 'DEBUG' within a 'when' clause in mytest.nim? โ Checking โ when defined(DEBUG) ... [https://gitter.im/nim-lang/Nim?at=5fba7ebfb03a464f08268a1a] |
15:09:37 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-time-define-pragmas |
15:10:22 | FromDiscord | <haxscramper> But I would recommend to avoid `SCREAMING` defines, and use `-d:debug` + `when defined(debug)` |
15:28:54 | * | luis1 joined #nim |
15:37:47 | Zevv | does "result" vs "return" help with RVO optimizations? |
15:38:12 | Zevv | oh wait, drop the last word, that's redundant |
15:39:57 | FromDiscord | <Rika> It should, yes |
15:40:27 | Zevv | I've been trying to make a practical example where I can see one performs better then the other, but I have failed up to now |
15:43:56 | Zevv | oh wait I *can* |
15:44:07 | Zevv | but it's so trivial that I would have expected Nim to figure that on out |
15:45:05 | Amun_Ra | Zevv: there's a third way: a value alone |
15:46:02 | Amun_Ra | Zevv: https://play.nim-lang.org/#ix=2F6A |
15:46:41 | Zevv | sure |
15:46:54 | Zevv | but I was wondering why Nim did not pick up a simple single assignment and return |
15:47:02 | * | luis1 quit (Quit: WeeChat 2.9) |
15:47:03 | * | luis_ quit (Quit: luis_) |
15:47:05 | Amun_Ra | hm |
15:48:35 | * | Guest94576 joined #nim |
15:51:03 | Zevv | https://play.nim-lang.org/#ix=2F6F |
15:52:02 | Zevv | doesn't make sense to run that in debug mode tho |
15:52:34 | FromGitter | <alehander92> Araq |
15:52:35 | Zevv | With the C++ backend the 3d option is twice as slow |
15:52:37 | FromGitter | <alehander92> ok i pushed |
15:52:37 | Zevv | as the other ones |
15:52:42 | FromGitter | <alehander92> a fixed old version |
15:52:49 | FromGitter | <alehander92> you can merge this .. eventually as an alpha |
15:53:16 | FromGitter | <alehander92> if it looks ok enough and if we fix the CI |
15:53:44 | FromGitter | <alehander92> it seems my strictnotnil enabled tests pass locally, but i am not sure why i had fails there, have to debug now |
15:54:03 | Zevv | strictnotnil sounds like some kind of italian type of pasta |
15:54:20 | * | Guest94576 quit (Ping timeout: 256 seconds) |
15:54:22 | Zevv | or a new covid vaccin with at least 96% success rate |
15:54:39 | FromGitter | <alehander92> this one doesn't include the optimized no-set-alias / or eventually newer stuff |
15:54:41 | * | waleee-cl joined #nim |
15:54:45 | FromGitter | <alehander92> which can be added later |
15:54:57 | FromGitter | <alehander92> and no smart return value analysis |
15:54:59 | Zevv | dude you are really getting that done |
15:55:18 | * | a_chou joined #nim |
15:55:26 | Zevv | that is _very_ nice |
15:55:29 | FromGitter | <alehander92> so `result = (a, b)` can still lead to a bug on theory |
15:55:38 | FromGitter | <alehander92> (and in practice*) |
15:55:46 | FromGitter | <alehander92> but all this can be .. fixed later this year hopefully |
15:56:09 | FromGitter | <alehander92> zevv i literally just went to the original september branch |
15:56:26 | FromGitter | <alehander92> rebased and fixed a little and just enabled 1-2 more tests |
15:56:28 | Zevv | but you got a long way with that right? |
15:56:32 | FromGitter | <alehander92> and removed some comments |
15:56:38 | Zevv | it's not _wrong_ IIRC? |
15:56:40 | FromGitter | <alehander92> well yeah |
15:57:06 | FromGitter | <alehander92> i mean it catches a lot of stuff the biggest problem is it is very slow for some huge `case` situations |
15:57:29 | Zevv | like, the compiler |
15:57:35 | Zevv | :) |
15:57:37 | FromGitter | <alehander92> exactly :D |
15:57:50 | FromGitter | <alehander92> but .. this can be fixed, but my other version |
15:57:58 | FromGitter | <alehander92> had other bugs and couldn't pass the test suite |
15:58:10 | FromGitter | <alehander92> so for now i am pushing this |
15:58:27 | FromGitter | <alehander92> to not block everything so much |
15:58:33 | Zevv | so, if A. is willing to go with this as someting to start with. I bet it's way better then what was once in Nim right |
15:58:34 | * | Guest94576_ joined #nim |
15:59:12 | FromGitter | <alehander92> i guess the idea is we can merge that (or i can just disable the set-alias thing and then it can be very fast but catch less cases) |
15:59:30 | FromGitter | <alehander92> and see if it works at least well enough for the initial cases |
15:59:37 | FromGitter | <alehander92> as an experimental beta flag |
15:59:46 | FromGitter | <alehander92> and in the meantime |
15:59:51 | Zevv | right. if you want people to test it, it needs to go in I guess |
15:59:52 | FromGitter | <alehander92> i can fix the other cases |
16:00:05 | FromGitter | <alehander92> i was so blocked by the test suite thing, i think it's better to restart from here |
16:00:25 | FromDiscord | <ProfessorEevee> :o active community? |
16:00:35 | Zevv | depends, I assume you know where you need to go from here? |
16:00:42 | FromGitter | <alehander92> hm, but all package tests seem to fail |
16:00:43 | Zevv | it's not that it's not complete and you have no clue how to fix that |
16:00:55 | Zevv | ProfessorEevee: how so? |
16:01:08 | FromGitter | <alehander92> anyway, see you later, thank God that at least locally things started happening well |
16:01:23 | Zevv | \o |
16:01:38 | FromDiscord | <ProfessorEevee> Well, I just learned about this language and I was kind of surprised to find active people here considering how small it is right now |
16:01:58 | * | narimiran joined #nim |
16:02:15 | FromGitter | <alehander92> after all this blocking hm |
16:02:19 | FromGitter | <alehander92> see you after 9 :D |
16:02:39 | Zevv | ProfessorEevee: oh I think this channel is the only reason I hang out with the language |
16:02:52 | Zevv | I don't program, but the people here are nice and spart |
16:03:14 | FromDiscord | <ProfessorEevee> Yeah idk, it's kind of cool, though |
16:03:28 | Zevv | sure is |
16:03:39 | FromDiscord | <ProfessorEevee> because I come from Python and a little bit of both C++ and Rust |
16:03:51 | FromDiscord | <ProfessorEevee> and this is just like the child of the aforementioned |
16:04:08 | Zevv | the good thing of a small user base is that there's a clear sense of a community still |
16:04:21 | FromDiscord | <ProfessorEevee> Yup, I can see that |
16:04:33 | Zevv | there's dozens of us :) |
16:04:59 | Zevv | no clue where 10k stars on github come from though |
16:05:14 | FromDiscord | <ProfessorEevee> I didn't even realize there was a repository |
16:13:36 | * | a_chou quit (Ping timeout: 256 seconds) |
16:14:48 | * | PMunch joined #nim |
16:17:56 | Zoom[m] | Does creating of a result var postponed until the end of the proc, unless I use it earlier in the body? |
16:18:23 | Zoom[m] | I mean, I'd like to use a temporary variable insread of result and move it to result at the end |
16:19:09 | Zoom[m] | But I don't want to do it if the result is already there |
16:19:44 | Zoom[m] | I guess I should inspect C myself, but may be you can give me a quick answer |
16:21:22 | Zoom[m] | Or, I guess I should comply and use result everywhere instead |
16:21:51 | PMunch | It is created as the first thing that happens in the procedure |
16:22:16 | PMunch | Why don't you want to use result? |
16:24:48 | Zoom[m] | I'm not used to :) |
16:25:21 | Zoom[m] | I don't like the sound of it. If it's created first, how can I replace the initialization with my own? |
16:27:47 | Zoom[m] | For example, for arrays. Some types are filled with the default values, such as array. If the proc returns an array and has some user-defined initialization in the body, how can I avoid double init? |
16:28:25 | Zoom[m] | * Some types are filled with the default values, such as an array. If the proc returns it and has some user-defined initialization in the body, how can I avoid double init? |
16:29:17 | FromGitter | <HJarausch_gitlab> it's me again, sorry. My first trivial macro failed. I want a macro 'd_echo' which expands to 'discard' if a compile time constant 'DEBUG' is true. โ Otherwise it should generate an 'echo' statement. Here is what I tried โ const DEBUG {.booldefine.} = false โ import macros โ macro d_echo(Msg:varargs[string]) = ... [https://gitter.im/nim-lang/Nim?at=5fba91dd29cc4d734824e299] |
16:29:32 | Zoom[m] | Sorry, I'm probably speaking nonsense. My mental model is still shaky. |
16:33:39 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
16:36:20 | PMunch | Zoom[m], well Nim doesn't really have user-defined initialisation |
16:36:28 | PMunch | It just inits everything to 0 |
16:36:49 | PMunch | But you can throw on {.noInit.} on the proc to avoid even that from happening |
16:37:16 | PMunch | By the way, I'm streaming later if you didn't catch that earlier :) |
16:37:20 | Zoom[m] | But if it was lazy, and you could move to result then you could avoid double init |
16:37:27 | Zoom[m] | Ahh, that's better |
16:38:19 | Zoom[m] | Please, tell me If I'm concerned over stupid things |
16:38:55 | PMunch | I think you are :P |
16:39:30 | PMunch | Well, the init takes a little bit of time, but it's so little so it only really matters if you reaaally need to optimise something |
16:39:47 | * | apahl quit (Ping timeout: 260 seconds) |
16:40:11 | Zoom[m] | You can tell me this every time it happens, I need to "world check" my ocd |
16:40:16 | PMunch | Typically the safety of knowing that default values are all zeros is better than the very tiny delay in nulling out some memory |
16:40:26 | * | apahl joined #nim |
16:40:42 | PMunch | I mean it's a valid concern, but in reality it's not that big of an issue |
16:42:08 | Zoom[m] | It's really an OCD. If I know I'm going to iterate over a container and fill it anyway, it just leaves a nasty feeling if you know you're not its first |
16:42:31 | PMunch | Well if it helps it isn't iterated over |
16:42:38 | PMunch | It's just a single call to clear the memory |
16:43:17 | PMunch | Like a memset(result.addr, 0, sizeof(result)) |
16:43:55 | Zoom[m] | You're right |
16:45:48 | Zoom[m] | You're streaming in 15 minutes, right? |
16:47:19 | PMunch | That's the plan |
16:47:43 | PMunch | https://youtu.be/i4pDnyxC6HM <- Not live yet, but I think that will work once it's up and running |
16:48:05 | PMunch | Hmm, it says 72 minutes though.. |
16:48:07 | PMunch | That's a bug |
16:48:42 | PMunch | I keep forgetting that Firefox forces UTC+0 |
16:49:51 | ForumUpdaterBot | New thread by Treeform: Is there some thing like `newSeqNoInit`?, see https://forum.nim-lang.org/t/7139 |
16:50:11 | Zoom[m] | I have some fingerprint scrubbing turned on in about:config and I get messed time everywhere, including Element logs |
16:51:07 | Zoom[m] | I think it's UTC |
16:54:51 | PMunch | Yeah it's UTC, and it confuses the hell out of stuff |
17:02:50 | Zoom[m] | Wait, intToStr takes int, but what's with int64? |
17:03:16 | Zoom[m] | $? |
17:04:47 | PMunch | Link apparently didn't work, new link here: https://www.youtube.com/watch?v=p_B3JMQSUCA |
17:04:52 | PMunch | Or twitch.tv/pmunche |
17:07:21 | FromDiscord | <lqdev> @Zoom: just use $ for everything |
17:07:59 | * | bung quit (Quit: Lost terminal) |
17:20:11 | * | abm joined #nim |
17:23:52 | * | sagax quit (Read error: Connection reset by peer) |
17:25:04 | * | habamax quit (Ping timeout: 240 seconds) |
17:31:16 | * | Vladar joined #nim |
17:32:32 | * | habamax joined #nim |
17:33:49 | * | gmaggior joined #nim |
17:43:32 | * | xet7 quit (Remote host closed the connection) |
17:48:37 | * | xet7 joined #nim |
17:49:03 | * | opal quit (Ping timeout: 240 seconds) |
17:49:51 | * | opal joined #nim |
17:52:04 | * | xet7_ joined #nim |
17:53:44 | * | xet7 quit (Ping timeout: 256 seconds) |
17:58:34 | * | xet7_ quit (Remote host closed the connection) |
18:00:02 | * | hnOsmium0001 joined #nim |
18:06:03 | ForumUpdaterBot | New thread by Moigagoo: NimSuggest Not Working with Karax's or Jester's Macros, see https://forum.nim-lang.org/t/7140 |
18:07:36 | planetis[m] | can I get the module directory at compile time? |
18:07:56 | * | Guest94576_ quit (Quit: Guest94576_) |
18:10:42 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2F7t |
18:11:32 | planetis[m] | thank you haxscramper |
18:11:37 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2F7u |
18:12:10 | * | lritter joined #nim |
18:12:39 | FromDiscord | <haxscramper> And you also need to `export splitPath` for this template, since it depends on `std/os.splitPath` |
18:13:35 | * | sagax joined #nim |
18:15:43 | * | lritter quit (Client Quit) |
18:16:03 | planetis[m] | it didn't work for me, iwas getting ??? but there is `currentSourcePath.parentDir()` too |
18:18:13 | FromDiscord | <haxscramper> `currentSourcePath` is defined as `template currentSourcePath: string = instantiationInfo(-1, true).filename` so it is strange that `currentSourceDir` has different results. |
18:18:48 | FromDiscord | <haxscramper> But maybe it is some weird template instantiation interactions, can't really comment on that one |
18:43:46 | disruptek | disbot: you awake? |
18:43:47 | disbot | yep. ๐ |
19:01:57 | planetis[m] | finally made gnuplot realtime https://github.com/planetis-m/gnuplotlib |
19:02:10 | planetis[m] | warning not well tested |
19:06:43 | * | opal quit (Ping timeout: 240 seconds) |
19:09:02 | * | opal joined #nim |
19:11:27 | * | waleee-cl quit (Ping timeout: 260 seconds) |
19:12:01 | FromGitter | <alehander92> :) |
19:13:31 | * | waleee-cl joined #nim |
19:22:10 | * | aaronm quit (Ping timeout: 272 seconds) |
19:23:21 | PMunch | Hmm, what would be a good package to grab a div out of some HTTP? |
19:24:03 | PMunch | The xmlparser stuff is a bit clunky to work with |
19:24:47 | PMunch | I just want client.getContent("<url>").parseHtml.getElementsByClasses("classname") or something like that |
19:25:17 | * | Q-Master quit (Read error: Connection reset by peer) |
19:29:19 | disruptek | isn't there an htmlparser? |
19:29:58 | * | Q-Master joined #nim |
19:30:06 | disruptek | i guess there are two, just to make things interesting. |
19:30:52 | PMunch | Oh yeah there is |
19:31:59 | PMunch | But it still relies on xmltree to actually get anything out of it |
19:32:18 | disruptek | a nice new project for your stream. |
19:32:37 | PMunch | Ugh.. |
19:32:54 | PMunch | Oh wait, there's nimquery |
19:38:52 | * | apahl quit (Ping timeout: 260 seconds) |
19:39:58 | * | apahl joined #nim |
19:47:40 | * | natrys joined #nim |
19:52:48 | * | a_chou joined #nim |
19:58:18 | * | habamax quit (Ping timeout: 260 seconds) |
20:05:13 | FromDiscord | <dom96> PMunch: you can use webdriver, downside is you will need to launch a whole browser ๐ |
20:06:56 | PMunch | Nimquery was enough to solve it for me :) |
20:20:39 | * | letto quit (Quit: Konversation terminated!) |
20:21:25 | * | Vladar quit (Quit: Leaving) |
20:22:54 | * | sagax quit (*.net *.split) |
20:22:54 | * | idxu quit (*.net *.split) |
20:22:55 | * | bacterio quit (*.net *.split) |
20:25:20 | * | sagax joined #nim |
20:25:20 | * | idxu joined #nim |
20:25:20 | * | bacterio joined #nim |
20:25:33 | * | sagax quit (Max SendQ exceeded) |
20:25:43 | * | FromGitter quit (Ping timeout: 246 seconds) |
20:26:22 | * | FromGitter joined #nim |
20:26:37 | * | iwq quit (Ping timeout: 264 seconds) |
20:27:12 | planetis[m] | dom96: can you review please: https://github.com/nim-lang/Nim/pull/15919 |
20:27:13 | disbot | โฅ Httpclient improvements |
20:28:12 | * | iwq joined #nim |
20:34:37 | * | kungtotte quit (Read error: Connection reset by peer) |
20:35:05 | * | kungtotte joined #nim |
20:36:26 | ForumUpdaterBot | New thread by BarrOff25: Can't create seq in callback function, see https://forum.nim-lang.org/t/7141 |
20:39:27 | * | letto joined #nim |
20:40:37 | * | hyiltiz quit (Quit: hyiltiz) |
20:42:53 | * | Jesin quit (Quit: Leaving) |
20:43:48 | Zevv | clyybber not here, right? |
20:48:41 | * | Jesin joined #nim |
20:50:46 | * | sagax joined #nim |
21:02:28 | * | a_chou quit (Remote host closed the connection) |
21:03:08 | * | PMunch quit (Quit: leaving) |
21:11:11 | * | aaronm joined #nim |
21:14:43 | * | natrys quit (Ping timeout: 246 seconds) |
21:15:38 | * | aaronm quit (Ping timeout: 256 seconds) |
21:16:05 | * | natrys joined #nim |
21:17:52 | * | narimiran quit (Ping timeout: 246 seconds) |
21:23:45 | * | tane quit (Quit: Leaving) |
21:29:25 | * | natrys quit (Ping timeout: 246 seconds) |
21:32:15 | FromDiscord | <iWonderAboutTuatara> anyone know why I might get thsi error? |
21:32:20 | * | natrys joined #nim |
21:32:24 | * | natrys quit (Client Quit) |
21:32:32 | FromDiscord | <iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2F8N |
21:32:52 | FromDiscord | <iWonderAboutTuatara> I'm trying to wrap raylib for nim |
21:36:32 | ForumUpdaterBot | New thread by Peter: Unhandled exception in httpbeast, see https://forum.nim-lang.org/t/7142 |
21:39:53 | FromDiscord | <Recruit_main707> @iWonderAboutTuatara Guevara-chan says in the github issue all errors have been patched, have you tried since he said it? |
21:40:31 | FromDiscord | <iWonderAboutTuatara> I haven't |
21:40:45 | FromDiscord | <iWonderAboutTuatara> I would like to try to wrap a library myself though |
21:40:50 | FromDiscord | <iWonderAboutTuatara> because it's a useful thing to know |
21:41:01 | FromDiscord | <Recruit_main707> then go ahead, yeah |
21:42:26 | FromDiscord | <iWonderAboutTuatara> Do you know why it might be giving that error though? |
21:42:50 | FromDiscord | <iWonderAboutTuatara> the toast binary doesn't seem to be giving me a wrapper, it just seems to echo back the file itself |
21:42:54 | FromDiscord | <iWonderAboutTuatara> (from nimterop) |
21:43:40 | FromDiscord | <Recruit_main707> i have very little experience dealing with c2nim and nimterop errors |
21:44:16 | FromDiscord | <iWonderAboutTuatara> Oh I see |
21:44:20 | FromDiscord | <iWonderAboutTuatara> Hopefully someone else knows then |
22:11:39 | * | j-james joined #nim |
22:33:19 | * | j-james quit (Quit: Leaving.) |
22:34:43 | * | aaronm joined #nim |
22:39:03 | * | opal quit (Ping timeout: 240 seconds) |
22:39:06 | * | vicfred quit (Quit: Leaving) |
22:39:16 | * | aaronm quit (Ping timeout: 256 seconds) |
22:40:13 | * | opal joined #nim |
22:42:38 | ForumUpdaterBot | New thread by JohnAD: Example of a simply UDP client, see https://forum.nim-lang.org/t/7143 |
23:35:13 | * | hyiltiz joined #nim |
23:35:13 | * | hyiltiz quit (Client Quit) |
23:38:27 | * | hyiltiz joined #nim |