01:21:22 | * | neurocyte86 joined #nim |
01:23:31 | * | neurocyte8 quit (Ping timeout: 256 seconds) |
01:23:31 | * | neurocyte86 is now known as neurocyte8 |
01:35:02 | * | vicecea quit (Remote host closed the connection) |
01:35:30 | * | vicecea joined #nim |
01:49:12 | FromDiscord | <Patitotective> to make my library updates available for someone to install them, do i need to create a new tag or? |
01:49:29 | FromDiscord | <Elegantbeef> You can make a tag, or you can mark a semver |
01:49:40 | FromDiscord | <Elegantbeef> Tag is probably better |
01:49:51 | FromDiscord | <Patitotective> i can or i must? |
01:49:58 | FromDiscord | <Elegantbeef> Depends on how religious you are about that semver |
01:49:59 | FromDiscord | <Elegantbeef> Can |
01:52:05 | FromDiscord | <Patitotective> it worked 🙃 |
02:00:09 | * | lumo_e quit (Quit: Quit) |
02:47:54 | * | arkurious quit (Quit: Leaving) |
02:49:59 | * | Jjp137 joined #nim |
03:06:10 | * | Zectbumo joined #nim |
03:21:37 | * | kayabaNerve joined #nim |
03:21:43 | * | kayabaNerve quit (Remote host closed the connection) |
03:22:07 | * | kayabaNerve joined #nim |
03:37:15 | FromDiscord | <@bracketmaster-5a708063d73408ce4> How can I read really large files in Nim - as in with a buffered reader? |
03:40:31 | FromDiscord | <Elegantbeef> `import std/streams` |
03:40:31 | FromDiscord | <Elegantbeef> `for line in lines("somePath")` |
03:40:33 | FromDiscord | <@bracketmaster-5a708063d73408ce4> what if I want the first five lines? |
03:44:00 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I did something like that - python lets you do something like iter()[\:5] |
03:44:00 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I was hoping nim would too |
03:44:00 | FromDiscord | <Elegantbeef> Let's see if it does |
03:44:05 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/K4u |
03:45:24 | FromDiscord | <demotomohiro> Using an int variable to count 5 line is also easy. |
03:45:53 | FromDiscord | <@bracketmaster-5a708063d73408ce4> `nim c -d:release -r parse_vcd.nim` is that the right way to invoke the release flag? |
03:46:13 | FromDiscord | <demotomohiro> Yes |
03:47:11 | FromDiscord | <@bracketmaster-5a708063d73408ce4> counting all the lines in my 2GB file is pretty slow - much slower than wc, and slower than in Rust, Go, or Scala |
03:47:24 | FromDiscord | <@bracketmaster-5a708063d73408ce4> sent a long message, see http://ix.io/3TP6 |
03:47:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/wUQ |
03:49:04 | FromDiscord | <@bracketmaster-5a708063d73408ce4> maybe I need to increase the bufsize? |
03:49:45 | FromDiscord | <Elegantbeef> Worth noting you dont needs streams for `lines` |
03:50:52 | FromDiscord | <Elegantbeef> Oh there is also `readLines` |
03:50:54 | FromDiscord | <Elegantbeef> The more you know |
03:51:53 | FromDiscord | <Elegantbeef> Do you have the equivlent go/rust |
03:52:06 | FromDiscord | <Elegantbeef> And can you provide the file? |
03:53:08 | FromDiscord | <@bracketmaster-5a708063d73408ce4> sent a code paste, see https://play.nim-lang.org/#ix=3TP7 |
03:54:59 | * | slowButPresent quit (Quit: leaving) |
03:56:30 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I broke the rust code - and I don't feel like fixing it to provide it |
03:56:50 | FromDiscord | <@bracketmaster-5a708063d73408ce4> the nim file I pasted earlier is what I used - which you can compare with the go |
03:57:04 | FromDiscord | <Elegantbeef> And the .vcd? |
03:57:41 | FromDiscord | <@bracketmaster-5a708063d73408ce4> https://drive.google.com/file/d/1pfm2qo2l8fGTHHJ8TLrg1vSGaV_TUbp2/view?usp=sharing |
03:58:04 | FromDiscord | <@bracketmaster-5a708063d73408ce4> probably doesn't matter - but FYI - a VCD is a waveform dump |
03:58:31 | FromDiscord | <Elegantbeef> How long does your go take and how long does your nim take? |
04:00:01 | FromDiscord | <huantian> In reply to @@bracketmaster-5a708063d73408ce4 "I did something like": Wait what you can slice iterables in python how did I not notice that |
04:00:27 | FromDiscord | <@bracketmaster-5a708063d73408ce4> go is roughly 11s - nim is 38s, `wc -l` is 8s |
04:07:42 | FromDiscord | <Elegantbeef> Well i'm also getting slow Nim performance so let's profile it using callgrind |
04:08:24 | FromDiscord | <Elegantbeef> Going to take ages |
04:08:40 | NimEventer | New Nimble package! millie - Convert big numbers to what's pleasant to see (an adorable, little girl, perhaps?) ... in Nim!, see https://github.com/bichanna/millie.nim |
04:13:49 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I suspect it's because it allocates on every readline |
04:13:56 | FromDiscord | <Elegantbeef> It doesnt |
04:22:52 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/958582055824932894/image.png |
04:23:07 | FromDiscord | <Elegantbeef> methinks it's `memchr` |
04:25:18 | * | vicfred joined #nim |
04:25:41 | FromDiscord | <@bracketmaster-5a708063d73408ce4> what's memchr? |
04:26:05 | FromDiscord | <Elegantbeef> A search for char procedure |
04:28:30 | * | fowl quit (Quit: cya pals) |
04:39:29 | * | fowl joined #nim |
04:40:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TPd |
04:41:30 | FromDiscord | <Elegantbeef> Is a lot https://github.com/nim-lang/Nim/blob/version-1-6/lib/system/io.nim#L449-L495 |
04:42:14 | FromDiscord | <@bracketmaster-5a708063d73408ce4> much better |
04:47:28 | * | rockcavera quit (Remote host closed the connection) |
04:50:35 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/dR3 |
04:50:54 | FromDiscord | <Elegantbeef> Does that have a bug somewhere, perhaps 😛 |
04:51:44 | FromDiscord | <Elegantbeef> I get 7.7s on danger, so i think it's suffice to say the `stdlib`'s lines is slow |
04:55:22 | FromDiscord | <@bracketmaster-5a708063d73408ce4> heh |
04:55:22 | FromDiscord | <@bracketmaster-5a708063d73408ce4> you try hard |
04:55:30 | FromDiscord | <Elegantbeef> Eh i looked at the very C nim and knew it could be done better |
04:55:48 | FromDiscord | <@bracketmaster-5a708063d73408ce4> where do you work? |
04:55:55 | FromDiscord | <Elegantbeef> Nowhere |
04:56:00 | FromDiscord | <@bracketmaster-5a708063d73408ce4> pardon? |
04:56:13 | FromDiscord | <Elegantbeef> I'm unemployed |
04:56:30 | FromDiscord | <spoon> i got github copilot access and after one line i can confirm it does not work well for nim at all LOL https://media.discordapp.net/attachments/371759389889003532/958590522124038164/unknown.png |
04:56:34 | FromDiscord | <@bracketmaster-5a708063d73408ce4> how do you buy food 😛 |
04:57:13 | FromDiscord | <Elegantbeef> We'll just say i live in such a predicament that I dont starve |
04:57:52 | FromDiscord | <Elegantbeef> Given some of the Nim code on github, that's probably a good thing |
04:58:16 | FromDiscord | <Elegantbeef> Also i wonder how copilot works with macro heavy languages |
04:58:35 | FromDiscord | <Elegantbeef> Copilot might learn a macro from a library and think it's a language feature |
05:00:38 | FromDiscord | <spoon> i think it just thinks that nim is python and tries to write python code |
05:01:04 | FromDiscord | <Elegantbeef> I assume so, but that's not what my curiosity is from |
05:01:42 | FromDiscord | <spoon> hmmm https://media.discordapp.net/attachments/371759389889003532/958591830415536138/unknown.png |
05:02:03 | FromDiscord | <spoon> it does recognize `proc` and `=` format |
05:02:27 | * | Gustavo6046 quit (Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world. <screw you aloo_shu my old line was better and more creative!>) |
05:03:47 | FromDiscord | <spoon> but it doesn't seem to want to even touch macros i guess https://media.discordapp.net/attachments/371759389889003532/958592355047456778/unknown.png |
05:04:37 | FromDiscord | <spoon> and yep if i ask it to generate a function using a comment it defaults to `def` |
05:05:14 | FromDiscord | <Elegantbeef> I highly doubt generated Nim code would be good |
05:05:43 | FromDiscord | <spoon> yeah, but so far copilot has been super good at writing similar code that's repeated a lot |
05:05:46 | FromDiscord | <Elegantbeef> I've seen how people write Nim, it's so flexible and people dont use nice features it'd result in bad code |
05:05:48 | FromDiscord | <spoon> but that's about all i can say for it |
05:06:57 | FromDiscord | <spoon> like i'd say it would help you in writing a function to move different directions depending on arrow key presses for example, cause it can probably guess and fill in from what you've already written and use the same syntax, but i wouldn't trust it to code stuff from scratch yet |
05:07:20 | FromDiscord | <Elegantbeef> I mean templates exist 😛 |
05:08:10 | FromDiscord | <Elegantbeef> Like you dont need code gen when you have codegen |
05:08:20 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/958593497550700584/image.png |
05:08:20 | FromDiscord | <Elegantbeef> For instance |
05:09:00 | FromDiscord | <spoon> a template inside a proc? |
05:09:07 | FromDiscord | <Elegantbeef> Yes |
05:10:50 | FromDiscord | <Elegantbeef> Write less code not more is what i say |
05:11:53 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=3TPh |
05:11:58 | FromDiscord | <spoon> here's what i'm using for 8-directional movement on the numpad |
05:12:19 | FromDiscord | <Elegantbeef> yea i'm never writing that manually |
05:13:27 | FromDiscord | <spoon> will have to figure out template stuff |
05:15:57 | FromDiscord | <Elegantbeef> But i only have 4 directions |
05:16:02 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TPj |
05:17:00 | FromDiscord | <Elegantbeef> I also have an input event system so i just sub the keys with the events that move directions |
05:17:03 | FromDiscord | <spoon> yeah, that makes sense |
05:19:49 | FromDiscord | <spoon> yeah, copilot is nice for writing tedious repeaating stuff |
05:19:56 | FromDiscord | <spoon> (edit) "repeaating" => "repeating" | "repeatingstuff ... " added "like that" |
05:20:08 | FromDiscord | <spoon> (do edits go through matrix/irc?) |
05:20:14 | FromDiscord | <Elegantbeef> Somewhat |
05:21:21 | FromDiscord | <Elegantbeef> If a message is edited too much the matrix bridge has a heart attack and the message disappears |
05:21:36 | FromDiscord | <spoon> ah that's nice |
05:22:02 | FromDiscord | <spoon> is it a rate limit thing or just it being weird? |
05:22:11 | FromDiscord | <Elegantbeef> It's just a bug |
05:27:01 | * | yoyojambo quit (Read error: Connection reset by peer) |
05:52:52 | * | ltriant quit (Ping timeout: 246 seconds) |
06:12:23 | NimEventer | New thread by Elcritch: Fidgets: widgets using Fidget, see https://forum.nim-lang.org/t/9059 |
06:19:49 | * | PMunch joined #nim |
06:21:11 | * | ltriant joined #nim |
06:22:39 | * | kayabaNerve quit (Remote host closed the connection) |
06:27:22 | * | neurocyte8 quit (Quit: The Lounge - https://thelounge.chat) |
06:28:25 | * | neurocyte86 joined #nim |
07:16:10 | * | jjido joined #nim |
07:57:45 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:05:12 | * | jjido joined #nim |
08:19:21 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:19:27 | * | jmdaemon quit (Ping timeout: 256 seconds) |
08:38:28 | FromDiscord | <Forest> In reply to @Elegantbeef "If a message is": amazing, programming at its finest |
09:07:07 | NimEventer | New thread by Mardiyah: Any on the Nim alias identical to C++ & ?, see https://forum.nim-lang.org/t/9060 |
09:18:39 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @spoon "i got github copilot": I have Copilot too |
09:21:39 | PMunch | Copilot is such a Microsoft project |
09:21:49 | PMunch | Perfect for writing massive boilerplate-filled projects |
09:22:14 | FromDiscord | <Elegantbeef> So microsofty it steals from OSS and replicates it elsewhere 😛 |
09:22:29 | PMunch | Oh yeah, that's another interesting aspect of it |
09:22:46 | PMunch | At what point are you unfairly using code |
09:23:19 | FromDiscord | <Elegantbeef> Links to it printing verbatim the fast inverse sqrt |
09:24:44 | FromDiscord | <demotomohiro> Copilt can insert code from GPL OSS project? |
09:24:51 | FromDiscord | <Elegantbeef> Yes |
09:25:54 | PMunch | @Elegantbeef, oh wow, it's that bad? |
09:26:01 | FromDiscord | <System64 ~ Flandre Scarlet> BRUH https://media.discordapp.net/attachments/371759389889003532/958658345743581215/unknown.png |
09:26:16 | FromDiscord | <Elegantbeef> They say it's "very unlikely to print code verbatim" |
09:26:19 | FromDiscord | <demotomohiro> So copilt makes your software GPL Licenced |
09:26:27 | FromDiscord | <Elegantbeef> https://twitter.com/mitsuhiko/status/1410886329924194309 "very unlikely" in action |
09:26:50 | FromDiscord | <Elegantbeef> Well copilot doesnt even agree with GPL so... licenses dont mean anything |
09:27:04 | Amun-Ra | and that's a good thing, you don't have to waste time choosing which license to use ;> |
09:27:16 | FromDiscord | <System64 ~ Flandre Scarlet> Why tf does it use linear interpolation? https://media.discordapp.net/attachments/371759389889003532/958658661050359828/unknown.png |
09:31:17 | FromDiscord | <Elegantbeef> So aside from the fact most code on the internet is trash copilot is also just a lovely code thief 😛 |
09:33:56 | FromDiscord | <System64 ~ Flandre Scarlet> fortunately it doesn't even know how to make a Bogo Sort |
09:36:07 | FromDiscord | <Elegantbeef> I'm half waiting for someone to say "My code's not trash" just so i can prove it is! |
09:36:37 | Amun-Ra | ;-) |
09:37:18 | FromDiscord | <System64 ~ Flandre Scarlet> KILL ME https://media.discordapp.net/attachments/371759389889003532/958661184607879228/unknown.png |
09:37:18 | * | vicfred quit (Quit: Leaving) |
09:37:19 | Amun-Ra | I'm waiting for someone to say "my code is trash" just so you can improve it ;> |
09:39:13 | FromDiscord | <System64 ~ Flandre Scarlet> yeah he's dumb https://media.discordapp.net/attachments/371759389889003532/958661668932554802/unknown.png |
09:40:53 | FromDiscord | <demotomohiro> Do you need to create a derivative of sine table when you have cosine table? |
09:41:14 | FromDiscord | <System64 ~ Flandre Scarlet> just testing Copilot |
09:41:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Do you need to": Btw I didn't even asked for a table, just a single value |
09:43:37 | PMunch | @Elegantbeef, a free code review you say? My code's not trash! |
09:50:32 | FromDiscord | <System64 ~ Flandre Scarlet> It doesn't know what a 25% pulse waveform is |
10:33:05 | NimEventer | New Nimble package! owlkettle - A declarative user interface framework based on GTK, see https://github.com/can-lehmann/owlkettle |
10:33:48 | * | Zectbumo quit (Remote host closed the connection) |
10:35:21 | PMunch | Huh, that looks pretty neat |
10:55:36 | FromDiscord | <Phil> In reply to @Elegantbeef "I'm half waiting for": My code is trash, but it's also true that nobody has yet written better code that solves my specific problem! If they did we would have a web framework with integrated orm! |
10:56:21 | FromDiscord | <enthus1ast> AAND, if you code solves your problem, but is trash, it still solves your problem |
10:56:34 | FromDiscord | <enthus1ast> not every bit of code must be a georgious beauty |
11:05:31 | FromDiscord | <Zoom> Does anyone parse nimble files from a nimscript? Looks like we can't use `parsecfg` as it relies on importc |
11:08:41 | PMunch | @Zoom, nimble files are nimscript |
11:08:49 | PMunch | You shouldn't try to parse them |
11:09:27 | PMunch | You should use `nimble dump --json` if you want to read out the data in your code |
11:09:46 | PMunch | Or import the compiler and execute the Nimble file in the same way Nimble does it |
11:11:35 | PMunch | Damn it.. Spent a large chunk of yesterday trying to figure out why I couldn't access my Raspberry Pi home-automation server.. Turns out it was because I had forgotten to turn off my work VPN :P |
11:12:10 | PMunch | I tried everything, restarted it, logged in to the server itself and verified that everything was up and running as it should be |
11:12:13 | PMunch | But still couldn't connect |
11:15:37 | FromDiscord | <exelotl> haha classic |
11:15:56 | PMunch | I spent hours trying to debug that shit.. |
11:16:17 | PMunch | It still controlled the lights, so it appeared to work fine, but I couldn't connect to it :P |
11:17:22 | FromDiscord | <Zoom> I just want to read the f\\n version from my "config.nims" \:P↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
11:17:59 | FromDiscord | <Zoom> And I'd like to just use the nimble file, but I can't even import inside of it |
11:18:41 | FromDiscord | <Zoom> wait, I can? |
11:20:54 | FromDiscord | <Zoom> I tried to import after the ini section earlier... |
11:24:25 | PMunch | If you use the new Nimscript format you can import inside of it |
11:24:44 | PMunch | But there is an old format which is just an INI file which doesn't support anything |
11:25:14 | PMunch | Wait, you want to read version from config.nims? |
11:27:10 | FromDiscord | <Zoom> I've already done it copying the parsing proc from cblake, but now I'm moving the task back to .nimble file 🤦♂️ |
11:27:46 | PMunch | Wait, what exactly is it that you want to achieve here? |
11:28:10 | FromDiscord | <Zoom> Just define a task for nimble to build and name the binaries |
11:28:36 | FromDiscord | <Zoom> It's working fine, what's left is to query the architecture somehow... |
11:31:27 | PMunch | Can't you use read out the architecture in the task? |
11:32:48 | PMunch | Read out buildCPU or hostCPU |
11:34:53 | FromDiscord | <Zoom> Read out of what? I'm tempted to just `sizeOf(int)` |
11:35:33 | FromDiscord | <Zoom> Oh, thanks, missed those |
11:52:44 | * | xet7 joined #nim |
12:16:10 | * | xet7 quit (Read error: Connection reset by peer) |
12:16:47 | * | xet7 joined #nim |
13:26:14 | * | Gustavo6046 joined #nim |
13:33:44 | * | xet7 quit (Read error: Connection reset by peer) |
13:43:47 | * | arkurious joined #nim |
13:45:31 | * | xet7 joined #nim |
14:19:05 | * | rockcavera joined #nim |
14:19:06 | * | rockcavera quit (Changing host) |
14:19:06 | * | rockcavera joined #nim |
14:28:26 | FromDiscord | <Bubblie> I wanted to ask, when you compile you nim project to c++, what happens to the libraries that nim file imported? Is it also converted to c++ so the compiled c++ code from you nim file can also use it? |
14:28:38 | FromDiscord | <Bubblie> (edit) "you" => "yor" |
14:28:45 | FromDiscord | <Bubblie> (edit) "yor" => "you" | "you" => "your" |
14:28:48 | FromDiscord | <hmmm> damn I wished I knew that you are supposed to place your types alone in a module before spending 3 hours suffering vs imports |
14:29:09 | FromDiscord | <hmmm> pls write it in the tutorial 😦 |
14:30:27 | FromDiscord | <auxym> In reply to @Bubblie "I wanted to ask,": what libraries? Nim libraries? Or c++ stuff you imported via `importcpp` ? |
14:30:33 | FromDiscord | <Bubblie> nim libraries |
14:30:57 | FromDiscord | <auxym> everything nim gets statically linked together in the final executable |
14:31:36 | FromDiscord | <auxym> so yeah everything is compiled to c++, then compiled by gcc/g++ and linked |
14:31:47 | FromDiscord | <Bubblie> Holy shit thats awesome |
14:32:02 | FromDiscord | <Bubblie> So basically, it still can go at the same processing speed as c++ |
14:33:04 | FromDiscord | <auxym> well yeah sort of, nim also has (optional) runtime checks and automatic memory management may have some overhead |
14:34:22 | FromDiscord | <Bubblie> Yeah Id assume so |
14:34:31 | FromDiscord | <auxym> are you doing FFI with c++? Otherwise the default C backend is likely just as fast at runtime, and has faster builds |
14:34:51 | FromDiscord | <Bubblie> Sorta, im using futhark with glfw and also using vulkan bindings ive found |
14:35:44 | FromDiscord | <Bubblie> Im still of course trying to get things to work because windows is a piece of shit |
14:36:15 | FromDiscord | <Bubblie> But, I was worried on how it may affect graphics and such and the speed the game goes at |
14:36:39 | FromDiscord | <Bubblie> I wanted to use nim for vulkan because it would pretty much eliminate a lot of the verbosity that comes with vulkan C++ |
14:36:47 | FromDiscord | <Bubblie> And nim can compile down to c++ |
14:58:26 | FromDiscord | <Phil> In reply to @enthus1ast "not every bit of": I mean, I'd like it if it were, just can't often get to that state 😦 |
15:04:26 | * | Zevv left #nim (#nim) |
15:18:33 | * | slowButPresent joined #nim |
15:45:26 | NimEventer | New Nimble package! ssz_serialization - Nim implementation of the Ethereum SSZ serialization format, see https://github.com/status-im/nim-ssz-serialization |
15:45:26 | NimEventer | New Nimble package! taskpools - lightweight, energy-efficient, easily auditable threadpool, see https://github.com/status-im/nim-taskpools |
16:02:24 | * | xet7 quit (Remote host closed the connection) |
16:31:43 | * | nrds quit (Remote host closed the connection) |
16:38:29 | FromDiscord | <untoreh> is there a macro to apply a pragma to multiple statemetns? |
16:38:50 | * | jjido joined #nim |
16:40:00 | * | nrds joined #nim |
17:05:16 | FromDiscord | <hmmm> broskis what is the standard way to setup a proc that needs to return one of 3 values? do we have a bool plus plus 🤔 |
17:06:09 | FromDiscord | <huantian> Bool plus plus? |
17:06:14 | FromDiscord | <hmmm> lol it was a joke |
17:06:18 | FromDiscord | <huantian> Do you want like a enum? |
17:06:43 | FromDiscord | <hmmm> yea I think I need to use an enum I just wanted to know if it's the standard way people do it |
17:07:01 | * | xet7 joined #nim |
17:07:15 | FromDiscord | <huantian> Yeah |
17:07:27 | FromDiscord | <hmmm> ty huan |
17:07:31 | FromDiscord | <huantian> Depending though an Option[bool] might be better |
17:07:45 | FromDiscord | <huantian> If you want to describe true, false, and no value |
17:08:11 | FromDiscord | <hmmm> yea, hmm it's something like true false and falsefalse |
17:08:22 | * | xet7 quit (Read error: Connection reset by peer) |
17:08:44 | FromDiscord | <hmmm> like a double nested if with an else as a false and the second one as falsefalse |
17:09:53 | FromDiscord | <hmmm> maybe I should tell araq the future of programming is bool ++ 😃 |
17:12:40 | * | jmdaemon joined #nim |
17:15:08 | FromDiscord | <Rika> yeah then an Option[bool] is correct |
17:15:51 | FromDiscord | <kevin> best nimthonic way to iterate over 2 characters in a string (instead of 1)? |
17:16:16 | FromDiscord | <Rika> sliding window or every 2? |
17:16:20 | FromDiscord | <kevin> every 2 |
17:16:28 | FromDiscord | <hmmm> In reply to @kevin "best nimthonic way to": yea I was just trying it, option bool is the way |
17:16:41 | FromDiscord | <Rika> maybe use index + `countup(start,end,step)` |
17:16:49 | FromDiscord | <kevin> so like `"test_string"` would chunk into `"te" , "st" "_s", ... etc` |
17:18:29 | FromDiscord | <auxym> yeah countup with step = 2 |
17:33:04 | FromDiscord | <kevin> 😬 |
17:33:05 | FromDiscord | <kevin> lol |
17:33:09 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3TRC |
17:33:36 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3TRE |
17:36:49 | * | xet7 joined #nim |
17:41:56 | FromDiscord | <hmmm> friendsies a proc that returns bool, will auto set result to true in all cases? |
17:46:25 | * | pro joined #nim |
17:50:04 | FromDiscord | <Recruit_main707> to false in any case, but i dont know if it would, probably errors out |
17:51:14 | FromDiscord | <Recruit_main707> to false |
17:51:28 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=3TRL |
17:51:55 | FromDiscord | <Recruit_main707> i think {.noInit.} avoids this |
17:52:16 | FromDiscord | <Recruit_main707> doesnt seem so |
17:52:51 | * | pro quit (Quit: pro) |
17:54:13 | * | pro joined #nim |
17:55:14 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
18:07:45 | * | vicfred joined #nim |
18:17:50 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
18:19:21 | FromDiscord | <xxM0ha> If i made a http post requests ↵The response will be saved in the ram↵Can i remove the response from the ram after i read it? |
18:19:26 | * | xet7 quit (Remote host closed the connection) |
18:19:27 | FromDiscord | <xxM0ha> Because it’s too many requests and it’s effect on the ram |
18:19:47 | FromDiscord | <xxM0ha> I was using httpclient library |
18:20:03 | FromDiscord | <that_dude> yeah enum sounds like the simplest way to get what you want |
18:20:09 | * | jmdaemon joined #nim |
18:20:18 | * | xet7 joined #nim |
18:22:05 | * | pro quit (Quit: pro) |
18:24:36 | * | pro joined #nim |
18:55:05 | * | Zectbumo joined #nim |
18:58:02 | FromDiscord | <huantian> The response will be deleted when it goes out of scope |
19:01:19 | FromDiscord | <Solitude> sent a code paste, see https://play.nim-lang.org/#ix=3TS9 |
19:03:32 | * | jmdaemon quit (Read error: Connection reset by peer) |
19:04:16 | * | jmdaemon joined #nim |
19:28:47 | * | pro quit (Quit: pro) |
19:39:00 | * | jmdaemon quit (Ping timeout: 240 seconds) |
19:39:25 | * | jmdaemon joined #nim |
20:12:26 | * | kenran joined #nim |
20:27:24 | * | m4nc3r joined #nim |
20:29:56 | * | m4nc3r quit (Client Quit) |
21:28:57 | * | yoyojambo joined #nim |
21:42:47 | * | kenran quit (Quit: WeeChat info:version) |
21:42:55 | * | wyrd quit (Ping timeout: 240 seconds) |
21:45:07 | * | wyrd joined #nim |
22:12:49 | * | Zectbumo quit (Remote host closed the connection) |
22:21:31 | * | lumo_e joined #nim |
22:47:51 | * | xet7 quit (Ping timeout: 245 seconds) |
23:01:12 | * | xet7 joined #nim |
23:15:32 | FromDiscord | <xxM0ha> The semaphore timeout period has expired |
23:15:34 | FromDiscord | <xxM0ha> What is that |
23:16:59 | FromDiscord | <auxym> context? code that produces the error? |
23:19:19 | FromDiscord | <xxM0ha> In reply to @auxym "context? code that produces": Iam doing parallel http requests with async and httpclient so when i reach like 900 requests ↵The requests stop sending ↵And this error shows in except |
23:20:56 | FromDiscord | <xxM0ha> And it consume the ram very much |
23:21:09 | FromDiscord | <xxM0ha> (edit) "it" => "it’s" |
23:27:15 | FromDiscord | <michaelb.eth> In reply to @xxM0ha "Iam doing parallel http": you might consider trying async/await of the nim-chronos library and its `apps/http/httpclient` module, see if you have better luck↵↵also, can you give an example of your current code? |
23:27:33 | * | vicfred quit (Ping timeout: 260 seconds) |
23:28:01 | FromDiscord | <xxM0ha> In reply to @michaelb.eth "you might consider trying": https://pastebin.com/BAYbgBQS |
23:28:06 | FromDiscord | <xxM0ha> This is the code |
23:33:46 | FromDiscord | <Elegantbeef> That seems to be a issue on windows related to drive, or network speed |
23:34:01 | FromDiscord | <Elegantbeef> Seems you could be oversaturating one of your resources |
23:37:52 | FromDiscord | <michaelb.eth> each of the iterations of the for loop is running requests in a while loop, so seems like you could be creating a lot of contention |
23:38:03 | FromDiscord | <michaelb.eth> (edit) "requests" => "one request after another" |
23:55:25 | * | yiggityswaps joined #nim |
23:59:02 | * | yoyojambo quit (Ping timeout: 260 seconds) |