00:21:20 | FromDiscord | <ynfle (ynfle)> Vim & sometimes VSCode |
01:05:14 | NimEventer | New thread by Alexeypetrushin: Funny bug when list.map(fn) and list.map((v) => v.fn) would produce different results, see https://forum.nim-lang.org/t/8463 |
01:10:40 | * | arkurious quit (Quit: Leaving) |
01:48:47 | * | stkrdknmibalz joined #nim |
01:54:59 | * | neurocyte01324 joined #nim |
01:56:52 | * | neurocyte0132 quit (Ping timeout: 252 seconds) |
01:56:52 | * | neurocyte01324 is now known as neurocyte0132 |
02:44:27 | FromDiscord | <NullCode> In reply to @acek7 "what editor do you": notepad++ and a nim syntax highlighting plugin |
02:49:01 | FromDiscord | <Gumber> In reply to @kinkinkijkin "ive forgotten how to": I think it's just `toSeq` |
02:50:00 | FromDiscord | <Gumber> https://nim-lang.org/docs/sequtils.html#toSeq.t%2Cuntyped |
02:50:30 | FromDiscord | <Gumber> In reply to @acek7 "what editor do you": if you already know vim or emacs or something I'd use that with nim language server protocol |
02:50:41 | FromDiscord | <Gumber> if you don't know any modal editors, I'd use VSCode or Sublime or Atom or something else |
02:51:11 | FromDiscord | <Gumber> as far as the GUI stuff goes - it really depends whether you want a retained or immediate mode solution and what you're trying to do |
02:51:31 | FromDiscord | <Gumber> I have very different GUI requirements and expectations from a cross platform GUI than others do |
02:51:51 | FromDiscord | <Gumber> so it's kind of a case by case basis - but the situation has definitely improved over time in terms of available options |
02:52:31 | * | rockcavera joined #nim |
02:52:31 | * | rockcavera quit (Changing host) |
02:52:31 | * | rockcavera joined #nim |
02:53:03 | FromDiscord | <cabboose> Tree form is in the process of making a pure nim framework. It’ll be like fidget; due to the nature of this endeavour fidget is basically sidelined. Packages like pixie etc were created for this new framework in mind↵(@acek7) |
02:58:24 | FromDiscord | <Gumber> yeah treeform's lib is nice but like for me it just doesn't fit the bill |
02:59:06 | FromDiscord | <Gumber> I also have questions regarding the feasibility of maintaining so many projects, but only time will tell how that plays out, there's a lot of bus factor going on... |
02:59:38 | FromDiscord | <Gumber> but either way, as far as engineering quality goes and unique ideas, I think treeform does a really great job with his stuff, and it's very impressive |
03:00:32 | FromDiscord | <cabboose> I think the gui library will attract maintainers |
03:00:38 | FromDiscord | <Gumber> I also think there's a lot of power and solid reasoning in just making your own bindings to C/C++ libs and pinning versions rather than reaching for pure Nim implementations |
03:00:56 | FromDiscord | <Gumber> I don't disagree but there are a lot of other projects out there that are being built on top of |
03:01:26 | FromDiscord | <Gumber> it's just like a case of spreading oneself too thin I think is what I'm getting at - but I mean if the libs are good enough than the community should step in to maintain |
03:01:29 | FromDiscord | <Gumber> it's just never a guarantee that it happens |
03:02:11 | FromDiscord | <Gumber> but I'm hopeful my doubts are erased in the future and that Nim's ecosystem and x-plat UI situation keeps improving |
03:02:56 | FromDiscord | <Gumber> I'm just somewhat of a skeptic by default I guess given my life experience thus far - hopefully that can change and turn into a more optimistic outlook with time 🙂 |
03:19:28 | FromDiscord | <acek7> I'm a UI Designer and I've been wanting to use it to make something and I love GUI design. And nim seems like this great tool that can do it all it seems and I'm just excited about the tools other are building with it |
03:28:49 | FromDiscord | <cabboose> nimqml is my go-to atm because it leverages the most stable ui system in my eyes |
03:28:53 | FromDiscord | <cabboose> but then thats not really gui in nim |
03:28:55 | FromDiscord | <cabboose> thats just |
03:28:56 | FromDiscord | <cabboose> backend |
03:29:01 | FromDiscord | <cabboose> and then having qml as front end |
03:29:03 | FromDiscord | <cabboose> eh |
03:32:03 | FromDiscord | <Gumber> heh |
03:32:13 | FromDiscord | <Gumber> well I mean if that's your goal |
03:32:45 | FromDiscord | <Gumber> I guess fidget would probably be your best bet - but as cabboose mentioned it's kind of dead in the water atm due to all the other work going on to support it and other projects |
03:33:14 | FromDiscord | <Gumber> I don't know of any other retained mode GUI libraries that really give you the flexibility to do a lot of GUI design unless you want to dip your toes into electron and stuff like that |
03:33:23 | FromDiscord | <Gumber> which is possible with Nim |
03:34:01 | FromDiscord | <Gumber> you could also build something using https://github.com/bung87/crowngui |
03:34:03 | nrds | <R2D299> itHub: 7"[WIP]Web Technologies based Crossplatform GUI Framework " |
03:34:42 | FromDiscord | <Gumber> and then I guess this thing came around the other day but I mean... https://github.com/Ethosa/nodesnim |
03:34:44 | nrds | <R2D299> itHub: 7"The Nim GUI/2D framework, based on OpenGL and SDL2." |
03:35:02 | FromDiscord | <Gumber> It's not really what I'd be looking for at all personally, but some folks seem to be excited about it |
03:35:15 | FromDiscord | <Gumber> I just haven't and don't intend on using it so I can't really speak to it or recommend it |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:14:13 | FromDiscord | <cabboose> I have more experience with qt for styling than I do with html/css (which is 0) |
04:14:28 | FromDiscord | <cabboose> so I never see the appeal in doing web technology based gui things |
04:15:15 | FromDiscord | <cabboose> I'm sure thats dumb and naive but whateva |
04:21:06 | FromDiscord | <Rika> I wouldn’t say that |
04:21:32 | FromDiscord | <Rika> Just like I wouldn’t say it’s dumb using tech that you’re already used to |
04:30:30 | * | bkay quit (Read error: Connection reset by peer) |
04:43:08 | * | rockcavera quit (Remote host closed the connection) |
05:48:33 | * | Zevv quit (*.net *.split) |
05:48:46 | * | Zevv joined #nim |
05:51:53 | * | max22- joined #nim |
05:54:41 | * | Gustavo6046 quit (*.net *.split) |
05:54:41 | * | jkl quit (*.net *.split) |
05:54:41 | * | NimEventer quit (*.net *.split) |
05:54:41 | * | ormiret quit (*.net *.split) |
05:54:41 | * | dom96 quit (*.net *.split) |
05:54:41 | * | drewr quit (*.net *.split) |
05:54:41 | * | jfinkhaeuser quit (*.net *.split) |
05:55:21 | * | NimEventer joined #nim |
05:55:53 | * | ormiret joined #nim |
05:56:11 | * | Gustavo6046 joined #nim |
05:56:23 | * | dom96 joined #nim |
05:56:35 | * | jkl joined #nim |
05:59:56 | * | jfinkhaeuser joined #nim |
06:24:11 | * | jjido joined #nim |
06:29:55 | * | xet7 quit (Remote host closed the connection) |
06:30:57 | * | xet7 joined #nim |
06:47:38 | FromDiscord | <macaroni> What would you guys use to unzip a bzip2 file? Unfortunately Nimarchive is broken right now and I'd like a platform-independent solution, so no execCmd shenanigans |
06:50:11 | FromDiscord | <NullCode> https://github.com/guzba/zippy/ does this have what you're looking for |
06:50:13 | nrds | <R2D299> itHub: 7"Pure Nim implementation of deflate, zlib, gzip and zip." |
06:51:12 | FromDiscord | <Rika> That can do bzip? |
06:55:22 | FromDiscord | <NullCode> i don't see any matches for bzip |
06:55:36 | * | PMunch joined #nim |
06:56:00 | FromDiscord | <NullCode> https://github.com/yglukhov/bzip2 |
06:56:03 | nrds | <R2D299> itHub: 7"libbz2 nim wrapper" |
06:56:04 | FromDiscord | <NullCode> ? |
06:56:29 | FromDiscord | <macaroni> unfortunately it doesn't look like zippy handles bzip2. It gives an error when using the extractAll proc |
06:56:44 | FromDiscord | <NullCode> i see |
06:56:50 | FromDiscord | <NullCode> (edit) "?" => "this?" |
07:22:56 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
07:36:53 | * | meowray joined #nim |
07:43:43 | * | nrds quit (Ping timeout: 265 seconds) |
08:54:13 | FromDiscord | <treeform> Zippy does not handle bzip2 |
10:18:32 | FromDiscord | <haxscramper> Is it possible to use `{.define` with set value? Like `{.define(wave_path="asfd").}`↵\` |
10:23:28 | * | crem quit (Ping timeout: 268 seconds) |
10:25:11 | * | crem joined #nim |
10:32:55 | * | Vladar joined #nim |
11:11:30 | FromDiscord | <Goel> How to use the keyword `yield`? Reading it seem it only work for iterators, but that means must be uset with `iterator` or can also be used with a `for` loop? |
11:12:49 | FromDiscord | <Rika> Must be in iterator |
11:49:39 | * | xet7 quit (Remote host closed the connection) |
11:50:34 | * | xet7 joined #nim |
12:00:50 | FromDiscord | <hmmm> boyz how do I delete a temp file I don't need anymore |
12:01:28 | FromDiscord | <Rika> ? |
12:01:39 | FromDiscord | <hmmm> yo rika |
12:01:43 | FromDiscord | <Rika> You don’t need to? |
12:01:50 | FromDiscord | <NullCode> In reply to @hmmm "boyz how do I": what |
12:01:51 | FromDiscord | <hmmm> I don't want to leave junk around |
12:02:08 | FromDiscord | <Rika> The OS will take care of it if you put it in the temp directory |
12:02:12 | FromDiscord | <hmmm> oh |
12:02:16 | FromDiscord | <hmmm> this makes sense |
12:02:20 | FromDiscord | <NullCode> removeFile(file) |
12:02:26 | FromDiscord | <hmmm> this is even better |
12:02:28 | FromDiscord | <NullCode> if it's not in temp dir |
12:02:30 | FromDiscord | <Rika> You can do that if you really want to |
12:02:34 | FromDiscord | <hmmm> I want to |
12:02:39 | FromDiscord | <hmmm> I'll try it now |
12:02:44 | FromDiscord | <NullCode> (edit) "removeFile(file)" => "sent a code paste, see https://play.nim-lang.org/#ix=3A80" |
12:02:54 | FromDiscord | <NullCode> note that therell be an exception if no file to delete |
12:03:11 | FromDiscord | <hmmm> ty my bro ❤️ |
12:03:21 | FromDiscord | <NullCode> np I'm a noob myself XD |
12:03:27 | FromDiscord | <Rika> In reply to @NullCode "note that therell be": Or if you can’t delete it |
12:03:45 | FromDiscord | <NullCode> yes |
12:04:51 | FromDiscord | <impbox [ftsf]> In reply to @Rika "The OS will take": Windows doesn't afaik |
12:04:57 | FromDiscord | <NullCode> it does |
12:05:01 | FromDiscord | <Rika> Is it possible to determine (without reading the definition of every single proc used within) if a Defect is raised |
12:05:15 | FromDiscord | <NullCode> (edit) "does" => "does↵albeit once a week or sth" |
12:05:31 | FromDiscord | <NullCode> why not just read the definition of every proc |
12:05:48 | FromDiscord | <NullCode> (just kidding I know it's tedious) |
12:05:49 | FromDiscord | <Rika> Try that when you’re calling a massive proc I dare you |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:23 | FromDiscord | <impbox [ftsf]> Apparently since windows 10 it might delete it at some point |
12:06:31 | * | supakeen joined #nim |
12:06:41 | FromDiscord | <haxscramper> No, IIRC defects are not tracked |
12:07:01 | FromDiscord | <Rika> Time to raise (ref Defect)(nil) then |
12:07:15 | FromDiscord | <haxscramper> well, maybe at some point they will be removed |
12:07:33 | FromDiscord | <haxscramper> hopefully |
12:08:04 | FromDiscord | <Rika> I feel like they are useful just easy to abuse |
12:08:42 | FromDiscord | <haxscramper> How they are useful |
12:08:46 | FromDiscord | <Rika> Like in this message pack library I’m using it seems like they made a parsing error a defect? What the hell? |
12:09:04 | FromDiscord | <haxscramper> I literally don't understand how raising defect is better than raising exceptin in any scenario |
12:09:13 | FromDiscord | <Rika> I don’t know when something truly cannot be recovered from (maybe because of C library things?) |
12:09:41 | FromDiscord | <Rika> Crypto scenario I don’t know |
12:09:42 | FromDiscord | <haxscramper> Then why have separate language concept for it? If this cannot be recovered is what |
12:09:46 | FromDiscord | <haxscramper> `quit()` |
12:09:47 | FromDiscord | <haxscramper> `abort()` |
12:09:50 | FromDiscord | <haxscramper> `fuck you()` |
12:10:02 | FromDiscord | <haxscramper> The game ends when we reach "unrocoverable" state |
12:10:18 | FromDiscord | <haxscramper> We can't catch defects/quits, so we just abort the execution |
12:10:31 | FromDiscord | <haxscramper> If we can, like nim defect by default, they make no sense |
12:10:44 | FromDiscord | <haxscramper> if we can't they make no sense as well, at least as a separate language concept |
12:10:50 | FromDiscord | <Rika> In reply to @haxscramper "If we *can*, like": Then I guess defects should have never been catchable at all |
12:10:58 | FromDiscord | <haxscramper> this is just an overcomplicated wrapper for `quit()` |
12:11:02 | FromDiscord | <Rika> That is true |
12:11:04 | FromDiscord | <NullCode> since defect is a program error |
12:11:05 | FromDiscord | <Rika> Makes sense |
12:11:10 | FromDiscord | <NullCode> the program should just quit |
12:11:20 | FromDiscord | <haxscramper> well, write `quit()` in your library on errors, and see what people tell you about it |
12:11:29 | FromDiscord | <haxscramper> Pretty sure the first message would be like |
12:11:33 | FromDiscord | <haxscramper> "Are you ok?" |
12:11:40 | FromDiscord | <haxscramper> "I can totally recover from that" |
12:11:44 | FromDiscord | <haxscramper> "why not raise exception" |
12:12:04 | FromDiscord | <haxscramper> "do you think you know better than me what is recoverable and not, when I'm the end system architect?" |
12:12:18 | FromDiscord | <haxscramper> `quit()` in libraries makes no sense, |
12:12:33 | FromDiscord | <haxscramper> And apps can call `quit()` any time they want |
12:13:35 | FromDiscord | <haxscramper> Like crypto scenario |
12:33:00 | * | rockcavera joined #nim |
12:33:00 | * | rockcavera quit (Changing host) |
12:33:00 | * | rockcavera joined #nim |
12:44:01 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
12:46:20 | FromDiscord | <cabboose> Gotta make some memes out of these golden quotes |
12:46:26 | FromDiscord | <cabboose> I’ll save these for later |
12:46:34 | * | max22- quit (Quit: Leaving) |
12:47:09 | FromDiscord | <cabboose> Speaking of which haxscramper did you ever see the Easter egg in the loony repo? |
12:47:22 | FromDiscord | <cabboose> I put it specifically for you |
12:48:19 | FromDiscord | <haxscramper> https://github.com/nim-works/loony/blob/a6effbcce31b8683e950bf4d3d3dd5fd3518744e/loony.nim#L11 |
12:48:31 | FromDiscord | <cabboose> 🤣🤌 |
13:03:07 | * | arkurious joined #nim |
13:05:57 | FromDiscord | <isd> Hi, has anyone ever heard of a nim executable being unable to run on Windows because it is detected as being a 16 bit application? |
13:06:08 | FromDiscord | <Yardanico> no, that's really weird |
13:06:09 | FromDiscord | <Rika> That’s strange |
13:06:12 | FromDiscord | <Yardanico> maybe it's your antivirus acting up? |
13:06:18 | FromDiscord | <Rika> That sounds impossible |
13:06:30 | FromDiscord | <Yardanico> or maybe you're on a 32-bit windows and trying to launch a 64-bit binary? idk how the error would look like in this case |
13:06:32 | FromDiscord | <isd> I have a colleague who got this recently after an OS update. I am wondering, or wtf'ing, about how that could be |
13:06:46 | * | max22- joined #nim |
13:07:16 | FromDiscord | <isd> Maybe I will just rebuild it in the latest version of Nim and ask if it works again. |
13:11:50 | FromDiscord | <isd> I suspect corporate antivirus gremlins |
13:21:40 | * | max22- quit (Remote host closed the connection) |
13:31:03 | * | pro joined #nim |
13:31:07 | * | pro quit (Client Quit) |
13:31:24 | * | pro joined #nim |
13:37:58 | FromDiscord | <NullCode> In reply to @isd "I suspect corporate antivirus": +1 |
13:42:32 | FromDiscord | <NullCode> can nimble install packages without `git`? |
13:42:52 | FromDiscord | <NullCode> I'm writing up ez guide for installing nim |
13:44:55 | PMunch | ez guide for installing Nim is just grab choosenim.. |
13:45:05 | FromDiscord | <NullCode> yes |
13:45:29 | FromDiscord | <NullCode> well i wanted to serve an alternate to choosenim because "2020 latest release" |
13:45:36 | FromDiscord | <NullCode> "outdated!!!!!!!" |
13:45:47 | PMunch | Huh? |
13:46:05 | PMunch | Choosenim is just a utility to install Nim. It will install the latest Nim version |
13:46:06 | FromDiscord | <NullCode> https://media.discordapp.net/attachments/371759389889003532/892044425298063440/unknown.png |
13:46:33 | FromDiscord | <NullCode> i see |
13:46:34 | PMunch | Yeah not a whole lot to fix in choosenim itself, it's a fairly simple utility |
13:46:47 | FromDiscord | <NullCode> In reply to @NullCode "can nimble install packages": what about this tho |
13:46:47 | PMunch | You can even use it to install nightlies |
13:46:58 | FromDiscord | <NullCode> I'm gonna install choosenim myself then |
13:47:11 | PMunch | It can't do it automatically afaik |
13:47:43 | PMunch | But you can always grab the zip from github, and then manually install packages with `nimble install` within that folder |
13:48:58 | FromDiscord | <NullCode> In reply to @PMunch "It can't do it": i see thanks a bunch |
13:49:06 | FromDiscord | <NullCode> In reply to @PMunch "But you can always": yeah |
13:55:14 | * | nrds joined #nim |
13:58:32 | * | rockcavera quit (Remote host closed the connection) |
14:04:58 | * | pro quit (Quit: WeeChat 3.2.1) |
14:07:35 | * | max22- joined #nim |
14:12:13 | * | hexology joined #nim |
14:13:19 | FromDiscord | <Squatting Monk> sent a long message, see http://ix.io/3A8J |
14:19:28 | NimEventer | New thread by Mantielero: Issue with passL, see https://forum.nim-lang.org/t/8464 |
14:20:43 | FromDiscord | <haxscramper> If there is no explicit support for customization I would assume it is the only way to do so↵(@Squatting Monk) |
14:21:03 | FromDiscord | <haxscramper> You might try to make it less copy-pasta using `import {.all.}` when 1.6 comes out |
14:33:24 | PMunch | Damn Futhark just works so well. This is the third project since I wrote it where I can just import C header files directly without any wrapper issues |
14:33:49 | PMunch | Only thing I need to fix is some kind of support for macros |
14:34:28 | PMunch | Every `#define SOMETHING 5` has do be done manually. And at least those simple ones wouldn't be any trouble porting to Nim |
14:34:29 | nrds | <Prestige99> That's awesome |
14:35:26 | PMunch | I was also thinking of spitting out some static assertions to check that the size of the generated structures are the same size as the C ones |
14:56:14 | FromDiscord | <haxscramper> just don't cheer too loudly or araq will have trouble sleeping |
14:56:56 | FromDiscord | <haxscramper> knowing that c2nim alternative exists and works much better without people having to "know" how to configure it properly for all the macros and whatnot |
15:00:39 | FromDiscord | <Goel> In reply to @haxscramper "knowing that c2nim alternative": this message has been removed by a moderator |
15:01:11 | FromDiscord | <haxscramper> the moderator was removed by the message |
15:01:31 | FromDiscord | <haxscramper> well, I'm just super annoyed at this nim forum thread |
15:01:48 | FromDiscord | <haxscramper> there is no "best" way to wrap C, because every single one has it's shortcomings |
15:01:59 | PMunch | Yeah not sure why some people really opposed it.. |
15:02:08 | FromDiscord | <haxscramper> and furthark is a good solution |
15:02:10 | PMunch | I guess there might be some misunderstanding somewhere.. |
15:02:43 | PMunch | To put it this way, Futhark is the only solution I've tried that just allows me to import C headers to compile against and not have any trouble with wrapping |
15:02:47 | FromDiscord | <haxscramper> And also |
15:02:49 | FromDiscord | <haxscramper> > ↵> c2nim supports that with a config.c2nim configuration file.↵> |
15:03:22 | FromDiscord | <haxscramper> This was a TIL moment |
15:03:33 | FromDiscord | <haxscramper> for a six year old commit that added feature with no docs https://github.com/nim-lang/c2nim/commit/ec04170e343806ec7983168b9b51a279d3cb89d0 |
15:04:26 | nrds | <Prestige99> love undocumented features |
15:04:55 | FromDiscord | <haxscramper> and "the best" way conceptually is to throw a nuclera weapons at C (and especially C++ interop) |
15:05:07 | FromDiscord | <haxscramper> and not create another ad-hoc handwritten C parser |
15:05:20 | FromDiscord | <haxscramper> "thousands of lines of C++ code" |
15:05:30 | FromDiscord | <haxscramper> well, there are millions of lines of C++ code |
15:05:36 | FromDiscord | <haxscramper> clang C++ api is |
15:05:38 | FromDiscord | <haxscramper> 380K lines |
15:05:41 | FromDiscord | <haxscramper> headers |
15:05:43 | PMunch | I spent three days trying to wrap a C header in Nim to create a dynamic library for some other project. Ended up writing all the definitions by hand. Took me 30 seconds with Futhark to achieve the same result *shrugs* |
15:06:28 | PMunch | Oh well, gotta go pick something up at the post office |
15:06:35 | PMunch | Probably going to come back on later |
15:06:36 | * | PMunch quit (Quit: leaving) |
15:06:49 | FromDiscord | <haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/892064265744310313): and "the best" way conceptually is to throw a nuclear weapons at C (and especially C++ interop) |
15:16:18 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=3A9y |
15:18:25 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3A9A |
15:19:12 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3A9B |
15:19:49 | FromDiscord | <Tanguy> Ah yes, even better |
15:20:02 | FromDiscord | <haxscramper> I just didn't notice return was `int|string` |
15:20:16 | FromDiscord | <haxscramper> So at first I thought just `|` in params would be enough |
15:20:17 | FromDiscord | <Tanguy> (edit) "https://play.nim-lang.org/#ix=3A9A" => "https://play.nim-lang.org/#ix=3A9C" |
15:22:20 | FromDiscord | <Goel> Why you used `when` instead of if? Does it make any difference or is just for style? |
15:22:36 | FromDiscord | <Tanguy> `when` is compile time, `if` is runtime |
15:24:04 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3A9L |
15:24:10 | FromDiscord | <Tanguy> (edit) "https://play.nim-lang.org/#ix=3A9L" => "https://play.nim-lang.org/#ix=3A9M" |
15:24:30 | NimEventer | New question by std124_lf: How do ref objects work in Nim and difference between new and common constructor, see https://stackoverflow.com/questions/69349202/how-do-ref-objects-work-in-nim-and-difference-between-new-and-common-constructor |
15:30:19 | FromDiscord | <@hjarausch_gitlab-5fa43a7bd73408> sent a code paste, see https://play.nim-lang.org/#ix=3A9X |
15:31:26 | FromDiscord | <xflywind> The code block looks terrible in discord |
15:31:36 | FromDiscord | <xflywind> (edit) "in" => "on" |
15:31:44 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/892071010101260288/unknown.png |
15:33:53 | FromDiscord | <Rika> yeah its the bridge's fault |
15:35:50 | FromDiscord | <Gumber> uhhh |
15:35:53 | FromDiscord | <Gumber> isn't a const seq just an array lol? |
15:36:26 | FromDiscord | <Gumber> Nim's const btw does not == const in other languages like C/C++ |
15:36:33 | FromDiscord | <Gumber> Nim's const is equiavlent to static const in those languages |
15:36:58 | FromDiscord | <Gumber> but I mean - if you know the size of the collection you want to store data in at compile time, you should use a static array and not a dynamic one (aka seq for Nim) |
15:37:23 | FromDiscord | <Gumber> also I'm very curious why you're storing all that text in there and not just the numbers |
15:37:34 | FromDiscord | <Gumber> but... I'm not really going to dig into your use case requirements unless you want me to 😄 |
15:38:07 | FromDiscord | <haxscramper (haxscramper)> @HJarausch\_gitlab you can try to generated `int data[] = { ... }` via `{.emit.}` |
15:38:08 | FromDiscord | <haxscramper (haxscramper)> And then `importc` this data in-place |
15:42:54 | FromDiscord | <haxscramper (haxscramper)> sent a code paste, see https://play.nim-lang.org/#ix=3Aa0 |
15:45:07 | FromDiscord | <cabboose> Are they all 3 apart?! |
15:45:20 | FromDiscord | <cabboose> 🤣 but that 17 bra |
15:45:40 | FromDiscord | <cabboose> I am so curious as to what you need all of those numbers in a seq for |
15:46:23 | * | kayabaNerve quit (Ping timeout: 252 seconds) |
15:47:06 | FromDiscord | <@hjarausch_gitlab-5fa43a7bd73408> @haxscramper Many thanks, that's perfect!↵Helmut |
15:47:55 | FromDiscord | <haxscramper> Not related, but why say "Helmut" in each message |
15:49:32 | FromDiscord | <@hjarausch_gitlab-5fa43a7bd73408> @cabboose The data comprises a matrix which contains height corrections of the WGS84 geoid. |
15:49:39 | NimEventer | New thread by Mantielero: FFI - std::string, see https://forum.nim-lang.org/t/8465 |
15:50:41 | FromDiscord | <haxscramper> ^ this one is fun |
15:51:13 | FromDiscord | <Gumber> I feel like a `reinterpret_cast` is in this person's near future 🙂 |
15:51:20 | FromDiscord | <Gumber> if you can even do that with std::string and Nim's strings |
15:51:42 | FromDiscord | <Gumber> Nim and C++ interop is always a breath of fresh air xD |
15:52:00 | FromDiscord | <cabboose> Why do you have to hold all of that in memory though |
15:53:30 | FromDiscord | <cabboose> Are they all just incr of 3? |
15:53:40 | FromDiscord | <haxscramper> In reply to @Gumber "I feel like a": you can't reinterpret cast a `std::string` into things, because it is an objects (at least if I remember correctly you can't cast just `struct/class`) |
15:53:44 | FromDiscord | <haxscramper> they must be a pointers |
15:53:57 | FromDiscord | <haxscramper> But interfacing with std strings is slow since you need to construct them each time |
15:54:10 | FromDiscord | <Gumber> makes sense |
15:54:10 | FromDiscord | <haxscramper> Alternative solution would be to wrap things as `cstring` a |
15:54:12 | FromDiscord | <Gumber> yeah |
15:54:21 | FromDiscord | <haxscramper> and take advantage for implicit type conversion |
15:54:40 | FromDiscord | <haxscramper> So nim generates code for `<cstring-expression>` and then C++ invokes `st::string(const char)` constructor |
15:54:46 | FromDiscord | <haxscramper> but it is extremely wasteful |
15:54:55 | FromDiscord | <Gumber> yeah that def makes all the sense in the world |
15:54:57 | FromDiscord | <Gumber> I'm so glad we have you hax lol |
15:55:03 | FromDiscord | <Gumber> we'd be totally lost without you on the C++ front tbh |
15:55:10 | FromDiscord | <haxscramper> proper solution would be to make usage of std::string in nim easier |
15:55:24 | FromDiscord | <haxscramper> you work with std strings most of the time |
15:55:32 | FromDiscord | <haxscramper> if you use C++ libraries |
15:55:36 | FromDiscord | <Gumber> right |
15:55:37 | FromDiscord | <haxscramper> alright, not most of the tim |
15:55:46 | FromDiscord | <haxscramper> they have like trillion XXXString |
15:55:50 | FromDiscord | <haxscramper> classes |
15:55:51 | FromDiscord | <Gumber> well I think it's becoming more of a thing though as the stdlib for C++ is improving |
15:55:58 | FromDiscord | <Gumber> like everyone in game dev used to dodge it like the plague |
15:56:09 | FromDiscord | <Gumber> but now you see more and more folks depending on its containers and other data structures / algos |
15:56:25 | FromDiscord | <haxscramper> so ideally concepts would be a good solution for that, because you can write nim code in a way that works for all of these strings |
15:56:29 | FromDiscord | <Gumber> right |
15:56:31 | FromDiscord | <haxscramper> instead of having to convert them |
15:56:33 | FromDiscord | <haxscramper> I think |
16:45:52 | * | beshr joined #nim |
16:52:13 | * | kayabaNerve joined #nim |
17:05:06 | * | kayabaNerve quit (Ping timeout: 245 seconds) |
17:10:27 | nixfreak_nim[m] | If a project is written in typescript , I should be able to create that same project in nim correct ? |
17:13:55 | FromDiscord | <haxscramper> technically yes, in reality there might be some implementation details that rely on typescript features |
17:14:02 | FromDiscord | <haxscramper> so you would have work around them |
17:14:22 | FromDiscord | <haxscramper> like intersection types, type-bound functions, `string | null` |
17:14:39 | FromDiscord | <haxscramper> Other feautres of type system and generally more relaxed type handling |
17:14:50 | FromDiscord | <haxscramper> Probably something else, but my TS experience is limited |
17:39:08 | FromDiscord | <zentoad> I signed up to the forums but never received an email to verify so I can't ask questions |
17:45:03 | * | Mister_Magister joined #nim |
17:45:23 | Mister_Magister | https://nim-lang.org/docs/net.html do you have more elaborate example on the server? |
17:47:15 | FromDiscord | <Kiloneie> type↵ Table[Key, Value] = object↵↵What is this ? where can i find the documentation ? I found it under Generics -> Is operator |
17:51:57 | FromDiscord | <haxscramper> https://nim-lang.org/docs/tables.html#Table ? |
17:52:34 | FromDiscord | <Kiloneie> Oh i get it now, thanks. |
17:59:24 | FromDiscord | <dom96> In reply to @zentoad "I signed up to": nickname? |
18:04:41 | * | rockcavera joined #nim |
18:04:41 | * | rockcavera quit (Changing host) |
18:04:41 | * | rockcavera joined #nim |
18:18:50 | * | PMunch joined #nim |
18:24:35 | FromDiscord | <JSONBash> can a parameter to a thread be `lent`? or only return vals? |
18:24:43 | FromDiscord | <JSONBash> maybe i don't even know what I am asking |
18:40:31 | Mister_Magister | about the walkFiles https://nim-lang.org/docs/os.html#walkFiles.i%2Cstring what are possible patterns? can i match multiple extensions? |
18:42:48 | FromDiscord | <haxscramper> no, regular posix globs don't support multiple extension/alternative patterns |
18:43:12 | FromDiscord | <haxscramper> extended glob supports it via `.(ext1|ext2)`, but I'm pretty sure `walkFiles` does not use that |
18:43:46 | Mister_Magister | fek |
18:46:11 | FromDiscord | <haxscramper> You can check for extension using `splitFile().ext in ["ext1", "ext2", "ext3"]` |
18:57:08 | naquad | is there some syntax sugar package that can do something like https://nim-by-example.github.io/macros/ class definition? i understand i can copy-paste it, but it would be interesting to see to what extent Nim's metaprogramming can go |
18:59:27 | Mister_Magister | @haxscramper i used walkDir and then in loop adding to sequence only elements i want |
19:02:23 | FromDiscord | <haxscramper> In reply to @naquad "is there some syntax": https://github.com/jjv360/nim-classes https://github.com/Glasses-Neo/OOlib |
19:02:26 | nrds | <R2D299> itHub: 7"Adds class support to Nim." |
19:03:34 | FromDiscord | <Goel> So `name: var openArray` can only be used inside a proc? Can't be used as return type for that same proc? |
19:03:47 | FromDiscord | <Goel> (edit) "openArray`" => "openArray[T]`" |
19:17:24 | naquad | haxscramper, looks interesting, thank you |
19:47:09 | * | max22- quit (Remote host closed the connection) |
20:05:21 | * | kayabaNerve joined #nim |
20:06:44 | * | max22- joined #nim |
20:47:50 | * | Vladar quit (Quit: Leaving) |
20:49:51 | * | jjido joined #nim |
22:05:07 | * | meowray quit (Remote host closed the connection) |
22:05:07 | * | blackbeard420 quit (Remote host closed the connection) |
22:05:16 | * | meowray joined #nim |
22:05:18 | * | blackbeard420_ joined #nim |
22:15:16 | * | max22- quit (Quit: Leaving) |
22:18:26 | FromDiscord | <HuskyHacks> Has the base64 URL safe arg been deprecated? The docs say you can pass in safe = true, but it seems to throw errors |
22:19:08 | FromDiscord | <HuskyHacks> docs https://media.discordapp.net/attachments/371759389889003532/892173535991185478/unknown.png |
22:20:07 | FromDiscord | <HuskyHacks> https://media.discordapp.net/attachments/371759389889003532/892173785921388574/unknown.png |
22:20:31 | FromDiscord | <HuskyHacks> sent a code paste, see https://play.nim-lang.org/#ix=3Abx |
22:21:27 | FromDiscord | <Elegantbeef> `nim -v`? |
22:22:34 | FromDiscord | <deech> Is there way to parameterize C++ containers, eg. `std::vector` with Nim data structures in such a way that Nim data structures are also destroyed when the vector is deleted? |
22:22:35 | FromDiscord | <HuskyHacks> sent a code paste, see https://play.nim-lang.org/#ix=3Aby |
22:22:53 | FromDiscord | <Elegantbeef> You're looking at modern docs using an old compiler |
22:25:47 | FromDiscord | <HuskyHacks> alright I bumped up to 1.4.8 |
22:26:00 | FromDiscord | <HuskyHacks> I used choosenim which usually gets me the right version, weird |
22:26:23 | FromDiscord | <Elegantbeef> Should work now |
22:26:31 | FromDiscord | <HuskyHacks> yep it's good, thanks 🙂 |
22:28:48 | * | stkrdknmibalz joined #nim |
22:33:21 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:37:14 | * | beshr quit (Ping timeout: 252 seconds) |
23:27:27 | * | oprypin quit (Remote host closed the connection) |
23:28:36 | * | oprypin joined #nim |
23:31:46 | * | kayabaNerve quit (Ping timeout: 245 seconds) |
23:31:53 | * | nixfreak_nim[m] quit (Ping timeout: 250 seconds) |
23:32:29 | * | happycorsair[m] quit (Ping timeout: 264 seconds) |
23:47:14 | * | PMunch quit (Quit: leaving) |
23:57:47 | * | happycorsair[m] joined #nim |
23:59:02 | * | blackbeard420_ quit (Quit: ZNC 1.8.2 - https://znc.in) |
23:59:13 | * | blackbeard420 joined #nim |