<< 12-08-2017 >>

00:32:49*yglukhov quit (Remote host closed the connection)
01:26:30*chemist69 quit (Ping timeout: 240 seconds)
01:40:49*chemist69 joined #nim
01:56:23*dankrad quit (Ping timeout: 246 seconds)
01:58:18*dankrad joined #nim
02:10:28*endragor joined #nim
02:13:31mahmudovis it possible to convert cython's c code to nim with c2nim ?
02:14:52*endragor quit (Ping timeout: 260 seconds)
02:19:06*mahmudov quit (Remote host closed the connection)
03:02:23*BitPuffin|osx quit (Ping timeout: 255 seconds)
03:22:13FromGitter<zacharycarter> anything is possible
03:22:19FromGitter<zacharycarter> but do you really want to do it is the question
03:22:29FromGitter<zacharycarter> and will it be easy
03:22:32FromGitter<zacharycarter> and the answer is probably no
03:22:57*dankrad quit (Ping timeout: 240 seconds)
03:24:12*rauss quit (Quit: WeeChat 1.9)
03:25:00*rauss joined #nim
03:25:01*dankrad joined #nim
03:30:01def-pri-pubzacharycarter: Have you had a chance to review my pull requests?
03:30:05*dankrad quit (Ping timeout: 240 seconds)
03:32:16*dankrad joined #nim
03:37:23*v17d joined #nim
04:15:27*empxre joined #nim
04:16:50FromGitter<zacharycarter> nope
04:16:55FromGitter<zacharycarter> I'll look at them now I wasn't aware of them
04:18:14empxrewhat's the proper ( GC-safe ) way in Nim to implement a cached object? I'm aiming to cache the results of an API request to throttle it a bit
04:18:26def-pri-pubI also filed some tickets for things I'd like to add to the engine
04:18:41FromGitter<zacharycarter>
04:19:34def-pri-pubI kind of want to see if I can get the Sprite one done this weekend, but I'd like to get a response first before embarking on it.
04:24:33FromGitter<zacharycarter> I think we can port a lot of sprite stuff from raylib
04:25:14FromGitter<zacharycarter> I'm not sure what raylib does for sprite sheets but they're easy enough to implement and I'd be fine using any of the formats discussed in the issue
04:25:58FromGitter<zacharycarter> I did write a texture packing utility for frag which we could probably port over to zengine with little effort
04:26:33def-pri-pubI commented in the tracker
04:28:46*empxre quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
04:29:09FromGitter<codenoid> is nim can be build an android app ?
04:29:27*endragor joined #nim
04:29:59FromGitter<zacharycarter> sure
04:31:22FromGitter<zacharycarter> apparently now Nim can be compiled on android as well
04:32:08FromGitter<zacharycarter> or I guess Nim apps can be compiled on android
04:33:54FromGitter<codenoid> cool, += 1 loved loved language, btw i', from text plain background,,
04:35:03FromGitter<codenoid> https://github.com/nim-lang/nimble/issues/388
04:35:07FromGitter<zacharycarter> I don't know what that means, but I'm glad you're enjoying Nim :)
04:48:15FromGitter<zacharycarter> my hatred for react grows constantly
05:01:42def-pri-pubtrue dat
05:01:43def-pri-pubnight
05:01:44*def-pri-pub quit (Quit: leaving)
05:04:49FromGitter<zacharycarter> o/
05:05:20FromGitter<zacharycarter> http://imgur.com/a/LlQUH
05:05:23FromGitter<zacharycarter> got all those lit up green today though
05:05:33FromGitter<zacharycarter> so making good progress on asinine testing
05:15:42*v17d quit (Ping timeout: 260 seconds)
05:22:04*dddddd quit (Remote host closed the connection)
05:28:21*v17d joined #nim
05:41:21*v17d quit (Ping timeout: 248 seconds)
05:54:10*haha_ joined #nim
06:06:19*dankrad quit (Ping timeout: 246 seconds)
06:15:36*v17d joined #nim
06:17:08*Trustable joined #nim
06:32:25*ShalokShalom_ joined #nim
06:35:03*ShalokShalom quit (Ping timeout: 240 seconds)
06:40:33*yglukhov joined #nim
06:42:41*Amy_ joined #nim
06:45:50*yglukhov quit (Ping timeout: 246 seconds)
06:58:27*haha_ quit (Quit: haha_)
07:51:31*yglukhov joined #nim
07:55:52*yglukhov quit (Ping timeout: 255 seconds)
08:00:10*ShalokShalom_ is now known as ShalokShalom
08:08:38*couven92 joined #nim
08:24:18*yglukhov joined #nim
08:32:25*pilne quit (Quit: Quitting!)
08:33:20*endragor quit (Remote host closed the connection)
08:33:53*endragor joined #nim
08:38:53*endragor quit (Ping timeout: 246 seconds)
08:43:54*Tiberium joined #nim
08:57:38*Matthias247 joined #nim
09:08:50*rokups joined #nim
09:10:51*ShalokShalom quit (Remote host closed the connection)
09:11:42*skrylar joined #nim
09:18:43*dankrad joined #nim
09:23:41Tiberiumis list comprehension is slower than usual "for" loop?
09:24:30*haha_ joined #nim
09:26:33Tiberiumah, it doesn't do preallocation of the seqw
09:26:36Tiberiumseq
09:42:27Tiberiumwould "incorrect object construction syntax" be a good error message for https://github.com/nim-lang/Nim/issues/5965 ?
09:45:30dom96Sure :)
09:46:15Tiberiumok, now I need to solve second case in this issue
09:48:35*willprice joined #nim
09:53:22Tiberiumdom96, If I just need to check if code compiles, I just write this code into a test? no "discard" statements needed?
09:53:30Tiberiumabout compiler tests
09:54:02dom96sure, verify it by running ./koch tests cat <thecategorythetestisin>
09:54:15dom96Test it before and after your fix to make sure the test works :)
09:58:23Tiberiumdom96, oh, I realised I need to have "discard" statement. hmm, so I'll need to split this test case into two files?
09:58:44Tiberiumbecause they both need to have compiler error messages
09:59:07Tiberiumah, yes
09:59:17dom96yep
10:04:53*xet7 quit (Quit: Leaving)
10:09:57*xet7 joined #nim
10:12:13*Sentreen quit (Ping timeout: 255 seconds)
10:13:08Tiberiumdom96, is there a way to check if object has field? like: if "sons" in field:
10:13:19TiberiumI need to add this check somehow
10:14:21dom96when declared(field.sons) perhaps
10:14:36Tiberiumah
10:14:55Tiberiumwell this worked :)
10:15:08Tiberiumbut I did it with "if", because it's in the compiler
10:15:28Tiberiumah, it doesn't matter - it works both with "when" and "if"
10:15:33Tiberiumbut I think "if" would be better
10:17:56*dankrad quit (Ping timeout: 246 seconds)
10:19:26Tiberiumwell yes, it works
10:19:51dom96why do you need this?
10:19:53*dankrad joined #nim
10:21:04Tiberiumdom96, because in some case "sons" field is not accessible in compiler (in semobjconstr.nim). I don't know if it's a proper fix, maybe I shouldn't check for errors in this file
10:21:42*kunev quit (Quit: е те!)
10:23:19dom96oh, you should check for the `kind` of the node
10:23:29dom96Only a specific kind has a 'sons' field
10:23:45dom96That's an interestingly different way to think about it though :)
10:23:57dom96We do always check for fields "by proxy"
10:24:05dom96it's the same for JsonNode's
10:24:20dom96node.kind == JString means that node.str exists
10:24:50Tiberiumah, ok
10:25:23*Sentreen joined #nim
10:26:55*kunev joined #nim
10:29:54Tiberiumok, I've made it with "field.kind", but I think I'll need to run all tests locally to see if it breaks something
10:34:30Tiberiumwell it was not hard to fix, I don't really know how nim compiler works, but even compiler crash error messages were very helpful
10:41:04dom96:D
10:41:43Tiberiumalso I don't know if I've put tests in a correct directory - "constructors"
10:48:38*kalexm joined #nim
10:48:51kalexmAm I right here?
10:48:52*ShalokShalom joined #nim
10:49:23Tiberiumlol, I found a typo in one test
10:49:29Tiberiumtest output: "tests/objects/tobject3.nim(9, 0) Warning: key ignored: ouptut"
10:49:34Tiberiumlol :)
10:49:40kalexmI am new to the Nim Language. Started on Thursday to learn by buying the ebook and already managed to get a binary running on my Vocore2
10:49:44kalexmLove it!
10:50:14Tiberiumkalexm, well, 128mb ram is more than enough for nim :)
10:50:26Tiberiumbut not for compiler itself sadly
10:50:46kalexmSo I am Alex 42 yaers (yup) from Germany and programming since my teenager years.
10:51:11kalexmThats why I chose nim.
10:51:44Tiberiumdom96, https://github.com/nim-lang/Nim/pull/6236 :)
10:51:48kalexmAs it creates these smallish binaries and although has a beautiful syntax and language concept.
10:52:22kalexmFiddled with rust before and got nuts, as the cross-compiler chain simply didnt work.
10:52:32dom96kalexm: Thanks for buying the book and welcome :D
10:52:42Tiberiumwell it's easier with nim to cross-compile
10:52:51Tiberiumsince there's basically C compiler for almost any OS/platform :D
10:52:55kalexmIt took me 10 Minutes to get a binary running with nim. Decision made. Fullstop.
10:54:22kalexmIt took me three hours to compile openWRT, the toolchain.
10:54:40kalexmThe nim part was a piece of cake.
10:55:27kalexmI played with Jester. I like it. I know nodeJS (the monster) very well. I like the HTML DSL a lot. But I need REST/JSON.
10:56:04kalexmIs there a framework or do I need to write my own?
10:57:03dom96Surely Jester can handle REST
10:57:10dom96Depends on what specifically you need
10:57:45kalexma very simple REST / JSON Interface to have an IOT device that communicates with android / ios
10:57:52Tiberiumwell you can just use jester
10:58:11Tiberiumbecause there's json parser in nim stdlib
10:58:20Tiberiumand very good one actually
10:58:34kalexmOK will try again. I tried to create JSON output but the compiler threw a type error. Thats where I stopped yesterday...
10:58:59Tiberiumwell you need to use %* macro to easily construct JSON
10:59:00kalexmI firstly need to understand the language fully to not bother you with stupid questions.
10:59:15kalexmI did use %*
10:59:50kalexmbut on return it told me that :
10:59:53kalexmtest.nim(11, 14) Error: type mismatch: got (JsonNode)
10:59:53kalexmbut expected one of:
10:59:53kalexmtemplate resp(content: string; contentType = "text/html;charset=utf-8"): stmt
10:59:55kalexmtemplate resp(code: HttpCode; headers: openArray[tuple[key, value: string]];
10:59:57kalexm content: string): stmt
10:59:59kalexmtemplate resp(code: HttpCode; content: string;
11:00:01kalexm contentType = "text/html;charset=utf-8"): stmt
11:00:05dom96The json module even has an example: https://nim-lang.org/docs/json.html#creating-json :)
11:00:12Tiberiumah I understand
11:00:18Tiberiumyou need to convert your json to string
11:00:20Tiberiumlike
11:00:23dom96^^ yeah
11:00:25dom96Just use $
11:00:26Tiberium$ %*{"hello": 1}
11:00:34Tiberiumwell it may look very strange
11:00:39kalexmimport jester, asyncdispatch, htmlgen, json
11:00:39kalexmsettings:
11:00:39kalexm port = Port(5454)
11:00:41kalexm appName = "/foo"
11:00:43dom96$(%*{...})
11:00:43kalexm bindAddr = "127.0.0.1"
11:00:45kalexmroutes:
11:00:47kalexm get "/":
11:00:49kalexm var j2 = %* {"name": "Isaac", "books": ["Robot Dreams"]}
11:00:51kalexm resp j2
11:00:53kalexmrunForever()
11:00:54dom96kalexm: Please use a pastebin for code!
11:00:55Tiberiumjust use
11:01:00Tiberiumresp $j2
11:01:00kalexmsorry...
11:01:13Tiberium$ is a common used procedure for converting stuff to string
11:01:16dom96anyway: resp $j2
11:01:17dom96should do it
11:01:45kalexmas you can see... I need to learn.... dont take my questions too serious...
11:02:13kalexmI will be back with a sound base in a couple of weeks.
11:02:45dom96It's cool. Feel free to ask any and all questions here :)
11:02:58kalexmAs I worked imperatively, functional and oo - I hope I will be as fast as with rust.
11:03:39kalexmHow many nim programmers are out there?
11:04:35Tiberiumnot many :)
11:04:40kalexmI come from mainstream languages as Java, Scala, Javascript, C# (and a bit C/C++ twenty years ago)
11:04:49Tiberiumwell nim is not mainstream sadly
11:04:55Tiberium(yet)
11:04:58kalexmnot to forget python ruby and php
11:05:03kalexmand some more.
11:05:18kalexmBut I think nim can replace a lot of them.
11:05:20Tiberiumwell python is more mainstream than Scala or C/C++ :D
11:05:25TiberiumI mean it's more popular
11:05:42Tiberiummostly because of new people, who just discovered programming
11:05:59kalexmI used python to graps AI concepts recently
11:06:03kalexmgrasp
11:06:10kalexmI still on my way
11:06:45kalexmPython seems to be the Lingua Franka for AI and Data Science
11:07:13kalexmI wonder why nim hasnt made it yet for IOT Devices.
11:07:27kalexmAs it seems to be ideal for that problem domain.
11:11:04Tiberiumwell I'm too lazy to try to run Nim on esp8266 :)
11:11:23Tiberiumbecause I would need to create bindings for esp sdk
11:11:28Tiberiumfor using wifi stuff
11:13:02FromGitter<BontaVlad> here is a nice project running on the esp: https://github.com/TomCrypto/caret
11:13:33Tiberiumwell I saw it
11:13:45Tiberiumbut xtensa cpu is removed from nim 0_0
11:13:56FromGitter<BontaVlad> you can add it manually
11:15:47Araqremoved? more likely was never added
11:16:24FromGitter<BontaVlad> https://github.com/nim-lang/Nim/blob/c531db90642bacfd7002582261439500e50dd5db/compiler/platform.nim#L189 just add you're custom cpu here and rebuild nim
11:16:37FromGitter<BontaVlad> and built it with no os option
11:16:44Tiberiumah, ok
11:16:46FromGitter<BontaVlad> *the project
11:17:37dom96pity that project was abandoned
11:17:50Tiberiumyeah
11:18:06kalexmneed to leave know. bye
11:18:12kalexmnow
11:18:12FromGitter<BontaVlad> while not directly related to esp this project also has a lot of useful informations https://github.com/gokr/ardunimo
11:18:17*kalexm quit (Remote host closed the connection)
11:18:22FromGitter<BontaVlad> have a nice day
11:18:27Tiberiumwell esp8266 supports "emulating" a arduino
11:18:38Tiberiumbecause you can write projects in arduino ide for esp8266
11:19:28FromGitter<BontaVlad> indeed, for hobby embeded projects it would recomend http://platformio.org/
11:20:07FromGitter<BontaVlad> on platformio framework you will also find the arduino --> esp option
11:22:14FromGitter<BontaVlad> The best part of nim is that you can use it on any level of you're project, built the server in nim, use nim on the IoT device, build the front end part admin page also with nim
11:27:33*Sentreen quit (Ping timeout: 240 seconds)
11:29:09Tiberiumwell and can I use any GC with esp8266?
11:29:32Tiberiumit has ~240kb ram :D
11:31:21FromGitter<BontaVlad> regarding the GC part I have no ideea
11:31:32*skrylar quit (Ping timeout: 258 seconds)
11:32:15Tiberiummaybe I can use --gc:stack as Araq suggested to someone about kernel in nim (on reddit)
11:35:21Tiberiumi don't know if xtensa cross-tolchain has string.h
11:35:29Tiberium(memcpy, memset)
11:40:08*BitPuffin|osx joined #nim
11:40:31*Sentreen joined #nim
11:51:12*dddddd joined #nim
11:51:17*yay joined #nim
12:01:53*willprice quit (Ping timeout: 246 seconds)
12:02:01Tiberiumwell this caret code is broken :(
12:02:06Tiberiumi'm trying to fix it
12:03:35*nsf joined #nim
12:10:02*ShalokShalom quit (Ping timeout: 255 seconds)
12:22:47*mahmudov joined #nim
12:30:25FromGitter<codenoid> hi, can i got total 100% loaded webpage using standart Nim HTTP Client ? https://nim-lang.org/docs/httpclient.html
12:31:07FromGitter<codenoid> *a javascript rendered webpage
12:32:07Tiberiumehm, no
12:32:09Tiberiumit's different things
12:32:27FromGitter<codenoid> is there any Nim library for it ?
12:32:30Tiberiumhmm
12:32:51Tiberiumyou can use selenium webdriver
12:32:55Tiberiumit has JSON protocol api
12:32:56dom96oh this is tricky. You need a full web browser to do that.
12:33:09dom96well. maybe not a full web browser
12:33:13FromGitter<codenoid> i want nim do that for me
12:33:13Tiberiumbut no ready libraries for nim sadly
12:33:13dom96but at least a js engine
12:33:33Tiberiumcodenoid: even python doesn't have this kind of stdlib module
12:33:40Tiberiumi doubt some language has it
12:33:46Tiberium(in standart library)
12:34:26*BitPuffin|osx quit (Ping timeout: 246 seconds)
12:35:11*BitPuffin|osx joined #nim
12:35:13Tiberiumwell selenium webdriver has a json protocol
12:35:28Tiberiumhttps://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
12:36:53FromGitter<codenoid> https://forum.nim-lang.org/t/1921
12:37:10Tiberiumyes
12:37:18Tiberiumthere's even a example here
12:39:19*Tiberium quit (Remote host closed the connection)
12:41:39*Tiberium joined #nim
12:51:30FromGitter<codenoid> thanks @FromIRC
12:59:26Tiberiumbtw FromIRC is not a real person, it's a just bridge to IRC :)
13:05:17*rosshadden joined #nim
13:09:44FromGitter<codenoid> boop, ;) ,, i just need to search AJAX end point who give the web data,, default http client and json parser will do that for me  :shipit:
13:11:29*HTTP_____GK1wmSU joined #nim
13:12:45dom96:D
13:13:36*HTTP_____GK1wmSU left #nim (#nim)
13:16:48*rokups quit (Quit: Connection closed for inactivity)
13:20:15*Amy_ quit (Quit: Amy_)
13:29:16*def-pri-pub joined #nim
13:32:14*ipjk joined #nim
13:44:57*Sentreen quit (Ping timeout: 260 seconds)
13:52:35FromGitter<jacob88888> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=598f0823210ac2692077f2c3]
13:52:41*rosshadden quit (Quit: WeeChat 1.9)
13:53:54Tiberiumwell error is similar to #5965, but I don't know why your case doesn't work
13:54:49FromGitter<jacob88888> Thanks yeah I saw that, trying to figure out more info I could provide
13:56:18Tiberiumhm
13:56:21Tiberiumit works for me
13:56:29Tiberiumwhat version of nimd did you use?
13:56:51FromGitter<jacob88888> 1) 7.0 I believe (installed a few days ago)
13:57:10Tiberiumsee play.nim-lang.org/?gist=e31b913780a7ef506603d89d3f2b4cef
13:57:27FromGitter<TiberiumN> compiles fine
13:57:41FromGitter<TiberiumN> yeah, but not 1.7.0, but 0.17.0 :)
13:57:54*Sentreen joined #nim
13:58:33FromGitter<jacob88888> @TiberiumN Heh thanks, I'll try and isolate it now
13:59:06FromGitter<TiberiumN> btw if you want vector3d there's already one in standart library
13:59:25FromGitter<TiberiumN> but it's Vector type is not generic
14:00:09Araqyeah we need to patch that
14:01:21FromGitter<jacob88888> @TiberiumN Yeah it's interesting I'm hacking on Zengine (https://github.com/zacharycarter/zengine/) and he has his own matrix library, so I'm sort of using that for now, gonna take a look at the std lib though
14:02:39Tiberiumwell if you need matrixes only there's a better-suited library i think
14:04:35*kalexm joined #nim
14:08:10mahmudovhow can we run linux shell commands?
14:08:28mahmudovlike os.system("echo 'test'") in python
14:08:34dom96check out the osproc module
14:08:45Tiberiumvery easily
14:09:02Tiberiumalso for simple commands you can just use https://nim-lang.org/docs/os.html execShellCmd
14:10:34mahmudovbtw i am looking /nim-lang.org/docs for info
14:10:42Tiberiumyes, and there's all info here
14:10:47mahmudovalso is there any examples pages
14:11:03Tiberiumthey're usually on module docs themselves
14:11:39Tiberiumand often description of the procedure is enough
14:11:48mahmudovok
14:12:15Tiberiumwell yes, nim docs are not the best
14:12:34Tiberiumbut after you use Nim a bit - you can easily understand them :)
14:14:53mahmudovno prob. + here is enough for help :)
14:15:24mahmudovalso i liked if we define comments for a proc
14:15:35mahmudovwe can produce html doc for it.
14:15:54*yay quit (Quit: Page closed)
14:16:02mahmudovisnt it,so docs/ are generated this way?
14:16:16Tiberiumyes they are
14:16:22mahmudovcool.
14:16:24Tiberiumall docs are in .nim files
14:19:05*rauss quit (Read error: Connection reset by peer)
14:19:56FromGitter<zacharycarter> @jacob88888 o/ if you have any questions about zengine please feel free to ping me
14:20:55*rauss joined #nim
14:22:23mahmudovyglukhov http://ix.io/z5v
14:23:01mahmudovi did "nimble install nimx" then "nim c nimxedit"
14:23:08Tiberiumwell AFAIK nimxedit is unmaintained
14:23:25Tiberiumlast commit to it was on 1st of Jul 2016
14:24:17mahmudovyeb maybe yglukhov updates..
14:24:31Tiberiumwell I heard no one likes gui editors :(
14:25:02*mahtov2 joined #nim
14:25:17FromGitter<jacob88888> @zacharycarter Thanks! So far zengine is very clean and easy to understand/build on, I'm moving a few things around so it works a bit like threejs heh
14:25:30mahmudovwhich lib do you offer for starting ?
14:26:17FromGitter<zacharycarter> @jacob88888 cool! if you build anything on top of it feel free to PR back to the repo
14:26:39FromGitter<zacharycarter> always looking for help / samples / etc
14:28:01FromGitter<jacob88888> @zacharycarter Sounds good will do
14:28:26FromGitter<zacharycarter>
14:28:38*mahtov quit (Ping timeout: 248 seconds)
14:29:45FromGitter<zacharycarter> this react test is going to drive me crazy
14:37:48Tiberiumwow, search by email (in google) gives very interesting things to read! https://lists.gt.net/python/python/747735?do=post_view_threaded
14:39:11TiberiumI actually love to read something from 3-8 years ago
14:47:16*haha_ quit (Quit: haha_)
14:49:23dom96Ever went back to the beginning of the Nim IRC logs? :)
14:49:37FromGitter<jacob88888> In regards to the previous Vector3/compiler error issue I was having earlier, did I just miss that spaces matter when initializing and object type?
14:49:58Tiberiumwell yes
14:50:02Tiberium(x: 0.5, y: 0.0, z:-0.5) wouldn't work
14:50:08*haha_ joined #nim
14:50:08Tiberium(x: 0.5, y: 0.0, z: -0.5) would work
14:50:37Tiberiumdom96, I actually can? wow
14:50:57TiberiumI didn't knew that irc logs are stored forever :)
14:51:23TiberiumWAT?
14:51:24FromGitter<jacob88888> Tiberium: Ok thanks that seems to be it
14:51:26Tiberiumthere's logs from 2012
14:52:49Tiberiumdom96, https://irclogs.nim-lang.org/30-05-2012.html :)
14:52:59Tiberiumi found it
14:53:08dom96yep, css is a bit messed up
14:53:20dom96because they used to be written straight into an html file
14:53:25dom96nowadays they are inside JSON files
14:53:31dom96and then rendered on the fly :)
14:53:35Tiberiumwell doesn't really matter, but the fact that they're stored is good
14:53:37dom96But still readable
14:53:44Tiberiumwhere are they stored?
14:53:49TiberiumNimBot, !ping
14:53:54Tiberium!ping
14:53:54NimBotpong
14:53:56Tiberiumyay
14:54:01Tiberiumstill works after 5 years :D
14:54:45dom96Yeah, NimBot desperately needs love
14:54:50dom96I have such big plans for it
14:55:01dom96I want it to track the user count here
14:55:14dom96I also want it to be integrated with the Nim playground for code execution
14:55:23Tiberiumthis would not be too hard I think
14:55:32dom96And I want it to allow me to search for procedures, like !doc toUpper
14:55:39Tiberiumah, this is super-helpful
14:55:54dom96If anyone wants a project feel free to make PRs ;)
14:57:36Tiberiumwait, it has the ability to anounce commits?
14:57:49dom96yeah, if the NimBuild build farm is running
14:58:08dom96I didn't have the time to maintain it though
14:59:34*kalexm quit (Remote host closed the connection)
14:59:47Tiberiumwait, so it's like buildbot for nightly builds?
15:01:08*kalexm joined #nim
15:03:46dom96yep
15:04:29dom96Maybe I'll get back to it. Araq loved it :P
15:04:33*arnetheduck quit (Ping timeout: 248 seconds)
15:04:42dom96Right now I think I would focus on just building nightly binaries.
15:04:47dom96Before it was very much for testing
15:04:57dom96This was before AppVeyor even existed
15:05:01dom96and probably before travis as well
15:05:17*kalexm quit (Ping timeout: 246 seconds)
15:09:05*Matthias247 quit (Read error: Connection reset by peer)
15:12:40Araqyeah, nimbuild and Aporia is your best work 8-)
15:13:55dom96:D
15:18:52*ShalokShalom joined #nim
15:24:16TiberiumI'll upload Gource visualization of nim repo today
15:24:37Tiberiumbut it's not the best - all dirs were highlighted, so in the end there was a mess with directories in test folder
15:25:25Tiberiumand time is very fast
15:25:30Araqadd dots to the dirs then?
15:25:58Tiberiumwell I can just remove highlighting of the directories
15:26:06Tiberiumso they would highlight only if something changed in them
15:27:28Tiberiumcurrently at the end it looks like this - https://www.pictshare.net/4hvbcs6fky.png
15:27:45Tiberium(every time gource produces unique tree)
15:30:47TiberiumI'll see how it looks without directories highlighted
15:39:26Tiberiumoh yay, I found script to download avatars from github :)
15:40:30dom96def-: Haskell :'(
15:41:45Tiberiumsadly there's no way in gource to highlight some dirs ONLY when something in them is changed, and highlight other dirs all the time
15:41:54demi-i've got a csv file that has a column of numbers, i want to parse those as ints/floats
15:42:00def-dom96: I wish I had rewritten it in Nim, I'm trying to figure out Haskell space leaks now
15:42:39def-dom96: would Nim deal better with feeding thousands of open connections?
15:42:53dom96It would certainly be an interesting test.
15:43:16dom96Why did you write it in Haskell in the first place?
15:43:27*willprice joined #nim
15:43:35def-It was a Christmas exercise for our students at university
15:43:41def-and the course was doing Haskell at that time
15:44:56dom96I see. I can't fault you for that, but it feels like a missed opportunity for Nim.
15:45:29def-It was literally a few minutes to make the timer with the existing Haskell framework. Rewriting gifstream in Nim would have been a few hours of work :)
15:46:14def-I have some other project in Nim planned, should be a bit more excited, but no guarantees if I'll find the time for it
15:46:20def-exciting*
15:46:30*smt_ joined #nim
15:46:52dom96oh wow, you wrote that a while back.
15:47:18FromGitter<BontaVlad> @def, keep the projects coming, I really enjoy reading you're blog
15:47:37dom96def-: So is Haskell not able to handle the load?
15:48:02dom96I wrote this Snake game to test how well Nim can handle load... https://picheta.me/snake/
15:48:04def-it's handling it fine. but after 10000 visitors or so I can notice increased memory usage
15:48:05dom96But HN never picked it up
15:48:29def-and I can't reproduce it locally, so I'm not sure yet what's causing it
15:49:31def-maybe some stale connections that keep a few KB of memory each
15:49:33dom96But yeah, really cool.
15:49:52*mahtov joined #nim
15:49:54*smt` quit (Ping timeout: 258 seconds)
15:50:17*smt quit (Ping timeout: 258 seconds)
15:51:13*smt joined #nim
15:52:12*mahtov2 quit (Ping timeout: 258 seconds)
15:53:13*Trustable quit (Remote host closed the connection)
16:02:31*kalexm joined #nim
16:06:49*kalexm quit (Ping timeout: 255 seconds)
16:10:19*yglukhov quit (Remote host closed the connection)
16:11:50*dankrad quit (Ping timeout: 240 seconds)
16:13:56*dankrad joined #nim
16:14:49*yglukhov joined #nim
16:19:32*yglukhov quit (Ping timeout: 260 seconds)
16:19:46*pilne joined #nim
16:28:45Tiberium3 commits to 11k btw
16:36:59*jivank[m] quit (Ping timeout: 255 seconds)
16:37:03*ehmry quit (Ping timeout: 258 seconds)
16:37:08*Jipok[m] quit (Ping timeout: 240 seconds)
16:37:10*TheManiac quit (Ping timeout: 240 seconds)
16:37:20*hohlerde quit (Ping timeout: 246 seconds)
16:37:22*mindB quit (Ping timeout: 246 seconds)
16:37:35*MrAxilus[m] quit (Ping timeout: 276 seconds)
16:37:48*dyce[m] quit (Ping timeout: 255 seconds)
16:38:10*Demos[m] quit (Ping timeout: 264 seconds)
16:47:22Tiberiumim uploading gource video now, I just added some random music, so you can just turn it off
16:50:58*yglukhov joined #nim
16:52:59*haha_ quit (Quit: haha_)
16:54:20*nsf quit (Quit: WeeChat 1.9)
16:54:42Tiberiumhttps://www.youtube.com/watch?v=rUJ7Bzgv3n0 if you don't want the music you can just turn it off :)
16:55:50*dankrad quit (Ping timeout: 240 seconds)
16:59:08*couven92 quit (Ping timeout: 240 seconds)
17:00:37*v17d quit (Remote host closed the connection)
17:02:33*v17d joined #nim
17:02:59TiberiumMore action is starting from 2014 :)
17:05:18*v17d quit (Remote host closed the connection)
17:05:38dom96nice
17:07:07Tiberiumpls don't look at other videos, it's a mix of some programming tests / games (in russian)
17:07:29TiberiumI didn't record any video with my voice in more than a year
17:07:48*dankrad joined #nim
17:33:07*Matthias247 joined #nim
17:43:45dom96hey yglukhov, you around?
17:43:54yglukhovhey whats up
17:44:00dom96Mind if I PM?
17:44:14yglukhovsure
17:47:51def-pri-pubzacharycarter: not sure if you're here (or idling right now), but when you get a chance, can you take a look atthe link to the example I posted on the issue tracker?
17:48:20def-pri-pubI want to get a minimal zengine template before I embark on the Sprite object. What I have so far only shows black and the text.
17:54:20*Jipok[m] joined #nim
17:57:57*MrAxilus[m] joined #nim
17:57:57*dyce[m] joined #nim
17:57:57*Demos[m] joined #nim
17:57:57*ehmry joined #nim
17:58:03*jivank[m] joined #nim
17:58:03*TheManiac joined #nim
17:58:04*mindB joined #nim
17:58:04*hohlerde joined #nim
18:02:09*dankrad quit (Ping timeout: 258 seconds)
18:02:23*dankrad joined #nim
18:03:53*kalexm joined #nim
18:04:16FromGitter<cyberlis> guys, why do we need this `start` agument ? ⏎ `proc readBytes(f: File, a: var openArray[int8|uint8], start, len: Natural): int =` ⏎ what use cases of it? I understand it is offset in `a: openAray`. but for what? is it so often used?
18:05:46dom96maybe not often, but might be useful to some
18:07:02Tiberiumit cna be used for reading not from the start of file
18:07:04Tiberiumit's normal to have
18:07:09Tiberium*normal
18:07:25Tiberiumand it's not an offset in openarray
18:07:26FromGitter<cyberlis> this is not a file offset
18:07:32FromGitter<cyberlis> it is
18:07:55FromGitter<cyberlis> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=598f43fa162adb6d2eec8806]
18:07:57FromGitter<cyberlis> you see
18:08:04FromGitter<cyberlis> it is offset in the array
18:08:07FromGitter<cyberlis> oh boy
18:08:14Tiberiumbut it still be useful to someone
18:08:34*kalexm quit (Ping timeout: 276 seconds)
18:10:37FromGitter<cyberlis> it sounds like. we have printing function. And we have `start_hacking` argument in it, because it can be usefull to someone
18:14:25FromGitter<cyberlis> that is why i asked how you use it. may be you found some usecase. Because if i will write small arrticle about reading and writing file, i shoud explain porpose of the `start` argument. And explanation it is useful for someone is bad
18:18:24*kalexm joined #nim
18:20:56*BitPuffin|osx quit (Ping timeout: 246 seconds)
18:22:07euantorIt's extremely useful
18:22:17euantorSay the file isn't an actual file, but for example a serial port
18:22:39FromGitter<cyberlis> yes
18:22:43*kalexm quit (Remote host closed the connection)
18:22:46euantor1 read might not fill the whole buffer (array), so yo need to read multiple times to get exactly N bytes of data - you then use a loop with the offset to fill the buffer
18:23:10FromGitter<cyberlis> ok, i see
18:25:32FromGitter<cyberlis> thanks to you
18:26:14*kalexm joined #nim
18:26:56euantorNo problem :)
18:27:56*dankrad quit (Ping timeout: 246 seconds)
18:28:18*willprice quit (Quit: Leaving)
18:31:11*mahmudov quit (Ping timeout: 255 seconds)
18:38:25*haha_ joined #nim
18:40:38*nsf joined #nim
18:53:08*Trustable joined #nim
18:53:39*kalexm quit (Remote host closed the connection)
18:58:06*kalexm joined #nim
19:03:49*kalexm quit (Remote host closed the connection)
19:04:33*kalexm joined #nim
19:14:19*sz0 quit ()
19:20:30*D33P-B00K joined #nim
19:21:25*D33P-B00K left #nim (#nim)
19:46:56*haha_ quit (Quit: haha_)
20:03:50kalexmsomeone out there?
20:04:16kalexmhow to get a value from a StringTable?
20:05:39kalexmlike myStrTabVar["key"]
20:07:03Tiberiumlike you said
20:07:06TiberiumxD
20:07:32Tiberiumshow the code if it's not working
20:07:37Tiberiumbut please on gist
20:07:39Tiberiumor pastebin :)
20:09:38*AndyMonteith joined #nim
20:13:21AndyMonteithhttps://hastebin.com/aqezosovow.hs Would anybody know why the compiler would think I'm giving it a NimNode, when I declared the name identifier as a string? Thanks :)
20:14:16Tiberiumbecause macro accepts AST
20:14:27Tiberiumnot usual types
20:15:00Tiberiumjust add
20:15:07Tiberium*change newIdentNode(name.strVal)
20:15:09Tiberiumthis would work
20:15:14Tiberiumand not discard
20:15:15Tiberiumbut return
20:15:21Tiberiumah
20:15:27Tiberiumresult.add newIdentNode(name.strVal)
20:16:12AndyMonteithso any parameter passed to a macro, no matter the type declared originally will be like wrapped in a AST Node?
20:16:19Tiberiumyes
20:16:27AndyMonteithAh right, thank you very much for your help :)
20:17:14*AndyMonteith left #nim (#nim)
20:23:19*yglukhov quit (Read error: Connection reset by peer)
20:23:52*yglukhov joined #nim
20:41:51FromGitter<zacharycarter> @define-private-public I will take a look here shortly I just got finished writing about 10k lines of react tests
20:41:53FromGitter<zacharycarter> need a break
20:43:30*Tiberium quit (Remote host closed the connection)
20:44:19*mahmudov joined #nim
20:51:00FromGitter<zacharycarter> screw that one line
20:51:01FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/VPpj/Screen-Shot-2017-08-12-at-4.36.45-PM.png)
20:51:17*Tiberium joined #nim
20:52:01TiberiumOk, now I'll be in IRC even from the phone
20:54:11*kalexm quit (Remote host closed the connection)
20:54:25*Jesin quit (Quit: Leaving)
20:55:33*xet7 quit (Quit: Leaving)
20:55:42FromGitter<zacharycarter> @define-private-public looking now
20:57:06dom96zacharycarter: I feel for you :(
20:57:36FromGitter<zacharycarter> dom96: I bet you do :P
20:57:51FromGitter<zacharycarter> you had to have had it worse than I do, having been there
20:58:06dom96No, as a matter of fact I haven't written any react tests yet.
20:58:24FromGitter<zacharycarter> oh, well if you ever do, you're in for a treat :P
20:59:38dom96What do you use for them? Something selenium-like?
20:59:55FromGitter<zacharycarter> Nope! these are all unit tests
21:00:07FromGitter<zacharycarter> but I will probably end up writing some end to end tests using something like nightwatch
21:00:12FromGitter<zacharycarter> which runs a selenium driver
21:00:21*Jesin joined #nim
21:00:34FromGitter<zacharycarter> @define-private-public just get rid of these lines - beginTextureMode(target) && endTextureMode()
21:00:45FromGitter<zacharycarter> texture mode is for rendering to a texture
21:07:37FromGitter<cyberlis> find interesting thing. nim has `write` function for `int`s `float`s `bool`s etc. but it doesn't have same `read` functions
21:10:04Tiberiumhttps://nim-lang.org/docs/streams.html
21:10:06Tiberium?
21:12:09FromGitter<cyberlis> how can i convert `File` to `Stream`
21:12:41TiberiumWell you don't
21:12:52TiberiumYou just open new file stream
21:14:13TiberiumIf you need to read binary file - either use file stream, or read file and create string stream
21:14:35FromGitter<cyberlis> ok, i understood
21:15:05TiberiumAnd where did you find those "write" procedures?
21:19:20*mahmudov quit (Quit: Leaving)
21:19:33*mahmudov joined #nim
21:21:45*ipjk quit (Quit: Leaving)
21:24:10FromGitter<cyberlis> line 172 ⏎ https://github.com/nim-lang/Nim/blob/master/lib/system/sysio.nim
21:24:36*adeohluwa joined #nim
21:26:20FromGitter<cyberlis> you are the first who told me about streams. In the internet no place where i can read about right way of read files in nim-lang. i thought it is usual daily task
21:28:45TiberiumYes it is
21:29:05FromGitter<cyberlis> but no examples about reading and witing. sorry. i am upset. because new guys to nim can't even read data from their files because no tutorials about it
21:30:20TiberiumThey can, you just don't understand. Look - why are you wanting the functionality to read integers from the file in usual IO module?
21:30:37FromGitter<cyberlis> no no no
21:30:38TiberiumJava for example has similar streams
21:30:53FromGitter<Smaehtin> @cyberlis You can link to a specific line of a file on GitHub by clicking on the line, like this: https://github.com/nim-lang/Nim/blob/master/lib/system/sysio.nim#L172 :D
21:31:09FromGitter<cyberlis> oh, thank you
21:31:16FromGitter<cyberlis> back to files
21:31:27TiberiumLol, this procedure is internal
21:31:39TiberiumYou can't use it outside of sysio.nim
21:31:45TiberiumIt's needed for the module
21:31:55FromGitter<cyberlis> yes this is problem
21:32:11FromGitter<cyberlis> i dont know what functions is right to use
21:32:18Tiberiumstreams module
21:32:26FromGitter<cyberlis> what modules i should use to write and read files
21:32:31FromGitter<cyberlis> thank you
21:32:47TiberiumIt's separate things!
21:32:49FromGitter<cyberlis> it is very important
21:32:54TiberiumReading a file is a one thing
21:33:14FromGitter<cyberlis> and what is the other
21:33:20TiberiumReading some binary file into primitive types is another thing
21:33:28dom96cyberlis: reading a file couldn't be easier: readFile("path/to/my/file.txt")
21:33:33TiberiumYeah
21:33:41FromGitter<cyberlis> 12G file
21:33:42dom96and writing a file... yep, you guessed it: writeFile("path", "contents")
21:33:47FromGitter<cyberlis> i have 8G ram
21:33:54TiberiumUse readLine iterator
21:34:00TiberiumOh
21:34:01dom96what's in the file?
21:34:07FromGitter<cyberlis> but if my file is binary
21:34:10dom96what are you planning to do with it?
21:34:13dom96parse it?
21:34:35FromGitter<cyberlis> read 40 bites every iteration
21:34:54TiberiumBits?
21:35:20TiberiumWell it's the exact case of readChars with an offset :)
21:35:22dom96So I'm pretty sure I showed you how to do it: use readChars.
21:35:37FromGitter<cyberlis> bytes* sorry
21:35:38dom96no, the offset is for the destination array/string.
21:35:44TiberiumAh, yes
21:36:07FromGitter<cyberlis> yes. thank you. I know that right now
21:36:20FromGitter<cyberlis> but what will be with other newbies
21:36:41TiberiumThey read the docs
21:36:53dom96The docs can always be improved.
21:37:03dom96And you're more than welcome to improve them.
21:37:25TiberiumWell read Chars has a good description
21:38:50FromGitter<cyberlis> yes. it is. but i steel don't know when i should use streams?
21:38:50TiberiumYou just use while loop and readChars
21:39:08FromGitter<cyberlis> when i read binary formated file?
21:39:39TiberiumWhen you need to pack and unpack binary data to/from primitive types, like booleans or ints
21:40:15TiberiumSee https://github.com/TiberiumN/nim-osureplay for example where streams module is needed
21:41:46*Matthias247 quit (Read error: Connection reset by peer)
21:42:18TiberiumOr https://gist.github.com/TiberiumN/e6ec6f6a865adc9ea7192b51ec8ccd51
21:42:43FromGitter<cyberlis> oh, cool
21:42:45FromGitter<cyberlis> thank you
21:43:40TiberiumIf your file has only strings - it's not "binary"
21:44:49*Nobabs27 joined #nim
21:46:43FromGitter<cyberlis> yes i see
21:48:44*ShalokShalom quit (Remote host closed the connection)
22:20:13*adriano joined #nim
22:21:23*Nobabs27 quit (Quit: Leaving)
22:21:38*adriano quit (Client Quit)
22:37:44*ehmry quit (Ping timeout: 240 seconds)
22:37:46*Demos[m] quit (Ping timeout: 258 seconds)
22:37:47*hohlerde quit (Ping timeout: 255 seconds)
22:37:51*Jipok[m] quit (Ping timeout: 246 seconds)
22:37:52*mindB quit (Ping timeout: 246 seconds)
22:38:19*TheManiac quit (Ping timeout: 276 seconds)
22:38:19*MrAxilus[m] quit (Ping timeout: 276 seconds)
22:38:32*dyce[m] quit (Ping timeout: 246 seconds)
22:38:46*jivank[m] quit (Ping timeout: 264 seconds)
22:42:52*Sentreen quit (Ping timeout: 276 seconds)
22:43:49*nsf quit (Quit: WeeChat 1.9)
22:47:21FromGitter<zacharycarter> damn my state is having a rough day :/
22:55:09*Sentreen joined #nim
23:02:18dom96oh?
23:02:22dom96what's happening?
23:08:23*Matthias247 joined #nim
23:08:45FromGitter<zacharycarter> I guess there was a big white power rally in one of our cities which included a vehicle ramming into protestors and killing one, and now apparently a police helicopter has crashed
23:09:03FromGitter<zacharycarter> probably totally unrelated but still, lots of chaos going on
23:10:01dom96oh, that sucks :\
23:10:46FromGitter<zacharycarter> yeah, oh well, that's the USA for you
23:12:03*Matthias247 quit (Read error: Connection reset by peer)
23:19:54*Nobabs27 joined #nim
23:20:42FromGitter<zacharycarter> http://time.com/charlottesville-white-nationalist-rally-clashes/?utm_campaign=time&utm_source=twitter.com&utm_medium=social&xid=time_socialflow_twitter
23:20:52*Trustable quit (Remote host closed the connection)
23:22:35*Nobabs25 joined #nim
23:25:05*Nobabs27 quit (Ping timeout: 246 seconds)
23:36:26Araqthis is not nim-offtopic
23:44:56*yglukhov quit (Remote host closed the connection)
23:45:52*Jesin quit (Quit: Leaving)
23:48:13FromGitter<zacharycarter> sorry
23:50:42*Jipok[m] joined #nim
23:54:32*Demos[m] joined #nim
23:54:32*ehmry joined #nim
23:54:32*dyce[m] joined #nim
23:54:38*MrAxilus[m] joined #nim
23:54:38*TheManiac joined #nim
23:54:38*jivank[m] joined #nim
23:54:39*mindB joined #nim
23:54:39*hohlerde joined #nim
23:59:12dom96Araq: No other discussion was taking place, ergo it's fine to go offtopic.