<< 30-06-2019 >>

00:00:01*junland quit (Quit: %ZNC Disconnected%)
00:01:43*junland joined #nim
00:11:34*disruptek quit (Ping timeout: 244 seconds)
00:23:27*ng0 joined #nim
00:25:59*Snircle quit (Read error: Connection reset by peer)
00:26:38*Snircle joined #nim
00:35:17*stefanos82 quit (Quit: Quitting for now...)
00:53:24*ng0 quit (Quit: Alexa, when is the end of world?)
01:21:05*disruptek joined #nim
01:25:27*disruptek quit (Ping timeout: 245 seconds)
01:26:07*disruptek joined #nim
02:20:19*deech__ quit (Ping timeout: 268 seconds)
02:25:13*seni quit (Remote host closed the connection)
02:45:32*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:47:00*laaron joined #nim
03:07:57*dddddd quit (Remote host closed the connection)
03:12:31*theelous3 quit (Ping timeout: 246 seconds)
03:18:48*theelous3 joined #nim
03:22:27*theelous3_ joined #nim
03:23:18*theelous3 quit (Ping timeout: 258 seconds)
03:26:08*gc21 joined #nim
03:26:59*gc21 quit (Remote host closed the connection)
03:39:22*Voltist joined #nim
03:57:06*Snircle quit (Remote host closed the connection)
04:33:47*theelous3_ quit (Ping timeout: 245 seconds)
05:13:41*nsf joined #nim
05:14:18*lf-araujo joined #nim
05:19:21VoltistIn Nim, can you reference from the end of a sequence? Like -1, -2, -3 etc. in Python?
05:22:07FromGitter<rokups> Voltist use ^2 which means "second item from the end, counting from 1"
05:22:41VoltistThanks!
05:22:52FromGitter<rokups> This part is very confusing to me. We count things from 0 if it's a start of sequence and from 1 if it's an end. So be careful
05:23:41FromGitter<rokups> Araq why.. no reason we can't have `0..^0`
05:24:11VoltistYeah. Is it also possible to slice a seq using similar syntax, like how you might use [3:6] in Python?
05:25:30FromGitter<rokups> s[3..6]. Remember - slice is inclusive on both ends. 3 is first element to take and 6 is the last to take.
05:27:03VoltistThanks. There is, understandably for such a young project, very little easy-to-find documentation about this kind of simple functionality
05:27:12VoltistBut the standard library is very well documented!
05:28:15FromGitter<rokups> "learn" section on website has a fair amount of detailed tutorials
05:28:43*lf-araujo quit (Remote host closed the connection)
05:29:02FromGitter<rokups> Nim is over 10 years old, maybe close to 15 since first commit :)
05:30:57VoltistMaybe young isn't the right word for me to use, but the community certainly isn't developed as much. With Python, for example, you can google an issue and get thousands of stack overflow questions and hundreds of blog posts.
05:31:28VoltistI'm loving the experience of using Nim though.
05:31:50VoltistI even made a pull request a few days ago :)
05:32:08*lf-araujo joined #nim
05:34:22*Voltist quit (Quit: Leaving)
05:34:45*Voltist joined #nim
05:36:54*lf-araujo quit (Remote host closed the connection)
05:37:14FromGitter<rokups> Yeah well.. it all boils down to corporate backing. It's a shame worse languages get more money and thus get more popular.
05:37:54FromGitter<rokups> PRs are awesome :) Nim needs all the help it can get
05:44:32ldleworkSpeaking of corporate backing, I've been writing nothing but C# and TypeScript for a while now
05:44:50ldleworkungh that tooling. just focus on your problem and hit tab, and it somehow works out!
05:45:04ldleworkon linux!
05:45:13ldleworkwhat a world we live in
05:53:48leorize@rokups: because `^1` is how it has always worked :p
05:54:47FromGitter<zacharycarter> I have to use Typescript at work, as well as C# - I'd still prefer to use C or C++ or Nim, etc..
05:55:00FromGitter<zacharycarter> TypeScript has all of the warts of JS in terms of tooling
05:55:10FromGitter<zacharycarter> C# is fine
05:57:56*solitudesf joined #nim
06:07:18*solitudesf quit (Ping timeout: 272 seconds)
06:23:53*lf-araujo joined #nim
06:26:19*lf-araujo quit (Remote host closed the connection)
06:39:24*brakmic joined #nim
06:44:45*brakmic quit (Ping timeout: 244 seconds)
06:45:57*brakmic joined #nim
06:50:46*ertp07 joined #nim
07:00:00*gmpreussner_ quit (Quit: kthxbye)
07:04:31*gmpreussner joined #nim
07:25:57*Voltist quit (Quit: Quit)
07:37:29FromGitter<Varriount> @zacharycarter As in, 30 different tools required for a halfway usable environment?
07:49:43*jjido joined #nim
07:50:29*jjido quit (Client Quit)
08:05:39*jjido joined #nim
08:08:00*synshroud joined #nim
08:14:13*ertp07 quit (Ping timeout: 246 seconds)
08:30:32*vlad1777d__ joined #nim
08:35:27*Vladar joined #nim
08:44:36*dwdv joined #nim
09:05:39FromGitter<zacharycarter> plus thirty different config files for said tools
09:09:48FromGitter<mratsim> @leorize @deech, static is const generics in Rust, the things people have been asking for for the past 5 years
09:10:13FromGitter<mratsim> it's very useful for int, enum, etc.
09:10:25FromGitter<mratsim> for CTFE you can use the {.compileTime.} pragma
09:11:06FromGitter<mratsim> I don't mind changing static and CTFE as long as we have an equivalent to specify that a value only exist (and should exist) at compile-time
09:12:06*lf-araujo joined #nim
09:25:15FromGitter<juancarlospaco> Hi
09:25:45FromGitter<juancarlospaco> Recommended reading: https://gist.github.com/rjhansen/67ab921ffb4084c865b3618d6955275f
09:26:10lqdev[m]hellot
09:26:17lqdev[m]hello*
09:26:26lqdev[m]damn, I'm still asleep
09:41:32FromGitter<alehander42> morn
09:41:35FromGitter<alehander42> in
09:44:27*ertp07 joined #nim
09:46:55FromGitter<mratsim> hey
09:58:15FromGitter<alehander42> how is weather in france mamy
09:58:57FromGitter<alehander42> i am left with the impression it's >45 degrees all the time people running in icecream trucks
10:03:01*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:05:01*dddddd joined #nim
10:12:13*lf-araujo quit (Ping timeout: 276 seconds)
10:38:53*jjido joined #nim
10:43:36*natrys joined #nim
10:48:36*solitudesf joined #nim
11:10:19*ertp07 quit (Ping timeout: 244 seconds)
11:11:52*ertp07 joined #nim
11:13:19*PMunch joined #nim
11:15:39*stefanos82 joined #nim
11:23:37*hoijui joined #nim
11:34:28*Snircle joined #nim
11:45:11*solitudesf quit (Ping timeout: 268 seconds)
11:54:45*ertp07 quit (Ping timeout: 244 seconds)
12:02:50cornfeedhobohello. anyone notice that nim-lang.org is down?
12:03:06*ertp07 joined #nim
12:03:17FromGitter<mratsim> @alehander42 yeah, I'm buying 2/3 icecreams a day
12:03:52FromGitter<mratsim> I need to watercool myself :p
12:06:32FromGitter<arnetheduck> which reminds me, there's this totally hipster ice cream place in a small village in the middle of nowhere next to where I live that's open only sat/sun 12-18 .. nice working hours :)
12:06:41cornfeedhobowhooops. my bad. just 404 on the c2nim page :p
12:16:53PMunchHere it's 8 degrees out.. At least the rain has stopped..
12:17:30*lritter joined #nim
12:20:19*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:25:46*lf-araujo joined #nim
12:29:12*ertp07 quit (Ping timeout: 272 seconds)
12:32:07*arecaceae quit (Remote host closed the connection)
12:32:26*arecaceae joined #nim
12:41:27*lf-araujo quit (Ping timeout: 264 seconds)
12:43:13*ertp07 joined #nim
12:52:57*lritter quit (Read error: Connection reset by peer)
13:17:36*lf-araujo joined #nim
13:20:16*hoijui quit (Ping timeout: 252 seconds)
13:20:25FromGitter<rokups> leorize we always did many wrong things. Your point being..? :P I don't expect any change to be precise. Just pointing out a confusing inconsistency.
13:21:31FromGitter<rokups> I learned to treat nim as "batteries not included" so I can fix these links for myself anyway. :P
13:29:20*Vladar quit (Remote host closed the connection)
13:29:39*Vladar joined #nim
14:01:00Araqrokups: mostly because of Python, -1 becomes ^1
14:01:19Araqsometimes we assume people port their Python code to Nim :-)
14:06:31FromGitter<mratsim> btw, in the code gen ^ is called roof but I'm pretty sure it's a hat (https://en.wikipedia.org/wiki/Hat_operator)
14:07:42Araqthen the English have broken hats
14:08:31PMunchI guess it could look like the Chinese style hat
14:12:19FromGitter<juancarlospaco> proc `🎩`(): = discard
14:12:28FromGitter<juancarlospaco> ;P
14:17:23FromGitter<zacharycarter> https://gist.github.com/zacharycarter/bbaae1d84d4f4380d577f1648427724a
14:17:50*lf-araujo_ joined #nim
14:21:09FromGitter<zacharycarter> never mind I think I figured it out
14:21:46FromGitter<zacharycarter> or mayb enot
14:21:56*lf-araujo quit (Ping timeout: 272 seconds)
14:21:56*lf-araujo_ is now known as lf-araujo
14:23:52FromGitter<zacharycarter> I guess this works - https://gist.github.com/zacharycarter/bbaae1d84d4f4380d577f1648427724a
14:25:00*laaron- joined #nim
14:27:26*theelous3 joined #nim
14:28:32*laaron quit (Ping timeout: 260 seconds)
14:31:20*solitudesf joined #nim
14:42:33lqdev[m]juancarlospaco: pretty sure you don't need stropping here
14:44:01*natrys quit (Ping timeout: 268 seconds)
14:46:16*leorize quit (Ping timeout: 260 seconds)
14:55:30*natrys joined #nim
14:57:40FromGitter<juancarlospaco> Just jokin' :)
14:58:54*lf-araujo quit (Ping timeout: 252 seconds)
15:17:58*lf-araujo joined #nim
15:18:57*lf-araujo quit (Client Quit)
15:21:22*lf-araujo joined #nim
15:33:56*jjido joined #nim
15:35:57lqdev[m]ik, I'm just pointing out that 🎩 is a valid identifier and not a reserved word, so you don't need to strop it ;)
15:37:46*lf-araujo quit (Ping timeout: 252 seconds)
15:39:05*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
15:56:01dom96!eval proc 🎩() = echo("Afternoon gentlemen"); 🎩()
15:56:04NimBot<no output>
15:56:48dom96!eval echo("Playground broken?")
15:56:50NimBotPlayground broken?
15:57:04*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:57:16dom96weird, it compiles but gives no output on the playground
15:57:22PMunchHuh, with an actual newline it works fine
15:58:06FromGitter<juancarlospaco> :O
15:58:08dom96buffering issues probably
15:58:36PMunchSame if you try it in a file
15:58:42PMunchAnd compile it with Nim
15:59:02Araq!eval proc 🎩() = echo("Afternoon gentlemen"); 🎩()
15:59:05NimBot<no output>
15:59:19Araq!eval proc f() = echo("Afternoon gentlemen"); f()
15:59:22NimBot<no output>
15:59:33Araqstrang
15:59:36Araqe
15:59:49PMunchhttp://ix.io/1Nko
16:00:33PMunchOh wait, think it adds it as part of the proc body
16:00:39*lf-araujo joined #nim
16:01:13FromGitter<juancarlospaco> it is technically, or not?
16:01:22FromGitter<juancarlospaco> maybe like an anon proc
16:01:26*lf-araujo quit (Read error: Connection reset by peer)
16:01:36*lf-araujo joined #nim
16:02:51PMunch!eval let 🎩 = (proc () = echo("Afternoon gentlemen")); 🎩()
16:02:54NimBotAfternoon gentlemen
16:03:48FromGitter<juancarlospaco> :D
16:03:54FromGitter<arnetheduck> > Araq, which of system.hostOs and system.platform.targetOS and when defined(XXX) is the official way of detecting for which os the code is being compiled for? ⏎ > also interestingly, compiler/platforms supports more cpu's than system.nim ... hmm ... ⏎ ⏎ asking because we've been running into situations where the macro code would like to know the target platform for example and adapt accordingly.. also
16:03:54FromGitter... looking to make it work with cross-compiles. second issue is that the nim representation is less rich than for example unix / gcc targets - stuff like musl vs gnu or soft-float vs hard-float ARM ABI is not expressed [https://gitter.im/nim-lang/Nim?at=5d18dd69676ff14d2757faf4]
16:08:50*leorize joined #nim
16:09:22FromGitter<mratsim> the worse is probably mingw
16:10:13FromGitter<arnetheduck> mingw is actually easy if you support targets correctly
16:14:30FromGitter<arnetheduck> difficulty in std lib code right now is that all kinds of ways to detect these things are being used so it's hard to know what's right.. https://github.com/nim-lang/Nim/pull/11623 was failing because of this for example - if you look at the actual `when` jungle, the code was broken before as well, it just didn't trigger a compile error (would have triggered a runtime error instead) - in this case because
16:14:30FromGitter... `nintendoswitch` is also a `posix` (apparently!)
16:16:20*leorize quit (Ping timeout: 260 seconds)
16:17:22FromGitter<mratsim> yeah, a better host/target/platform would be nice
16:17:58FromGitter<mratsim> even just checking 64-bit or 32-bit often starts by checking, mmmh there must be something better than amd64 and armv7 and mips64
16:18:11FromGitter<mratsim> until someone tells you use sizeof(pointer) == 8
16:19:42*leorize joined #nim
16:22:10FromGitter<arnetheduck> it's a jungle, but for 64-vs-32-bits, checking sizeof pointer necessarily correct always :) for example, wasm32 has native 64-bit arithmetic but 32-bit pointers so if you're building a bigint or bitset library...
16:22:17*nsf quit (Quit: WeeChat 2.4)
16:23:33FromGitter<arnetheduck> ditto for x32 (https://en.wikipedia.org/wiki/X32_ABI)
16:24:16*leorize quit (Ping timeout: 260 seconds)
16:26:58lqdev[m]does assigning a seq to a var make a shallow or deep copy?
16:37:43FromGitter<mratsim> deep unless your seq has been shallow(myseq) before or it's contained in a {.shallow.} type
16:39:10lqdev[m]what if it's a seq of ref objects? do they get deep copied?
16:53:16FromGitter<juancarlospaco> is possible to replace Keywords with term rewriting templates?, lets say I want to replace `&&` with `and` at compile time (no matter how and is used on the code).
16:55:04*Jjp137 quit (Read error: Connection reset by peer)
16:55:47*Jjp137 joined #nim
16:57:50*ertp07 quit (Ping timeout: 268 seconds)
16:59:40*krux02 joined #nim
17:00:13lqdev[m]why'd you want to do this? give a more specific use case, maybe there's a better solution
17:01:01lqdev[m]you can replace `&&` with `and` using an ordinary template, btw
17:01:16*ertp07 joined #nim
17:01:17lqdev[m]```nim
17:01:18lqdev[m]template `&&`(a, b) = a and b
17:01:19lqdev[m]```
17:03:21*leorize joined #nim
17:03:48FromGitter<mratsim> the pointer is deep copied
17:04:10FromGitter<mratsim> i.e. just retain that seq/string have value semantics
17:04:12*hoijui joined #nim
17:04:16FromGitter<mratsim> ref/ptr have reference semantics
17:04:55*narimiran joined #nim
17:04:55lqdev[m]so, the object the ref points to does not change?
17:05:04FromGitter<mratsim> if you copy a seq, it will copy the content, but if the content is just ref type it will just copy the ref
17:05:14FromGitter<mratsim> no it doesn't and it isn't duplicated either
17:05:20lqdev[m]OK, thanks
17:12:08*lf-araujo quit (Ping timeout: 245 seconds)
17:21:22*jjido joined #nim
17:31:10*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:34:49*lf-araujo joined #nim
17:37:38*narimiran_ joined #nim
17:40:48*narimiran quit (Ping timeout: 272 seconds)
17:41:45PMunchhttps://github.com/PMunch/nim-optionsutils
17:41:47PMunchWoop woop
17:42:27*PMunch quit (Remote host closed the connection)
17:42:51Zevvooh me gusta
17:43:00Zevvthis makes me want to give options a second chance
17:44:39FromGitter<arnetheduck> nice PMunch.. been platying around with similar stuff for https://github.com/arnetheduck/nim-result - at some point, will probably make it drop-in compatible for `Option` as much as possible so it's easy to switch between the two
17:45:53shashlick_@dom96 - do you share a lot of data cross thread in httpbeast? Haven't had time to see the code beyond a point
17:46:15FromGitter<arnetheduck> specially the pattern matching part, would be nice to get something ergonomic on that front
17:47:03dom96shashlick_, I don't
17:47:57FromGitter<nepeckman> Need a little bit of help on something. I want to store some NimNodes in a compile time table for use across a couple different macros/compile time procs. Tried a couple different things, but so far haven't gotten anything to work. Latest attempt was `var myTable = static initTablestring, seq[NimNode ()` but that throws a weird compile time assert error that I can't parse.
17:49:47krux02arnetheduck: have you tried out astpatternmatching?
17:50:07dom96nepeckman: you need to use this: https://github.com/nim-lang/Nim/blob/devel/lib/core/macrocache.nim (annoyingly it's not in the doc gen...)
17:50:33FromGitter<nepeckman> Oh cool, thanks dom!
17:50:42FromGitter<arnetheduck> no, haven't heard of that one.. last time, @alehander42 mentioned some libraries but they had some unattractive quirks that I no longer remember
17:50:48FromGitter<arnetheduck> ^ krux02
17:51:31krux02https://github.com/krux02/ast-pattern-matching
17:52:27krux02arnetheduck: I wrote that one and I made sure that it is practical
17:53:27krux02I wrote it because I wanted to use it. It is not a proof of concept.
17:55:38shashlick_@dom96 ya that's what I was referring to in my forum post about having a good way to share data across threads
18:05:41FromGitter<arnetheduck> @krux02 - it looks a bit daunting, tying it to the ast nodes like that - is that just an example or does it mean you have to know the ast node types for various constructs? for result, I'd be looking at picking out members and submatching them for example, something like (dunno if it's possible, but you get the idea).. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d18f9f58dff05627b9d3da6]
18:08:17krux02it is not general purpose pattern matching.
18:08:27krux02it is specialized pattern matching for AST nodes only.
18:08:50krux02that is where I needed pattern maching primarily.
18:09:02FromGitter<arnetheduck> ah ok, then probably not useful for "users" of result (maybe for implementing something for users)
18:10:30*hoijui quit (Quit: Leaving)
18:10:40FromGitter<zetashift> I've used https://github.com/alehander42/gara in small projects without any issues:https://github.com/alehander42/gara
18:10:48FromGitter<zetashift> man that's some bad copy pasting from my part
18:11:48krux02I remember discussiong with alehander42 the design principles of pattern matching.
18:11:50FromGitter<arnetheduck> ah yes that's the one - I think I need to take another look at it
18:12:22krux02I said that error messages are one of the most important part of it. He wanted to kick it out to simplify the implementation.
18:12:50krux02I didn't use Gara yet, but I guess it doesn't have good error messages when there was a pattern mismatch.
18:13:35FromGitter<arnetheduck> well, if the construct is not generic, the burden of learning a dsl for a special case is a bit high - ie you must be writing some very specific code to go ahead and understand the quirks
18:14:33krux02yea, at some point I think I will improve pattern matching in Nim.
18:14:59*clyybber joined #nim
18:15:17krux02currently pattern matching is up to the users to implement it via macros. Because the languages has right now a feature stop.
18:16:21krux02eventually I think the language should have native support for Pattern matching, and it should be at least as good as Scala pattern matching (best pattern matching I know right now).
18:17:26FromGitter<arnetheduck> well, it'
18:18:11krux02so @arnetheduck if you really need pattern matching I guess you should go for Gara and when you have problems with it, fix it and mako a PR there.
18:19:00FromGitter<arnetheduck> it's a nice-to-have to make stuff like option and result ergonomic - need is a tricky word in the context.. but I might try a few examples with gara and see how well they fit
18:20:55FromGitter<arnetheduck> there's also the matter of the compiler understanding the constraints that pattern-matching imposes and thus being able to generate better code - we have a bit of a problem with already leading to unnecessary slow-downs because the c code is kind of silly sometimes - this would perhaps be a "need" motivation, along with good compiler like you said
18:21:14FromGitter<alehander42> so i meant that i dont want to generate errors always by default, maybe to only do it in debug mode
18:21:16krux02for option and result you don't need pattern matching
18:21:53FromGitter<alehander42> but it's true that i havent really worked on more explicit error messages for debugging cases
18:22:16FromGitter<rokups> Araq that kind of consistency with python does little good when slices are inclusive and behave differently. We can't do direct port from python now anyway since they need modifying.
18:22:19FromGitter<alehander42> thats why i usually recommend krux's lib for the macro NimNode cases
18:22:29FromGitter<alehander42> otherwise you can try gara and say what is missing
18:22:42FromGitter<alehander42> it has some support for custom type unpackers
18:23:24*lf-araujo quit (Remote host closed the connection)
18:23:35FromGitter<alehander42> probably the biggest thing missing is compile time checking of exhaustiveness of the patterns
18:24:22FromGitter<alehander42> but i havent used it lately, so not sure what might be the blockers for you
18:25:56*lf-araujo joined #nim
18:26:04FromGitter<arnetheduck> ah, right, it might have been exhaustiveness that was the deal-breaker - result is used for explicit error checking, so it's kind of important that cases are covered or explicitly discarded
18:27:26FromGitter<alehander42> yeah i have to see ane xample usage
18:27:43FromGitter<alehander42> but i agree with krux02 that it would be good to have well-designed pattern matching
18:27:58FromGitter<alehander42> i still hope that it can be added as a library
18:28:06FromGitter<alehander42> maybe with some more hooks for the compiler
18:29:01krux02I hope that it can be done without hooks into the compiler.
18:29:24krux02I don't see any reason why it should not be possible with the macros system that we have today.
18:29:26FromGitter<alehander42> what i mean is that it might need another macro helper or something
18:29:33FromGitter<alehander42> that kind of thing
18:29:51FromGitter<alehander42> but yeah mostly done with macros like ast_pattern_matching and gara
18:29:58FromGitter<alehander42> and patty
18:30:34krux02it is just the (compile time) performance, the syntax, and maybe the coverage tests that can be implemented better in the compiler.
18:30:48FromGitter<alehander42> otherwise i guess for a specific case like errors, one can design easily an euxhastive-checked solution more tailored to them right now
18:30:52krux02but the architecture can be entirely written as macros.
18:30:57FromGitter<alehander42> but i hope they can use a general mechanism
18:31:11FromGitter<alehander42> yeah, the compile perf might be slow
18:31:31zestyrrokups: there's ..< for exclusive slices
18:31:55FromGitter<alehander42> i generate additional stuff like when clauses which are calculated again etc so i suspect that it might be not the fastest thing
18:31:58krux02zestyr: ..< does not work in all contexts, but I usee it everywhere possible.
18:32:03FromGitter<alehander42> the syntax seems almost good enough to me
18:32:31FromGitter<alehander42> but i havent used scala's matching , so i am probably missing stuff
18:33:14krux02I also think that the pattern matching code can be optimized, when two patterns have a common prefix, so that the prefix isn't checked multiple times.
18:33:20krux02anyway, I have to go.
18:33:51FromGitter<arnetheduck> zestyr, those are not exclusive slices though, just inclusive slices where the last element has been decremented
18:34:47FromGitter<alehander42> yes and we can generate case statements more often, at least i generate if-s all the time
18:36:47FromGitter<arnetheduck> ... and have the case statements be translated back to if sequences by the underlying compiler / ir :)
18:37:15FromGitter<alehander42> hmm i thought they are usually compiled to goto-tables or something? :P
18:37:27FromGitter<alehander42> or is this old
18:38:12FromGitter<rokups> I keep forgetting all those magic operators. `1..<^5` seems like is starting to get out of hand 😆 but yeah fair enough
18:38:55FromGitter<alehander42> what are you writing
18:38:56FromGitter<alehander42> btw
18:39:30zestyrarnetheduck: that's true, but in most cases it should result in the same
18:39:47moigagooPMunch: that optionutils thing looks sweet. Haven't tried it, but I already want it (at least, a part of it) in the stdlib. Thanks!
18:41:17FromGitter<arnetheduck> compilers turn both consecutive if's and case's into the equiv of case if it's possible to do so, then choose table or not on top - it's rarely possible though..
18:41:54FromGitter<alehander42> but do they turn if-s into case with nested case if possible?
18:43:00FromGitter<alehander42> because i imagine that case sometimes
18:43:00*clyybber quit (Quit: WeeChat 2.5)
18:45:55FromGitter<arnetheduck> not sure how smart it is, just know that I've seen it go both ways - turn case into if and if into case. rarely have I seen it generate tables, I think there are problems with that on modern architectures ⏎ (predicitve execution and all that)
19:12:18*PMunch joined #nim
19:19:52ZevvPMunch: wow, you're in deep :) `assert(statement[0][0][i][0].kind == nnkIdent)`
19:20:03Zevvresult[0][6][0][0][0][0][1].add
19:20:13PMunchHuh?
19:20:33Zevvyou can't do that. it hurts
19:20:39Zevvit's like ******p++ :)
19:21:00PMunchOh you're looking at the code for optionsutils :P
19:21:26PMunchI don't know what you're talking about result[0][6][0][0][0][0][1].add statement[0][0][i][0] is totally clear :P
19:21:46Zevvoh ok, I'll believe you on this one
19:22:04Zevvmaybe you can draw me a little picture with crayons some time :)
19:22:17PMunchHaha, I'm just kidding, it's pretty nasty stuff
19:22:35PMunchBut since it's [0][6] I guess this is accessing the body of a procedure
19:22:54Zevvoh yeah I do see where it comes from, I'm just trollin' about
19:23:28ZevvI heard norwegians like that kind of stuff
19:23:56PMunchHaha, yeah the Norwegian trolls :P
19:30:51*dwdv quit (Quit: quit)
19:33:02*nsf joined #nim
19:51:07*ertp07 quit (Ping timeout: 244 seconds)
19:51:53*ertp07 joined #nim
20:04:23noonienhow can i get rid of `Warning: 'result' might not have been initialized [Uninit]`? result is an array[10, byte], which i iterate and assign 10 bytes to it
20:06:06krux02noonien: [Uninit] usually gives you a hint on tha warning category that you are able to disable.
20:06:44krux02but you probably better fix your code to get the warning disappear
20:07:20Zevvwell, he mentions he *does* iterate and assign
20:07:28Zevvnoonien: doe you have an example snippet?
20:09:36*Trustable joined #nim
20:15:58noonienwell, i want to fix the code
20:16:00noonienZevv: just a second
20:17:17noonienhere is an example: http://ix.io/1NlG
20:17:35noonieni don't want to turn off the warning, but fix the code
20:17:55ZevvI don't get a warning - what version Nim are you using?
20:18:51noonienNim Compiler Version 0.20.99, yesterdays nightly
20:19:28noonienbtw, i'm compiling with `nim c --verbosity:3`
20:19:48Zevvwell, there it is
20:20:25ZevvI'd say you hit a bug here - warnings should come out a lower verbosity as well, I feel it might pop up *because* of the verbosity level
20:20:32Zevvbut don't take my word on it
20:20:34*narimiran_ quit (Ping timeout: 244 seconds)
20:20:48noonienare you not getting it with --verbosity:3?
20:21:29noonienhmmm, i might have hints off, i just noticed i have a config.nims, just a second
20:21:55Zevvyeah, I do get the warning now. But a regular warning should also pop up at lower verbosity levels
20:22:40noonienyeah, --skipUserCfg did nothing, stil needs higher verbosity
20:22:51noonienis that not a valid warning though?
20:23:47*ertp07 quit (Ping timeout: 245 seconds)
20:27:52*brakmic quit ()
20:33:41*PMunch quit (Remote host closed the connection)
20:35:47Zevv`
20:38:27*ertp07 joined #nim
20:46:34*Snircle joined #nim
20:46:55*oculuxe quit (Ping timeout: 244 seconds)
20:47:59*nsf quit (Quit: WeeChat 2.4)
20:49:05*oculux joined #nim
20:51:20*stefanos82 quit (Quit: Quitting for now...)
20:55:39FromDiscord_<lmariscal> Is there any way to make a discard statement optional?
20:56:25FromDiscord_<lmariscal> Cause some C libraries that I'm porting kinda overuse the returns to retun state that usually tend to be ignored
20:56:28*Trustable quit (Remote host closed the connection)
20:56:59FromDiscord_<lmariscal> And in Nim that end up being a little to many discards
20:58:00*jjido joined #nim
20:58:25FromGitter<JasperJenkins> try `{.discardable.}`
20:58:26FromGitter<juancarlospaco> `{.discardable.}` ?
21:00:53*natrys quit (Quit: natrys)
21:02:26FromDiscord_<lmariscal> Kinda forgot that pragma sorry .-.
21:07:04*solitudesf quit (Ping timeout: 244 seconds)
21:31:06*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:35:29*lf-araujo_ joined #nim
21:36:01*lf-araujo quit (Ping timeout: 276 seconds)
21:36:02*lf-araujo_ is now known as lf-araujo
21:51:53*lf-araujo quit (Remote host closed the connection)
21:56:50*lf-araujo joined #nim
22:35:51*krux02 quit (Remote host closed the connection)
22:42:57*Vladar quit (Remote host closed the connection)
22:48:47*lf-araujo quit (Quit: lf-araujo)
22:49:02*lf-araujo joined #nim
23:32:52*NimBot joined #nim
23:49:16*lf-araujo quit (Ping timeout: 276 seconds)
23:57:59*traviss joined #nim