<< 16-01-2018 >>

00:12:25*MyMind quit (Quit: WeeChat 2.1-dev)
00:17:52FromGitter<Quelklef> Also, is there some good way to accept an immutable value as a parameter but be able to manipulate it as a var?
00:17:55*Sembei joined #nim
00:17:58FromGitter<Quelklef> I have a lot of procs that look like:
00:18:24FromGitter<Quelklef> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a5d44d0ba39a53f1a1ce3f0]
00:24:48*Serenit0r quit (Quit: Leaving)
00:49:22FromGitter<mratsim> @Quelklef, that is the way to do what you want
00:49:36FromGitter<Quelklef> There's no nicer way?
00:50:10FromGitter<mratsim> you can probably shadow the input but it’s not pretty as well: ⏎ ⏎ ```proc ex(paramNum: int): int = ⏎ result = paramNum ⏎ # ... do stuff to result ...``` [https://gitter.im/nim-lang/Nim?at=5a5d4c421dcb91f177551539]
00:50:27FromGitter<Quelklef> Yeah... oh, well
00:50:29FromGitter<mratsim> and result is the idiomatic way
00:50:51FromGitter<Quelklef> My actual use case doesn't map A to A, but A to (A, B), so I can't actually use that : (
00:51:43FromGitter<mratsim> proc ex(paramNum: int): tuple[a: int, b: int] = ⏎ ⏎ ```result.a = paramNum ⏎ # ... do stuff to result.a and result.b ...``` [https://gitter.im/nim-lang/Nim?at=5a5d4c9f517037a212aeabc7]
00:52:20FromGitter<Quelklef> oh, hey, I didn't know you could do that
00:52:42FromGitter<Quelklef> that's pretty cool, though then you have to write result.a a lot
00:56:11*Jesin joined #nim
00:59:57*def- quit (Ping timeout: 240 seconds)
01:01:22*def- joined #nim
01:59:41*endragor joined #nim
02:00:46*endragor_ joined #nim
02:02:45*endragor_ quit (Remote host closed the connection)
02:02:52*endragor_ joined #nim
02:04:30*endragor quit (Ping timeout: 265 seconds)
02:09:22*dddddd quit (Remote host closed the connection)
02:41:52*vivus quit (Quit: Leaving)
03:03:39*chemist69 quit (Ping timeout: 256 seconds)
03:05:54*marenz_ joined #nim
03:09:26*marenz__ quit (Ping timeout: 255 seconds)
03:17:24*chemist69 joined #nim
03:17:44*vlad1777d quit (Ping timeout: 276 seconds)
04:32:18*marenz_ quit (Ping timeout: 256 seconds)
05:36:15*stevenfx joined #nim
05:43:45*yglukhov joined #nim
05:48:21*yglukhov quit (Ping timeout: 264 seconds)
06:01:20*nsf joined #nim
06:09:50*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
06:13:38*sz0 quit (Quit: Connection closed for inactivity)
06:13:44*endragor_ quit (Remote host closed the connection)
06:14:19*endragor joined #nim
06:14:35*ludocode quit (Remote host closed the connection)
06:19:09*endragor quit (Ping timeout: 256 seconds)
06:19:43*ludocode joined #nim
06:20:19*rauss quit (Quit: WeeChat 2.0.1)
06:21:49*rauss joined #nim
06:36:47*stevenfx quit (Quit: Leaving)
06:37:20*stevenfx joined #nim
06:42:03*Stevenfx_ joined #nim
06:45:51*stevenfx quit (Ping timeout: 248 seconds)
06:54:55*Stevenfx_ quit (Quit: Leaving)
06:55:37*stevenfx joined #nim
07:10:28*endragor joined #nim
07:11:08*wurui joined #nim
07:11:39*sz0 joined #nim
07:17:06*wurui quit (Remote host closed the connection)
07:22:26*endragor quit (Remote host closed the connection)
07:23:45*endragor joined #nim
07:32:37*xkapastel quit (Quit: Connection closed for inactivity)
07:34:13FromGitter<Varriount> @Quelklef Nimlime runs checks worth increased verbosity
07:42:35*gokr joined #nim
07:45:47*PMunch joined #nim
08:06:57FromGitter<gogolxdong> Has anyone used i18n in karax?
08:09:37PMunchWell, someone made it so I assume so :P
08:16:35FromGitter<gogolxdong> How to change cstring to string?
08:17:54*yglukhov joined #nim
08:20:22FromGitter<Yardanico> $cstringvar
08:21:44*yglukhov quit (Remote host closed the connection)
08:22:00*yglukhov joined #nim
08:54:43*floppydh joined #nim
08:54:57*dddddd joined #nim
08:58:11*crem quit (Ping timeout: 240 seconds)
08:59:38*crem joined #nim
09:19:03flyxCalinou: that's fixed on NimYAML master, https://github.com/flyx/NimYAML/issues/49
09:21:30flyxCalinou: `nimble install yaml@#head`
10:17:10*endragor quit (Remote host closed the connection)
10:19:14Calinouthanks :)
10:20:00*endragor joined #nim
10:24:19*endragor quit (Ping timeout: 256 seconds)
10:25:45*arnetheduck joined #nim
10:33:05*Vladar joined #nim
10:42:02avsejwhat is benign pragma?
10:42:15avsejnimsuggest segfaults to parse it
10:42:58avsejhttps://gist.github.com/avsej/b3251e85545104530c19b2913daf0ace
10:43:16avsejin real-life for example: lib/system/gc.nim
10:44:18avsejoh, in fact it looks like nimsuggest reaction to any unknown pragma. then I'll try to fix it
11:13:45Calinouflyx: sorry if this sounds obvious, but how would I load this into a dictionary-like type? https://paste.ee/p/BSvQU
11:13:51Calinouthe example on nimyaml.org only mentions an array-like structure
11:14:01Calinou(it doesn't look very YAML-y if I write it this way)
11:14:24Calinouthanks in advance :)
11:16:36flyxCalinou: I would guess this is something like Table[string, tuple[stability, reference: string]]
11:16:46flyxstability might also be an enumeration type
11:16:57flyxand the tuple could also be an object instead
11:17:03Calinousounds good. Yeah, it'll be devel (for following a branch HEAD) or stable (for following a fixed commit or tag)
11:17:17Calinouthanks, I'll try it soon
11:20:07flyxbtw, NimYAML does not require the quotes on line 10
11:20:35*vlad1777d joined #nim
11:20:36flyxif the target type is a string, NimYAML will not try to parse scalars that look like numbers
11:21:38Calinouok, nice :)
11:22:31*sz0 quit (Quit: Connection closed for inactivity)
11:48:01dom96Calinou: What are you working on? :)
11:54:29*vlad1777d quit (Ping timeout: 276 seconds)
11:55:54*Snircle joined #nim
12:04:36FromGitter<gntech> Is there any native nim library for image operations like resize, rotate, crop?
12:06:12dom96nimpng perhaps
12:15:15*Yardanico joined #nim
12:16:54FromGitter<gntech> Thanks for the answer, however from the what I read it doesnt do what I want. I am looking to something similiar to this go library https://github.com/disintegration/imaging#image-resizing Basically decode an image from multiple formats into a general image-type and then do some operations like scale or fit and then encode down to an image format again.
12:18:17FromGitter<gntech> Perhaps that go library can be ported to native nim code. I could maybe give it a try
12:26:18dom96yeah, afraid I'm not aware of any library that does this.
12:26:28dom96If you could create one that would be brilliant
12:39:03FromGitter<gntech> I will look into it 😄
13:00:20FromGitter<mratsim> @gntech: I will need one too: here is my research on this topic https://github.com/mratsim/Arraymancer/issues/15. There is Arraymancer vision as well but it’s more for working with images as tensors. Your best bet is probably OpenCV
13:01:42FromGitter<mratsim> If you write your own library, check out this post by imazen which is a startup dedicated to image processing on the web (they use Rust): https://github.com/imazen/Graphics-vNext/blob/master/aware.md
13:03:41FromGitter<mratsim> Or compile Nim to Halide —> http://halide-lang.org/ but since Halide is using LLVM I expect compilation from Halide to assembly/Cuda/OpenCL to be slow
13:05:31FromGitter<mratsim> And if OpenCV doesn’t fit the bill, I think this is probably the easiest library to wrap as it’s pure C API (unlike OpenCV) - https://github.com/ermig1979/Simd
13:06:14avsejisn't localError supposed to raise exception and breakout from the site where it was called? I thought it is kind of raising exception
13:09:07avsejoh, in context of the idetools, the execution might continue after localError() which is weird a bit
13:13:57FromGitter<data-man> Some C-libs for image processing and image analysis: :-) ⏎ https://github.com/DanBloomberg/leptonicahttps://github.com/jcupitt/libvips
13:26:47FromGitter<krux02> Yay I found a bug where iterating with an iterator does not create any C code in the backend at all.
13:28:05*floppydh quit (Ping timeout: 240 seconds)
13:28:14mirankrux02: i just looked at your issue....
13:29:20Calinoudom96: a Godot installer/updater à la rustup
13:29:21mirani really do hope iterators will get some improvements before v1.0
13:29:35Calinouit'll compile from source for now, since I can't get automated builds to work reliably since I need to use three different CI services…
13:30:28*floppydh joined #nim
13:31:17dom96Calinou: ooh, maybe you could reuse some of choosenim's source code
13:32:28FromGitter<krux02> miran: I already tried to use iterators recursively
13:32:55FromGitter<krux02> that doesn't work, because you can't inline a recursive function
13:34:06FromGitter<krux02> but it would have been very useful
13:47:40GitDisc<awr> is there a way I can use filterIt on a HashSet
13:49:04livcduhh i need to pass something like "powershell.exe gwmi -query 'select * from win32_service where Name like "Lah%"'" to the execPrcess
13:49:07livcdhow should I do that ?
13:53:36Yardanicolivcd, triple quotes or escaping?
13:54:44*stevenfx quit (Ping timeout: 276 seconds)
13:54:51mirankrux02: if it it continuation of the same (while) loop - why does it echo from the iterator?
13:55:24miranshouldn't that echo run only the first time you invoke iterator, and after that you're in a while loop
13:56:03miranthis looks to me like you invoke it (from the start) three times, but every time `readPos` is different
13:57:35FromGitter<krux02> miran: The idea is to continue the iteration
13:57:51FromGitter<krux02> but I wanted to use nice iterator syntax
13:57:56mirandisclaimer: i have really hard time understanding nim's iterators
13:58:45FromGitter<krux02> In the past I tried a lot to create an iterator object and then pull from it. but it is really ugly to do that in Nim
13:58:51livcdYardanico: ah yeah tripple quotes
13:59:09*wastedone_ joined #nim
13:59:29FromGitter<krux02> Therefor I took the state out of the iterator and made readPos a variable outside of the iterator
14:00:09miranwould .closure. pragma maybe help?
14:00:16FromGitter<krux02> each "iterator" would then access the same readPos variable and therefore make sure that each character is only read once
14:00:23FromGitter<krux02> miran: not really
14:00:30FromGitter<krux02> it would make the iterator ugly to use
14:02:02PMunchCalinou, cool project. How does Nim work and integrate with Godot?
14:02:04miranok, you say "each iterator" - so you want to have three instances of it (one 'main' and two started from `parseString`), not just one and the same?
14:02:30miranif so, three echoes are expected
14:02:40FromGitter<krux02> instead of multiple instances of `while readPos < input.len: readPos += 1; let c = input[readPos-1]` I wanted to simply write `for c in readChar():` And that is what inline iterators are there for.
14:03:06FromGitter<krux02> three echos are expected, yes
14:03:15FromGitter<andreaferretti> it really looks like you want a closure iterator
14:03:26FromGitter<andreaferretti> why do you want to have it inline?
14:03:38FromGitter<krux02> and since they are inline iterators without their own state, you can barely talk about instances.
14:04:28FromGitter<krux02> closure iterators are horribly ugly to use
14:04:31FromGitter<krux02> I already said that
14:05:37FromGitter<krux02> using a closure iterator is uglier than using no iterator feature of the language at all.
14:05:51miranagreed about uglyness: https://forum.nim-lang.org/t/3465
14:05:53FromGitter<krux02> therefore I am not using closure iterators
14:06:48*kier quit (Ping timeout: 246 seconds)
14:07:04FromGitter<krux02> The syntax is super confusing.
14:08:16miranplease see my proposal here: https://github.com/nim-lang/Nim/issues/7047 - see if you can add/improve something
14:08:38FromGitter<krux02> and when I can pull out the state of the iterators into a single shared state (readPos), I don't need closure iterators
14:08:39FromGitter<andreaferretti> syntax apart, you want to the iterator to have some state, which lead me to think that closure iterators were more suitable
14:10:52*kier joined #nim
14:11:06dom96Pretty sure you simply cannot use inline iterators as you are intending to use them
14:11:21dom96You need closure iterators, their ugly syntax is a separate issue
14:12:20FromGitter<krux02> dom96: I am pretty sure I should be able to use them as I am.
14:12:27GitDisc<awr> this is what I came up to filter a set
14:12:42GitDisc<awr> ```
14:12:42GitDisc<awr> let x = [1, 2, 3, 4, 5, 6].toSet()
14:12:43GitDisc<awr> let evens = toSeq(x.items).filterIt(it mod 2 == 0).toSet()
14:12:43GitDisc<awr> ```
14:13:19FromGitter<krux02> dom96: If you look into the issue, the code generator doesn't generate code at all. Even if you don't understand my intention, you must agree that this is a bug.
14:13:26GitDisc<awr> is there a standard library proc I don't know about?
14:14:42*couven92 joined #nim
14:15:33*craigger quit (Quit: bye)
14:15:41*craigger joined #nim
14:16:51dom96awr: you might be better off just using seq for this case
14:17:47dom96krux02: you're exporting an iterator to C? C doesn't have this concept. Maybe this is what's causing the issue?
14:22:30FromGitter<Quelklef> @Varriount OK, Thanks
14:32:59*arnetheduck quit (Ping timeout: 255 seconds)
14:33:59livcdhow do I embed data into the binary ?
14:34:16*arnetheduck joined #nim
14:34:27dom96staticRead()
14:34:40dom96const foo = staticRead("filename") to be exact
14:35:45livcdthanks
14:58:57FromGitter<data-man> @awr: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a5e1331ce68c3bc74c4219b]
15:05:11CalinouPMunch: there's community-developed Nim bindings :) https://github.com/pragmagic/godot-nim
15:05:22CalinouI've tested them a bit and they work OK, though I stick to GDScript myself
15:07:21PMunchI wanted to try Godot but I never got around to it
15:09:13*BitPuffin joined #nim
15:10:56*gokr quit (Ping timeout: 256 seconds)
15:12:03PMunchBut I prefer having discrete tools and not one monolithic editor
15:15:09FromGitter<krux02> dom96: I was just exporting to C, so that the generated code looks less ugly. But the exportc pragma has no effect and is not mandatory.
15:17:35FromGitter<krux02> PMunch: that's the framework problem.
15:18:12FromGitter<krux02> And that is also what I want to solve for game programming once and for all with my library fancygl
15:18:45FromGitter<krux02> I want to make rendering composible elegant and simple, yet not part of any framework and stuff
15:19:00FromGitter<krux02> just write your tiny render functions and you are done
15:19:01PMunchAh nice
15:19:31PMunchI wrote a lot of game-centered functions that I tried to keep as separated as possible in SDLGamelib
15:19:42PMunchIt's based on SDL however for all the rendering stuff
15:20:05PMunchSo many of the things need SDL structures to be passed in and out of it
15:20:49livcdHmm I cant seem to run a simple execProcess("powershell.exe get-service") on windows2003
15:22:08livcdi can see it spawns powershell but i cant get any output it just gets hung
15:22:45livcdif i kill that ps process the execution continues
15:22:46livcdweird
15:36:27*PMunch quit (Quit: Leaving)
15:37:04Yardanicolivcd, are you sure that powershell process exits after running this command?
15:37:19Yardanicoif it doesn't - that's why your nim program hangs
15:50:33*gokr joined #nim
16:12:39dom96livcd: yeah, what Yardanico said, have you tried running that in cmd.exe?
16:15:59*Vladar quit (Remote host closed the connection)
16:17:09*couven92 quit (Quit: Client disconnecting)
16:21:29FromGitter<Varriount> @Quelklef I accept pull requests. :)
16:22:34*Vladar joined #nim
16:33:38livcdwell running the same on anything > 2003 works flawlessly
16:33:48*PMunch joined #nim
16:35:54Yardanicolivcd, well did you try to run it in cmd?
16:37:46FromGitter<krux02> I really hate when the copiler crashes
16:38:45shashlickhas anyone gotten CINT to work with nim generated source files?
16:38:46shashlickhttp://www.hanno.jp/gotom/Cint.html
16:38:47FromGitter<krux02> it just crashes, and then you can't debug anything
16:39:27*gokr quit (Ping timeout: 240 seconds)
16:40:33FromGitter<krux02> When the compiler crashes it's like a happer in the face. No orientation and nothing works anymore.
16:41:11FromGitter<krux02> how do i get proper filenames when the compiler crashes?
16:41:19FromGitter<krux02> (including the path)
16:42:05*floppydh quit (Quit: WeeChat 2.0.1)
17:05:35*Trustable joined #nim
17:16:09*yglukhov quit (Remote host closed the connection)
17:28:02FromGitter<krux02> ok I made a bug report with as much information as I can. I give up on actually fixing the compiler it's too much friction.
17:37:12*jjido joined #nim
17:39:44FromGitter<mratsim> I’m doing my website from scratch and I must say GatsbyJS docs and tutorials are awesome: https://www.gatsbyjs.org/
17:48:01*Vladar quit (Quit: Leaving)
17:55:37*yglukhov joined #nim
17:59:35*yglukhov quit (Ping timeout: 240 seconds)
18:07:05*StarBrilliant quit (Quit: ZNC - http://znc.in)
18:07:41*Vladar joined #nim
18:08:47GitDisc<treeform> Yeah, nim docs could use some better css.
18:09:11FromGitter<krux02> is that important?
18:09:47GitDisc<treeform> Yes design is important. People like prety things.
18:13:59FromGitter<data-man> Why a css? WebGL!
18:14:22GitDisc<treeform> Its hard to render good text in webGL.
18:15:57shashlickhow do you add --threads:on for a nimble package for build/install without having to manually type it out? i.e. "nimble build" implies --threads:on is required for this package
18:17:13*Ven`` joined #nim
18:20:24*Yardanico quit (Remote host closed the connection)
18:21:00*gokr joined #nim
18:22:21dom96The docs css used to be worse... then somebody came along and made a PR :)
18:32:03*kier quit (Remote host closed the connection)
18:33:35*kier joined #nim
18:40:02*jjido quit (Ping timeout: 255 seconds)
18:41:05FromGitter<Yardanico> Hi
18:41:15FromGitter<Yardanico> Sorry wrong msg
18:41:21dom96lol
18:41:46FromGitter<Yardanico> shashlick: create a .nim.cfg or .nims file and add that here
18:44:20*Yardanico joined #nim
18:48:05shashlickYardanico: oh ya, thanks :)
18:48:45Yardanicodom96, I was writing from the phone, and gitter webiste lagged, so my gboard keyboard "autocompleted" my random gestures into "hi" and gitter sent that
18:48:51Yardanico*website
18:51:53*nsf quit (Quit: WeeChat 2.0.1)
18:52:38*xet7 quit (Ping timeout: 255 seconds)
19:00:55*MJCaley joined #nim
19:02:25*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:03:39*devdri joined #nim
19:04:50*xet7 joined #nim
19:13:46*xkapastel joined #nim
19:16:31*Vladar quit (Remote host closed the connection)
19:27:44*xet7 quit (Ping timeout: 255 seconds)
19:41:24*MJCaley quit (Quit: MJCaley)
19:42:28*MJCaley joined #nim
19:45:10avsejAraq, I've seen you were fixing tests, I've got gc category fixed for boehmgc: https://github.com/nim-lang/Nim/pull/7094
19:46:04*xet7 joined #nim
19:46:22*c0ntribut0r joined #nim
19:51:22*Vladar joined #nim
19:56:11Araqavsej: what does that fix?
19:56:16*Ven`` joined #nim
19:56:45*Ven`` quit (Read error: Connection reset by peer)
19:57:05*Ven`` joined #nim
19:57:28avsejthose methods were not running when compiled with boehm gc, how they supposed to work?
19:58:05avsejmaybe travis does not have gc package installed, and it skips the tests?
19:58:14avsejso it remains green
19:58:39avsejbut if you install libgc.so, the ./koch tests category gc will fail
20:04:47*Trustable quit (Remote host closed the connection)
20:12:38*miran_ joined #nim
20:20:28*Yardanico quit (Remote host closed the connection)
20:20:54*xet7 quit (Ping timeout: 256 seconds)
20:29:17*BitPuffin quit (Remote host closed the connection)
20:29:24*yglukhov joined #nim
20:31:53*yglukhov quit (Read error: Connection reset by peer)
20:32:28*yglukhov joined #nim
20:32:29*Kingsquee joined #nim
20:33:51*xet7 joined #nim
20:40:08Araqavsej: travis installs Boehm and tests it
20:40:23Araqbut its boehm doesn't work with --thread:on for some reason
20:40:31Araqit works for me on OSX
20:40:44Araqand I can't test Linux as my Linux VM refuses to boot up
20:41:08avsejon my fedora it does not work without this patch
20:57:04avsejAraq, another fix for tests: https://github.com/nim-lang/Nim/pull/7095, does CI run longgc tests by default?
20:59:32Araqlonggc? I doubt it, doesn't ring any bells
21:01:50*Vladar quit (Quit: Leaving)
21:03:55*marenz_ joined #nim
21:04:08avsejit incorrectly invokes gcc
21:04:31*xet7 quit (Ping timeout: 248 seconds)
21:04:44avsej$ gcc -o tests/realtimeGC/cmain tests/realtimeGC/cmain.c gcc -ldl
21:04:44avsejgcc: error: gcc: No such file or directory
21:04:48avsejsomething like this
21:05:03avsejso there should not be "gcc" in the compiler options
21:07:55avsejand as boehm gc is mark&sweep, the same rules should apply to it like for markAndSweep GC. so https://github.com/nim-lang/Nim/pull/7094 does not look like a hack :)
21:11:41*PMunch quit (Quit: leaving)
21:17:04*xet7 joined #nim
21:17:25livcdYardanico: yes i did it's fine
21:25:23*scriptum quit (Read error: Connection reset by peer)
21:31:45*Kingsquee quit (Ping timeout: 248 seconds)
21:34:29*MJCaley quit (Quit: MJCaley)
21:37:09*miran_ quit (Quit: Konversation terminated!)
21:41:16dom96Araq: Want an account on our VPS to test on Linux?
21:41:52Araqnah
21:48:17*endragor joined #nim
21:53:01*endragor quit (Ping timeout: 256 seconds)
22:03:35*sz0_ joined #nim
22:04:18*sz0_ is now known as sz0
22:06:14*nsf joined #nim
22:15:28*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:18:50*nsf quit (Quit: WeeChat 2.0.1)
22:29:32*Ven`` joined #nim
22:37:57*Ven`` quit (Read error: Connection reset by peer)
22:38:30*Ven`` joined #nim
22:43:30*c0ntribut0r quit (Quit: Quit)
22:53:10*vlad1777d joined #nim
22:54:56*yglukhov quit (Remote host closed the connection)
22:55:13*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:21:03*MJCaley joined #nim
23:36:23*devdri quit ()
23:51:28*wastedone_ quit (Quit: wastedone_)
23:58:01*MJCaley quit (Quit: MJCaley)