<< 29-11-2018 >>

00:03:10Araqzacharycarter: C++ is "safer" in the sense because you cannot forget to write the 'try finally'
00:04:46*craigger quit (Quit: bye)
00:07:54*craigger joined #nim
00:20:35*craigger quit (Quit: bye)
00:23:02*zachk quit (Read error: Connection reset by peer)
00:23:17*kapil____ quit (Quit: Connection closed for inactivity)
00:23:24*craigger joined #nim
00:23:35*zachk joined #nim
00:24:52*zachk quit (Changing host)
00:24:53*zachk joined #nim
01:04:14*literal quit (Read error: Connection reset by peer)
01:19:43FromGitter<arnetheduck> I posit that the vast majority of the std lib is not exception safe, and makes no attempt at any kind of error handling, leading to resource leaks in the face of any error.. just search for `open` and `close` and you'll find tonnes of code which is not protected.. this is fine because nim is rarely used in any kind of long-running processes - in a script that opens <50 files it doesn't simply matter
01:23:32FromGitter<arnetheduck> even the very core of the language (`system.nim`) has these issues - https://github.com/nim-lang/Nim/issues/9657 - it is simply not part of nim culture to do any kind of error handling
01:28:35FromGitter<arnetheduck> perhaps this is why the supervisor idea is so popular - you run the app until it crashes - which frees up all resources - then you just restart it again
01:50:35*xace quit (Ping timeout: 268 seconds)
01:50:37*ng0 quit (Quit: Alexa, when is the end of world?)
02:23:43*tribly quit (Quit: WeeChat 2.3)
02:24:43*tribly joined #nim
02:28:02*zachk quit (Quit: Leaving)
02:35:40*xace joined #nim
02:51:48*kungtotte quit (Remote host closed the connection)
03:06:26*vlad1777d quit (Ping timeout: 268 seconds)
03:07:41*banc quit (Quit: ZNC - http://znc.in)
03:16:37*leorize joined #nim
03:23:53*banc joined #nim
03:43:42*abm quit (Ping timeout: 250 seconds)
03:55:03*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:00:10*theelous3_ quit (Ping timeout: 250 seconds)
04:04:59*dddddd quit (Remote host closed the connection)
04:25:14*leorize quit (Quit: WeeChat 2.2)
04:45:16*endragor joined #nim
04:48:07*endragor quit (Remote host closed the connection)
04:48:16*endragor joined #nim
05:16:29*nsf joined #nim
05:35:41*stefanos82 joined #nim
05:36:04*narimiran joined #nim
06:25:50*NimBot joined #nim
06:32:22FromGitter<gogolxdong> What's the difference between pbkdf2 and hkdf?
06:34:17FromGitter<gogolxdong> after settling sha256.hmac , there is an issue of my nim code of hkdfExpand, which expected implement specification ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bff8869f59704348e1f78b6]
06:36:10FromGitter<gogolxdong> what's the meaning of `|` there `or` or concatenation?
06:47:31FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bff8b837d26db1e8312476a]
07:04:28*narimiran quit (Remote host closed the connection)
07:14:02Araqarnetheduck: you can posit all you want but you're wrong. the reason the stdlib avoids try finally is that it is expensive for the C target
07:18:16Araqand it's also very telling that the fix for #9657 is to swallow the error message
07:18:38FromGitter<gogolxdong> Is there anything inconsistent with the RFC?
07:20:05Araqon my linux machine every Gtk app prints crappy warnings in the terminal. Because it's written in C and C lacks exceptions, so "dump the error message somewhere and try to continue" is the only option they have in practice.
07:20:50Araqgogolxdong: which RFC?
07:29:18FromGitter<gogolxdong> https://tools.ietf.org/html/rfc5869
07:33:20*krux02 joined #nim
07:37:08*Vladar joined #nim
08:01:06FromGitter<gogolxdong> correct the concatenated const to octet , result still varies.
08:01:39FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bff9ce3a115c91ef7ade85e]
08:06:01Araqnot my expertise, sory
08:08:17FromGitter<gogolxdong> no problem, it is rarely to be reinvented.
08:19:11*zakora joined #nim
09:03:09*floppydh joined #nim
09:06:14*Vladar quit (Remote host closed the connection)
09:08:04*Sembei quit (Read error: Connection reset by peer)
09:09:08*Sembei joined #nim
09:09:29*kapil____ joined #nim
09:11:18FromGitter<alehander42> i want to never log out of the forum, is there such an option
09:15:58serialdev[m]Use Riot.im @alehander42 through matrix you never log out
09:16:18serialdev[m]https://riot.im/app/#/room/#freenode_#nim:matrix.org
09:18:11FromGitter<narimiran> forum != irc
09:21:59serialdev[m]early morning mind fog 😅
09:22:28*deathpoison joined #nim
09:29:34*ng0 joined #nim
09:29:44FromGitter<alehander42> yeah, I never log out from gitter too :D
09:30:06FromGitter<alehander42> I actually wondered about riot.im, what is its + e.g. compared to discord
09:32:07FromGitter<narimiran> riot is a matrix client
09:32:56FromGitter<alehander42> and matrix is nice, because decentralizatn
09:32:58FromGitter<alehander42> right
09:35:52Araqhmmm I don't need to debug this
09:37:30FromGitter<mratsim> this: self?
09:38:20Araqno --incremental:on
09:38:44Araqit's "immediately obvious" why it has bugs
09:39:10Araqand here "immediately" means it took me one week
09:42:38FromGitter<gogolxdong> @mratsim you can help me with hkdfExpand
09:46:49FromGitter<mratsim> `|` means `or` I think, I’m looking into pbkdf2 specs and they use `||` for concat
09:47:04FromGitter<mratsim> https://tools.ietf.org/html/rfc2898
09:47:47FromGitter<gogolxdong> so it's bitor?
09:47:50FromGitter<mratsim> yes
09:54:05FromGitter<gogolxdong> (where the constant concatenated to the end of each T(n) is a single octet.) bitwise or doesn't make sense, two RFC might be out of different authors, prev and info are seq[uint8] , how to use bitwise or.
09:55:57FromGitter<gogolxdong> This is it's Go implementation ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bffb7adf59704348e209595]
09:57:03FromGitter<gogolxdong> I made Nim comparable to this with update*()
09:57:21FromGitter<alehander42> Araq: I'll try today to make a simple ref nil checking prototype at least for some cases, to see if it seems reasonabl
10:02:03FromGitter<gogolxdong> I want to finish HKDF and PR to nimcrypto, help to check this
10:03:18*druonysus quit (Ping timeout: 268 seconds)
10:05:19*druonysus joined #nim
10:05:19*druonysus quit (Changing host)
10:05:19*druonysus joined #nim
10:09:24Araqalehander42: nice
10:11:11*dom96_w joined #nim
10:16:32FromGitter<mratsim> @gogolxdong ugh, if the ietf is not consistent with their own notation that’s bad :/
10:19:12FromGitter<mratsim> here is another one: https://github.com/seb-m/CryptoPill/blob/master/CryptoPill/hkdf/hkdf.c#L233-L246 ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bffbd20d24f9324d26f9f83]
10:20:01FromGitter<gogolxdong> basically the same ,right?
10:20:42FromGitter<mratsim> looking, but instead of @[i] for the final byte, just use [i]
10:21:13FromGitter<mratsim> also result should be seq[byte] not string
10:21:46FromGitter<mratsim> there is an extra update in the loop in the C impl I linked
10:22:10FromGitter<gogolxdong> but expression 'i' is of type: uint8 ⏎ proc updateT: bchar (hmctx: var HMAC; data: openArray[T]) ⏎ first type mismatch at position: 2 ⏎ required type: openarray[T: bchar] [https://gitter.im/nim-lang/Nim?at=5bffbdd2a115c91ef7aeb2fa]
10:22:44FromGitter<gogolxdong> update requires openarray
10:22:56FromGitter<mratsim> [byte i]
10:23:19FromGitter<mratsim> bchar is a thing? lol
10:24:23*zakora quit (Quit: WeeChat 2.2)
10:26:39FromGitter<gogolxdong> where is the extra update? it's remains the same with changing @[i] to [i]
10:30:34FromGitter<mratsim> ah sorry I didn’t see your concat
10:31:00FromGitter<mratsim> btw @alehander42 I finished my JIT-ted BrainfuckVM here: https://github.com/mratsim/jitterland/blob/master/bfVM_v03_jit.nim
10:31:16*d_s left #nim (#nim)
10:37:50AraqAssembler[Reg_x86_64] what is this magic?
10:41:00Araqoh it's part of your code
10:41:55FromGitter<alehander42> @mratsim nice, does it actually show better performance (I know its just a learning exercise but still)
10:42:47FromGitter<alehander42> btw today I wondered about a very weird optimization, e.g. if somebody changes rarely a boolean-hotspot-variable: a boolean variable which is very oftenly used for branching
10:43:29FromGitter<alehander42> does it exist an optimization which rewrites/replaces the function pointer to such bodies with a specialized no-branch versions
10:44:56FromGitter<alehander42> probably this doesn't make a lot sense with branch prediction
10:46:16Araqthat's what many JITs do, yes
10:47:00Araqbut it needs to be done carefully, self-modifying code needs to flush the instruction caches
10:47:28Araqand it's also a security nightmare IMHO, but every JIT is
10:47:46*abm joined #nim
10:52:16*abm quit (Client Quit)
10:53:35FromGitter<mratsim> @alehander42 yes, 2.5x perf improvement on this bench: https://github.com/mratsim/jitterland/blob/master/brainfuck_src/kostya_bench.bf
10:53:51FromGitter<mratsim> and 10x perf improvement on mandelbrot fractal: https://github.com/mratsim/jitterland/blob/master/brainfuck_src/mandelbrot.bf
10:54:17FromGitter<mratsim> the first bench is just rpinting ZYWVX … DCBA
11:01:01*abm joined #nim
11:05:45FromGitter<mratsim> @alehander42 predictable branch have no cost. Or used to have no cost due to speculative execution
11:05:57FromGitter<mratsim> with spectre, meltdown and L1TF I’m not sure anymore
11:06:02*dddddd joined #nim
11:06:45FromGitter<mratsim> i.e. for predictable branches (90%+ branch correct branch prediction) if/else is faster than CMOV
11:06:56FromGitter<alehander42> yes, it makes sense
11:07:18FromGitter<alehander42> but maybe in a world with spectre/meltdown new opt might be useful
11:07:23FromGitter<mratsim> ah, it changed with Skylake: https://github.com/xiadz/cmov
11:10:34*vlad1777d joined #nim
11:24:37FromGitter<alehander42> Araq, how do you usually echo PNodes/PTypes etc
11:25:23Araqdebug(x) or typeToString(t) and $node
11:29:45FromGitter<alehander42> hm I tried $node and i couldn't find such for PNode
11:31:39FromGitter<alehander42> ah render
11:36:10FromGitter<alehander42> do you prefer text or tree representation usually actually
11:43:07*theelous3_ joined #nim
11:48:37*nolanv joined #nim
12:09:27FromGitter<alehander42> `ref.nim(9, 11) Error: can't access field: a a nil` ⏎ ok, my prototype works for simple cases and simple if isNil checks
12:10:44FromGitter<narimiran> someone posted our Advent of Nim to HN: https://news.ycombinator.com/item?id=18559449
12:25:22stefanos82congrats Nim team :D you are #1 on HN! ^_^
12:27:47FromGitter<narimiran> wow, i didn't even notice it is in 1st place
12:29:55FromGitter<narimiran> whoever wrote that blog post must be a great guy! :P :D
12:39:53FromGitter<alehander42> Araq, I actually catch contradictions too: `if a.isNil and not a.isNil:` `Error: a can't be both nil and safe`
12:40:13FromGitter<alehander42> is this actually bad, as one might want to leave this valid (e.g. if false)
12:45:57FromGitter<arnetheduck> > the reason the stdlib avoids try finally is that it is expensive for the C target
12:47:15FromGitter<arnetheduck> fast over correct - yes, that's the culture - are you claiming somehow that the resource leaks (file handles, capped at 1024 often) go away because you do it quickly?
12:49:35FromGitter<arnetheduck> that also doesn't explain why sometimes, it's used and sometimes it's not (for open/close pairs)
12:51:03Araqsometimes it's bad code, sometimes it's "I know this cannot throw... argh..."
12:51:16Araq;-)
12:51:56Araqin the compiler it's "I know if this throws the compiler should die and the OS will cleanup anyway"
12:52:39Araqas I said, having an OS run your code definitely helps, but the language can't assume there is an OS
12:53:21Xespeaking of without an OS, how would you suggest compiling nim to raw webassembly without emcc?
12:53:35Xei'm looking at using nim for event sourcing code in wasm
12:54:15Xei'm willing to patch the compiler to support the webassembly environment's syscalls
12:55:04Araqbut if you have constructive suggestions I'm all ears, it's not that I love exceptions. I don't. But I found no real alternative.
12:55:39FromGitter<mratsim> I feel like this discussion comes again and again: https://github.com/status-im/nimbus/wiki/Exceptions-and-errors
12:57:19AraqXe, well with emmcc or similar tools we need to reinvent a wasm codegen which not only doesn't support exceptions, threading, IO
12:57:26Araqbut also freaking function pointers.
12:57:36Araq*without emcc
12:57:59Xeyeah half of the problem is my environment isn't javascript
12:59:25*zahary quit (Quit: Connection closed for inactivity)
12:59:30Xehmm, a thought: have nim emit c and use the c compiler emitting to webassembly with explicit annotations for the symbols that i want to import from the "real world"?
13:02:00Xelike, normal posix c
13:02:35Xewithout wasm-specific codegen, with some patch to system.nim to support the syscalls that this environment uses
13:03:11Xeor is that just not fundamentally possible in a way that implies i don't understand a lot of how the nim compiler works?
13:08:02FromGitter<arnetheduck> `I know this cannot throw... argh...` is the thing I'm worried about for status / nimbus / production-use-of-nim - all I ask for is tools (lang features) and defaults that flip "errors are hidden" to "errors are visible and must be explicitly ignored" - much like `discard` - ie a developer should be allowed to explicitly ignore them, but needs help to see where that decision must be taken because it's something
13:08:02FromGitter... humans are notoriously bad at and computers are very good at.. if that becomes too onerous, it's ok - it's motivation to come up with constructs that help make it less onerous
13:09:18AraqXe, it would work
13:09:35Araqarnetheduck: ah for this I have found a nice solution.
13:09:39FromGitter<arnetheduck> they become even more important if you want to target the language for something that doesn't have the safety net of an `OS`
13:10:17Araqwe have {.push raises: [].}
13:10:52Araqthen you're forced to annotate your procs with explicit .raises annotations
13:11:01Araqto override the [] default
13:11:48Araqhowever, this feature doesn't work, but I can declare that a compiler bug and backport it to 0.19.2
13:12:21FromGitter<narimiran> "Can someone sell me Nim in few sentences if I am a D user?" pinging @timotheecour https://news.ycombinator.com/item?id=18559867
13:14:28FromGitter<arnetheduck> that's a start - and in the world view of running nim without a safety net that you can crash out of, it should be the default that you switch off - so here's a challenge then: make it the default in the std lib - it's a reasonable ask - the std lib isn't a quick-and-dirty hack / script where arguably you don't care about errors
13:14:36livcdnarimiran: easy. He can complain about Nim in polish and dom will take notes.
13:16:26FromGitter<zetashift> Can't believe the HN thread went to #1 seems weird, but hell I'll take it
13:18:16FromGitter<narimiran> livcd: lol
13:18:27FromGitter<narimiran> @zetashift me neither, and me too :D
13:19:11Araqarnetheduck: agreed.
13:20:14FromGitter<arnetheduck> it's also good motivation for you to come up with constructs that make it less onerous.. two birds in one stone :)
13:20:27FromGitter<arnetheduck> *with
13:23:47*dom96_w quit (Changing host)
13:23:47*dom96_w joined #nim
13:23:56dom96_wyay, HN
13:24:12dom96_wNice job narimiran :D
13:24:53FromDiscord_<the_ultamite_nim_fan> Hackernews loves nim, where I heard about it
13:25:27FromGitter<zetashift> that isn't miran who posted it though haha
13:25:31FromGitter<narimiran> HN usually has mixed feelings about nim ;)
13:26:09FromGitter<narimiran> @zetashift no, it wasn't me who posted it on HN, but dom96_w is referring to the blog post ;)
13:26:32dom96_wyep, narimiran wrote the blog post :)
13:26:33FromGitter<zetashift> ah yeah that makes more sense
13:26:38dom96_wbut yes, good job to the person that posted iot
13:26:39dom96_w*it
13:26:43FromDiscord_<the_ultamite_nim_fan> i think average it gets a overall positive response, but there is sometimes skepticism yea
13:27:33FromGitter<narimiran> and while we're at it: good job @mratsim for answering those HN questions!
13:28:15FromGitter<zetashift> case/style insensitivity and indentation discussions are most of the negativity
13:29:08FromGitter<mratsim> strangely there are none at the moment
13:29:22FromGitter<alehander42> indentation is silly in 2018, python is </criticism>
13:30:06FromGitter<narimiran> i've seen one comment mentioning 'case-insensitivity', but so far so good :)
13:32:44FromGitter<narimiran> btw, currently we have 24 people on our private AoC leaderboard
13:33:02FromGitter<alehander42> a link?
13:34:56FromGitter<narimiran> go here: https://adventofcode.com/2017/leaderboard/private and then enter the following code: `40415-c732e66e`
13:36:41FromGitter<narimiran> 25 :)
13:37:00*Snircle joined #nim
13:37:23FromGitter<alehander42> thanks
13:37:31FromGitter<alehander42> hm, so we upload only answers, not solutioins?
13:38:40FromGitter<narimiran> yup. (but don't try to brute-force it, they increase waiting times for submitting for every wrong answer ;))
13:38:48*leorize joined #nim
13:40:01FromGitter<alehander42> i guess they require answer for a big input
13:41:04*leorize quit (Client Quit)
13:41:30FromGitter<narimiran> you can try to solve any of 75 tasks from the previous three years to get an idea how things look/work (go to Events, then choose a year)
13:41:54FromGitter<alehander42> oh, no time
13:41:54FromGitter<alehander42> :D
13:42:20*leorize joined #nim
13:42:28FromGitter<narimiran> who said there are no case-insensitivity comments? here you go: https://news.ycombinator.com/item?id=18560018 :D
13:43:04dom96_wD:
13:43:25FromGitter<narimiran> @alehander42 it's just a few clicks and you'll see the inputs ;)
13:47:57FromGitter<alehander42> Araq: now my prototype works for some loops too: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bffee0d6621313894392537]
13:48:06dom96_whttps://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality
13:48:07dom96_wThis is wrong
13:48:22dom96_wIt calls it "partial case insensitivity" when it should be "partial style insensitivity"
13:48:36FromGitter<alehander42> ops, the error is on line `echo b.a` *
13:50:43FromGitter<alehander42> the 0, 1, 2 iterations scheme seems to work nice (and it's pretty easy: I just check with map1 again and make union of map0, map1 and map2 after )
13:51:32FromGitter<alehander42> still, a lot more to do ofc
13:52:59dom96_wSo how do we argue against this? https://news.ycombinator.com/item?id=18560092
13:53:43FromGitter<zetashift> nimpretty?
13:53:50FromGitter<alehander42> well, interop with C/JS: you can't control all identifiers, because we can reuse a rich ecosystem of other lang
13:53:56dom96_wread the context
13:55:08FromGitter<alehander42> 1) they are not opposite: we can, and probably will have nimpretty for a single codebase and still make it possible to import libs not following NEP1
13:56:42dom96_wI don't think that's a valid reason. You can name your wrapper procedures whatever you want
13:57:12dom96_wproc foo() {.importc: "foo_bar".}
13:57:18*Notkea quit (Ping timeout: 250 seconds)
13:58:35FromGitter<alehander42> yeah, but renaming 100 importc-es because you don't want the default foo_bar isn't nice
13:58:53FromGitter<alehander42> well, in this case you can still reuse other nim libs which don't conform
13:59:12FromGitter<alehander42> and again, nimpretty/gofmt makes most sense for your own codebase
14:02:34*endragor quit (Remote host closed the connection)
14:02:59*PMunch joined #nim
14:05:30*nsf quit (Quit: WeeChat 2.3)
14:09:40Araqalehander42, or you use c2nim --nep1
14:11:37*Notkea joined #nim
14:13:39*endragor joined #nim
14:14:38*vlad1777d quit (Ping timeout: 245 seconds)
14:15:07FromGitter<alehander42> ah I didn't know that
14:17:36dom96_wAraq: Read HN?
14:18:06*endragor quit (Ping timeout: 250 seconds)
14:21:21Araqand then ...?
14:21:40Araqwhat's the argument? "I don't know how importc: "name here" works"?
14:21:56Araqthat's not even an argument...
14:22:52dom96_wRead this thread please: https://news.ycombinator.com/item?id=18559449
14:22:54FromGitter<alehander42> Araq: i think I found a bug in excpt.nim with my new ref-checking code
14:26:36Araqdom96_w, ok ... and now ?
14:28:11dom96_wGive a bit of care towards the points raised by these people and attempt to win them over with arguments.
14:28:19AraqI can search for the neuroscience study which proves humans think in sound, not in spelling, so "spelling matters for humans" is pretty mistaken
14:29:30Araqnot sure why that even requires a study though, it's immediately obvious for anybody with a tiny bit of self reflection
14:31:36FromGitter<alehander42> basically in `raiseExceptionEx` we never check if `e` is not nil, so `raise (something that become nil)` segfaults (I guess the idea is: this can't happen normally?)
14:32:34dom96_wHumans do. Programmers are trained to look for any small discrepancies, and this includes spelling
14:32:46dom96_wI think JoeAltmaier makes a good point
14:32:57dom96_wHow do you fight this ambiguity?
14:33:29dom96_wCase insensitivity sadly encourages it
14:36:54PMunchTo be honest I've never encountered this in my time using Nim
14:37:44PMunchIt is a valid concern, but I don't think its something that has ever caused an issue in Nim code
14:39:49PMunchThe thing is that once you get used to it you know that pidTarget and pIdTarget is the same thing, so you either relax you expectations, or you don't construct your names with this ambiguity. And besides, a "pointer to a target id" and a "scalar process id" probably don't share the same type, so the compiler should be catching that anyways if you ever used it wrong.
14:40:07*Vladar joined #nim
14:40:38FromGitter<narimiran> PMunch: copy paste this there
14:41:57dom96_wSee, now that's a beautiful argument and is exactly what I am looking for
14:41:59Araqdom96_w, programming is far too important to make every human unlearn and focus on historical mistakes made by Unix's creators
14:42:00*endragor joined #nim
14:46:11PMunchAdded it to my reply
14:46:25dom96_wAwesome. Thank you PMunch
14:46:37FromGitter<narimiran> +1
14:46:58*endragor quit (Ping timeout: 268 seconds)
14:47:15PMunchdom96_w, saw your reply about the Dev room idea for next years FOSDEM by the way (was offline but read the IRC log later that day)
14:47:48PMunchI certainly would be interesting
14:48:57dom96_wReplied to your comment with something that popped into my head regarding nimpretty
14:49:04dom96_wLet me know if it makes sense
14:49:12dom96_wI think it's another advantage of style insensitivity
14:51:23Araqneither gofmt nor nimpretty change the spellings btw, I don't know why it comes up. it's true though that tooling can rename things if the name doesn't matter to begin with...
14:52:32Araqso yeah, gofmt can't change it and nimpretty *could*
14:52:58dom96_wNimpretty *should* change the spellings
14:53:06dom96_wconvention is to use camelCase
14:53:09dom96_wso let's make that the case
14:53:40PMunchIt should also make sure you don't use two different casings of the same identifier
14:53:42dom96_wnarimiran: https://news.ycombinator.com/item?id=18560290
14:53:44dom96_wWe need to clairfy this
14:53:58*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:55:10FromGitter<narimiran> dom96_w fastest *player* on *leaderboard* — the one who has the most points
14:55:33FromGitter<mratsim> I don’t like camelCase
14:55:47FromGitter<mratsim> even dom you’re using dom96_w instead of dom96W
14:55:56FromGitter<narimiran> i.e. the one who will be awake at 5 a.m. UTC for 25 days :)
14:56:25AraqI don't like underscored, they suck on every font I ever used
14:56:34Araq*underscores
14:56:44FromGitter<mratsim> use better fonts? :P
14:56:48Araqhere_try to_tokenize this mess
14:56:54FromGitter<narimiran> @alehander42 should i leave this one to you to answer? :) https://news.ycombinator.com/item?id=18560497
14:58:30FromGitter<alehander42> I can try, thank you, I was just talking about adt to a friend :D
14:58:32FromGitter<alehander42> adt-s*
14:59:11Araqmratsim: and what font would that be?
14:59:28Araqthey are universally rendered below the current line...
15:00:19Araqheck, some programming languages allow for the minus in identifiers because underscores suck so much
15:00:29Araqso that you can write foo-bar-baz
15:00:38FromGitter<zacharycarter> I just don't want to see the C/C++ pattern
15:01:01FromGitter<zacharycarter> where identifiers start having underscore prefixes / suffixes
15:01:04*Snircle joined #nim
15:01:50FromGitter<zacharycarter> and inferred meaning
15:01:57FromGitter<mratsim> I use Inconsolata
15:02:11PMunchDitto
15:02:19PMunchIt's a pretty good font
15:02:44PMunchInconsolata for Monospace, M+ for UI font
15:03:10FromGitter<mratsim> Menlo is excellent as well
15:03:43FromGitter<narimiran> iosevka here (once you get used to its narrowness)
15:04:05leorizesame here :)
15:04:28*stefanos82 quit (Remote host closed the connection)
15:05:12AraqF# moved from under_scores to fooBar iirc
15:05:23FromGitter<alehander42> I liked the monaco font before
15:05:53*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:06:12FromGitter<alehander42> @narimiran I tried to add an overview in https://news.ycombinator.com/item?id=18560497 ping me if you think it should be fixed
15:06:43FromGitter<mratsim> Apparently there is a mono font called Nimbus :D - https://en.wikipedia.org/wiki/Nimbus_Mono_L
15:06:43FromGitter<alehander42> I am not sure about the links: many people put them in `[i]` on HN
15:07:26FromGitter<narimiran> @alehander42 your links are fine the way they are now
15:08:18*endragor joined #nim
15:08:32Araqhttps://whatheco.de/2011/02/10/camelcase-vs-underscores-scientific-showdown/
15:08:36*Snircle_ joined #nim
15:08:39*dom96_w joined #nim
15:09:00FromGitter<alehander42> which reminds me, @andreaferretti if I add something like the patty's `variant` macros to gara, maybe I should move the lib to an org where more people can maintain/improve it? (e.g. you or somebody else interested)
15:09:35FromGitter<zetashift> I use iosevka too, and didn't F# switch because of the C# styleguide?
15:11:21FromGitter<mratsim> @Araq, how do you measure programmer performance? I don’t have a `rdtsc()` clock in my head :P
15:11:47*Snircle quit (Ping timeout: 240 seconds)
15:12:26*endragor quit (Ping timeout: 244 seconds)
15:14:36FromGitter<mratsim> https://www.computer.org/csdl/proceedings/icpc/2010/4113/00/4113a196-abs.html
15:15:01FromGitter<mratsim> `While results indicate no difference in accuracy between the two styles, subjects recognize identifiers in the underscore style more quickly.`
15:15:19FromGitter<zacharycarter> Araq - thank for the explanation regarding the exceptions in Java / Nim vs C++ destructors and what the argument was about
15:17:04Araqmratsim: it's not about "recognizing" identifiers though. it's about "mental tokenization", which I claim is MUCH better with camelCase
15:17:52Araqit's the point of camelCase to "compress" the identifier so that the structure is more visible
15:18:26FromGitter<alehander42> a-b is absolutely more visible
15:18:34FromGitter<mratsim> not in my experience, I read faster the underscores while I spend mental energy to separate words in camelCase
15:18:36FromGitter<alehander42> but I think nobody can win in those discussions
15:18:42FromGitter<alehander42> that's why conventions exist
15:18:55Araqthat's also why we use 'i' for iteration variables and not 'counter'
15:19:47FromGitter<alehander42> because of convention, not because they are short
15:19:51FromGitter<alehander42> if you write y
15:19:57FromGitter<alehander42> it would be more confusing than index
15:20:16Araqthe convention emerged because shortness is a virtue
15:20:37FromGitter<alehander42> it depends
15:20:43*dom96_w quit (Changing host)
15:20:43*dom96_w joined #nim
15:20:47FromGitter<alehander42> in limited local contexts yes
15:20:56FromGitter<alehander42> but you wouldn't call a global constant i
15:21:11dom96_wwow, C++'s behaviour when it comes to assigning int to a string is incredibly subtle
15:21:50FromGitter<zacharycarter> the whole lack of resource closing in the stdlib though - if true - is troubling
15:22:39FromGitter<zacharycarter> I know that I personally haven't been affected by too many - at least not that I know of
15:22:54Araq"if true" we would have bug reports about them and would fix them...
15:23:17FromGitter<zacharycarter> yeah - that's where my head is at too
15:23:56FromGitter<alehander42> Araq: the prototype ref nil checking works so well, I am busy fixing one of my own projects
15:24:22Araqlol, did you base it on my dfa.nim?
15:24:51FromGitter<alehander42> not yet, but I plan to maybe reuse the cfg ideas
15:25:25Araqthen how does it work?
15:26:37FromGitter<alehander42> currently I am directly doing it on the AST(I know: not sound), but I wanted to just test that the thing I have in mind works
15:27:17Araqyou can make it sound with the AST too
15:27:36FromGitter<mratsim> woooooww a Wild comment by @Araq in 2009: http://yosefk.com/blog/ihatecamelcase.html#comment-258
15:28:55Araqthat must have been a long time ago
15:29:30FromGitter<alehander42> Araq: maybe. for loops I use the check 0 1 and 2 iterations idea from the paper you linked
15:29:45FromGitter<alehander42> instead of some kind of fixpoint analysis
15:31:57FromGitter<alehander42> I might upload a simple WIP commit later
15:36:06*narimiran joined #nim
15:44:32FromGitter<alehander42> btw is `isNil` magic, somehow like `echo` etc? what I mean is, can I be sure it's not somehow overloaded
15:45:16*stefanos82 joined #nim
15:48:10Araqobviously not, but overloaded syms don't have .magic = mIsNil
15:51:29FromGitter<alehander42> aha, that's what I have to check!
15:51:55*abm quit (Quit: Leaving)
15:52:21FromGitter<alehander42> and probably mAnd and mOr too etc
15:53:41Araqyup
15:54:04FromGitter<zacharycarter> @alehander42 - is this for the language you're writing with Nim?
15:56:56FromGitter<alehander42> ahh now genMagic makes sense
15:59:01livcddom96_w: btw what do you do @ FB ?
15:59:08*endragor joined #nim
15:59:43*deathpoison quit (Quit: Leaving.)
16:00:05FromGitter<alehander42> @zacharycarter no, I am trying to catch usage of possibly nil refs on compile time in the nim compiler
16:01:51*seni joined #nim
16:07:40*endragor quit (Ping timeout: 268 seconds)
16:13:00*abm joined #nim
16:25:21*nsf joined #nim
16:25:56Araqyay, somebody destroyed my ID mechanism in the compiler
16:26:59*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:31:58*dom96_w joined #nim
16:34:32*seni quit (Quit: Leaving)
16:37:23FromGitter<zetashift> if I have an identifier in foo.nim that clases with a identifier in system.nim, how can I force the one in foo.nim?
16:37:24FromGitter<arnetheduck> I have to wonder.. if someone added up all the time spend by developers discussing the relative merits of camel and underscore case, whether the minimal difference in "parsing speed" would come even close to make up for it
16:38:14leorizezetashift: `foo.<identifier>`
16:38:25leorizethe compiler would complain if you don't qualify it anyway
16:38:54FromGitter<zetashift> mhmhm I tried that but I still get the identifier not found
16:39:06FromGitter<alehander42> is it exported
16:39:34narimiranthat no export by default has bitten me sooooo many times!
16:39:46FromGitter<zetashift> yea it even shows up in auto-complete but it still isn't working
16:42:14FromGitter<zetashift> fixed it, need to read on the `export` keyword better my bad
16:48:25*dom96_w quit (Changing host)
16:48:25*dom96_w joined #nim
16:48:47dom96_wPerhaps it would make sense to create a PR for style insensitive search for ripgrep
16:53:09narimirandom96_w: i was thinking about that. this might end, ok maybe not all, but half of the comments :)
16:53:44dom96_wyeah, the remainder will require Nim plugins to add a "style insensitive" option to IDEs/editors which should be fairly trivial
16:54:28narimiranand when that is solved, "why whitespace significant" commentators will rise once again! :P
16:56:14*Trustable joined #nim
16:56:47narimiranbtw, now we have 32 players on our leaderboard! (few hours ago it was 18)
16:57:01dom96_wawesome
16:57:19dom96_wbtw I think it might be a good idea to update the blog post to clarify what "fastest" means
16:58:09narimiranok, i've commented on HN, we can add a clarification in our post if you think it is needed (i think it is clear, but i'm biased)
17:03:00FromGitter<alehander42> I don't really think that all tools understanding how to grep nim would be enough
17:03:21FromGitter<alehander42> people mostly complain it seems strange/confusing
17:03:34FromGitter<alehander42> this will never be completely fixed
17:03:41FromGitter<alehander42> its the same with python indentation
17:04:07narimiranthere is one comment on HN posted recently about how this is because we are used to other languages so we think that is the way it should be
17:04:18FromGitter<alehander42> maybe the most succesful language of the last 25 years(+ java) and people still dislike indentation often
17:04:41narimiranhttps://news.ycombinator.com/item?id=18560991
17:04:50Amun_Ra\\\\\\
17:05:11narimiranAmun_Ra: //////
17:05:19FromGitter<alehander42> so adding grepability would be great, but the goal should be to decrease the comments to e.g. 10-20% max, they would be always some
17:06:01Araqreally? that should be the goal? why not make them program in Nim because it has the best lib ecosystem
17:06:16Araqlike AI experts are kinda forced into Python
17:07:14FromGitter<alehander42> well duh
17:07:18FromGitter<alehander42> obviously
17:09:03FromGitter<alehander42> but you can be sure people using python spent mandecades arguing indentation on similar threads
17:09:27FromGitter<zetashift> still probably are but people accept it cause python is almost everywhere now
17:09:41Araqand in the meantime JS got Coffeescript
17:10:06FromGitter<alehander42> yes, and people started making this ecosystem because python people managed to defend the indentation story and to convince them it's fine
17:10:55FromGitter<alehander42> my point was exactly this: there would be always such comments, the goal should be for them to be minority compared to discussion o fbetter stuff
17:11:08Araqok, so "defend your ground" is what you are saying?
17:11:19dom96_wThat is certainly what I am saying
17:11:50dom96_wIt's significantly different when you've got people being skeptical and silence, vs. people being skeptical and being told why we disagree
17:13:59FromGitter<alehander42> that's my point, but + "don't expect that these comments would stop in the next 20 years: they just might decrease"
17:14:32*zakora joined #nim
17:14:58dom96_wIn other news: https://blog.golang.org/go2-here-we-come
17:15:19dom96_wnarimiran: what do you think about an article on nim-lang.org titled "Go 2 is already here... it's called Nim" ? :P
17:16:04Araqdom96_w, common wisdom says it's bad marketing to play down your competitors
17:16:42FromGitter<alehander42> yeah :D and you wouldn't want a crowd of people suspicious of generics
17:17:54narimirandom96_w: lol :)
17:17:56FromGitter<alehander42> maybe "Comparing Nim and Go 2", something neutral, there are interesting points e.g. contract proposal vs concepts
17:18:28narimiranbe prepared for "Nim 1.0 is already here...." ;)
17:19:55narimiranbut generally, i think our blog on nim-lang.org should have more frequent posts (and i plan to work on that)
17:20:37*PMunch quit (Remote host closed the connection)
17:24:37dom96_wAraq: is it? Most major brands do it frequently
17:24:51dom96_wWhen Apple killed the headphone jack every company started making fun of them
17:24:59dom96_wonly to kill the headphone jack next year...
17:26:56*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:27:15FromGitter<alehander42> this decision was sad and the way samsung follow the trend is also very sad
17:27:33FromGitter<mratsim> You can do AI in R, C or C++. I’m sure you will complain about either the weird syntax or the lack of Numpy
17:28:27FromGitter<alehander42> it doesn't matter if other brands do it, we don't want to diss other languages
17:29:17FromGitter<alehander42> do you want to see "Nim 1 already here, it's called Crystal, leave Nim" tomorrow?
17:29:54Xestuff like that feels like https://write.as/ieefrdfdnanwtz9d tbh
17:38:58*Ven`` joined #nim
17:39:26serialdev[m]Regarding AI aswell python is great for research/model but awful at productionizing it
17:40:05serialdev[m]just look at the mess that is tensorflow its soooo much unnecesary crud for most usecases that most likely will never need a distributed system
17:40:17serialdev[m]I feel like Nim could be that performance sugar
17:40:36serialdev[m]and also the best constrained embedded language for AI
17:42:12FromGitter<zetashift> I'm doing kaggle stuff with python which is working well, I've been meaning to try arraymancer/pytorch so I can use nim but it feels daunting mainly because the documentation(or lack thereof)
17:48:27*druonysus quit (Quit: No Ping reply in 180 seconds.)
17:48:40narimiran@zetashift @mratsim is also kaggler, but IIRC he didn't yet use his arraymancer on kaggle
17:49:35FromGitter<mratsim> my main issue with Arraymancer for Kaggle is not documentation but tooling
17:49:58FromGitter<mratsim> Especially dataframe tooling
17:50:09*druonysus joined #nim
17:50:21FromGitter<mratsim> i.e. if I have a bunch of path to images in a CSV, currently it’s hack and dirty solution
17:50:32FromGitter<zetashift> there is NimData right?
17:50:45FromGitter<mratsim> also saving models and recursive NN models
17:51:35FromGitter<mratsim> but to be fair, Keras is awful for actual load from disk workflow as well: https://github.com/mratsim/Amazon-Forest-Computer-Vision/blob/master/src/k_dataloader.py
17:51:58FromGitter<mratsim> 270 lines for a lazy loader, vs PyTorch 60 lines: https://github.com/mratsim/Amazon-Forest-Computer-Vision/blob/master/src/p_dataload.py
17:52:13FromGitter<mratsim> and this was with PyTorch 0.1 so ages ago
17:53:22narimiransolving *any* kaggle task (even just titanic or minst) in nim/arraymancer would already be a success, and something to write home about
17:54:25FromGitter<mratsim> I don’t think NimData can support this kind of aggregate at the moment: https://github.com/mratsim/home-credit-default-risk/blob/master/src/feature_engineering/fte_pos_cash.py#L37-L48
17:54:54FromGitter<mratsim> MNIST is done ;), Titanic is so much harder without a complete dataframe
17:55:10narimirandone? is it published somewhere?
17:56:05FromGitter<zetashift> wasn't MNIST one of the examples?
17:56:11FromGitter<zetashift> of arraymancer*
17:57:11FromGitter<mratsim> yes, here: https://github.com/mratsim/Arraymancer/blob/master/examples/ex02_handwritten_digits_recognition.nim
17:57:38narimiranoh, i've missed it completely, sorry
17:57:47FromGitter<mratsim> but yeah I need something to output a result CSV
17:57:55FromGitter<mratsim> Also at least an XGBoost wrapper
17:58:56FromGitter<mratsim> but right now I’m working on the low level backend for a while.
17:59:28FromGitter<mratsim> it’s been gnawing at me since about May when I implemented RNNs.
18:03:15FromGitter<mratsim> ah for regular ML I also need one-hot encoding. Sparse matrix support would be nice as well to avoid exploding RAM.
18:05:01serialdev[m]yeah might pick arraymancer for some kaggle too to see if I can spot some stuff to add
18:05:17serialdev[m]but once its all solid
18:05:22serialdev[m]we should do a nim-lang group
18:05:31serialdev[m]and compete see if we can get near the top spots
18:06:21FromGitter<mratsim> data viz is of course missing as well: either via Nim-plotly or I started something with Vega as it looked promising: https://github.com/numforge/monocle
18:07:17narimiranserialdev[m]: i haven't been on kaggle in a lot of time so things might have change, but even participating in something that isn't python/R would, i guess, already draw some attention
18:11:44serialdev[m]yeah
18:11:55serialdev[m]the higgs boson challenge was won by a guy
18:12:04serialdev[m]using common lisp on his own library
18:12:10serialdev[m]so its doable
18:12:31FromGitter<unreadable> hey, how is the nim support for calling cpp code?
18:12:41FromGitter<unreadable> i'm trying to bind this https://github.com/uNetworking/uWebSockets
18:15:52*Vladar quit (Read error: Connection reset by peer)
18:16:39*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:18:21Araqunreadable: just use jester instead
18:18:59Araqthis thing reads like a workaround for the lack of a good macro system
18:19:20*Ven`` joined #nim
18:19:29*Jesin joined #nim
18:26:32FromGitter<unreadable> does jester include websockets?
18:30:34Araqwebsockets are available as a nimble package
18:33:53*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:34:59FromGitter<unreadable> ok, thanks!
18:35:00*nsf quit (Quit: WeeChat 2.3)
18:46:03*Vladar joined #nim
18:48:44*Ven`` joined #nim
18:57:00blarghz[m]Is this a bug?
18:57:05*blarghz[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/gdaQwtojjcQjDTlZbsVJkZnZ >
18:57:21blarghz[m](I saw https://github.com/nim-lang/Nim/pull/8711 )
18:59:20FromGitter<zetashift> I don't think so since keys() is an iterator and toSeq only accepts openarrays
19:00:33AraqtoSeq also accepts iterators, I think
19:00:34FromGitter<zetashift> whoops it's keys not keys()
19:02:43narimiranyes, `toSeq` accepts iterators too
19:04:07FromGitter<zetashift> ah okay. I do remember working with tables several times and once I had to do `toSeq(table.keys)` instead of `table.keys.toSeq` but I just shrugged it off as something I did wrong
19:07:39FromGitter<zetashift> found the piece `directions = toSeq(moves.keys) ` and changing it to `directions = moves.keys.toSeq` gives me the error `Error: type mismatch: got <Table[system.string, godotcoretypes.Vector2]> ⏎ but expected one of: ⏎ proc keys(self: Dictionary): Array ⏎ proc keys(self: Dictionary): Array` [https://gitter.im/nim-lang/Nim?at=5c0038fbced7003fe1a662a8]
19:08:10Araqthat's documented, maybe read the docs
19:09:13*abm quit (Quit: Leaving)
19:10:29FromGitter<zetashift> well I did say "but I just shrugged it off as something I did wrong" just above that :P
19:10:41FromGitter<zetashift> Is it in the manual?
19:11:10Araq"limitations of the dot notation"
19:11:39Araqthough actually it's a limitation of 'untyped'
19:11:58Araqcan't typecheck untyped. maybe that's why it was named this way
19:22:34*m712 quit (Quit: bye-nyan!)
19:27:37*m712 joined #nim
19:33:44blarghz[m]Ah, so it's a known limitation. Thanks. I didn't see that part of the manual - sorry.
19:34:08blarghz[m]I only did a CTRL+F for "UFCS".
19:34:31blarghz[m]Which was a rookie error, given that I know Araq prefers "method call syntax" :)
19:36:05*nsf joined #nim
20:01:14*mavidser joined #nim
20:01:58mavidserhey. tryign to build nim 0.18 from source; can't see any build.sh to compile from there.
20:02:02mavidseram i missing something>
20:02:08mavidsers/>/?
20:06:31Araqthe tar.xz or .zip has the build.sh, if you build from github, follow the github instructions
20:07:36mavidserAraq: yeah, there wasn't one to be found. readme.txt seems a bit outdated maybe?
20:08:10mavidsercuz readme.md tells me to clone csources repo and to use the build.sh there
20:08:24*Vladar quit (Remote host closed the connection)
20:16:33FromGitter<kayabaNerve> mavidser: 0.18 is a couple of versions old. If you need it, I recommend using choosenim
20:18:05mavidserack. should have done that
20:18:17mavidserthanks
20:40:01FromDiscord_<Armaldio> Hello everyone,
20:40:01FromDiscord_<Armaldio>
20:40:01FromDiscord_<Armaldio> Any way to have standalone nim compiler ?
20:40:01FromDiscord_<Armaldio> Like I need to embed it as part of my tool but that could be usefull that the end-user doesnt have to install nim
20:59:11FromGitter<mratsim> import compiler
20:59:23FromGitter<mratsim> ah, mmmh not sure
21:01:45FromGitter<arnetheduck> Araq, another trivial seq bug for you: https://github.com/nim-lang/Nim/issues/9825 :)
21:09:15*tdc joined #nim
21:20:44*zakora quit (Quit: WeeChat 2.2)
21:27:59*nsf quit (Quit: WeeChat 2.3)
21:33:14*Trustable quit (Remote host closed the connection)
21:43:22FromDiscord_<treeform> @Armaldio, you probably want some thing like nimscript, which is a scripting language that looks like nim that you could embed.
21:43:42FromDiscord_<treeform> a nim compiler would require a C compiler to go with it too
21:43:49FromDiscord_<treeform> and a bunch of other stuff, but it could be done
21:45:57*narimiran quit (Remote host closed the connection)
21:46:48Araqtreeform: actually it's not "a bunch of other stuff", clang+Nim works and is pretty much free of dependencies
21:47:06Araqhowever, it is a huge package
21:50:06FromGitter<arnetheduck> how's the `tinyc` port doing these days?
21:52:02AraqI don't know, never found it reliable on windows
22:04:14*vlad1777d joined #nim
22:19:38blarghz[m]Stupid question: How can I do, for example, tuple unpacking at compile-time?
22:19:43blarghz[m]I read that `const (a, b) = (1, 2)` doesn't work because you can only do tuple unpacking with `var` and `let`.
22:19:50blarghz[m]But I don't understand how to use `static` now that it opens a new scope. (I saw the following pattern on some blog, but it no longer works).
22:20:07*blarghz[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/KpipyLxhnPUuZQHmYRlAvXcF >
22:22:21*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:31:29Araqdunno, it doesn't come up in "real" code :P
22:31:34FromGitter<kayabaNerve> What do you guys think about having .. also work for countdown?
22:31:40FromGitter<kayabaNerve> Currently it's a NOP
22:31:55Araqit must stay a nop. reason: basic logic.
22:32:03FromGitter<kayabaNerve> I personally think it should work for both and if you want the NOP behavior, you should type out countup.
22:32:16FromGitter<kayabaNerve> Araq: I read .. as "to".
22:32:23FromGitter<kayabaNerve> 0 to 5 is just as logical as 5 to 0.
22:32:45Araqfor i in 0..x.len-1 # ok, thanks for iterating from -1 to 0 when x is empty.
22:33:23FromGitter<kayabaNerve> So it isn't so much as the logic of the .. itself but how it's used.
22:33:38Araqyeah, it's currently used because it works.
22:34:02FromGitter<kayabaNerve> I would just say "move to ..<" which would remain as countup(). :P
22:34:15FromGitter<kayabaNerve> It's already a breaking change.
22:34:28FromGitter<kayabaNerve> That said, I do understand less breaking is better than more breaking.
22:34:41FromGitter<kayabaNerve> I also understand I am not everyone nor the BDFL. :P
22:35:43Araqyou are not even yourself
22:36:13FromGitter<kayabaNerve> What do you mean?
22:36:22Araqlet a = parseInt(stdin.readLine); let b = parseInt(stdin.readLine)
22:36:39Araqfor i in a..b # iteration order is a runtime thing and depends on the inputs
22:36:56Araq# that was never useful for anybody in the entire history of computing.
22:37:02FromGitter<kayabaNerve> Yes. That's why this is a breaking change. It turns a NOP into an OP.
22:37:15FromGitter<kayabaNerve> Then why does countdown exist?
22:37:19Araqit's not a breaking change. it's pure madness.
22:37:19FromGitter<kayabaNerve> It does have uses.
22:37:32Araqcountdown vs countup is a static, compile-time choice
22:37:39FromGitter<kayabaNerve> The reason I'm bringing it up is because of reverse array iteration.
22:37:53Araqyour proposal turns the choice to runtime. that's not only useless, it's harmful
22:38:49FromGitter<kayabaNerve> I believe it's harmful as a breaking change but not harmful as a change.
22:39:10AraqI believe you don't understand your own proposal.
22:39:35FromGitter<kayabaNerve> `..` still reads as "to". You can still have the NOP behavior by explicitly typing countup. It allows .. to be used wherever countdown can be used.
22:39:42FromGitter<kayabaNerve> I believe I have.
22:39:53FromGitter<kayabaNerve> *I do.
22:40:56*abm joined #nim
22:47:26FromGitter<mratsim> I’d rather introduce `<—` for countdown :D, that will break my libs to have random order
22:48:01FromGitter<mratsim> often I have for i in a ..< b: relying that I will not enter the loop if b < a
22:48:35FromGitter<mratsim> otherwise @alehander42 @araq “Productionized” JIT showing off Nim metaprogramming for the X86 opcode tables: https://github.com/numforge/laser/blob/master/laser/photon_jit/x86_64/x86_64_ops.nim
22:57:00FromGitter<arnetheduck> for all the claims of inclusive ranges being so hot, it's funny how popular `..<` remains ;)
22:59:29*rockcavera quit (Remote host closed the connection)
23:01:23*rockcavera joined #nim
23:06:17FromGitter<mratsim> I’m about 80% exclusive and 20% inclusive. I did stumble upon weird hacks in Python code due to exclusive ranges
23:07:34FromGitter<kayabaNerve> @mratsim I don't want to change ..< at all :P It read as to less than. If X is greater than Y, it went past that.
23:08:04FromGitter<kayabaNerve> I would like a secondary operator since `..` is a breaking/contentious change.
23:08:16FromGitter<kayabaNerve> My question is why <- over -- lol
23:08:50FromGitter<kayabaNerve> It's closer to .., Nim doesn't use it, and it still clearly communicates countdown
23:09:09Araqarnetheduck: I never claimed they are "hot", they are more expressive, logical and symmetrical.
23:10:19Araqand if you wanna improve the situation even moreso, argue for 1 based indexing ;-)
23:10:44FromGitter<kayabaNerve> @arnetheduck ..< is inclusive of the first arg, exclusive of the second.
23:10:54FromGitter<kayabaNerve> Araq oh god please no
23:11:02FromGitter<kayabaNerve> 0 makes sense. It should be 0.
23:12:03FromGitter<kayabaNerve> It's not even a comment the "first" element. It's about pointers and offsets. I feel people who support 1 based indexing are building toy langs for n00bs or don't understand the underlying concepts.
23:14:41FromGitter<arnetheduck> @Araq well, with 1-based indexing they'd actually begin to make sense :) because b-a would at least give you the number of elements
23:15:52AraqI bought tickets, they are numbered from 5 to 8. that's 8-5+1 = 4 tickets.
23:16:10Araqin your world the tickets are numbered from 5 to 9 exclusively.
23:16:18Araqit makes no sense...
23:16:37Araqyou don't have a ticket with the number 9.
23:17:02Araqbut whatever. teaching programmers basic math is impossible
23:17:49FromGitter<arnetheduck> I sold 4 tickets starting at #5. the next one I sell should be 9. makes perfect sense.
23:18:36FromGitter<arnetheduck> http://carlosfernandezgallardo.com/wp-content/uploads/2014/07/6o9.png
23:26:19*stefanos82 quit (Remote host closed the connection)
23:26:20*federico3 quit (Remote host closed the connection)
23:27:06*Calinou quit (Remote host closed the connection)
23:27:29*federico3 joined #nim
23:28:15*Calinou joined #nim
23:32:21FromGitter<brentp> from a c-api, I have a pointer to a `char *` that has effectively `$n` fixed-length strings where some are `\0` padded to make up length. whats the fastest way to get this into `seq[string]`?
23:32:39FromGitter<brentp> it seems that `cStringArray` does not really apply here.
23:37:09FromGitter<kayabaNerve> Iterate over each element and add them to the seq. To convert from a cstring to a string, use $.
23:37:32FromGitter<kayabaNerve> Since you know the amount, you can call newSeq and set each element instead of adding them.
23:46:19FromGitter<brentp> yeah. ok. basically doing that. thought I might be able to split and just rely on null termination.
23:47:10*zachk joined #nim
23:47:36*zachk quit (Changing host)
23:47:36*zachk joined #nim