00:12:45 | * | fredrik92 quit (Quit: Client disconnecting) |
00:26:43 | * | irrequietus quit () |
00:46:32 | * | dddddd quit (Remote host closed the connection) |
00:53:26 | * | libman quit (Remote host closed the connection) |
01:04:42 | * | chemist69 quit (Ping timeout: 250 seconds) |
01:16:33 | FromGitter | <mraxilus> nor I most of the time, with the bridges to IRC on most servers, It's mostly just a fancier front end with a bunch of other benefits not limited to voice |
01:16:51 | FromGitter | <mraxilus> but that's okay, I can just open up gitter for nim related things |
01:17:31 | FromGitter | <mraxilus> just would've been convenient if there was a bridge already. |
01:18:21 | FromGitter | <mraxilus> also, @libman are you a lesswronger by any change? |
01:25:48 | * | chemist69 joined #nim |
01:25:59 | * | yglukhov joined #nim |
01:30:30 | * | yglukhov quit (Ping timeout: 244 seconds) |
02:10:51 | * | ibk joined #nim |
02:18:35 | * | chrisheller joined #nim |
02:25:00 | * | brson quit (Quit: leaving) |
02:48:23 | * | kulelu88 quit (Quit: Leaving) |
03:37:33 | * | yglukhov joined #nim |
03:42:00 | * | yglukhov quit (Ping timeout: 250 seconds) |
04:07:15 | * | sarlalian joined #nim |
04:38:35 | ibk | is there an example to use `to` from marshal module? |
04:38:36 | ibk | I tried this code: |
04:38:36 | ibk | var user: User |
04:38:36 | ibk | user = to(req.body) |
04:38:36 | ibk | but i got "Error: cannot instantiate: 'T'" |
04:39:15 | ibk | type of req.body is string |
04:47:19 | * | HakanD__ joined #nim |
05:04:34 | Araq | to[User](req.body) |
05:23:04 | * | HakanD__ quit (Quit: Be back later ...) |
05:23:36 | * | HakanD__ joined #nim |
05:28:26 | * | HakanD__ quit (Ping timeout: 265 seconds) |
05:39:24 | * | yglukhov joined #nim |
05:43:45 | * | yglukhov quit (Ping timeout: 252 seconds) |
05:52:42 | ibk | Araq : thanks, but why the example in http://nim-lang.org/docs/tut2.html#generics don't need the `[User]`? |
05:59:02 | ibk | which one we should use to marshal an object into JSON string. using `marshal` module or `json` module? Both module work fine for my case |
05:59:05 | FromGitter | <endragor> @ibk: the generic params in those examples can be inferred from the context. in your case the compiler has no idea what you’re trying to deserialize the string into, so you have to tell it |
06:01:39 | FromGitter | <endragor> hmm, actually, it can potentially be inferred in your case, too, since there is user on the left. not sure then :) |
06:02:34 | ibk | marshal module is easier, i wonder if this ease comes with price |
06:05:29 | * | nsf joined #nim |
06:35:46 | * | Arrrr joined #nim |
06:46:54 | flyx | allowing to derive the generic type from the variable that the result is being assigned to would make the grammar undecidable. |
06:56:38 | * | Andris_zbx joined #nim |
07:04:52 | * | irrequietus joined #nim |
07:10:48 | * | ftsf_ quit (Quit: :q!) |
07:12:18 | * | GustavoLapasta joined #nim |
07:20:46 | * | HakanD__ joined #nim |
07:38:24 | * | yglukhov joined #nim |
07:39:02 | * | Trustable joined #nim |
07:39:29 | * | yglukhov quit (Remote host closed the connection) |
07:39:45 | * | yglukhov joined #nim |
07:39:49 | * | yglukhov quit (Remote host closed the connection) |
07:40:51 | * | yglukhov joined #nim |
07:48:31 | * | brechtm joined #nim |
08:05:02 | * | HakanD__ quit (Ping timeout: 250 seconds) |
08:07:26 | * | HakanD___ joined #nim |
08:10:16 | * | eizua joined #nim |
08:16:20 | * | vendethiel quit (Ping timeout: 256 seconds) |
08:23:01 | * | fredrik92 joined #nim |
08:23:17 | * | couven92 joined #nim |
08:23:34 | * | fredrik92 quit (Remote host closed the connection) |
08:26:35 | * | couven92 is now known as fredrik92 |
08:45:46 | * | M-Quora quit (Write error: Connection reset by peer) |
08:45:47 | * | jivank[m] quit (Write error: Connection reset by peer) |
08:45:47 | * | ehmry quit (Write error: Connection reset by peer) |
08:45:47 | * | zielmicha[m] quit (Write error: Connection reset by peer) |
08:45:47 | * | hohlerde quit (Write error: Broken pipe) |
08:45:47 | * | TheManiac quit (Write error: Connection reset by peer) |
08:56:25 | * | PMunch joined #nim |
08:58:32 | * | zielmicha[m] joined #nim |
09:01:32 | * | irrequietus quit () |
09:01:39 | * | irrequietus joined #nim |
09:03:55 | yglukhov | Is there an easy way to switch to upcoming asyndispatch? |
09:04:49 | * | HakanD___ quit (Quit: Be back later ...) |
09:07:47 | * | M-Quora joined #nim |
09:07:47 | * | jivank[m] joined #nim |
09:07:47 | * | ehmry joined #nim |
09:07:54 | * | hohlerde joined #nim |
09:07:54 | * | TheManiac joined #nim |
09:09:51 | FromGitter | <endragor> @yglykhov create `config.nims` with this line: ⏎ patchFile("stdlib", "asyncdispatch", "$lib/upcoming/asyncdispatch") |
09:24:28 | * | bjz joined #nim |
09:45:19 | * | irrequietus quit () |
09:45:25 | * | irrequietus_ joined #nim |
09:45:45 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:49:15 | * | irrequietus_ quit (Client Quit) |
09:49:21 | * | irrequietus_ joined #nim |
09:51:06 | * | irrequietus_ quit (Client Quit) |
09:51:25 | * | irrequietus joined #nim |
10:02:30 | yglukhov | endragor: where do i place this config? |
10:03:26 | FromGitter | <endragor> in the dir with the main module |
10:03:28 | * | bjz joined #nim |
10:04:05 | FromGitter | <endragor> it should be picked up wherever `nim.cfg` gets picked up afaik |
10:09:10 | cheatfate | yglukhov, you can put it in your project directory, `config.nims` - asyncdispatch patch will be applied for all files in directory, 'somename.nims' - asyncdispatch patch will be applied for `somename.nim` file only |
10:10:09 | yglukhov | endragor, cheatfate: cool, thanks |
10:11:08 | * | HakanD___ joined #nim |
10:14:02 | cheatfate | yglukhov, why you switching? |
10:14:44 | yglukhov | cheatfate: just want to make sure im ready =)) |
10:15:43 | cheatfate | yglukhov, i don't believe it replaces current asyncdispatch in future |
10:16:17 | yglukhov | cheatfate: what? why? oO |
10:16:55 | cheatfate | i think everybody likes `upcoming` :) |
10:17:32 | yglukhov | cheatfate: err... is that a joke or smth? =) |
10:17:34 | Araq | we can remove the one in lib/pure |
10:17:52 | Araq | and keep it in upcoming forever so people don't have to adapt their configs |
10:18:21 | yglukhov | why not just switch to it altogether? does it break anything? |
10:20:44 | cheatfate | yglukhov, upcoming asyncdispatch is more pure, then current, so it can cause errors/exceptions if your code uses some current asyncdispatch hacks |
10:21:13 | cheatfate | or doing something really wrong |
10:21:20 | cheatfate | this is only difference |
10:21:33 | Araq | yglukhov: yeah, I'm kidding, we'll switch properly |
10:21:52 | Araq | once we tested Nim forum and stuff with upcoming |
10:22:17 | yglukhov | cool. is nim forum using upcoming already? |
10:22:53 | cheatfate | yglukhov, i dont think so :) |
10:33:19 | * | bjz_ joined #nim |
10:34:23 | * | bjz quit (Ping timeout: 265 seconds) |
10:43:54 | * | GustavoLapasta quit (Quit: Leaving) |
10:46:39 | * | Arrrr quit (Quit: WeeChat 1.5) |
10:49:38 | * | chemist69 quit (Ping timeout: 245 seconds) |
10:52:03 | * | chemist69 joined #nim |
11:02:05 | * | Snircle joined #nim |
11:31:01 | * | yglukhov_ joined #nim |
11:31:20 | * | brechtm_ joined #nim |
11:32:53 | * | brechtm_ quit (Remote host closed the connection) |
11:34:06 | * | yglukhov quit (Ping timeout: 256 seconds) |
11:34:16 | * | brechtm_ joined #nim |
11:34:46 | * | brechtm quit (Ping timeout: 250 seconds) |
11:41:42 | * | eizua quit (Quit: Leaving) |
11:49:23 | * | yglukhov_ quit (Read error: Connection reset by peer) |
11:49:47 | * | yglukhov joined #nim |
12:00:59 | * | elrood joined #nim |
12:23:08 | * | brechtm joined #nim |
12:26:53 | * | brechtm_ quit (Ping timeout: 260 seconds) |
12:43:43 | * | PMunch quit (Ping timeout: 252 seconds) |
12:54:04 | * | chemist69 quit (Ping timeout: 250 seconds) |
12:54:29 | * | chemist69 joined #nim |
12:56:36 | * | PMunch joined #nim |
12:58:08 | * | ibk quit (Quit: Connection closed for inactivity) |
13:09:05 | * | chrisheller quit (Remote host closed the connection) |
13:30:38 | djellemah | I need to walk the ast of a SQL statement from parsesql module. Is there a better way than |
13:30:39 | djellemah | case node.kind of nkIdent, nkStringLit, nkBitStringLit, nkHexStringLit, nkIntegerLit, nkNumericLit: |
13:30:43 | djellemah | TIA |
13:32:40 | Araq | djellemah: you can use set literals or case statements |
13:38:32 | * | desophos quit (Read error: Connection reset by peer) |
13:51:08 | * | fvs joined #nim |
13:51:57 | * | fvs left #nim (#nim) |
13:58:51 | * | freevryheid joined #nim |
13:59:03 | * | freevryheid is now known as fvs |
13:59:31 | fvs | can someone have a look at this please: http://pastebin.com/LJPktu1U |
13:59:57 | fvs | not sure why outputting 9's and not 0,2,4,6,8 |
14:17:10 | * | stisa joined #nim |
14:20:19 | chemist69 | fvs: for i in 0..9: |
14:20:22 | chemist69 | new c |
14:20:24 | chemist69 | a.add(c) |
14:20:56 | chemist69 | Other all the added c's point to the same object |
14:21:01 | chemist69 | *Otherwise |
14:22:56 | * | yglukhov quit (Read error: Connection reset by peer) |
14:23:09 | * | yglukhov joined #nim |
14:24:24 | chemist69 | also, you can use object instead of ref object when you use this line: |
14:24:32 | chemist69 | for i,j in a.mpairs: |
14:29:18 | cheatfate | fvs, first of all `mod` operation on floats its absurd |
14:29:24 | * | HakanD___ quit (Quit: Be back later ...) |
14:29:54 | * | ibk joined #nim |
14:30:00 | * | HakanD___ joined #nim |
14:30:43 | cheatfate | fvs, oops sorry |
14:32:14 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:32:54 | * | bjz joined #nim |
14:34:18 | * | HakanD___ quit (Ping timeout: 256 seconds) |
14:49:38 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:49:52 | * | stisa quit (Ping timeout: 260 seconds) |
14:58:05 | * | chemist69 quit (Ping timeout: 260 seconds) |
15:02:14 | * | chemist69 joined #nim |
15:02:35 | * | fredrik92 quit (Read error: Connection reset by peer) |
15:19:40 | fvs | thanks chemist69 ! |
15:22:27 | * | nsf quit (Quit: WeeChat 1.5) |
15:24:00 | yglukhov | Have i seen staticExecEx (that returns exit code along with output) anywhere or was it a dream? |
15:28:13 | * | HakanD___ joined #nim |
15:29:28 | * | irrequietus quit (Ping timeout: 260 seconds) |
15:34:42 | * | PMunch quit (Quit: leaving) |
15:35:05 | * | fvs left #nim ("ERC (IRC client for Emacs 25.1.1)") |
15:41:30 | * | brson joined #nim |
15:42:39 | * | brechtm quit (Read error: Connection reset by peer) |
15:42:47 | * | brechtm_ joined #nim |
15:44:46 | * | pregressive joined #nim |
15:54:37 | * | irrequietus joined #nim |
15:57:16 | * | fredrik92 joined #nim |
15:58:35 | * | Andris_zbx quit (Remote host closed the connection) |
16:07:30 | * | yglukhov quit (Ping timeout: 250 seconds) |
16:08:15 | * | yglukhov joined #nim |
16:08:57 | * | yglukhov quit (Read error: Connection reset by peer) |
16:09:18 | * | yglukhov joined #nim |
16:13:52 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:31:01 | * | jjido joined #nim |
16:32:16 | * | nsf joined #nim |
16:38:09 | * | ibk quit (Quit: Connection closed for inactivity) |
16:39:02 | * | pie_ joined #nim |
16:52:00 | * | await quit (Read error: Connection reset by peer) |
16:53:27 | * | elrood quit (Quit: Leaving) |
16:54:10 | * | brechtm_ quit (Remote host closed the connection) |
16:57:02 | * | pie_ quit (Quit: Leaving) |
16:57:10 | * | jjido quit (Ping timeout: 250 seconds) |
16:58:56 | * | yglukhov joined #nim |
16:59:16 | * | SunDwarf joined #nim |
17:02:06 | * | elrood joined #nim |
17:02:58 | * | yglukhov quit (Ping timeout: 245 seconds) |
17:03:27 | * | Matthias247 joined #nim |
17:14:44 | * | Trustable quit (Remote host closed the connection) |
17:56:42 | * | nsf quit (Quit: WeeChat 1.5) |
18:07:00 | * | yglukhov joined #nim |
18:22:14 | * | gangstacat quit (Quit: Ĝis) |
18:22:32 | * | chemist69 quit (Ping timeout: 250 seconds) |
18:23:18 | * | gangstacat joined #nim |
18:24:25 | * | brechtm joined #nim |
18:26:44 | * | chemist69 joined #nim |
18:31:54 | * | djellemah_ joined #nim |
18:40:30 | * | dddddd joined #nim |
18:52:09 | * | irrequietus quit (Read error: Connection reset by peer) |
18:52:19 | * | irrequietus joined #nim |
19:10:09 | * | brechtm quit (Remote host closed the connection) |
19:16:17 | * | GustavoLapasta joined #nim |
19:22:57 | * | jh32 joined #nim |
19:23:16 | * | libman joined #nim |
19:24:09 | * | rudi_s joined #nim |
19:24:22 | * | Demon_Fox joined #nim |
19:29:34 | * | brechtm joined #nim |
19:30:59 | * | brechtm quit (Remote host closed the connection) |
19:38:41 | * | brechtm joined #nim |
19:39:27 | * | brechtm_ joined #nim |
19:41:13 | * | allan0_ quit (Quit: no) |
19:42:58 | * | brechtm quit (Ping timeout: 245 seconds) |
19:44:15 | * | allan0 joined #nim |
19:45:06 | * | Jesin quit (Quit: Leaving) |
19:47:40 | * | Jesin joined #nim |
19:59:02 | * | brechtm_ quit (Remote host closed the connection) |
20:07:51 | * | nsf joined #nim |
20:22:12 | * | brechtm joined #nim |
20:30:54 | jh32 | hi |
20:31:25 | * | chemist69 quit (Ping timeout: 256 seconds) |
20:32:01 | * | brechtm quit (Remote host closed the connection) |
20:32:51 | Araq | hi |
20:33:24 | * | chemist69 joined #nim |
20:34:27 | jh32 | is it possible to have something like an array of static[int] as type parameter, i.e: var m: MyType[[1,2,3]] ? |
20:35:28 | * | djellemah_ quit (Ping timeout: 245 seconds) |
20:37:06 | Araq | good question. I think static[T] is mostly tested with ints |
20:37:12 | jh32 | i'm thinking about how one would model the Network class from https://github.com/mnielsen/neural-networks-and-deep-learning/blob/master/src/network.py in nim |
20:37:58 | jh32 | if that would be possible one could have all the matrices statically sized |
20:38:43 | Araq | I fail to see the connection |
20:40:22 | Araq | the Python code doesn't seem to require such a thing |
20:41:19 | jh32 | the Python code does it all dynamically which would be possible with seq's in nim, but array would be cooler, no? |
20:45:22 | jh32 | these np.random.randn() calls in __init__() create arrays with dimensions depending on the compile time available sizes array |
20:46:54 | jh32 | maybe it's more pragmatic to use seq |
20:48:46 | Araq | I usually use a flat seq, not a nested seq and do the indexing arithmetic on my own y*row+x |
20:49:18 | Araq | served me well and you can cheat and use a single for loop for when the dimensions don't matter |
20:49:30 | Araq | which can happen quite often. |
20:51:28 | jh32 | i'll try that, thanks |
20:52:10 | * | bjz joined #nim |
20:56:34 | * | gokr joined #nim |
21:03:47 | * | fredrik92 quit (Read error: Connection reset by peer) |
21:20:14 | * | HakanD___ quit (Quit: Be back later ...) |
21:20:49 | * | HakanD___ joined #nim |
21:22:50 | * | Trustable joined #nim |
21:25:02 | * | HakanD___ quit (Ping timeout: 244 seconds) |
21:28:22 | * | GustavoLapasta quit (Quit: Leaving) |
21:28:46 | dyce | i am curious if using nim to control gnu libmicrohttpd would make any sense |
21:29:45 | dyce | not control, but create a DSL to interface with libmicrohttpd |
21:30:16 | Araq | makes sense to me and sounds interesting :-) |
21:38:07 | * | nsf quit (Quit: WeeChat 1.5) |
21:43:49 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:45:36 | dyce | Araq: i'll start looking into it. libmicrohttpd i assume is the best performing library for web? |
21:46:23 | * | bjz joined #nim |
21:46:38 | Araq | sure it contains 'lib' and 'micro', what could possibly be faster? |
21:47:22 | ldlework | libnanohttpd obviously |
21:48:42 | Araq | no idea why never ending cascades of 'if (err) goto error' in C land are considered the "fastest way to program things", but then C programmers live in their own world anyway |
21:49:18 | * | bjz quit (Client Quit) |
21:51:11 | Araq | ldlework: lol |
21:51:51 | dom96 | Don't forget about https://github.com/h2o/picohttpparser |
21:55:34 | def- | Araq: because branch prediction works well for those? |
21:56:46 | Araq | that's more code bloat than proper exceptions and your icache is not as effective as it could be |
22:12:16 | * | Trustable quit (Remote host closed the connection) |
22:18:01 | cheatfate | dyce, i dont think this library is the best performing... looks like it knows only `epoll` and nothing more... |
22:20:14 | dyce | cheatfate: https://github.com/nanoant/WebFrameworkBenchmark , looks like Kore is faster https://kore.io/ |
22:25:37 | dom96 | what are you writing that needs to give such fast responses? |
22:28:18 | cheatfate | dyce, all this benchmarks are piece of shit and there so many `semi official` benchmarks and i think even more `official` benchmarks which put one framework to be better then others... |
22:28:57 | dyce | cheatfate: true |
22:29:30 | cheatfate | dyce, as i said before libmicrohttpd knows only `epoll` so run same benchmark on freebsd/macos/openbsd/netbsd/xxxbsd which uses `kqueue` and libmicrohttpd will be in last positions |
22:29:42 | cheatfate | i think maybe a little better then apache |
22:31:40 | cheatfate | and about Kore, looks like it knows `kqueue` and `epoll` but knows nothing about `eventports` and `completion ports`... so benchmark it on windows and solaris to get `true` results :) |
22:32:59 | dom96 | I tried to reproduce these benchmark multiple times now and I still cannot. |
22:33:34 | dom96 | I am probably doing something wrong, but the more I think about it the more useless these benchmarks seem. |
22:35:42 | dom96 | nimforum is working perfectly well and it's not even running in release mode. |
22:36:02 | dom96 | but I'm curious about your use case anyway |
22:37:45 | * | chemist69 quit (Ping timeout: 260 seconds) |
22:42:05 | * | chemist69 joined #nim |
22:52:37 | dyce | dom96: its more ocd :) |
22:55:13 | dyce | or novelty |
22:57:30 | dom96 | then test asynchttpserver vs kore yourself, it's likely that your results will be different |
22:57:36 | * | ftsf_ joined #nim |
22:57:43 | dom96 | it will be interesting to see anyway :) |
22:57:45 | dom96 | good night |
22:58:11 | * | pregressive quit (Remote host closed the connection) |
22:58:27 | ftsf_ | o/ morning |
23:15:47 | * | dddddd quit (Remote host closed the connection) |
23:17:16 | * | irrequietus quit () |
23:22:01 | * | HakanD___ joined #nim |
23:26:24 | * | HakanD___ quit (Ping timeout: 260 seconds) |
23:30:08 | * | elrood quit (Quit: Leaving) |
23:33:36 | * | sp33der89 joined #nim |
23:35:04 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:35:31 | * | bjz joined #nim |
23:38:24 | * | bjz quit (Client Quit) |