<< 12-12-2017 >>

00:03:29*astronavt quit (Quit: Leaving...)
00:03:40*astronavt joined #nim
00:07:11*enigmeta quit (Ping timeout: 258 seconds)
00:08:32*enigmeta joined #nim
00:15:20*sz0 quit (Quit: Connection closed for inactivity)
00:18:28*yglukhov joined #nim
00:22:33*yglukhov quit (Ping timeout: 246 seconds)
00:39:00*vlad1777d quit (Ping timeout: 246 seconds)
00:39:02*qih quit (Quit: leaving)
01:05:18*endragor joined #nim
01:07:58*vivus quit (Quit: Leaving)
01:46:21*obadz quit (Ping timeout: 268 seconds)
01:53:35*marenz_ quit (Ping timeout: 240 seconds)
02:02:49*rbrt quit (Quit: Oíche mhaith)
02:11:09*obadz joined #nim
02:22:39*NopeDK quit (Quit: Page closed)
02:33:05*kier quit (Ping timeout: 248 seconds)
02:43:55*chemist69 quit (Ping timeout: 250 seconds)
02:57:58*chemist69 joined #nim
02:59:28*yglukhov joined #nim
03:02:09*onionhammer quit (Quit: WeeChat 1.9.1)
03:03:29*yglukhov quit (Ping timeout: 248 seconds)
03:04:05GitDisc<awr> does there exist a proc like astToStr() that works the other way around (string into AST) for templates?
03:04:31*onionhammer joined #nim
03:06:16*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:07:16GitDisc<awr> i'd like to avoid using macros
03:10:58GitDisc<awr> this would be for identifiers
03:11:14GitDisc<awr> for example
03:11:24GitDisc<awr> template foo(name :untyped) :untyped =
03:11:24GitDisc<awr> var strToAst(name & "BarBaz") {.inject.} = 0
03:11:25GitDisc<awr> foo("a") # var aBarBaz = 0
03:11:26GitDisc<awr> foo("b") # var bBarBaz = 0
03:29:52*astronavt quit (Remote host closed the connection)
03:30:12*astronavt joined #nim
03:37:02*kier joined #nim
04:06:51*SenasOzys_ quit (Ping timeout: 240 seconds)
04:17:39*fredrik92 joined #nim
04:17:58*couven92 quit (Disconnected by services)
04:18:03*fredrik92 is now known as couven92
04:18:28*fredrik92 joined #nim
04:22:26*Senketsu joined #nim
04:57:11*BitPuffin|osx joined #nim
05:08:27FromGitter<Varriount> awr: parseExpr?
05:16:49*rbrt joined #nim
05:29:23*rbrt quit (Quit: Oíche mhaith)
05:30:46*yglukhov joined #nim
05:31:56*rbrt joined #nim
05:35:38*dddddd quit (Remote host closed the connection)
05:38:34*rbrt quit (Quit: Oíche mhaith)
05:39:56*rbrt joined #nim
05:42:01*astronavt quit (Quit: Leaving...)
05:43:08*skrylar joined #nim
05:45:55*rbrt quit (Quit: Oíche mhaith)
05:53:07*rbrt joined #nim
06:04:10*rbrt quit (Quit: Oíche mhaith)
06:05:18*rbrt joined #nim
06:16:04*yglukhov quit (Remote host closed the connection)
06:16:40*endragor quit (Remote host closed the connection)
06:16:45*yglukhov joined #nim
06:19:02*rbrt quit (Quit: Oíche mhaith)
06:34:21*SenasOzys_ joined #nim
06:35:39*yglukhov quit (Remote host closed the connection)
06:38:56*nsf joined #nim
06:52:04*endragor joined #nim
06:54:20*endragor quit (Remote host closed the connection)
06:54:27*endragor joined #nim
06:58:53*solitudesf joined #nim
07:01:06*SenasOzys_ quit (Remote host closed the connection)
07:20:12*jjido joined #nim
07:52:06*gokr joined #nim
07:57:11*yglukhov joined #nim
08:10:56*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:17:09*radagast quit (Quit: radagast)
08:17:17*Ven`` joined #nim
08:17:17*Ven`` quit (Client Quit)
08:17:23*radagast joined #nim
08:19:16*PMunch joined #nim
08:24:36*claudiuinberlin joined #nim
08:43:55*Syneh_ quit (Ping timeout: 258 seconds)
08:44:02*rokups joined #nim
08:44:15*Syneh_ joined #nim
08:50:25FromGitter<QeyeH> Hi, I cloned the repo https://github.com/Araq/wxnim, but since this is the first time I have cloned a Nim repo, I'm not sure what to do now? ⏎ ~/projects/wxnim$ nim -r c wx.nim ... or something else?
08:51:36*Vladar joined #nim
08:54:55PMunchQeyeH, what do you want to achieve?
08:55:19PMunchYou can run the examples by going into the examples directory and running "nim c -r example3.nim"
08:55:23PMunchFor example
08:55:27FromGitter<QeyeH> To run it I guess Sorry that sounds like a dumb answer but ...
08:55:34FromGitter<QeyeH> Ah right
08:55:45FromGitter<QeyeH> OK thanks
08:56:14PMunchAnd make sure to have read the installation instructions
08:56:40PMunchwxnim must be placed next to a directory wxWidgets-3.0.2
08:56:54FromGitter<QeyeH> Yep I did that exactly
08:57:06PMunchOh, and it's "nim cpp -r example2.nim"
08:57:14PMunchwxWidgets is C++
08:58:04FromGitter<QeyeH> Ahh right, cos '/../examples $ nim c -r example3.nim' failed
09:00:18FromGitter<gogolxdong> How to configure IP for windows in Nim?
09:00:42PMunchgogolxdong, what?
09:00:52PMunchWhat exactly are you trying to do?
09:01:31FromGitter<gogolxdong> I'm trying to autoconfig ip for windows instance of openstack.
09:02:34FromGitter<gogolxdong> It can't be configured properly with cloud-init.
09:02:56PMunchYou probably have to wrap some functions from iphlpapi.h
09:03:02PMunchhttps://msdn.microsoft.com/en-us/library/aa923597.aspx
09:03:12PMunchhttps://stackoverflow.com/questions/2906386/change-ip-settings-using-c
09:03:49FromGitter<gogolxdong> quick response ,thanks
09:10:07PMunchQeyeH, did you get the wxNim examples to run?
09:10:36FromGitter<QeyeH> OK, no /../examples $ nim cpp -r example3.nim ... fails. ⏎ Key error: /home/qih/projects/wxnim/examples/nimcache/wxnim_example3.cpp:11:23: fatal error: wx/wxprec.h: No such file or directory
09:11:25FromGitter<QeyeH> qih@geogoblin:~/projects$ pwd && ll ⏎ /home/qih/projects ⏎ total 24 ⏎ drwxrwxr-x 6 qih qih 4096 Dec 12 19:24 ./ ⏎ drwxr-xr-x 29 qih qih 4096 Dec 12 22:05 ../ ... [https://gitter.im/nim-lang/Nim?at=5a2f9d3dba39a53f1a4dfa5d]
09:16:11PMunchAnd you've built wxWidgets inside that folder?
09:17:17FromGitter<QeyeH> Ah, built the widgets in which folder?
09:17:39PMunchYou need to build wxWidgets in the wxWidgets-3.0.2 folder
09:17:49PMunchBut you're using Araq/wxnim right?
09:18:06PMunchIf you want to you could always grab my fork: https://github.com/PMunch/wxnim
09:18:09FromGitter<QeyeH> OK, referring to: https://github.com/Araq/wxnim, I did not see anything about building widgets
09:18:29FromGitter<QeyeH> Yes I am using araq/wxnim
09:19:29PMunchOn Linux you could just install wxGtk with your package manager and then don't have to worry about the wxWidgets folder at all
09:20:20FromGitter<QeyeH> Ah, well I did install wxGTK as per the instructions: http://codelite.org/LiteEditor/WxWidgets31Binaries#toc2
09:23:33PMunchIf you have installed wxGtk from your package manager and pulled the PMunch/wxnim repository it should be possible to just cd into the examples folder and run the examples
09:29:01*solitudesf quit (Ping timeout: 260 seconds)
09:32:17skrylarthere is also a fltk option :^)
09:32:32skrylarshould probably work on the texinfo for that one someday. meh
09:37:35PMunchI think I might've solved my issue with genui as well, so that might be available soonish
09:41:02skrylarnifty
09:41:12skrylari saw red just announced they got their vid dialect running on macos
09:41:28skrylarwell by just announced, its the latest post. it was probably less recent than today
09:44:43skrylarcobweb could be interesting to use with genui, although that one is hmm
09:44:55skrylarit does work now but the base types are in question still
09:48:23*vlad1777d joined #nim
10:00:36*qih joined #nim
10:01:17qihPMunch: Thanks, sorry was AFK for a bit, I'll grab your fork.
10:01:45PMunchHmm, interesting skrylar. Link?
10:01:53PMunchqih, no problem
10:04:11skrylarPMunch, http://www.red-lang.org/
10:04:33qihOK I grabbed your fork, cp'd to ~/project now just run an example as per before?
10:04:37PMunchOh yeah, that thing
10:04:46PMunchqih, yeah pretty much
10:04:55qihskrylar: I had a look at that a few months ago, it is barely ported t Linux so I did not bother
10:04:59qihPMunch: Ta
10:05:19skrylarqih, yes. i came back to nim because red's priorities are strange
10:05:30skrylaralthough as they are making red embeddable, perhaps i will use it as a scripting layer for nim?
10:05:36qihYep agree 100%
10:06:28qihI played with REBOL about 7 years ago and thought it was great, Red Lang is supposedly REBOL on steroids but full spectrum, full stack ... not likely for quite some time I think
10:07:01qihSo bash Red Lang
10:07:25skrylarwell it's.. sort of there
10:07:30*dddddd joined #nim
10:07:37skrylarthe trouble is that doc is dealing with chinese investors
10:07:47skrylarwell investors in general
10:07:54skrylarso its a dog and pony show to give them pretty graphics
10:07:59qihTheir primary DEV targets are WIN32/64 and MACOSX
10:08:11qihAh right
10:08:20skrylari talked to them and asked him once why he has high skill employees doing menial tasks
10:08:27qihRight, back to wxnim ...
10:08:37qihAnd?
10:08:51skrylari mean i can (and did) wrap fltk, and firebird, and write docs, but i can't really do deep register allocation stuff, and i asked why he has people who do this working on things i could do
10:09:05skrylarand the answer was basically the VCs are made happier by pretty things, even if the language is left unusable for it
10:09:39skrylarso he metaphorically has PHDs doing janitorial work
10:09:44qihOh, that's pretty language limiting and shallow
10:10:05qihYeah I did note the team is smart
10:10:29skrylaras for wxnim i think thats purely PMunch's territory, as i don't use it
10:11:29qihHint: used config file '/home/qih/nim-0.17.2/config/nim.cfg' [Conf]
10:11:30qihnim.cfg(4, 1) Error: '@end' expected
10:11:39qihYeah sorry
10:12:03PMunchskrylar, well I haven't used it for quite a while
10:12:07PMunchHmm
10:12:09qihPMunch: Both examples in the purewx dir/ failed with that config error
10:12:37*skrylar also has the character quirk of only using the stable release of compilers, so if git head breaks some sk* package it's not supported
10:13:15PMunchHmm, maybe @endif has changed to @end in never version of Nim
10:21:05*SenasOzys joined #nim
10:22:15*floppydh joined #nim
10:22:50qihOK I'll change it and re-run now
10:23:36qihYep that fixed it, /purewx/Example1 works
10:23:55Araqit always was @end but the config parser is not really good at reporting errors
10:24:04*yglukhov quit (Remote host closed the connection)
10:24:09qihAraq: Greetings!
10:24:22skrylari do wish that nim had the ability that red has, to go in to a dedicated parse mode, as it does help with the kinds of macros they use in rebol land
10:24:36*yglukhov joined #nim
10:24:43skrylaralthough the amount of data types they have is quite severe and those aren't changeable :\
10:25:05qih/purewx/Example2 works
10:25:16skrylarran in to a case where 'in' and 'out' were breaking macros for mysterious reasons
10:26:17Araq'in' and 'out' are keywords
10:26:23Araqnothing mysterious about them.
10:26:29qihPMunch: Same issue with nim.cfg in /genuimacro
10:26:54Araqskrylar, what I want is partial sem'checking a macro body
10:27:07Araqand I have a good idea of how to achieve that
10:28:37qihThe /genuimacro/threads.nim is a good demo, very neat
10:28:47*yglukhov quit (Ping timeout: 255 seconds)
10:29:09skrylarAraq, in many cases one is allowed to have invalid syntax in a macro, and it gives you the closest ast that seems to make sense, and then other times (the 'in' and 'out' situation) it doesn't give you keyword tokens, it just poops its pants
10:29:36Araqskrylar, if the syntax diverges, put it into a """ string """
10:29:54Araqthat's how Nim is designed, parsing works without symbol table or macro evaluations
10:30:01Araqand I really like this design.
10:36:31*yglukhov joined #nim
10:38:06Araqcast[proc() {.nimcall, tags: [], locks: 0, noSideEffect.}](writeStackTrace)()
10:38:29Araqnotice something? that damn writeStackTrace should pretend to be free of effects...
10:39:20qihOK, so now the demos in PMunch's fork of nxnim work, what's next? What Docs do I follow to make some Widgets?
10:39:30qihPlease excuse my wxWidgets ignorance.
10:39:53PMunchqih, good to hear that it works and that you like my threads example :)
10:40:10skrylaron the fence about whether avro support is important or not https://en.wikipedia.org/wiki/Apache_Avro
10:40:26AraqPMunch, please add travis/appveyor CI to keep it from bit rotting, it helps
10:40:26PMunchTo create widgets you more or less just follow the C++ docs for wxWidgets
10:40:42qihOK cool, looking
10:41:07Araqyou need a canvas + putPixel plus some event handler
10:41:15qihI'll retry Araqs/wxnim tomorrow too
10:41:18PMunchMost of it should be trivial to translate to Nim. You can of course also use the genui macro which is described in the README.md file
10:41:32Araqqih, don't, I bet PMunch's stuff is better
10:41:49PMunchqih, PMunch/wxnim is the same just 48 commits further along
10:42:11PMunchAraq, adding travis to wxnim?
10:42:14*floppydh quit (Quit: WeeChat 1.9.1)
10:42:26AraqPMunch, sure.
10:42:28*floppydh joined #nim
10:42:36qihPMunch: OK
10:42:46PMunchAraq, then I need to figure out how :P
10:42:59PMunchNeves used Travis/Appveyor
10:43:09qihAraq: OK, noted but I'll do it nyway and let you know tomorrow know about any issues, if you want.
10:43:14Araqcreate a .travis.yml file, register your project at travis
10:43:27qihs/nyway/anyway
10:43:44Araqthe file consists of Unix commands prefixed by '- '
10:44:33Araqunfortunately they don't use NimScript for it :-)
10:45:23Araqfortunately they don't use XML.
10:45:55skrylari have mixed feelings about xml these days
10:48:00*yglukhov quit (Remote host closed the connection)
10:48:03skrylarit feels like xml is just over-specified. you can remove almost all of the spec and nothing of value is really lost
10:48:32*yglukhov joined #nim
10:49:31*BitPuffin|osx quit (Ping timeout: 260 seconds)
10:49:38*vlad1777d quit (Ping timeout: 268 seconds)
10:50:05qihPMunch: I'll sort my Git out and Fork your repo tomorrow and edit some stuff; the Linux install, basic setup, how to run some of the examples, and note the @end mod ...
10:50:17*yglukhov quit (Remote host closed the connection)
10:50:32*yglukhov joined #nim
10:50:59qihPerhaps a PR in a few days
10:51:31skrylarguis are always a useful thing to have
10:51:41PMunchqih, nice!
10:51:56PMunchHmm, "Error: redifinition of ':tmp'"
10:53:27skrylarreading over it, i think avro might be 'neat' to have. hm
10:53:27PMunchThat can't be good..
10:54:09skrylarit's not as 'sexy' as protobuf or thrift, but it actually solves a useful problem, ex. being able to store a ton of shit with low overhead
10:54:46*couven92 quit (Ping timeout: 260 seconds)
10:56:03Araqskrylar, XML was/is useful for documents but they didn't even base HTML on it, XHTML is dead
10:56:05qihPMunch: http://docs.wxwidgets.org/3.0/page_topics.html <= this?
10:56:25skrylarAraq, html5 is my eternal sadness
10:56:48qihskrylar: Haha why?
10:57:07Araqyeah but what's the point of XML now? most documents are HTML or PDF
10:57:13skrylarqih, because xhtml was "how about we enforce people actually behave instead of this cowboy Internet Explorer bullshit"
10:57:28skrylarand then they shoot themselves in the foot by going "you know what? let's embrace cowboy internet explorer shit."
10:57:33Araqtrue xhtml was a good idea but it's dead.
10:57:51Araqand XML should be too, having no purpose.
10:58:06skrylarthen get in to further ball-less ness of "we're going to have media tags with no formal specification of types that way nobody knows what they're doing"
10:58:23Araqas a serialization format it always was horrible from the start.
10:58:33Araqis that whitespace relevant? who knows.
10:58:40skrylari don't think xml is a bad format. i think the libs were
10:58:52skrylarnothing says you can't have 'sexy' xml libs like they are doing with json
10:58:55skrylaror yaml/toml.
10:59:16qihAh damn, I unzipped the wxWidgets.html.zip in my docs/ folder, it's like rabbiits in there now >8-/
10:59:49Araqyou can't have sexy libs because the format is full of weird stuff like namespaces, processing instructions and lacks numbers, strings, arrays
10:59:49skrylarthe lack of unsigned ints in avros :headshake:
11:00:01qihskrylar: Yeah well those MS awesome peeps got a big hand in it
11:00:28skrylarqih, oh i know. apple wants you to use MPEG because they sit on the receiving end of licensing profits for mpeg
11:00:43skrylarthat doesn't mean the W3C could declare open media official and then glare at apple
11:01:01Araq[30, 48] # that's a coordinate, a pair of numbers. how do you write that in XML? just let it die...
11:01:30skrylarit amazes me that the lisps were able to unite the One Lisp from really serious differences but we can't make a damn document format
11:01:52qihAraq: My friend and I use XML for CMSIS-SVD files on STM32Fx microcontrollers and that's about it
11:02:16skrylarwell theres xslt, too. which is a neat ''idea''
11:02:22Araqthere is a reason JSON took over. documents are semi structured, data used exchanged for program interop is fully structured
11:02:38skrylarjson took over because lazy idiot web coders could parse it with eval()
11:02:48qihHaha ouch
11:02:49Araqnow if only JSON had blobs and date-times ...
11:03:39skrylarmsgpack has unsigned ints. msgpack is good. thrift and avros do not. they are silly.
11:03:58Araqyes, "lazy" coders prefer sane file formats, not intellectual masturbations that solve *different* problems in an inefficient way
11:04:17skrylari'm not saying json is a bad format. i'm just saying it took on because of derpistry
11:04:39qihskrylar: When I saw ytou mention Apache Avro, I thought of the Avro Anson from WW2, goto the Apache page and the Avro icon has wings ... gawd
11:04:44skrylarsame reason people used INI files back in the day. windows had a command to read them for you
11:05:57skrylarqih, well, avro has one particularly wanted thing: it stores a schema once and then the individual items are flat streamed
11:06:16skrylarthis is the same thing Blender does that has allowed them to have an unbroken line of backwards compatibility for 10 years
11:06:35FromGitter<QeyeH> Oh, is that a performance thing or a non-structure thing?
11:06:38FromGitter<QeyeH> Ah right
11:08:49skrylarwell. blender does some silly things
11:09:07qihK, don't we all?
11:09:12skrylara historic lack of an undo button lead to a LOT of file saving, so they ended up optimizing the save button
11:09:24skrylarso they basically just ramdump the process
11:09:29skrylar:|
11:09:30qihAh right
11:09:49skrylarthey even save the pointers from structs and rely on the loader to fix them back up. lol
11:10:17qihOh, odd
11:10:28qihI've not used Blender, ever
11:14:55qihI'm off, see ya tomorrow, thanks for tips, gn
11:15:18*qih quit (Quit: leaving)
11:23:31avsejis it possible to make json.pretty or other JsonNode->string convertors not to escape characters? It makes resulting string huge
11:25:37avsejthis is a bit too agreessive: https://github.com/nim-lang/Nim/blob/master/lib/pure/json.nim#L1004
11:51:03PMunchHmm: http://ix.io/D16/
11:51:10PMunchRedifinition of :tmp
11:51:14*mockingsponge121 joined #nim
11:51:21mockingsponge121My anaconda don't, my anaconda don't My anaconda don't want none unless you got buns, hun Boy toy named Troy used to live in Detroit Big big big money, he was gettin' some coins Was in shootouts with the law, but he live in a palace Bought me Alexander McQueen, he was keeping me stylish Now that's real, real, real One in my purse, bitch, I came dressed to kill Who wanna go first? I had them pushing daffodils I'm high as hell, I
11:51:21mockingsponge121My anaconda don't, my anaconda don't My anaconda don't want none unless you got buns, hun Boy toy named Troy used to live in Detroit Big big big money, he was gettin' some coins Was in shootouts with the law, but he live in a palace Bought me Alexander McQueen, he was keeping me stylish Now that's real, real, real One in my purse, bitch, I came dressed to kill Who wanna go first? I had them pushing daffodils I'm high as hell, I
11:52:16PMunchWhat?
11:52:40mockingsponge121My anaconda don't, my anaconda don't My anaconda don't want none unless you got buns, hun Boy toy named Troy used to live in Detroit Big big big money, he was gettin' some coins Was in shootouts with the law, but he live in a palace Bought me Alexander McQueen, he was keeping me stylish Now that's real, real, real One in my purse, bitch, I came dressed to kill Who wanna go first? I had them pushing daffodils I'm high as hell, I
11:55:14*mockingsponge121 quit (Killed (Sigyn (Spam is off topic on freenode.)))
11:55:45PMunchOkay, back to my question :P
11:55:56PMunchhttp://ix.io/D16/
11:57:07PMunchhttp://ix.io/D19/
11:57:41PMunchD19 is lines 531-545 of the file
11:57:50PMunchWhich creates the message
11:58:17PMunchIf I change `input` to input it works, but obviously then I can't use the parameter in what will become the writer body
11:59:34PMunchinput is a genSym(nskParam)
11:59:44PMunchSame as stream and stream2
12:11:18AraqPMunch, meh, I use template+getAst for a reason
12:11:34Araqtemplates have .dirty, quote do hasn't
12:13:38*rokups quit (Quit: Connection closed for inactivity)
12:20:59PMunchI "fixed" it by using a ident node instead of a genSym
12:21:28PMunchWhich actually makes a bit more sense as the proc now have names you can actually use when calling if you want to change the order of the parameters
12:27:36*Snircle joined #nim
12:36:19*dddddd quit (Ping timeout: 268 seconds)
13:02:59*NopeDK joined #nim
13:04:22NopeDKIf a comment for an Enum entry is too long, how should I go about formatting it for documentation purposes?
13:05:42NopeDKExample: https://pastebin.com/KwQACDn1
13:05:56dom96enumValue, ## foo bar \
13:05:57dom96 ## more foo bar
13:06:00dom96IIRC
13:06:19dom96Double check with 'nim doc'
13:20:37FromGitter<Varriount> I'd put it above the entry
13:31:39NopeDKOutput seems kinda funky. Backslashes are generally ignored and aligning the ## creates this: https://www.dropbox.com/s/lhd3turgwoslujt/os.html?dl=0
13:31:42*natrys joined #nim
13:40:50*ftsf quit (Quit: Leaving)
13:47:26NopeDKFormatting seems correct after testing with additional fields. Thanks dom96
13:55:31*endragor quit (Remote host closed the connection)
13:55:59*endragor joined #nim
13:57:30*endragor_ joined #nim
14:00:48*endragor quit (Ping timeout: 268 seconds)
14:02:07*endragor_ quit (Ping timeout: 248 seconds)
14:10:25*endragor joined #nim
14:12:27*Laish joined #nim
14:13:01*Laish left #nim ("Leav1ng")
14:14:31*endragor quit (Ping timeout: 240 seconds)
14:24:14*acidx quit (Remote host closed the connection)
14:24:31FromGitter<Varriount> V
14:26:08PMunchalehander42, I added a writer to the binaryparser project now
14:39:50*acidx joined #nim
14:44:17*yglukhov quit (Remote host closed the connection)
14:44:53*yglukhov joined #nim
14:46:38FromGitter<alehander42> looks very clever, good idea to reuse the definition
14:46:50FromGitter<alehander42> can it be generalized to work with objects instead of tuples ?
14:47:21FromGitter<alehander42> (another good idea might be to have a flag if you want only one of the two functions)
14:49:16*yglukhov quit (Ping timeout: 260 seconds)
14:49:35PMunchYeah I was thinking of adding a flag for only one. The reason it works with tuples is that tuples can be indexed by number as well, which makes the assignment stuff slightly easier (it reads into result[3] for example instead of result.data).
14:49:59FromGitter<mratsim> Is there a way to do a recursive `nim doc`to generate all exported proc from something like: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a2fec97540c78242db6446a]
14:50:51FromGitter<mratsim> ah, I guess it’s `—project` switch
14:52:49FromGitter<mratsim> hmmm, it’s doing bad things
14:53:28Araqyeah, fix it
14:53:38Araqwe don't use it yet ... -.-
14:56:58*yglukhov joined #nim
14:57:02*yglukhov quit (Remote host closed the connection)
14:57:36*yglukhov joined #nim
14:57:44PMunchalehander42 I was considering to output a type for the tuple though. Or at least a init procedure to get the tuple
14:58:13*yglukhov quit (Remote host closed the connection)
14:58:28*yglukhov joined #nim
15:13:09*xet7 quit (Ping timeout: 250 seconds)
15:27:30*solitudesf joined #nim
15:27:56*xet7 joined #nim
15:40:47*jjido joined #nim
15:41:15*jjido quit (Client Quit)
16:03:13*Trustable joined #nim
16:04:06*PMunch quit (Quit: Leaving)
16:15:11*miran joined #nim
16:35:02gokrbtw, not that I presume people are interested in Spry - but this was a fairly neat way to present "code stuff": https://github.com/gokr/spry-slides-2017
16:35:12gokrCombining remark.js and asciinema.
16:37:22*BitPuffin|osx joined #nim
16:42:18FromGitter<cabhishek> Hi! Why does nim's Tables module have an `add` proc which can duplicate keys? e.g https://play.nim-lang.org?gist=a76d78e100feb4d75a244ae463c69eec
16:42:32FromGitter<cabhishek> whats the reasoning behind it?
16:46:11avsejwhen C API defines a function, which takes enum typedef, how that should be imported and used? for example: https://gist.github.com/avsej/f5b2f4ffb8fd48d1dbf8f7d1fc0fcfcd
16:47:37dom96avsej: You don't import it, just copy the enum values and labels
16:48:09avsejand define nim enum? or just integer constants?
16:48:41dom96Nim enum
16:49:01dom96gokr: yay, choosenim being used :D
16:49:15gokrYup :)
16:49:41gokrIt's neat - you can copy paste text from the player - since its not a movie.
16:50:03dom96also, ooh, lxc is nice
16:50:12gokrAnd each "movie" runs from a json, and you can edit those also.
16:50:18gokrYeah, lxc is darn neat
16:50:42FromGitter<mratsim> @cabhishek Please leave the duplicate `add`, I rely on it for my future object pool implementation: https://forum.nim-lang.org/t/3317#20926
16:52:29dom96gokr: spry is really cool too :)
16:52:54mirantables shouldn't have duplicate keys!
16:54:36FromGitter<mratsim> So have a tables and multitables (map and multi map) versions ?
16:56:59miranyeah, it can be in some other container, but imho - default table's keys should be unique
16:57:09FromGitter<cabhishek> That might be a better solution. Right now its confusing even when its documented
16:57:52FromGitter<mratsim> I guess it’s —> feature request or PR then ;)
17:00:18*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:00:53FromGitter<cabhishek> I am surprised this hasn't been brought up before (or atleast not that often) which made me think if I am missing the point 
17:07:05FromGitter<alehander42> wow, so basically you can use a table of A as a table of kinda queue[A]
17:07:07*Jesin joined #nim
17:07:13gokrdom96: Thanks, it's "getting there" - slowly.
17:07:24*floppydh quit (Quit: WeeChat 1.9.1)
17:08:47dom96That's some weird semantics. I wonder what is the rationale for allowing duplicate keys in Table[T, Y]
17:09:43mirancabhishek - i wasn't aware of this (very surprising) behaviour. so thanks for bringing that up
17:11:20FromGitter<alehander42> my table keys now can have multiple personality disorder
17:11:50FromGitter<mratsim> @alehander42 Yes, it’s returned in FIFO order which is probably a neat unwanted effect.
17:12:19*haldean left #nim ("WeeChat 1.6")
17:18:59miran`echo names["john"]` gives 30 year old one. how would you reach the other one?
17:22:39*rbrt joined #nim
17:24:36dom96are you sure it actually stores duplicates?
17:24:53miranhttps://play.nim-lang.org/?gist=a76d78e100feb4d75a244ae463c69eec
17:25:06dom96yeah, just ran that
17:25:36miran{jim: 40, john: 30, john: 33}
17:25:42dom96Just don't use 'add' :)
17:26:01FromGitter<alehander42> del names["s"] ⏎ and then names["s"] is the next one etc
17:27:08miranif it doesn't store duplicates - `echo names["john"]` should have printed the new one
17:28:58miranJust don't use 'add' -> just don't have that as an available method, with quite surprising result
17:39:57*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:41:46FromGitter<cabhishek> @miran or come up with a better name that captures the behavior. `add` is too generic and quite common to stumble upon
17:44:42FromGitter<mratsim> append ?
17:45:37miranappend is when you have [T, seq[S]] table
17:46:39miranbut that is (should be?) regular add
17:47:11federico3io
17:58:28*acidx quit (Remote host closed the connection)
17:58:45*acidx joined #nim
18:03:58FromGitter<alehander42> addDuplicate
18:05:01FromGitter<krux02> is there a function to demangle a Nim function name?
18:05:55*xet7 quit (Quit: Leaving)
18:08:02*xet7 joined #nim
18:08:22*yglukhov quit (Remote host closed the connection)
18:09:10FromGitter<cabhishek> +1 for addDuplicate
18:09:36*yglukhov joined #nim
18:14:17*yglukhov quit (Ping timeout: 255 seconds)
18:15:15Araqmiran, why is it surprising? it *add*s to the container
18:15:21Araqlike for seq.
18:21:17miran1. i would expect table.keys to be set-like; 2. how do you reach each of the duplicates?
18:22:08FromGitter<cabhishek> if the container is suppose to guarantee unique keys then `add` is violating that rule. And docs says ` Table is the usual hash table`
18:23:02miranif i have @[5, 7, 9], i would expect s.add(11) to give me @[5, 7, 9, 11], not @[5, 7, both(9, 11)]
18:23:34Araqwell you can iterate over the keys, duplicates are no problem.
18:24:22Araqthat Nim's tables can store a seq[V] instead of V implicitly is a nice feature. cuts allocations and respects the nature of hash tables.
18:24:28miranand when i want to change one of them? which one will i change?
18:24:42Araqwhich requires a way to deal with hash collisions anyway.
18:25:15Araqmiran, then one will be changed.
18:25:38Araqwhy do you use 'add' when you don't know what it does?
18:25:39miranhttps://play.nim-lang.org/?gist=adf7ca2252df22e441c5173616910b09
18:26:19mirani don't use it, it was just an example posted earlier, and it took me by surprise to see this behaviour
18:26:27Araqcoming soon, "I called len and it returns the number of entries and not the length of the underlying seq"
18:27:05miranhow do i change "john_the_second" in the above example, like i did with "john_the_original"?
18:27:27Araqsadly that doesn't show any code for me
18:29:32Araqmiran, by using mpairs to modify the value?
18:30:37miranhttps://gist.github.com/narimiran/4e916003d87ab1ab894f173471622fc9
18:30:48miranthe above example, hopefully visible now
18:31:26Araqto override use names["john"] = 33
18:32:06AraqI don't know why you think 'add' would override. I can understand that it can be surprising that it compiles
18:39:01FromGitter<RedBeard0531> The doc warning for table.add is kinda weak: []= : "puts a (key, value)-pair into t" vs add: "puts a new (key, value)-pair into t even if t[key] already exists." My first (and second) reading of that was that []= is only for when key isn't already in table, and add will overwrite if present. It seemed a bit odd at the time, but it also seemed reasonable since most tables are loaded with unique data once and it
18:39:01FromGitter... would indicate a bug if the key was already in the table.
18:39:53FromGitter<RedBeard0531> At the very least it seems worth something like "This can introduce duplicate keys into the table". I think missing the word "duplicate" makes it non-obvious
18:40:09Araqso fix the docs.
18:47:12FromGitter<cabhishek> Do other languages allow hash tables/dictionaries to have duplicate keys? Is this a widely accepted behavior. I am just curious
18:47:31Araqno, it's a Nim specific innovation :P
18:47:35FromGitter<mratsim> Yes, it’s called multimap
18:47:45Araqor that :P
18:48:16FromGitter<mratsim> C++ map -> unique keys, multimap -> allows duplicate
18:49:12*Trustable quit (Remote host closed the connection)
18:50:01*yglukhov joined #nim
18:53:25*Ven`` joined #nim
18:54:25*skrylar quit (Ping timeout: 248 seconds)
18:54:51*yglukhov quit (Ping timeout: 260 seconds)
18:56:37*endragor joined #nim
19:01:05*rbrt quit (Ping timeout: 240 seconds)
19:01:16*endragor quit (Ping timeout: 260 seconds)
19:04:17FromGitter<RedBeard0531> C++ also has set/multiset, but it doesn't look like nim has the multiset equivalent. At least to my quick reading of the HashSet docs.
19:04:36Araqalready fixed the docs.
19:04:44*salewski joined #nim
19:04:56Araqa multiset is comparable to a CountTable
19:04:59AraqI think.
19:05:05Araqwhich Nim does have.
19:06:02FromGitter<RedBeard0531> Only if the equality comparison on T covers all of T's state
19:07:18FromGitter<RedBeard0531> They are distinct if you are using HashSet like a kv table where the "value" includes the "key" as a member, and cmp/hash only consider the key field.
19:07:29salewskiAraq, dom96: A bot is again trying to fool us in forum, see:
19:07:32salewskihttps://forum.nim-lang.org/t/3414
19:08:05Araqhow do you know it's a bot?
19:08:23AraqI assumed the same, but I am waiting for his post to change and to contain links
19:08:23salewskiContent is from https://forum.nim-lang.org/t/535
19:08:29FromGitter<RedBeard0531> HashSet.[] and mget seems to encourage this use https://nim-lang.org/docs/sets.html#[],HashSet[A],A
19:08:59dom96huh, that's an interesting bot
19:09:39salewskiYes, it is interesting, but not really funny.
19:09:41AraqI removed it.
19:09:55dom96Araq: You should keep these posts for future reference
19:09:57salewskiFine, bye.
19:09:59dom96they're interesting
19:10:14AraqI don't collect garbage.
19:10:18*salewski quit (Quit: WeeChat 1.9.1)
19:12:24*ryanhowe quit (Quit: WeeChat 1.4)
19:13:46*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:14:46*Ven`` joined #nim
19:25:18*Ven`` quit (Read error: Connection reset by peer)
19:25:33*Ven`` joined #nim
19:26:10*yglukhov joined #nim
19:28:44*yglukhov quit (Read error: Connection reset by peer)
19:29:16*yglukhov joined #nim
19:34:48*claudiuinberlin joined #nim
19:43:58*rbrt joined #nim
19:46:48*jjido joined #nim
19:52:32*miran quit (Quit: Konversation terminated!)
20:10:47*jjido quit (Read error: Connection reset by peer)
20:15:32*Vladar quit (Quit: Leaving)
20:25:15*vlad1777d joined #nim
20:28:54subsetparkthinking of writing an AMQP library for Nim. Insane thought?
20:30:45*PMunch joined #nim
20:32:11FromGitter<ephja> nah should only take a couple of minutes
20:34:40*avsej quit (Ping timeout: 248 seconds)
20:34:51*Ven`` quit (Read error: Connection reset by peer)
20:35:11*claudiuinberlin quit (Ping timeout: 248 seconds)
20:35:12*obadz quit (Ping timeout: 248 seconds)
20:35:12*enthus1ast quit (Ping timeout: 248 seconds)
20:35:21*Ven`` joined #nim
20:35:34*NopeDK quit (Ping timeout: 260 seconds)
20:35:43*PMunch quit (Ping timeout: 248 seconds)
20:35:46*earenndil quit (Ping timeout: 248 seconds)
20:35:47*Tanger quit (Ping timeout: 248 seconds)
20:35:47*MosterAbyss quit (Ping timeout: 248 seconds)
20:36:02*hohlerde quit (Ping timeout: 248 seconds)
20:36:08*Tanger joined #nim
20:36:49*jackv quit (Ping timeout: 255 seconds)
20:37:52*jackv joined #nim
20:38:06*yaiyan_ quit (Ping timeout: 258 seconds)
20:39:18*avsej joined #nim
20:39:18*avsej quit (Changing host)
20:39:18*avsej joined #nim
20:39:26*PMunch joined #nim
20:39:31*obadz joined #nim
20:40:10*earenndil joined #nim
20:40:17*MonsterAbyss joined #nim
20:40:38*yaiyan joined #nim
20:41:31*hohlerde joined #nim
20:44:08*enthus1ast joined #nim
20:45:15*Xe quit (*.net *.split)
20:45:16*pwntus quit (*.net *.split)
20:45:16*Shoozza quit (*.net *.split)
20:47:42*Xe` joined #nim
20:49:56*PMunch quit (Quit: leaving)
20:50:14*PMunch joined #nim
20:54:36FromGitter<alehander42> @Pmunch it shouldn't be hard to map the fields to indexes inside the macro using typed, but not a big deal ⏎ actually the other thing I had in mind was that it's very probable that you already have an existing object which you want to generate a binary string for, then it will be if the macro works for it
20:58:07PMunchYeah, it would be nicer if it worked with any object.. But I can't be arsed to do it :P If you want to implement it I'll be happy to accept a PR for it :)
20:59:44FromGitter<alehander42> :D ok, if I need this functionality, I'll add a PR
21:10:08*PMunch quit (Quit: leaving)
21:18:40*Xe` is now known as Xe
21:39:03*Xe left #nim (#nim)
21:39:19*Xe joined #nim
21:39:56*Shoozza joined #nim
21:44:35*rbrt quit (Quit: Oíche mhaith)
21:47:08*rbrt joined #nim
21:51:59*natrys quit (Quit: natrys)
21:54:34*nsf quit (Quit: WeeChat 1.9.1)
21:56:32*yglukhov quit (Remote host closed the connection)
21:56:49*Ven`` quit (Ping timeout: 248 seconds)
21:59:41*Ven`` joined #nim
21:59:49*rbrt quit (Quit: Oíche mhaith)
22:02:02*rbrt joined #nim
22:03:20FromGitter<QeyeH> Is it recommended to use an IDE for wxwidgets development? If so, what?
22:10:13GitDisc<treeform> I don't recommend using wxwidgets.
22:11:18GitDisc<treeform> * it is very old and looks bad on windows and mac.
22:11:41*xet7 quit (Ping timeout: 255 seconds)
22:12:03GitDisc<treeform> * if you have issues you would be hunting emails from year 2000
22:13:19*Ven`` quit (Ping timeout: 256 seconds)
22:13:22GitDisc<treeform> * I have shipped a wxwidgets app to 100k+ of people about 4 years ago, and it was horrible experience.
22:15:32Araqreally? interesting
22:15:44Araqit uses the native widgets, it must good :-)
22:16:44FromGitter<QeyeH> Haha
22:18:58*Ven`` joined #nim
22:19:00GitDisc<treeform> it was a pretty simple app as well: https://blog.pushbullet.com/2014/02/20/a-call-for-windows-beta-testers/
22:20:02GitDisc<treeform> I still don't know what is the best way to write desktop apps. But I know all the ways not to write them.
22:22:24*marenz_ joined #nim
22:23:17*qih joined #nim
22:24:43*xet7 joined #nim
22:26:17FromGitter<QeyeH> That API looks pretty good, clean, multi-modal. What happened to it?
22:26:37AraqLazarus frontend + Nim backend? no idea
22:27:11*Ven`` quit (Ping timeout: 248 seconds)
22:29:53dom96You may as well use Electron nowadays :P
22:30:14Araqhe said he cares about his users...
22:30:55FromGitter<QeyeH> @dom96 Why?
22:31:26dom96because it will give you the most flexibility
22:31:31dom96not that I've ever used it
22:32:42qihK
22:33:51FromGitter<QeyeH> The reason why I was looking at wxwidgets was due to araq/wxnim; as I wanted a simple GUI app but I could run Nim programs to & from it.
22:36:21GitDisc<awr> is there a way to set the output directory when using `nim doc/doc2`
22:37:22FromGitter<QeyeH> I have been trying to install Code::Blocks for an hour; wxwidgets uses GTK3, C::B wants GTK2, another Ubuntu mis-match of libs. Does my head in.
22:39:27*rbrt quit (Read error: Connection reset by peer)
22:40:02*solitudesf quit (Ping timeout: 268 seconds)
22:40:04*rbrt joined #nim
22:43:20*Ven`` joined #nim
22:51:22radagastDoes walkDir() return an enum (for pc) and a string (path)?
22:52:50radagasthttps://play.nim-lang.org/?gist=81aec3894705ad9c0ce3e91641d249a3
22:57:06*Jesin quit (Quit: Leaving)
23:00:23radagastnvm
23:09:22*mwbrown quit (Ping timeout: 264 seconds)
23:19:40*mwbrown joined #nim
23:37:37*gokr quit (Ping timeout: 248 seconds)
23:45:42*rbrt quit (Quit: Oíche mhaith)
23:57:10*yglukhov joined #nim
23:57:30*rbrt joined #nim