<< 31-05-2018 >>

00:00:29*craigger joined #nim
00:07:12*craigger quit (Quit: bye)
00:09:33*craigger joined #nim
02:00:33*mwbrown quit (Ping timeout: 248 seconds)
02:21:52*mwbrown joined #nim
02:32:13*mwbrown quit (Read error: Connection timed out)
02:32:31*mwbrown joined #nim
02:36:54*Electrux joined #nim
02:56:33*thomasross joined #nim
02:59:42*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:18:26*endragor joined #nim
03:38:36shashlickwell I want to be able to extract the existing nim installers posted on nim-lang if possible
03:42:22FromGitter<data-man> Maybe replace installers to 7z self-extracted installers?
03:44:08*lainon joined #nim
03:46:36shashlickit would be easier to simply convert those to .zip files and upload, my latest PR supports binary builds on Windows - https://github.com/dom96/choosenim/pull/63
03:46:58shashlickwonder if dom96 is open to that idea
03:47:46FromGitter<data-man> Araq likes 7z :)
03:58:05shashlickThen we will have to replace untar with nimarchive, then we can extract 7z
03:58:53shashlickI want both choosenim and finish to download the same mingw 7z package
03:59:45FromGitter<data-man> Yes, I propose exactly it.
04:00:16shashlickFinish does the 7z today but that's because the zip contains the 7z binary, choosenim only supports tar gz xz so has its own mingw tar gz it has to download
04:00:35FromGitter<data-man> Can you check nimarchive with 7z installers?
04:00:39shashlickBut first need to get nimarchive to work on Mac and be more robust
04:00:52shashlickSure, will try shortly, why?
04:01:18FromGitter<data-man> Why "why"? :)
04:02:47shashlickWhy post as exe instead of as 7z? So that people who download don't need to have 7zip?
04:02:59shashlickWe don't post an installer anymore
04:03:02FromGitter<data-man> Oh, libarchive configured on Mac may not support .exe!
04:04:19FromGitter<data-man> exe-installers are convenient on Windows. For some users. :)
04:05:16FromGitter<putao88> Has anyone ever used NimData?
04:05:28FromGitter<data-man> Yes.
04:06:30shashlickZip is safest
04:06:41FromGitter<putao88> (https://files.gitter.im/nim-lang/Nim/Blw1/image.png)
04:06:52FromGitter<putao88> I have this problem, I don't know why?
04:06:52shashlickBut you'd expect devs to be able to figure out 7z
04:07:41shashlickThey are checking [0] mostly
04:07:59shashlickFor empty string
04:08:14*endragor quit (Remote host closed the connection)
04:08:49*endragor joined #nim
04:10:44FromGitter<data-man> @putao88: I assume that you have incorrectly set a scheme, but the screenshot is almost useless for solving the problem.
04:11:01FromGitter<Varriount> @putao88 How are you defining your schema?
04:12:38shashlickputao88: a snippet to reproduce will help
04:12:57*endragor quit (Ping timeout: 240 seconds)
04:13:45FromGitter<putao88> const schema = [strCol("billing_id"),strCol("zhifubao"),strCol("zhifubaoAccount"),strCol("time"),strCol("in_amount"),strCol("out_amount"),strCol("balance"),strCol("mark"),strCol("trade_type"),strCol("date"),strCol("note")] ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b0f7679352b9e1a4b47d29c]
04:14:38FromGitter<putao88> like this
04:15:09FromGitter<data-man> Has all.csv a headers?
04:16:15shashlickhttps://github.com/bluenote10/NimData/blob/master/src/nimdata/schema_parser.nim#L96 <= need to change that line
04:17:18FromGitter<putao88> @data-man YES
04:17:30shashlickprobably just flip the conditions while i < s.len and s[i] != sep:
04:17:34shashlicksee if that works
04:19:33shashlicklet me know if that works then we can submit a PR
04:20:10FromGitter<putao88> ok
04:24:41shashlickdata-man: self extracting 7z works with libarchive
04:32:21FromGitter<data-man> Cool! :) On Linux?
04:44:41FromGitter<data-man> @putao88: what version of Nim are you using? Please try with https://github.com/data-man/NimData/tree/fix_indices (I tested on devel branch)
04:46:37*endragor joined #nim
04:47:06FromGitter<kayabaNerve> What's everyone's goto nim cfg files?
04:47:14FromGitter<kayabaNerve> :thinking:
04:47:16shashlickdata-man: yep works on linux as well
04:47:42shashlickkayabaNerve: what do you mean goto - for what purpose
04:54:40FromGitter<kayabaNerve> If you have a new project
04:54:50FromGitter<kayabaNerve> What cfg would you copy/paste in and then work off of?
04:55:34shashlickI just use one of my previous projects as a starter
04:55:47shashlickespecially for nimgen wrappers which are all just a cfg file
05:13:43*yglukhov[i] joined #nim
05:17:57*yglukhov[i] quit (Ping timeout: 240 seconds)
05:19:20FromGitter<putao88> I found out why there was no data in the last column of my all.csv file
05:20:05*lainon quit (Quit: Leaving)
05:20:23*lainon joined #nim
05:22:15*lainon left #nim (#nim)
05:28:01FromGitter<gogolxdong> @shashlick It works as you said. Thanks!
05:30:15FromGitter<data-man> @putao88 Can you tell us? :)
05:31:25FromGitter<putao88> yes,it works
05:31:28FromGitter<putao88> just flip the conditions while i < s.len and s[i] != sep:
05:36:28FromGitter<putao88> @data-man Thanks!
05:42:29FromGitter<data-man> All thanks to shashlick :)
05:44:13*nsf joined #nim
06:19:12*jonafato quit (Ping timeout: 260 seconds)
06:22:21*jonafato joined #nim
06:36:07*Lord_Nightmare2 joined #nim
06:38:53*NimBot joined #nim
06:39:37*Lord_Nightmare quit (Ping timeout: 260 seconds)
06:39:37*Lord_Nightmare2 is now known as Lord_Nightmare
06:45:53*Electrux quit (Ping timeout: 248 seconds)
06:46:32*leorize joined #nim
06:47:25*Electrux joined #nim
06:50:50*Ven`` joined #nim
06:51:08*Lord_Nightmare2 joined #nim
06:51:43*Lord_Nightmare quit (Ping timeout: 244 seconds)
06:52:00*Electrux quit (Ping timeout: 260 seconds)
06:52:04*Lord_Nightmare2 is now known as Lord_Nightmare
06:54:09*Ven`` quit (Read error: Connection reset by peer)
06:54:29*Ven`` joined #nim
07:19:43*yglukhov[i] joined #nim
07:21:52*yglukhov[i] quit (Read error: Connection reset by peer)
07:22:28*yglukhov[i] joined #nim
07:32:23FromGitter<alehander42> @Yardanico wow this ext is cool
07:32:28FromGitter<alehander42> but it leads me to module docs
07:32:31FromGitter<alehander42> which is strange
07:35:54*Vladar joined #nim
07:42:49*xkapastel quit (Quit: Connection closed for inactivity)
07:49:13*Lord_Nightmare2 joined #nim
07:52:05*Lord_Nightmare quit (Ping timeout: 276 seconds)
07:52:05*Lord_Nightmare2 is now known as Lord_Nightmare
07:56:13*Lord_Nightmare2 joined #nim
07:57:17*Lord_Nightmare quit (Ping timeout: 276 seconds)
07:57:20*Lord_Nightmare2 is now known as Lord_Nightmare
07:58:55*Trustable joined #nim
07:59:47FromGitter<yglukhov> @alehander42, hey you around?
08:01:18FromGitter<alehander42> @yglukhov yeah
08:02:57*gmpreussner_ quit (Ping timeout: 240 seconds)
08:05:14*Lord_Nightmare2 joined #nim
08:05:14*gmpreussner_ joined #nim
08:05:53*Lord_Nightmare quit (Ping timeout: 248 seconds)
08:06:06*Lord_Nightmare2 is now known as Lord_Nightmare
08:08:12Araqshashlick: default zip doesn't compress Nim's C sources well
08:08:33Araqwe have to pick a format that supports cross-file compressions
08:12:23*onionhammer quit (Ping timeout: 256 seconds)
08:13:46Araqgmpreussner_: enum values are mapped to integers in the js target
08:25:37*shashlick quit (Ping timeout: 248 seconds)
08:27:45*shashlick joined #nim
08:40:40*Lord_Nightmare quit (Ping timeout: 245 seconds)
08:46:47*Lord_Nightmare joined #nim
08:51:42*couven92 joined #nim
08:54:43YardanicoHow do I use "--define: ssl" in nimscript (.nims)?
08:56:20Araqswitch("define", "ssl") # not sure, try it
08:56:36YardanicoYeah, seems to work
08:56:55Araq--define: ssl might also work.
08:57:55YardanicoYes, it also does
09:05:19*jangko joined #nim
09:06:16*jangko quit (Client Quit)
09:07:38YardanicoWell yeah, NimScript looks much cleaner and has more features: https://github.com/vk-brain/Nickel/blob/master/src/nickel.nims
09:14:21*sclee joined #nim
09:15:19*Lord_Nightmare2 joined #nim
09:15:30*sclee quit (Client Quit)
09:17:09*Electrux joined #nim
09:17:17*natrys joined #nim
09:18:34*Lord_Nightmare quit (Ping timeout: 256 seconds)
09:18:34*Lord_Nightmare2 is now known as Lord_Nightmare
09:26:39Yardanico@data-man maybe we don't need "There
09:26:39Yardanico is an official Telegram channel." about telegram in readme?
09:26:50Yardanicobecause it's already in the community section :)
09:27:08*Lord_Nightmare quit (Ping timeout: 255 seconds)
09:27:20*Lord_Nightmare2 joined #nim
09:28:17*Lord_Nightmare2 is now known as Lord_Nightmare
09:29:17FromGitter<data-man> Links should not be identical?
09:30:13FromGitter<data-man> Remove gitter link too? :)
09:32:44FromGitter<data-man> We need help! https://github.com/bluenote10/NimData/pull/25
09:34:33FromGitter<survivorm> I've read an article on the code reading psycology and had a thought on that nim is going to benefit from having something like that: http://www.dre.vanderbilt.edu/~sutambe/documents/More%20C++%20Idioms.pdf (ideomatic ways of writing common code fragments). This will improve readability and understanding of nim code. Unfortunately, it needs to be written first :) (I don't volunteer for that ;)
09:36:08FromGitter<survivorm> I'm sure such things are partially covered in manual or Nim in Action, but i don't think it's nearly complete
09:36:44FromGitter<survivorm> And i think it's a good idea for the second book on Nim :)
09:36:51federico3that's what code examples in the manual and docs are for
09:37:20FromGitter<survivorm> The code examples are limited
09:37:30*krux02 joined #nim
09:40:14cremoh, those things listed in pdf are hacks around writing readable code, more like antipatterns.
09:40:41krux02dom96: I just started hexchat, and without configuration it has this alignment/split of messages and user names. So maybe your information about it is a bit outdated.
09:44:42FromGitter<survivorm> I still think some things should be listed. Like getting object from the ref, iterating over object fields, using global variables, and so on. Many, if not all are listed in manual but it's sometimes hard to find. An addition to FAQ would be welcome, i think. But maybe i'm overthinking it
09:55:57*hogeland quit (Ping timeout: 240 seconds)
09:56:43*hogeland joined #nim
10:20:02*onionhammer joined #nim
10:37:54dom96krux02: I was basing my assessment solely on the Linux screenshot they have on their website, so probably.
10:42:52FromGitter<survivorm> @dom96 Are you still too busy for PRs?
10:43:23dom96survivorm: I'm planning to look at your times PR today
10:43:23FromGitter<survivorm> I'm not a frequent channel listenerm that's why i'm asking
10:45:05FromGitter<survivorm> Thanks a lot. Not like it's urgent, but it's burdening me as unfinished task. I appreciate your time spent on it :)
10:53:19dom96I skimmed the diff again, and found this: https://github.com/nim-lang/Nim/pull/7664/files#diff-91d68bf578ea4bbef60621e73245f542R1008
10:54:26dom96The doc comment isn't finished
10:54:52dom96Also I wonder if we should rename `toDurationParts` and `toTimeIntervalParts` to `toParts`
10:55:54dom96It might be worth defining a TimeIntervalParts type as well.
10:56:06dom96and using range[Nanoseconds..Years] for it?
10:56:18dom96@survivorm ^
10:56:44Electruxmust this chat be exclusively for questions and answers? or general talk can be done too?
10:57:04dom96general talk is fine
10:57:13dom96but preferably if it's Nim-related
10:57:20Electruxah ok thanks :)
10:57:21dom96for offtopic discussions we've got #nim-offtopic
10:57:34Electruxoh... didn't know about that... thanks :D
10:58:04FromGitter<ephja> yay ranges
10:58:40FromGitter<survivorm> @dom96 thanks a lot. I'll fix the comment. I think toParts is fine, but not sure about type for TIParts
10:58:41*Electrux quit (Quit: WeeChat 2.1)
10:58:54FromGitter<ephja> maybe you can almost implement them in code
10:59:13*Electrux joined #nim
11:00:23dom96brb
11:00:26FromGitter<ephja> with or without the ability to evaluate assertions at either compile time or runtime depending on what information is available
11:11:27FromGitter<GULPF> @survivorm IMO since toDurationParts returns `array[Nanoseconds..Weeks, int64]` toTimeIntervalParts should return `array[Nanoseconds..Years, int]` for consistency
11:11:56*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:18:20FromGitter<survivorm> @GULPF Okay... I'll think of it. I need to remember it to be able to make changes. Time passed :)
11:27:21*rokups joined #nim
12:01:50dom96@survivorm: ping me when you make the changes
12:02:01FromGitter<survivorm> okay
12:02:25*xkapastel joined #nim
12:04:06dom96oh, another thing
12:04:12FromGitter<survivorm> ?
12:04:13dom96We should be consistent with C#'s format: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
12:05:19FromGitter<survivorm> you mean format specifies or function name?
12:05:30FromGitter<survivorm> or something else completely?
12:06:06dom96I mean the 'f', 'ff', 'fff' you've added
12:06:12dom96'fff' should be miliseconds
12:06:20dom96'ffff' microseconds
12:06:25dom96'fffff' nanoseconds
12:07:54yglukhovdom96: pls have a look https://github.com/nim-lang/nimble/pull/497
12:08:08FromGitter<survivorm> @dom96 i think right is 'fff' -> milis, 'ffffff' -> micros, and they don't have specifier for nanos
12:08:32FromGitter<survivorm> If you're telling of consistency
12:09:47*Snircle joined #nim
12:09:50dom96survivorm: possibly. No idea what "ten thousandths of a second" really is :)
12:10:18FromGitter<survivorm> looking at their example helps :)
12:10:40dom96yglukhov: cool, thx!
12:12:25FromGitter<survivorm> but that's rather... not convenient. i'd prefer having an other opportunity, like f^3, f^6 and f^9 for that
12:12:39FromGitter<survivorm> may be - as an option
12:13:25dom96perhaps, but it's better to keep it consistent for now
12:13:34dom96We can add a nicer syntax later
12:14:07FromGitter<survivorm> i mean, to make milis both 'fff' and 'f^3' and so on
12:14:28dom96please just keep 'fff' for now
12:14:40FromGitter<survivorm> okay, you're the boss...
12:17:10*couven92 quit (Read error: Connection reset by peer)
12:24:46*natrys quit (Quit: natrys)
12:31:28*Ven`` joined #nim
12:41:19*dddddd joined #nim
12:46:27*Ven` joined #nim
12:46:43*Ven` quit (Read error: Connection reset by peer)
12:47:02*Ven` joined #nim
12:49:41*Ven`` quit (Ping timeout: 256 seconds)
13:08:47FromGitter<survivorm> @dom96 Looks like that's it
13:09:01dom96awesome, will review
13:09:07dom96and maybe give it a test too :)
13:12:47FromGitter<survivorm> awesome :) Will be glad if my work helps someone :)
13:21:14*Ven` quit (Read error: Connection reset by peer)
13:21:26*Ven`` joined #nim
13:35:29*DarkArctic_ joined #nim
13:35:30*DarkArctic quit (Read error: Connection reset by peer)
13:35:32*nsf quit (Quit: WeeChat 2.1)
13:37:25*DarkArctic__ joined #nim
13:40:51*DarkArctic_ quit (Ping timeout: 240 seconds)
13:46:25*DarkArctic__ quit (Quit: Leaving)
13:46:41*DarkArctic joined #nim
13:56:46*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:01:41*Ven`` joined #nim
14:07:48dom96survivorm: merged
14:08:38FromGitter<survivorm> Hooray :) Great, thanks. What's with mutators?
14:09:24dom96you mean += etc.?
14:09:57FromGitter<survivorm> eyah
14:10:29*BitPuffin joined #nim
14:10:47dom96Another PR?
14:11:19FromGitter<survivorm> https://github.com/nim-lang/Nim/pull/7806
14:11:24FromGitter<survivorm> miniscule
14:11:58dom96oh well, I want us to have completely generic operators for this
14:12:03dom96So I won't be merging this I'm afraid
14:12:25*ftsf quit (Ping timeout: 256 seconds)
14:13:40FromGitter<krux02> really
14:14:01FromGitter<krux02> i also want the generic operators
14:14:15FromGitter<krux02> but that is no reason not to merge
14:15:36FromGitter<krux02> I would also like to invert the dependency of cmp and `<`
14:16:10*endragor quit (Remote host closed the connection)
14:16:16FromGitter<krux02> so people can implement cmp and have all operators like `<` `<=` `==` `!=` `>=` `>`
14:16:37*endragor joined #nim
14:21:02*endragor quit (Ping timeout: 245 seconds)
14:26:38Yardanicocomment history on github is now public (so everyone can see who/when/how edited his comment)
14:27:45*yglukhov[i] quit (Ping timeout: 248 seconds)
14:27:53*yglukhov[i] joined #nim
14:27:59*yglukhov[i] quit (Remote host closed the connection)
14:28:09YardanicoAbout https://github.com/nim-lang/Nim/pull/7100#issuecomment-393532755 - really, why does intToStr exist? because it's called like that in pascal?
14:28:20Yardanicoah, sorry, probably because of leading zeroes
14:28:30*yglukhov[i] joined #nim
14:29:16*SenasOzys joined #nim
14:31:46*SenasOzys quit (Remote host closed the connection)
14:38:39*yglukhov_ joined #nim
14:38:39*yglukhov[i] quit (Read error: Connection reset by peer)
15:03:52Yardanicodom96 https://github.com/nim-lang/Nim/issues/7921#issuecomment-393549988
15:05:24*Ven`` quit (Read error: Connection reset by peer)
15:09:53*Ven`` joined #nim
15:23:01*hogeland quit (Remote host closed the connection)
15:23:36*hogeland joined #nim
15:33:58*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:45:43*krux02 quit (Quit: Leaving)
15:48:42FromGitter<kayabaNerve> My v0.18.0 hash 5ee9e86c87d831d32441db658046fc989a197ac9 compiler is reading from nil :( ⏎ Hint: MyModule [Processing] ⏎ Hint: tables [Processing] ⏎ Hint: hashes [Processing] ⏎ SIGSEGV: Illegal storage access. (Attempt to read from nil?) ... [https://gitter.im/nim-lang/Nim?at=5b10195a016ae21a4cfbff9f]
16:08:29Yardanicoit's a compiler crash
16:08:55Yardanicoand you only need to use "./koch temp c pathToYourNimFile" to see full compiler traceback
16:09:16YardanicoAnd yes, you should make an issue, but you'll need to provide code which leads to the crash
16:09:43Yardanico(and make it as small as possible, because that usually helps)
16:23:38FromGitter<kayabaNerve> Good to know. I did provide the code :P
16:33:31*endragor joined #nim
16:42:37*natrys joined #nim
16:48:43Yardanico@kayabaNerve btw, you don't need these lines https://github.com/kayabaNerve/Currency/blob/master/src/nim.cfg#L17
16:49:06Yardanicoyou only need define=release, it implies opt: speed and deadCodeElim is default
16:50:35Yardanicoalso why do you add -Os to your gcc options when you do "define=release"?
16:50:50Yardanicodefine=release implies -O3, but you're probably overwriting that with -Os
16:51:01Yardanico(there's opt: size for -Os)
16:51:21FromGitter<kayabaNerve> @Yardanico Probably because I meant to do size, not speed
16:51:31Yardanicouse opt: size then :)
16:52:10FromGitter<kayabaNerve> Will define:release overwrite that? :P
16:52:12FromGitter<kayabaNerve> And thank you
16:52:25*nsf joined #nim
16:53:23FromGitter<kayabaNerve> Also, I made an issue and also included the Koch output.
16:53:31Yardanicoyeah, I saw it ;)
16:58:56FromGitter<kayabaNerve> Uploaded the updated cfg fil
17:11:17*rauss quit (Ping timeout: 256 seconds)
17:12:29gmpreussner_is there a way to wrap JavaScript iterators?
17:26:35*Timofffee joined #nim
17:31:24*yglukhov_ quit (Read error: Connection reset by peer)
17:32:05*yglukhov[i] joined #nim
17:32:07FromGitter<kayabaNerve> Yardanico: I just wanted to upload the koch output, not be judged for my choices dammit
17:32:14Yardanicosorry, sorry
17:32:22FromGitter<kayabaNerve> :P Teasing you
17:32:30FromGitter<kayabaNerve> Good to know. I'll work on that in the future
17:32:41FromGitter<kayabaNerve> I use adblock so I didn't realize it had ads
17:32:49Yardanicoalso it uses JS
17:32:57FromGitter<kayabaNerve> Yeah. That's the main issue I see
17:33:04Yardanico(well, that's not bad for me, but for some people maybe)
17:33:27Yardanicoalso, you've got this crash with last devel? (or 0.18.0?)
17:33:32FromGitter<kayabaNerve> Also, JS has iterators? I know about for (var i in OBJECTorARRAY) but it has something beyond that?
17:33:37FromGitter<kayabaNerve> 1) 18.0 stable
17:33:44FromGitter<kayabaNerve> I uploaded the Git Hash of it lol
17:34:04FromGitter<kayabaNerve> I'm guessing it's an stdlib issue, not a compiler issue
17:36:36*LyndsySimon joined #nim
17:36:42LyndsySimonGreetings, Nimmers.
17:37:18TimofffeeHey!
17:37:27dom96hello :)
17:37:42LyndsySimonIs there a popular websockets library?
17:39:07dom96gmpreussner_: IIRC I just wrapped the underlying accessors for len and indexing.
17:39:51dom96LyndsySimon: There is only really one websockets library
17:40:15LyndsySimondom96: What's that? All I see in the stdlib is asyncnet
17:40:28dom96https://github.com/niv/websocket.nim
17:43:13LyndsySimontyvm
17:51:17FromGitter<kayabaNerve> I prefer nimrods. Not going to lie.
17:51:35FromGitter<kayabaNerve> Nim stdlib is awesome
17:52:08Yardaniconimrods?
17:52:28FromGitter<kayabaNerve> Instead of nimmers
17:52:54FromGitter<kayabaNerve> I'm still pissed at the lack of C++ sockets
17:55:35FromGitter<kayabaNerve> It's been a language for damn 33 years and there's been proposals since at least 03. Thank Nim for finally giving me a cross platform socket option
17:55:45FromGitter<kayabaNerve> *standard socket
18:01:10FromGitter<dandevelo> What is the issue with this code? https://pastecode.xyz/view/raw/d4cbafef
18:01:29FromGitter<dandevelo> I get SIGSEGV: Illegal storage access. (Attempt to read from nil?)
18:01:58FromGitter<kayabaNerve> What's the error you're getting?
18:02:16FromGitter<dandevelo> The code compiles but I get SIGSEGV: Illegal storage access. (Attempt to read from nil?) when running
18:02:38FromGitter<dandevelo> the last line fires this
18:03:52*Cthalupa quit (Ping timeout: 260 seconds)
18:04:26FromGitter<dandevelo> Any ideas?
18:07:07*Cthalupa joined #nim
18:07:54*smt` joined #nim
18:08:03FromGitter<dandevelo> Seems like the second show method is not called
18:08:24FromGitter<kayabaNerve> address DerivedObject()
18:08:28FromGitter<kayabaNerve> *addr
18:08:39FromGitter<kayabaNerve> Damn autocorrect. What if you did that versus allocation
18:09:45FromGitter<dandevelo> @kayabaNerve not sure I understand
18:11:08*smt quit (Ping timeout: 244 seconds)
18:12:27*Electrux quit (Ping timeout: 240 seconds)
18:14:53*smt` is now known as smt
18:15:06FromGitter<dandevelo> I took a look at the generated code. Looks like it stops here: if (!((*obj).base == subclass)) goto LA7_;
18:20:10FromGitter<kayabaNerve> Don't do Malloc. Create an instance like
18:20:19FromGitter<kayabaNerve> *like normal and get it's address with addr
18:20:46FromGitter<dandevelo> @kayabaNerve I am doing malloc on purpose as I don't want this to be GC'ed
18:21:25FromGitter<kayabaNerve> Got it
18:22:09FromGitter<kayabaNerve> I have no idea. Sorry.
18:23:06FromGitter<dandevelo> @kayabaNerve thank you for taking a look at it. I am wondering whether there is a bug in my code or there is a bug in the compiler. Most likely it is in my code but I can't figure out what it is.
18:24:30FromGitter<kayabaNerve> I'll try to play around with it when I get home if you still have the issue.
18:25:19FromGitter<dandevelo> Thanks! I used https://play.nim-lang.org to type the code
18:25:43*yglukhov[i] quit (Ping timeout: 256 seconds)
18:26:35*Electrux joined #nim
18:30:56*Electrux quit (Ping timeout: 256 seconds)
18:32:32*FromGitter quit (Ping timeout: 255 seconds)
18:38:33*yglukhov[i] joined #nim
18:39:48*jjido joined #nim
18:39:59*FromGitter joined #nim
18:43:46FromGitter<dandevelo> Added a question on the forum about this: https://forum.nim-lang.org/t/3875#24104
18:56:29*Electrux joined #nim
18:57:29*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:01:08*Electrux quit (Ping timeout: 268 seconds)
19:20:55FromGitter<kayabaNerve> @mratsim You had a Nim libsecp256k1 wrapper, right?
19:27:26*Electrux joined #nim
19:31:51*Electrux quit (Ping timeout: 240 seconds)
19:33:31*endragor quit (Ping timeout: 256 seconds)
19:37:27*Electrux joined #nim
19:41:24*xkapastel quit (Quit: Connection closed for inactivity)
19:42:01*Electrux quit (Ping timeout: 256 seconds)
19:46:13FromGitter<kayabaNerve> Found it. Sorry for the ping
19:46:56FromGitter<dandevelo> @kayabaNerve looks like it is a compiler bug after all: https://forum.nim-lang.org/t/3875
19:47:38FromGitter<kayabaNerve> Ah. Good job
19:56:31*Electrux joined #nim
19:58:55*arecaceae quit (Remote host closed the connection)
19:59:58*arecaceae joined #nim
20:00:40*Electrux quit (Ping timeout: 244 seconds)
20:02:27FromGitter<dandevelo> Added an issue for it here: https://github.com/nim-lang/Nim/issues/7930
20:06:57*rokups quit (Quit: Connection closed for inactivity)
20:26:33*Electrux joined #nim
20:30:38*Electrux quit (Ping timeout: 244 seconds)
20:49:28*Vladar quit (Quit: Leaving)
20:52:17*hogeland quit (Ping timeout: 256 seconds)
20:52:24*hogeland joined #nim
20:56:32*Electrux joined #nim
21:00:57*Electrux quit (Ping timeout: 240 seconds)
21:09:47FromGitter<amscotti> Hi, is there an easy way to tell if a value is in a table? In Python, I'm able to do `x in myTable.values()` but in Nim `values` returns a `iterator` and I'm not sure how to check that for the value without looping over all the items.
21:18:40*vivus joined #nim
21:23:27FromGitter<amscotti> This is the code I have right now for checking if there is a value in a table, just want to check to make sure there isn't a better way of doing this build into Nim. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b1067cf361a950a662f9156]
21:23:46*thomasross quit (Quit: Leaving)
21:25:03FromGitter<dandevelo> @amscotti did you try: https://nim-lang.org/docs/tables.html#hasKey,Table[A,B],A
21:26:33*Electrux joined #nim
21:26:54FromGitter<dandevelo> @amscotti oh, I misunderstood, you are looking for a specific value. I thought you are looing for a specific key
21:29:28*natrys quit (Quit: natrys)
21:29:40FromGitter<amscotti> @dandevelo Yeah, I just want to know if the value is in the table or not.
21:29:57dom96You could also do: value in table.values.toSeq()
21:30:35*Electrux quit (Ping timeout: 240 seconds)
21:36:50FromGitter<amscotti> I did give that a try, I get an `attempting to call undeclared routine: 'values'` error from the compiler but I think `toSeq(table.values)` works, not sure why.
21:38:41*dddddd quit (Remote host closed the connection)
21:38:56FromGitter<amscotti> but when I try to use this outside of it's own proc I get an `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` error. 😕
21:40:06*dddddd joined #nim
21:41:33*Trustable quit (Remote host closed the connection)
21:47:11*nsf quit (Quit: WeeChat 2.1)
21:51:49dom96weird, can you share the code?
21:57:29*Electrux joined #nim
22:02:05*Electrux quit (Ping timeout: 244 seconds)
22:03:36*riidom quit (Quit: No Ping reply in 180 seconds.)
22:04:54*riidom joined #nim
22:05:03FromGitter<amscotti> Sure, 1 sec. Sorry, was pulled away.
22:06:24FromGitter<amscotti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b1071e0e26c847ac8a8fe35]
22:07:00FromGitter<amscotti> from this code I get a `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`.
22:09:59FromGitter<amscotti> Moving the code into it's own `proc` seems fine, ⏎ ⏎ ```proc hasValue[A, B](t: Table[A, B], value: B): bool = ⏎ value in toSeq(t.values)``` ⏎ ⏎ but if I use `value in t.values.toSeq`, I get this error `Error: attempting to call undeclared routine: 'values'` [https://gitter.im/nim-lang/Nim?at=5b1072b793dc78791c9f8b4f]
22:23:59*Timofffee quit (Ping timeout: 260 seconds)
22:24:59*xkapastel joined #nim
22:37:58dom96amscotti: try changing from 'const' to 'let'
22:38:00dom96and report this as a bug
22:49:49FromGitter<mratsim> it’s not a bug, it’s template call syntax that doesn’t work as method call in some (all?) situations
22:50:16FromGitter<mratsim> well, it may be a bug, but AFAIK there was no proper solution.
22:52:52dom96it looks like it's crashing the compiler?
22:54:29FromGitter<kayabaNerve> This should be simple. How can I convert a seq to an array?
22:58:14FromGitter<kayabaNerve> Do I have to use a for loop?
22:59:20FromGitter<ephja> x[a..a+n] = y[b..b+n]?
23:06:47FromGitter<kayabaNerve> A splice is just returning a seq
23:07:01FromGitter<kayabaNerve> NVM
23:07:03FromGitter<kayabaNerve> Got it
23:07:04FromGitter<kayabaNerve> Thanks
23:14:20FromGitter<amscotti> Still getting errors with a `let`, ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I think for my code, I'm just going to use the `proc` as it seems to work and is easy to understand. What type of details should I put in the bug report? [https://gitter.im/nim-lang/Nim?at=5b1081ccc712f561254b3328]
23:19:41dom96bah, why is Gitter so bad with letting me copy and paste code :(
23:19:56dom96It feels like as soon as GitLab acquired them they stopped maintaining it
23:22:20dom96@amscotti: anyway, just paste that code which causes a SIGSEGV and say it causes a SIGSEGV :)
23:22:43*vivus quit (Quit: Leaving)
23:25:32*BitPuffin quit (Remote host closed the connection)
23:44:58*icebattle joined #nim
23:57:22*Electrux joined #nim