<< 07-05-2018 >>

00:03:44*skrzyp quit (Ping timeout: 255 seconds)
00:04:49*smt quit (Ping timeout: 248 seconds)
00:06:42*Guest56145 joined #nim
00:11:49*leorize joined #nim
00:23:06*skrylar joined #nim
00:25:12*CodeVance_ is now known as CodeVance
00:25:47skrylarCodeVance, low level bullshit for gtk3
00:26:27*Guest56145 quit (Ping timeout: 240 seconds)
00:26:32CodeVance? Yeah and ? What's new ?
00:26:55CodeVanceAre you trustable-code ?
00:27:11CodeVanceCause he's the only one I know who's working with gtk
00:28:56*Guest56145 joined #nim
00:29:35*kunev quit (Ping timeout: 240 seconds)
00:30:15*kunev joined #nim
00:32:23skrylarno, but i want to write gui applications for some things and i'd rather not use a language that is painful
00:32:48skrylarused vala for some stuff. it's okay-esque. had issues getting some stuff working
00:34:10CodeVanceSo your using a gtk wrapper?
00:34:56*Pisuke joined #nim
00:35:34*MyMind quit (Ping timeout: 260 seconds)
00:35:47*Guest56145 quit (Ping timeout: 256 seconds)
00:37:46*Guest56145 joined #nim
00:55:59*Guest56145 quit (Ping timeout: 260 seconds)
00:57:14*Guest56145 joined #nim
01:04:39*vivus joined #nim
01:37:15FromGitter<brentp> any ideas why the `%` gets called in nim 0.17.2 and not in 0.18.0
01:37:27FromGitter<brentp> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aefadd697e5506e04a143d5]
01:39:18skrylarglib/gtype.nim(1, 2) Error: module names need to be unique per Nimble package; module clashes with /home/skrylar/Code/ngtk3/gobject/gtype.nim
01:39:24skrylarBut it's not a nimble package '_'
01:40:07skrylarsince when did the compiler become a nanny
01:41:09*sz0 quit (Quit: Connection closed for inactivity)
01:42:46*CodeVance quit (Quit: Leaving)
01:45:57*CodeVance joined #nim
02:05:10*dddddd quit (Remote host closed the connection)
02:18:32*Guest56145 quit (Quit: WeeChat 2.0.1)
02:19:12*Guest48411 joined #nim
02:19:41*sz0 joined #nim
02:21:37*Guest48411 quit (Client Quit)
02:22:19*skrzyp1 joined #nim
02:23:19*skrzyp1 quit (Client Quit)
02:24:03*skrzyp1 joined #nim
02:25:03*skrzyp1 quit (Client Quit)
02:25:45*skrzyp joined #nim
02:35:43*rockcavera joined #nim
03:31:49*vivus quit (Quit: Leaving)
03:44:39*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:53:07*endragor joined #nim
04:12:37*skrylar quit (Remote host closed the connection)
04:15:03*MypMyp joined #nim
04:22:16*MypMyp quit (Quit: Leaving.)
04:30:57*CodeVance quit (Read error: Connection reset by peer)
04:43:12*leorize quit (Quit: WeeChat 2.1)
05:08:11*miran joined #nim
05:11:52*nsf joined #nim
05:27:02*CodeVance joined #nim
05:33:49*CodeVance quit (Quit: Leaving)
06:03:03*xet7 quit (Ping timeout: 255 seconds)
06:03:39*xkapastel quit (Quit: Connection closed for inactivity)
06:05:21*miran quit (Ping timeout: 248 seconds)
06:14:03*leorize joined #nim
06:25:59*xet7 joined #nim
06:28:16*brainpro1 joined #nim
06:29:45*arecaceae quit (Remote host closed the connection)
06:29:51*brainproxy quit (Ping timeout: 240 seconds)
06:30:11*arecaceae joined #nim
06:57:05*MypMyp joined #nim
06:57:46*xet7 quit (Read error: Connection reset by peer)
07:04:43*yglukhov joined #nim
07:30:27*CodeVance joined #nim
07:30:45*yglukhov_ joined #nim
07:34:24*yglukhov quit (Ping timeout: 260 seconds)
07:41:51*PMunch joined #nim
07:44:51PMunchskrylar, did you try genui?
07:46:09PMunchhttps://github.com/PMunch/gtkgenui or https://github.com/PMunch/gtk3genui
07:48:59PMunchgogolxdong, did you see my latest updates to protobuf?
07:49:13PMunch@gogolxdong ^
07:49:31PMunchHmm, has the gitter bot stopped adding @ to usernames?
07:50:30FromGitter<gogolxdong> sure.
07:50:42FromGitter<gogolxdong> I wonder how to make it support js.
07:52:28FromGitter<gogolxdong> I'm stuck at parsing protobuf binary data through websocket on the frontend side.
07:53:06PMunchIt should support JS out of the box I think
07:53:17FromGitter<mratsim> @skrylar, Still have to had recurrent neural net to Arraymancer anyway ;)
07:54:11FromGitter<gogolxdong> There are some issues of protobuf.js which prevents the whole thing working.
07:54:40*CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
07:54:44FromGitter<gogolxdong> What do you mean out of the box , compiled with nim js complains copyMem something.
07:55:39PMunchHmm
07:56:44PMunchFrom the re module of all places..
07:57:27PMunchBut it doesn't tell me where it's imported from..
07:57:35FromGitter<gogolxdong> yes.
07:58:34PMunchAaah, it's from combparser
07:58:38PMunchBut it's not used
07:58:40PMunchHold on
07:59:35FromGitter<gogolxdong> Have you removed combparser already?
08:02:03PMunchRemoved?
08:02:36FromGitter<gogolxdong> How to you get rid of combparser ? I remembered it's full of generic transformation.
08:03:12FromGitter<gogolxdong> which you said would replace it because of string copy.
08:04:15FromGitter<gogolxdong> You mean copyMem is not used?
08:04:16PMunchYeah it's pretty slow because of the string copy stuff. I kinda want to see if I can speed it up though
08:04:40PMunchWell, combparser imports pegs and the re module in order to have matchers with them. But that's not used for protobuf
08:05:06PMunchSo I just have to throw in a "when not defined(js)" or something like that around those two calls
08:05:29FromGitter<gogolxdong> clear.
08:08:50planetis[m]what happened to the combinatorics package?
08:11:10PMunchCombinatorics package?
08:11:29*MypMyp quit (Quit: Leaving.)
08:13:46planetis[m]yes
08:14:34FromGitter<mratsim> this one? https://github.com/barnybug/nim-combinatorics
08:15:18planetis[m]oh thought it was in bitbucket
08:16:04planetis[m]https://bitbucket.org/nimcontrib/nimcombinatorics/src
08:16:13PMunchHmm, is there a way to "detect" if a procedure is called on compile-time or runtime?
08:16:16planetis[m]??
08:16:22planetis[m]and there is none on nimble
08:20:30*sendell joined #nim
08:22:06FromGitter<mratsim> @PMunch, if they have NimNode or {.compiletime.} in their signature they are called at compile-time
08:22:17FromGitter<mratsim> otherwise at runtime
08:22:35FromGitter<alehander42> maybe something like `when defined(<something only true on compiletime>)`
08:22:40FromGitter<mratsim> Visual check can be done in the generated C, compile-time proc do not appear
08:23:12FromGitter<alehander42> but yeah that wouldnt work
08:23:17FromGitter<alehander42> the when thing
08:24:16*MypMyp joined #nim
08:26:00PMunchHmm, can you define two procs, one with compileTime and one without?
08:26:24PMunchI want to call staticRead on compile-time and readFile on runtime
08:31:08*Vladar joined #nim
08:31:24FromGitter<mratsim> staticRead is always compiletime
08:31:38PMunchYeah I know
08:31:53FromGitter<mratsim> do they need to have the same name?
08:32:49FromGitter<mratsim> Maybe you can pass a static[bool] flag and when foo: staticRead else: readFile?
08:33:35PMunchBut I have a procedure I want to be able to call both on compile-time and on runtime on the C target and only compile-time on JS target. In it I need to read a file. This works fine on the C backend using readFile as Nim is able to see it and use it on compile-time no problem. But when I try to run it on the js target it fails because it doesn't know about readFile
08:35:13FromGitter<mratsim> I didn’t work with the JS backend enough to help you on that :/
08:38:16FromGitter<alehander42> can u define a runtime readFile for the js backend and make it do whatever you want (like error msg or something)
08:41:23PMunchHmm, I guess I could
08:46:25*xet7 joined #nim
08:46:56PMunchHmm, internal error: (filename: "vmgen.nim", line: 1475)
08:47:00PMunchThat can't be good..
08:48:46FromGitter<alehander42> can you share a snippet
08:51:07PMunchNot really..
08:51:29PMunchThe error occurs on the line that starts the protobuf parsing macro
08:51:37PMunchAnd it's ~2000 lines..
08:51:56FromGitter<alehander42> hahaha i see
08:52:57PMunchHoly shit, I think I need to get back into GUI programming. Just checked the page hit counter on my web-page and my post on "Cross-platform GUIs and Nim macros" is by far the most populer with 22319 views!
08:53:03FromGitter<alehander42> :D
08:53:34FromGitter<alehander42> is the js support working otherwise
08:53:57FromGitter<alehander42> oh I have to read it then
08:54:07PMunchWell, I have no idea if it works or not
08:54:14PMunchNever really tried it until now..
08:59:37*MypMyp quit (Quit: Leaving.)
09:07:54*MypMyp joined #nim
09:09:05*MypMyp quit (Client Quit)
09:13:58*leorize quit (Ping timeout: 265 seconds)
09:14:27*leorize joined #nim
09:17:40*MypMyp joined #nim
10:00:31*leru_ joined #nim
10:02:34*leorize quit (Ping timeout: 260 seconds)
10:04:50leru_Hi, I just wanted to compile my code on Windows, but I get this error: https://pastebin.com/EZuRdzEc
10:06:05FromGitter<leruu> Please use my gitter handle, if you know a solution. Thanks!
10:06:12*leru_ quit (Quit: Page closed)
10:09:12PMunchAraq, any idea what could generate this: Error: internal error: (filename: "vmgen.nim", line: 1475, column: 22)
10:09:21PMunchTrying to compile protobuf on the JS target
10:10:08FromGitter<mratsim> @leruu seems like a bug, you should report it on the tracker with a snippet to reproduce
10:10:18FromGitter<mratsim> especially if it works on linux/mac
10:14:43FromGitter<leruu> @mratsim The "funny" thing is, the error even shows up, when I try to compile an empty file
10:16:03FromGitter<mratsim> It’s probably an issue on your Nim install, Appveyor (windows testing) is green at the moment
10:16:23FromGitter<mratsim> Try using choosenim? https://github.com/dom96/choosenim#windows
10:19:06FromGitter<leruu> No, just the default install from https://nim-lang.org/install_windows.html
10:22:04*xet7 quit (Quit: Leaving)
10:22:11FromGitter<leruu> Oh, sorry
10:22:31FromGitter<leruu> Didn't read correctly. I was distracted
10:22:36FromGitter<leruu> Will try
10:24:58*yglukhov_ quit (Remote host closed the connection)
10:25:33*yglukhov joined #nim
10:30:04*yglukhov quit (Ping timeout: 268 seconds)
10:33:50*yglukhov joined #nim
10:35:33FromGitter<gogolxdong> @PMunch what is your GUI project?
10:51:46*dddddd joined #nim
10:53:14*MypMyp quit (Quit: Leaving.)
10:55:37FromGitter<dom96> @leruu your C and Nim compiler's architectures don't match. That's your problem.
10:55:58FromGitter<dom96> You've got a 32 bit C compiler and a 64bit Nim compiler or vice versa.
10:57:00PMunch@gogolxdong, The one I wrote about was my GenUI macro for wxWidgets
10:59:14*noonien joined #nim
11:00:16FromGitter<gogolxdong> What the difference with nimx?
11:00:50PMunchWell nimx only draws to a canvas
11:01:02PMunchwxWidgets uses the native GUI toolkit on each platform
11:07:29FromGitter<gogolxdong> Doesn't compile.
11:08:19FromGitter<gogolxdong> Does native GUI toolkit mean performant?
11:09:38FromGitter<gogolxdong> Can we use it to make a browser?
11:15:24PMunchWhat doesn't compile?
11:15:37PMunchNative means both performant and properly integrated on the target platform
11:15:50FromGitter<gogolxdong> https://github.com/PMunch/wxnim
11:16:03PMunchSo on Windows it will use Win32, on OSX it will use Cocoa (or whatever it's called), and on Linux it will use Gtk
11:16:19PMunchDo you have wxWidgets installed?
11:16:24PMunchWhat error do you get?
11:16:28*MypMyp joined #nim
11:17:03FromGitter<gogolxdong> first is `Error: the overloaded () operator has to be enabled with {.experimental: "callOperator".}`
11:17:14FromGitter<gogolxdong> then is overloaded 'getMode' leads to ambiguous calls
11:30:43PMunchSeems to work better on 0.17.0
11:32:36FromGitter<gogolxdong> Doesn't matter ,AFAICS ,it's a candidate.
11:33:05PMunchCandidiate?
11:33:43FromGitter<gogolxdong> to make browser.
11:39:35planetis[m]Regarding the string and seq changes, is it considered ok not to initiate with newSeq?
11:40:07FromGitter<krux02> planetis: yes at least it should.
11:40:18FromGitter<krux02> I still found cases where it was required though
11:40:24FromGitter<krux02> (on the vm)
11:40:29FromGitter<krux02> (nimvm)
11:42:06planetis[m]Yes i think i also had an illegal storage access but can reproduce it now
11:44:43planetis[m]I wonder if it will result in better code or not.
11:46:00planetis[m](Meaning safety - readability not performance)
11:53:12FromGitter<krux02> I think it will result in better code.
11:53:32FromGitter<krux02> this init for seq types with length os zero is a bit pointless to me.
11:53:55*leorize joined #nim
11:53:59FromGitter<krux02> especially for types with members that have seq members
11:54:34FromGitter<krux02> I my code all that init fucntions did was initializing seq members
11:54:52FromGitter<krux02> now that I don.t need to do it anymore, I can the init functions entirely.
11:55:10FromGitter<krux02> I forgot the word "omit"
12:06:50*Vladar quit (Quit: Leaving)
12:08:08*MypMyp quit (Quit: Leaving.)
12:08:22*xkapastel joined #nim
12:11:08ddddddgogolxdong, I'd love to see a dillo-based nim browser (FLTK)
12:11:20planetis[m]Good point. On the other hand im 'afraid' to not init seqs since it might produce illigal access
12:11:46*xet7 joined #nim
12:12:30FromGitter<krux02> dillo?
12:12:44ddddddhttps://www.dillo.org/
12:13:03FromGitter<krux02> planetis: you should be able to just omit the initSeq
12:13:08FromGitter<krux02> when it doesn't work it is a bug
12:13:17FromGitter<krux02> can't guarantee though that it is bug free
12:13:23FromGitter<krux02> Nim has quite a few bugs
12:13:35FromGitter<narimiran> planetis: i would say - don't initialize them as much as possible, so if it produces illegal access in some situation - report that so it can be fixed ASAP
12:15:53planetis[m]:p so I can test them too
12:16:21FromGitter<krux02> dillo looks like a 90s browser
12:17:13planetis[m]More importantly: is newSeqUninitialized affected by these changes?
12:17:24FromGitter<narimiran> @krux02 so it would go nicely with the current nim forum? :P
12:18:56planetis[m]krux02: probably bc it is from 90s xD
12:19:41FromGitter<krux02> so it is a dinosaur that is left over from the 90s
12:20:08FromGitter<krux02> I shouldn't complain I use emacs as my editor and that is a dinosaur left over from the 80s
12:20:59*MypMyp joined #nim
12:22:56dddddddillo has versions this century :P
12:23:12*Vladar joined #nim
12:23:32*kier quit (Ping timeout: 268 seconds)
12:24:28*couven92 joined #nim
12:26:44FromGitter<mratsim> @planetis[m] I don’t think newSeqUnitialized is affected.
12:28:09FromGitter<krux02> what is thats
12:28:41*kier joined #nim
12:28:54FromGitter<mratsim> https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L751-L760
12:29:26FromGitter<mratsim> I’m wondering why it’s implemented like that instead of like this btw: ⏎ ⏎ https://github.com/mratsim/Arraymancer/blob/00ab694ab86a4bf642e59306db8f1ee33fff66b4/src/private/sequninit.nim#L15-L17
12:29:37PMunchgogolxdong, got it working fine on 0.18.0
12:29:47PMunchSeems to be some devel stuff breaking it
12:31:46*gokr joined #nim
12:35:17*MypMyp quit (Quit: Leaving.)
12:35:22*Hycryon joined #nim
12:35:58*Hycryon quit (Remote host closed the connection)
12:36:24*Hycryon joined #nim
12:36:54*Snircle joined #nim
12:38:31*athenot joined #nim
12:47:15*MypMyp joined #nim
12:49:31FromGitter<gogolxdong> You've always got quick hand. love you
12:50:05FromGitter<narimiran> ummm, that's what she said?
13:02:15*Ieatnerds joined #nim
13:03:06*thor77_ joined #nim
13:03:58*BlaXpirit joined #nim
13:05:55*Sargun_ joined #nim
13:05:55*nuxdie joined #nim
13:06:26*hogeland joined #nim
13:08:52*endragor quit (Remote host closed the connection)
13:09:18*def-- joined #nim
13:09:21*Araq_ joined #nim
13:09:33*MonsterAbyss_ joined #nim
13:09:34*mwbrown_ joined #nim
13:09:38FromGitter<leruu> Can anyone tell me what's the best setting for MinGW 64bit for Nim? Threads "posix" or "win32" and Exception "seh" or "sjlj"?
13:11:08*Hycryon quit (*.net *.split)
13:11:08*sendell quit (*.net *.split)
13:11:08*nuxdie_ quit (*.net *.split)
13:11:08*oprypin quit (*.net *.split)
13:11:08*mwbrown quit (*.net *.split)
13:11:08*thor77 quit (*.net *.split)
13:11:08*def- quit (*.net *.split)
13:11:08*ofelas quit (*.net *.split)
13:11:08*MonsterAbyss quit (*.net *.split)
13:11:09*hogeland_ quit (*.net *.split)
13:11:09*Araq quit (*.net *.split)
13:11:09*Sargun quit (*.net *.split)
13:11:12*BlaXpirit is now known as oprypin
13:11:13*def-- is now known as def-
13:11:43*mwbrown_ is now known as mwbrown
13:13:21*MypMyp quit (Quit: Leaving.)
13:16:20dom96leruu: just pick the defaults
13:16:35FromGitter<data-man> @leruu: https://stackoverflow.com/questions/29947302/meaning-of-options-in-mingw-w64-installerhttps://stackoverflow.com/questions/15670169/what-is-difference-between-sjlj-vs-dwarf-vs-sehhttps://stackoverflow.com/questions/17242516/mingw-w64-threads-posix-vs-win32
13:16:37dom96definitely not "posix"
13:17:46*ofelas joined #nim
13:19:59FromGitter<leruu> "just pick the defaults", "definitely not "posix"", posix is default :D
13:20:20*MypMyp joined #nim
13:20:24FromGitter<gogolxdong> @PMunch Did you push?
13:21:02dom96leruu: lol, then I don't know :)
13:21:05PMunchNo, there were no changes
13:22:48PMunchIf you've got wxWidgets installed properly and run "nim cpp -r controlgallery" in the examples/genuimacro directory using Nim 0.18.0 it should work
13:23:33*MypMyp quit (Client Quit)
13:25:53FromGitter<gogolxdong> I'm afraid it doesn't compile for 0.18.1 in linux neither 0.18.0 in windows.
13:26:28PMunchErrors?
13:26:30FromGitter<gogolxdong> `nim.cfg(3, 7) Error: invalid directive: 'endif'` for windows 0.18.0 i386
13:26:34PMunch0.18.1?
13:28:31FromGitter<leruu> @data-man thanks. I've alredy read similiar posts. Sound to me like I just shouldn't use gcc under Windows at all. Probably just going with vcc, since it's supported
13:28:47*MypMyp joined #nim
13:28:55dom96leruu: Nim ships with MINGW already, why are you installing it yourself?
13:29:44PMunchgogolxdong, hmm. Strange, you can just remove the last @end and replace the @endif with an @end
13:32:42FromGitter<data-man> @leruu: I don't know why you're so decided. GCC works perfectly under Windows.
13:35:39leorizehi, is it possible to have a nimscript file as the compiler global configuration file (similar to /etc/nim.cfg)?
13:36:43FromGitter<leruu> @dom96 I didn't know. It told me there is no gcc.exe, so I installed it
13:37:39dom96leruu: You might be interested in trying out choosenim, should make the installation easy for you
13:37:41FromGitter<gogolxdong> @PMunch I have installed windows installer and the header files locate in C:\wxWidgets-3.1.1\include, how do I specify the include path in windows?
13:39:45PMunchSee the readme :)
13:40:47*sendell joined #nim
13:40:50PMunchThere's a section on how to make it work which includes the flag for the location of those files
13:41:17FromGitter<leruu> @dom96 I installed choosenim, but it didn't help. Probably becaus of my default installation? I'll try to reinstall everything
13:41:38dom96yes, choosenim will find whatever gcc you have installed
13:41:41dom96and use it
13:41:49dom96even if the version/arch is wrong
13:42:16shashlickLeruu, what steps did you follow
13:42:45FromGitter<leruu> 1) run choosenim
13:42:51FromGitter<leruu> 1) compile prog.nim
13:42:54FromGitter<leruu> 1) no gcc was found
13:44:23shashlickI mean before choosenim
13:44:26*PMunch quit (Quit: Leaving)
13:45:14FromGitter<leruu> I just installed the default Nim from https://nim-lang.org/install_windows.html
13:45:42FromGitter<leruu> I did this before moving to Linux some time ago. Worked just fine with Sublime back then
13:46:24*PMunch joined #nim
13:49:42FromGitter<gogolxdong> mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release no makefile.gcc
13:51:58FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5af059fd6f9af87e044bf068]
13:55:36shashlickleruu: so you extracted which zip? 32-bit or 64-bit? how did you install mingw, etc.
14:00:44FromGitter<gogolxdong> How to rollback 0.18.1 to 0.18.0?
14:00:54*leorize quit (Ping timeout: 256 seconds)
14:02:04shashlickhow have you installed nim gogolxdong
14:02:47*vivus joined #nim
14:04:20*MypMyp quit (Ping timeout: 255 seconds)
14:04:26FromGitter<leruu> Ok, I did it. Just wiped off nim completely, redownloaded the default 64 bit files. Added them to path. Now it's working as expected. Well, a bit slow, but I guess that's because of windows
14:05:14*miran joined #nim
14:05:44FromGitter<krux02> @gogolxdong I am always on the git repo and if I need an older version I just checkout that older version. when it fails to compile I redownload the c sources for the bootstrapping compiler.
14:09:38PMunch@gogolxdong, easiest is just to use choosenim
14:12:09FromGitter<gogolxdong> Does choose nim work for linux ? windows doesn't compile I'm switching to linux and rollback.
14:13:02PMunchI use Linux and choosenim works just fine :)
14:15:03*PMunch quit (Quit: Leaving)
14:15:37*leorize joined #nim
14:17:23*PMunch joined #nim
14:29:36FromGitter<gogolxdong> Basically knows how to switch version, didn't make any compilation progress in contrast.
14:32:14FromGitter<gogolxdong> Choosenim is indeed the most convenient for switching version.
14:35:23FromGitter<gogolxdong> windows compilation error is above, linux compilation error is `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`
14:49:45FromGitter<krux02> I use Linux and I use git to choose a nim version
14:49:47FromGitter<krux02> works nice
14:52:25shashlickis it possible to get clipboard contents cross-platform with ni
14:52:27shashlicknim
14:55:33*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:57:41PMunchYou could wrap/copy this: https://github.com/jtanx/libclipboard
15:01:21dom96ugh, just spent an hour wrapping libsass, when a wrapper already existed... https://github.com/zacharycarter/nim-sass
15:01:26dom96Add your packages to Nimble guys!
15:13:24shashlickdom96: did you try nimgen? :)
15:14:12*leorize quit (Quit: WeeChat 2.1)
15:14:21shashlickPMunch: thanks - looks like a good candidate to wrap using nimgen
15:15:59*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:19:01*sleepyqt joined #nim
15:19:12*max3 joined #nim
15:20:58shashlickdom96: actually https://github.com/genotrance/nimgen/issues/2
15:26:08dom96I just used c2nim :)
15:26:54*Araq_ is now known as Araq
15:27:32Araqdom96: nimble should also search github
15:31:13*gokr quit (Ping timeout: 248 seconds)
15:32:31*thor77_ is now known as thor77
15:39:57*PMunch quit (Ping timeout: 240 seconds)
15:43:57*athenot joined #nim
15:46:38*rokups joined #nim
15:48:49*Trustable joined #nim
15:56:21shashlickdom96, Araq: tissue is now more useful for general nim issue management, run with "tissue -n -v issueid" and it will detect snippet and run locally with verbose output
15:56:36shashlick-n is to skip checking for compiler crash, so helps debug general issues too
16:00:00*Vladar quit (Quit: Leaving)
16:09:29*sendell quit (Remote host closed the connection)
16:18:19*jrbrt joined #nim
16:19:03*nsf quit (Quit: WeeChat 2.1)
16:26:38*MypMyp joined #nim
16:28:32*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:31:49*CodeVance joined #nim
16:53:13*athenot joined #nim
16:57:51*MypMyp quit (Quit: Leaving.)
17:16:36FromGitter<brentp> what am I doing wrong here?
17:16:45FromGitter<brentp> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5af089fc40f24c43045cc3ee]
17:17:05FromGitter<brentp> error is: ```t.nim(11, 13) Error: cannot instantiate Data ⏎ got: <type int, type float64> ⏎ but expected: <T: SomeNumber, U: SomeNumber> ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5af08a10f2d2d537046d79c8]
17:25:37dom96Good question
17:25:40dom96Seems like a possible bug
17:28:02miranbtw, what is the difference between `[T: SomeNumber]` and `[SomeNumber]`? because i've used the latter, and i see most people use the former....
17:29:11FromGitter<brentp> @dom96 thanks. I thought mabye I was doing something wrong. shall I open an issue?
17:29:34dom96brentp: I think so, I might be missing something though
17:32:57FromGitter<brentp> ok.
17:36:25FromGitter<narimiran> changing `Data` to only one type works: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5af08e986d98e53e045bf939]
17:41:00*DarkArctic joined #nim
17:48:08*gokr joined #nim
17:56:28FromGitter<brentp> yes. but I need 2 types.
17:56:38FromGitter<brentp> or more, actually
17:57:33FromGitter<narimiran> i expected at least this to work, but it doesn't: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5af0938c97e5506e04a43291]
18:00:01*PMunch joined #nim
18:00:31*MypMyp joined #nim
18:03:35FromGitter<brentp> seems to be the nested object, eh?
18:05:35*rokups quit (Quit: Connection closed for inactivity)
18:06:43mirani'll post this example under your issue
18:07:55PMunchHmm, what's the rationale of introducing BackwardsIndex for [0 .. ^1]
18:07:58subsetparkmiran: My understanding is that the latter won't have the semantics you probably expect. [T: SomeType | SomeOtherType] is generic speak for 'this function is generic across all types T, as long as T is SomeType or SomeOtherType'. So if you only have [Foo], whatever it is, then I believe it's acting like `T` in the previous example - not like `SomeType`. That is, it's just a variable bound to any type that code
18:07:59subsetparkneeds to be generated for
18:08:54subsetparkIt could be that if `Foo` happens to be the name of a type, then it is taken to mean [T: Foo] - but I hope not
18:09:05*gokr quit (Ping timeout: 248 seconds)
18:09:11miransubsetpark: thanks for the detailed explanation!
18:09:51subsetparkAny time
18:10:06mirani have looked, i have this: `proc count*[SomeNumber](start: SomeNumber)`
18:12:29FromGitter<krux02> that seems a lot like a bug
18:12:48FromGitter<krux02> If you leave out the :SomeNumber then it will work
18:13:48miransubsetpark: ...and now i see that it doesn't work as i expected it to work - i can pass a char to it.
18:14:17miranchanging to `[T: SomeNumber]` solves the problem
18:14:47FromGitter<krux02> @brentp this works http://ix.io/19Hc
18:15:32mirankrux02: yeah, only one type works
18:15:46FromGitter<brentp> yes @narimiran had same example, but I need T and U to (be able to) differ
18:15:49FromDiscord<awr> `proc count*(start :SomeNumber)` can also work, depending on how you use it
18:16:55FromDiscord<awr> i'm confused by what you're talking about. do you need disparate types that are all of the class SomeNumber?
18:16:56FromGitter<krux02> @brentp I removed the some number restriction, but does that solve your problem?
18:17:20FromGitter<krux02> awr: I would guss two different types that are both a number type
18:17:26FromGitter<krux02> that is my interpretation
18:18:05FromDiscord<awr> when you do a single generic parameter that type is considered "constant" across the whole area
18:18:21FromGitter<krux02> but to be honest I don't see the point in this example at all. I guess it is just some trying out the language and finding what works and what doesn't
18:18:40FromGitter<brentp> @krux02 I would want, for example to have element be of type int and data of float64.
18:18:50FromGitter<brentp> I have a real use-case, not just trying to break things.
18:19:03FromDiscord<awr> however if you use the type classes directly without explicating a generic parameter, iirc it will create a unique generic parameter for each "instance" of the type
18:19:25FromGitter<krux02> yea, but what if you remove the limitation of SomeNumber like I did?
18:19:38FromDiscord<awr> unless you declare multiple params of the same type
18:19:45FromGitter<krux02> as long as it is not public API it shouldn't clause any problems
18:20:06FromGitter<brentp> @krux02 in your example, you still can't mix float with int U and T must be same type.
18:20:17FromGitter<krux02> @brentp really?
18:20:41FromGitter<brentp> @krux02 yes
18:20:52mirankrux02: you oversimplified the problem :)
18:20:58FromDiscord<awr> so i think it works like `foo(a, b: SomeNumber)` is `foo[T: SomeNumber](a, b: T)` and `foo(a: SomeNumber, b: SomeNumber` is `foo[T, U: SomeNumber](a: T, b: U)`
18:21:02FromDiscord<awr> i think so anyway
18:21:05FromGitter<krux02> you are right I copied the wrong code
18:21:05miranin the original one @brentp had [T, U]
18:21:06FromGitter<krux02> sorry
18:21:53miranawr: indeed it is so! thanks for the help! i think the first version looks the best, i'll use that
18:22:03FromGitter<krux02> http://ix.io/19Hf
18:22:05miran@awr ^
18:22:13FromGitter<krux02> that one works
18:22:44FromGitter<brentp> so just remove the constraints?
18:22:48FromGitter<krux02> yes
18:23:01FromGitter<krux02> not ideal, but it works and you can go on
18:23:13FromGitter<krux02> I will make a bug report
18:23:14Araqsadly generic constraints are super buggy
18:23:28Araqand even more sadly, I don't know why
18:23:41FromGitter<krux02> this is my bug report: http://ix.io/19Hg
18:23:50FromGitter<brentp> @krux02 here is the one I opened: https://github.com/nim-lang/Nim/issues/7794#issuecomment-387153866
18:23:52mirankrux02: already opened: https://github.com/nim-lang/Nim/issues/7794
18:24:09FromGitter<krux02> ah, ok I will post it ther
18:24:49*Ieatnerds quit (Ping timeout: 260 seconds)
18:27:29FromGitter<krux02> @brentp why do you box the Element type?
18:28:04FromGitter<brentp> that's how I found the bug--with nested objects. then realized it wasn't necessary.
18:28:08FromGitter<krux02> why don't you just take `ref U` or even just `e*: U`
18:28:09FromGitter<brentp> to reporduce.
18:28:17FromDiscord<awr> k i did some testing
18:28:35FromDiscord<awr> any instance of a type class in a function is just considered to be the same type throughout
18:28:54FromDiscord<awr> if it's not explicitly made generic
18:29:08FromGitter<krux02> ah ok
18:29:21FromDiscord<awr> (ofc type classes are implictly generic but you know what i mean)
18:29:52FromDiscord<awr> so `proc something*(a: SomeNumber, b: SomeNumber)` and `proc something*(a, b: SomeNumber)` are the same
18:30:14*MypMyp quit (Quit: Leaving.)
18:32:30FromGitter<krux02> awr: hmm when that is the cause you can write it into the bug report
18:32:41FromGitter<krux02> that might be good information to find the cause of this bug
18:33:16FromDiscord<awr> ```nim
18:33:16FromDiscord<awr>
18:33:16FromDiscord<awr> import typetraits
18:33:17FromDiscord<awr>
18:33:17FromDiscord<awr> when true:
18:33:17FromDiscord<awr> # compiles
18:33:17FromDiscord<awr> proc something*[T, U: SomeNumber](a :T, b: U) =
18:33:19FromDiscord<awr> echo("type `a`:", a.type.name)
18:33:20FromDiscord<awr> echo("type `b`:", b.type.name)
18:33:20FromDiscord<awr> else:
18:33:22FromDiscord<awr> # fails
18:33:23FromDiscord<awr> proc something*(a, b: SomeNumber) =
18:33:25FromDiscord<awr> echo("type `a`:", a.type.name)
18:33:26FromDiscord<awr> echo("type `b`:", b.type.name)
18:33:28FromDiscord<awr>
18:33:29FromDiscord<awr> something(2'f32, 2'i32)
18:33:30FromDiscord<awr> ```
18:37:26FromGitter<krux02> awr: well that became a mess on gitter
18:37:43FromGitter<krux02> if you use ix.io I could actually copy paste it
18:38:23FromDiscord<awr> wait how did it look on gitter?
18:40:12FromDiscord<awr> https://glot.io/snippets/f0tlczy9it
18:41:59FromGitter<krux02> well to me that is supposed to work like that.
18:42:25FromDiscord<awr> yeah i was wondering if this is
18:42:29FromGitter<krux02> awr: when you have a generic types "Foo[T]" then you can just reuse the name
18:42:29FromDiscord<awr> desired behavior or not
18:42:41FromGitter<krux02> yea I guess so
18:43:07FromGitter<krux02> the documentation could be better though
18:44:35miranwait, why is awr's example "supposed to work like that"?
18:44:50miranwhat's wrong with `proc something*(a, b: SomeNumber)`?
18:45:34miranoooooh, because of int and float
18:45:48mirani didn't see that parameters are of different type
18:46:04FromDiscord<awr> if you use the same typeclass it's assumed to be the same type everywhere
18:46:29FromDiscord<awr> unless you make it very clear in the generic parameters that they can be disparate types
18:47:38FromDiscord<awr> glot io needs syntax highlighting for nim
18:48:16FromDiscord<awr> it's the only online text file thing i know that supports nim compilation
18:48:31FromDiscord<awr> it's probably an ancient build tho
18:49:24FromDiscord<awr> it's 0.17.2
18:50:07FromGitter<krux02> well I just use my local Nim to compile it
18:51:45*CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
18:51:51FromGitter<krux02> I have a hotkey in emacs that opens /tmp/scratch.nim
18:51:58*CodeVance joined #nim
18:52:13FromGitter<krux02> basically my most important hotkey next to compile
18:52:13dom96awr: https://play.nim-lang.org
18:53:35FromDiscord<awr> hm can you show me your elisp code for that?
18:54:00FromDiscord<awr> also thanks dom96
18:54:25dom96You can use NimBot for code eval too :)
18:54:33dom96!eval echo("Hello World!")
18:54:36NimBotHello World!
18:58:03CodeVancedom96, what happens if it makes an error?
18:58:09dom96try it
18:58:27CodeVance!eval echo(@[111,"asdasd"])
18:58:28NimBotCompile failed: in.nim(1, 12) Error: type mismatch: got <string> but expected 'int literal(111)'
18:58:45CodeVanceok so I didn't break anything
18:58:51subsetparkmiran: You can easily put something like `proc foo[A, B](a: A, b: B) =` - A and B can be the same or different
19:00:47miransubsetpark: thanks, i'll do something like that
19:02:05mirandom96: how do i add keywords/tags for my nimble package?
19:02:31dom96publish it
19:02:38miranhttps://github.com/nim-lang/nimble#nimble-search
19:03:07miranshould i have `tags` field in .nimble file?
19:03:46*crvnkl joined #nim
19:04:16*Ieatnerds joined #nim
19:05:32mirandom96: the package is already published, i would like to modify/add keywords/tags
19:05:54dom96Modify the packages.json file then
19:05:59dom96The .nimble file doesn't contain any tags
19:12:40*yglukhov_ joined #nim
19:14:57PMunchHmm, I'm getting ambiguous call errors when I call a proc that takes either a string or a ref object. Any way to create a proc that matches on nil?
19:15:17*yglukhov quit (Ping timeout: 255 seconds)
19:19:53*nsf joined #nim
19:21:44*crvnkl quit (Quit: Page closed)
19:22:28*jrbrt quit (Quit: jrbrt)
19:27:53FromGitter<Varriount> Oh neat, Sublime Text has an update
19:28:31FromGitter<Varriount> PMunch: Could you post an example of the code? Or at least the procedure declaration?
19:29:15PMunchhttp://ix.io/19HQ
19:30:16FromDiscord<awr> is it me or does that not load
19:31:23FromDiscord<awr> oh nvm it was my HTTPS thing
19:36:15FromDiscord<awr> untested: https://glot.io/snippets/f0tmwie35d
19:37:35PMunchOf course -_-
19:37:38PMunchThat works fine
19:48:23*Trustable quit (Remote host closed the connection)
20:22:02*noonien quit (Quit: Connection closed for inactivity)
20:24:16*miran quit (Quit: Konversation terminated!)
20:25:30PMunchHmm, any ideas: http://ix.io/19I8
20:26:00FromGitter<Varriount> What is a StringSlice?
20:26:04PMunchnewStringSlice looks like this: http://ix.io/19I9
20:26:33*jrbrt joined #nim
20:27:05PMunchHmm, seems like I have messed something up..
20:28:33PMunchIt used to work..
20:31:45PMunchI'm lost..
20:31:51PMunchThis worked just fine a second ago
20:34:03PMunchOoooh
20:34:12PMunchI know, I changed StringSlice from object to ref object
20:42:27*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:46:00*odc_ joined #nim
20:46:04*dashed_ joined #nim
20:47:03*euantor_ joined #nim
20:49:47*rockcavera quit (Remote host closed the connection)
20:50:36*newb_ joined #nim
20:51:57*JStoker quit (Killed (wolfe.freenode.net (Nickname regained by services)))
20:51:59*JStoker joined #nim
20:53:21*dashed quit (*.net *.split)
20:53:21*EastByte quit (*.net *.split)
20:53:21*endes[m] quit (*.net *.split)
20:53:22*macsek1911[m] quit (*.net *.split)
20:53:22*stisa quit (*.net *.split)
20:53:22*solitudesf quit (*.net *.split)
20:53:22*mgdelacroix[m] quit (*.net *.split)
20:53:22*pqflx3[m] quit (*.net *.split)
20:53:22*dyce[m] quit (*.net *.split)
20:53:22*odc quit (*.net *.split)
20:53:23*euantor quit (*.net *.split)
20:53:29*euantor_ is now known as euantor
20:53:38*dashed_ is now known as dashed
20:53:59*odc_ is now known as odc
20:54:06*EastByte joined #nim
20:55:01newb_hello, kinda a noob question, when you have a ref object created via new, how do you delete it?
20:55:20*stisa joined #nim
20:55:21*pqflx3[m] joined #nim
20:55:23*endes[m] joined #nim
20:56:08*solitudesf joined #nim
20:56:08*macsek1911[m] joined #nim
20:56:12*mgdelacroix[m] joined #nim
20:57:35*dyce[m] joined #nim
21:02:42FromGitter<krux02> ref objects are garbage collected. you don't delete it
21:02:54FromGitter<krux02> and when you initialize it with the object constructor, no new is required
21:03:05FromGitter<krux02> just a nil ref is initialized with new (I think)
21:04:22newb_so if you set a ref to nil, if it used to point to an object it will be garbage collected?
21:05:04FromGitter<krux02> yes
21:07:46newb_do I need to worry about having multiple refs to the same object causing it to live longer than expected?
21:19:15*rockcavera joined #nim
21:19:15*rockcavera quit (Changing host)
21:19:15*rockcavera joined #nim
21:19:40*newb_ quit (Ping timeout: 260 seconds)
21:19:47PMunchnewb_, yes
21:22:35FromGitter<Varriount> @dom96 How developed is your nim-jsonrpc library?
21:22:46dom96not very
21:23:26*nsf quit (Quit: WeeChat 2.1)
21:23:37PMunchUgh, after all my refactoring: Error: cannot generate VM code for ref string
21:23:39PMunch-_-
21:24:19PMunchDoes ptr string work?
21:24:21FromGitter<Varriount> PMunch: How much of your code deals with those string slices?
21:24:32PMunchAt the moment? All of it
21:24:34FromGitter<Varriount> You might be able to get away with using toOpenArray
21:24:53dom96'ref string'?
21:24:58PMunchI was having trouble with combparser being slow for parsing protobuf files
21:25:00dom96Why are you using a 'ref string'?
21:25:33PMunchThis was probably caused by superfluous string copies from making slices
21:26:11PMunchSo I decided I should create a StringSlice type that kept a reference to a base string, and a start and stop slice point
21:26:54PMunchhttp://ix.io/19Iu
21:27:01PMunchThat's what I ended up with
21:31:48PMunchAnd it works fine.. But apparently ref string isn't allowed in the VM
21:33:19dom96Did this StringSlice type fix your performance problems?
21:34:17PMunchI don't know..
21:34:31PMunchSince I can't run them in the VM, which is very the protobuf parsing is done
21:37:05*kier quit (Ping timeout: 248 seconds)
21:37:40Araqhuh?
21:37:47Araqthe VM supports ref strings
21:37:52Araqwell it should.
21:38:03Araqmaybe you are using a type where the VM wants a value
21:38:34PMunchWell the error is: /home/peter/Projects/strslice/strslice.nim(12, 20) Error: cannot generate VM code for ref string
21:38:45FromDiscord<awr> what is HSlice
21:38:46PMunchAnd the strslice file is this one: http://ix.io/19Iu/nim
21:39:22FromDiscord<awr> oh it's in system
21:39:40PMunchawr, yeah it's a slice type
21:39:44FromDiscord<awr> is HSlice something new? i'm on 0.18
21:39:57PMunchAnd what is passed to the `[]` proc when you do "hello"[1..3]
21:40:01PMunchNope, it's pretty old
21:40:31FromDiscord<awr> it's telling me unidentified identifier
21:40:47FromDiscord<awr> oh what the fuck
21:41:13FromDiscord<awr> my PATH is fucked up, i've been compiling with some 0.17.3 build i forgot to get rid of
21:41:22*kier joined #nim
21:42:48FromDiscord<awr> what are you trying to do here anyway?
21:42:55FromDiscord<awr> use protobuf at compile time?
21:42:55PMunchPerformance
21:43:10FromDiscord<awr> in regards to what?
21:43:19PMunchOh yeah, it's my protobuf library. It parses the protobuf specification on compile-time and generates Nim code to read and write types
21:43:37PMunchProblem is the parser is super slow
21:44:24PMunchI think most of the problem lies in how it copies the input string everywhere it goes
21:44:55PMunchSo I decided to create a slice type so only 1 copy of the string could be kept, and all the slices would just be indices into that one string
21:47:46FromDiscord<awr> i compiled it and it runs correctly. your issue is that it doesn't work at compiletime?
21:50:06PMunchYeah
21:50:19FromDiscord<awr> change `result.str = new(ref string)` to just `new result.str`
21:50:25PMunchYeah the module itself works fine
21:50:26FromDiscord<awr> it works at compiletime
21:50:28FromDiscord<awr> when you do that
21:50:32PMunchIt does?
21:50:34FromDiscord<awr> yes
21:50:36FromDiscord<awr> just tested it
21:51:38FromDiscord<awr> hm
21:51:42FromDiscord<awr> it works slightly differently
21:53:20PMunchIt does?
21:53:30PMunchSeems to work fine for protobuf though
21:53:32PMunchhttp://ix.io/19Iy
21:53:37PMunchAnd it gives a speed up :)
21:54:34FromDiscord<awr> https://glot.io/snippets/f0tqpio8x9 don't use the compiler on the site, copy and paste to text editor and compile
21:55:28FromDiscord<awr> whoops should've just used the thing dom96 linked me
21:56:55FromDiscord<awr> something is extremely wrong. it compiles but gives different results
21:57:25FromDiscord<awr> at compiletime i get `ello worl` for the first echo but i get `ellocworl` at runtime for the first echo
21:57:37PMunchOops, I had forgotten to run rm -r nimcache betwene those last runs
21:57:44PMunchStill a speed-up, but not as great
21:57:50PMunchBut that is only for a very small file
21:58:08PMunchawr, ouch
21:58:22PMunchThat means it doesn't use the reference on compile time..
21:59:07FromDiscord<awr> hm
21:59:18PMunchStrange that I'm seeing speedups then
21:59:36FromDiscord<awr> without more rigorously checking if what i'm doing is right
22:00:24FromDiscord<awr> it fixes itself when i change inside `proc `[]`*(str: StringSlice, slc: HSlice[int, int or BackwardsIndex]): StringSlice =`
22:00:33FromDiscord<awr> `new result` to `result = str`
22:01:00PMunchYeah not surprisingly
22:01:06PMunchBut that mutates the original
22:01:16PMunchWhich is not what you want
22:01:23FromDiscord<awr> that raises the question of why is StringSlice a ref object
22:01:46PMunchTo more easily be able to replace strings with it
22:01:47FromDiscord<awr> i understand why you want the ref string
22:01:56FromDiscord<awr> you don't want string copying anywhere
22:02:05PMunchSince strings can be nil, it makes sense for StringSlice to be able to be nil as well
22:02:27FromDiscord<awr> hmmmmm
22:02:33PMunchIt was originally a regular object
22:02:57PMunchUntil I went over and tried to replace everything in protobuf with StringSlices and ran into problems where I had used == nil checks
22:03:36FromDiscord<awr> you should be using isNil instead of == nil. == nil will not compile for some types (i don't have an example offhand but it's happened to me before)
22:05:09FromDiscord<awr> although it seems that you do this anyway
22:11:05*CodeVance is now known as asdafg
22:11:37*asdafg is now known as CodeVance
22:13:31FromDiscord<treeform> PMunch, I made a thrift parser, right now it just parsers the thrift def and does not produce any glue code. I actually just needed to parse thrift and turn into SQL (crazy i know). How did you make the parser part? Is your code on github some place?
22:13:55FromDiscord<treeform> PMunch, I made a thrift parser, right now it just parsers the thrift def and does not produce any glue code. I actually just needed to parse thrift and turn into Json (crazy i know). How did you make the parser part? Is your code on github some place?
22:14:10*CodeVance is now known as asdafg
22:14:32PMunchtreeform, yeah the parser is called combparser
22:14:44*asdafg is now known as CodeVance
22:14:47PMunchYou can see how I use it in protobuf under src/protobuf/private/parse.nim
22:15:16PMunchAraq, this is a bug right? http://ix.io/19IS/nim
22:16:44FromDiscord<treeform> wow combparser is really different from the way I did it.
22:19:13*riidom quit (Ping timeout: 248 seconds)
22:19:18FromDiscord<treeform> Hmm I though the syntax was nearly identical, does not look like that is the case.
22:20:02PMunchThat's the beauty of combparser though
22:20:27PMunchYou can mix and match every piece of it. So it's really easy to change the parser to do something else
22:20:39FromDiscord<treeform> you don't explain how to use it: https://github.com/PMunch/combparser
22:21:06PMunchYeah I know, the documentation is still a bit.. Sparse
22:21:24PMunchBasically you have parsers and combinators
22:22:33PMunchA parser like s, regex, regex, peg, charmatch, and allbut returns a proc that takes a string and returns a parse result
22:22:45PMunchThe the combinators are used to chain these procs together
22:23:08PMunchThe repeat proc is perhaps the simplest one, repeating the given procedure on the input until it doesn't match any longer
22:24:19FromDiscord<treeform> looking at it, maybe its not too hard to figure out.
22:24:53PMunchAll the combinators and parsers are also documented in the file
22:26:04PMunchThen you can use map which takes a parser (one of the parser procs or a combinator of multiple procs) and a procedure to convert from one type to another. This is how I generate the protobuf nodes from the parsed input
22:26:47PMunchawr, Araq, created a bug report https://github.com/nim-lang/Nim/issues/7795
22:29:30PMunchHmm, is there a way to show the value of a ref in the VM?
22:29:48PMunchcast[int](a) complains that the VM is only allowed to cast between ints of the same size..
22:30:19FromDiscord<awr> try repr()
22:30:54PMunchNope, that repr'd the string
22:32:35PMunchOh well, way past bedtime already
22:32:36*PMunch quit (Quit: leaving)
22:33:57FromDiscord<awr> hm
22:34:41FromDiscord<awr> doing shallowCopy doesn't seem to do anything either
22:39:07Araqthe VM deep copies refs
22:39:18Araqcan't be hard to fix :P
22:40:32FromDiscord<awr> appears to be specific to just ref strings
22:40:35*sleepyqt quit (Remote host closed the connection)
22:41:50FromDiscord<awr> it works correctly, for instance, with `ref seq[int]`
22:41:56FromDiscord<awr> it just breaks for `ref string`
22:42:54FromGitter<Varriount> Doesn't deep-copying refs break semantics?
22:44:50Araqwell it is a bug
22:45:17FromDiscord<awr> https://glot.io/snippets/f0ts437d3q
22:48:02*skrylar joined #nim
22:48:08*max3 quit (Quit: Connection closed for inactivity)
22:49:04*CodeVance quit (Read error: Connection reset by peer)
22:49:13*Hycryon joined #nim
22:49:23*CodeVance joined #nim
22:49:37*Sembei joined #nim
22:52:27*Ieatnerds quit (Ping timeout: 240 seconds)
22:52:34*Pisuke quit (Ping timeout: 260 seconds)
23:07:16*CodeVance_ joined #nim
23:08:04*CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
23:08:11*CodeVance_ is now known as CodeVance
23:14:19FromDiscord<awr> i'm too lazy to check but does nim automatically collapse concatentated string literals that are adjacent to each other
23:15:15FromDiscord<awr> e.g. if i say `var a = "hello" & " " & "world"` at compile-time in c is that reduced to `"hello world"`
23:16:38Araqyes
23:16:45FromDiscord<awr> cool
23:37:27*leorize joined #nim
23:38:34*CodeVance quit (Read error: Connection reset by peer)
23:38:38*CodeVance_ joined #nim
23:38:38*CodeVance_ quit (Client Quit)
23:38:56*CodeVance joined #nim