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:05 | GitDisc | <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:16 | GitDisc | <awr> i'd like to avoid using macros |
03:10:58 | GitDisc | <awr> this would be for identifiers |
03:11:14 | GitDisc | <awr> for example |
03:11:24 | GitDisc | <awr> template foo(name :untyped) :untyped = |
03:11:24 | GitDisc | <awr> var strToAst(name & "BarBaz") {.inject.} = 0 |
03:11:25 | GitDisc | <awr> foo("a") # var aBarBaz = 0 |
03:11:26 | GitDisc | <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:27 | FromGitter | <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:25 | FromGitter | <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:55 | PMunch | QeyeH, what do you want to achieve? |
08:55:19 | PMunch | You can run the examples by going into the examples directory and running "nim c -r example3.nim" |
08:55:23 | PMunch | For example |
08:55:27 | FromGitter | <QeyeH> To run it I guess Sorry that sounds like a dumb answer but ... |
08:55:34 | FromGitter | <QeyeH> Ah right |
08:55:45 | FromGitter | <QeyeH> OK thanks |
08:56:14 | PMunch | And make sure to have read the installation instructions |
08:56:40 | PMunch | wxnim must be placed next to a directory wxWidgets-3.0.2 |
08:56:54 | FromGitter | <QeyeH> Yep I did that exactly |
08:57:06 | PMunch | Oh, and it's "nim cpp -r example2.nim" |
08:57:14 | PMunch | wxWidgets is C++ |
08:58:04 | FromGitter | <QeyeH> Ahh right, cos '/../examples $ nim c -r example3.nim' failed |
09:00:18 | FromGitter | <gogolxdong> How to configure IP for windows in Nim? |
09:00:42 | PMunch | gogolxdong, what? |
09:00:52 | PMunch | What exactly are you trying to do? |
09:01:31 | FromGitter | <gogolxdong> I'm trying to autoconfig ip for windows instance of openstack. |
09:02:34 | FromGitter | <gogolxdong> It can't be configured properly with cloud-init. |
09:02:56 | PMunch | You probably have to wrap some functions from iphlpapi.h |
09:03:02 | PMunch | https://msdn.microsoft.com/en-us/library/aa923597.aspx |
09:03:12 | PMunch | https://stackoverflow.com/questions/2906386/change-ip-settings-using-c |
09:03:49 | FromGitter | <gogolxdong> quick response ,thanks |
09:10:07 | PMunch | QeyeH, did you get the wxNim examples to run? |
09:10:36 | FromGitter | <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:25 | FromGitter | <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:11 | PMunch | And you've built wxWidgets inside that folder? |
09:17:17 | FromGitter | <QeyeH> Ah, built the widgets in which folder? |
09:17:39 | PMunch | You need to build wxWidgets in the wxWidgets-3.0.2 folder |
09:17:49 | PMunch | But you're using Araq/wxnim right? |
09:18:06 | PMunch | If you want to you could always grab my fork: https://github.com/PMunch/wxnim |
09:18:09 | FromGitter | <QeyeH> OK, referring to: https://github.com/Araq/wxnim, I did not see anything about building widgets |
09:18:29 | FromGitter | <QeyeH> Yes I am using araq/wxnim |
09:19:29 | PMunch | On 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:20 | FromGitter | <QeyeH> Ah, well I did install wxGTK as per the instructions: http://codelite.org/LiteEditor/WxWidgets31Binaries#toc2 |
09:23:33 | PMunch | If 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:17 | skrylar | there is also a fltk option :^) |
09:32:32 | skrylar | should probably work on the texinfo for that one someday. meh |
09:37:35 | PMunch | I think I might've solved my issue with genui as well, so that might be available soonish |
09:41:02 | skrylar | nifty |
09:41:12 | skrylar | i saw red just announced they got their vid dialect running on macos |
09:41:28 | skrylar | well by just announced, its the latest post. it was probably less recent than today |
09:44:43 | skrylar | cobweb could be interesting to use with genui, although that one is hmm |
09:44:55 | skrylar | it 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:17 | qih | PMunch: Thanks, sorry was AFK for a bit, I'll grab your fork. |
10:01:45 | PMunch | Hmm, interesting skrylar. Link? |
10:01:53 | PMunch | qih, no problem |
10:04:11 | skrylar | PMunch, http://www.red-lang.org/ |
10:04:33 | qih | OK I grabbed your fork, cp'd to ~/project now just run an example as per before? |
10:04:37 | PMunch | Oh yeah, that thing |
10:04:46 | PMunch | qih, yeah pretty much |
10:04:55 | qih | skrylar: I had a look at that a few months ago, it is barely ported t Linux so I did not bother |
10:04:59 | qih | PMunch: Ta |
10:05:19 | skrylar | qih, yes. i came back to nim because red's priorities are strange |
10:05:30 | skrylar | although as they are making red embeddable, perhaps i will use it as a scripting layer for nim? |
10:05:36 | qih | Yep agree 100% |
10:06:28 | qih | I 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:01 | qih | So bash Red Lang |
10:07:25 | skrylar | well it's.. sort of there |
10:07:30 | * | dddddd joined #nim |
10:07:37 | skrylar | the trouble is that doc is dealing with chinese investors |
10:07:47 | skrylar | well investors in general |
10:07:54 | skrylar | so its a dog and pony show to give them pretty graphics |
10:07:59 | qih | Their primary DEV targets are WIN32/64 and MACOSX |
10:08:11 | qih | Ah right |
10:08:20 | skrylar | i talked to them and asked him once why he has high skill employees doing menial tasks |
10:08:27 | qih | Right, back to wxnim ... |
10:08:37 | qih | And? |
10:08:51 | skrylar | i 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:05 | skrylar | and the answer was basically the VCs are made happier by pretty things, even if the language is left unusable for it |
10:09:39 | skrylar | so he metaphorically has PHDs doing janitorial work |
10:09:44 | qih | Oh, that's pretty language limiting and shallow |
10:10:05 | qih | Yeah I did note the team is smart |
10:10:29 | skrylar | as for wxnim i think thats purely PMunch's territory, as i don't use it |
10:11:29 | qih | Hint: used config file '/home/qih/nim-0.17.2/config/nim.cfg' [Conf] |
10:11:30 | qih | nim.cfg(4, 1) Error: '@end' expected |
10:11:39 | qih | Yeah sorry |
10:12:03 | PMunch | skrylar, well I haven't used it for quite a while |
10:12:07 | PMunch | Hmm |
10:12:09 | qih | PMunch: 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:15 | PMunch | Hmm, 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:50 | qih | OK I'll change it and re-run now |
10:23:36 | qih | Yep that fixed it, /purewx/Example1 works |
10:23:55 | Araq | it 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:09 | qih | Araq: Greetings! |
10:24:22 | skrylar | i 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:43 | skrylar | although the amount of data types they have is quite severe and those aren't changeable :\ |
10:25:05 | qih | /purewx/Example2 works |
10:25:16 | skrylar | ran in to a case where 'in' and 'out' were breaking macros for mysterious reasons |
10:26:17 | Araq | 'in' and 'out' are keywords |
10:26:23 | Araq | nothing mysterious about them. |
10:26:29 | qih | PMunch: Same issue with nim.cfg in /genuimacro |
10:26:54 | Araq | skrylar, what I want is partial sem'checking a macro body |
10:27:07 | Araq | and I have a good idea of how to achieve that |
10:28:37 | qih | The /genuimacro/threads.nim is a good demo, very neat |
10:28:47 | * | yglukhov quit (Ping timeout: 255 seconds) |
10:29:09 | skrylar | Araq, 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:36 | Araq | skrylar, if the syntax diverges, put it into a """ string """ |
10:29:54 | Araq | that's how Nim is designed, parsing works without symbol table or macro evaluations |
10:30:01 | Araq | and I really like this design. |
10:36:31 | * | yglukhov joined #nim |
10:38:06 | Araq | cast[proc() {.nimcall, tags: [], locks: 0, noSideEffect.}](writeStackTrace)() |
10:38:29 | Araq | notice something? that damn writeStackTrace should pretend to be free of effects... |
10:39:20 | qih | OK, 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:30 | qih | Please excuse my wxWidgets ignorance. |
10:39:53 | PMunch | qih, good to hear that it works and that you like my threads example :) |
10:40:10 | skrylar | on the fence about whether avro support is important or not https://en.wikipedia.org/wiki/Apache_Avro |
10:40:26 | Araq | PMunch, please add travis/appveyor CI to keep it from bit rotting, it helps |
10:40:26 | PMunch | To create widgets you more or less just follow the C++ docs for wxWidgets |
10:40:42 | qih | OK cool, looking |
10:41:07 | Araq | you need a canvas + putPixel plus some event handler |
10:41:15 | qih | I'll retry Araqs/wxnim tomorrow too |
10:41:18 | PMunch | Most 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:32 | Araq | qih, don't, I bet PMunch's stuff is better |
10:41:49 | PMunch | qih, PMunch/wxnim is the same just 48 commits further along |
10:42:11 | PMunch | Araq, adding travis to wxnim? |
10:42:14 | * | floppydh quit (Quit: WeeChat 1.9.1) |
10:42:26 | Araq | PMunch, sure. |
10:42:28 | * | floppydh joined #nim |
10:42:36 | qih | PMunch: OK |
10:42:46 | PMunch | Araq, then I need to figure out how :P |
10:42:59 | PMunch | Neves used Travis/Appveyor |
10:43:09 | qih | Araq: OK, noted but I'll do it nyway and let you know tomorrow know about any issues, if you want. |
10:43:14 | Araq | create a .travis.yml file, register your project at travis |
10:43:27 | qih | s/nyway/anyway |
10:43:44 | Araq | the file consists of Unix commands prefixed by '- ' |
10:44:33 | Araq | unfortunately they don't use NimScript for it :-) |
10:45:23 | Araq | fortunately they don't use XML. |
10:45:55 | skrylar | i have mixed feelings about xml these days |
10:48:00 | * | yglukhov quit (Remote host closed the connection) |
10:48:03 | skrylar | it 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:05 | qih | PMunch: 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:59 | qih | Perhaps a PR in a few days |
10:51:31 | skrylar | guis are always a useful thing to have |
10:51:41 | PMunch | qih, nice! |
10:51:56 | PMunch | Hmm, "Error: redifinition of ':tmp'" |
10:53:27 | skrylar | reading over it, i think avro might be 'neat' to have. hm |
10:53:27 | PMunch | That can't be good.. |
10:54:09 | skrylar | it'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:03 | Araq | skrylar, XML was/is useful for documents but they didn't even base HTML on it, XHTML is dead |
10:56:05 | qih | PMunch: http://docs.wxwidgets.org/3.0/page_topics.html <= this? |
10:56:25 | skrylar | Araq, html5 is my eternal sadness |
10:56:48 | qih | skrylar: Haha why? |
10:57:07 | Araq | yeah but what's the point of XML now? most documents are HTML or PDF |
10:57:13 | skrylar | qih, because xhtml was "how about we enforce people actually behave instead of this cowboy Internet Explorer bullshit" |
10:57:28 | skrylar | and then they shoot themselves in the foot by going "you know what? let's embrace cowboy internet explorer shit." |
10:57:33 | Araq | true xhtml was a good idea but it's dead. |
10:57:51 | Araq | and XML should be too, having no purpose. |
10:58:06 | skrylar | then 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:23 | Araq | as a serialization format it always was horrible from the start. |
10:58:33 | Araq | is that whitespace relevant? who knows. |
10:58:40 | skrylar | i don't think xml is a bad format. i think the libs were |
10:58:52 | skrylar | nothing says you can't have 'sexy' xml libs like they are doing with json |
10:58:55 | skrylar | or yaml/toml. |
10:59:16 | qih | Ah damn, I unzipped the wxWidgets.html.zip in my docs/ folder, it's like rabbiits in there now >8-/ |
10:59:49 | Araq | you can't have sexy libs because the format is full of weird stuff like namespaces, processing instructions and lacks numbers, strings, arrays |
10:59:49 | skrylar | the lack of unsigned ints in avros :headshake: |
11:00:01 | qih | skrylar: Yeah well those MS awesome peeps got a big hand in it |
11:00:28 | skrylar | qih, oh i know. apple wants you to use MPEG because they sit on the receiving end of licensing profits for mpeg |
11:00:43 | skrylar | that doesn't mean the W3C could declare open media official and then glare at apple |
11:01:01 | Araq | [30, 48] # that's a coordinate, a pair of numbers. how do you write that in XML? just let it die... |
11:01:30 | skrylar | it 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:52 | qih | Araq: My friend and I use XML for CMSIS-SVD files on STM32Fx microcontrollers and that's about it |
11:02:16 | skrylar | well theres xslt, too. which is a neat ''idea'' |
11:02:22 | Araq | there is a reason JSON took over. documents are semi structured, data used exchanged for program interop is fully structured |
11:02:38 | skrylar | json took over because lazy idiot web coders could parse it with eval() |
11:02:48 | qih | Haha ouch |
11:02:49 | Araq | now if only JSON had blobs and date-times ... |
11:03:39 | skrylar | msgpack has unsigned ints. msgpack is good. thrift and avros do not. they are silly. |
11:03:58 | Araq | yes, "lazy" coders prefer sane file formats, not intellectual masturbations that solve *different* problems in an inefficient way |
11:04:17 | skrylar | i'm not saying json is a bad format. i'm just saying it took on because of derpistry |
11:04:39 | qih | skrylar: 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:44 | skrylar | same reason people used INI files back in the day. windows had a command to read them for you |
11:05:57 | skrylar | qih, well, avro has one particularly wanted thing: it stores a schema once and then the individual items are flat streamed |
11:06:16 | skrylar | this is the same thing Blender does that has allowed them to have an unbroken line of backwards compatibility for 10 years |
11:06:35 | FromGitter | <QeyeH> Oh, is that a performance thing or a non-structure thing? |
11:06:38 | FromGitter | <QeyeH> Ah right |
11:08:49 | skrylar | well. blender does some silly things |
11:09:07 | qih | K, don't we all? |
11:09:12 | skrylar | a historic lack of an undo button lead to a LOT of file saving, so they ended up optimizing the save button |
11:09:24 | skrylar | so they basically just ramdump the process |
11:09:29 | skrylar | :| |
11:09:30 | qih | Ah right |
11:09:49 | skrylar | they even save the pointers from structs and rely on the loader to fix them back up. lol |
11:10:17 | qih | Oh, odd |
11:10:28 | qih | I've not used Blender, ever |
11:14:55 | qih | I'm off, see ya tomorrow, thanks for tips, gn |
11:15:18 | * | qih quit (Quit: leaving) |
11:23:31 | avsej | is it possible to make json.pretty or other JsonNode->string convertors not to escape characters? It makes resulting string huge |
11:25:37 | avsej | this is a bit too agreessive: https://github.com/nim-lang/Nim/blob/master/lib/pure/json.nim#L1004 |
11:51:03 | PMunch | Hmm: http://ix.io/D16/ |
11:51:10 | PMunch | Redifinition of :tmp |
11:51:14 | * | mockingsponge121 joined #nim |
11:51:21 | mockingsponge121 | My 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:21 | mockingsponge121 | My 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:16 | PMunch | What? |
11:52:40 | mockingsponge121 | My 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:45 | PMunch | Okay, back to my question :P |
11:55:56 | PMunch | http://ix.io/D16/ |
11:57:07 | PMunch | http://ix.io/D19/ |
11:57:41 | PMunch | D19 is lines 531-545 of the file |
11:57:50 | PMunch | Which creates the message |
11:58:17 | PMunch | If 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:34 | PMunch | input is a genSym(nskParam) |
11:59:44 | PMunch | Same as stream and stream2 |
12:11:18 | Araq | PMunch, meh, I use template+getAst for a reason |
12:11:34 | Araq | templates have .dirty, quote do hasn't |
12:13:38 | * | rokups quit (Quit: Connection closed for inactivity) |
12:20:59 | PMunch | I "fixed" it by using a ident node instead of a genSym |
12:21:28 | PMunch | Which 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:22 | NopeDK | If a comment for an Enum entry is too long, how should I go about formatting it for documentation purposes? |
13:05:42 | NopeDK | Example: https://pastebin.com/KwQACDn1 |
13:05:56 | dom96 | enumValue, ## foo bar \ |
13:05:57 | dom96 | ## more foo bar |
13:06:00 | dom96 | IIRC |
13:06:19 | dom96 | Double check with 'nim doc' |
13:20:37 | FromGitter | <Varriount> I'd put it above the entry |
13:31:39 | NopeDK | Output 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:26 | NopeDK | Formatting 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:31 | FromGitter | <Varriount> V |
14:26:08 | PMunch | alehander42, 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:38 | FromGitter | <alehander42> looks very clever, good idea to reuse the definition |
14:46:50 | FromGitter | <alehander42> can it be generalized to work with objects instead of tuples ? |
14:47:21 | FromGitter | <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:35 | PMunch | Yeah 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:59 | FromGitter | <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:51 | FromGitter | <mratsim> ah, I guess it’s `—project` switch |
14:52:49 | FromGitter | <mratsim> hmmm, it’s doing bad things |
14:53:28 | Araq | yeah, fix it |
14:53:38 | Araq | we 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:44 | PMunch | alehander42 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:02 | gokr | btw, 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:12 | gokr | Combining remark.js and asciinema. |
16:37:22 | * | BitPuffin|osx joined #nim |
16:42:18 | FromGitter | <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:32 | FromGitter | <cabhishek> whats the reasoning behind it? |
16:46:11 | avsej | when 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:37 | dom96 | avsej: You don't import it, just copy the enum values and labels |
16:48:09 | avsej | and define nim enum? or just integer constants? |
16:48:41 | dom96 | Nim enum |
16:49:01 | dom96 | gokr: yay, choosenim being used :D |
16:49:15 | gokr | Yup :) |
16:49:41 | gokr | It's neat - you can copy paste text from the player - since its not a movie. |
16:50:03 | dom96 | also, ooh, lxc is nice |
16:50:12 | gokr | And each "movie" runs from a json, and you can edit those also. |
16:50:18 | gokr | Yeah, lxc is darn neat |
16:50:42 | FromGitter | <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:29 | dom96 | gokr: spry is really cool too :) |
16:52:54 | miran | tables shouldn't have duplicate keys! |
16:54:36 | FromGitter | <mratsim> So have a tables and multitables (map and multi map) versions ? |
16:56:59 | miran | yeah, it can be in some other container, but imho - default table's keys should be unique |
16:57:09 | FromGitter | <cabhishek> That might be a better solution. Right now its confusing even when its documented |
16:57:52 | FromGitter | <mratsim> I guess it’s —> feature request or PR then ;) |
17:00:18 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
17:00:53 | FromGitter | <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:05 | FromGitter | <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:13 | gokr | dom96: Thanks, it's "getting there" - slowly. |
17:07:24 | * | floppydh quit (Quit: WeeChat 1.9.1) |
17:08:47 | dom96 | That's some weird semantics. I wonder what is the rationale for allowing duplicate keys in Table[T, Y] |
17:09:43 | miran | cabhishek - i wasn't aware of this (very surprising) behaviour. so thanks for bringing that up |
17:11:20 | FromGitter | <alehander42> my table keys now can have multiple personality disorder |
17:11:50 | FromGitter | <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:59 | miran | `echo names["john"]` gives 30 year old one. how would you reach the other one? |
17:22:39 | * | rbrt joined #nim |
17:24:36 | dom96 | are you sure it actually stores duplicates? |
17:24:53 | miran | https://play.nim-lang.org/?gist=a76d78e100feb4d75a244ae463c69eec |
17:25:06 | dom96 | yeah, just ran that |
17:25:36 | miran | {jim: 40, john: 30, john: 33} |
17:25:42 | dom96 | Just don't use 'add' :) |
17:26:01 | FromGitter | <alehander42> del names["s"] ⏎ and then names["s"] is the next one etc |
17:27:08 | miran | if it doesn't store duplicates - `echo names["john"]` should have printed the new one |
17:28:58 | miran | Just 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:46 | FromGitter | <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:42 | FromGitter | <mratsim> append ? |
17:45:37 | miran | append is when you have [T, seq[S]] table |
17:46:39 | miran | but that is (should be?) regular add |
17:47:11 | federico3 | io |
17:58:28 | * | acidx quit (Remote host closed the connection) |
17:58:45 | * | acidx joined #nim |
18:03:58 | FromGitter | <alehander42> addDuplicate |
18:05:01 | FromGitter | <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:10 | FromGitter | <cabhishek> +1 for addDuplicate |
18:09:36 | * | yglukhov joined #nim |
18:14:17 | * | yglukhov quit (Ping timeout: 255 seconds) |
18:15:15 | Araq | miran, why is it surprising? it *add*s to the container |
18:15:21 | Araq | like for seq. |
18:21:17 | miran | 1. i would expect table.keys to be set-like; 2. how do you reach each of the duplicates? |
18:22:08 | FromGitter | <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:02 | miran | if 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:34 | Araq | well you can iterate over the keys, duplicates are no problem. |
18:24:22 | Araq | that 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:28 | miran | and when i want to change one of them? which one will i change? |
18:24:42 | Araq | which requires a way to deal with hash collisions anyway. |
18:25:15 | Araq | miran, then one will be changed. |
18:25:38 | Araq | why do you use 'add' when you don't know what it does? |
18:25:39 | miran | https://play.nim-lang.org/?gist=adf7ca2252df22e441c5173616910b09 |
18:26:19 | miran | i don't use it, it was just an example posted earlier, and it took me by surprise to see this behaviour |
18:26:27 | Araq | coming soon, "I called len and it returns the number of entries and not the length of the underlying seq" |
18:27:05 | miran | how do i change "john_the_second" in the above example, like i did with "john_the_original"? |
18:27:27 | Araq | sadly that doesn't show any code for me |
18:29:32 | Araq | miran, by using mpairs to modify the value? |
18:30:37 | miran | https://gist.github.com/narimiran/4e916003d87ab1ab894f173471622fc9 |
18:30:48 | miran | the above example, hopefully visible now |
18:31:26 | Araq | to override use names["john"] = 33 |
18:32:06 | Araq | I don't know why you think 'add' would override. I can understand that it can be surprising that it compiles |
18:39:01 | FromGitter | <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:01 | FromGitter | ... would indicate a bug if the key was already in the table. |
18:39:53 | FromGitter | <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:09 | Araq | so fix the docs. |
18:47:12 | FromGitter | <cabhishek> Do other languages allow hash tables/dictionaries to have duplicate keys? Is this a widely accepted behavior. I am just curious |
18:47:31 | Araq | no, it's a Nim specific innovation :P |
18:47:35 | FromGitter | <mratsim> Yes, it’s called multimap |
18:47:45 | Araq | or that :P |
18:48:16 | FromGitter | <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:17 | FromGitter | <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:36 | Araq | already fixed the docs. |
19:04:44 | * | salewski joined #nim |
19:04:56 | Araq | a multiset is comparable to a CountTable |
19:04:59 | Araq | I think. |
19:05:05 | Araq | which Nim does have. |
19:06:02 | FromGitter | <RedBeard0531> Only if the equality comparison on T covers all of T's state |
19:07:18 | FromGitter | <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:29 | salewski | Araq, dom96: A bot is again trying to fool us in forum, see: |
19:07:32 | salewski | https://forum.nim-lang.org/t/3414 |
19:08:05 | Araq | how do you know it's a bot? |
19:08:23 | Araq | I assumed the same, but I am waiting for his post to change and to contain links |
19:08:23 | salewski | Content is from https://forum.nim-lang.org/t/535 |
19:08:29 | FromGitter | <RedBeard0531> HashSet.[] and mget seems to encourage this use https://nim-lang.org/docs/sets.html#[],HashSet[A],A |
19:08:59 | dom96 | huh, that's an interesting bot |
19:09:39 | salewski | Yes, it is interesting, but not really funny. |
19:09:41 | Araq | I removed it. |
19:09:55 | dom96 | Araq: You should keep these posts for future reference |
19:09:57 | salewski | Fine, bye. |
19:09:59 | dom96 | they're interesting |
19:10:14 | Araq | I 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:54 | subsetpark | thinking of writing an AMQP library for Nim. Insane thought? |
20:30:45 | * | PMunch joined #nim |
20:32:11 | FromGitter | <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:36 | FromGitter | <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:07 | PMunch | Yeah, 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:44 | FromGitter | <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:20 | FromGitter | <QeyeH> Is it recommended to use an IDE for wxwidgets development? If so, what? |
22:10:13 | GitDisc | <treeform> I don't recommend using wxwidgets. |
22:11:18 | GitDisc | <treeform> * it is very old and looks bad on windows and mac. |
22:11:41 | * | xet7 quit (Ping timeout: 255 seconds) |
22:12:03 | GitDisc | <treeform> * if you have issues you would be hunting emails from year 2000 |
22:13:19 | * | Ven`` quit (Ping timeout: 256 seconds) |
22:13:22 | GitDisc | <treeform> * I have shipped a wxwidgets app to 100k+ of people about 4 years ago, and it was horrible experience. |
22:15:32 | Araq | really? interesting |
22:15:44 | Araq | it uses the native widgets, it must good :-) |
22:16:44 | FromGitter | <QeyeH> Haha |
22:18:58 | * | Ven`` joined #nim |
22:19:00 | GitDisc | <treeform> it was a pretty simple app as well: https://blog.pushbullet.com/2014/02/20/a-call-for-windows-beta-testers/ |
22:20:02 | GitDisc | <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:17 | FromGitter | <QeyeH> That API looks pretty good, clean, multi-modal. What happened to it? |
22:26:37 | Araq | Lazarus frontend + Nim backend? no idea |
22:27:11 | * | Ven`` quit (Ping timeout: 248 seconds) |
22:29:53 | dom96 | You may as well use Electron nowadays :P |
22:30:14 | Araq | he said he cares about his users... |
22:30:55 | FromGitter | <QeyeH> @dom96 Why? |
22:31:26 | dom96 | because it will give you the most flexibility |
22:31:31 | dom96 | not that I've ever used it |
22:32:42 | qih | K |
22:33:51 | FromGitter | <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:21 | GitDisc | <awr> is there a way to set the output directory when using `nim doc/doc2` |
22:37:22 | FromGitter | <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:22 | radagast | Does walkDir() return an enum (for pc) and a string (path)? |
22:52:50 | radagast | https://play.nim-lang.org/?gist=81aec3894705ad9c0ce3e91641d249a3 |
22:57:06 | * | Jesin quit (Quit: Leaving) |
23:00:23 | radagast | nvm |
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 |