<< 28-05-2018 >>

00:34:49*Electrux quit (Ping timeout: 256 seconds)
00:36:33*jzeus quit (Remote host closed the connection)
00:39:26*Electrux joined #nim
00:41:17*athenot joined #nim
00:43:53*Electrux quit (Ping timeout: 256 seconds)
00:47:45*athenot quit (Ping timeout: 245 seconds)
00:48:24*Electrux joined #nim
00:52:27*Electrux quit (Ping timeout: 240 seconds)
01:09:26*Electrux joined #nim
01:13:56*Electrux quit (Ping timeout: 268 seconds)
01:19:23*Electrux joined #nim
01:23:50*Electrux quit (Ping timeout: 252 seconds)
01:30:20*rockcavera joined #nim
01:48:25*Electrux joined #nim
01:53:05*Electrux quit (Ping timeout: 260 seconds)
02:19:43*leorize joined #nim
02:24:46*leorize quit (Quit: WeeChat 2.1)
02:26:50*Electrux joined #nim
02:51:57*Electrux quit (Ping timeout: 240 seconds)
02:55:37FromGitter<kayabaNerve> Question: Can I not name my operator `/R`?
02:55:54FromGitter<kayabaNerve> Because it looks like I can't but I would like to confirm
02:55:59*rockcavera quit (Read error: Connection reset by peer)
02:56:46*FuntDobra joined #nim
02:57:35*rockcavera joined #nim
02:57:36*rockcavera quit (Changing host)
02:57:36*rockcavera joined #nim
02:58:26*Electrux joined #nim
02:58:37skrylari wouldn't say "no overhead" @araq. there can still be some converting back from cstrings, and there is some cruft here and there to manage the GC, but it's really quite low overhead
02:58:55skrylarand if one is doing a very good job, having to map bit flags to sets
02:59:12skrylardata-man: tup is great until it doesn't like you, then tup is unusable
02:59:43*rockcavera quit (Read error: Connection reset by peer)
03:00:57skrylari love tup in a sense that getting a new project going is super painless, but it doesn't like caches of any sort. so things like LaTeX piss it off greatly and you are forced to delete the nimcache directory (slower compiles; much unenjoyed)
03:02:20skrylari think it also doesn't get along super well with ccache, though i think there are "certain" directories that up is willing to ignore because ex. ccache already takes paranoid care not to corrupt the build
03:02:43*onionhammer quit (Ping timeout: 256 seconds)
03:03:10*Electrux quit (Ping timeout: 256 seconds)
03:04:37*rockcavera joined #nim
03:07:25FromGitter<kayabaNerve> I will just not use /R
03:07:35FromGitter<kayabaNerve> RIP division with remainder
03:07:39FromGitter<kayabaNerve> It is now //
03:08:39skrylari'm not sure what the rules are for naming operators
03:09:00skrylaryou might be able to use `/R` but then it must be quoted in every usage?
03:09:21skrylaradmittedly even smalltalk doesn't like /r, though it likes any sequence of random sigils
03:17:30*endragor joined #nim
03:30:16*find0x90 joined #nim
03:32:04*FuntDobra quit (Ping timeout: 256 seconds)
03:34:11*skrylar quit (Remote host closed the connection)
03:48:27*Electrux joined #nim
03:53:20*Electrux quit (Ping timeout: 260 seconds)
03:56:33*SenasOzys joined #nim
03:59:26*Electrux joined #nim
04:01:26*SenasOzys quit (Remote host closed the connection)
04:03:35*Electrux quit (Ping timeout: 245 seconds)
04:08:26*Electrux joined #nim
04:12:59*Electrux quit (Ping timeout: 256 seconds)
04:18:24*Electrux joined #nim
04:20:17*find0x90 quit (Quit: find0x90)
04:22:27*Electrux quit (Ping timeout: 240 seconds)
04:22:51*find0x90 joined #nim
04:28:25*Electrux joined #nim
04:31:57*Lord_Nightmare quit (Ping timeout: 252 seconds)
04:33:00*Electrux quit (Ping timeout: 260 seconds)
04:38:02*Lord_Nightmare joined #nim
04:38:24*Electrux joined #nim
04:41:34*leorize1 joined #nim
04:42:45*Electrux quit (Ping timeout: 245 seconds)
04:43:01*find0x90 quit (Quit: find0x90)
04:51:00*xkapastel quit (Quit: Connection closed for inactivity)
04:58:26*Electrux joined #nim
05:03:20*Electrux quit (Ping timeout: 268 seconds)
05:08:26*Electrux joined #nim
05:13:12*Electrux quit (Ping timeout: 268 seconds)
05:19:24*Electrux joined #nim
05:23:35*Electrux quit (Ping timeout: 245 seconds)
05:26:25shashlick64-bit and binary build support for choosenim - reviews appreciated => https://github.com/dom96/choosenim/pull/63
05:37:43*nsf joined #nim
06:14:15FromGitter<alehander42> I don't believe people torrenting a programming book are really someone you want to go after , I wouldn't blame them (easy to say when I am not the author I guess)
06:16:06FromGitter<alehander42> wouldn't `/R` clash with `var R .. echo 5/R` etc ?
06:50:27*rockcavera quit (Remote host closed the connection)
06:55:24*rockcavera joined #nim
07:03:09*FuntDobra joined #nim
07:09:25*Vladar joined #nim
07:15:06*couven92 joined #nim
07:21:05*FuntDobra quit (Ping timeout: 240 seconds)
07:32:32*FuntDobra joined #nim
07:40:47*yglukhov[i] joined #nim
07:57:32*FuntDobra quit (Remote host closed the connection)
07:57:56*FuntDobra joined #nim
08:02:55*Vladar quit (Quit: Leaving)
08:04:36*gmpreussner_ quit (Ping timeout: 252 seconds)
08:05:20*gmpreussner joined #nim
08:06:57*Vladar joined #nim
08:09:04*xet7 joined #nim
08:20:18*sendell joined #nim
08:27:18*Electrux joined #nim
08:35:12*Electrux quit (Ping timeout: 245 seconds)
08:36:41*yglukhov[i] quit (Remote host closed the connection)
08:38:39*Electrux joined #nim
08:53:44FromGitter<mratsim> @skrylar, was away this weekend. I checked arrayfire but to be honest I find the API too clunky for research
08:57:29*yglukhov[i] joined #nim
09:04:00*Electrux quit (Ping timeout: 252 seconds)
09:08:27*Electrux joined #nim
09:25:50*Vladar quit (Quit: Leaving)
09:30:33*Vladar joined #nim
09:35:03*arecaceae quit (Remote host closed the connection)
09:35:28*arecaceae joined #nim
09:42:17*Electrux quit (Ping timeout: 245 seconds)
09:45:08dom96shashlick: Thanks. I understand you meant well with those comments on the PR, but they're just distracting to me.
09:53:10*Vladar quit (Read error: Connection reset by peer)
09:54:40Yardanicooh, I think we may need a small (but useful) feature for the forum
09:55:00Yardanicoability for topic creator (or for moderator/admin) to add [SOLVED] to the title of the thread
09:55:06Yardanicobecause there's a lot of threads with questions
09:55:10*der joined #nim
09:55:15Yardanicolike https://forum.nim-lang.org/t/3865
09:57:30*Vladar joined #nim
09:58:03dom96That's lame. I'd rather give them the ability to mark the post that contains the solution ;)
09:59:32*^GaveUp^ joined #nim
10:00:21Yardanicodom96 yeah
10:00:29Yardanicowow! https://github.com/status-im/nim-chronicles
10:01:16*Jipok[m] quit (*.net *.split)
10:01:17*zielmicha[m]1 quit (*.net *.split)
10:01:17*macsek1911[m] quit (*.net *.split)
10:01:17*derlafff quit (*.net *.split)
10:01:17*GaveUp quit (*.net *.split)
10:01:21*^GaveUp^ is now known as GaveUp
10:02:10*Vladar quit (Client Quit)
10:02:57FromGitter<data-man> ⓈⓄⓁⓋⒺⒹ
10:03:45*cornfeedhobo quit (Ping timeout: 260 seconds)
10:04:56YardanicoLOL
10:07:43*FuntDobra quit (Ping timeout: 256 seconds)
10:08:28*Jipok[m] joined #nim
10:08:28*macsek1911[m] joined #nim
10:08:34FromGitter<alehander42> it looks like the DNA
10:09:56*Vladar joined #nim
10:10:48*zielmicha[m]1 joined #nim
10:24:32*cornfeedhobo joined #nim
10:27:05*FuntDobra joined #nim
10:32:35*Electrux joined #nim
10:41:50*sendell quit (Remote host closed the connection)
10:47:02*Electrux quit (Ping timeout: 276 seconds)
10:48:53*Electrux joined #nim
11:01:02*SenasOzys joined #nim
11:01:27Yardanico@zah is there a way to remove "thread" from arguments (in chronicles library)?
11:01:31*SenasOzys quit (Remote host closed the connection)
11:01:35YardanicoOverall I like this library very very much, it's great
11:15:45*FuntDobra quit (Ping timeout: 248 seconds)
11:19:12*floppydh joined #nim
11:23:02*FuntDobra joined #nim
11:31:36*xkapastel joined #nim
11:45:35*leorize1 is now known as leorize
11:47:44*Vladar quit (Remote host closed the connection)
11:48:18*Vladar joined #nim
11:56:18Electruxhello, i successfully made an expression evaluator ( infix->postfix->evaluation ), is there any chance u guys could review it? i would really like to know if the code matches the style of code here and if there are some optimizations that can be performed...
11:56:47YardanicoElectrux is it for math expressions?
11:57:03Electruxyea... the a + b - c * ( d - e ) etc
11:57:05YardanicoElectrux if so, I can look at the code :)
11:57:13YardanicoElectrux and you can use numbers, right?
11:57:19Electruxyep
11:57:25Electruxit gives the correct result
11:57:31YardanicoElectrux because I've written this - https://github.com/Yardanico/nim-mathexpr (but it's a recursive descent)
11:57:42YardanicoI was too lazy to write a infix->postfix->evaluation
11:57:53YardanicoElectrux you can share the code here, or better - create a repository
11:58:01Yardanicowell, I mean "here" - via gist
11:58:06Electruxwow... it is not as expansive as ur library :O
11:58:22Electruxok i'll just create a repository for all my nim code haha :D
11:58:43*athenot joined #nim
12:00:26*yglukhov[i] quit (Remote host closed the connection)
12:00:54*athenot_ joined #nim
12:02:04FromGitter<brechtm> I can't seem to find any documentation on the {.passL.} macro
12:02:38FromGitter<brechtm> nm, it's a pragma, not macro
12:03:22*athenot quit (Ping timeout: 265 seconds)
12:04:25FromGitter<ephja> pragmas are either built-ins or macros, btw
12:04:46Electruxok here we go https://github.com/Electrux/Nim-Code/tree/master/ExpressionEvaluation
12:05:34*yglukhov[i] joined #nim
12:05:50YardanicoElectrux well, first thing I immediately saw - don't use spaces around []
12:05:52Electruxoh and please don't mind the ridiculous amounts of spaces please...
12:05:57Yardanicoah ,ok :)
12:06:23Electruxlol sorry... i shall not use it anymore... it was the last thing i used so much spaces in
12:06:38Electruxand that's when u told me the guidelines :)
12:10:01YardanicoElectrux also - it's preferred to use lowercase filenames
12:10:09Yardanicosnake_case filenames :)
12:10:38Electruxoh ok... i'll rename everything :)
12:11:43dom96The filenames are fine I think
12:11:53dom96We all use lowercase but I actually like these more :)
12:12:01dom96You should definitely wrap at 80 characters per line though
12:12:25dom96also, don't even name your variables with an uppercase letter
12:12:26dom96only types
12:12:49dom96and use camelCase everywhere instead of snake_case
12:12:55dom96for function names etc
12:13:58Electruxok so variables are completely lowercase
12:14:14Electruxright?
12:15:30Electruxand in that case, i will stick to PascalCase for file names
12:15:57*athenot_ quit (Remote host closed the connection)
12:16:15YardanicoElectrux variables are camelCase
12:16:25*athenot joined #nim
12:16:30YardanicoElectrux constants can be camelCase or PascalCase
12:16:56Electruxoh ok... then variables, functions: camelCase; constants: PascalCase... yea?
12:17:49Yardanicoconstants are camelCase usually, PascalCase - only if you like it :)
12:19:41Electruxok :)
12:20:47*DarkArctic joined #nim
12:21:43*yglukhov[i] quit (Remote host closed the connection)
12:22:43YardanicoElectrux but yeah, your code is pretty good. btw - it doesn't handle spaces, e.g. "1 + 2 3 + 4" would be evaluated as "1 + 23 + 4" :)
12:23:03*DarkArctic_ joined #nim
12:25:09YardanicoI want to be honest - I based my recursive descent parser/evaluator on a stackoverflow answer written in Java :)
12:25:43YardanicoI also experimented with creating parsed expressions instead of computing the result, but I didn't see any usefulness in it :)
12:27:07*DarkArctic quit (Ping timeout: 256 seconds)
12:29:37*DarkArctic_ quit (Quit: Leaving)
12:29:54*DarkArctic joined #nim
12:30:15Electruxactually, it does handle space
12:30:36Electruxbut the result is wrong if the there is no operation with space
12:34:26Electruxso 1 + 2 3 gives result 5... because the postfix is 1 2 3 + and addition occurs on 2 and 3... the result is the top element of stack which is 5, so result comes 5
12:44:50*yglukhov[i] joined #nim
12:45:26*yglukhov[i] quit (Client Quit)
12:45:45Electruxso how is it? improvements in code perhaps ( performance/optimization wise )? Yardanico
12:50:57*Vladar quit (Quit: Leaving)
12:52:12*Snircle joined #nim
12:53:04*athenot quit (Ping timeout: 256 seconds)
13:11:01*find0x90 joined #nim
13:14:49*smt quit (Ping timeout: 252 seconds)
13:19:04*find0x90 quit (Quit: find0x90)
13:25:35*find0x90 joined #nim
13:26:47*athenot joined #nim
13:29:28*FuntDobra quit (Ping timeout: 252 seconds)
13:30:21*FuntDobra joined #nim
13:42:19*zahary joined #nim
13:42:27FromGitter<Vindaar> Hey! :) I'm a little confused. Shouldn't the following work just fine? I'm getting a compile error for line 15. ⏎ https://gist.github.com/Vindaar/221abd45f59c00b515bc3cc9d9ae59e7
13:42:46FromGitter<Vindaar> Is it because a `char` is just an integer in principle?
13:43:15FromGitter<Vindaar> I just defined `BitArray`as an object with a `data` field now, which works as expected. But this still confused me
13:45:13FromGitter<zah> @Vindaar, the problem is that you have used `char` literals when specifying the range type of your array. `'0'..'1'` should have been `0..1` or just `bool`
13:46:31FromGitter<zah> well, you may also want to pack these bits in a smarter way by using a different underlying type for the array
13:47:21FromGitter<Vindaar> @zah Oh, thanks! I thought I tried it using a bool yesterday and it didn't work either. Tried again and that does indeed work.
13:47:32*Vladar joined #nim
13:47:36FromGitter<Vindaar> Yes, this is not going to be very efficient, haha
13:49:01FromGitter<Vindaar> I actually just started using https://github.com/onecodex/nim-bitarray yesterday. But I ended up getting some weird GC related segfaults
13:49:27FromGitter<Vindaar> so I just went ahead and did a really trivial BitArray implementation to see whether I still get segfaults (which I do...)
13:54:10FromGitter<zah> Just a wild guess, do you happen to mix C and Nim in your projects?
13:55:16FromGitter<Vindaar> I'm writing a small library Nim library to parse some binary data, which I call from a Python library. And yeah, that's probably where the GC issues stem from
13:55:26*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:56:52FromGitter<Vindaar> I'm not entirely sure, if I should always turn off the GC for such a dynamic library though?
13:57:06*onionhammer joined #nim
13:58:45*endragor quit (Remote host closed the connection)
13:59:30FromGitter<zah> In any thread where Nim code will be executing, you must call `initStackBottom`. I see that it's not currently exported from the system module though, there must have been a change in the public API
14:04:01*FuntDobra quit (Ping timeout: 256 seconds)
14:10:53FromGitter<Vindaar> Ah, I see! I don't quite get the code of `initStackBottom` tbh. Is there any documentation around about what to take care of when writing shared libraries?
14:13:41*endragor joined #nim
14:13:46FromGitter<zah> Perhaps these were never exported and I only remember having intentions to export them. You can try to create a new proc in the system module with the following body: ⏎ ⏎ ```proc initNimThread* = ⏎ initStackBottom() ⏎ initGC()``` ⏎ ⏎ Then call this proc as the very first thing you do after loading the Nim library (make sure there aren't any unnecessary functions in your call stack).
14:13:46FromGitter... [https://gitter.im/nim-lang/Nim?at=5b0c0e9a99fa7f4c0625fe03]
14:14:12FromGitter<Vindaar> ok, thanks, I'll give it a try! :)
14:17:39FromGitter<zah> I'm also assuming that you are compiling the lib with `d:useNimRtl`
14:18:04FromGitter<Vindaar> Which I didn't do so far, because I had no idea I should :)
14:18:14*endragor quit (Ping timeout: 252 seconds)
14:20:42FromGitter<zah> You'll have to add the `rtl` pragma to the new proc as well: `proc initNimThread {.rtl.} = ...`
14:20:51FromGitter<zah> Read the notes about nimRtl here: https://nim-lang.org/docs/nimc.html#dll-generation
14:21:18FromGitter<Vindaar> woah, the segfault is gone :O (without the `rtl` though). Thanks, will read that!
14:22:16FromGitter<zah> Cool, you should create a pull request for this after you've tested it for few more days :)
14:24:08FromGitter<Vindaar> Yeah, I'll try to come up with a simple example to reproduce the segfault as a reference. Then I'll do that. Thanks again!
14:24:40FromGitter<krux02> Araq: ping?
14:26:41FromGitter<Vindaar> So regarding the RTL. The link says that `nimrtl.dll` will contain the GC, which the shared library will link against. And if I don't do that the GC will be part of the shared library itself, which can cause problems?
14:28:37zaharyit will cause problem if you end up using more than one libraries dependent on Nim
14:29:37FromGitter<krux02> zahary: that should not be the case
14:31:48FromGitter<krux02> and yea that is one of the bigger reasons that I don't like GC
14:35:44FromGitter<krux02> getting ident anywhere in a typed node sucks
14:38:10FromGitter<Vindaar> Ok, for now I'll just accept that there might be cases where that becomes a problem, hehe. Thanks again :)
14:41:13*leorize quit (Quit: WeeChat 2.1)
14:46:01FromGitter<krux02> I have a blocking bug in Nim
14:46:32FromDiscord<r00ster> you should report it on github issues
14:46:48*leorize joined #nim
14:49:14FromGitter<krux02> I already did
14:49:21FromGitter<krux02> but too many people are reporting bugs
14:49:47FromGitter<krux02> I did it a long time ago
14:50:34FromGitter<krux02> it is jus that now it becase a blocking issue
14:50:45FromGitter<krux02> it seems I have to fix it, but I would need help to do it
14:58:59*Electrux quit (Ping timeout: 256 seconds)
15:00:10*Electrux joined #nim
15:04:01*Vladar quit (Quit: Leaving)
15:08:21*Electrux quit (Ping timeout: 240 seconds)
15:13:48*Electrux joined #nim
15:16:26*Vladar joined #nim
15:18:03*find0x90 quit (Quit: find0x90)
15:26:42*find0x90 joined #nim
15:27:15*find0x90 quit (Client Quit)
15:34:57*find0x90 joined #nim
15:37:51*Electrux quit (Ping timeout: 240 seconds)
15:38:43shashlickdom96: ya I realized afterwards that the pull request becomes rather messy after the comments. Perhaps it's easier on the diff page.
15:38:56shashlickDid you have any concerns with the PR
15:40:13*Electrux joined #nim
15:46:53*smt joined #nim
16:02:36*find0x90 quit (Quit: find0x90)
16:10:53*floppydh quit (Quit: WeeChat 2.1)
16:11:27*nsf quit (Quit: WeeChat 2.1)
16:16:13*Trustable joined #nim
16:16:27*leorize quit (Quit: WeeChat 2.1)
16:18:55planetis[m]this prometheus thing, is it spam?
16:20:12FromGitter<kayabaNerve> Eh. Maybe.
16:20:21FromGitter<kayabaNerve> I was looking for Nim devs.
16:20:29FromGitter<kayabaNerve> A Nim forum has nim devs.
16:20:30*find0x90 joined #nim
16:20:45FromGitter<kayabaNerve> We went for the cryptic marketing angle. That may have been a bad decision.
16:21:03FromGitter<kayabaNerve> Make your own decision. ;p
16:21:19planetis[m]ohh lol
16:22:34FromGitter<kayabaNerve> The Medium article explains it and says we need Nim devs. That said, it is a link off. Not on the forums.
16:23:20FromGitter<Varriount> @kayabaNerve It probably doesn't help that there's already a company doing cryptocurrency stuff with Nim. :/
16:23:45FromGitter<kayabaNerve> I don't think that matters
16:24:01FromGitter<kayabaNerve> And you mean Stasis?
16:24:06FromGitter<Varriount> Yes
16:24:53FromGitter<kayabaNerve> I never said we were the first or only group. I never said us using Nim was a big deal. I just said we needed Nim devs and posted on the Nim forums.
16:25:24FromGitter<zetashift> Isn't it called Status? Also more job opportunities ain't never bad.
16:25:42FromGitter<kayabaNerve> Yep. Autocorrect typo
16:25:43FromGitter<kayabaNerve> Sorry
16:25:51*Vladar quit (Quit: Leaving)
16:26:16FromGitter<kayabaNerve> Status IM. It's an Ethereum based chat service... to say the least.
16:26:35FromGitter<zetashift> No problem, the site http://www.prometheusproject.io/ ain't working so I can't find more info at first glance, maybe that's why people think it looks off?
16:27:28FromGitter<kayabaNerve> Because it doesn't exist?
16:27:31FromGitter<kayabaNerve> We only setup email?
16:27:33FromGitter<zetashift> oh haha
16:27:48FromGitter<kayabaNerve> And it'll be https://prometheusproject.io Not http or www
16:27:54FromGitter<zetashift> I didn't know! Usually these things are accompanied with fancy websites ;P
16:28:25FromGitter<kayabaNerve> And usually provide very little actual content
16:28:48FromGitter<kayabaNerve> I'm for getting shit done, not marketing...
16:29:00FromGitter<kayabaNerve> I'm not saying we shouldn't have a good website
16:29:04FromGitter<zetashift> yes, that Medium article had surprisingly less fluff and buzzwords than most ones I read
16:29:08FromGitter<kayabaNerve> Just saying it wasn't my priority
16:29:33FromGitter<kayabaNerve> Yeah. I also explained my understanding of the tech (unlike the piece of crap knon as Stone)
16:29:46FromGitter<kayabaNerve> And I didn't throw out 1000 Milliom TPS *estimated
16:29:56FromGitter<kayabaNerve> Didn't talk about price or ask for money
16:31:47FromGitter<kayabaNerve> Stone proved they knew the basics of ZKSnarks. It can't be applied to an instant currency effectively though.
16:32:39FromGitter<kayabaNerve> It takes literal seconds on a Desktop to generate. It doesn't even have to generate it multiple times to meet a difficulty. the calculations to do it once are just that intensive.
16:33:13FromGitter<zetashift> My cryptology-fu ain't that strong. I only did a basic one in Go months ago, so you lost me at zksnaks ;(
16:33:32FromGitter<kayabaNerve> It's a privacy thingy
16:33:48FromGitter<kayabaNerve> Zero Knowledge Prroof
16:34:08FromGitter<kayabaNerve> Without looking at a script, or seeing how the script was executed, you can verify it
16:34:21FromGitter<kayabaNerve> Script = TX in this case
16:34:22*Electrux quit (Ping timeout: 245 seconds)
16:35:09shashlickWhere is this link to Prometheus
16:35:16FromGitter<kayabaNerve> It's like getting a package, being told it contains a laptop with 10 million BTCs, being able to verify it without opening, shaking, measuring, viewing the sender, viewing who you pass it off to...
16:35:29FromGitter<kayabaNerve> https://medium.com/@PrometheusProj/the-prometheus-project-b2d2900b2e9
16:36:36*Electrux joined #nim
16:37:13shashlickNice
16:37:20FromGitter<kayabaNerve> Can I say I was asked for it and unable to PM him as we're on two different platforms? :P We should move back over to Nim talk a bit...
16:37:22FromGitter<kayabaNerve> Thanks
16:37:37FromGitter<kayabaNerve> I still miss my `\R` operator :(
16:38:34shashlickBeen working on wrapping libarchive
16:38:51FromGitter<kayabaNerve> Cool! Make it a Nimble package?
16:39:00shashlickHave some issues with the c code generated
16:39:13FromGitter<kayabaNerve> Ah
16:39:58FromGitter<kayabaNerve> I'll try to make some Nimble packages later... Base58/Hex, imath wrapper, Lyra2, SHA512...
16:40:16FromGitter<kayabaNerve> I've gotten quite a few while working
16:40:51FromGitter<kayabaNerve> imath is a signed unlimited int library. @mratsim has one too but it doesn't work on stable.
16:41:10FromGitter<kayabaNerve> Mratsim/Status
16:42:09FromGitter<kayabaNerve> shashlick: Is the issue with the structs?
16:43:50FromGitter<zetashift> Aren't most nimmers on dev instead of stable release though?
16:44:20FromGitter<kayabaNerve> I'm not
16:44:29FromGitter<kayabaNerve> I don't think most new people are
16:45:16FromGitter<kayabaNerve> And it's not good practice to always be on stable for a programming language that has an old feature get repurposed/broken/changed every week.
16:45:40FromGitter<kayabaNerve> I guess updated is the right term
16:46:38FromGitter<kayabaNerve> *I wouldn't call it good practice to
16:51:54FromGitter<krux02> aaaaaaaaaarg: glslTranslate.nim(155, 6) Error: VM problem: too many registers required
16:52:14FromGitter<krux02> I need to do what I need to do
16:52:18FromGitter<krux02> and the VM won't let me
16:54:35FromGitter<krux02> I add an if condition and what happens?
16:54:44FromGitter<krux02> "too many registers required"
16:56:49*Trustable quit (Remote host closed the connection)
16:58:26shashlickkayabaNerve: yep, let me share what i have
17:00:22FromGitter<data-man> @krux02: https://github.com/nim-lang/Nim/blob/devel/compiler/vmdef.nim#L23 ⏎ ```range[0..255]``` -> ```range[0..4095]```???
17:01:03FromGitter<GULPF> @data-man that range can't be easily changed
17:01:20FromGitter<GULPF> with the current design, the register id must fit in a byte
17:01:36FromGitter<GULPF> iirc
17:01:51shashlickkayabaNerve: https://github.com/genotrance/nimarchive
17:01:53shashlickdoesn't work yet
17:02:15shashlickgit clone; nimble install -y; nimble test
17:03:01shashlickhttps://pastebin.com/1ubLbv7n - the generated C does not compile
17:03:27FromGitter<data-man> @GULPF: Yes, I saw.
17:05:30FromGitter<kayabaNerve> This is a README, config file, and nimble file
17:05:39FromGitter<kayabaNerve> There is no source in that repo shashclick
17:05:59FromGitter<kayabaNerve> *and a .gitignore to be fair
17:06:55FromGitter<kayabaNerve> 1) shashlick
17:07:14FromGitter<kayabaNerve> Damn Gitter/IRC boundary. Doesn't autocomplete names for me :(
17:14:15shashlickit uses nimgen which downloads and generates the source
17:14:33shashlickso when you do nimble install, after cloning, it will download libarchive source from github
17:14:50shashlickcheck out nimgen if you are interested - https://github.com/genotrance/nimgen
17:20:32FromGitter<krux02> @data-man yea it would solve it for my computer, but practically it would make it impossible for anybody else to use it
17:20:42FromGitter<krux02> but yea I think that is my only option
17:28:00FromGitter<kayabaNerve> Got it
17:28:17FromGitter<kayabaNerve> shashlick: You have to do struct * in C
17:28:22FromGitter<kayabaNerve> 1) being the name of the struct
17:28:30FromGitter<kayabaNerve> So if I have struct address {}
17:28:51FromGitter<kayabaNerve> I can't do address a, b; I must do struct address a, b;
17:29:02FromGitter<kayabaNerve> That's the root of the issue as far as I can tell
17:33:16FromGitter<data-man> @krux02: I think to adapt VM to ```TInstr: uint``` isn't very hard. So for x64 platform, the number of registers will be increased. But haven't tried it. :)
17:44:10*find0x90 quit (Quit: find0x90)
17:46:07FromGitter<krux02> @data-man do you know why the amount of registers is so tiny?
17:46:17FromGitter<krux02> and what is consuming the registers?
17:46:44FromGitter<krux02> I wrote an if expression (no new local variable) and the compilation crashed
17:52:16*endragor joined #nim
17:53:11FromGitter<data-man> @krux02: Because TInstr is uint32: ⏎ ⏎ ```XXXXXXXX ⏎ rCrBrAop``` ⏎ ⏎ So № register can't be > 255 [https://gitter.im/nim-lang/Nim?at=5b0c4207a45f930a65e03146]
17:55:52*find0x90 joined #nim
17:58:08FromGitter<data-man> Maybe like this: ⏎ ⏎ ```TInstr* = tuple ⏎ op: TOpcode ⏎ regA: uint16 ⏎ regB: uint16 ⏎ regC: uint16``` [https://gitter.im/nim-lang/Nim?at=5b0c4330016ae21a4ceea463]
17:58:30FromGitter<data-man> It's RFC :)
18:05:36FromGitter<krux02> what is RFC?
18:05:57*Lord_Nightmare quit (Ping timeout: 252 seconds)
18:06:03*Lord_Nightmare2 joined #nim
18:06:28FromGitter<data-man> For increasing count of registers.
18:07:01*Lord_Nightmare2 is now known as Lord_Nightmare
18:07:03FromGitter<data-man> Request For Change
18:07:39FromGitter<krux02> can I vote for it somewhere?
18:07:46FromGitter<krux02> And where is Araq?
18:07:51FromGitter<krux02> I haven't seen him today
18:08:25FromGitter<krux02> well anyway I have to go
18:08:29FromGitter<kayabaNerve> What's the difference between a cuint and hint?
18:08:33FromGitter<data-man> No, not created yet.
18:08:37FromGitter<kayabaNerve> *uint
18:09:05FromGitter<krux02> well cuint is whatever type "unsiged int" in c is
18:09:19FromGitter<r00ster91> cuint is an unsigned integer in C (you should use it when you make a binding) and uint is just the normal unsigned integer
18:09:19FromGitter<kayabaNerve> Yep
18:09:36FromGitter<kayabaNerve> I know that. I'm asking the difference.
18:09:46FromGitter<krux02> don't use cxxx types at all when you don't write a C wrapper
18:09:50FromGitter<krux02> just ignore them
18:10:04FromGitter<krux02> and when you write a c wrapper, try to make it clean of cxxx types
18:10:23FromGitter<krux02> cuint can be 16 or 32 bit
18:10:34FromGitter<kayabaNerve> I know all this.
18:10:36FromGitter<krux02> uint can be 32 or 64 bit
18:10:46FromGitter<krux02> cuint can't be 64 bit
18:10:52FromGitter<kayabaNerve> Got it
18:10:56FromGitter<krux02> technically it can be 64 bit but it isn't
18:11:06FromGitter<kayabaNerve> Even if unsigned int is 64 bit by default?
18:11:21FromGitter<krux02> yes
18:11:27*nsf joined #nim
18:11:29FromGitter<krux02> cuint is the c type
18:11:30shashlickkayabaNerve: isn't creating the structure the Nim compilers job
18:11:37FromGitter<krux02> and c is wonky sized
18:11:49FromGitter<krux02> that is the worst part of C
18:12:00FromGitter<krux02> the builtin types all have no fixed size
18:12:31FromGitter<krux02> don't use any builtin types when you write c code, ever at all
18:12:50FromGitter<krux02> always use uint8_t int32_t in c etc
18:13:10FromGitter<krux02> but yea, I have to go for today, bye
18:22:59*CodeVance joined #nim
18:23:00*endragor quit (Remote host closed the connection)
18:25:00*find0x90 quit (Quit: find0x90)
18:35:13FromGitter<kayabaNerve> shashlick: Apparently not correctly
18:35:35FromGitter<kayabaNerve> Edit the nim cache, try it, and then compile that. I could be wrong
18:38:27shashlickYa I'm not in front of the computer, hard to tell right now
18:39:16shashlickI am not using cmake so it's possible just compiling directly using Nim compile pragma might not be working correctly
18:40:32shashlicklibarchive u6s pretty feature rich so bring able to nimble install and compile it in will be really cool
18:41:12shashlickMy concern though is that it has a long list for cmake detection so I might not make it portable enough
18:41:47shashlickI need to add the ability to call cmake, configure and similar build tools thru nimgen
18:42:19shashlickCompletely abstract it for easy consumption in Nim
18:42:52FromGitter<data-man> cmake created config.h for libarchive
18:45:37FromGitter<genotrance> Ya I've made a mini one for Windows, see nimarchive.cfg
18:46:08shashlickhttps://github.com/genotrance/nimarchive
18:46:46shashlickgit clone; nimble install -y; nimble test
18:47:29shashlickI think I'll tinker a bit and if it doesn't work correctly on Windows and Linux, I'll just add cmake etc to nimgen
18:48:00shashlickAdd a feather to the NimCompression org, what say
18:48:22*CodeVance quit (Quit: Leaving.)
18:49:48FromGitter<data-man> https://gitter.im/NimCompression/Lobby Welcome to chat! :)
18:52:20shashlickJust joined the org, got deleted from my email somehow
18:52:47shashlickdata-man: is there an irc channel bridged?
18:53:38FromGitter<data-man> No.
18:54:25FromGitter<data-man> I don't know how do it. :)
18:54:35Yardanicoit's easy
18:55:18YardanicoBut you'll need to ask oprypin to set up a bridge for you or use his app on your server :)
18:56:16Yardanico@data-man also - why don't you use IRC? :)
18:56:37FromGitter<data-man> I like gitter :)
18:56:39shashlickI've joined, can you send a message there so that I get it on my weechat
19:21:05*xkapastel quit (Quit: Connection closed for inactivity)
19:26:39Yardanico@data-man but it's harder for us (guys on IRC) to go to gitter links to see full code and messages (if they're long) :P
19:32:01*Ven`` joined #nim
19:33:59*Elronnd is now known as Elronnd\srn
19:35:26*Ven` joined #nim
19:35:34*Ven`` quit (Read error: Connection reset by peer)
19:42:37*Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:44:38FromGitter<data-man> @Yardanico: Solve this problem, if you can. You will do it for yourself. :-D
19:44:45Yardanico?
19:45:15YardanicoIt's generally a problem for any <insert modern solution to messaging> - IRC bridge
19:45:26Yardanicobecause IRC doesn't natively support code snippets, images, etc
19:53:30*Electrux quit (Ping timeout: 260 seconds)
19:59:11FromGitter<kinkinkijkin> oof, the gles bindings are kind of old
20:06:41*DarkArctic_ joined #nim
20:07:13*Electrux joined #nim
20:11:00*DarkArctic quit (Ping timeout: 260 seconds)
20:11:35*Electrux quit (Ping timeout: 260 seconds)
20:12:21*DarkArctic_ quit (Ping timeout: 240 seconds)
20:20:17*xkapastel joined #nim
20:27:11*Electrux joined #nim
20:32:02*Electrux quit (Ping timeout: 268 seconds)
20:37:11*Electrux joined #nim
20:41:27*Electrux quit (Ping timeout: 240 seconds)
20:47:00*vivus joined #nim
20:48:13*Electrux joined #nim
20:52:21*Electrux quit (Ping timeout: 240 seconds)
20:53:49*nsf quit (Quit: WeeChat 2.1)
20:57:11*Electrux joined #nim
21:01:39*Electrux quit (Ping timeout: 256 seconds)
21:07:12*Electrux joined #nim
21:11:27*Electrux quit (Ping timeout: 240 seconds)
21:27:12*Electrux joined #nim
21:32:10*Electrux quit (Ping timeout: 264 seconds)
21:44:20*jjido joined #nim
21:47:10*NimBot joined #nim
21:48:09*Electrux joined #nim
21:49:23*xet7 quit (Remote host closed the connection)
21:50:15*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:52:35*Electrux quit (Ping timeout: 240 seconds)
21:53:42*find0x90 joined #nim
21:56:32*find0x90 quit (Client Quit)
21:59:39*sz0 joined #nim
22:07:11*Electrux joined #nim
22:11:55*Electrux quit (Ping timeout: 256 seconds)
22:17:11*Electrux joined #nim
22:21:33*Electrux quit (Ping timeout: 256 seconds)
22:38:11*Electrux joined #nim
22:42:31*Electrux quit (Ping timeout: 256 seconds)
22:58:19*Electrux joined #nim
23:03:21*Electrux quit (Ping timeout: 240 seconds)
23:08:10*Electrux joined #nim
23:12:33*Electrux quit (Ping timeout: 256 seconds)
23:18:10*Electrux joined #nim
23:22:21*Electrux quit (Ping timeout: 240 seconds)
23:33:29*find0x90 joined #nim
23:36:56*find0x90 quit (Client Quit)
23:38:10*Electrux joined #nim
23:42:35*Electrux quit (Ping timeout: 256 seconds)
23:44:44*find0x90 joined #nim
23:47:13*Electrux joined #nim
23:52:05*Electrux quit (Ping timeout: 260 seconds)
23:57:12*Electrux joined #nim