00:00:25 | shashlick | Guest599: Nim has yield and iterators |
00:00:29 | shashlick | https://nim-by-example.github.io/for_iterators/ |
00:09:28 | * | foobarrel joined #nim |
00:24:51 | * | leaf__ joined #nim |
00:25:13 | * | leaf__ is now known as Guest85157 |
00:28:53 | FromGitter | <kayabaNerve> Yo. How can I pow two uint64s? Fine with casting them but the only procs I see, even in the math lib, are for floats |
00:29:09 | FromGitter | <kayabaNerve> And I did verify they're both uint64s ;p |
00:31:05 | FromGitter | <kayabaNerve> NVM. TIL to used ^ |
00:31:11 | FromGitter | <kayabaNerve> Like sane people do. |
00:31:30 | * | Guest85157 quit (Ping timeout: 260 seconds) |
00:34:20 | FromGitter | <kayabaNerve> Question. Since float is platform... whatever, that means the epochTime function will break in 15 years, right? |
00:34:51 | FromGitter | <kayabaNerve> *20 |
00:49:40 | * | Sargun quit (Read error: Connection reset by peer) |
00:51:20 | * | Sargun joined #nim |
01:05:10 | * | smt quit (Ping timeout: 252 seconds) |
01:06:30 | FromGitter | <Quelklef> switching to a 64-bit int should circumvent that, right? |
01:06:56 | FromGitter | <Quelklef> I suppose existing code would break, but offering epochTime64 would solve it for future code |
01:54:53 | FromGitter | <Varriount> @Quelklef What are you discussing? |
01:56:36 | FromGitter | <Quelklef> I'm repling to @kayabaNerve |
01:56:45 | FromGitter | <Quelklef> and I've realized that it returns float, like he said, and I'm dumb (I'm tired) |
02:03:50 | * | CodeVance1 joined #nim |
02:03:52 | * | CodeVance1 quit (Client Quit) |
02:05:46 | * | CodeVance quit (Ping timeout: 264 seconds) |
02:08:44 | FromGitter | <kayabaNerve> @Quelklef It offers float32 on 32 bit platforms |
02:09:11 | FromGitter | <kayabaNerve> Decimal precision. I honestly think that's overkill but better to have it than not? (unless it takes away from whole number max length) |
02:09:24 | FromGitter | <kayabaNerve> @Varriount How in twenty years the epoch code will return 1970 |
02:09:27 | FromGitter | <kayabaNerve> 32 bit int overflow |
02:10:05 | * | jsn- quit (Ping timeout: 240 seconds) |
02:10:12 | * | jsn- joined #nim |
02:22:46 | * | max3 quit (Quit: Connection closed for inactivity) |
02:28:21 | * | cavariux joined #nim |
02:32:42 | * | cavariux quit (Ping timeout: 245 seconds) |
02:51:21 | FromGitter | <Varriount> We aren't using 64 bit values? |
03:07:38 | * | endragor joined #nim |
03:10:42 | * | dddddd quit (Remote host closed the connection) |
03:18:11 | * | xkapastel quit (Quit: Connection closed for inactivity) |
03:47:45 | * | SenasOzys quit (Ping timeout: 248 seconds) |
03:57:32 | * | endragor quit (Remote host closed the connection) |
03:59:53 | * | endragor joined #nim |
04:04:15 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:07:06 | * | gangstacat quit (Quit: Ĝis!) |
04:09:45 | * | leorize quit (Ping timeout: 260 seconds) |
04:15:10 | * | gangstacat joined #nim |
04:45:42 | * | xkapastel joined #nim |
05:05:15 | * | endragor quit (Remote host closed the connection) |
05:12:52 | shashlick | looks like streams.readStr is broken on devel |
05:27:48 | * | nsf joined #nim |
05:30:46 | * | endragor joined #nim |
05:32:49 | * | Tanger quit (Ping timeout: 248 seconds) |
05:33:27 | FromGitter | <Varriount> @dom96 Great work on the forum! It's amazing! |
05:35:33 | * | endragor quit (Ping timeout: 256 seconds) |
05:36:43 | * | Tanger joined #nim |
05:55:15 | * | endragor joined #nim |
06:09:43 | * | endragor quit (Remote host closed the connection) |
06:11:46 | * | leorize joined #nim |
06:28:26 | * | endragor joined #nim |
06:35:18 | * | endragor quit (Remote host closed the connection) |
06:48:55 | FromGitter | <kayabaNerve> @Varriount Not on 32 bit systms |
06:48:58 | FromGitter | <kayabaNerve> You use float32 |
06:50:12 | * | gokr joined #nim |
06:57:22 | FromGitter | <Varriount> Who uses 32 bit systems these days though? |
06:58:11 | * | xkapastel quit (Quit: Connection closed for inactivity) |
07:00:43 | * | SenasOzys joined #nim |
07:11:05 | yglukhov | dom96: Forum navigation menu is missing. Will that be back? |
07:17:13 | FromGitter | <kayabaNerve> @Varriount I have seen stores using DOS still |
07:17:25 | FromGitter | <kayabaNerve> I know multiple family computers on XP |
07:24:25 | * | SenasOzys quit (Ping timeout: 245 seconds) |
07:24:38 | livcd | dom96: you got reddit gold for your new forum :D |
07:26:24 | * | PMunch joined #nim |
07:52:09 | * | cavariux joined #nim |
07:55:14 | FromGitter | <alehander42> the forum is really nice now indeed @dom96 thank you |
07:56:30 | * | cavariux quit (Ping timeout: 245 seconds) |
07:56:44 | FromGitter | <gogolxdong> @Varriount what's your fix for cmp algorithm? |
08:04:17 | * | gmpreussner quit (Ping timeout: 252 seconds) |
08:04:37 | PMunch | I still think the search box is a bit too eye catching.. |
08:04:48 | PMunch | But other than that the new forum looks great |
08:05:18 | * | gmpreussner joined #nim |
08:06:19 | FromGitter | <Varriount> @gogolxdong I changed it to use the algorithm found in memfiles |
08:11:20 | * | couven92 joined #nim |
08:16:56 | FromGitter | <gogolxdong> where is it , we haven't updated cmp |
08:26:23 | * | Vladar joined #nim |
08:28:33 | * | sendell joined #nim |
08:29:00 | * | dddddd joined #nim |
08:32:23 | * | floppydh joined #nim |
08:59:37 | * | SenasOzys joined #nim |
09:00:17 | FromGitter | <mratsim> @kayabaNerve At one point technical debt need to be paid |
09:00:32 | * | CodeVance joined #nim |
09:08:04 | * | arecaceae quit (Ping timeout: 252 seconds) |
09:08:31 | * | gb00s quit (Ping timeout: 265 seconds) |
09:08:41 | * | Elronnd quit (Ping timeout: 276 seconds) |
09:08:41 | * | literal quit (Ping timeout: 276 seconds) |
09:13:24 | * | gb00s joined #nim |
09:19:01 | * | arecaceae joined #nim |
09:19:10 | * | Elronnd joined #nim |
09:29:50 | * | SenasOzys quit (Ping timeout: 245 seconds) |
09:35:58 | * | literal joined #nim |
09:51:59 | * | leorize quit (Quit: WeeChat 2.1) |
10:05:15 | * | CodeVance quit (Ping timeout: 245 seconds) |
10:20:11 | * | SenasOzys joined #nim |
10:38:10 | * | pwntus quit (Remote host closed the connection) |
10:42:53 | * | Shivelight joined #nim |
10:45:46 | PMunch | @dom96, is this supposed to look like this: https://i.imgur.com/uqHIvbw.png |
10:47:44 | PMunch | Would it also be possible to store how many pages I have loaded? It's super annoying having loaded lot's of pages, then click a topic, go back, and have to load all the pages again.. |
10:48:16 | PMunch | Auto-loading when JS is enabled is of course also something that should be considered |
10:48:31 | PMunch | It looks web 2.0, but feels a bit 1.1 |
10:48:50 | dom96 | PMunch: Yeah, that shouldn't happen |
10:51:02 | dom96 | yeah, I can store that. |
10:51:55 | PMunch | To be fair though, pagination might be a better choice |
10:52:11 | PMunch | For example, with nojs do you ever unload topics? |
10:52:30 | PMunch | Or with it for that matter :P |
10:53:05 | PMunch | I remember some site, can't remember which one, which had infinite scrolling but never unloaded content. So it would get slower and slower the further you scrolled :P |
10:53:19 | dom96 | I do |
10:53:35 | PMunch | Even with nojs? |
10:54:45 | PMunch | I still think the search box should at least be a bit darker though.. The way it is now is just distracting.. |
10:57:52 | dom96 | Everyone else seems happy with it though :( |
10:58:32 | PMunch | The search box? |
10:58:37 | dom96 | yeah |
10:59:05 | PMunch | Okay, let me create a topic on the new Nim forums and we can see :) |
10:59:33 | PMunch | Or is that a bit too off-topic.. |
11:01:04 | dom96 | Just reply to the thread I created |
11:01:19 | PMunch | Hmm, it should say when composing a new topic what markdown is supported |
11:01:35 | PMunch | It has message and preview, but no mention of what you can actually do :P |
11:02:06 | dom96 | Yes, somebody else already mentioned this. |
11:02:16 | * | SenasOzys quit (Remote host closed the connection) |
11:02:47 | * | SenasOzys joined #nim |
11:05:48 | PMunch | How do I do links? |
11:06:05 | dom96 | `foo <link>`_ |
11:06:06 | dom96 | it's rst |
11:06:42 | PMunch | Ah right |
11:10:35 | * | SenasOzys quit (Ping timeout: 240 seconds) |
11:18:55 | * | elrood joined #nim |
11:20:43 | FromGitter | <tim-st> anyone has an idea why my cmp proc is slower inside algorithm.sort than when using normal compares in a loop of nearly same amount? Both times in sort and loop comparison I used both my own and the system.cmp and for sort it's always 3.5 times slower and on loop it's always 1.1 times slower |
11:24:42 | Araq | indirect proc calls hurting the optimizer? |
11:25:56 | FromGitter | <tim-st> I called s.sort(cmp=cmp) and s.sort(cmp=myProc) |
11:27:48 | Araq | PMunch, seriously, what the heck is wrong with the search bar? it's hardly noticable to me |
11:30:44 | PMunch | It's too contrasting |
11:31:14 | PMunch | It was literally the first thing I noticed when I opened the forum (and no, I'm not using literally to mean figuratively here) |
11:33:43 | PMunch | And just imagine a dark theme with that bright-white search bar there, yuck! |
11:34:48 | PMunch | Speaking of which, I updated my post here with a dark theme proposal: https://forum.nim-lang.org/t/3834#23936 |
11:41:06 | * | SenasOzys joined #nim |
11:41:26 | Araq | PMunch, just create a PR then please |
11:44:45 | PMunch | Hmm, then I have to set everything up so I can test it. That'll have to wait until I'm off from work at least.. |
11:45:36 | Araq | and that is why depdendencies are so annoying, but yep, please help out |
12:01:40 | * | CodeVance joined #nim |
12:08:08 | * | pwntus joined #nim |
12:11:01 | * | sz0 quit (Quit: Connection closed for inactivity) |
12:11:13 | * | CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
12:13:57 | FromGitter | <mratsim> @tim-st use a template and inject the comparison … procvar cannot be inlined. |
12:14:32 | FromGitter | <mratsim> similar to what `mapIt` does in `sequtils` |
12:15:14 | FromGitter | <tim-st> @mratsim very good to know, thank you 👍 |
12:19:02 | * | noonien joined #nim |
12:19:47 | FromGitter | <tim-st> that makes me ask if the compiler couldnt do this automatically, or is it needed to write {.inline.}? |
12:21:21 | * | floppydh quit (Quit: WeeChat 2.1) |
12:21:36 | FromGitter | <tim-st> at least the slowdown factor is not too bad, just was interested |
12:24:03 | FromGitter | <mratsim> it won’t work, you can’t have higher order proc |
12:24:37 | FromGitter | <mratsim> basically to pass a proc as a param, you need to pass a pointer to the memory location of the proc. |
12:25:00 | FromGitter | <mratsim> and then when it’s called insie another proc, the code will jump at that location. |
12:25:03 | FromGitter | <tim-st> oh, ok, I thought calling s.sort(cmp=myProc) can be rewritten to s.sort() and then be edited on the source |
12:25:17 | FromGitter | <mratsim> you can’t have inline higher order proc* |
12:26:39 | FromGitter | <mratsim> there might be a way for the Nim compiler to inline automatically higher-order proc but since templates do that quite well I think that can wait. |
12:26:59 | FromGitter | <tim-st> ok, thanks |
12:29:09 | * | leorize joined #nim |
12:31:05 | * | Snircle joined #nim |
12:33:22 | * | Guest_ joined #nim |
12:34:05 | Guest_ | Hello, is there a way to pause/yield from a function to resume it next call? |
12:34:46 | FromGitter | <mratsim> @Guest_ use a closure iterator |
12:35:24 | FromGitter | <tim-st> there is an additional way shown in `unicode.fastRuneAt` |
12:35:59 | FromGitter | <tim-st> (that's semantically the same as an iterator) |
12:36:37 | FromGitter | <mratsim> https://nim-by-example.github.io/for_iterators/ see here search for closure iterator |
12:38:01 | FromGitter | <tim-st> but this is one of the things I miss most in nim, because most people only ship an iterator and not an addtional template to achieving "pausing" |
12:38:27 | * | MonsterAbyss_ quit (Ping timeout: 240 seconds) |
12:38:31 | Guest_ | Thanks, I didn't think I can use an iterator as a normal function, I was using a state machine to do this |
12:38:39 | * | floppydh joined #nim |
12:39:06 | FromGitter | <tim-st> I think that's always possible (but maybe I'm wrong) |
12:39:20 | FromGitter | <matrixbot> `ehmry` what is the `{.benign.}`macro for? |
12:43:32 | FromGitter | <mratsim> this reminds me of this comment in Nim JSON state machine, saying that it would be nice to have better coroutines: https://github.com/nim-lang/Nim/blob/master/lib/pure/json.nim#L475-L480 |
12:44:50 | FromGitter | <mratsim> I suppose internally the closure iterators are implemented as a state machine but I could be wrong. |
12:58:51 | Araq | they are. |
12:59:30 | * | athenot joined #nim |
13:04:32 | * | athenot quit (Ping timeout: 276 seconds) |
13:05:47 | * | athenot joined #nim |
13:07:59 | Guest_ | I tried Closure Iterators and they seem to fit the bill but for some reason finished() detects finishing one call too late and it prints a 0 (or the value of the unassigned variable) before bailing out, is that intentional? |
13:09:34 | Guest_ | wait let me confirm that |
13:14:30 | Guest_ | nvm, it works fine, I need to use finished() after the call not before, it is an interesting way to do it and is a lot cleaner than adding states manually |
13:17:52 | * | couven92 quit (Quit: Client disconnecting) |
13:30:50 | * | Guest_ quit (Ping timeout: 260 seconds) |
13:35:15 | * | floppydh quit (Remote host closed the connection) |
13:36:07 | * | floppydh joined #nim |
13:49:10 | * | pwntus quit (Changing host) |
13:49:10 | * | pwntus joined #nim |
13:50:14 | * | smt joined #nim |
13:59:30 | * | CodeVance joined #nim |
14:04:12 | FromGitter | <7sDream> Any idea about this PR? https://github.com/nim-lang/Nim/pull/7869 ⏎ How can I make a template parameter don't be expanded temporarily? |
14:06:25 | FromGitter | <mratsim> If you find how, tell me =), I want that also for this: https://github.com/numforge/number-theory/blob/master/src/modular_arithmetic.nim#L128-L142 (I could use system.`+` on my case though so not as blocking as you) |
14:13:34 | * | gokr quit (Ping timeout: 264 seconds) |
14:14:30 | * | xkapastel joined #nim |
14:17:15 | * | yglukhov[i] joined #nim |
14:20:09 | * | CodeVance quit (Read error: Connection reset by peer) |
14:20:42 | * | CodeVance joined #nim |
14:36:06 | PMunch | dom96, any idea why c2nim complains about a missing ; on line 36, position 25 of this file: http://ix.io/1bhe/ ? |
14:36:30 | dom96 | _XFUNCPROTOBEGIN |
14:37:01 | PMunch | Uhm, what? |
14:37:28 | dom96 | #def it |
14:37:31 | dom96 | or #define it |
14:37:57 | * | floppydh quit (Quit: WeeChat 2.1) |
14:41:22 | PMunch | It's been way too long since I've written header files.. |
14:42:49 | dom96 | So I'm thinking of submitting a Show HN: for NimForum |
14:43:00 | dom96 | Any thoughts on what else I should write in the readme? https://github.com/nim-lang/nimforum#readme |
14:44:57 | PMunch | Maybe something about what is actually supported? |
14:46:05 | dom96 | Okay, I'll add a "Features" section |
14:46:56 | livcd | but you already missed the golden time! |
14:47:19 | dom96 | heh |
14:47:20 | dom96 | oh well |
14:47:29 | dom96 | I'll give it a try anyway |
14:48:44 | livcd | i would upvote but i got banned recently |
14:48:44 | * | onionhammer quit (Read error: Connection reset by peer) |
14:50:56 | * | onionhammer joined #nim |
14:51:23 | * | yglukhov_ joined #nim |
14:52:46 | * | alpha1220 joined #nim |
14:53:26 | dom96 | livcd: uhh ohh, why? |
14:53:45 | * | yglukhov[i] quit (Ping timeout: 260 seconds) |
14:54:13 | alpha1220 | Araq: I see on github that the newruntime is marked for v1. Does that mean that it is going to be the default for v1? Yay if yes! :D |
14:56:35 | * | alpha1220 quit (Client Quit) |
15:07:55 | dom96 | I added some features https://github.com/nim-lang/nimforum#features |
15:15:15 | PMunch | Does anyone here know of a xtst binding in Nim? |
15:17:13 | * | endragor joined #nim |
15:31:58 | dom96 | Okay, I submitted to HN |
15:32:21 | PMunch | Link? |
15:32:50 | dom96 | Check /newest |
15:33:29 | * | gokr joined #nim |
15:39:50 | dom96 | ooh 4 points |
15:40:17 | * | MyMind quit (Ping timeout: 248 seconds) |
15:41:05 | * | gokr quit (Ping timeout: 245 seconds) |
15:41:32 | dom96 | PMunch: Btw you shouldn't need to click "load more" as much anymore |
15:41:50 | dom96 | I fixed it so that it discards threads by banned users |
15:41:55 | dom96 | We've already had some nice spam :D |
15:42:40 | Yardanico | dom96 I have an account on HN only for upvoting Nim posts (if someone posts a HN post related to Nim here), I don't read articles posted on HN at all :D |
15:42:51 | Yardanico | I mean I just don't use HN |
15:42:58 | dom96 | You should probably use it a little |
15:43:07 | dom96 | I bet there is an algorithm that checks for this |
15:43:24 | dom96 | so upvote some other things too :) |
15:44:46 | federico3 | lobste.rs sounds like an alternative |
15:45:19 | Yardanico | lobsters looks a bit nicer :) |
15:45:30 | dom96 | sure, it's nice but it doesn't get anywhere as much traffic |
15:46:50 | Yardanico | wow https://forum.nim-lang.org/t/3849 |
15:47:10 | Yardanico | this man has a lot of dedication (he made 2 videos about his two nim libraries) |
15:47:16 | FromDiscord | <r00ster> the version after 0.19: will it be 1.0 or 0.20? |
15:47:42 | dom96 | We don't know yet |
15:47:55 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:48:11 | dom96 | Yardanico: Yeah, but he also says that Nim transpiles to C |
15:48:32 | dom96 | But awesome videos anyway :) |
15:48:46 | PMunch | dom96, it doesn't auto-load for me :( |
15:48:57 | dom96 | PMunch: What doesn't? |
15:49:08 | PMunch | The forum posts |
15:49:14 | PMunch | Or was that only comments? |
15:49:18 | dom96 | huh |
15:49:32 | dom96 | I didn't change the load logic |
15:49:39 | dom96 | I just ensured that more threads are loaded by default |
15:50:30 | PMunch | Oh |
15:52:43 | Yardanico | dom96 another small bug - https://github.com/nim-lang/nimforum/issues/135 (small because you can just log out and reset your password) |
15:52:56 | * | dzho joined #nim |
15:55:22 | dom96 | ahh, thanks for reporting |
15:55:54 | * | some-user joined #nim |
15:56:04 | Yardanico | It should probably check - if user is logged in, don't check for captcha (but this may not be the right way) |
15:57:06 | * | endragor quit (Remote host closed the connection) |
15:57:09 | * | some-user left #nim (#nim) |
15:57:12 | dom96 | Yes, there is code for this, but I didn't test it recently |
15:57:24 | * | mostly-harmless quit (Ping timeout: 260 seconds) |
16:01:37 | * | gokr joined #nim |
16:02:07 | FromGitter | <tim-st> @dom96 in `auth` there is `rand` call without calling `randomize` before, not had a deeper look at it, but could be a problem |
16:02:33 | Yardanico | @tim-st https://github.com/nim-lang/nimforum/search?q=randomize&unscoped_q=randomize |
16:02:36 | * | some-use` joined #nim |
16:02:49 | Yardanico | randomize() doesn't need to be called by each module |
16:02:55 | dom96 | yeah, the forum likely uses /dev/random anyway |
16:02:59 | Yardanico | (if you use default random state) |
16:03:17 | Yardanico | it only needs to be called once anywhere in the program |
16:03:19 | dom96 | I need to move this code into a separate package |
16:04:27 | FromGitter | <tim-st> Not sure, if it's good to call it only one time in the lifetime; I would think all other calls are linear based on the first randomization (but maybe I'm wrong) |
16:05:14 | Yardanico | it uses xoroshiro128+ algo |
16:05:43 | Yardanico | (just fyi) |
16:07:16 | FromGitter | <tim-st> I dont think it's important which algo follows (unless it's real random which doesnt exist) |
16:08:39 | * | PMunch quit (Quit: Leaving) |
16:09:31 | * | jxy quit (Quit: leaving) |
16:10:28 | FromGitter | <mratsim> @dom96 I can’t find the nim post on HN |
16:10:54 | Yardanico | https://news.ycombinator.com/item?id=17144974 |
16:10:56 | dom96 | it's already gone off the first page of /newest |
16:11:13 | dom96 | https://news.ycombinator.com/shownew |
16:11:17 | FromGitter | <mratsim> it’s not even in the first 180 items ... |
16:11:43 | dom96 | I see it here https://news.ycombinator.com/newest?next=17145014&n=61 |
16:11:54 | dom96 | Is it invisible to you? |
16:11:54 | FromGitter | <tim-st> another problem: a hash which consists out of (salt, password) can and will generate duplicates for users having same password |
16:12:12 | FromGitter | <mratsim> salt is supposed to be random |
16:12:17 | dom96 | no it won't, each user has a different salt |
16:13:00 | FromGitter | <tim-st> at least it's md5 :D |
16:13:07 | dom96 | it's not... |
16:13:09 | dom96 | it's bcrypt |
16:14:13 | FromGitter | <tim-st> `result = hash(getMD5(salt & getMD5(password)), bcryptSalt)` |
16:16:14 | dom96 | hash == bcrypt.hash |
16:16:24 | dom96 | the md5 is for backwards compatibility |
16:16:43 | FromGitter | <mratsim> md5 is incredibad ... |
16:16:48 | * | Trustable joined #nim |
16:17:08 | FromGitter | <mratsim> Google rainbow tables —> crack any md5 based password in a few seconds, max 1 day |
16:17:25 | Yardanico | but hash == bcrypt.hash |
16:17:43 | dom96 | Is HN shadow banning my posts? :( |
16:20:21 | FromGitter | <tim-st> is name == user_name on forum? |
16:21:25 | Yardanico | afaik yes |
16:21:37 | Yardanico | and yeah, actually I think it should be changed |
16:21:43 | Yardanico | (but it's not a high priority) |
16:22:00 | Yardanico | so every user will have a login and display name - he can't change his login but can easily change his display name |
16:22:21 | Yardanico | and all his posts will be stored under his login or id |
16:22:29 | FromGitter | <tim-st> what I saw: assumption: name can be chosen as a mail address and I chose your mail address as username; than the following hacks your account: |
16:22:42 | FromGitter | <tim-st> https://github.com/nim-lang/nimforum/blob/5f198a35db2b046550a0f47178cc006a1feb7a34/src/forum.nim#L91 |
16:23:11 | * | Vladar quit (Remote host closed the connection) |
16:23:37 | Yardanico | let me actually try that :D |
16:23:39 | * | Vladar joined #nim |
16:23:39 | FromGitter | <tim-st> well not hacks; but I can reset your password^^ |
16:23:48 | FromGitter | <tim-st> you will get the mail always like I want^^ |
16:24:36 | Yardanico | @tim-st no, you couldn't create an account with email in name |
16:24:59 | Yardanico | I just tried that :) |
16:25:03 | FromGitter | <tim-st> ok, luck^^ |
16:25:20 | FromGitter | <tim-st> it's good that evera user has an own salt |
16:25:25 | FromGitter | <tim-st> *everay |
16:26:34 | dom96 | lol |
16:26:38 | dom96 | Nice try |
16:27:18 | FromGitter | <tim-st> I will have a deeper look into it maybe; then I will find a vuln |
16:28:09 | Yardanico | But if you find a real one, please PM dom96 here or on gitter and don't write it in public :) |
16:28:42 | FromGitter | <tim-st> ok, you're right |
16:29:09 | dom96 | Yeah, please. |
16:29:12 | FromGitter | <tim-st> I found a high prio one at google but they ignored |
16:29:22 | dom96 | Interesting. The new forum's database is smaller than the old's |
16:29:31 | dom96 | Probably because I removed a redundant field |
16:30:34 | dom96 | I'm gonna email HN |
16:33:10 | * | jxy joined #nim |
16:33:40 | FromGitter | <mratsim> By the way, the world is in great need of a Disqus alternative: https://demo.graphcomment.com/en/graphcomment-demo/ I like GraphComment but an OpenSource one would be even better :) |
16:37:58 | * | some-use` quit (Ping timeout: 252 seconds) |
16:39:53 | FromGitter | <mratsim> @dom96 I missed it, it was just buried |
16:40:11 | FromGitter | <mratsim> went back in history and saw the post at position 49 |
16:40:15 | dom96 | It's still odd that it's not on /show |
16:40:24 | dom96 | I emailed them to ask them why |
16:49:41 | * | athenot joined #nim |
16:53:53 | * | sendell quit (Remote host closed the connection) |
16:54:57 | * | gokr quit (Ping timeout: 248 seconds) |
16:57:20 | * | jxy quit (Quit: leaving) |
16:57:53 | * | jxy joined #nim |
17:02:49 | FromGitter | <krux02> hmm, what does that error mean: main.nim(961, 36) Error: cannot instantiate ArrayBufferView ⏎ got: <MyVertexType, Vec4f> ⏎ but expected: <S, T> ⏎ ⏎ ``` Error: Execution failed with exit code 1``` [https://gitter.im/nim-lang/Nim?at=5b06f039d96cfd743eba65ce] |
17:06:09 | FromGitter | <krux02> I am instanciating a generic type with types that I got with getTypeInstl |
17:08:25 | * | DarkArctic quit (Read error: Connection reset by peer) |
17:09:49 | federico3 | and no '); DROP TABLES; on the live forum please :) |
17:10:51 | Yardanico | dom96 has backups for forum :)_ |
17:11:12 | federico3 | mratsim: like https://github.com/posativ/isso ? |
17:12:21 | FromGitter | <mratsim> not bad |
17:12:31 | federico3 | not very good either |
17:14:14 | * | icebattle quit (Quit: leaving) |
17:26:31 | * | yglukhov_ quit (Read error: Connection reset by peer) |
17:27:07 | * | yglukhov[i] joined #nim |
17:27:52 | FromGitter | <7sDream> https://nim-lang.org/docs/asyncfutures.html ⏎ https://nim-lang.org/docs/asyncstreams.html ⏎ ⏎ Why thoose module has no document online? [https://gitter.im/nim-lang/Nim?at=5b06f6183759c406277a1269] |
17:29:01 | FromGitter | <7sDream> https://i.loli.net/2018/05/25/5b06f64440038.png ⏎ there are links for them, but broken |
17:30:51 | * | icebattle joined #nim |
17:31:09 | FromGitter | <7sDream> so people can't find document of `Future` or `asyncCheck` etc |
17:31:10 | FromGitter | <krux02> I just created an issue with the bug |
17:31:22 | FromGitter | <krux02> it's sad that therer are just too many bugs |
17:31:28 | FromGitter | <7sDream> 👌 |
17:31:34 | * | athenot_ joined #nim |
17:31:56 | * | athenot quit (Read error: Connection reset by peer) |
17:32:56 | FromGitter | <7sDream> However, still love Nim :P |
17:33:29 | Yardanico | @7sDream AFAIK this one is fixed in devel |
17:33:33 | FromGitter | <krux02> Nim is great no question. But these bugs :/ |
17:33:54 | Yardanico | https://github.com/nim-lang/Nim/issues/7438 |
17:34:17 | shashlick | for https://github.com/nim-lang/Nim/issues/7874, isn't it sufficient to check whether a .nim file date is newer than the output .c file before recompiling? |
17:34:32 | Yardanico | and fix https://github.com/nim-lang/Nim/pull/7445 |
17:34:39 | Yardanico | shashlick no |
17:37:37 | Yardanico | how will nim get type info and other things from this file then (if nim compiler doesn't process it)? |
17:38:41 | FromGitter | <7sDream> So the online document can only be fixed when next version release? |
17:39:26 | Yardanico | yes, because docs are only made for official releases |
17:39:38 | Yardanico | well, you can create docs yourself |
17:39:57 | Yardanico | I mean generate them :) |
17:40:25 | FromGitter | <7sDream> OK |
17:52:48 | * | elrood quit (Quit: Leaving) |
17:53:25 | * | Trustable quit (Remote host closed the connection) |
17:55:47 | FromDiscord | <treeform> or just use the source code as docs 😃 |
18:00:04 | FromGitter | <7sDream> yes, use VSCode jump to source code as doc |
18:08:07 | shashlick | Yardanico: how about some details :P |
18:09:21 | Yardanico | shashlick well, I'm not really into compiler stuff, you may ask Araq (IIRC he answered almost the same question like 4-7 months ago, but I can't find it) |
18:09:39 | shashlick | cool |
18:10:31 | * | gokr joined #nim |
18:10:55 | shashlick | might be cool to have a daily nim build posted online along with documentation - do you think that might be useful? |
18:11:01 | Yardanico | yeah, of course |
18:11:11 | Yardanico | there used to be a build farm |
18:15:00 | * | NimBot joined #nim |
18:27:59 | FromDiscord | <daw> Hey, I'm trying to use nim to make a c library for the esp32 using the esp-idf skd |
18:28:40 | FromDiscord | <daw> I'v compiled my nim source code to c using this: |
18:28:40 | FromDiscord | <daw> ``` |
18:28:41 | FromDiscord | <daw> nim c -c --gc:none --os:standalone --deadCodeElim:on --noMain --stackTrace:off --lineT |
18:28:41 | FromDiscord | <daw> race:off --profiler:off --app:staticlib --symbolFiles:off --noLinking greetings.nim |
18:28:41 | FromDiscord | <daw> ``` |
18:29:17 | FromDiscord | <daw> I'v compiled my nim source code to c using this: |
18:29:17 | FromDiscord | <daw> ``` |
18:29:17 | FromDiscord | <daw> nim c -c |
18:29:18 | FromDiscord | <daw> --gc:none |
18:29:18 | FromDiscord | <daw> --os:standalone |
18:29:18 | FromDiscord | <daw> --deadCodeElim:on |
18:29:18 | FromDiscord | <daw> --noMain |
18:29:19 | FromDiscord | <daw> --stackTrace:off |
18:29:20 | FromDiscord | <daw> --lineTrace:off |
18:29:21 | FromDiscord | <daw> --profiler:off |
18:29:22 | Yardanico | oh wow |
18:29:23 | FromDiscord | <daw> --app:staticlib |
18:29:24 | FromDiscord | <daw> --symbolFiles:off |
18:29:25 | FromDiscord | <daw> --noLinking |
18:29:26 | FromDiscord | <daw> greetings.nim |
18:29:28 | FromDiscord | <daw> ``` |
18:29:41 | dom96 | daw: You're spamming our IRC channel, please use gist or some other pastebin |
18:29:48 | dom96 | (Discord is linked to our IRC) |
18:29:58 | dom96 | Shouldn't FromDiscord handle this case? |
18:30:05 | Yardanico | well, how? |
18:30:11 | * | Vladar quit (Ping timeout: 252 seconds) |
18:30:20 | dom96 | Just like FromGitter ? |
18:30:39 | Yardanico | then I would have to write FromDiscord myself (for now it uses another program as you know) |
18:30:52 | * | dawww joined #nim |
18:30:55 | oprypin | how hard is discord api? |
18:30:58 | FromDiscord | <daw> ah, sorry did not realize that |
18:31:07 | dom96 | daw: no worries, you couldn't have known |
18:31:24 | dom96 | Yardanico: Why doesn't the program handle this? |
18:31:27 | oprypin | also: why do you even bother with discord :o |
18:31:35 | dom96 | It seems like the most fundamental feature of a relay |
18:31:36 | Yardanico | oprypin well, it seems that people use it :P |
18:31:49 | oprypin | so you just tell them to not use it, problem solved |
18:32:03 | oprypin | dom96, but can you link to a discord message as easily as you can link to gitter? |
18:32:20 | dom96 | Good question |
18:32:26 | FromDiscord | <daw> I'm now trying to include the generated c code into my program and compile it |
18:32:27 | dom96 | Even if not, it shouldn't spam the channel |
18:33:00 | FromDiscord | <daw> but I can't find "nimbase.h" |
18:33:16 | dom96 | daw: that should be in $nim/lib somewhere |
18:33:28 | dom96 | Where $nim is where your Nim is installed |
18:34:17 | FromDiscord | <daw> if I do `which nim` it points to `.nimble/bin/. I've installed nim with `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` |
18:35:02 | dom96 | ~/.choosenim/toolchains |
18:35:05 | FromDiscord | <daw> ohh I've found it it's inside `.choosenim` |
18:35:14 | FromDiscord | <daw> thanks |
18:35:39 | Yardanico | dom96 I can set "MessageDelay" |
18:35:45 | Yardanico | #Delay in milliseconds between each message send to the IRC server |
18:36:53 | * | dawww quit (Quit: Page closed) |
18:37:20 | dom96 | That won't help |
18:38:04 | shashlick | dom96: there's some issue with streams.readStr() that breaks untar as well as the choosenim tester |
18:38:21 | Yardanico | well how should it be fixed then? the only way I'm thinking of (which will work for all services) - create own program which will automatically create a paste for multi-line (e.g. for more than 3 lines) code embeds |
18:38:27 | shashlick | i'm not able to recreate a simpler test case for an issue but it works fine on 0.18.0, fails on #head |
18:38:51 | dom96 | Yardanico: I suppose that's the only way |
18:39:00 | dom96 | Really surprised that this relay bot doesn't have this |
18:39:33 | dom96 | shashlick: Probably the breaking change that means accessing ""[0] now causes an exception |
18:39:46 | FromDiscord | <daw> Ok, now I'm getting `size of array 'Nim_and_C_compiler_disagree_on_target_architecture' is negative` which is the main question I wanted to ask. Which architectures does nim support and is it possible/is it hard to add one? |
18:39:51 | shashlick | dom96: https://pastebin.com/d2uUt8GA |
18:40:27 | shashlick | daw: which version of nim did you download - 32 or 64-bit |
18:41:33 | dom96 | daw: It's pretty simple https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L189 |
18:41:44 | dom96 | Check out the history of this file |
18:41:53 | dom96 | You'll see how platforms were added |
18:42:33 | dom96 | shashlick: Yes. That's it |
18:42:40 | FromDiscord | <daw> 64 bit but I'm trying to compile the generated c code with `xtensa-esp32-elf-gcc` which is for the xtensa architecture |
18:43:19 | Yardanico | dom96 well, I can't really find any discord-irc bridges supporting this. and also - it seems that you can actually use a webhook on discord side and "spoof" irc users (so they will be displayed as normal users in discord) |
18:43:22 | dom96 | daw: the error you're getting suggests that Nim isn't calling `xtensa-esp32-elf-gcc` |
18:43:29 | shashlick | dom96: okay i'll push some PRs |
18:43:53 | dom96 | daw: or that it's using your system's CPU |
18:43:59 | FromDiscord | <daw> Should nim call xtensa-esp32-elf-gcc when compiling its source code to c? |
18:44:07 | dom96 | You need to specify one via --cpu |
18:44:28 | dom96 | Nim calls a C compiler automatically |
18:44:37 | dom96 | unless you're asking it only to translate to C |
18:44:50 | Yardanico | well, I was a bit lying |
18:45:15 | FromDiscord | <daw> I'm only translating it to c, I believe, with `nim c -c` |
18:45:39 | Yardanico | there's https://github.com/Headline/Discord-IRC-Relay but it's in C# and only uses 'hastebin' for code (or other) blocks |
18:45:49 | dom96 | daw: then I guess you're missing a --cpu fla |
18:45:51 | dom96 | *flag |
18:46:25 | dom96 | daw: you can pick the closest in that list I linked you to |
18:46:56 | dom96 | Yardanico: Time to write an awesome bridge in Nim :D |
18:47:20 | Yardanico | and it will be async and all that :) |
18:47:37 | Yardanico | (well, I mean async is very good for this use-case) |
18:48:31 | FromDiscord | <daw> thanks @dom96, will try to find one |
18:55:32 | shashlick | how do you do the inline if in nim |
18:56:55 | Yardanico | shashlick inline if? |
18:57:43 | shashlick | a = if cond: "b" else "c" |
18:59:40 | Yardanico | a = if cond: b else: c |
19:00:51 | Yardanico | !eval (let a = if someCond: "1" else: "2"); echo a |
19:00:52 | NimBot | Compile failed: in.nim(1, 13) Error: undeclared identifier: 'someCond' |
19:00:58 | Yardanico | !eval (let a = if true: "1" else: "2"); echo a |
19:01:00 | NimBot | 1 |
19:01:21 | * | rauss quit (Ping timeout: 252 seconds) |
19:02:25 | * | rauss joined #nim |
19:11:06 | shashlick | dom96: the ""[0] bug is here: https://github.com/nim-lang/Nim/blob/85b7d8fcc4032a0d95af3f25faf1cc850f7d59f5/lib/pure/streams.nim#L254 |
19:11:24 | shashlick | but it is to get to the address of the string, how do you fix this? |
19:12:35 | dom96 | There was a recent thread about this https://forum.nim-lang.org/t/3806 |
19:14:33 | Yardanico | dom96 probably related to https://github.com/nim-lang/Nim/issues/7860 |
19:15:05 | dom96 | So highlight shashlick instead of me :P |
19:18:08 | * | noonien quit (Quit: Connection closed for inactivity) |
19:23:45 | * | nsf quit (Quit: WeeChat 2.1) |
19:28:41 | * | Notkea quit (Remote host closed the connection) |
19:28:56 | * | Notkea joined #nim |
19:33:43 | shashlick | those don't really help as far as a solution :( |
19:33:58 | * | oprypin is now known as Guest11714 |
19:33:58 | * | Calinou is now known as Guest62898 |
19:33:58 | * | SunDwarf is now known as Guest52326 |
19:34:05 | * | Amun_Ra is now known as Guest42791 |
19:34:05 | * | acidx is now known as Guest42814 |
19:34:07 | * | pigmej is now known as Guest40451 |
19:34:07 | * | awal is now known as Guest46886 |
19:34:08 | * | mwbrown is now known as Guest79630 |
19:41:57 | * | some-user joined #nim |
19:42:16 | FromGitter | <kayabaNerve> @mratsim You trying to say they stuck with the old tech, they deserve the errors? |
19:42:57 | FromGitter | <kayabaNerve> And I use 32 char salts with multiround bcrypt. |
19:43:20 | FromGitter | <kayabaNerve> MD5 is weak. Should solely be used for file integrity or checking for reposts, if anything. |
19:43:36 | * | Vladar joined #nim |
19:44:01 | FromGitter | <mratsim> It’s not a question of deserving or not. It’s about architecture and decisions. |
19:44:47 | FromGitter | <mratsim> Examples: banks have choosen to stay with COBOL and AS400. Instead of jumping to new tech. Great! |
19:45:34 | FromGitter | <mratsim> Now AS400 specialist are nowhere to be found and they charge a lot |
19:45:47 | FromGitter | <mratsim> specialists* |
19:46:06 | FromGitter | <mratsim> updating anything takes 2 years (if it’s ever approved) |
19:46:18 | FromGitter | <mratsim> workforce turnover is very high |
19:47:33 | FromGitter | <mratsim> You choose new tech, say Nim. Well you have to deal with the bugs, the documentation, the fact that talent is also very rare. |
19:47:45 | FromGitter | <mratsim> or you choose Go :P |
19:47:56 | FromGitter | <mratsim> (or Javascript, Java, PHP …) |
19:48:15 | FromGitter | <mratsim> Facebook is still paying the PHP debt for example |
19:49:29 | * | CodeVance quit (Read error: Connection reset by peer) |
19:49:44 | FromGitter | <mratsim> It probably made sense back when they started instead of riding the jquery bandwagon. I really like this article about innovation and choosing what you might want shiny and what you might want boring - http://mcfunley.com/choose-boring-technology |
19:50:03 | * | copygirl quit (Quit: copygirl) |
19:50:04 | * | Vladar quit (Quit: Leaving) |
19:50:09 | * | koppeh joined #nim |
19:51:14 | FromGitter | <kayabaNerve> I vote we switch the epoch time to 33 bits |
19:51:14 | FromGitter | <kayabaNerve> ez |
19:51:28 | FromGitter | <kayabaNerve> def not requiring a new language type and heavy bitwise ops |
19:51:33 | * | CodeVance joined #nim |
19:55:33 | Yardanico | lol https://github.com/nim-lang/Nim/wiki/Feature-suggestions/_compare/7e9e01f%5E...7e9e01f :) |
19:57:56 | FromGitter | <mratsim> When to release 1.0 is a great example of technical debt that Nim will have to pay btw @kayabaNerve. |
19:58:35 | Yardanico | I'll always be on the "devel" side :) |
19:59:09 | FromGitter | <kayabaNerve> Do I have debt to pay for all the questions I ask? :thinking: |
19:59:19 | FromGitter | <kayabaNerve> IRC and Gitter don't support that. Dammit. |
19:59:32 | FromGitter | <mratsim> :thinking_face: |
19:59:34 | FromGitter | <kayabaNerve> I was hoping Gitter would. |
19:59:44 | FromGitter | <kayabaNerve> Nada |
20:00:00 | FromGitter | <mratsim> some textmoji are converted though :/ |
20:00:47 | Yardanico | 🤔 |
20:10:12 | FromGitter | <mratsim> hah! The force is strong with this one |
20:14:24 | * | Guest42814 is now known as acidx |
20:18:24 | * | nsf joined #nim |
20:20:41 | * | gokr quit (Ping timeout: 256 seconds) |
20:25:22 | * | athenot_ quit (Read error: Connection reset by peer) |
20:26:10 | * | athenot joined #nim |
20:27:23 | * | Guest62898 quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.) |
20:29:00 | * | CodeVance2 joined #nim |
20:29:17 | * | CodeVance quit (Read error: Connection reset by peer) |
20:29:30 | * | sz0 joined #nim |
20:29:47 | * | Calinou joined #nim |
20:29:55 | * | CodeVance2 quit (Read error: Connection reset by peer) |
20:29:56 | * | CodeVance joined #nim |
20:32:24 | * | CodeVance quit (Read error: Connection reset by peer) |
20:33:07 | * | CodeVance joined #nim |
20:35:16 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
20:35:50 | * | yglukhov[i] joined #nim |
20:36:55 | * | CodeVance quit (Read error: Connection reset by peer) |
20:37:23 | * | CodeVance joined #nim |
20:38:37 | * | CodeVance2 joined #nim |
20:39:37 | * | CodeVance3 joined #nim |
20:40:36 | * | CodeVance4 joined #nim |
20:40:41 | * | CodeVance quit (Read error: Connection reset by peer) |
20:41:55 | * | CodeVance joined #nim |
20:42:05 | * | Guest42791 is now known as Amun_Ra |
20:42:23 | * | CodeVance3 quit (Read error: Connection reset by peer) |
20:42:47 | * | CodeVance3 joined #nim |
20:42:49 | * | CodeVance4 quit (Read error: Connection reset by peer) |
20:42:57 | * | CodeVance2 quit (Ping timeout: 264 seconds) |
20:46:25 | * | CodeVance quit (Ping timeout: 248 seconds) |
20:47:55 | * | CodeVance3 quit (Read error: Connection reset by peer) |
20:48:38 | * | CodeVance joined #nim |
20:51:48 | * | CodeVance2 joined #nim |
20:52:03 | * | CodeVance quit (Read error: Connection reset by peer) |
20:53:21 | * | CodeVance3 joined #nim |
20:54:54 | * | CodeVance2 quit (Read error: Connection reset by peer) |
21:05:49 | * | endragor joined #nim |
21:09:25 | FromDiscord | <daw> dom96: I did it, thanks again for the help. Will maybe write a blog post about it 😃 |
21:10:00 | FromDiscord | <daw> In the end I've chosen i386 as the arch since it's the closest one to xtensa-esp32-edf |
21:10:30 | * | nsf quit (Quit: WeeChat 2.1) |
21:10:40 | * | endragor quit (Ping timeout: 260 seconds) |
21:12:56 | * | daw_ joined #nim |
21:13:01 | Araq | how does Nim's .travis file work? |
21:13:09 | * | daw_ quit (Client Quit) |
21:13:19 | Araq | why does it use clang on Linux? |
21:16:47 | * | CodeVance joined #nim |
21:17:35 | * | CodeVance3 quit (Ping timeout: 240 seconds) |
21:26:27 | * | Notkea quit (Remote host closed the connection) |
21:26:49 | * | Notkea joined #nim |
21:29:58 | Yardanico | Araq wait what? |
21:30:30 | Araq | sed -i -e 's,cc = gcc,cc = clang,' config/nim.cfg |
21:30:39 | Araq | I probably misread this line :P |
21:36:53 | federico3 | a macro to set a field by name on an arbitrary object? |
21:47:34 | FromGitter | <Vindaar> @federico3: something like this https://gist.github.com/Vindaar/dba0158d0b1b52caa0704b0de1e43eb9 ? |
21:48:00 | shashlick | dom96: https://github.com/dom96/untar/pull/3 |
21:48:00 | federico3 | Vindaar: looks like - thanks |
21:54:23 | federico3 | Vindaar: yet, can the field name be a variable? |
21:54:43 | federico3 | probably not - it has to be known at compile time |
21:55:10 | FromGitter | <Vindaar> yep, exactly |
21:56:48 | FromGitter | <data-man> @shashlick: Thanks! I'm surprised that a file size is octal based. :) |
22:00:11 | shashlick | :D |
22:03:35 | * | koppeh is now known as copygirl |
22:03:42 | FromGitter | <kayabaNerve> Binary = 1 bit ⏎ Octal = 1 bytes ⏎ Hexadecimal = 2 bytes ⏎ Base58 = human usable compression ⏎ Base64 = barely human usable compression ... [https://gitter.im/nim-lang/Nim?at=5b0736be2942532e42dd04a7] |
22:04:49 | FromGitter | <kayabaNerve> Sumerians and Babylonians? They were smart. Base 60 |
22:09:14 | FromGitter | <data-man> @kayabaNerve: The tar format was invented by octopuses, long ago. |
22:14:22 | FromGitter | <kayabaNerve> What about Turoctocrabs though |
22:14:28 | FromGitter | <kayabaNerve> https://i.imgur.com/v5Rs5Ma.jpg |
22:15:17 | shashlick | dom96: https://github.com/dom96/choosenim/pull/62 |
22:20:37 | FromGitter | <data-man> @dom96: I think that to have only 'likes' on the forum is not entirely correct. We also need 'dislikes', as on GitHub. |
22:26:39 | FromGitter | <Varriount> Pmunch: Tumblr does that |
22:29:38 | FromGitter | <Varriount> @dom96 Is the new forum running behind nginx ? |
22:31:56 | shashlick | need help fixing streams.nim - how do you change the addr(result[r]) call without having to resort to concatenation? https://github.com/nim-lang/Nim/blob/4ed24aa3eb78ba4ff55aac3008ec3c2427776e50/lib/pure/streams.nim#L110 |
22:35:06 | * | anon667 joined #nim |
22:35:36 | * | smt` joined #nim |
22:37:00 | anon667 | Hi, was wondering if anybody has a step by step guide on installing Nim + VS Code + MingW on a Win10 machine that works from the get go? |
22:37:45 | * | smt quit (Ping timeout: 245 seconds) |
22:38:53 | * | anon667 quit (Client Quit) |
22:39:22 | shashlick | anon667: do you want 32-bit or 64-bit |
22:39:30 | * | smt joined #nim |
22:40:36 | * | smt` quit (Ping timeout: 252 seconds) |
22:47:20 | FromGitter | <Varriount> shashlick: Why do you want to change the implementation? Safety? |
22:47:49 | shashlick | varriount: doesn't work anymore with latest devel |
22:48:03 | shashlick | you cannot do addr(string[0]) if string = "" |
22:48:49 | FromGitter | <Varriount> shashlick: But that procedure calls `result = newString(bufferSize)` |
22:49:11 | * | smt quit (Read error: Connection reset by peer) |
22:49:22 | FromGitter | <Varriount> Since bufferSize is 1000, the string doesn't equal `""` |
22:49:32 | * | smt joined #nim |
22:50:39 | FromGitter | <Varriount> Though, it could theoretically be made more safe (and just as efficient) by creating a set of procedures that leverage toOpenArray |
22:51:47 | * | xet7 quit (Quit: Leaving) |
22:56:27 | * | CodeVance quit (Read error: Connection reset by peer) |
22:56:36 | shashlick | okay, maybe i don't need any fixes in streams, just choosenim tester |
23:01:33 | FromGitter | <data-man> @shashlick: Check with this, please: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b07444c60209a1187e03c59] |
23:03:34 | shashlick | thanks data-man |
23:03:39 | shashlick | i'm struggling to repro though |
23:03:50 | * | xkapastel quit (Quit: Connection closed for inactivity) |
23:03:56 | shashlick | when i try to untar without readStr() fixes, it crashes for me on #head |
23:04:58 | shashlick | https://pastebin.com/cRwjCAu8 |
23:05:10 | shashlick | but if I just try reading a file stream with readStr, it works just fine |
23:05:41 | shashlick | I just change `addr(string(result)[0])` => `cstring(result)` |
23:05:52 | shashlick | to get it to work with untar |
23:06:11 | shashlick | i don't have a consistent way of crashing streams besides untar at this point |
23:06:29 | shashlick | so not sure if readAll() needs a fix, but it seems like it might |
23:08:04 | FromGitter | <data-man> It seems that readAll is not tested in the tests to read a files. |
23:09:46 | shashlick | line 99 fails in untar: https://github.com/dom96/untar/blob/a5a16aac6cb40249deaf2d5cb43d4b3ac18f81f2/src/untar.nim#L99 |
23:10:34 | shashlick | rather it is the caller for readStr() which fails as in the paste |
23:10:47 | FromGitter | <kayabaNerve> VS Code + Mingw? |
23:10:48 | FromGitter | <kayabaNerve> What |
23:13:58 | shashlick | data-man: I could change readAll() with just `addr(result[r])` => `cast[pointer](cast[int](result.cstring)+r)` |
23:14:09 | shashlick | ugly as hell but hmm |
23:19:13 | FromGitter | <kayabaNerve> shashclick: why do you hate society |
23:25:22 | FromGitter | <data-man> @shashlick: So, don't use readStr. Use readData. |
23:27:17 | FromGitter | <data-man> And add TTarHeader type. |
23:27:35 | shashlick | I want to understand why it is crashing in the first place |
23:31:12 | FromGitter | <data-man> Just place ```echo``` in the right places. :) |
23:35:41 | * | some-user quit (Ping timeout: 276 seconds) |
23:46:21 | * | gokr joined #nim |