<< 22-02-2017 >>

00:00:24*GustavoLapasta quit (Quit: Leaving)
00:05:57zachcarterthis means I need to get the tables API for nuklear working which I was neglecting :/
00:06:00FromGitter<Varriount> zachcarter: Did you solve that problem you ran into yesterday?
00:06:05zachcarterI did
00:06:13zachcartertroubled me all day today
00:06:23zachcarterI’m working on seperating out the bgfx backend code now
00:06:46zachcarter@Varriount : http://imgur.com/a/25d9m that’s nuklear working with the nim-bgfx wrapper
00:07:21zachcarteror bindings rather
00:09:34FromGitter<Varriount> Yay!
00:09:37*brson quit (Quit: leaving)
00:10:53zachcarter:D
00:11:03zachcarterready to build my game engine editor now
00:30:21*dashed quit (Quit: Connection closed for inactivity)
00:48:31*krux02 quit (Remote host closed the connection)
00:58:49*couven92 quit (Quit: Client Disconnecting)
01:33:39*yglukhov joined #nim
01:38:58*yglukhov quit (Ping timeout: 240 seconds)
01:39:28*rauss joined #nim
01:54:51*zama quit (Ping timeout: 252 seconds)
02:52:21*chemist69 quit (Ping timeout: 240 seconds)
03:01:21*ftsf quit (Ping timeout: 240 seconds)
03:06:33*chemist69 joined #nim
03:10:34zachcarterthis ended up being the backend code for the nuklear bgfx stuff - https://gist.github.com/zacharycarter/812dfd135d8a6fb55afdc87d0ab8f447
03:14:23*ftsf joined #nim
03:36:52*yglukhov joined #nim
03:41:17*yglukhov quit (Ping timeout: 260 seconds)
03:44:09*def-pri-pub joined #nim
03:44:57zachcarter@Varriount : http://imgur.com/a/ymgyz
03:48:21*stisa2 quit (Ping timeout: 246 seconds)
03:49:34*stisa2 joined #nim
04:19:08raussThe manual makes it look like drilling down into objects with `foo["bar"]` notation works, but I can't get it to. Do I need to do something special or define a proc first?
04:31:36raussThe place that makes it seem possible in the manual is where it has `js[field]`, in the section on overloading the dot operators.
04:31:49rauss`proc `.` (js: PJsonNode, field: string): JSON = js[field]`
04:32:08*gangstacat joined #nim
04:32:31rausstl;dr: Do objects support subscript notation?
04:38:49*yglukhov joined #nim
04:39:45*def-pri-pub quit (Quit: leaving)
04:43:17*yglukhov quit (Ping timeout: 255 seconds)
04:53:41*chemist69 quit (Ping timeout: 240 seconds)
04:56:40*chemist69 joined #nim
05:02:03ftsfrauss, only if they have a `[]` proc
05:02:37ftsfto access an attribute of an object you use obj.attr
05:03:38raussYeah but I was hoping subscript notation was supported to access properties of which the key is unknown
05:03:57raussIt's a scripting language thing, which of course nim is not.
05:04:04ftsfare you talking specifically about JsonObjects? or Nim Objects?
05:04:10raussnim objects
05:04:26ftsfok, then there should not be properties that are unknown
05:04:50Xeall object properties in nim are known at compile time
05:04:59Xeunless you do some really deep magic which you shouldn't do, you're fine
05:05:59raussI guess "unknown" isn't the right word. if object `foo` has `bar` and `baz`, I was asking if there's a way to say `foo[barOrBaz]`, where `barOrBaz` is a variable
05:06:32raussTo which the answer is no
05:07:36ftsfyeah i'm not aware of a way to do that
05:08:23ftsfyou'd need to have a string lookup table to map it to the appropriate attribute
05:09:28raussYeah. Was just wondering. Thanks guys
05:41:59*shashlick quit (Ping timeout: 260 seconds)
05:42:13*shashlick joined #nim
05:44:28*zachcarter quit (Quit: zachcarter)
05:49:32*jh32 joined #nim
05:57:33*vlad1777d joined #nim
06:06:59FromGitter<Varriount> rauss: For one thing, unless the key is known at compile time (Or the object's fields are all the same type) such an operation isn't type safe.
06:16:10shashlicknre is going into an infinite loop on a findIter() search
06:16:19shashlicknre.nim(521) reFindAll
06:16:24shashlicknre.nim(464) matchImpl
06:17:13shashlickNim 0.16.0 on Windows 32-bit mingw32
06:29:02Araqshashlick: does it always fail for the input/pattern combination?
06:32:15*nsf joined #nim
06:41:29*yglukhov joined #nim
06:43:37*rauss quit (Quit: WeeChat 1.7)
06:48:28*yglukhov quit (Ping timeout: 240 seconds)
06:56:39*stisa2 quit (Ping timeout: 260 seconds)
06:58:36*stisa2 joined #nim
07:14:10FromGitter<dom96> Awesome. Fred's bristech talk is finally live. I can't watch it all now but the start looks good https://m.youtube.com/watch?v=_HeU8yg_WaE :)
07:17:28*ftsf quit (Quit: :q!)
07:39:10*Matthias247 joined #nim
07:51:02*rokups joined #nim
08:06:29*gokr joined #nim
08:18:25*yglukhov joined #nim
08:23:16*stisa2 quit (Ping timeout: 240 seconds)
08:26:16*stisa2 joined #nim
08:37:37*stisa2 quit (Ping timeout: 260 seconds)
08:37:52*stisa2 joined #nim
08:51:39*Trustable joined #nim
09:00:54*stisa2 quit (Ping timeout: 260 seconds)
09:05:16*Arrrr joined #nim
09:05:16*Arrrr quit (Changing host)
09:05:16*Arrrr joined #nim
09:10:42*Learath2 joined #nim
09:20:15*Andris_zbx joined #nim
09:27:21*couven92 joined #nim
09:27:38*stisa2 joined #nim
09:32:24*stisa2 quit (Ping timeout: 260 seconds)
09:32:48*stisa2 joined #nim
09:41:41*stisa3 joined #nim
09:44:28*stisa2 quit (Ping timeout: 240 seconds)
09:48:28*yglukhov quit (Remote host closed the connection)
09:48:46*yglukhov joined #nim
09:55:30*yglukhov quit (Remote host closed the connection)
10:02:54*yglukhov joined #nim
10:12:42*Arrrr quit (Disconnected by services)
10:12:42*Arrrr1 joined #nim
10:19:16Learath2can base64 work on an array of byte?
10:26:00*zevlg quit (Remote host closed the connection)
10:28:26*Trustable quit (Remote host closed the connection)
10:57:09*Arrrr1 quit (Quit: Leaving.)
10:57:35*Arrrr joined #nim
11:22:31*stisa3 quit ()
11:29:54*Vladar joined #nim
11:30:34*yglukhov quit (Remote host closed the connection)
11:30:46*allan0 quit (Quit: no)
11:30:59*bjz joined #nim
11:31:25*bjz quit (Client Quit)
11:32:20*bjz joined #nim
11:34:10*yglukhov joined #nim
11:35:19*allan0 joined #nim
11:38:28*yglukhov quit (Ping timeout: 240 seconds)
11:43:00*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
11:46:17*chemist69 quit (Ping timeout: 255 seconds)
11:46:28*bjz joined #nim
11:49:01*chemist69 joined #nim
11:50:48*crem joined #nim
12:00:46*krux02 joined #nim
12:14:01*zama joined #nim
12:17:33*niv joined #nim
12:18:39*yglukhov joined #nim
12:26:25*bjz_ joined #nim
12:27:28*bjz quit (Ping timeout: 240 seconds)
12:29:55*yglukhov quit (Remote host closed the connection)
12:38:06*ludocode quit (Quit: No Ping reply in 180 seconds.)
12:38:54*gsingh93 quit (Ping timeout: 252 seconds)
12:39:30*ludocode joined #nim
12:41:56*gsingh93 joined #nim
12:59:41*crem quit (Ping timeout: 240 seconds)
13:00:05*nhywyll joined #nim
13:00:11*bjz joined #nim
13:01:17*bjz_ quit (Ping timeout: 260 seconds)
13:03:46*zachcarter joined #nim
13:04:37*Yaiyan quit (Ping timeout: 252 seconds)
13:04:37*RushPL quit (Quit: No Ping reply in 180 seconds.)
13:05:40*RushPL joined #nim
13:05:46*yaiyan joined #nim
13:06:54*yglukhov joined #nim
13:11:01*rokups quit (Ping timeout: 240 seconds)
13:14:00*gokr quit (Ping timeout: 268 seconds)
13:14:36*rokups joined #nim
13:14:38*athie quit (Quit: No Ping reply in 180 seconds.)
13:15:54*athie joined #nim
13:19:44*yglukhov quit (Remote host closed the connection)
13:31:39*yglukhov joined #nim
13:35:46*yglukhov quit (Ping timeout: 240 seconds)
13:36:24*Frozenlynx joined #nim
13:40:49*nhywyll quit (Quit: nhywyll)
13:47:08*Frozenlynx left #nim ("AndroIRC")
13:48:01*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:58:27*gokr joined #nim
14:06:32*UxerUospr joined #nim
14:11:33*zachcarter quit (Quit: zachcarter)
14:27:43*yglukhov joined #nim
14:35:41enthus1astniv: i just saw that you have pulled in some changes to websocket/client
14:36:42enthus1asti've got a thing, to use the client i had to change "\r\n" to just "\n" on sending
14:37:17enthus1astwhen i tried this like it is right now even the examples are not working
14:38:33enthus1astand maybe the newAsyncWebsocket should understand the commcon "ws://foo.baa" uri?
14:42:10*rokups quit (Quit: Connection closed for inactivity)
14:49:41*chemist69 quit (Ping timeout: 240 seconds)
14:50:22*rokups joined #nim
14:50:35*chemist69 joined #nim
14:50:53*rauss joined #nim
14:51:25niventhus1ast: all valid points, but all i did was click merge on a PR i got that looked fine. i will have to revisit that library soon and polish it, as it got a bunch of issues
14:51:47nivi'll put it on the list, thanks for pointing that out
14:55:28niventhus1ast: can you explain to me what you mean by \r\n not working? because the example works fine for me.
14:58:07*rauss quit (Quit: WeeChat 1.7)
14:59:06*rauss joined #nim
15:00:07cheatfateguys \r\n is wrong combination for nim
15:00:13cheatfate\c\L
15:00:36cheatfate\n is two bytes on windows and 1 byte on unixes
15:01:10nivthat'd be why it wont work on windows then, i guess.
15:01:13nivthanks.
15:04:11*crem joined #nim
15:09:25enthus1astniv
15:09:34enthus1asti will create a pr in a few moments
15:09:43*crem left #nim (#nim)
15:10:54enthus1astcheatfate: \n should work fine here?
15:11:14enthus1astor better use \c\L ?
15:11:21*xet7 joined #nim
15:11:28cheatfatebetter use \c\L to avoid any problems
15:11:33enthus1astk
15:14:09AraqI wonder if it's feasible to map \n to \L on Windows too these days
15:14:45Araqevery tool understands it except maybe the batch command interpreter
15:15:33*zachcarter joined #nim
15:15:44enthus1asti whish there where a fixBatchQuirks()
15:20:52*nsf quit (Quit: WeeChat 1.7)
15:21:54Araqactually for the bat file generation we use \c\L so that compiling on Linux produces a valid batch file anyway
15:22:16Araqso for Nim itself it shouldn't cause any problems
15:22:28*gokr quit (Ping timeout: 240 seconds)
15:22:52Araqproc writeln(s: string) = write(s); write("\n")
15:23:29Araqwould need to be changed though
15:27:44*surge-protect joined #nim
15:27:54surge-protectHello
15:28:04surge-protectis there an error in the examples code here: https://nim-lang.org/docs/asynchttpserver.html
15:28:25surge-protectI get this error: server.nim(9, 15) Error: undeclared identifier: '%*'
15:28:37surge-protectfor this line: let msg = %* {"message": "Hello World"}
15:28:53cheatfatesurge-protect, add `import json` to the beginning of your server.nim
15:30:20surge-protectcheatfate: thank you
15:37:27surge-protectWhich async client lib can I use to test my async server?
15:37:49FromGitter<andreaferretti> just `httpclient`
15:38:14FromGitter<andreaferretti> it has both syn and async implementations
15:41:16surge-protectis there an example of an async proc that makes x-thousand simultaneous requests ?
15:41:20cheatfatesurge-protect, if you want to benchmark your server, use `wrk`
15:42:05cheatfatesurge-protect, https://github.com/wg/wrk if you dont have package for your OS
15:43:41surge-protect@cheatfate are there any other OS-level options instead of wrk ? Using Ubuntu
15:44:30cheatfateApache Benchmark and wrk is everything i know :(
15:44:49nivwrk is great and its in apt, just one command away
15:45:19surge-protectaah if it's in apt, that works for me
15:45:26surge-protectapt install wrk ?
15:46:40nivthats the one
15:46:40surge-protectit's not in apt
15:46:48surge-protecthttps://github.com/wg/wrk/wiki/Installing-Wrk-on-Linux
15:46:55nivapt-cache show wrk
15:46:55nivPackage: wrk
15:46:55nivPriority: optional
15:46:55nivSection: universe/web
15:47:30surge-protectPPA ? niv
15:47:41nivno, just universe
15:47:46nivat least for me :p
15:48:33surge-protectwhich distro and version? niv
15:49:02nivim on ubuntu xenial (elementary os actually)
15:51:51enthus1astthink that should be it niv
16:01:31niventhus1ast: thanks, will have to have a look later. something that keeps me busy came up
16:02:06enthus1astniv: its like always : )
16:02:10*zama quit (Quit: leaving)
16:05:16*zama joined #nim
16:15:28federico3wrk is in Debian Testing and therefore in Xenial, Yakkety and Zesty
16:18:44*zama quit (Quit: Lost terminal)
16:19:39*zama joined #nim
16:27:16*zachcarter quit (Read error: Connection reset by peer)
16:35:57*gokr joined #nim
16:37:11surge-protectcheatfate: do you have a wrk example I can use to stress-test my nim async http-server
16:37:38cheatfate./wrk http://127.0.0.1:80
16:38:00enthus1astsurge-protect: if you have apache installed there should be a tool called `ab`
16:38:14enthus1astah
16:38:31surge-protectbut how do I test the async functionality?
16:39:44enthus1ast" -c concurrency Number of multiple requests to make
16:40:00enthus1astfor "ab" at least
16:40:18cheatfatesurge-protect, by default wrk will use 2 threads and 10 concurrent connections
16:40:41surge-protectc9 ?
16:41:09surge-protectokay I understand now: https://www.digitalocean.com/community/tutorials/how-to-benchmark-http-latency-with-wrk-on-ubuntu-14-04
16:41:17surge-protectthank you cheatfate and enthus1ast
16:41:34Araqjust keep in mind you will be rich long before async performance becomes an issue :P
16:42:09surge-protectAraq: i'm definitely not prematurely scaling :P I just want to test async nim against async python
16:42:34Araq"prematurely scaling" nice term.
16:46:05*Andris_zbx quit (Remote host closed the connection)
16:47:37*yglukhov quit (Remote host closed the connection)
16:50:25*yglukhov joined #nim
16:51:21*nsf joined #nim
16:53:02surge-protectcheatfate: what do you think of these results: https://www.zerobin.net/?f213a12ffc46c3e4#S2+yXsiRpAL7D+j9h0h5qf02iCWyDP39NYvY0Fx24mU=
16:53:37*brson joined #nim
16:54:05*chemist69 quit (Ping timeout: 255 seconds)
16:55:34cheatfatesurge-protect, do you run tests inside VM?
16:56:08surge-protectcheatfate: yes and no. I ran both the wrk and server in separate containers
16:56:18surge-protecton the same machine though
16:56:28cheatfatesurge-protect, it doesn't matter your container network is too slow
16:56:37cheatfatesurge-protect, my tests in vmware workstation
16:56:45cheatfateon simple `Hello World` output
16:57:02cheatfateis much better then yours
16:57:42cheatfateand which python framework you want to test against nim async?
16:57:50surge-protecthow much better? cheatfate
16:57:57surge-protectasynchttp
16:58:05cheatfateyou mean aiohttp?
16:58:22surge-protectyes, sorry. aio , not asynchttp
16:58:29*chemist69 joined #nim
16:59:05cheatfateon simple plain text output nim is faster like 10x times
17:00:43cheatfate`https://github.com/squeaky-pl/japronto` - this python framework will be faster for plain text output
17:01:06surge-protectI wonder why my network is so slow between 2 containers. Unless they are competing for the resources aggressively
17:03:36cheatfatesurge-protect, i dont know never used containers, but container is light vm, so maybe your PC is much slower then mine
17:04:17surge-protectthat too, most likely
17:06:23*freevryheid joined #nim
17:06:31*freevryheid is now known as fvs
17:11:18*zachcarter joined #nim
17:12:01surge-protectcheatfate: maybe this is also why it went slow: wrk -t2 -c5 -d5s --timeout 2s http://[IP]:9000/hello-world ... I have a timeout there
17:13:09cheatfatemaybe
17:34:46*Trustable joined #nim
17:35:52*yglukhov quit (Remote host closed the connection)
17:36:58nivAraq: you had a mingw compiler for win32 prepackaged somewhere on the web page?
17:41:47dom96niv: http://nim-lang.org/download/mingw32.zip
17:43:19*yglukhov joined #nim
17:46:10*elrood joined #nim
17:59:49*nsf quit (Quit: WeeChat 1.7)
17:59:50surge-protectare there more examples of asynchttpserver somewhere?
18:02:10*rokups quit (Quit: Connection closed for inactivity)
18:07:39*yglukhov quit (Remote host closed the connection)
18:09:24*yglukhov joined #nim
18:12:33fvshi, trying to sort a seq of vectors (x,y) in a polygon (p) based on their distance from the centroid. Any suggestions to make this work. I have:
18:12:36fvsp.sort(proc(x,y: float): int = cmp(vdist(x[0],c), vdist(y[0],c)))
18:15:44*surge-protect quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
18:18:56TrustableHi all, I have a problem: my program behaves different, depending whether I call my main proc after the definition of the main proc or before it (after fordward declaration). Any ideas what the reason could be?
18:19:08*gokr quit (Ping timeout: 255 seconds)
18:21:13dom96Trustable: no idea, but can you create a small sample that reproduces this problem?
18:21:38dom96fvs: In what way does that not work?
18:21:52Trustableit's a bit complicated, I would like to share my screen to you.
18:22:14Xewhat do you mean by "behaves different"?
18:24:17TrustableTo be more precise: I'm developing a GUI library, which is based on Gtk3 and WinAPI. If I call the main proc after, everything works, if I call it before the definition, the controls are not shown. This is very strange and confuses me hard.
18:27:35*yglukhov quit (Remote host closed the connection)
18:36:29TrustableMaybe I have uninitialized memory somewhere, which could be the reason for inexplicable behavior.
18:37:19fvsdom96, I guess the better question would be what the x & y in the cmp function represent when trying to sort a seq of vectors based on their distance from a centroid.
18:40:01dom96fvs: The `x & y`?
18:40:48fvscmp: proc (x, y: T)
18:42:16*elrood quit (Quit: Leaving)
18:42:48*butchster quit ()
18:48:02*yglukhov joined #nim
18:56:25subsetparkx and y would each be vectors
18:56:31*butchster joined #nim
18:56:38subsetparkso `cmp` would compare their respective distances
18:58:56dom96fvs: two elements from `p`
19:03:55*yglukhov quit (Remote host closed the connection)
19:05:44fvsThanks - ok, I think I understand. I'll need to sort distances first and then sort the vectors based on this sort.
19:23:16*couven92 quit (Quit: Client disconnecting)
19:38:31Learath2is there a lib with pbkdf2?
19:38:48Learath2i guess any key derivation function would work
19:46:57fvsgot it to work :) FTR: P.sort(proc(x, y: Vect): int = cmp(x.cdist(c), y.cdist(c))) # where cdist is helper func return distance to centroid
19:50:42dom96Learath2: Nothing in nimble AFAICS
19:51:00*nsf joined #nim
19:51:19Learath2dom96: thanks, ill just hack one together for prototyping and wrap a lib later
20:01:48*bjz joined #nim
20:07:24*krux02 quit (Remote host closed the connection)
20:18:15*adeohluwa joined #nim
20:19:00*adeohluwa quit (Remote host closed the connection)
20:22:50*GustavoLapasta joined #nim
20:29:39*krux02 joined #nim
20:31:25*Arrrr quit (Read error: Connection reset by peer)
20:49:04*brson quit (Ping timeout: 260 seconds)
20:53:36*brson joined #nim
21:02:43*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:20:43*bjz joined #nim
21:30:21*zachcarter quit (Ping timeout: 240 seconds)
21:31:53*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:41:09*brson quit (Ping timeout: 260 seconds)
21:49:46*Vladar quit (Remote host closed the connection)
21:49:57*couven92 joined #nim
21:51:43*UxerUospr quit (Quit: Lost terminal)
22:08:11*brson joined #nim
22:08:37*gokr joined #nim
22:12:51*rauss quit (Quit: WeeChat 1.7)
22:14:50*fvs left #nim ("leaving")
22:18:58*Seannachie_ quit (Remote host closed the connection)
22:26:10*nsf quit (Quit: WeeChat 1.7)
22:48:10*vlad1777d quit (Remote host closed the connection)
23:12:10*rainrawr_ quit (Remote host closed the connection)
23:12:52*GustavoLapasta quit (Quit: Leaving)
23:16:29*gokr quit (Ping timeout: 268 seconds)
23:21:46*brson quit (Ping timeout: 240 seconds)
23:24:22*brson joined #nim
23:31:08*Trustable quit (Remote host closed the connection)
23:32:20*Matthias247 quit (Ping timeout: 255 seconds)
23:33:19*Matthias247 joined #nim