00:00:09 | FromDiscord | <Elegantbeef> Probably a bug |
00:01:11 | anddam | Yardanico: I have to drop it, I tried to patch the mismatches in imgui.cpp as well since the declaration and definitions where different |
00:01:14 | anddam | but I get a bunch of |
00:01:27 | FromDiscord | <Yardanico> i didn't have to patch imgui.cpp at all |
00:01:28 | FromDiscord | <Yardanico> only cimgui.h |
00:01:42 | anddam | https://termbin.com/d1ih |
00:02:07 | FromDiscord | <Yardanico> you seem to be compiling with the cpp backend now? |
00:02:17 | FromDiscord | <Yardanico> so the way I did it |
00:02:19 | anddam | I am just doing make in cimgui |
00:02:32 | FromDiscord | <Yardanico> 1) build cimgui with default header↵2) modify cimgui.h header↵3) build the example with imgui |
00:03:38 | anddam | wait the build is done with default header? |
00:03:49 | FromDiscord | <Yardanico> yes, sorry, forgot to tell about that |
00:04:03 | FromDiscord | <Yardanico> i figured it all out on-the-go so forgot I used the default header for cimgui.h |
00:04:25 | anddam | I am unsure how editing the header file then affects the nimgl/imgui example building |
00:04:44 | FromDiscord | <Yardanico> it uses the header directly |
00:04:49 | FromDiscord | <Yardanico> for some type definitions and stuff |
00:05:01 | anddam | shouldn't that header be in ~/.nimble/pkg/imgui/someplace/here ? |
00:05:09 | FromDiscord | <Yardanico> well yes if you have that installed here |
00:06:11 | anddam | I have the static lib and the patched header |
00:08:05 | anddam | I see both imgui and nimgl are installed in ~/.nimble |
00:08:12 | anddam | both have a copy of cimgui.h |
00:10:31 | anddam | ok, now nim c --dynlibOverride:cimgui --passL:-lcimgui test.nim errors with /bin/ld: cannot find -lcimgui |
00:10:36 | anddam | maybe a -L. ? |
00:11:00 | anddam | I honestly thought a static archive would just be passed as object to the compiler, not via the linker |
00:11:36 | anddam | working |
00:11:48 | anddam | with -d:release 1.8 MB |
00:12:09 | anddam | can I cross compile for windows target using linux host with nim? |
00:13:19 | anddam | Yardanico: thanks so much again |
00:13:22 | anddam | I have to call it a night |
00:13:29 | FromDiscord | <Yardanico> good night :) |
00:13:34 | anddam | too bad it's not a weekend |
00:13:38 | FromDiscord | <Yardanico> :( |
00:13:41 | FromDiscord | <Yardanico> :() |
00:14:11 | anddam | btw is that Xlib thing viable? can I build a very small executable with nim linking per each platform a native graphical API? |
00:19:18 | nrds | <Prestige99> Xlib wouldn't work for Windows if that's what you're asking? Well maybe with WSL, idk about that |
00:29:32 | * | pch quit (Ping timeout: 240 seconds) |
01:00:20 | * | Zevv quit (Ping timeout: 260 seconds) |
01:06:47 | * | Zevv joined #nim |
01:06:53 | * | lumo_e joined #nim |
01:13:05 | NimEventer | New Nimble package! cliche - AutoMagic CLI argument parsing is Cliche, see https://github.com/juancarlospaco/cliche |
01:13:07 | nrds | <R2D299> itHub: 7"AutoMagic CLI argument parsing is cliche" |
01:40:39 | FromDiscord | <huantian> is there a way to get the vscode plugin do suggestions and such with -d:ssl? |
01:41:19 | FromDiscord | <Elegantbeef> make a `config.nims` and add `--d:ssl` or `switch("define", "ssl")` then it should work fine |
01:44:01 | FromDiscord | <huantian> cool thx |
01:47:16 | FromDiscord | <huantian> I should put this in my root directory right |
01:47:25 | FromDiscord | <huantian> (edit) "I should put this in my ... root" added "project" |
01:47:34 | FromDiscord | <Elegantbeef> Yep |
01:49:53 | nrds | <Prestige99> Can't we initialize a const array? I can't seem to find the right syntax to init an array with default values (e.g. const foo: array[0..3, int]) |
01:50:26 | FromDiscord | <Elegantbeef> `const foo = [0, 3, 4, 5]` |
01:51:08 | nrds | <Prestige99> is there an array fill to make it all the default int value? |
01:51:16 | FromDiscord | <Yardanico> In reply to @nrds "<Prestige> Can't we initialize": you can probably use `static` block with fill from algorithm |
01:51:23 | FromDiscord | <Yardanico> but that'll look ugly |
01:51:31 | nrds | <Prestige99> hm |
01:51:46 | FromDiscord | <Elegantbeef> Yea a block is the way |
01:51:54 | nrds | <Prestige99> Cool, thanks |
01:52:10 | * | noeontheend joined #nim |
01:52:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3GJd |
02:11:32 | * | lumo_e quit (Remote host closed the connection) |
02:13:08 | nrds | <Prestige99> Anyone else doing AoC btw? I just finished |
02:13:28 | FromDiscord | <Elegantbeef> I'm |
02:13:41 | FromDiscord | <Yardanico> In reply to @nrds "<Prestige> Anyone else doing": check the private nim leaderboard |
02:13:47 | FromDiscord | <Yardanico> you can join it, it's not yet full |
02:13:48 | FromDiscord | <Yardanico> iirc |
02:18:55 | nrds | <Prestige99> Thanks, just joined |
02:19:35 | FromDiscord | <Yardanico> also we have #nim-aoc on irc |
02:20:13 | * | nrds quit (Remote host closed the connection) |
02:20:44 | * | nrds joined #nim |
02:48:23 | FromDiscord | <gogolxdong (liuxiaodong)> Does async leaks with --gc\:arc? |
03:00:04 | FromDiscord | <Rika> Yes |
03:18:34 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3GJT |
03:20:46 | FromDiscord | <Yardanico> try with seq[proc(value: string): string {.closure.}] |
03:21:15 | FromDiscord | <Yardanico> nim assumed that you want to keep normal nim procs (nimcall) in your sequence - closure procedures are different from that because they can capture their environment |
03:21:38 | FromDiscord | <Yardanico> usually nim infers anonymous procedures to be closures unless you explicitly say that they're normal nim procs |
03:29:04 | FromDiscord | <ajusa> In reply to @Yardanico "try with seq[proc(value: string):": That worked, thanks! Explanation makes sense as well, in my case I do want closures |
03:37:23 | FromDiscord | <messiahbooks> Secret Knowledge Wisdom That Will Help You Become God Again, Active Super Power, Live Forever https://eternalsacredbooks.wordpress.com/2021/12/01/secret-knowledge-wisdom-that-will-help-you-become-god-again-active-super-power-live-forever/ |
03:38:53 | FromDiscord | <Alea> might be missing some basic math here, but how do I calculate inverse tangent? |
03:39:10 | FromDiscord | <Alea> math module doesn't seem to have a func |
03:40:05 | FromDiscord | <Yardanico> aaa what's with those matrix spammers |
03:40:13 | FromDiscord | <Yardanico> discord spammers are at least simple, they just spam cryptospam |
04:03:47 | * | rockcavera quit (Remote host closed the connection) |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:30 | * | supakeen joined #nim |
04:33:03 | * | arkurious quit (Quit: Leaving) |
04:35:30 | arkanoid | I need more articles like https://arhamjain.com/2021/11/22/nim-webdev.html |
04:39:51 | FromDiscord | <ajusa> https://arhamjain.com/2021/11/22/nim-simple-chat.html |
04:41:34 | FromDiscord | <ajusa> But yes, Nim has a bit of a knowledge/domain issue where a few people know all the stuff (frameworks, language features, std library) but it isn't as visible. That's where articles and external writeups come in. Glad you liked it though, I'll be doing my best to write a bit more in the near future! |
04:41:52 | FromDiscord | <ajusa> (edit) removed "bit" |
04:42:51 | arkanoid | You described very well the problem. Reading articles that compares libs and their history/direction is very refreshing |
04:44:26 | arkanoid | Also loving the "explain the code" rather than tutorial approach. |
05:25:59 | * | noeontheend quit (Ping timeout: 252 seconds) |
06:49:27 | FromDiscord | <apahl> In reply to @Elegantbeef "<@732968123745042443>\: did i say": At least that was my understanding of the ongoing discussion, but we cleared it all up, all good. Thanks a lot for being so friendly, active and helpful here! |
07:12:21 | * | neurocyte0132889 joined #nim |
07:12:21 | * | neurocyte0132889 quit (Changing host) |
07:12:22 | * | neurocyte0132889 joined #nim |
08:01:47 | * | pch joined #nim |
08:02:12 | * | PMunch joined #nim |
08:21:15 | * | neurocyte0132889 quit (Ping timeout: 252 seconds) |
08:41:34 | FromDiscord | <Michal58> When does a call with omitted argument that is not last work? |
08:42:57 | FromDiscord | <Rika> That is not last work? |
08:43:11 | FromDiscord | <Rika> I don’t know of any case where that would work |
08:43:37 | FromDiscord | <Rika> Arguments are filled in from left to right afaik no matter type or if it has a default |
08:45:57 | FromDiscord | <Michal58> sent a code paste, see https://play.nim-lang.org/#ix=3GKU |
08:48:09 | * | neurocyte0132889 joined #nim |
08:48:09 | * | neurocyte0132889 quit (Changing host) |
08:48:09 | * | neurocyte0132889 joined #nim |
09:02:38 | FromDiscord | <apahl> In reply to @PMunch "Have you seen my": Hi @PMunch , could you post the link to the article, again? Thanks a lot. |
09:04:08 | PMunch | Sorry, when you reply to stuff I only see the first part of the message on IRC. Which article is it that you want me to link? |
09:11:59 | PMunch | @apahl ^ |
09:13:53 | FromDiscord | <apahl> You mentioned an article from you about async. |
09:17:46 | PMunch | Oh right, this one: https://peterme.net/asynchronous-programming-in-nim.html |
09:18:18 | FromDiscord | <apahl> Thanks a lot. |
09:53:27 | FromDiscord | <Michal58> sent a code paste, see https://play.nim-lang.org/#ix=3GL9 |
09:53:49 | FromDiscord | <Michal58> (edit) "https://play.nim-lang.org/#ix=3GL9" => "https://play.nim-lang.org/#ix=3GLa" |
09:56:59 | FromDiscord | <Rika> Ah that has different semantics, I forgot about that |
09:57:12 | FromDiscord | <Rika> Anything passed with : or do is right to left |
09:57:41 | FromDiscord | <Rika> Well I guess “semi” right to left |
10:29:04 | FromDiscord | <Michal58> How exactly is it parsed then? |
10:32:01 | FromDiscord | <Elegantbeef> It's left to right and moves optional params after non optional |
10:57:33 | FromDiscord | <Michal58> Why is it doing that? Is to enable templates that take the last argument an untyped block to take optional arguments before the block? |
11:03:22 | FromDiscord | <Rika> Yes |
11:04:46 | FromDiscord | <Michal58> Cool. I'm glad I accidentally discovered that. 🙂 |
11:25:07 | PMunch | I'm going to chalk that up as another piece of cursed syntax :P |
11:52:17 | FromDiscord | <gogolxdong (liuxiaodong)> what is the default path of metadata file of nimble packages? |
11:57:51 | * | pch quit (Remote host closed the connection) |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:32 | * | supakeen joined #nim |
12:21:49 | * | pch joined #nim |
12:22:16 | * | pch quit (Remote host closed the connection) |
12:23:43 | * | pch joined #nim |
12:24:51 | NimEventer | New thread by Freeflow: Order of execution: where to find understanding, see https://forum.nim-lang.org/t/8672 |
12:24:58 | PMunch | @apahl, did the article help at all? |
12:31:03 | * | pch quit (Remote host closed the connection) |
12:32:33 | * | pch joined #nim |
12:59:58 | * | pch quit (Remote host closed the connection) |
13:01:00 | * | pch joined #nim |
13:05:09 | * | src joined #nim |
13:12:06 | * | pch quit (Remote host closed the connection) |
13:13:09 | * | pch joined #nim |
13:16:11 | * | xet7 quit (Ping timeout: 245 seconds) |
13:31:24 | FromDiscord | <tbrekalo> Is there something as GNU readline or libedit for nim? |
13:37:58 | FromDiscord | <enthus1ast> @treeform\: what could it be that suddenly netty does not let clients connect?↵Or any tip i could debug this? |
13:38:53 | FromDiscord | <enthus1ast> (i know broad question) |
13:40:26 | FromDiscord | <enthus1ast> could this be when there are messages in transit? |
13:40:40 | FromDiscord | <enthus1ast> but the clients are not there any more? |
13:41:04 | FromDiscord | <enthus1ast> to me it does seem to happen randomly |
13:41:17 | FromDiscord | <enthus1ast> restarting the server (not the client) helps |
13:50:07 | * | noeontheend joined #nim |
14:16:21 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
14:17:03 | * | dtomato joined #nim |
14:22:05 | * | noeontheend quit (Ping timeout: 256 seconds) |
14:28:03 | * | arkurious joined #nim |
14:34:13 | FromDiscord | <apahl> @PMunch Sorry, will read it later, am at work rn. |
14:35:14 | PMunch | Oh no worries, just wanted to help you out if you had come across anything that confused you |
14:38:41 | FromDiscord | <apahl> Thanks a lot, much appreciated. |
14:45:04 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
14:47:40 | * | rockcavera joined #nim |
14:47:40 | * | rockcavera quit (Changing host) |
14:47:40 | * | rockcavera joined #nim |
15:10:09 | * | xet7 joined #nim |
15:49:40 | arkanoid | I'm developing a python project due to scientific stuff, but I'm considering using nim to replace slow functions. So far, the slowest guy in the room is a function that does reading and parsing and is similar to: https://play.nim-lang.org/#ix=3FZM , do you think nim would be faster than python here? |
15:57:04 | * | pch quit (Remote host closed the connection) |
15:57:40 | * | pch joined #nim |
16:00:56 | perro | interesting quesiton, that's definitelty a place that python optimizes for |
16:01:24 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=3GN2 |
16:01:24 | FromDiscord | <Rika> ? |
16:01:33 | FromDiscord | <Rika> now you can test it 😛 |
16:02:16 | FromDiscord | <Rika> (of course, i use stdlib sequtils which most likely is slower, maybe would be better to use zerofunc or similar) |
16:02:47 | FromDiscord | <Rika> also lines on python `for line in [ll for ll in data.splitlines() if ll and ll.strip()]:` would prolly work better as generators `for line in (ll for ll in data.splitlines() if ll and ll.strip()):` |
16:03:54 | FromDiscord | <Rika> i apologise but i will have to go now |
16:04:08 | FromDiscord | <Rika> hopefully someone else can help if you have further issues or questions |
16:05:00 | perro | I'm interested if you ever get results |
16:06:34 | FromDiscord | <Rika> https://github.com/zero-functional/zero-functional/ (if you need a link to what zerofunc is) |
16:06:48 | FromDiscord | <Rika> i shall go now |
16:25:55 | * | xet7 quit (Remote host closed the connection) |
16:29:11 | FromDiscord | <ajusa> What's the best "wrapperless" Nim interop program? Futhark, c2nim, nimline, nimterop, cinterop...↵Which one would I probably be able to use to make bindings for C libraries that use macros? Which one have folks found easy to use? |
16:31:44 | arkanoid | Rika: thanks! I've been cought in a phone call in the meanwhile. I'll test this out. Also thanks for the list -> generator hint |
16:36:04 | arkanoid | ajusa, I've experience with just c2nim and nimterop. They both works but at the end I had to deal with edge cases (nested string rewriting macros on C side) and c2nim ended up being more flexible to fix the 90%. Still had to complete the last 10% manually |
16:37:32 | arkanoid | Rika: I went 28s to 26.5s thanks to that generator. Thanks! |
16:38:59 | * | Pyautogui joined #nim |
16:45:54 | FromDiscord | <haxscramper> Probably furthark |
16:46:08 | FromDiscord | <haxscramper> At least this one is maintained and has proper parser |
16:47:48 | FromDiscord | <ajusa> In reply to @haxscramper "Probably furthark": Got it, it seems like less wrapping is required with it. I'll try it out I guess |
16:48:30 | arkanoid | haxscramper how is you C++ impressive project going? |
16:50:08 | FromDiscord | <haxscramper> Spent a week figuring out how to do proper reproducible CI for it and use Conan with nim |
16:50:48 | FromDiscord | <haxscramper> There is a progress, but it is slow, if you want to see an example wrapper generated there is a hlibgit2 now |
16:50:53 | arkanoid | you mean conan.io? never used it, just head about it |
16:51:14 | FromDiscord | <haxscramper> And libssh2 wrapper, we needed them to migrate from nimterop in some nimskull tooling |
16:51:26 | FromDiscord | <haxscramper> Yes, Conan the c++ package manager |
16:52:06 | FromDiscord | <haxscramper> My experience with it was surprisingly good, especially considering it is a c++ thing |
16:52:16 | FromDiscord | <treeform> In reply to @enthus1ast "<@107140179025735680>\: what could it": Could your server be getting stuck some place else? Do clients that connect before work? |
16:54:31 | FromDiscord | <haxscramper> But there is a reason I usually tend to recommend PMunch's futhark now, mainly because there is a lot of stuff I would need to fix and polish before it is ready in a way I want it |
16:54:40 | FromDiscord | <haxscramper> The issue tracker is full of unanswered questions |
16:56:47 | PMunch | The Futhark issue tracker? |
16:57:12 | PMunch | @ajusa, I obviously also recommends Futhark. Although I might be slightly biased |
16:57:15 | arkanoid | it is a project that requires a lot of knowledge and attention to details. Not really yet sure how can a single person tackle it. Lot's of gratitute from the guy who wants to escape the python bubble |
16:58:14 | FromDiscord | <haxscramper> No, mine issue tracker↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
16:58:57 | PMunch | Ah right, cause there isn't a single issue in the Futhark tracker |
16:59:05 | PMunch | Who's up for some AoC? https://www.twitch.tv/pmunche |
16:59:31 | FromDiscord | <haxscramper> Probably the only paradigm shift that I had in recent memory is understanding how I can properly infer API provided by a specific header files |
16:59:59 | arkanoid | "nimble install --passl:-L<path to libclang.lib> futhark" it's the first time I see --passL in nimble install |
17:00:02 | FromDiscord | <haxscramper> Because you can't include string for example, you will also get iterators API |
17:00:03 | FromDiscord | <haxscramper> Because that's how headers work |
17:00:35 | FromDiscord | <haxscramper> Ah, and also I've come to hate dynlib |
17:00:45 | FromDiscord | <haxscramper> So annoying |
17:00:59 | FromDiscord | <haxscramper> And not integrated with anything at that |
17:01:42 | FromDiscord | <haxscramper> Like the conan integration - how do you use conan libs from nim? |
17:01:54 | FromDiscord | <haxscramper> `--passL:"@$(pwd)/conanbuildinfo.gcc" --passC:"@$(pwd)/conanbuildinfo.gcc"` |
17:02:07 | FromDiscord | <haxscramper> don't forget to run `conan install . --build=missing` and here you go |
17:02:39 | FromDiscord | <haxscramper> how do you use conan libs if you wrapped via dynlib? |
17:03:05 | FromDiscord | <haxscramper> the library has to support user-override for `dynlib`, or you have to use this weird `--dynlibOverride` or `--dynlibOverrideAll` and pass flags |
17:05:35 | FromDiscord | <haxscramper> Talking about hcparse still feels really depressing |
17:06:14 | arkanoid | the complex disorder of the C++ world is depressing, not hcparse |
17:13:20 | * | Pyautogui quit (Quit: Connection closed) |
17:16:40 | * | Vladar joined #nim |
17:38:38 | * | kayabaNerve quit (Remote host closed the connection) |
17:39:01 | * | kayabaNerve joined #nim |
17:42:00 | * | kayabaNerve_ joined #nim |
17:42:21 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3GNC |
17:42:57 | FromDiscord | <TryAngle> (edit) "https://play.nim-lang.org/#ix=3GNC" => "https://play.nim-lang.org/#ix=3GND" |
17:43:21 | * | kayabaNerve quit (Ping timeout: 252 seconds) |
17:44:28 | * | pch quit (Remote host closed the connection) |
17:46:14 | * | pch joined #nim |
17:49:54 | * | noeontheend joined #nim |
18:02:54 | Amun-Ra | how can I pass tagged union's kind in "new result"? |
18:03:01 | * | neurocyte0132889 quit (Ping timeout: 256 seconds) |
18:03:49 | FromDiscord | <leorize> you can't |
18:04:34 | FromDiscord | <leorize> construct it with the `Type(field: value)` syntax instead |
18:05:29 | * | neurocyte0132889 joined #nim |
18:05:29 | * | neurocyte0132889 quit (Changing host) |
18:05:29 | * | neurocyte0132889 joined #nim |
18:07:31 | Amun-Ra | ah, right, thanks |
18:10:38 | * | tiorock joined #nim |
18:10:38 | * | tiorock quit (Changing host) |
18:10:38 | * | tiorock joined #nim |
18:10:38 | * | rockcavera quit (Killed (molybdenum.libera.chat (Nickname regained by services))) |
18:10:38 | * | tiorock is now known as rockcavera |
18:11:13 | * | neurocyte0132889 quit (Ping timeout: 252 seconds) |
18:11:26 | * | neurocyte0132889 joined #nim |
18:11:26 | * | neurocyte0132889 quit (Changing host) |
18:11:26 | * | neurocyte0132889 joined #nim |
18:30:48 | FromDiscord | <enthus1ast> @treeform\: the issue is not easily reproducable, i thought at first it happens when the server runs longer (and it indeed can cause the issue), but after several connection attempts it works again... |
18:32:10 | FromDiscord | <enthus1ast> but sure, can be cause in my code, ill play with it and try a few things |
18:48:03 | * | neurocyte0132889 quit (Read error: Connection reset by peer) |
18:48:31 | * | neurocyte0132889 joined #nim |
18:48:31 | * | neurocyte0132889 quit (Changing host) |
18:48:31 | * | neurocyte0132889 joined #nim |
18:52:16 | FromDiscord | <5271> how do i get a single char from user? |
18:52:25 | FromDiscord | <5271> so i just click a key and it continues |
18:54:37 | FromDiscord | <5271> does anyone know? |
19:04:26 | FromDiscord | <hmmm> import terminal -> getch() |
19:05:43 | FromDiscord | <TryAngle> when compiling is there a way to remove the produced binary right after automatically? |
19:11:03 | FromDiscord | <leorize> use `nim r` |
19:12:16 | FromDiscord | <TryAngle> works, thanks! |
19:19:28 | * | xet7 joined #nim |
19:22:25 | * | noeontheend quit (Ping timeout: 256 seconds) |
19:22:31 | FromDiscord | <5271> In reply to @hmmm "import terminal -> getch()": thanks |
19:26:49 | FromDiscord | <fumamatar> hey, im having a bit trouble with async sockets in nim. i am trying to write a basic port scanner with banner grabing. problem is that if a port is open and does not send any bytes, my socket waits forever until a line is received. what would be the best way to implement this ? a timeout on `await s.recvLine()`? Code snippet following in a second |
19:27:24 | FromDiscord | <fumamatar> sent a code paste, see https://play.nim-lang.org/#ix=3GO8 |
19:28:09 | FromDiscord | <fumamatar> sent a code paste, see https://play.nim-lang.org/#ix=3GO9 |
19:28:51 | FromDiscord | <Yardanico> In reply to @fumamatar "hey, im having a": a timeout would be good, yes, check out withTimeout proc |
19:29:50 | FromDiscord | <fumamatar> Thanks. I thought maybe there would be a more elegant version though, I am not sure which value I should set the timeout to :/ 1 second might be too short and I could miss ports, too many seconds would slow down the scan |
19:46:50 | FromDiscord | <treeform> In reply to @enthus1ast "<@107140179025735680>\: the issue is": If you can make a small test case that can show the bug that would be great. I need some thing that I can put into tests. |
19:47:39 | FromDiscord | <treeform> Here is test case that tests many clients connecting: https://github.com/treeform/netty/blob/master/tests/test.nim#L149 |
19:49:08 | FromDiscord | <treeform> Try modifying that case to make it be more like your case and see if it breaks. |
19:52:59 | NimEventer | New thread by Cobbycobby: Dynamic usage of arithmetic operators in nim, see https://forum.nim-lang.org/t/8673 |
19:57:32 | * | kayabaNerve_ is now known as kayabaNerve |
20:10:46 | * | terminalpusher joined #nim |
20:15:35 | FromDiscord | <lantos> In reply to @PMunch "Who's up for some": missed it but looking real comfy with that fire |
20:19:14 | FromDiscord | <dom96> In reply to @fumamatar "Thanks. I thought maybe": timeouts won't slow down the scan, you're running the other scans concurrently so they'll continue to run |
20:19:46 | FromDiscord | <fumamatar> In reply to @dom96 "timeouts won't slow down": Yea I meant that a 10s timeout means a runtime of at least 10 seconds in the case that a port sends no bytes on connecting |
20:20:20 | FromDiscord | <fumamatar> still fast enough though |
20:22:47 | FromDiscord | <zidsal> Easy solution on timeout value is make it configuration |
20:44:38 | * | terminalpusher quit (Remote host closed the connection) |
20:47:00 | * | krux02 joined #nim |
21:11:43 | * | src quit (Ping timeout: 256 seconds) |
21:13:44 | * | src joined #nim |
21:18:46 | * | src quit (Quit: Leaving) |
21:18:56 | * | src joined #nim |
21:32:47 | FromDiscord | <enthus1ast> if i can i will @treeform |
21:33:05 | * | pch quit (Remote host closed the connection) |
21:34:09 | * | pch joined #nim |
21:36:11 | * | src quit (Ping timeout: 252 seconds) |
21:37:03 | * | pch_ joined #nim |
21:37:12 | * | pch quit (Read error: Connection reset by peer) |
21:37:14 | * | pch_ quit (Remote host closed the connection) |
21:38:50 | * | pch joined #nim |
21:41:07 | * | pch quit (Remote host closed the connection) |
21:42:11 | * | pch joined #nim |
21:43:51 | * | pch_ joined #nim |
21:43:51 | * | pch quit (Read error: Connection reset by peer) |
21:45:14 | * | pch_ quit (Remote host closed the connection) |
21:46:20 | * | pch joined #nim |
21:55:24 | FromDiscord | <TryAngle> how do I get the count of characters in a string? |
21:58:27 | FromDiscord | <Yardanico> you want to count how many times a single characters occurs in a string? |
21:58:46 | FromDiscord | <TryAngle> now how many characters it contains |
21:58:56 | FromDiscord | <Yardanico> `str.len` |
21:59:00 | FromDiscord | <TryAngle> the `len()` proc doesn't return the character when using other UTF8 range sometimes↵for example: using `len()` on `안녕! 你好!` returns `16` |
21:59:14 | FromDiscord | <Yardanico> yeah, you need to use unicode module for utf8 |
21:59:25 | FromDiscord | <Yardanico> https://nim-lang.org/docs/unicode.html#runeLen%2Cstring |
21:59:33 | FromDiscord | <TryAngle> just import unicode and it works? |
21:59:50 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3GOO |
21:59:54 | FromDiscord | <TryAngle> thanks! |
22:04:50 | FromDiscord | <treeform> In reply to @enthus1ast "if i can i": thanks! |
22:10:20 | * | Vladar quit (Quit: Leaving) |
22:17:30 | FromDiscord | <TryAngle> hmm it seems when a proc marked as {.discardable.} is the single thing in an of (case -> of) the pragma has no effect |
22:17:46 | FromDiscord | <TryAngle> (edit) "is" => "and gets called as" |
22:18:05 | FromDiscord | <Elegantbeef> Well yea how is it supposed to know it should be discarded |
22:18:40 | FromDiscord | <Elegantbeef> Each branch is resolved after the first, so i suppose if it's not in the first branch it can be reasoned |
22:18:56 | FromDiscord | <Elegantbeef> But if it's in the first branch there is 0 information that "this should be discarded" |
22:19:34 | FromDiscord | <TryAngle> oh I see |
22:19:46 | FromDiscord | <TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3GOR |
22:20:05 | FromDiscord | <Elegantbeef> you know you can just do `discard parseText(h, node)`? |
22:20:19 | FromDiscord | <TryAngle> oh no I didn't 😂 |
22:20:21 | FromDiscord | <TryAngle> thanks |
22:21:07 | FromDiscord | <Elegantbeef> Yea in that case without discarding it gets that the proc returns and says "all branches need to be of type `parsetext()` |
22:21:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3GOS |
22:21:53 | FromDiscord | <Elegantbeef> Though with that return it shouldnt matter |
22:22:18 | FromDiscord | <TryAngle> ah that makes sense, it's the first time I had this case |
22:29:43 | * | sagax quit (Ping timeout: 252 seconds) |
22:30:16 | * | src joined #nim |
22:38:32 | * | PMunch quit (Quit: leaving) |
22:42:54 | * | src quit (Quit: Leaving) |
22:43:04 | * | src joined #nim |
22:45:31 | FromDiscord | <evoalg> @ElegantBeef you created scanTuple ? |
22:47:19 | FromDiscord | <evoalg> Thank you for creating it! |
23:00:40 | FromDiscord | <Elegantbeef> I did, it's mostly the same implementation as scanf so i hardly did anything |
23:09:15 | FromDiscord | <evoalg> All the same, from someone new like me it helps a lot. I've found with learning Nim, often the thing that takes the longest for me (and most frustrating compared to python) is getting the data into variables / containers. So, thank you 🙂 |
23:13:00 | FromDiscord | <evoalg> Also @ElegantBeef did you see that "include" trick in the aoc channel for day02? ... my mind is blown |
23:14:05 | FromDiscord | <ynfle (ynfle)> +1! |
23:14:18 | FromDiscord | <Elegantbeef> It's interesting not overly mind blowing to me though 😀 |
23:14:20 | FromDiscord | <ynfle (ynfle)> It's truly mind blown |
23:14:41 | FromDiscord | <ynfle (ynfle)> Turning data into code! It's like lisp almost |
23:14:58 | FromDiscord | <Elegantbeef> Comically last year I used the nimVM for solving that operator precedence problem instead of making a lexer/evaluator |
23:15:54 | FromDiscord | <sharpcdf> what function returns the absolute path of my current nim file? |
23:16:05 | FromDiscord | <sharpcdf> ive tried `getProjectPath` but it returns an error |
23:16:32 | FromDiscord | <Elegantbeef> `getAppDir`? |
23:16:51 | FromDiscord | <Yardanico> In reply to @sharpcdf "what function returns the": you mean source file? |
23:16:55 | FromDiscord | <Yardanico> or the resulting binary? |
23:17:11 | FromDiscord | <sharpcdf> In reply to @Yardanico "you mean source file?": source file |
23:17:20 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "`getAppDir`?": that returns the binary directory |
23:17:25 | FromDiscord | <sharpcdf> oh wait found it |
23:17:28 | FromDiscord | <Yardanico> https://nim-lang.org/docs/system.html#currentSourcePath.t |
23:17:32 | FromDiscord | <sharpcdf> https://nim-lang.org/docs/system.html#currentSourcePath.t |
23:17:33 | FromDiscord | <sharpcdf> yea |
23:17:34 | FromDiscord | <sharpcdf> thanks |
23:26:56 | * | noeontheend joined #nim |
23:40:34 | * | krux02 quit (Remote host closed the connection) |
23:50:45 | * | noeontheend quit (Ping timeout: 252 seconds) |
23:57:25 | FromDiscord | <TryAngle> does this have the same effect of using `type X = object` vs `type X = ref object`? https://media.discordapp.net/attachments/371759389889003532/916115869040525332/unknown.png |
23:57:40 | FromDiscord | <Yardanico> no |
23:58:00 | FromDiscord | <Yardanico> even with type X = object nim will pass the objects into by reference if the object is large enough |
23:58:11 | FromDiscord | <Yardanico> and with bycopy the object will be _always_ passed by copy |
23:58:17 | FromDiscord | <Yardanico> you really only should use it for C FFI |
23:58:36 | FromDiscord | <Yardanico> (edit) "even with type X = object nim will pass the objects into ... by" added "procedures" |
23:58:41 | FromDiscord | <TryAngle> ah ok, I see↵thanks |