00:12:37 | * | jmdaemon quit (Ping timeout: 256 seconds) |
00:13:06 | * | jmdaemon joined #nim |
00:35:53 | * | vicfred quit (Quit: Leaving) |
00:50:20 | * | arkurious quit (Quit: Leaving) |
00:55:06 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
01:29:21 | * | jmdaemon quit (Ping timeout: 256 seconds) |
02:04:22 | * | krux02 quit (Remote host closed the connection) |
02:09:17 | * | neurocyte0917090 quit (Ping timeout: 240 seconds) |
02:25:44 | * | jmdaemon joined #nim |
03:58:58 | FromDiscord | <creikey> how do I add a compile error for not implemented yet if a function is used |
03:59:02 | FromDiscord | <creikey> is it {.stub} |
04:00:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3PgX |
04:01:13 | FromDiscord | <creikey> sent a code paste, see https://play.nim-lang.org/#ix=3Ph0 |
04:01:32 | FromDiscord | <Elegantbeef> Yep |
04:01:34 | FromDiscord | <creikey> it looks like it doesn't like when I specify a return type |
04:03:11 | FromDiscord | <Elegantbeef> Works fien here |
04:03:14 | FromDiscord | <Elegantbeef> fine even |
04:03:23 | FromDiscord | <creikey> yeah I had a separate error it works fine |
04:03:24 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ph2 |
04:03:33 | FromDiscord | <creikey> lol https://media.discordapp.net/attachments/371759389889003532/941544963462791188/unknown.png |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.4) |
04:06:32 | * | supakeen joined #nim |
05:09:45 | * | Gustavo6046 joined #nim |
05:54:47 | * | rockcavera quit (Remote host closed the connection) |
06:01:44 | * | Mister_Magister quit (Quit: bye) |
06:25:41 | * | Gustavo6046 quit (Remote host closed the connection) |
06:26:22 | * | Gustavo6046 joined #nim |
06:27:11 | * | Gustavo6046 quit (Remote host closed the connection) |
06:27:39 | * | Gustavo6046 joined #nim |
06:28:30 | * | Gustavo6046 quit (Max SendQ exceeded) |
06:30:04 | NimEventer | New post on r/nim by Familiar_Ad_8919: what does -d:strip do?, see https://reddit.com/r/nim/comments/spshvg/what_does_dstrip_do/ |
06:52:52 | FromDiscord | <fagci> sent a code paste, see https://play.nim-lang.org/#ix=3Phu |
06:54:20 | FromDiscord | <Rika> try finally block? |
06:55:19 | FromDiscord | <fagci> In reply to @Rika "try finally block?": But how can I get an exception here? |
06:55:29 | FromDiscord | <Rika> You don’t need to |
06:56:42 | FromDiscord | <fagci> Will `finally` block executed at return from function? |
06:56:49 | FromDiscord | <Elegantbeef> Why are you returning so much |
06:58:17 | FromDiscord | <fagci> In reply to @Elegantbeef "Why are you returning": That is the part of my initial message topic 🙂 |
07:02:14 | FromDiscord | <Elegantbeef> Or does it raise an exception? |
07:02:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Phz |
07:03:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3PhA |
07:06:03 | FromDiscord | <Rika> Async doesn’t really have exceptions afaik |
07:14:52 | FromDiscord | <fagci> sent a code paste, see https://paste.rs/8cs |
07:15:22 | FromDiscord | <fagci> `asyncCheck` doesn't helps |
07:15:57 | FromDiscord | <Elegantbeef> That's an async issue i dont deal with those |
07:16:01 | FromDiscord | <Elegantbeef> Rika you're up! |
07:16:59 | FromDiscord | <fagci> https://github.com/fagci/nim-nr/blob/refactor/netrandom.nim |
07:18:04 | FromDiscord | <enthus1ast> you are supposed to await fut.withTimeout(CONN\_TIMEOUT),↵then check if the return value is true or false and act accordingly |
07:21:23 | FromDiscord | <fagci> But now we have an ladder of ifs 🙂↵Maybe not critical now...but I prefer to master that 🙂 |
07:21:30 | FromDiscord | <fagci> (edit) "that 🙂" => "that." |
07:21:54 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3PhD |
07:22:37 | FromDiscord | <fagci> sent a code paste, see https://play.nim-lang.org/#ix=3PhE |
07:22:51 | FromDiscord | <fagci> (edit) "https://play.nim-lang.org/#ix=3PhE" => "https://play.nim-lang.org/#ix=3PhF" |
07:23:40 | FromDiscord | <enthus1ast> sent a code paste, see https://paste.rs/YKo |
07:23:43 | FromDiscord | <enthus1ast> i know its a little bloaty |
07:24:30 | FromDiscord | <enthus1ast> and the other question is what happens with the socket |
07:24:36 | FromDiscord | <Rika> In reply to @Elegantbeef "Rika you're up!": I was walking sorry |
07:27:51 | FromDiscord | <fagci> In reply to @enthus1ast "and the other question": Yes, socket can be closed by remote when `send` or `recv`, but for now I dont get an exceptions. With `if await ...` |
07:28:20 | FromDiscord | <fagci> (edit) "exceptions. With" => "exceptions with" |
07:30:13 | FromDiscord | <enthus1ast> what do you mean? Afaik the only reliable way to detect a closed socket is by reading from it |
07:31:45 | FromDiscord | <enthus1ast> i mean, if the remote hung up |
07:35:06 | FromDiscord | <fagci> In reply to @enthus1ast "what do you mean?": Earlier, when I use an another construction, there was an exceptions, such as `Connection reset by peer`, `Connection refused` when `read`. With sync socket there is `isDisconnectionError()` or `lastError` attribute. |
07:35:37 | FromDiscord | <fagci> In reply to @enthus1ast "i mean, if the": Agree |
07:36:01 | FromDiscord | <enthus1ast> try and catch around the connect should work in this case |
07:36:56 | FromDiscord | <enthus1ast> but in the withTimeout case im not sure honestly where to put the try catch |
07:52:45 | * | PMunch joined #nim |
07:58:51 | * | Gustavo6046 joined #nim |
09:06:39 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
09:09:24 | * | cyraxjoe joined #nim |
09:21:31 | * | jjido joined #nim |
09:40:06 | NimEventer | New Nimble package! uap - Nim implementation of user-agent parser, see https://gitlab.com/artemklevtsov/nim-uap/-/blob/master/README.md |
09:44:21 | arkanoid | just recompiled my project with 1.6.4: nim-1.6.4/lib/pure/asyncnet.nim(224) sendPendingSslDataIter SIGSEGV: Illegal storage access. (Attempt to read from nil?) Segmentation fault (core dumped) |
09:45:55 | arkanoid | it does not happen with 1.6.2 |
09:52:47 | arkanoid | also nim ssl socket are too slow to be usage |
09:52:50 | arkanoid | *usabe |
09:52:55 | arkanoid | damn keyboard |
09:54:19 | FromDiscord | <Elegantbeef> general you are using a release build |
10:02:47 | arkanoid | yes I do |
10:03:25 | FromDiscord | <Rika> Async stack traces aren’t super helpful though, usually |
10:27:18 | PMunch | Haha! I managed to crack the code for getting the hash of a module without importing it :) |
10:27:45 | FromDiscord | <Elegantbeef> How? |
10:29:31 | PMunch | This should give superlog the ability to store the hash of the sending module in a static generic field, so that way you could have a `LogMessage[module: static[ModuleSig](msg: string)` and then simply call `log Debug, "My message"` which would convert it into that, and then attach a logger to the generic version with a certain module |
10:29:34 | FromDiscord | <Rika> Get the file contents and hash that :OmegaLUL: |
10:29:36 | FromDiscord | <Rika> I’m joking |
10:29:38 | PMunch | Haha |
10:30:02 | FromDiscord | <Rika> What did you do |
10:30:02 | PMunch | No I basically added some small pieces to a test compiler to see what it actually hashes for a module |
10:30:33 | PMunch | So if you do `import some/folder/structure/mymodule` it hashes `mymodule.unknown.mymodule.unknown.` |
10:30:34 | FromDiscord | <Rika> Better compiler API when |
10:30:44 | FromDiscord | <Rika> Inb4 pinged about skull |
10:31:11 | PMunch | If you do `import somemodule as mymodule` that hashes as the same thing |
10:32:16 | PMunch | So I figured if I simply include an empty nim file in my project `nop.nim` then I can do `import nop as <whatever identifier the user passed>` and signatureHash that symbol I will get the same hash as a module of the same name would give me |
10:32:35 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:33:53 | FromDiscord | <Rika> What that sounds cursed |
10:35:48 | PMunch | I mean it sounds a bit broken |
10:36:37 | PMunch | If module A imports module C, and module B imports module D as C then A will report module Cs hash as the same as B will report module Ds hash |
10:36:43 | * | Vladar joined #nim |
10:37:03 | PMunch | I don't think you're really supposed to hash module nodes :P |
10:38:35 | * | Gustavo6046 quit (Remote host closed the connection) |
10:58:37 | * | krux02 joined #nim |
10:59:39 | * | jjido joined #nim |
11:05:25 | * | Gustavo6046 joined #nim |
11:23:57 | * | jmdaemon quit (Ping timeout: 240 seconds) |
11:32:04 | FromDiscord | <Goel> `include` 🧠 |
11:32:20 | * | rockcavera joined #nim |
11:32:20 | * | rockcavera quit (Changing host) |
11:32:20 | * | rockcavera joined #nim |
11:35:14 | Amun-Ra | do I recall correctly you can't test import in try/except block in Nim? |
11:35:41 | PMunch | What do you mean? |
11:36:15 | Amun-Ra | equivalent of python's try: import module except ImportError: pass |
11:36:26 | PMunch | You could do `when compiles(import mymodule): import mymodule` I guess |
11:36:45 | Amun-Ra | ah, I keep forgetting 'compiles' is a thing |
11:36:53 | PMunch | That would catch if there is anything in the file that doesn't compile though :P |
11:36:58 | PMunch | Not just that if the file exists |
11:37:22 | Amun-Ra | I'm fine with that |
11:38:02 | Amun-Ra | https://play.nim-lang.org/#ix=3Pii |
11:39:04 | PMunch | What are you trying to do though? |
11:39:51 | Amun-Ra | I just wanted to have an alternative way of checking if my module compiles on given platform instead of using when |
11:40:09 | Amun-Ra | I was just curious if it works |
11:41:11 | Amun-Ra | I'm fine with when+elif |
11:42:12 | Amun-Ra | compiles works with expressions, you can't test imports with it |
11:45:05 | PMunch | Hmm, you're right |
11:55:52 | PMunch | Hmm, what is an nnkConv? |
11:57:09 | FromDiscord | <Rika> Converter? I don’t know |
11:57:29 | PMunch | Nah that seems to be an nnkConverterDef |
11:57:50 | PMunch | Oh wait |
11:57:53 | PMunch | Conversion maybe? |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.4) |
12:06:55 | * | supakeen joined #nim |
12:15:46 | arkanoid | I'm getting kind of tired of weird nim behaviours. I'm not having failing AsyncHttpClient.requests in docker contaienr, but `curl` works on identical url on same docker container, but nim return status is 200 OK. What kind of headers is it putting by default?! |
12:16:04 | arkanoid | s/not having/now having/ |
12:20:36 | FromDiscord | <Rika> nim headers do not preserve case sensitivity. some servers do not follow http spec and use "canonical" header capitalisation |
12:20:38 | FromDiscord | <Rika> might be related |
12:21:45 | supakeen | there's plenty in (async)httpclient sadly, i suggest taking a look with either httpmitm, ngrep, or tcpdump what it's actually sending |
12:22:28 | supakeen | cookie headers are especially worrisome |
12:23:51 | supakeen | this sadly went stale: https://github.com/nim-lang/Nim/pull/15478 |
12:24:08 | supakeen | https://github.com/nim-lang/Nim/pull/15484 so did that |
12:24:11 | supakeen | because i got busy :( |
12:28:16 | NimEventer | New Nimble package! watchout - ⚡️ Just... yellin' for changes! File System Monitor for devs, see https://github.com/openpeep/watchout |
12:28:17 | NimEventer | New Nimble package! madam - Local webserver for Design Prototyping and Front-end Development, see https://github.com/openpeep/madam |
12:29:05 | FromDiscord | <Rika> damn a fuckin custom embed |
12:30:32 | FromDiscord | <ajusa> Wow these guys have a lot of stuff |
12:31:02 | FromDiscord | <ajusa> Template engine, web server, JSON validation |
12:31:06 | FromDiscord | <Rika> apparently its a single dude too |
12:33:13 | PMunch | I think they're a company |
12:33:18 | PMunch | Their bio is: A talent-driven, creative agency, focused on developing Open Source, SaaS products, and other cool things. Based in South Eastern Europe — Bucharest, RO |
12:36:20 | supakeen | awesome |
12:38:09 | PMunch | Hmm, comparing types is a pain |
12:39:38 | PMunch | Maybe I should abandon keeping a table of type -> callback and simply just store the type nodes and then generate log templates for each type when you import superlog |
12:41:20 | PMunch | And just let Nim type evaluation handle the dirty work of resolving aliases and generic types |
13:26:14 | * | arkurious joined #nim |
13:44:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:55:12 | PMunch | Why is instantiationInfo so damn fickle.. |
13:58:25 | FromDiscord | <enthus1ast> what is the prefered way to check if a string (a password) contains at least one of a set of chars (some special chars?) |
13:58:48 | PMunch | allIt from strutils? |
13:59:00 | PMunch | Oh wait, at least one of |
13:59:08 | FromDiscord | <Rika> anyIt |
13:59:09 | FromDiscord | <Rika> lol |
13:59:33 | PMunch | Problem with that is that you have to loop through it once per rule |
14:00:03 | FromDiscord | <Rika> collect |
14:00:13 | FromDiscord | <Rika> well collect doesnt really work that way ig |
14:00:42 | FromDiscord | <enthus1ast> yes anyIt |
14:00:42 | FromDiscord | <Rika> collect + any(@[bool]) loooool naive solution moment |
14:01:02 | FromDiscord | <enthus1ast> thank you both (its from sequtils btw) |
14:02:54 | PMunch | I think I'd convert it to a set[char] and then check that the character you require are a subset of that set |
14:04:14 | FromDiscord | <Rika> didnt he say it was a set of chars already |
14:04:33 | FromDiscord | <enthus1ast> jeah technically no \:) |
14:05:12 | PMunch | Hmm is there really no easy way to convert a string to a set[char]? |
14:05:41 | PMunch | I mean you can create a HashSet easily, but that's a bit heavy for this simple task.. |
14:07:25 | FromDiscord | <enthus1ast> have done it differntly now |
14:07:26 | FromDiscord | <enthus1ast> the nice thing about this is, i compile it to js and c backend, so i check in the browser and in the backen with the same code \:) |
14:07:26 | FromDiscord | <enthus1ast> i'm always happy when i can do stuff like this |
14:07:30 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Pj7 |
14:08:02 | FromDiscord | <frankzig> is there a package in nim to facilitate writing read-eval loops? |
14:08:12 | FromDiscord | <Rika> not that i know of, no |
14:17:49 | * | dtomato quit (Ping timeout: 240 seconds) |
14:18:57 | FromDiscord | <enthus1ast> what does this mean?↵(@frankzig) |
14:19:29 | FromDiscord | <enthus1ast> or, what is your issue? |
14:23:02 | FromDiscord | <frankzig> I'm in the process of writing a tool for my research group |
14:23:19 | * | Gustavo6046 quit (Remote host closed the connection) |
14:23:35 | FromDiscord | <frankzig> this tool will take in commands and settings as text and execute/print-out-results |
14:24:06 | FromDiscord | <frankzig> at the moment I'm manually writing a while loop with conditions to run each function etc etc. |
14:24:44 | FromDiscord | <frankzig> Since for CLI tools there is the awesome CLIGEN which does miracles, i.e. it takes a function as input and it turns the function into a fully functional cli interface |
14:25:00 | FromDiscord | <frankzig> I was wondering if there is somthing like that for read-eval loops |
14:25:08 | * | dtomato joined #nim |
14:25:10 | FromDiscord | <haxscramper> what kind of dispatching you are looking for in the loop? |
14:25:55 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Pjg |
14:26:05 | FromDiscord | <frankzig> that's exactly what i'm doing |
14:26:09 | FromDiscord | <haxscramper> https://nim-lang.github.io/fusion/src/fusion/matching.html |
14:26:39 | FromDiscord | <frankzig> a okay this sounds useful |
14:27:02 | FromDiscord | <haxscramper> or you can `case` on enum value, pattern matching is overkill most of the time |
14:27:46 | FromDiscord | <haxscramper> and I hate this `case` overload bs, so if you are looking for a tool that other people use your best bet would probably be to unparse input commands into variant object |
14:27:52 | FromDiscord | <haxscramper> other people can read |
14:28:21 | FromDiscord | <frankzig> sent a code paste, see https://play.nim-lang.org/#ix=3Pjh |
14:28:24 | FromDiscord | <frankzig> very primitive looking |
14:28:50 | FromDiscord | <enthus1ast> You can also use scanstr for this |
14:28:59 | FromDiscord | <enthus1ast> Pardon strscan |
14:29:38 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/strscans.html |
14:32:06 | FromDiscord | <haxscramper> In reply to @frankzig "atm this is what": you are expecting to have a complicated CLI setup with lots of commands, or this is all? |
14:32:51 | FromDiscord | <haxscramper> if that's all there is to it, just leave it as it is, maybe you can get a little better with strscans, but I"m not sure |
14:34:13 | FromDiscord | <haxscramper> https://github.com/haxscramper/hmisc/blob/50d39c2d62fadbfcc89621ed6208263cf876fe31/src/hmisc/algo/tscanf.nim https://github.com/haxscramper/hmisc/blob/50d39c2d62fadbfcc89621ed6208263cf876fe31/tests/tScanf.nim I have old unused wrapper for scanf that injects types |
14:34:17 | * | Gustavo6046 joined #nim |
14:34:38 | FromDiscord | <haxscramper> so you can do `if cmd.tscanf("pop $i")` and it will inject integer on match |
14:34:54 | FromDiscord | <enthus1ast> there also is\: https://github.com/jangko/nim-noise↵but have not used it in years |
14:35:55 | FromDiscord | <haxscramper> In reply to @haxscramper "https://github.com/haxscramper/hmisc/blob/50d39c2d6": @frankzig if you want you can just copy the implementation to your code as is without importing my whole library |
14:37:16 | FromDiscord | <enthus1ast> @haxscramper\: btw the documentation for hnimast is down |
14:40:34 | FromDiscord | <haxscramper> Nim doc shat itself again |
14:41:10 | FromDiscord | <haxscramper> And I'm too tired of debugging this foe the nth time, so it is going to stay this way |
14:41:30 | FromDiscord | <haxscramper> Hcparse can't generate documentation for itself as well |
14:41:33 | FromDiscord | <haxscramper> And hnimast too |
14:42:52 | FromDiscord | <haxscramper> And I figured out a much better API for the AST superstructures and all that kind of thing, so I will deprecate this library at some point |
14:44:24 | FromDiscord | <haxscramper> Actually I think I never managed to make it work correctly |
14:44:34 | FromDiscord | <enthus1ast> i must admit every time i look into this lib, i'm a little overwhelmed |
14:44:47 | FromDiscord | <haxscramper> For example links on the readme were added only because index.html was 404 all the time |
14:45:01 | FromDiscord | <enthus1ast> so I've never used it |
14:45:04 | FromDiscord | <haxscramper> Because it is a garbage pile |
14:45:39 | FromDiscord | <haxscramper> The API is wrong and it sits on top of the legacy hacks, that in turn sit on top of the barely documented compiler API |
14:46:04 | FromDiscord | <enthus1ast> yes i understand |
14:46:56 | FromDiscord | <haxscramper> https://github.com/haxscramper/nimskull/blob/docgen3/compiler/tools/docgen_unparser.nim this is a lot more compact solution |
14:52:36 | FromDiscord | <Hel> Hello, i was just wondering which Nim version is more stable 1.2.16 or 1.6.4 |
14:53:06 | FromDiscord | <Hel> i'm asking cause when compiling a project with 1.2.16 and arc on i got a compilation error in nim's C files |
14:53:14 | FromDiscord | <Hel> after updating to 1.6.4 arc worked fine |
14:54:26 | FromDiscord | <konsumlamm> stabe in the sense that it has less bugs? then always the latest version (currently 1.6.4) |
14:54:32 | FromDiscord | <konsumlamm> (edit) "stabe" => "stable" |
14:55:44 | * | jjido joined #nim |
14:56:19 | FromDiscord | <fwsgonzo> Hey guys. As usual, I have a strange question: How can I force a crash in Nim? |
14:56:30 | FromDiscord | <fwsgonzo> (edit) "Hey guys. As usual, I have a strange question: How can I force a crash in Nim? ... " added "That is, what's the simplest way" |
14:56:33 | FromDiscord | <konsumlamm> what kind of crash? |
14:56:38 | FromDiscord | <Hel> In reply to @konsumlamm "stable in the sense": yeah stable as in less bugs |
14:56:53 | FromDiscord | <konsumlamm> you mean like a segmentation fault? or just exit with some exit code? or throw an exception? |
14:57:06 | FromDiscord | <fwsgonzo> anything that causes a signal handler to be called, I guess, like a CPU exception |
14:57:21 | FromDiscord | <fwsgonzo> i just want to test the Nim backtrace functionality works |
14:57:25 | FromDiscord | <Hel> oh i just segfaulted with orc |
14:57:28 | FromDiscord | <fwsgonzo> (edit) "i just want to test the Nim backtrace functionality works ... " added "in a RISC-V program" |
14:57:30 | FromDiscord | <Hel> when using 1.2.16 |
14:57:35 | FromDiscord | <Hel> arc just crashes at compile time tho |
14:57:45 | FromDiscord | <konsumlamm> In reply to @Hel "yeah stable as in": `devel` is arguably even more stable in that sense, but it also has a higher risk of having regressions (things that worked previously don't work anymore) |
14:58:14 | FromDiscord | <Hel> yeah but then why did 1.2 branch receive support for so long |
14:58:26 | FromDiscord | <xflywind> 1.6.x has better ARC/ORC support. They are many fixes which are not backported to 1.2.x |
14:59:11 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Pjo |
14:59:30 | FromDiscord | <xflywind> In reply to @Hel "yeah but then why": Both of 1.6.x and 1.2.x have long term support. |
14:59:52 | * | jjido quit (Client Quit) |
15:00:24 | FromDiscord | <Hel> ok then thanks for clarifying |
15:01:00 | FromDiscord | <Hel> i just thought 1.2 would be more stable cause no features would be added and it'd receive bugfixes only |
15:03:15 | FromDiscord | <konsumlamm> some features/changes also make the language more stable |
15:04:00 | FromDiscord | <fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=3PjB |
15:04:08 | FromDiscord | <Hel> In reply to @konsumlamm "some features/changes also make": true |
15:07:20 | FromDiscord | <sOkam!> How can I approach binding a whole C game-engine with futhark recursively?↵The example in their readme only mentions bindings for header files that can be listed, but the project is massive |
15:08:11 | PMunch | Not entirely sure what you mean? |
15:08:26 | PMunch | Do you simply not want to type out all the names of the imports? |
15:08:58 | * | neurocyte0917090 joined #nim |
15:11:15 | * | neurocyte0917090 quit (Read error: Connection reset by peer) |
15:11:36 | FromDiscord | <sOkam!> In reply to @PMunch "Do you simply not": There are hundreds of files. Thought that futhark might be able to handle everything inside a folder (aka the whole engine, with recursive resolution) |
15:12:03 | * | neurocyte0917090 joined #nim |
15:14:23 | PMunch | Yes, that is a planned feature |
15:14:32 | PMunch | Just haven't gotten around to implementing that yet |
15:15:26 | FromDiscord | <sOkam!> In reply to @PMunch "Just haven't gotten around": I see, makes sense↵Any recommendation of what to do in the meantime? |
15:15:52 | PMunch | `find . -name "*.h"` and paste that into a futhark block? |
15:16:07 | PMunch | That's the best you can do at the moment unfortunately |
15:16:18 | PMunch | Of course you might not actually need to load every single file |
15:16:34 | FromDiscord | <sOkam!> does futhark handle non `.h` files?↵its old code, and the whole header thing is missing for a lot of it |
15:16:51 | PMunch | What do you mean non .h files? |
15:17:03 | FromDiscord | <sOkam!> In reply to @PMunch "What do you mean": `.c` mainly |
15:17:15 | PMunch | It handles anything that can go in an `#import "something.h"` block |
15:18:13 | * | neurocyte0917090 quit (Ping timeout: 240 seconds) |
15:18:23 | PMunch | Typically you import some kind of header file in your C project, try feeding that import to Futhark. If you're getting errors about a missing type, grep for it in the library and add the header file it shows up in as well |
15:18:34 | PMunch | I've gotta run |
15:18:34 | * | PMunch quit (Quit: Leaving) |
15:24:26 | nrds | <Prestige99> Is there an os independent way to send system level notifications? Like notify-send on Linux, it would be different on mac/bsd/windows |
15:34:30 | madprops | afaik there's not |
15:34:44 | madprops | email maybe |
15:36:22 | FromDiscord | <sOkam!> im not the op, but os check and creating alternative commands for each option sounds a lot cleaner than email 🤔 |
15:38:11 | madprops | yeah that sounds easier |
15:38:17 | madprops | and sane |
15:38:38 | madprops | just checked and i do have notify-send installed |
15:40:01 | FromDiscord | <sOkam!> there might be a library that already does that (even if for a different language). could be a matter of binding that to nim 🤷♂️ |
15:55:25 | FromDiscord | <DevNugget> just out of curiosity, does Nim have dead code elimination? |
15:58:46 | FromDiscord | <pmunch> Yup |
16:14:12 | FromDiscord | <sOkam!> I'm actually going to go with -not- binding the engine. Didn't know this was a thing 🤔 ↵https://gist.github.com/KyrillosWalid/a923c9f980591b8c184368591cd9a9e8 |
16:42:13 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3PjW |
16:42:41 | FromDiscord | <Ayy Lmao> I need to pass a callback that is essentially varargs but it depends on some string passed into the function |
17:22:41 | FromDiscord | <Bloss> could a "top level only" label be added to the github? sometimes issues only happen in top level code but work fine when put inside a proc and I don't notice that sometimes |
17:24:28 | FromDiscord | <demotomohiro> Why does that happen? |
17:25:16 | FromDiscord | <Bloss> destructors get generated differently at top level vs in proc code I think is one case |
17:35:25 | FromDiscord | <demotomohiro> Maybe destructors for variables at top level are called after all procedure calls cause the problem? |
17:42:13 | FromDiscord | <eyecon> In reply to @nrds "<Prestige> Is there an": Your best bet is AFAIK https://github.com/caronc/apprise |
17:43:34 | nrds | <Prestige99> Thanks, I'll check it out |
18:12:41 | * | Mister_Magister joined #nim |
18:50:35 | * | jjido joined #nim |
18:56:28 | FromDiscord | <eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3Pkl |
18:57:45 | FromDiscord | <eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3Pkm |
18:59:14 | FromDiscord | <eyecon> With `include honeycomb, sugar, strutils` etc. obviously |
18:59:23 | FromDiscord | <eyecon> (edit) "`include" => "`import" |
18:59:52 | * | jmdaemon joined #nim |
19:01:09 | * | vicfred joined #nim |
19:06:47 | FromDiscord | <treeform> In reply to @Elegantbeef "<@180601887916163073>\: cause `timezone` ": @Phil You can also do a similar hook with jsony. |
19:07:41 | FromDiscord | <Phil> In reply to @treeform "<@!180601887916163073> You can also": My friend, that was almost 6 weeks ago, that was even before I made my accidental issue on your jsony project 😄 |
19:07:53 | FromDiscord | <KatrinaKitten> In reply to @eyecon "<@!204718116020682753> this was what": Ahhhhh, I see. Yeah, I can add that. Throw up an issue or a PR and I'll get to it when I can 🙂 |
19:07:54 | FromDiscord | <treeform> also if you use my timezone/calendar stuff it does not have that problem: https://github.com/treeform/chrono and are easy to serialize with nearly any method. |
19:08:09 | FromDiscord | <treeform> In reply to @Isofruit "My friend, that was": Sorry I just search for terms I like. |
19:08:38 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
19:08:48 | FromDiscord | <Phil> No worries, just know that I actually do use the given hooks to parse datetimes in the default format Django uses |
19:14:35 | FromDiscord | <eyecon> In reply to @KatrinaKitten "Ahhhhh, I see. Yeah,": Sure! |
20:04:28 | * | neurocyte0917090 joined #nim |
20:17:04 | * | Mister_Magister quit (Ping timeout: 250 seconds) |
20:18:58 | * | fvs left #nim (WeeChat 3.4) |
21:13:21 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3PkS |
21:13:27 | FromDiscord | <enthus1ast> currently this prints @[] |
21:21:52 | * | jmdaemon quit (Ping timeout: 256 seconds) |
21:30:31 | * | vicfred_ joined #nim |
21:33:10 | * | vicfred quit (Ping timeout: 260 seconds) |
21:33:55 | * | Gustavo6046 quit (Remote host closed the connection) |
21:34:30 | FromDiscord | <enthus1ast> ok it must be let ss = {'a' .. 'z', 'A' .. 'Z'}.toSeq() |
21:35:01 | * | Gustavo6046 joined #nim |
21:35:25 | * | Gustavo6046 quit (Remote host closed the connection) |
21:48:26 | * | Vladar quit (Quit: Leaving) |
21:49:59 | FromDiscord | <rainbowasteroids> how do i remove the last character from a string? |
21:51:27 | * | Gustavo6046 joined #nim |
22:00:11 | FromDiscord | <treeform> In reply to @Isofruit "No worries, just know": Thanks! Sorry for confusion. |
22:00:49 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=3Pl6 |
22:21:24 | FromDiscord | <Ayy Lmao> How would you type a variable on the JS backend that can have varargs of different types? Varargs doesn't seem to work since I am getting this from an external library. |
22:22:29 | FromDiscord | <rainbowasteroids> Thanks↵(@treeform) |
22:29:45 | FromDiscord | <treeform> In reply to @Ayy Lmao "How would you type": I don't know of JS varargs supported in nim... might be hard. |
22:30:36 | * | jjido joined #nim |
22:31:53 | * | jmdaemon joined #nim |
22:36:02 | FromDiscord | <Ayy Lmao> In reply to @treeform "I don't know of": Is there some sort of way I can tell the type system to not worry about a particular argument of a function? Like I need to pass a `proc` that can have any number of args of any type into a JS library function. |
22:39:00 | * | vicfred_ quit (Quit: Leaving) |
22:40:19 | FromDiscord | <eyecon> In reply to @KatrinaKitten "Ahhhhh, I see. Yeah,": I just did! |
22:42:25 | FromDiscord | <treeform> In reply to @Ayy Lmao "Is there some sort": Probably emit pragma |
22:50:49 | FromDiscord | <Ayy Lmao> In reply to @treeform "Probably emit pragma": Yeah the emit pragma is probably the way to go. |
23:05:26 | anddam | `12q34A5216`````````````````````````````` |
23:06:33 | anddam | a real case of cat on the keyboard |
23:13:20 | FromDiscord | <sOkam!> I've been trying this, but there is no header file output for some reason↵Is there something missing in the syntax? 🤔 https://media.discordapp.net/attachments/371759389889003532/941834317980655647/unknown.png |
23:14:27 | FromDiscord | <sOkam!> The lib.nim code is just this: https://media.discordapp.net/attachments/371759389889003532/941834598864793640/unknown.png |
23:18:46 | FromDiscord | <auxym> what's wrong? |
23:19:41 | FromDiscord | <sOkam!> In reply to @auxym "what's wrong?": there is no file https://media.discordapp.net/attachments/371759389889003532/941835915842707456/unknown.png |
23:19:55 | FromDiscord | <sOkam!> (edit) "In reply to @auxym "what's wrong?": there is no file ... https://media.discordapp.net/attachments/371759389889003532/941835915842707456/unknown.png" added "output" |
23:20:54 | FromDiscord | <auxym> hm possibly because noLinking? What are you trying to achieve? |
23:21:11 | FromDiscord | <sOkam!> converting that procedure into a `.h` file |
23:22:56 | FromDiscord | <sOkam!> In reply to @auxym "hm possibly because noLinking?": Following a tutorial, btw. This is what it says https://media.discordapp.net/attachments/371759389889003532/941836733153153034/unknown.png |
23:24:00 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
23:24:02 | FromDiscord | <auxym> as that text says, the compiler-generated files will be in your nimcache directory |
23:24:19 | * | jmdaemon joined #nim |
23:24:20 | FromDiscord | <sOkam!> oh im blind 🙈 damn sry |
23:24:30 | FromDiscord | <auxym> is that a tutorial to produce a library for static linking? sounds like it I think |
23:24:46 | FromDiscord | <sOkam!> i don't know what static linking is |
23:25:02 | FromDiscord | <sOkam!> I'm just trying to export headers to use/connect directly inside a C project |
23:25:14 | FromDiscord | <sOkam!> not binaries, just header files |
23:25:46 | FromDiscord | <sOkam!> The tut: https://gist.github.com/KyrillosWalid/a923c9f980591b8c184368591cd9a9e8 |
23:25:53 | FromDiscord | <auxym> I'm not sure nim can produce a header-only library |
23:26:03 | FromDiscord | <auxym> have you considered using genny? https://github.com/treeform/genny |
23:26:45 | FromDiscord | <sOkam!> In reply to @auxym "have you considered using": isn't that app a binary generator? |
23:26:52 | FromDiscord | <auxym> yes |
23:27:17 | FromDiscord | <auxym> apparently according to that tutorial it's possible to generate header-only lib, wasn't aware |
23:29:13 | FromDiscord | <sOkam!> In reply to @auxym "have you considered using": the thing is. I don' |
23:30:07 | FromDiscord | <sOkam!> In reply to @auxym "have you considered using": The thing is. I don't know how to connect a library inside this engine↵BUT... I -do- know how to connect C headers. Hence why I considered this route |
23:31:06 | FromDiscord | <sOkam!> The problem with it is that this code is going to be converted to a custom bytecode by the engine↵And I have no clue how to link a library so that the bytecode compiler understands it |
23:31:56 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3Pln |
23:31:57 | FromDiscord | <b4mbus> Im confused by the case statement especially |
23:32:26 | FromDiscord | <b4mbus> where did the `isLeaf` come from |
23:32:36 | FromDiscord | <b4mbus> https://rosettacode.org/wiki/Flatten_a_list#Nim |
23:32:44 | * | jmdaemon quit (Ping timeout: 250 seconds) |
23:33:34 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3Plo |
23:34:24 | FromDiscord | <leorize> it declares a variant object |
23:34:49 | FromDiscord | <leorize> https://nim-lang.org/docs/manual.html#types-object-variants |
23:34:50 | FromDiscord | <b4mbus> oh makes sense |
23:36:28 | * | Gustavo6046 quit (Quit: Leaving) |
23:39:01 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Plr |
23:39:31 | FromDiscord | <leorize> add \`--nimcache\:your/path/here\` |
23:40:11 | * | vicecea quit (Remote host closed the connection) |
23:40:47 | * | vicecea joined #nim |
23:59:28 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Plz |
23:59:34 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3PlA |
23:59:44 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=3Plz" => "https://play.nim-lang.org/#ix=3PlB" |
23:59:52 | FromDiscord | <b4mbus> (edit) "https://play.nim-lang.org/#ix=3PlA" => "https://play.nim-lang.org/#ix=3PlC" |