<< 30-03-2018 >>

00:07:33*bl4rk joined #nim
00:10:03*qwertfisch_ joined #nim
00:10:25FromGitter<kinkinkijkin> oh crap, I have to figure out how to do implement nested loops without a hack this time
00:12:02*cornfeedhobo quit (*.net *.split)
00:12:02*mgdelacroix quit (*.net *.split)
00:12:02*bl4rk_ quit (*.net *.split)
00:12:02*yunfan quit (*.net *.split)
00:12:02*qwertfisch quit (*.net *.split)
00:12:02*kunev_ quit (*.net *.split)
00:12:03*gangstacat quit (*.net *.split)
00:12:03*macsek1911[m] quit (*.net *.split)
00:12:03*Yardanico quit (*.net *.split)
00:12:03*thor77 quit (*.net *.split)
00:12:03*r4vi quit (*.net *.split)
00:12:03*RushPL quit (*.net *.split)
00:12:03*abeaumont quit (*.net *.split)
00:12:03*EastByte quit (*.net *.split)
00:12:04*Cthalupa quit (*.net *.split)
00:12:04*tmm1 quit (*.net *.split)
00:12:04*byte512 quit (*.net *.split)
00:12:04*Araq quit (*.net *.split)
00:12:04*def- quit (*.net *.split)
00:12:04*Sargun quit (*.net *.split)
00:12:04*niv quit (*.net *.split)
00:12:04*dgwana quit (*.net *.split)
00:12:05*joshbaptiste quit (*.net *.split)
00:12:05*tefter quit (*.net *.split)
00:12:05*brainproxy quit (*.net *.split)
00:12:05*girvo quit (*.net *.split)
00:12:05*mal`` quit (*.net *.split)
00:12:05*qwertfisch_ is now known as qwertfisch
00:12:26*yunfan joined #nim
00:13:25*mgdelacroix joined #nim
00:13:43*dgwana joined #nim
00:13:43*Sargun joined #nim
00:13:43*Cthalupa joined #nim
00:13:43*joshbaptiste joined #nim
00:13:43*tefter joined #nim
00:13:43*tmm1 joined #nim
00:13:43*brainproxy joined #nim
00:13:43*girvo joined #nim
00:13:43*mal`` joined #nim
00:13:43*byte512 joined #nim
00:13:43*Araq joined #nim
00:13:43*def- joined #nim
00:13:43*niv joined #nim
00:14:58*FromGitter quit (Ping timeout: 260 seconds)
00:15:06*Cthalupa quit (Max SendQ exceeded)
00:15:13*FromGitter joined #nim
00:15:23*Cthalupa joined #nim
00:16:43*so quit (Ping timeout: 260 seconds)
00:16:55*skrzyp quit (Ping timeout: 252 seconds)
00:20:09*Guest24056 joined #nim
00:20:54FromGitter<kinkinkijkin> I'm thinking recursion
00:22:43*cornfeedhobo joined #nim
00:22:54*dyce[m] quit (Ping timeout: 256 seconds)
00:23:28*narimiran[m] quit (Ping timeout: 256 seconds)
00:23:28*shashlick quit (Ping timeout: 256 seconds)
00:23:30*zielmicha[m]1 quit (Ping timeout: 256 seconds)
00:23:31*stisa quit (Ping timeout: 252 seconds)
00:23:32*solitudesf quit (Ping timeout: 245 seconds)
00:23:32*byteflame quit (Ping timeout: 245 seconds)
00:23:33*survivorm[m] quit (Ping timeout: 255 seconds)
00:23:35*Demos[m] quit (Ping timeout: 255 seconds)
00:23:35*Miguelngel[m] quit (Ping timeout: 256 seconds)
00:23:36*Abnegation quit (Ping timeout: 256 seconds)
00:23:37*xincognito10[m]1 quit (Ping timeout: 260 seconds)
00:23:39*unclechu quit (Ping timeout: 260 seconds)
00:23:55*planetis[m] quit (Ping timeout: 256 seconds)
00:23:56*notdekka[m] quit (Ping timeout: 256 seconds)
00:23:56*mgdelacroix[m] quit (Ping timeout: 256 seconds)
00:24:14*krux02[m] quit (Ping timeout: 276 seconds)
00:24:14*TheManiac quit (Ping timeout: 276 seconds)
00:33:41*stisa joined #nim
00:35:31*mostly-h1rmless is now known as mostly-harmless
00:36:54*mostly-harmless quit (Quit: leaving)
00:37:09*smt joined #nim
00:38:01*mostly-harmless joined #nim
00:46:12*smt` joined #nim
00:46:45*shashlick joined #nim
00:46:45*Abnegation joined #nim
00:46:45*byteflame joined #nim
00:46:46*xincognito10[m] joined #nim
00:46:46*Miguelngel[m] joined #nim
00:46:46*mgdelacroix[m] joined #nim
00:46:46*Demos[m] joined #nim
00:46:46*unclechu joined #nim
00:46:46*dyce[m] joined #nim
00:46:52*survivorm[m] joined #nim
00:46:52*planetis[m] joined #nim
00:46:52*macsek1911[m] joined #nim
00:46:52*TheManiac joined #nim
00:46:52*narimiran[m] joined #nim
00:46:53*notdekka[m] joined #nim
00:46:53*solitudesf joined #nim
00:46:54*krux02[m] joined #nim
00:48:44*smt quit (Ping timeout: 255 seconds)
00:49:53*smt` quit (Remote host closed the connection)
00:50:17*smt` joined #nim
00:57:04*SenasOzys_ joined #nim
01:11:44FromGitter<kinkinkijkin> I found a use for rfind in this, nice
01:12:29*so joined #nim
01:15:57FromGitter<kinkinkijkin> does strutils.find give the first position found or the count?
01:16:00FromGitter<kinkinkijkin> this is vague
01:17:30*SenasOzys_ quit (Remote host closed the connection)
01:18:40*SenasOzys joined #nim
01:21:15*dgwana quit (Quit: Leaving)
01:24:00*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:28:33*zielmicha[m] joined #nim
01:28:33*kunev_ joined #nim
01:28:33*gangstacat joined #nim
01:28:33*Yardanico joined #nim
01:28:33*thor77 joined #nim
01:28:33*r4vi joined #nim
01:28:33*RushPL joined #nim
01:28:33*abeaumont joined #nim
01:28:33*EastByte joined #nim
01:28:43*zielmicha[m] quit (Changing host)
01:28:43*zielmicha[m] joined #nim
01:31:51*xincognito10[m] quit (Ping timeout: 240 seconds)
01:32:16*zielmicha[m] quit (Ping timeout: 246 seconds)
01:32:17*Demos[m] quit (Ping timeout: 245 seconds)
01:32:21*planetis[m] quit (Ping timeout: 240 seconds)
01:32:21*macsek1911[m] quit (Ping timeout: 240 seconds)
01:32:21*TheManiac quit (Ping timeout: 240 seconds)
01:32:24*solitudesf quit (Ping timeout: 255 seconds)
01:32:24*byteflame quit (Ping timeout: 255 seconds)
01:32:24*Miguelngel[m] quit (Ping timeout: 255 seconds)
01:32:27*survivorm[m] quit (Ping timeout: 260 seconds)
01:32:28*dyce[m] quit (Ping timeout: 260 seconds)
01:32:28*stisa quit (Ping timeout: 252 seconds)
01:32:30*shashlick quit (Ping timeout: 256 seconds)
01:32:36*notdekka[m] quit (Ping timeout: 256 seconds)
01:32:36*narimiran[m] quit (Ping timeout: 256 seconds)
01:32:37*mgdelacroix[m] quit (Ping timeout: 256 seconds)
01:32:37*Abnegation quit (Ping timeout: 256 seconds)
01:32:51FromGitter<Varriount> First position found.
01:33:01FromGitter<Varriount> -1 if it can't be found.
01:33:02*unclechu quit (Ping timeout: 260 seconds)
01:33:08*krux02[m] quit (Ping timeout: 276 seconds)
01:33:32FromGitter<Varriount> Araq: Just finished up a bit of code which sorts a query string without creating intermediate string copies. :D
01:46:51*athenot quit (Ping timeout: 240 seconds)
01:50:11*athenot joined #nim
01:55:28*stisa joined #nim
02:01:11*dddddd quit (Remote host closed the connection)
02:09:16*byteflame joined #nim
02:09:16*Miguelngel[m] joined #nim
02:09:16*shashlick joined #nim
02:09:16*Abnegation joined #nim
02:09:16*dyce[m] joined #nim
02:09:16*mgdelacroix[m] joined #nim
02:09:16*Demos[m] joined #nim
02:09:17*unclechu joined #nim
02:09:17*xincognito10[m] joined #nim
02:09:22*narimiran[m] joined #nim
02:09:23*survivorm[m] joined #nim
02:09:23*TheManiac joined #nim
02:09:23*krux02[m] joined #nim
02:09:23*zielmicha[m] joined #nim
02:09:23*notdekka[m] joined #nim
02:09:24*macsek1911[m] joined #nim
02:09:25*solitudesf joined #nim
02:09:25*planetis[m] joined #nim
02:17:52*tiocavera joined #nim
02:17:53*rockcavera is now known as Guest62562
02:17:53*tiocavera quit (Changing host)
02:17:53*tiocavera joined #nim
02:17:53*Guest62562 quit (Killed (wolfe.freenode.net (Nickname regained by services)))
02:17:53*tiocavera is now known as rockcavera
02:41:02*endragor joined #nim
02:53:48FromGitter<kinkinkijkin> I'm having a weird issue, I'm getting a SIGSEGV using lines(filename), but I don't know what is causing it
02:54:30FromGitter<kinkinkijkin> my looped state machine enters a certain block of the code it's reading and then crashes with the aforementioned signature
02:55:37FromGitter<kinkinkijkin> the line it's claiming is problematic in the application code is ```result.add(("w", line))```
02:56:07FromGitter<kinkinkijkin> the line it crashes on is ```sqe1 AHD 50 5000 200000```
03:00:53*Snircle joined #nim
04:23:59*gokr joined #nim
04:39:17*Lord_Nightmare quit (Ping timeout: 256 seconds)
04:43:55*Lord_Nightmare joined #nim
04:59:15*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:01:58*gokr quit (Ping timeout: 260 seconds)
05:02:16*r3d9u11 joined #nim
06:00:16*r3d9u11 quit (Remote host closed the connection)
06:06:45*smt_ joined #nim
06:10:16*smt` quit (Ping timeout: 256 seconds)
06:15:39*smt` joined #nim
06:18:18*r3d9u11 joined #nim
06:18:22*r3d9u11 quit (Client Quit)
06:18:28*nsf joined #nim
06:19:47*smt_ quit (Ping timeout: 268 seconds)
06:21:15*smt_ joined #nim
06:23:32*smt joined #nim
06:25:17*smt` quit (Ping timeout: 260 seconds)
06:25:43*smt` joined #nim
06:26:54*smt_ quit (Ping timeout: 260 seconds)
06:28:47*smt quit (Ping timeout: 260 seconds)
06:30:06*smt` quit (Ping timeout: 256 seconds)
06:49:02FromDiscord<treeform> could you be running out of memory?
06:49:50FromDiscord<treeform> is the `sqe1 ` line one of your lines?
06:50:22FromDiscord<treeform> did you newSeq the result first?
06:51:26FromDiscord<treeform> result could just be nil
06:55:01*floppydh joined #nim
06:56:21*yglukhov joined #nim
06:57:54*rockcavera quit (Remote host closed the connection)
06:58:32*Ven`` joined #nim
06:58:51*rokups joined #nim
07:00:52*yglukhov quit (Ping timeout: 260 seconds)
07:06:18*rockcavera joined #nim
07:07:57*yglukhov joined #nim
07:19:59*Vladar joined #nim
07:23:47*yglukhov quit ()
07:25:35*yglukhov joined #nim
07:42:43*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:44:02*athenot_ joined #nim
07:44:18*sendell joined #nim
07:44:39FromGitter<kinkinkijkin> sqe1 is one of my lines in the text file being read
07:45:01FromGitter<kinkinkijkin> it is the line that the program is getting to, then crashing
07:45:12*athenot quit (Ping timeout: 260 seconds)
07:45:48Araqmaybe the line is too long and triggers an out-of-memory
07:46:32FromGitter<kinkinkijkin> the line is 23 characters long and I have ample memory
07:46:44Araqhow big is the file?
07:46:57FromGitter<kinkinkijkin> 1) 3kb
07:47:19FromGitter<kinkinkijkin> I did some more testing though
07:47:21Araqdo you run your program in VSCode on Windows?
07:47:22*Ven`` joined #nim
07:47:31FromGitter<kinkinkijkin> no
07:48:03FromGitter<kinkinkijkin> my testing found it's having the issue when trying to put the line into the seq, but it didn't work when the seq was initialized or not
08:00:45FromGitter<mratsim> @kinkinkijkin I have a macro that auto-nest loops for you
08:03:39FromGitter<mratsim> https://gist.github.com/mratsim/678cfc0164bef9d8290f1508ef844a86#file-triot_macros-nim-L38-L143
08:05:34FromGitter<kinkinkijkin> I prefer the nodeps life, and I'm making this for a hobby project
08:05:39FromGitter<mratsim> A metadataArray is just a array[7, int]
08:06:10FromGitter<mratsim> it doesn’t have any dependencies.
08:08:48FromGitter<kinkinkijkin> I mean, I don't like ripping code from other people or setting other people's code as a dependancy
08:09:20FromGitter<mratsim> anyway the main workhorse is this: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Basically until I hit the max recursion “MAXRANK” it calls itself recursively. At compile time and you have a “handwritten” loop in your C code [https://gitter.im/nim-lang/Nim?at=5abdf0b001a2b40f382e520a]
08:09:57FromGitter<kinkinkijkin> I'm not compiling a programming language
08:10:05FromGitter<kinkinkijkin> I'm compiling a music language to a .wav
08:11:22FromGitter<mratsim> So you’re writing a music language in Nim, that should produce a .wav after you call it?
08:11:26FromGitter<mratsim> that’s cool
08:17:54FromGitter<kinkinkijkin> yeah, it's based loosely on mml
08:18:03FromGitter<kinkinkijkin> it's much more crappy though
08:19:54FromGitter<alehander42> I've always wanted to do something like that but I miss all the relevant music theory :D
08:22:15FromGitter<kinkinkijkin> no music theory needed
08:31:39*jjido joined #nim
08:32:52*gokr joined #nim
08:44:20FromGitter<alehander42> ok, call it "elementary rhytm / melody sense" :D
08:46:51FromGitter<mratsim> I was dead last in my music classes :P (though now I’m a very good dancer)
08:49:28*xet7 quit (Quit: Leaving)
08:50:18*xet7 joined #nim
09:06:19*jaco60 joined #nim
09:38:47FromGitter<abijahm> hello people how do you call a template with varargs using colon syntax ⏎ example ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5abe05a6270d7d37087556aa]
09:39:41*Ven` joined #nim
09:40:57*Ven`` quit (Ping timeout: 256 seconds)
09:42:32*gokr quit (Quit: Leaving.)
09:42:45*xet7 quit (Quit: Leaving)
09:46:29*athenot_ quit (Ping timeout: 255 seconds)
09:50:15FromGitter<alehander42> `body` is a single object
09:50:22FromGitter<alehander42> you can do `body: string`
09:50:31FromGitter<alehander42> but this wouldn't work with multiple expressions
09:50:33FromGitter<alehander42> as in your case
09:52:57*athenot joined #nim
09:53:20FromGitter<alehander42> I've always used `untyped` for that because usually I need to do some additional processing of `body` before it's ready for typechecking
09:53:33FromGitter<alehander42> what is your exact usecase for it ?
09:55:47*xkapastel quit (Quit: Connection closed for inactivity)
10:01:43*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:12:14*xet7 joined #nim
10:13:29*Ven` quit (Ping timeout: 255 seconds)
10:17:48*Ven`` joined #nim
10:31:15*xet7 quit (Quit: Leaving)
10:38:36*xet7 joined #nim
10:43:02*Ven`` quit (Read error: Connection reset by peer)
10:43:14*Ven`` joined #nim
10:44:36FromGitter<abijahm> @alehander42 am trying to achieve something like this have several proc execute determined by the result of the previous ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5abe15147c3a01610d8ddd06]
10:45:40*r3d9u11 joined #nim
10:49:37FromGitter<alehander42> honestly, if they're just predicates
10:49:43FromGitter<alehander42> you should just use boolean logic
10:49:50FromGitter<alehander42> e.g. `isLoggedIn() and index() and ..`
10:53:29*vlad1777d joined #nim
10:56:49*jjido joined #nim
11:00:04*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:00:28*Ven`` joined #nim
11:00:51*Ven`` quit (Client Quit)
11:01:01FromGitter<abijahm> @alehander42 am trying to use templates to help give a better syntax example btw am trying to build something like express.js ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5abe18ed5f188ccc1511c53e]
11:04:35*Snircle joined #nim
11:23:36FromGitter<mratsim> Should I expect problems if I use {.union.} types in the JS backend?
11:25:07*SenasOzys quit (Ping timeout: 260 seconds)
11:31:48*SenasOzys joined #nim
11:32:02*SenasOzys quit (Remote host closed the connection)
11:33:07*SenasOzys joined #nim
11:51:17*vlad1777d quit (Ping timeout: 256 seconds)
12:03:21*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:04:27FromGitter<AjBreidenbach> are you having trouble with it?
12:05:03*jjido joined #nim
12:06:39FromGitter<AjBreidenbach> anybody else having trouble with loading nimble packages on the standard library page?
12:07:21Yardanicothis nimble package list is very unstable and it will probably be removed in favour of nimble.directory
12:07:24Yardanicobut it works for me
12:08:41dom96yeah. I think I will just modify this page already
12:09:39FromGitter<AjBreidenbach> I'm getting a 404 for nimblepkglist.js
12:12:45dom96fixed
12:13:20FromGitter<AjBreidenbach> wow, that was pretty quick
12:16:17FromGitter<alehander42> @abijahm well, than you can just generate the `route(.., .cb, .cb)` from the second version with a macro
12:16:32FromGitter<alehander42> honestly not sure how to do it with template, I don't like templates so much for DSL-s
12:16:56FromGitter<alehander42> too easy to hit a limitation
12:17:45FromGitter<GULPF> @dom96 the "Official packages" and "Unofficial packages" links to the left of the page needs to be removed as well
12:18:42dom96GULPF: done
12:41:19FromGitter<admin0day> hi guys
12:41:23FromGitter<admin0day> i am back
12:41:46FromGitter<admin0day> i am install a centos7.4 today
12:42:05FromGitter<admin0day> and the problem still exist today
12:43:38FromGitter<admin0day> the vscode still can't jump to the definition
12:44:16FromGitter<admin0day> just like what i meet in win10's linux or the win10 yesterday
12:45:21FromGitter<admin0day> and the nimble,nimsuggest and the nim just working
12:45:21*PMunch joined #nim
12:46:19*Ven`` joined #nim
12:46:52dom96admin0day: create an issue in the VS code plugin's github repo
12:47:01dom96the author might be able to help
12:47:33FromGitter<admin0day> Version 1.21.1 ⏎ Commit 79b44aa704ce542d8ca4a3cc44cfca566e7720f1 ⏎ Date 2018-03-14T14:46:30.761Z ⏎ Shell 1.7.9 ⏎ Renderer 58.0.3029.110 ... [https://gitter.im/nim-lang/Nim?at=5abe31e5c574b1aa3e4c2b70]
12:47:52FromGitter<admin0day> it seems like yesterday problem in win10
12:50:33*r3d9u11 quit (Remote host closed the connection)
12:50:38*dddddd joined #nim
12:50:56*Senketsu joined #nim
12:54:37FromGitter<mratsim> I think this would interest you @Araq: https://locklessinc.com/articles/sat_arithmetic/. Saturated arithmetic could become a stdlib package. not sure which operator to use though.
13:09:44*user1101 joined #nim
13:38:19*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:50:17*endragor quit (Remote host closed the connection)
13:52:34FromGitter<mrwonko> So I just saw https://www.reddit.com/r/programming/comments/87wnxw/linus_torvalds_that_is_either_genius_or_a/ and now I'm wondering: Is there a way in Nim to detect whether an integral expression is "static", i.e. can be evaluated at compile time? Purely curios, no practical necessity right now :D
13:54:24*floppydh quit (Quit: WeeChat 2.1)
13:58:03FromGitter<mratsim> The compiler will do constant folding
13:58:13FromGitter<mratsim> otherwise you can do const foo = expression
14:00:39*r3d9u11 joined #nim
14:02:00dom96you could probably do: compiles(const foo = expression)
14:13:23*SenasOzys_ joined #nim
14:13:48*SenasOzys quit (Read error: Connection reset by peer)
14:17:07*Ven`` joined #nim
14:17:30*r3d9u11 quit (Remote host closed the connection)
14:35:44YardanicoYeah, nim is pretty smart at constant folding, for example if you write "const a = 6; echo a" compiled C code will only contain 6 as a string
14:40:39*Trustable joined #nim
14:45:50FromGitter<alehander42> smarter even ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ will only contain "1" as string [https://gitter.im/nim-lang/Nim?at=5abe4d9e2b9dfdbc3a3b8e00]
14:55:48Yardanicoand also you can add your own term rewriting rules!
14:55:53Yardanicofor example for multiplying by zero
15:01:41*survivor joined #nim
15:03:36*smt joined #nim
15:05:50*xet7 quit (Remote host closed the connection)
15:06:09*survivor quit (Ping timeout: 260 seconds)
15:11:48*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:18:57FromGitter<Vindaar> performance question: given an openArray argument. When I need a `seq` specifically and I use the `@` proc to convert it, is the whole openArray copied in both cases, seq and array or is it a no-op for the seq?
15:20:05FromGitter<Vindaar> grepping through the source, the `@` definition in system.nim seems to indicate the former
15:21:58FromGitter<Vindaar> and sudden random question: when is the `@` definition from lib/core/seqs.nim vs system.nim used?
15:26:53FromGitter<zacharycarter> doing another demo this afternoon involving Nim
15:31:42*xkapastel joined #nim
15:31:53*FromGitter * wu-lee plans to go and study @zacharycarter 's github repos.
15:32:05FromGitter<zacharycarter> :P
15:32:15Yardanicowow - https://github.com/stisa/nwasm
15:32:27FromGitter<wu-lee> @zacharycarter , btw your github.io site is 404ing
15:32:30FromGitter<zacharycarter> oh snap
15:32:48FromGitter<zacharycarter> @wu-lee yeah I know 😟 going to be putting up a new one shortly hoefully
15:32:55FromGitter<zacharycarter> @Yardanico that's awesome
15:47:49FromGitter<alehander42> I looked at nwasm yesterday, stisa has done very interesting work with it (he just made it work as a fork of nim with easier setup)
15:48:48*nsf quit (Quit: WeeChat 2.0.1)
16:00:31enthus1a1tdoes one have used jester and (niv)/websocket like so that they bind to the same tcp port?
16:01:58*xet7 joined #nim
16:07:09*smt` joined #nim
16:07:35*smt` quit (Max SendQ exceeded)
16:10:05*smt quit (Ping timeout: 240 seconds)
16:13:22PMunchWoo, finally combparser and protobuf is in such a stage I feel they are ready for Nimble: https://github.com/nim-lang/packages/pull/694
16:13:57*yglukhov quit (Ping timeout: 240 seconds)
16:14:30*yglukhov joined #nim
16:16:54*r3d9u11 joined #nim
16:18:17*gokr joined #nim
16:25:16FromGitter<Vindaar> nice! :)
16:27:19PMunchYeah, it's good to finally get it out there :P
16:27:26PMunchHave been working on this for waaay too long :P
16:29:42FromGitter<Vindaar> it always takes way longer, haha
16:35:25*Senketsu_ joined #nim
16:35:53PMunchAccording to GitHub I apparently started this in the beginning of February..
16:36:02PMunchThought it would be a simple little project :P
16:38:26*Senketsu_ quit (Remote host closed the connection)
16:38:49*sendell quit (Remote host closed the connection)
16:41:06*smt joined #nim
16:46:15FromGitter<mrwonko> @PMunch is there an online documentation of combparser? I tried generating it myself, but it needs nim 0.18.1, which is not out yet
16:46:37FromGitter<mrwonko> hmm, is the 18 in 0.18 for 2018?
16:46:45*Senketsu_ joined #nim
16:47:18PMunchmrwonko, no it's not
16:47:30PMunchIt's just a version number
16:47:47FromGitter<mrwonko> right, just a coincidence then
16:48:32PMunchAnd short of reading the documentation comments in the combparser.nim file found in the repo on GitHub there isn't really any documentation for it hosted anywhere (when it hits Nimble that will change though as nimble.directory automatically generates documentation)
16:49:08*Senketsu_ quit (Remote host closed the connection)
16:49:18PMunchAnd I should probably try and see if combparser actually requires 0.18.1
16:49:25PMunchI think protobuf does, but not combparser
16:49:56FromGitter<mrwonko> Okay, at first glance it looks like input doesn't need to be a string. Then maybe I'll try writing a lexer generator to go with it...
16:54:30PMunchYeah it doesn't
16:54:34PMunchIt's all generics
16:54:44PMunchBut the error reporting is still based around strings
16:54:49PMunchso YMMV
16:55:26PMunchBut if you look at how the "parse" procedure is written you should be able to write something that doesn't report errors, and that should work.
16:56:16*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:57:15FromGitter<alehander42> oh I used `when not declared()` for the first time and it feels so dirty
16:58:16PMunchalehander42, wait until you do "when compiles(x): x else: y"
16:58:20FromGitter<alehander42> congrats @PMunch , I have to try and see if I can target combparser with my grammar dsl
16:58:45PMunchOh well, out to get some fresh air .)
16:58:47*PMunch quit (Quit: Leaving)
16:58:49FromGitter<alehander42> (tho I doubt it a bit, I wanted to do a very-translatable similar parser impl for several langs)
16:59:01FromGitter<alehander42> :D yeah I'll try to abuse that one day too
17:02:14*jrbrt joined #nim
17:06:32FromGitter<Quelklef> was graphics.nim removed from devel?
17:07:05FromGitter<data-man> @PMunch: Thanks for combparser! I added support for PEGs. This is very trivial. :) If you want, I'll do PR.
17:08:14FromGitter<Quelklef> Ah, I see, it's on nimble instead of stdlib
17:18:37*dddddd quit (Remote host closed the connection)
17:23:59*SenasOzys_ quit (Ping timeout: 276 seconds)
17:24:03*r3d9u11 quit (Remote host closed the connection)
17:24:24*endragor joined #nim
17:25:09*r3d9u11 joined #nim
17:26:52*yglukhov quit (Ping timeout: 256 seconds)
17:28:42*endragor quit (Ping timeout: 256 seconds)
17:40:21*xkapastel quit (Quit: Connection closed for inactivity)
17:56:32*Lord_Nightmare quit (Ping timeout: 260 seconds)
18:01:27*Lord_Nightmare joined #nim
18:02:03Araqmratsim: +|, -|, *|, /| the | representing the boundaries.
18:03:54Araqbut I would make them all saturated by default
18:08:08FromGitter<genotrance> @araq: I've submitted two PRs for the vmops and nimscript changes, please approve if you get a chance
18:08:40FromGitter<genotrance> also, I mentioned in the nimscript PR, tests/newconfig/tfoo.nims never runs since testament only runs .nim tests
18:12:35*nsf joined #nim
18:16:04Araqnot true, tfoo.nim is run
18:16:14Araqwhich also runs tfoo.nims
18:16:21Araqsince it's its config
18:23:55*yglukhov joined #nim
18:28:43*yglukhov quit (Ping timeout: 260 seconds)
18:29:11*PMunch joined #nim
18:31:37dom96Somebody should write this article for Nim http://benjamincongdon.me/blog/2018/03/23/Python-Idioms-in-Rust/ :)
18:33:47FromGitter<mrwonko> What's the equivalent of C++'s BidirectionalIterator concept in Nim, or the various kinds of C++ iterators in general? The builtin `iterator` seems to effectively be a ForwardIterator. (Or InputIterator? I don't know about its multipass guarantees.) The streams module's StreamObj looks like it's either a RandomAccessIterator or a BidirectionalIterator, but very low-level with raw pointers.
18:33:56*yglukhov joined #nim
18:34:00FromGitter<AjBreidenbach> @dom96 hmm, if only there were someone in IRC with writing experience
18:34:11FromGitter<AjBreidenbach> ....about Nim
18:34:29FromGitter<AjBreidenbach> *cough*
18:34:57dom96Are you talking about me? :)
18:36:23FromGitter<AjBreidenbach> sorry, no I'm just recovering from a head cold
18:36:50FromGitter<AjBreidenbach> you could probably do it though
18:37:37FromGitter<AjBreidenbach> ;)
18:37:40dom96right...
18:37:57*yglukhov quit (Ping timeout: 240 seconds)
18:39:57FromGitter<genotrance> @araq - so can I add some test cases for nimscript procs in tfoo.nims or should I put those elsewhere
18:48:18PMunchdom96, we should pitch that guy to try Nim :)
18:48:30PMunchSince he's in a "programming wanderlust" as he states himself
18:48:45dom96Yep
18:48:53dom96I made a comment on HN about Nim already :)
18:49:17PMunchHe even talks about Rusts expressiveness, wait 'til he sees the crazy Nim metaprogramming :P
18:53:41FromGitter<cabhishek> From that article "In fact, I found Rust to be rather Pythonic", I guess its the new marketing meme?
18:54:23*yglukhov joined #nim
18:58:29Yardanicocabhishek: that's funny :D
19:03:52*yglukhov quit (Read error: Connection reset by peer)
19:04:26*yglukhov joined #nim
19:04:28PMunchHmm, if I call a macro in one file, can I export procedures and types generated so I can import that file somewhere else?
19:10:16YardanicoPMunch, add `*` to generated procs in a macro?
19:10:51PMunchWell, I don't know if the user wants to export them or not when I create the code
19:11:00PMunchI guess it could take a flag to decide..
19:11:55PMunchIs there a way to meassure times on compile-time? The times module does importc so I can't use that..
19:15:23FromGitter<matrixbot> `pqflx3` is an inline nested proc meant to work? https://gist.github.com/pqflx3/2edecf022e17842e23015c67b08e132d
19:16:05PMunchA bit within a bot?
19:16:10PMunchs/bit/bot
19:16:28Yardanicopqflx3: you can use freenode matrix bridge btw
19:16:50Yardanicopqflx3 and why not make it a template? :)
19:16:57Yardanicoit probably would work, but I don't really know
19:18:07FromGitter<Vindaar> @pxflx3: the problem is the proc does not capture the `a` from the calling proc. If you make it a template it works. Surprised myself by that though. Thought you'd have to declare that {.dirty.} to capture the `a`
19:18:40FromGitter<Vindaar> or plain and simply give the `a` as a `var string` argument
19:21:41FromGitter<matrixbot> `pqflx3` im trying to use nimYAML and it makes use of that here https://github.com/flyx/NimYAML/blob/e9658f22ecc25444fac361af3a0eca4f3b152578/yaml/private/lex.nim#L1067
19:22:20FromGitter<matrixbot> `pqflx3` well, two lines below with the 'peek' var
19:23:31*pqflx3[m] joined #nim
19:24:04pqflx3[m]test
19:26:02*Guest24056 is now known as skrzyp
19:26:04FromGitter<Vindaar> I think it's because it's defined as a closure proc (https://nim-lang.org/docs/manual.html#procedures-closures). The closure will capture the variables implicitly, while due to the {.inline.} pragma I assume your proc is a normal `nimcall`?
19:27:47Yardanicopqflx3[m], yes, it works :)
19:29:34FromGitter<Vindaar> see also here: https://nim-lang.org/docs/manual.html#types-procedural-type
19:32:57*xet7bot joined #nim
19:33:37*xet7bot left #nim (#nim)
19:35:04*rokups quit (Quit: Connection closed for inactivity)
19:39:54*endragor joined #nim
19:42:19*dgwana joined #nim
19:43:10*xkapastel joined #nim
19:44:33*endragor quit (Ping timeout: 260 seconds)
19:45:43*jjido joined #nim
19:49:23*xet7 is now known as xet7friend
19:49:43*xet7friend is now known as xet7
19:57:09*yglukhov quit (Remote host closed the connection)
19:57:41*yglukhov joined #nim
20:02:23*yglukhov quit (Ping timeout: 256 seconds)
20:03:39*xet7 quit (Quit: Leaving)
20:05:01*xet7 joined #nim
20:10:43*SitiSchu joined #nim
20:17:37*handlex joined #nim
20:17:38*PMunch quit (Quit: Leaving)
20:18:17Araqshashlick, yeah that should work
20:24:58*r3d9u11 quit (Remote host closed the connection)
20:29:35*handlex quit (Quit: handlex)
20:40:32FromGitter<zacharycarter> I went to do a demo today w/ nim and was as usual preparing an hour or two before hand
20:41:01FromGitter<zacharycarter> and I realized half way through that the capn proto bindings are using reactor.nim 👎
20:41:08FromGitter<zacharycarter> so I couldn't get it to compile
20:41:20FromGitter<zacharycarter> I think - when I have time - I will re-write them and use normal nim async
20:45:29*smt quit (Ping timeout: 276 seconds)
20:47:24*smt joined #nim
20:48:23*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:49:58*smt` joined #nim
20:50:21*smt` quit (Max SendQ exceeded)
20:52:34*smt quit (Ping timeout: 264 seconds)
20:53:47*smt joined #nim
20:55:46*smt` joined #nim
20:56:46*PMunch joined #nim
20:59:15*smt quit (Ping timeout: 256 seconds)
21:19:59*smt` is now known as smt
21:20:21PMunchIs it possible to get a ref of a string?
21:21:08FromGitter<AjBreidenbach> can't you just use var string
21:22:03PMunchWell I want to make an object of it
21:22:19PMunchThe end goal is to have combparser silently use a string slice under the hood
21:22:46PMunchSo a combined type with str: ref string, and slice: Slice[int]
21:23:29PMunchThen where it would normally slice the string it would rather copy the reference and update the slice indices
21:23:55FromGitter<AjBreidenbach> that does sound a bit hairier
21:24:51PMunchTrying to optimize combparser, but I'm not sure how much this would help..
21:24:55FromGitter<AjBreidenbach> why not store multiple slices in the same object?
21:25:10FromGitter<AjBreidenbach> lemme go check what that is
21:27:08PMunchWell, currently it takes a string, and copies parts of it for every parsing
21:27:37*vlad1777d joined #nim
21:29:17FromGitter<AjBreidenbach> wouldn't it be more idiomatic for `Maybe` to be an enumerated type?
21:29:39PMunchYeah, there are a lot of things about that which is a bit hairy..
21:30:07PMunchIt was based on a library that was written by someone who hadn't used Nim much
21:32:28*Vladar quit (Quit: Leaving)
21:33:18FromGitter<AjBreidenbach> I kinda noticed
21:33:43FromGitter<AjBreidenbach> can't pretend I'm an expert though :D
21:34:05*cyraxjoe quit (Remote host closed the connection)
21:34:14PMunchI guess there are few true Nim experts, considering how young the language is :P
21:34:47FromGitter<AjBreidenbach> why don't you have an object that contains the string and a sequence of slices as properties
21:35:13FromGitter<AjBreidenbach> I mean I see what you wanted to do, but it might not be the easiest
21:35:15PMunchWell, which slice would the "current" one be?
21:35:56FromGitter<AjBreidenbach> you could just have another property `current`
21:36:20FromGitter<AjBreidenbach> it's not going to be a bottleneck
21:36:24PMunchHmm
21:36:31FromGitter<AjBreidenbach> if you want more direct control you could go with `cstring`
21:36:38PMunchI like the idea of having a slice and a ref though..
21:37:09PMunchIt's prettier
21:37:16FromGitter<AjBreidenbach> `ptr cstring`?
21:37:27*PMunch shudders
21:37:38PMunchOh wait, you probably can't see those on Gitter..
21:37:44PMunchPMunch shudders
21:37:49FromGitter<AjBreidenbach> lol
21:37:53FromGitter<data-man> @PMunch: How many years must pass so that the language is considered old? :)
21:38:11PMunchdata-man, good point
21:38:36FromGitter<AjBreidenbach> it has to be older than other mainstream languages
21:38:51PMunchThen what is mainstream?
21:39:12FromGitter<AjBreidenbach> java/c#/python/c++/ruby/javascript
21:39:28PMunchRust, Go?
21:39:29FromGitter<AjBreidenbach> most of them are from the 90s I think
21:39:46FromGitter<AjBreidenbach> yeah, but the majority is older than Nim, so I don't consider it old
21:42:13FromGitter<AjBreidenbach> PMunch: https://nim-lang.org/docs/ropes.html
21:42:31FromGitter<AjBreidenbach> it's probably going to be faster than whatever you come up with
21:42:39FromGitter<data-man> @PMunch: I'm experimenting with your combparser and @nitely's regex
21:43:40FromGitter<data-man> This library supports compile-time regexes!
21:43:57PMunchAjBreidenbach, yeah ropes are neat. But I think it would be a bit overkill for this..
21:44:03PMunchdata-man, oh cool!
21:44:21FromGitter<AjBreidenbach> you're reinventing the wheel, you're already overkill lol
21:44:22Araqropes are slow, don't use them
21:44:32PMunchdata-man, so someone implemented regexes in pure Nim?
21:44:34FromGitter<AjBreidenbach> oh
21:44:54Araqwell the compiler uses them heavily so they are not that bad
21:45:09Araqbut they lose against with well written string code
21:45:19PMunchThis isn't the same problem though. The slices will always go in one direction..
21:45:49YardanicoPMunch, yeah
21:45:57PMunchI guess this could just use a single index and a ref string tbh
21:45:57Yardanicothey-re almost fully PCRE compatible
21:45:57FromGitter<data-man> @PMunch: Do not you follow the news? :) https://github.com/nitely/nim-regex
21:46:13Yardanico" Its syntax is similar to PCRE but lacks a few features that can not be implemented while keeping the space/time complexity guarantees, i.e.: backreferences and look-around assertions. "
21:46:24Yardanicobut it fully supports unicode!
21:47:28PMunchLooks really neat, not sure how I missed it
21:52:24FromGitter<data-man> @PMunch: Currently I did this: when useRegex is defined, the regex module is used, otherwise - re.
21:59:56PMunchMakes sense
22:06:51FromGitter<data-man> But then there will be a dependency in combparser.nimble, even if regex is not used.
22:07:04*Trustable quit (Remote host closed the connection)
22:08:48FromGitter<binary132> hi. is there a Nim implementation or binding for flatbuffers?
22:23:44*endragor joined #nim
22:27:31*jrbrt quit (Quit: Oíche mhaith)
22:28:28*endragor quit (Ping timeout: 260 seconds)
22:31:26FromGitter<data-man> @binary132: I'm not sure if that's what you need: https://github.com/Skrylar/skflatbuffers
22:31:31*jrbrt joined #nim
22:34:15*user1101 quit (Quit: user1101)
22:56:49FromGitter<mratsim> ping @Skrylar to know the state
22:57:34*dgwana quit (Quit: Leaving)
22:59:17*nsf quit (Quit: WeeChat 2.0.1)
23:01:40*geocar quit (Quit: Connection closed for inactivity)
23:06:28*PMunch quit (Quit: Leaving)
23:07:05*timotheecour joined #nim
23:14:58*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
23:28:34*arecaceae quit (Read error: Connection reset by peer)
23:28:56*arecaceae joined #nim
23:50:15FromGitter<AjBreidenbach> cdecl lets you pass as a function pointer, right?