<< 01-09-2019 >>

00:00:01*junland quit (Client Quit)
00:01:42*junland joined #nim
00:07:51*junland quit (Quit: %ZNC Disconnected%)
00:09:07*junland joined #nim
00:10:34*junland quit (Client Quit)
00:11:15*junland joined #nim
00:12:39*nsf quit (Quit: WeeChat 2.5)
00:12:42*junland quit (Client Quit)
00:13:52*junland joined #nim
00:14:33*junland quit (Client Quit)
00:15:03*endragor joined #nim
00:15:12*junland joined #nim
00:20:30*endragor quit (Ping timeout: 258 seconds)
00:21:17*junland quit (Quit: %ZNC Disconnected%)
00:22:12*junland joined #nim
00:25:17*junland quit (Client Quit)
00:26:27*junland joined #nim
00:50:00*Hideki joined #nim
00:54:24*Hideki quit (Ping timeout: 244 seconds)
01:13:01*ZORR0W quit (Read error: Connection reset by peer)
01:18:36*ZORR0W joined #nim
01:20:26*Hideki joined #nim
01:21:40*Hideki quit (Remote host closed the connection)
01:21:55*Hideki joined #nim
01:31:10*junland quit (Quit: %ZNC Disconnected%)
01:32:57*junland joined #nim
02:08:11*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:09:03*laaron joined #nim
02:12:39*laaron quit (Client Quit)
02:15:38*laaron joined #nim
02:42:14*fatGuy joined #nim
02:42:43*fatGuy quit (Remote host closed the connection)
02:49:15*owl_000 joined #nim
03:01:06*laaron- joined #nim
03:01:24*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
03:26:29FromDiscord_<Shield> is something wrong with toBin? I keep getting type mismatch and that it expected biggestInt
03:40:53*chemist69 quit (Ping timeout: 252 seconds)
03:42:55*chemist69 joined #nim
04:08:21*endragor joined #nim
04:16:25*ZORR0W quit (Ping timeout: 244 seconds)
04:17:25*laaron- quit (Quit: ZNC 1.7.1 - https://znc.in)
04:18:22*laaron joined #nim
04:18:37*ZORR0W joined #nim
04:21:02*endragor_ joined #nim
04:21:03*endragor quit (Read error: Connection reset by peer)
04:25:11*Jjp137 quit (Ping timeout: 268 seconds)
04:37:32*Jjp137 joined #nim
04:37:41*endragor_ quit (Remote host closed the connection)
04:45:05FromGitter<syrusakbary> Hi everyone!
04:45:19FromGitter<syrusakbary> I think it could be very interesting to add wasm/wasi support for Nim!
04:45:44FromGitter<syrusakbary> Is anyone working on that?
04:50:52*alexander92 quit (Ping timeout: 245 seconds)
05:08:24*alexander92 joined #nim
05:08:59*endragor joined #nim
05:13:23*endragor quit (Ping timeout: 245 seconds)
05:15:08*endragor joined #nim
05:33:45FromGitter<awr1> reccomended you use clang wasm backend
05:43:02*solitudesf joined #nim
06:01:45rayman22201@syrusakbary Also see this recent forum thread. Particularly the last post: https://forum.nim-lang.org/t/4049
06:06:01*narimiran joined #nim
06:28:41*actuallybatman quit (Ping timeout: 244 seconds)
06:35:12*nsf joined #nim
06:39:16*Hideki quit (Remote host closed the connection)
06:39:22*solitudesf quit (Ping timeout: 246 seconds)
06:40:16*Hideki joined #nim
06:44:37*Hideki quit (Ping timeout: 245 seconds)
06:45:09*actuallybatman joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:48*gmpreussner joined #nim
07:07:07FromGitter<arnetheduck> typical issue where wasm beats js, and js causes maintenance overhead that adds up: https://github.com/nim-lang/Nim/pull/12022
07:08:47FromGitter<syrusakbary> Thanks!!
07:08:47*ZORR0W quit (Read error: Connection reset by peer)
07:09:32FromGitter<syrusakbary> There is also a very good use case on targeting WebAssembly+WASI to create a universal wasm binary, that can be run outside of the browser in any operating system or platform
07:09:38FromGitter<syrusakbary> More info: https://wasmer.io/
07:09:42*dddddd quit (Remote host closed the connection)
07:10:10FromGitter<syrusakbary> I would love to help on making nim to adopt wasm+wasi so the universal binaries can run with Wasmer!
07:10:27FromGitter<awr1> wasm is becoming the new JVM
07:10:53FromGitter<syrusakbary> Indeed! Exciting times :)
07:12:49*Hideki joined #nim
07:14:32*ZORR0W joined #nim
07:26:23*Hideki quit (Ping timeout: 258 seconds)
07:48:14*actuallybatman quit (Ping timeout: 258 seconds)
08:03:33*Vladar joined #nim
08:15:07*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
08:15:55*laaron joined #nim
08:43:48*laaron quit (Remote host closed the connection)
08:48:56*laaron joined #nim
08:49:46*ng0 joined #nim
08:52:21*endragor quit (Remote host closed the connection)
09:10:45*laaron quit (Remote host closed the connection)
09:12:06*solitudesf joined #nim
09:12:57*laaron joined #nim
09:15:59FromGitter<mratsim> @awr1: ⏎ ⏎ > @awr1 ⏎ a matter of which i've been perpetually confused w/r/t nim is whether `string` or `seq[byte]` should be used for binary data, b/c i feel like i've seen both ⏎ ... [https://gitter.im/nim-lang/Nim?at=5d6b8c4f0d4b1f5d88962fc0]
09:16:33FromGitter<mratsim> and use seq\[byte\], alternatively if you have time to kill you can read this RFC: https://github.com/nim-lang/RFCs/issues/32
09:22:20FromGitter<awr1> stdlib should have a function to convert
09:23:05FromGitter<awr1> if `string` is essentially just `distinct seq[byte]`
09:23:50FromGitter<awr1> also i did read that earlier yesterday
09:28:06FromGitter<awr1> in terms of binary data it would also be useful if nim had a more proper slice type, e.g. https://github.com/nim-lang/RFCs/issues/12
09:35:54FromGitter<awr1> speaking of slices, i don't get what `HSlice[T, U]` is useful for
09:37:24FromGitter<awr1> versus `Slice[T]`
09:37:46FromGitter<awr1> why would you want to have the upper and lower bound be disparate types?
09:41:53*nsf quit (Quit: WeeChat 2.5)
09:59:10lqdev[m]it's pretty useful as a Pair type
10:12:33*ZORR0W quit (Ping timeout: 245 seconds)
10:14:31*ZORR0W joined #nim
10:27:32*alexander92 quit (Ping timeout: 245 seconds)
10:42:41*endragor joined #nim
11:01:07*dddddd joined #nim
11:06:25ehmrythere is a PR for Nimble support in Nixpkgs - https://github.com/NixOS/nixpkgs/pull/67878
11:11:25FromGitter<mratsim> HSlice was introduce to support BackwardsIndex
11:23:33*Hideki joined #nim
11:27:46*Hideki quit (Ping timeout: 246 seconds)
11:29:26*endragor quit (Remote host closed the connection)
11:30:29enthus1astdoes one has written / aware of a config file parser like apache or nginx?
11:31:52enthus1astmaybe the yaml module would be a good fit but it seems a little broken lately
11:43:01*Hideki joined #nim
11:43:27*ZORR0W quit (Quit: leaving)
11:44:57*Tongir joined #nim
11:50:24*tobbez quit (Ping timeout: 252 seconds)
11:50:38*tobbez joined #nim
11:57:15*theelous3 joined #nim
12:04:22TongirHey folks, anybody have any preferable libraries for creating html templates that works with any builds >= 0.20
12:07:08*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
12:07:39*laaron joined #nim
12:30:52*narimiran quit (Ping timeout: 245 seconds)
12:31:54*nsf joined #nim
12:33:22*solitudesf quit (Ping timeout: 245 seconds)
12:34:22*laaron quit (Remote host closed the connection)
12:36:58*laaron joined #nim
13:16:47*endragor joined #nim
13:32:02*MarderIII joined #nim
13:43:49*MarderIII is now known as warkruid
13:51:59*Trustable joined #nim
14:05:27federico3any voxel rendering engine for Nim?
14:06:43*endragor quit (Remote host closed the connection)
14:12:03*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:15:20*laaron joined #nim
14:18:14FromDiscord_<exelotl> federico3: I guess writing bindings for stb_voxel_render could be an option?
14:21:28*endragor joined #nim
14:23:01FromDiscord_<exelotl> still leaves a lot of manual work to be done I guess
14:31:15*Tongir quit (Ping timeout: 244 seconds)
14:33:27*endragor quit (Remote host closed the connection)
14:41:21*warkruid quit (Quit: Leaving)
14:48:58disrupteki hate the idea of allowing functions to return `typeof(nil)` -- just one more dubious return value to worry about, and it breaks really simple code.
14:49:43disruptekwhat is the reason for supporting this? it was never an issue before, and a tighter spec that hurts (apparently only one developer) seems preferable.
14:49:47lqdev[m]wait, what
14:49:54lqdev[m]typeof(nil) even works!???
14:50:08disruptekwell, as of yesterday.
14:50:16disruptekhttps://github.com/nim-lang/Nim/pull/12100
14:50:31lqdev[m]damn.
14:50:59disrupteki'm not even sure $typeof(nil) == "typeof(nil)" makes sense. maybe that should be the result of `repr`, but probably not $. and it's clearly very breaking.
14:51:38lqdev[m]but seriously, what is the point of this
14:51:55*endragor joined #nim
14:51:59lqdev[m]even C doesn't have an abomination like this.
14:52:01lqdev[m]even C.
14:52:26disrupteki don't know. it seems like a mistake every which way i look at it. i think it's just about wanting to determine the return type of a void proc... or something.
14:53:40lqdev[m]by me, `nil` is understood to be just null pointer to `ref T`, meaning it does not initially have a type at all
14:53:56disruptekdoes this mean you can pass a void proc to a proc that takes a ref as an argument?
14:54:11disruptekyeah, it should be special and very limited in its use.
14:54:43lqdev[m]I'd think nil is only allowed in certain cases where its specialization can be inferred (eg. proc params, variables with explicit type)
14:55:15lqdev[m]s/explicit/known/
14:55:18Zevvbut what is the intention of this pr 12100 then, what is the *why*?
14:55:38lqdev[m]↑ same here
14:56:06lqdev[m]the author doesn't really highlight it in the PR itself, only the changes
14:56:17disruptekthis is just broken. you really can pass a void proc as a ref.
14:56:27*endragor quit (Remote host closed the connection)
14:58:37*laaron quit (Remote host closed the connection)
14:58:37disrupteki really hope Araq just didn't take a very close look at this.
14:59:58disruptekit doesn't even compile some very simple stuff.
15:00:36*laaron joined #nim
15:02:10disruptekthis doesn't compile: proc foo(): typeof(nil) = discard; echo $foo()
15:02:49disruptekthis doesn't compile, but due to a stdlib error in tables: import json; proc foo(): typeof(nil) = discard; echo $foo()
15:03:15Zevvbut what *is* supposed to compile with this then? what is it trying to do?
15:05:15disruptekjust this: proc foo(): typeof(nil) = discard; echo typeof(foo)
15:06:08*Hideki quit (Remote host closed the connection)
15:07:42disruptekyou know what's really funny?
15:08:02Zevvno clue?
15:08:09disruptekthat program doesn't even produce output.
15:08:22disrupteknot even a newline.
15:08:59disruptekthis just proves my age-old mantra:
15:09:07disruptekwrite as much code as you want while stoned,
15:09:10disruptekbut only commit sober.
15:10:41Zevvits interpreted as http://ix.io/1TZw
15:11:19disruptekoh, you're right. 🙄
15:11:28Zevvits funny. I did a *tiny* PR some time ago for insert(s: string, c: char, offset: int)
15:11:45Zevvit got completely bikeshedded away by a lot of people because everone understands what its supposed to do
15:12:01disrupteki remember that.
15:12:04Zevvfirst I had to rewrite it 5 times, then it didn't get in :)
15:12:29Zevvand then something cryptic as this: everybody just shrugs like "Wel, I dunno so its probably ok"
15:13:03disrupteki spent an inordinate amount of time on literate scf, but it's in limbo because it doesn't belong in the compiler.
15:13:28disruptekwhich i don't disagree with, but i think i added only one word to the compiler source.
15:13:43Zevvwhat's scf?
15:13:47disrupteksource code filter.
15:13:57Zevvah right.
15:14:17Zevvyeah well. I just spend my time on my own code and only fix bugs that bite me personally in nim :/
15:14:42ZevvI have to take peoples crap for work 5 days a week, so I don't do these things in my free time anymore
15:14:43disrupteklike most of us. 😉
15:14:50Zevvlike most of us :)
15:15:22Zevvimagine guys like dom96, having spent *so* much time
15:15:26Zevvincredible
15:15:34*Hideki joined #nim
15:15:50disrupteki did literate because i think it's a good contribution. i have plans for it, but it seems like a good little gift that could get in easily.
15:15:51*actuallybatman joined #nim
15:15:59Zevvwhere's your PR?
15:16:52*Hideki quit (Remote host closed the connection)
15:16:55disruptekhttps://github.com/nim-lang/Nim/pull/11848
15:17:19*thomasross quit (Remote host closed the connection)
15:17:44*laaron quit (Remote host closed the connection)
15:18:00Zevvneed to do some cooking and stuff, but will go throught that. cool!
15:21:37*laaron joined #nim
15:27:29disruptekthis is neat: https://github.com/lumen/lumen -- wasm backend for BEAM
15:40:36*Hideki joined #nim
15:43:48*laaron quit (Remote host closed the connection)
15:45:02*Hideki quit (Ping timeout: 245 seconds)
16:03:25*Hideki joined #nim
16:07:33*Hideki quit (Ping timeout: 245 seconds)
16:10:55federico3exelotl: thanks
16:18:54*Hideki joined #nim
16:23:26*Hideki quit (Ping timeout: 258 seconds)
16:29:49*solitudesf joined #nim
16:33:39lqdev[m]do you think that 256 fields is a good limit on the amount of object fields? I can't imagine anyone going above that.
16:35:25FromDiscord_<Shield> is that a limitation in C? why would Nim have it?
16:38:45*owl_000 quit (Remote host closed the connection)
16:39:10*owl_000 joined #nim
16:45:11lqdev[m]I'm asking because I'm writing a VM
16:57:16*Hideki joined #nim
17:02:45*elrood joined #nim
17:07:57*Hideki quit (Ping timeout: 245 seconds)
17:30:25Zevvlqdev[m]: i dont think ive ever seen human written code with so many fields, but with generated code you never know what people will make up one day :)
17:31:02lqdev[m]I mean, I don't think anyone will ever generate code with rod as a target ;)
17:31:29lqdev[m]it's only supposed to be a small language after all, written specifically for use with Nim so the audience shouldn't be that big.
17:39:16FromGitter<mratsim> even 32-64 sounds reasonable
17:49:57*owl_000 quit (Ping timeout: 250 seconds)
17:51:54disruptekseems like a strange thing to use to limit the audience.
17:54:05*narimiran joined #nim
18:10:40Zevvlqdev[m]: what causes the limitation then? Your word size? can't you make that configuratble so you can change it later without too much hassle?
18:12:23lqdev[m]the limitation is caused by my bytecode representation, it's roughly `[opcPushF|opcPopF] [field ID]`, where each pair of brackets represents 1 byte
18:13:04lqdev[m]I can increase the limit by changing the second byte to be two bytes making a 16-bit value, but I think 65536 fields is really overkill
18:19:09ZevvWell if you ever need it you can add [opcPushF2|opcPopF2] [Field ID16]
18:21:53Zevvoh that would be [opcPushF2|opcPopF2] [Field ID High] [Fild ID Low] of course, with [bytes]
18:26:21*MD87 quit (Ping timeout: 250 seconds)
18:27:08*gmpreussner quit (Ping timeout: 245 seconds)
18:27:54*MD87 joined #nim
18:33:01*narimiran_ joined #nim
18:33:18*gmpreussner joined #nim
18:35:07*narimiran quit (Ping timeout: 244 seconds)
18:44:34lqdev[m]I'll see if anyone ever hits that limitation, I highly doubt that, though.
18:45:24lqdev[m]Nim objects are going to be bound in a hack-ish way where all the public fields of an object are transformed into rod getters and setters
18:45:35lqdev[m]so it's not gonna be a problem there
18:45:39*vlad1777d__ joined #nim
18:47:01lqdev[m]distuptek: I don't limit the audience in any way, I'm just pointing out the facts (Nim's userbase isn't as big as most of other languages, and rod is probably never going to be used by many people)
19:02:26*al_ joined #nim
19:27:49shashlick@lqdev wish you had made rod look more like Nim
19:28:59lqdev[m]doesn't it already look like Nim enough?
19:31:30shashlick{}
19:31:49lqdev[m]aah
19:31:58lqdev[m]it's mainly because I wanted a simple parser
19:32:02shashlick->
19:32:29lqdev[m]-> is a change I introduced because it looked better with braces
19:34:10shashlickAny reason why you created a new lang instead of enhancing nimscript
19:40:23*nsf quit (Quit: WeeChat 2.5)
19:50:43Zevvbecause he can!
20:03:19Zevvis there a stdlib function for finding the position of an item in a seq? Something like `indexof(@["one","two","three"], "two")` returning `1`?
20:05:16lqdev[m]Zevv: yes, see `system.find`
20:06:11lqdev[m]shashlick: because I don't want to pull in the source code of the entire Nim compiler into my codebase
20:06:22lqdev[m]I want something small and simple
20:06:27lqdev[m]and as Zevv said, because I can.
20:07:09Zevvlqdev[m]: thanks. I was expecting that in sequtils
20:09:15*narimiran joined #nim
20:09:37*narimiran_ quit (Ping timeout: 246 seconds)
20:21:52*narimiran quit (Ping timeout: 246 seconds)
20:32:48*krux02 joined #nim
20:37:54*PMunch joined #nim
20:38:59shashlickWell so the question is whether you need the full compiler or just the parser and vm
20:39:40shashlickAnd if not, can we get it to that point - getting the vm working at runtime will be awesome
20:40:16disruptekthat would be a big deal.
20:40:26*Trustable quit (Remote host closed the connection)
20:58:16*PMunch quit (Remote host closed the connection)
21:03:02FromGitter<mratsim> But it does?
21:03:16FromGitter<mratsim> isn't there a `import compiler/eval` or something to do that
21:04:52shashlickMeh you are right, that's what nimble did with nimscript
21:05:00*Hideki joined #nim
21:05:27shashlickBut it did pull in a lot of code and took a while to compile
21:06:42shashlickPerhaps if it could be reduced but i don't know
21:09:13*Hideki quit (Ping timeout: 245 seconds)
21:10:34*al_ quit (Quit: al_)
21:18:38*krux02 quit (Remote host closed the connection)
21:20:19*solitudesf quit (Ping timeout: 246 seconds)
21:55:32*Vladar quit (Remote host closed the connection)
22:01:29FromGitter<awr1> @lqdev[m] i've seen objects with a large amount of fields in certain arenas
22:01:35FromGitter<awr1> also @zevv
22:01:45FromGitter<awr1> for instance as procedure tables
22:01:47FromGitter<awr1> https://github.com/zeux/volk/blob/master/volk.h#L97
22:04:46*daehlith joined #nim
22:08:38*daehlith quit (Quit: Leaving...)
22:14:11*vlad1777d__ quit (Ping timeout: 244 seconds)
22:15:01*vlad1777d__ joined #nim
22:17:23*tobbez quit (Remote host closed the connection)
22:20:04Zevvtrue, true
22:24:25*elrood quit (Remote host closed the connection)
22:27:09*Hideki joined #nim
22:28:41*tobbez joined #nim
22:31:49*Hideki quit (Ping timeout: 258 seconds)
22:33:54*lqdev[m] quit (Ping timeout: 252 seconds)
22:38:57*lqdev[m] joined #nim
22:40:57*Hideki joined #nim
22:45:15*Hideki quit (Ping timeout: 252 seconds)
22:46:00*Miguelngel[m] quit (Ping timeout: 252 seconds)
22:58:06*enthus1ast quit (Ping timeout: 252 seconds)
22:58:17*Miguelngel[m] joined #nim
23:00:16*Hideki joined #nim
23:07:32*Hideki quit (Ping timeout: 245 seconds)
23:11:09*enthus1ast joined #nim
23:13:11*vlad1777d__ quit (Remote host closed the connection)
23:13:16*rockcavera joined #nim
23:14:30*Hideki joined #nim
23:14:30*luis_ joined #nim
23:14:59luis_hi all, how is the easiest way of printing a float only up to the second decimal?
23:15:26*vlad1777d joined #nim
23:45:14shashlickhttps://nim-lang.org/docs/strutils.html#formatFloat%2Cfloat%2CFloatFormatMode%2Crange%5B%5D%2CChar
23:46:09*luis_ quit (Ping timeout: 250 seconds)
23:47:26*Hideki quit (Remote host closed the connection)
23:51:13*rockcavera quit (Remote host closed the connection)
23:51:32*rockcavera joined #nim
23:52:20*laaron joined #nim
23:52:55*Hideki joined #nim
23:57:08*Hideki quit (Ping timeout: 245 seconds)