00:03:53 | FromDiscord | <Rika> In reply to @qb "Guess you're looking for": This is the right answer here |
00:18:41 | FromDiscord | <$$$> sent a code paste, see https://play.nim-lang.org/#ix=3QkY |
00:23:23 | FromDiscord | <atlx> hi so im new |
00:23:34 | FromDiscord | <atlx> taken a look at the syntax, seems pretty awesome |
00:23:59 | FromDiscord | <atlx> im mostly interested currently in compiler design, working on one in Rust |
00:24:07 | FromDiscord | <atlx> what's your opinions on how Nim compares to Rust? |
00:24:32 | PMunch | Quite a big subject to cover |
00:24:50 | FromDiscord | <$$$> sent a code paste, see https://play.nim-lang.org/#ix=3QkZ |
00:24:54 | PMunch | I'd say Nim is way easier to learn and use, at least all the people coming here from Rust says that |
00:25:20 | PMunch | Nim targets C, which means that you can run Nim anywhere you can run C |
00:25:36 | PMunch | It also makes interoperability with C really easy |
00:28:28 | PMunch | Besides it has an amazing macro system which can make all the difference |
00:29:32 | * | PMunch quit (Quit: leaving) |
00:38:30 | FromDiscord | <creikey> Nims macros are just so much nicer than rusts |
00:51:17 | FromDiscord | <$$$> In reply to @qb "Guess you're looking for": what if 0 was sum else ? like [3:15] |
00:52:28 | FromDiscord | <qb> huh? Should be [3..15] |
00:52:33 | FromDiscord | <$$$> oh lmao alr |
00:58:42 | FromDiscord | <atlx> In reply to @PMunch "Nim targets C, which": that is great to know |
00:58:45 | FromDiscord | <atlx> wasn't aware thanks |
01:07:27 | * | noeontheend joined #nim |
01:08:00 | * | def- quit (Quit: -) |
01:10:50 | FromDiscord | <huantian> In reply to @$$$ "what if 0 was": you can also do `[0..^2]`, which would be the same as `[0:-1]` |
01:23:48 | FromDiscord | <$$$> is my vscode bugging or am i doing something very wrong https://media.discordapp.net/attachments/371759389889003532/945491026582315109/unknown.png |
01:26:10 | * | def- joined #nim |
01:27:42 | * | noeontheend quit (Ping timeout: 272 seconds) |
01:29:11 | FromDiscord | <Elegantbeef> What's the compiler say |
01:31:23 | FromDiscord | <$$$> yea i fixed it the documentation was ahead of the actual version for some reason |
01:48:56 | NimEventer | New question by itil memek cantik: Nim have to convert string to int the simplest, see https://stackoverflow.com/questions/71215018/nim-have-to-convert-string-to-int-the-simplest |
01:52:39 | FromDiscord | <qb> sent a code paste, see https://play.nim-lang.org/#ix=3Qlg |
01:52:50 | FromDiscord | <qb> (edit) "https://play.nim-lang.org/#ix=3Qlg" => "https://play.nim-lang.org/#ix=3Qlh" |
01:52:57 | FromDiscord | <qb> (edit) |
01:54:11 | FromDiscord | <qb> (edit) "https://play.nim-lang.org/#ix=3Qlh" => "https://play.nim-lang.org/#ix=3Qlj" |
01:57:19 | FromDiscord | <huantian> @abdu is there a reason you don't want to use the standard library? It would just be easier and less error prone to use parseutils.parseInt |
01:57:36 | FromDiscord | <huantian> I would reply on SO but I don't have enough rep grrrr |
02:15:46 | FromDiscord | <abdu> How to convert string to int the simplest native way without module import .. |
02:23:13 | FromDiscord | <Elegantbeef> Dead simple |
02:23:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Qlo |
02:23:16 | FromDiscord | <Elegantbeef> Also dead dumb |
02:23:57 | FromDiscord | <huantian> what if my int is negative tho beef 😛 |
02:26:03 | FromDiscord | <Elegantbeef> You check it then use `toOpenArray` 😛 |
02:28:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Qlr |
02:28:57 | FromDiscord | <Elegantbeef> guess we could just do `-parseInt(str.toOpenArray(1, str.len - 1))` instead of being fucking weird |
02:33:26 | FromDiscord | <chancy> So it seems like one of the ways to get the correct SDK on OSX is to do something like `$(xcrun --sdk macosx --find clang) -isysroot $(xcrun --sdk macosx --show-sdk-path) -arch arm64`. What the appropriate way to feed this to Nim? `--cc` seems to just expect simple input like gcc, clang, etc. |
02:47:08 | FromDiscord | <retkid> In reply to @qb "On the examples nimpy": very intuitive syntax here |
02:48:10 | FromDiscord | <concatime> Quick question folks. I'm on Linux, and I use `clang`. When building Nim from source, I get `Error: execution of an external compiler program 'gcc -c -w -I/build/Nim-1.2.18/lib -I/build/Nim-1.2.18 -o /tmp/cache/nim/koch_d/stdlib_assertions.nim.c.o /tmp/cache/nim/koch_d/stdlib_assertions.nim.c' failed with exit code: 127`. I already set the env. var`CC` to `clang`. |
02:48:35 | FromDiscord | <concatime> Now, how do I tell nim to use clang? |
02:48:40 | FromDiscord | <demotomohiro> --cc option just specify kind of compiler. If you want to do cross compile, you need to set `arm64.osx.clang.exe = <clang-exe-name>` in nim.cfg. |
02:55:40 | FromDiscord | <demotomohiro> Building Nim from source with other than gcc might require editing `build_all.sh` |
02:58:37 | * | neurocyte0917090 quit (Ping timeout: 240 seconds) |
03:00:42 | FromDiscord | <demotomohiro> If you have working Nim compiler that is same version to source code, build koch with existig nim with --cc:clang and `./koch boot -d:release --cc:clang` might work. |
03:09:27 | FromDiscord | <demotomohiro> Or just changing `cc = gcc` to `cc = clang` in `compile/nim.cfg` might work. |
03:13:28 | FromDiscord | <concatime> Yep, that's what I did after you pointed my to `--cc`. I just want to say that Nim a bless to bootstrap. Have you tried to bootstrap `F#`? |
03:15:10 | FromDiscord | <huantian> I want to try F# at some point... seems pretty functional |
03:18:16 | FromDiscord | <$$$> can someone explain pragmas |
03:18:34 | FromDiscord | <Elegantbeef> They can be annotations and macros |
03:19:36 | FromDiscord | <$$$> can u use multiple |
03:19:55 | FromDiscord | <huantian> yes |
03:19:55 | FromDiscord | <Elegantbeef> Yes |
03:20:02 | FromDiscord | <$$$> also what does `"template/generic instantiation of await from here"` |
03:20:03 | FromDiscord | <$$$> mean |
03:20:11 | FromDiscord | <$$$> i get it when calling an await procedure |
03:21:03 | FromDiscord | <Elegantbeef> an "await procedure"? |
03:21:39 | FromDiscord | <$$$> https://media.discordapp.net/attachments/371759389889003532/945520686556925952/unknown.png |
03:21:44 | FromDiscord | <$$$> async |
03:21:46 | FromDiscord | <$$$> my bad |
03:22:22 | FromDiscord | <huantian> that means you used the await macro to do something, but the stuff that the macro made made an error |
03:22:35 | FromDiscord | <huantian> I think? |
03:22:52 | FromDiscord | <$$$> when i call it |
03:22:53 | FromDiscord | <$$$> `Error: 'yield' only allowed in an iterator` |
03:22:59 | FromDiscord | <$$$> `nim-1.6.4\lib\pure\asyncmacro.nim(130, 3) Error: 'yield' only allowed in an iterator` |
03:24:27 | FromDiscord | <$$$> idek what that means |
03:25:17 | FromDiscord | <Elegantbeef> do you have `import std/asyncdispatch`? |
03:25:57 | FromDiscord | <Elegantbeef> you're attempting to await a async procedure in a non async procedure |
03:26:07 | FromDiscord | <Elegantbeef> do `waitfor thingy()` |
03:28:03 | FromDiscord | <Elegantbeef> Dont get why it doesnt do anything helpful |
03:28:22 | FromDiscord | <Elegantbeef> Like maybe a "attempting to await async inside non async procedure" |
03:28:41 | FromDiscord | <huantian> yeah wonder why await doesn't give an error like that |
03:29:29 | FromDiscord | <Elegantbeef> Well it involves getting the owner of the present symbol so it's somewhat difficult |
03:29:36 | FromDiscord | <$$$> In reply to @huantian "yeah wonder why await": ye i had no idea what "Error: 'yield' only allowed in an iterator" meant |
03:30:00 | * | arkurious quit (Quit: Leaving) |
03:30:16 | FromDiscord | <Elegantbeef> Well i say somewhat difficult but it's more tedious than difficult |
03:30:20 | FromDiscord | <huantian> In reply to @Elegantbeef "Well it involves getting": ~~what if you just check if yield compiles~~ |
03:30:41 | FromDiscord | <Elegantbeef> that'd work |
03:30:55 | FromDiscord | <Elegantbeef> go PR it |
03:36:58 | FromDiscord | <$$$> final question, how do i zip a file (create a new zip) 🤔 \ |
03:37:23 | FromDiscord | <huantian> you'll want a package like zippy for that |
03:37:24 | FromDiscord | <huantian> <https://github.com/guzba/zippy> |
03:40:58 | FromDiscord | <$$$> In reply to @huantian "you'll want a package": i tried but im trying to create a .zip file and it just didnt create a file |
03:46:06 | FromDiscord | <Elegantbeef> Did you save the file? |
03:57:12 | FromDiscord | <huantian> In reply to @Elegantbeef "that'd work": hm is `compiles()` the right way to do this? |
03:58:25 | FromDiscord | <huantian> `when not compiles(yield internalTmpFuture):` makes nim complain about "expression expected, but found 'keyword yield'" |
03:59:21 | FromDiscord | <Elegantbeef> Ah parser issues i think |
04:00:50 | FromDiscord | <Elegantbeef> Ideal might be the symbol thing i mentioned |
04:01:13 | FromDiscord | <Elegantbeef> emit a const, get it's symbol and ensure it's inside a `async` proc |
04:04:28 | FromDiscord | <huantian> can I do that in a template though? |
04:04:39 | FromDiscord | <Elegantbeef> Yea |
04:04:56 | FromDiscord | <huantian> cool cool |
04:05:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3QlH |
04:05:44 | FromDiscord | <huantian> ah that makes sense |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.4) |
04:06:33 | * | supakeen joined #nim |
04:32:36 | * | rockcavera quit (Read error: Connection reset by peer) |
04:33:01 | * | rockcavera joined #nim |
04:33:02 | * | rockcavera quit (Changing host) |
04:33:02 | * | rockcavera joined #nim |
04:51:38 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3QlU |
04:52:32 | FromDiscord | <huantian> I guess I should just check if the return type of the iterator is `owned(FutureBase)`, but maybe is there a way to check if the proc was annotated with {.async.} before async is expanded? |
04:54:15 | FromDiscord | <Elegantbeef> There is not |
05:01:23 | FromDiscord | <huantian> is something like this the right way to check for return type?↵`owner.getImpl.params[0] == newCall(bindSym"owned", bindSym"FutureBase")` |
05:01:38 | FromDiscord | <Elegantbeef> yep |
05:01:46 | FromDiscord | <huantian> nice |
05:01:47 | FromDiscord | <Elegantbeef> well i'd say sorta |
05:01:53 | FromDiscord | <Elegantbeef> it's not going to be a `newCall` |
05:03:42 | FromDiscord | <Elegantbeef> it can also be a command no? |
05:03:57 | FromDiscord | <Elegantbeef> Dont know what `owned` even is/does |
05:05:18 | FromDiscord | <Elegantbeef> eitherway it can be a call or command |
05:05:32 | NimEventer | New question by pooooky: How to hide all Nimble and Nim outputs including errors?, see https://stackoverflow.com/questions/71216157/how-to-hide-all-nimble-and-nim-outputs-including-errors |
05:05:45 | FromDiscord | <huantian> I'd think {.async.} would only expand it to a call tho right? |
05:06:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3QlZ |
05:06:34 | FromDiscord | <Elegantbeef> Damn it accidently sent it |
05:07:05 | FromDiscord | <Elegantbeef> Oh yea today is not my day |
05:07:06 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Qm0 |
05:08:05 | FromDiscord | <Elegantbeef> The command is easy to do an ensure nothing ever goes astray, but i could be being dumb |
05:09:36 | FromDiscord | <huantian> I'm probably gonna look at this tomorrow some more, gonna go sleep now tho ↵gn beef |
05:09:46 | FromDiscord | <Elegantbeef> Buh bye |
05:13:21 | FromDiscord | <huantian> Oh yeah just before I dip, youd probably want a length check too right |
05:13:36 | FromDiscord | <Elegantbeef> Yea |
05:17:07 | FromDiscord | <sheldon> Is there any blockchain written in Nim? |
05:17:50 | FromDiscord | <Elegantbeef> https://github.com/status-im/nimbus-eth2/ |
05:31:18 | * | krux02 quit (Remote host closed the connection) |
05:42:01 | * | Gustavo6046 quit (Quit: Leaving) |
06:06:32 | FromDiscord | <Nick.> sent a code paste, see https://play.nim-lang.org/#ix=3Qmc |
06:13:16 | * | slowButPresent quit (Quit: leaving) |
06:18:53 | FromDiscord | <Elegantbeef> I could be wrong but isnt the issue you're trying to rotate left `x.byte` which is just `1000000` |
06:22:44 | FromDiscord | <Elegantbeef> i assume there is a reason you're avoiding `shr 5`? |
06:23:05 | FromDiscord | <Nick.> Right, I just figured that 0x32 has a lenght of 6 which I would like to have it to be 8. I would add 0 + i.byte to it but that isnt working. |
06:23:49 | FromDiscord | <Elegantbeef> 0x32 is an `int` which is 64 bit generally |
06:24:08 | FromDiscord | <Nick.> the end result i'm at is 0100_0110 |
06:24:28 | FromDiscord | <Elegantbeef> if you want `0x32` to be a `uint8` you'd do `0x32u8` |
06:27:30 | FromDiscord | <Elegantbeef> I've never used rotateBits before so i cannot help using it, so i guess i'll shush 😀 |
06:27:39 | FromDiscord | <Nick.> xD |
06:29:13 | FromDiscord | <Nick.> so the idea is add 00 to 110010 = 00110010. Has a len of 8. Then grab the last 3 which is 010 and add 00110 behind it. |
06:29:23 | FromDiscord | <Nick.> which is dec 70 |
06:29:37 | FromDiscord | <Nick.> (edit) "70" => "70. Which is char F" |
06:30:25 | FromDiscord | <Nick.> But I'm clearly doing something wrong |
06:32:57 | FromDiscord | <Elegantbeef> Yep no clue, cannot grok how rotate works at the moment |
06:44:02 | FromDiscord | <$$$> how do i run a powershell command in nim |
06:44:29 | FromDiscord | <Elegantbeef> Do you mean run a shell command or do you want to use the windows powershell API? |
06:44:35 | FromDiscord | <$$$> run a shell cmd |
06:44:55 | FromDiscord | <Elegantbeef> `import std/os; discard execCmd("echo 'hello'")` |
06:45:24 | FromDiscord | <Elegantbeef> Shit it's not execCmd i'm a liar! |
06:45:31 | FromDiscord | <$$$> shii what is it |
06:45:34 | FromDiscord | <$$$> 🤔 |
06:45:34 | FromDiscord | <Elegantbeef> It's `execShellCmd` |
06:45:42 | FromDiscord | <$$$> oh alr, thanks! |
06:46:28 | FromDiscord | <Elegantbeef> There is also osproc for more features |
07:03:43 | * | ltriant quit (Ping timeout: 256 seconds) |
07:06:32 | FromDiscord | <$$$> the -d:ssl argument was breaking my code to upload a file to a server, so im trying to use libcurl `<https://github.com/Araq/libcurl>` to upload the file to a server, cuz it doesnt need the argument to work over ssl. can sum1 help me with this? |
07:07:15 | FromDiscord | <Elegantbeef> I mean what was the issue with `-d:ssl`? |
07:07:58 | * | jjido joined #nim |
07:08:06 | FromDiscord | <$$$> In reply to @Elegantbeef "I mean what was": i got my friend to test my code out (.exe) on his machine and it was throwing errors about how it doesnt have the dlls, but i dont wana include the .dlls in my folder, so i have to switch to something else |
07:08:33 | FromDiscord | <Elegantbeef> I feel like "just ship the dll"s is a easy solution |
07:08:45 | FromDiscord | <Elegantbeef> You're still going to need libcurl |
07:09:09 | FromDiscord | <$$$> In reply to @Elegantbeef "I feel like "just": nawwww |
07:09:11 | FromDiscord | <Elegantbeef> You could use https://github.com/treeform/puppy |
07:09:14 | FromDiscord | <$$$> whats dat |
07:09:43 | FromDiscord | <$$$> can u post with dat ? |
07:11:14 | FromDiscord | <Elegantbeef> Dont know |
07:11:27 | FromDiscord | <$$$> i checked it and m pretty sure u cant |
07:11:34 | FromDiscord | <$$$> do yk how to use curl? like the cmd |
07:11:41 | FromDiscord | <Elegantbeef> Nope |
07:11:49 | FromDiscord | <$$$> dam 😔 |
07:12:55 | FromDiscord | <morgan> is there any way to have proc overloading where the only difference is in the return type? |
07:13:20 | FromDiscord | <morgan> if not it's not really an issue |
07:13:38 | FromDiscord | <Elegantbeef> Nope overloading only works on parameters, you could use generics for overloading return |
07:13:56 | FromDiscord | <morgan> just would save a proc call that does a very simple conversion |
07:14:09 | FromDiscord | <Elegantbeef> A converter? |
07:14:23 | FromDiscord | <morgan> basically i have a set of color objects with and without opacity |
07:14:52 | FromDiscord | <Elegantbeef> A code example might be in order |
07:15:32 | FromDiscord | <morgan> so it could convert to not having opacity when it converts from cartesian to cylindrical space without another proc to change the type to a form without opacity |
07:16:26 | FromDiscord | <morgan> if that makes sense |
07:16:37 | FromDiscord | <Elegantbeef> It does not |
07:16:57 | FromDiscord | <morgan> one sec |
07:19:53 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#ix=3Qmp |
07:20:25 | FromDiscord | <morgan> there's also addOpacity but i left it out because it's almost the same thing |
07:20:38 | FromDiscord | <Elegantbeef> Could use a generic |
07:21:08 | FromDiscord | <morgan> hm ok |
07:21:29 | FromDiscord | <morgan> i think i'll just leave them as no opacity to no opacity and opacity to opacity |
07:22:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Qmq |
07:22:44 | FromDiscord | <morgan> ooh |
07:23:46 | FromDiscord | <Elegantbeef> Though dont see how htat's any better |
07:24:15 | FromDiscord | <morgan> yeah |
07:24:32 | FromDiscord | <morgan> slightly smaller but also less clear |
07:25:06 | FromDiscord | <Elegantbeef> Where was the return type inference wanted? |
07:25:21 | FromDiscord | <morgan> in the cyl functions |
07:25:55 | FromDiscord | <morgan> so that it could take in an OLAB and return an OLCH or an LCH depending on what the variable or next function wants |
07:26:05 | FromDiscord | <morgan> tho i suppose that's kinda unclear |
07:26:44 | FromDiscord | <Elegantbeef> Could define converters |
07:28:42 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#converters if you dont know what i mean |
07:29:27 | FromDiscord | <morgan> will check that out |
07:32:23 | FromDiscord | <$$$> sent a code paste, see https://play.nim-lang.org/#ix=3Qmu |
07:33:23 | FromDiscord | <Elegantbeef> and now you need curl |
07:37:54 | FromDiscord | <$$$> wdym |
07:37:57 | FromDiscord | <$$$> its preinstalled |
07:45:56 | FromDiscord | <Rika> Is it now |
07:49:05 | * | ltriant joined #nim |
07:54:02 | * | ltriant quit (Ping timeout: 272 seconds) |
07:59:48 | FromDiscord | <$$$> ran in to one more issue, https://media.discordapp.net/attachments/371759389889003532/945590683031449670/unknown.png |
07:59:57 | FromDiscord | <$$$> is there a way i can just use the source of the dll and put it in the code |
07:59:58 | FromDiscord | <$$$> instead of |
08:00:02 | FromDiscord | <$$$> including the dll |
08:00:11 | FromDiscord | <Elegantbeef> you can statically link it |
08:00:13 | FromDiscord | <$$$> how |
08:00:18 | FromDiscord | <$$$> & what does that mea |
08:00:20 | FromDiscord | <$$$> mean |
08:00:54 | FromDiscord | <enthus1ast> youu cannot statically link a dll |
08:01:05 | FromDiscord | <Elegantbeef> i meant hte library |
08:01:30 | FromDiscord | <$$$> idek what that means, can u help me do it with this <`https://github.com/GULPF/tiny_sqlite`> |
08:01:30 | FromDiscord | <enthus1ast> you must recompile the source code to a static library, then you can link it |
08:01:50 | FromDiscord | <$$$> (edit) "<`https://github.com/GULPF/tiny_sqlite`>" => "`<https://github.com/GULPF/tiny_sqlite>`" |
08:02:11 | FromDiscord | <$$$> In reply to @enthus1ast "you must recompile the": what do these words mean give me a tutorial bro 😭 |
08:02:32 | FromDiscord | <Elegantbeef> Shipping a dll is the easiest thing to do |
08:03:08 | FromDiscord | <$$$> naww just tell me how to statically link it |
08:03:37 | FromDiscord | <Elegantbeef> It's not just a flag |
08:03:42 | FromDiscord | <Elegantbeef> You need the static library and to link that |
08:04:00 | * | neurocyte0917090 joined #nim |
08:04:13 | FromDiscord | <$$$> In reply to @Elegantbeef "You need the static": how do i link it + what is a static library i come from python idk what these funky words mean |
08:04:38 | FromDiscord | <Elegantbeef> I cant give a good explanation for the first and for the second use your search engine |
08:04:51 | FromDiscord | <enthus1ast> @$$$\: why not put your files into a folder, then zip it? |
08:05:20 | FromDiscord | <enthus1ast> or use an installer creator like nsis |
08:05:52 | FromDiscord | <Rika> In reply to @$$$ "how do i link": You will do so much more work trying to statically link than to just packages the DLLs. |
08:06:48 | FromDiscord | <$$$> In reply to @Rika "You will do so": how do i statically link it tho |
08:07:17 | * | rockcavera quit (Remote host closed the connection) |
08:08:08 | FromDiscord | <Rika> First you need the source code of the libraries, or their static objects |
08:08:17 | FromDiscord | <$$$> https://github.com/GULPF/tiny_sqlite |
08:08:20 | FromDiscord | <$$$> this is the librarty |
08:08:33 | FromDiscord | <Rika> That’s the wrapper |
08:08:41 | FromDiscord | <Rika> You need the SQLite source code |
08:08:48 | FromDiscord | <$$$> ok let me fid |
08:09:47 | FromDiscord | <Rika> https://stackoverflow.com/a/13452121 |
08:10:20 | FromDiscord | <$$$> https://github.com/nim-lang/Nim/blob/devel/lib/impure/db_sqlite.nim this is the library (i think?) |
08:10:31 | FromDiscord | <Rika> https://gist.github.com/payalord/c87cbd1d12ea7712449657d1c6583e12 |
08:10:34 | FromDiscord | <Rika> In reply to @$$$ "https://github.com/nim-lang/Nim/blob/devel/lib/impu": No |
08:10:52 | FromDiscord | <Rika> https://github.com/sqlite/sqlite |
08:11:25 | FromDiscord | <$$$> how can i make that with nim |
08:11:33 | FromDiscord | <Rika> You don’t. You need to use a c compiler here |
08:11:48 | FromDiscord | <Rika> Compile it into a static library (no I do not know how) |
08:12:04 | FromDiscord | <Rika> You’re really making it extremely hard on yourself by static linking; why do you want this anyway? |
08:13:25 | FromDiscord | <$$$> i just simply do not like the dll in the directory 🙏 |
08:13:43 | FromDiscord | <Elegantbeef> Then dont use a library 😛 |
08:13:53 | FromDiscord | <$$$> how do i do sqlite without a library |
08:13:55 | FromDiscord | <$$$> 🤔 |
08:13:59 | FromDiscord | <enthus1ast> @$$$\: this always depends on the library you want to compile, you must google how this particular library is build statically↵(@Rika) |
08:14:13 | FromDiscord | <Rika> In reply to @enthus1ast "<@944438185755295744>\: this always": That’s why I don’t know how 😛 |
08:15:08 | FromDiscord | <enthus1ast> thats the reason we cant tell you what to type in, since we would have to google like you \:) |
08:15:54 | FromDiscord | <Rika> ESPECIALLY when it’s for Windows |
08:16:07 | FromDiscord | <Rika> Windows is a whole different fucker |
08:16:31 | FromDiscord | <enthus1ast> also my feeling is that sqlite is not that often staticlly linked |
08:16:41 | FromDiscord | <enthus1ast> normally applications just ship the dlls |
08:17:27 | FromDiscord | <Rika> The dynamic library system is still kinda broken though tbh |
08:17:38 | FromDiscord | <enthus1ast> on my machine i have 72 times the sqlite3.dll \:) |
08:18:41 | FromDiscord | <Rika> Almost completely defeats the point of dynamic libraries lol |
08:19:38 | FromDiscord | <enthus1ast> "laughing in docker, kubernetes, flatpack, snap, ....." |
08:20:07 | FromDiscord | <Elegantbeef> Ponders if i have even one sql lib |
08:20:35 | FromDiscord | <Rika> I don’t know I just thought of a library name for some SQL library in Nim |
08:20:45 | FromDiscord | <Rika> “Sequin” or something |
08:27:08 | FromDiscord | <$$$> https://media.discordapp.net/attachments/371759389889003532/945597564542132294/unknown.png |
08:27:11 | FromDiscord | <$$$> my brain |
08:27:28 | FromDiscord | <Elegantbeef> `import std/strutils` |
08:27:36 | FromDiscord | <Elegantbeef> Read the compiler error |
08:27:42 | FromDiscord | <$$$> type mismatch |
08:28:04 | FromDiscord | <Elegantbeef> I'm guessing it cannot find a `contains(string, string)` |
08:30:40 | FromDiscord | <$$$> is there a way i can discard the unused things in the tuple? cuz it keeps reminding me its not suee https://media.discordapp.net/attachments/371759389889003532/945598451129929758/unknown.png |
08:30:40 | FromDiscord | <$$$> used |
08:30:49 | FromDiscord | <Elegantbeef> `_` |
08:30:58 | FromDiscord | <$$$> ? |
08:31:05 | FromDiscord | <Elegantbeef> use an underscore |
08:31:17 | FromDiscord | <$$$> https://media.discordapp.net/attachments/371759389889003532/945598607560699904/unknown.png |
08:31:19 | FromDiscord | <Elegantbeef> That's nim's "dont care" identifier |
08:31:30 | FromDiscord | <Rika> A single underscore |
08:31:31 | FromDiscord | <Elegantbeef> `var (_, directoryName _)` |
08:31:33 | FromDiscord | <$$$> oh alr |
08:34:10 | * | ltriant joined #nim |
08:36:25 | FromDiscord | <$$$> bro |
08:38:50 | * | ltriant quit (Ping timeout: 250 seconds) |
08:54:49 | FromDiscord | <$$$> can i get output from execshellcmd |
08:54:50 | FromDiscord | <$$$> 🤔 |
08:55:45 | FromDiscord | <Elegantbeef> `osProc` has `execCmdEx` |
08:56:08 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/osproc.html#execCmdEx%2Cstring%2Cset%5BProcessOption%5D%2CStringTableRef%2Cstring%2Cstring |
08:58:26 | FromDiscord | <$$$> thanks |
08:58:28 | FromDiscord | <$$$> sent a code paste, see https://paste.rs/O6X |
08:58:31 | FromDiscord | <$$$> i was trying to get a string from a url |
08:58:35 | FromDiscord | <$$$> it worked 😁 |
08:58:35 | FromDiscord | <enthus1ast> waut |
08:58:36 | FromDiscord | <enthus1ast> wait |
08:58:42 | FromDiscord | <$$$> what |
08:58:43 | FromDiscord | <enthus1ast> why you do call curl.exe? |
08:58:47 | FromDiscord | <$$$> string from url |
08:58:55 | FromDiscord | <$$$> cant use httpclient |
08:58:59 | FromDiscord | <enthus1ast> why? |
08:59:13 | FromDiscord | <$$$> httpclient breaks with ssl and i cant use -d:ssl |
08:59:17 | FromDiscord | <$$$> cuz -d:ssl breaks |
08:59:27 | FromDiscord | <enthus1ast> please show the error |
08:59:29 | FromDiscord | <Elegantbeef> no dont lie |
08:59:35 | FromDiscord | <$$$> In reply to @Elegantbeef "no dont lie": what |
08:59:41 | FromDiscord | <Elegantbeef> ssl requires libraries and you're being a contrarian |
09:00:06 | * | xiamx quit (Quit: You have been kicked for being idle) |
09:00:07 | FromDiscord | <enthus1ast> you do not want do distribute a dll, but then call curl.exe \:D |
09:00:14 | FromDiscord | <$$$> curl.exe preinstalled |
09:00:15 | FromDiscord | <$$$> on windows |
09:00:23 | FromDiscord | <$$$> https://media.discordapp.net/attachments/371759389889003532/945605930744168498/unknown.png |
09:00:26 | * | xiamx joined #nim |
09:00:32 | * | xiamx left #nim (#nim) |
09:00:35 | FromDiscord | <$$$> installed by default in system32 |
09:00:36 | FromDiscord | <$$$> wym |
09:00:38 | FromDiscord | <enthus1ast> this is because your friend has git for windows installed |
09:00:42 | FromDiscord | <$$$> nope |
09:00:49 | FromDiscord | <Elegantbeef> Nah it seems MS ships it for 10/11 |
09:00:53 | FromDiscord | <$$$> ye |
09:00:55 | FromDiscord | <Elegantbeef> It's still comically dumb |
09:01:04 | FromDiscord | <Elegantbeef> Just use the library and proper code and quit being weird |
09:01:11 | FromDiscord | <$$$> i refuse to ship a dll |
09:01:15 | FromDiscord | <enthus1ast> "If your Windows 10 build is 17063, or later, cUrl is included by default. " crazy |
09:01:22 | FromDiscord | <enthus1ast> nice to know actually |
09:01:47 | FromDiscord | <Rika> Your loss |
09:01:56 | FromDiscord | <$$$> In reply to @Rika "Your loss": how curl works fine |
09:02:13 | FromDiscord | <$$$> https://media.discordapp.net/attachments/371759389889003532/945606391358435358/unknown.png |
09:02:14 | FromDiscord | <$$$> btw |
09:02:26 | FromDiscord | <$$$> In reply to @$$$ "": ^^ httpclient ssl error |
09:02:36 | FromDiscord | <enthus1ast> yes you must also distribute these |
09:02:37 | FromDiscord | <enthus1ast> OR |
09:02:56 | FromDiscord | <$$$> In reply to @enthus1ast "yes you must also": but im using curl so i dont have 2 wym |
09:02:56 | FromDiscord | <enthus1ast> you can try to use treeform/puppy https://github.com/treeform/puppy |
09:03:05 | FromDiscord | <$$$> In reply to @enthus1ast "you can try to": my code worked dawg 😭 |
09:03:49 | FromDiscord | <$$$> sent a code paste, see https://paste.rs/k4q |
09:04:00 | FromDiscord | <enthus1ast> yeah, if it works, then call it a day. ↵It's just, calling out to external applications is always a little fishy |
09:04:35 | FromDiscord | <Rika> Well if he’s happy with it what are we to object no? |
09:05:19 | FromDiscord | <$$$> In reply to @enthus1ast "yeah, if it works,": fishy as in bad or like malware fishy |
09:05:23 | FromDiscord | <Rika> Both |
09:05:26 | FromDiscord | <$$$> fair |
09:05:45 | FromDiscord | <Rika> We can’t help you here if you do get malware issues by the way |
09:06:03 | FromDiscord | <$$$> yea thats fair, this isnt malware tho 🙏 |
09:08:42 | FromDiscord | <Elegantbeef> That's what they all say |
09:09:17 | FromDiscord | <$$$> In reply to @Elegantbeef "That's what they all": 😭 |
09:09:26 | FromDiscord | <Rika> In reply to @$$$ "yea thats fair, this": The antivirus can’t tell lol |
09:09:42 | FromDiscord | <$$$> In reply to @Rika "The antivirus can’t tell": wym |
09:10:00 | FromDiscord | <Rika> If the antivirus flags your program as a virus |
09:10:10 | FromDiscord | <Rika> Maybe since it does a call to curl |
09:11:39 | FromDiscord | <$$$> naww it doesnt flag it |
09:12:08 | FromDiscord | <Rika> Well good for you |
09:12:12 | FromDiscord | <Rika> Anyway yeah |
09:26:31 | * | jmdaemon quit (Ping timeout: 272 seconds) |
09:31:59 | FromDiscord | <$$$> In reply to @Rika "Compile it into a": now to get back to figuring this out 😔 |
10:07:03 | * | m5zs7k quit (Ping timeout: 272 seconds) |
10:08:17 | * | m5zs7k joined #nim |
10:36:29 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:41:04 | * | jjido joined #nim |
10:45:05 | * | jjido quit (Client Quit) |
10:53:17 | * | fowl0 joined #nim |
10:53:30 | * | fowl quit (Ping timeout: 256 seconds) |
10:53:30 | * | fowl0 is now known as fowl |
10:56:26 | FromDiscord | <$$$> naw sum1 gotta help me |
11:00:15 | FromDiscord | <demotomohiro> I think you need to read `Readme` or `INSTALL` file in the C library you want to use to build it as static lib. |
11:01:45 | FromDiscord | <$$$> is there any alternative to using a static lib or a dll |
11:03:23 | FromDiscord | <demotomohiro> Implement it yourself? Or |
11:04:07 | FromDiscord | <$$$> In reply to @demotomohiro "Implement it yourself? Or": shii might be easier than doin this static lib shii 😭 |
11:04:58 | FromDiscord | <demotomohiro> Why do you avoid dll? That is used by many windows projects for long time. |
11:05:13 | FromDiscord | <$$$> In reply to @demotomohiro "Why do you avoid": it look ugly in ma project directory i cant stand it 🙏 |
11:07:43 | FromDiscord | <demotomohiro> How about to create a new directory and put dlls there and add the path to the directory to `PATH` enviroment variable? |
11:08:33 | FromDiscord | <$$$> In reply to @demotomohiro "How about to create": i mean yah but if i redistribute the file they wont have the path variale |
11:08:36 | FromDiscord | <$$$> variable |
11:09:03 | FromDiscord | <$$$> could i make a file that downloads the dll and then runs the main file 🤔 |
11:13:37 | FromDiscord | <demotomohiro> You can run `curl` or `wget` using `executeProcess` or `startProcess` in osproc module to download dlls. |
11:13:52 | FromDiscord | <$$$> In reply to @demotomohiro "You can run `curl`": can i do that in the same file ? |
11:14:29 | FromDiscord | <$$$> like can that code be in the same file as the code that imports the library that needs the dll |
11:15:11 | FromDiscord | <$$$> sent a code paste, see https://play.nim-lang.org/#ix=3Qnh |
11:17:03 | FromDiscord | <demotomohiro> I think you can do it but you would need to load functions in dlls using `dynlib` module. |
11:17:04 | * | PMunch joined #nim |
11:17:47 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/dynlib.html |
11:17:50 | FromDiscord | <fail> In reply to @demotomohiro "I think you can": just loadLib(dll) ? |
11:20:31 | FromDiscord | <demotomohiro> I think you need to call `symAddr` to load each functions after `loadLib(dll)`. |
11:21:43 | FromDiscord | <fail> let procedure = cast[procedureName](lib.symAddr(procedureName)) |
11:21:44 | FromDiscord | <fail> ig |
11:22:33 | FromDiscord | <fail> oh wait it says function |
11:22:37 | FromDiscord | <fail> arent functions called procedures |
11:22:38 | FromDiscord | <fail> 🤔 |
11:24:06 | FromDiscord | <demotomohiro> I think Doc calls function that is implemented by C or other than Nim. |
11:27:33 | FromDiscord | <fail> sent a long message, see http://ix.io/3Qnk |
11:29:44 | FromDiscord | <demotomohiro> Then, you need separate programs. One download dlls another one use dlls. |
11:30:14 | FromDiscord | <fail> In reply to @demotomohiro "Then, you need separate": alr but what would be the difference from downloading the dll in the same file im just kinda confused 🤔 |
11:30:29 | FromDiscord | <demotomohiro> Or wrap sqlite yourself using `dynlib`. |
11:30:51 | FromDiscord | <fail> In reply to @fail "alr but what would": & |
11:30:52 | FromDiscord | <fail> ^ |
11:32:12 | FromDiscord | <demotomohiro> Program that use dll don't need to use `dynlib`, just can use existing wrapper. |
11:33:40 | FromDiscord | <fail> In reply to @demotomohiro "Program that use dll": cant i just download it and then import the wrapper |
11:35:47 | FromDiscord | <demotomohiro> How about to ask the question to wrapper developer? |
11:40:57 | FromDiscord | <demotomohiro> I found an article about dll. https://docs.microsoft.com/en-us/troubleshoot/windows-client/deployment/dynamic-link-library |
11:42:15 | * | Vladar joined #nim |
11:42:43 | FromDiscord | <demotomohiro> So there are Load-time dynamic linking and Run-time dynamic linking. |
11:56:03 | PMunch | @ElegantBeef, any idea why this doesn't work? http://ix.io/3Qnt |
11:56:23 | PMunch | I'm trying to implement yglukhov's proposal here: https://github.com/PMunch/ratel/issues/10#issuecomment-1047515881 |
11:57:11 | PMunch | Which means I need to read in config.nims files, but I don't really want to set any of the switches, so I thought I create a shim library which just stored them in a table or something |
11:57:27 | PMunch | The error I get is this: Script Error: /home/peter/.nimble/pkgs/ratel-0.1.0/private/boards/helpers/avrBoardConf.nim:1:1 undeclared identifier: '--' |
11:58:15 | * | krux02 joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.4) |
12:06:31 | * | supakeen joined #nim |
12:08:49 | NimEventer | New question by congusbongus: How to pass custom arguments to a task?, see https://stackoverflow.com/questions/71221025/how-to-pass-custom-arguments-to-a-task |
12:10:33 | * | rb quit (Ping timeout: 272 seconds) |
13:15:01 | * | jjido joined #nim |
13:17:21 | * | slowButPresent joined #nim |
14:00:42 | FromDiscord | <qb> sent a code paste, see https://paste.rs/WsE |
14:00:50 | FromDiscord | <qb> (edit) "https://play.nim-lang.org/#ix=3Qop" => "https://play.nim-lang.org/#ix=3Qoq" |
14:01:29 | FromDiscord | <qb> (edit) "https://play.nim-lang.org/#ix=3Qoq" => "https://play.nim-lang.org/#ix=3Qor" |
14:01:40 | FromDiscord | <qb> (edit) "https://play.nim-lang.org/#ix=3Qor" => "https://play.nim-lang.org/#ix=3Qos" |
14:01:47 | FromDiscord | <qb> (edit) |
14:03:25 | FromDiscord | <Rika> you do not |
14:03:31 | FromDiscord | <Rika> unless you're fine with static strings |
14:04:34 | FromDiscord | <Rika> sent a code paste, see https://paste.rs/zWb |
14:06:39 | FromDiscord | <qb> mh :/ |
14:06:41 | PMunch | It's too bad we don't have something like `whenCase`.. |
14:08:14 | FromDiscord | <vindaar> @qb\: what do you need this for? |
14:08:30 | FromDiscord | <vindaar> usually knowing that makes it easier to give you a better alternative |
14:11:42 | FromDiscord | <qb> sent a code paste, see https://play.nim-lang.org/#ix=3QoA |
14:12:38 | FromDiscord | <qb> (edit) "https://play.nim-lang.org/#ix=3QoA" => "https://play.nim-lang.org/#ix=3QoC" |
14:12:48 | FromDiscord | <Rika> ts must be a static string |
14:12:58 | FromDiscord | <Rika> aka a string determinable at compile time |
14:13:08 | FromDiscord | <Rika> theres no way around it |
14:13:09 | * | arkurious joined #nim |
14:13:11 | FromDiscord | <qb> Alright |
14:13:14 | FromDiscord | <Rika> in that way i mean |
14:13:19 | FromDiscord | <Rika> there are ways around it like boxing |
14:13:47 | FromDiscord | <Rika> which is wrapping every possible type in another box type using obj variants |
14:14:12 | FromDiscord | <Rika> but otherwise like that you must use static string |
14:46:38 | FromDiscord | <demotomohiro> How about to use generics? Like `proc read[T](a: Process): T`. |
14:50:21 | FromDiscord | <demotomohiro> Or `proc read[T](a: Process; ty: typedesc[T]): T` |
15:11:00 | FromDiscord | <Schelz> Any idea if winim is able to create Windows like CreateWindowEx ? |
15:11:09 | FromDiscord | <Schelz> or is there any module that can done that > |
15:11:13 | FromDiscord | <Schelz> (edit) ">" => "?" |
15:12:29 | FromDiscord | <qb> Isn't there a whole gui library built on top of winim? |
15:12:49 | FromDiscord | <qb> https://github.com/khchen/wNim |
15:13:47 | FromDiscord | <Schelz> That ain't help, I try to wrap d3d9 and I need the stock windows api to create window |
15:14:20 | FromDiscord | <qb> i see |
15:40:45 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
15:42:06 | FromDiscord | <Hamid_Bluri> hey, what kind of error it is 😕↵↵> cannot prove that it's safe to initialize 'content' with the runtime value for the discriminator 'kind'↵> https://media.discordapp.net/attachments/371759389889003532/945707026519044146/unknown.png |
15:44:34 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://paste.rs/dtK |
15:46:20 | FromDiscord | <Hamid_Bluri> ah I think `kind` is not exported 😄 |
15:49:45 | * | ltriant joined #nim |
15:50:12 | ehmry | if i'm compiling foo.nim that imports and external bar.nim, can I get the compiler to load both foo.nim.cfg and bar.nim.cfg, or do I have to use pragmas in bar.nim to do thing like set cincludes? |
15:54:46 | * | ltriant quit (Ping timeout: 250 seconds) |
16:04:09 | * | Gustavo6046 joined #nim |
16:05:30 | * | Gustavo6046 quit (Max SendQ exceeded) |
16:06:00 | * | Gustavo6046 joined #nim |
16:25:21 | FromDiscord | <Waldecir Santos> In reply to @hamidb80 "hey, what kind of": Love the theme, what is the name ? 😄 |
16:42:16 | FromDiscord | <Deceptive> how do i parse info about user's sysem in nim? |
16:50:38 | * | rwb joined #nim |
16:53:02 | NimEventer | New thread by Reversem3: New programming for beginners/intermediate , see https://forum.nim-lang.org/t/8939 |
16:56:56 | FromDiscord | <Deceptive> sent a code paste, see https://play.nim-lang.org/#ix=3Qq9 |
16:57:09 | * | jjido joined #nim |
17:03:13 | FromDiscord | <huantian> Add () to your function call prob |
17:05:56 | * | rockcavera joined #nim |
17:05:56 | * | rockcavera quit (Changing host) |
17:05:56 | * | rockcavera joined #nim |
17:23:46 | FromDiscord | <chancy> should `--cpu:arm64` be inherently passing `-arch arm64` to the C compiler? |
17:29:03 | FromDiscord | <demotomohiro> You can see how Nim call gcc with `--listcmd` option |
17:30:07 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
17:38:27 | * | jjido joined #nim |
17:47:03 | * | pro joined #nim |
18:14:48 | * | shadow0133 joined #nim |
18:21:08 | shadow0133 | I'm trying to compile (custom fork of) nitter, which uses nimble, to raspberry pi 1 b+. If I try crosscompiling locally, resulting executable crashes with illegal hardware instruction. I want to compile project to c, and compile c files on raspberry, but I can't get nimble to output them. |
18:28:55 | * | def- quit (Quit: -) |
18:32:32 | nexeq | guys what is the best http library for nim? |
18:47:40 | FromDiscord | <ynfle> In reply to @shadow0133 "I'm trying to compile": What is the command that you are using? |
18:50:21 | * | def- joined #nim |
18:53:15 | * | def- quit (Client Quit) |
18:54:14 | FromDiscord | <haolian9 (高浩亮)> how to solve `dumpNumberOfInstances` undeclared identifier? i compile the source by `nim c -d:nimTypeNames`, nim was installed via `choosenim stable` and it's 1.6.4 |
18:56:01 | FromDiscord | <ynfle> In reply to @haolian9 (高浩亮) "how to solve `dumpNumberOfInstances`": Which gc are you using? |
18:56:22 | FromDiscord | <haolian9 (高浩亮)> i just wanna say it↵(@ynfle) |
18:56:33 | FromDiscord | <haolian9 (高浩亮)> actually i use --mm\:orc |
18:57:02 | FromDiscord | <ynfle> In reply to @haolian9 (高浩亮) "actually i use --mm\:orc": Try with out that, I'm not sure if it's supposed to work with the other GCs other than refc |
18:57:26 | FromDiscord | <haolian9 (高浩亮)> i changed it to refc, it worked↵(@ynfle) |
18:57:56 | FromDiscord | <ynfle> In reply to @haolian9 (高浩亮) "i changed it to": It talks about it at the bottom of the refc doc https://github.com/nim-lang/Nim/blob/a0073d2d4c18f030eccef98a130f7f1f2ad9d67a/doc/refc.rst |
19:00:09 | FromDiscord | <haolian9 (高浩亮)> oh, thank you! the link's title `Tweaking the refc GC`, i was blind↵(@ynfle) |
19:01:21 | FromDiscord | <Phil> ... are y'all keeping your codebases tidy through sheer force of will and dilligence, are you not keeping it tidy or are there formatters out there that I'm just not aware of? |
19:06:51 | shadow0133 | @ynfle nimble build -d:release --compileOnly --genScript |
19:09:15 | * | pro quit (Quit: pro) |
19:12:24 | FromDiscord | <qb> Someone should contribute to https://github.com/curlconverter/curlconverter |
19:12:38 | FromDiscord | <qb> rust is there but not nim. What a shame |
19:14:25 | FromDiscord | <Phil> educate me, isn't the main purpose of curl to be an HTTP client and we have an http client lib? Or is that too limited (I haven't used it so no idea on my end) |
19:14:32 | FromDiscord | <Phil> (edit) "educate me, isn't the main purpose of curl to be an HTTP client and we have an http client lib? Or is that too limited (I haven't used it so no idea on my end) ... " added "?" |
19:16:35 | FromDiscord | <qb> That converter converts your curl command to code. So you can use the requests on the http client lib on nim without typing everything manually |
19:17:25 | FromDiscord | <Phil> Ah, so more a convenience thing to not have to use the client lib? |
19:17:30 | * | vicfred joined #nim |
19:17:46 | FromDiscord | <Phil> Or simplify using the client lib I guess |
19:17:53 | FromDiscord | <qb> https://curlconverter.com/ |
19:17:58 | FromDiscord | <Phil> (edit) "Or simplify using the client lib I guess ... " added "would be more accurate" |
19:18:30 | FromDiscord | <Phil> Ohhh as in you literally get that command written in nim code, in which case it'd be implemented to use the client lib |
19:18:59 | FromDiscord | <Phil> Thanks for the patience with me there ^^ |
19:22:04 | FromDiscord | <ynfle> In reply to @shadow0133 "<@757977788056600719> nimble build -d:release": That won't cross compile. What os/arch are you on? Check out https://nim-lang.org/docs/nimc.html |
19:24:41 | shadow0133 | @ynfle x86_64, debian. I'm trying to compile to C (not executable), then copy C files to target (Rpi, arm6l, raspian which is debian derivative) and compile C files there |
19:29:37 | FromDiscord | <ynfle> In reply to @shadow0133 "<@757977788056600719> x86_64, debian. I'm": The c that is generated is different depending on the target os, arch. |
19:30:04 | * | rockcavera quit (Ping timeout: 272 seconds) |
19:32:24 | shadow0133 | @ynfle I'm not getting any C files either way |
19:33:12 | FromDiscord | <ynfle> In reply to @shadow0133 "<@757977788056600719> I'm not getting": You are, they're probably in the `nimcache` folder (probably `.cache/nim`) |
19:33:38 | FromDiscord | <ynfle> Try `--nimcache:nimcache` |
19:33:55 | FromDiscord | <ynfle> Which will output them in the `nimcache` folder in the current directory |
19:34:11 | FromDiscord | <ynfle> @shadow0133 ☝️ |
19:40:20 | FromDiscord | <b4mbus> can I somehow |
19:40:36 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3QqU |
19:40:39 | FromDiscord | <b4mbus> fold by size? |
19:41:31 | FromDiscord | <b4mbus> (edit) "https://play.nim-lang.org/#ix=3QqU" => "https://play.nim-lang.org/#ix=3QqV" |
19:43:56 | FromDiscord | <b4mbus> I have no idea how to do it |
19:43:58 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3QqW |
19:44:31 | FromDiscord | <ynfle> Why do you mean fold by size? |
19:44:32 | FromDiscord | <b4mbus> sent a code paste, see https://paste.rs/l5S |
19:45:31 | FromDiscord | <ynfle> In reply to @b4mbus "fold by size?": Fold is to combine an array/seq into a single value, do you want to add all of the lengths of the strings together? |
19:45:45 | FromDiscord | <b4mbus> In reply to @ynfle "Fold is to combine": > This version of foldl gets a starting parameter. This makes it possible to accumulate the sequence into a different type than the sequence elements. |
19:45:47 | FromDiscord | <b4mbus> well apparently not only |
19:45:55 | FromDiscord | <b4mbus> In reply to @ynfle "Fold is to combine": Yers |
19:45:57 | FromDiscord | <b4mbus> (edit) "Yers" => "Yes" |
19:46:38 | FromDiscord | <b4mbus> and fold does not necessarily need to combine a whole collection into a single value |
19:47:18 | FromDiscord | <b4mbus> Nims syntax gets kinda weird sometimes hmm |
19:51:19 | * | ltriant joined #nim |
19:51:39 | shadow0133 | @ynfle I've got the c code, but compiler complains about missing nimbase.h, am I supposed to get it from https://github.com/nim-lang/csources_v1 ? |
19:52:38 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3Qr2 |
19:52:51 | * | def- joined #nim |
19:52:54 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3Qr3 |
19:53:34 | FromDiscord | <ynfle> In reply to @shadow0133 "<@757977788056600719> I've got the": It should be installed on your system, but you can get it from the repo https://github.com/nim-lang/Nim/blob/devel/lib/nimbase.h |
19:56:22 | * | ltriant quit (Ping timeout: 256 seconds) |
19:58:20 | FromDiscord | <ynfle> In reply to @shadow0133 "<@757977788056600719> I've got the": csources is for boostrapping the compiler, you don't need a compiler as you have already done the nim compilation stage |
19:59:05 | FromDiscord | <ynfle> In reply to @ynfle "It should be installed": Someone wrote a blog post on using the c processors to not need nimbase.h |
20:00:58 | FromDiscord | <Hamid_Bluri> In reply to @Waldecir Santos "Love the theme, what": https://media.discordapp.net/attachments/371759389889003532/945772171458936882/unknown.png |
20:01:13 | FromDiscord | <Hamid_Bluri> https://marketplace.visualstudio.com/items?itemName=ceciljacob.code-plus-theme&ssr=false#review-details |
20:01:36 | FromDiscord | <Waldecir Santos> Thank you |
20:01:56 | FromDiscord | <Hamid_Bluri> you're welcome |
20:04:34 | FromDiscord | <ynfle> In reply to @ynfle "Someone wrote a blog": @shadow0133 https://zen.su/posts/amalgamating-nim-programs/ |
20:17:41 | FromDiscord | <lpha3ch0> sent a long message, see http://ix.io/3Qrc |
20:19:32 | * | kenran joined #nim |
20:19:36 | FromDiscord | <ynfle> In reply to @lpha3ch0 "I need to add": You can try threadpool, but async would work too |
20:23:12 | FromDiscord | <lpha3ch0> In reply to @ynfle "You can try threadpool,": Thanks, I'm looking into threadpool now. |
20:27:24 | FromDiscord | <mratsim> In reply to @lpha3ch0 "I need to add": you have an example wikipedia scrapper in Nim in action. For that use case, async is sufficient and no need to go multithreaded. |
20:31:16 | FromDiscord | <fail> d |
20:39:15 | PMunch | @lpha3ch0, async is definitely the way to go here. Your app will spend almost all of it's time waiting for the server, so throwing more CPU power (i.e. threads) on it won't speed anything up. With async on the other hand you can send multiple requests of and have a single CPU thread sit there and listen for all of the replies |
20:39:41 | FromDiscord | <ynfle> Listen to the pros!!! ☝️ |
20:47:30 | FromDiscord | <lpha3ch0> In reply to @PMunch "<@275045322705862656>, async is definitely": Thanks! |
21:01:28 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
21:03:12 | * | rockcavera joined #nim |
21:03:12 | * | rockcavera quit (Changing host) |
21:03:12 | * | rockcavera joined #nim |
21:03:51 | * | jjido joined #nim |
21:24:25 | * | PMunch quit (Quit: leaving) |
21:36:50 | shadow0133 | @ynfle It just finished compiling and seem to work for now. I will have to think about proper crosscompiling later. Thanks for help. |
21:37:58 | * | oprypin quit (Ping timeout: 250 seconds) |
21:39:12 | shadow0133 | I don't have nim installed on target (I tried), but it seems I only needed to download nimbase.h to make it compile |
21:49:18 | FromDiscord | <ynfle> In reply to @shadow0133 "I don't have nim": Yes. You should set the `--cpu:` value when compiling |
21:49:44 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
21:55:36 | shadow0133 | @ynfle Hmm? I did that, but I'm talking about something else. |
22:00:16 | * | ltriant joined #nim |
22:00:44 | FromDiscord | <ynfle> I know. I was just saying because it makes a difference. Nim's int is based on cpu arch. 64, 32 etc. |
22:02:51 | * | oprypin joined #nim |
22:04:00 | * | def- quit (Quit: -) |
22:08:09 | * | def- joined #nim |
22:10:17 | * | kenran quit (Quit: WeeChat info:version) |
22:11:05 | * | def- quit (Client Quit) |
22:11:42 | * | def- joined #nim |
22:12:19 | * | shadow0133 quit (Quit: Client closed) |
22:14:39 | * | def- quit (Client Quit) |
22:15:31 | * | def- joined #nim |
22:18:38 | * | def- quit (Client Quit) |
22:20:17 | * | def- joined #nim |
22:38:40 | * | jjido joined #nim |
23:05:54 | FromDiscord | <jmgomez> https://nim-lang.org/docs/nimc.html#crossminuscompilation-for-ios↵"Use nim c -c --os:ios --noMain:on to generate C files and include them in your XCode project. Then you can use XCode to compile, link, package and sign everything."↵↵Does that mean that nim cant produce a static library for iOS directly? |
23:19:26 | * | Vladar quit (Remote host closed the connection) |
23:40:14 | NimEventer | New thread by Hobbyman: Calling nim-server-code from javascript, see https://forum.nim-lang.org/t/8940 |
23:43:57 | FromDiscord | <jmgomez> This is what Im using to compile it ↵nim c --os:ios -c --noMain:on --app:staticlib -d:release test.nim https://media.discordapp.net/attachments/371759389889003532/945828290558586920/message.txt |
23:44:15 | FromDiscord | <jmgomez> (edit) "test.nim" => "test.nim↵↵And this is the ouput" |
23:45:09 | FromDiscord | <Elegantbeef> Yea i dont think Nim can create a static lib directly due to apples grand wisdom |
23:45:23 | FromDiscord | <Elegantbeef> Developing anything for apple hardware is just harder 😛 |
23:47:02 | FromDiscord | <jmgomez> Right.. So I have to create it manually? UE and Unity create iOS projects behind the scenes, I guess that's too much to expect from a compiler |
23:47:36 | FromDiscord | <Elegantbeef> I imagine so yea, you could always be the person that automates the process! |
23:48:44 | FromDiscord | <jmgomez> lol really new to nim. Im just evaluating nim for building a sdk |
23:54:49 | * | krux02 quit (Remote host closed the connection) |
23:57:47 | FromDiscord | <Elegantbeef> Well it's fully possible to do, I have 0 idea the apple build process aside from "Locked down", so cant say much |