<< 18-12-2015 >>

00:11:07*Matthias247 quit (Read error: Connection reset by peer)
00:12:16*nicktick joined #nim
00:18:26onionhammerAraq ive never heard of firebase
00:18:30*jaco60 quit (Ping timeout: 260 seconds)
00:18:55onionhammerwhy?
00:20:14Araqcause I wonder how to understand JavaScript crap that ultimately seems to build upon websockets
00:20:20onionhammerit looks like some sort of db as a service thing
00:20:51Araqthere is no other way to get a PUSH protocol in the browser, right?
00:20:52onionhammerwebsockets arent too complicated.. simple message oriented protocol on top of TCP
00:21:02onionhammerthere are a couple protocols
00:21:07onionhammerweb RTC is another one
00:21:17onionhammeror long polling
00:21:34onionhammerwhere u basically just keep a GET alive until new data is available on the server
00:21:45AraqI think by now the new cool JS frameworks don't use long polling anymore
00:21:54Araqcould be wrong of course.
00:22:07strcmp1http://socket.io/
00:22:19strcmp1sometimes they do
00:22:21onionhammera lot of them fall back for older browsers
00:22:24strcmp1they will use whats available
00:22:30strcmp1socket.io is an example of that
00:22:39Araqanyway I like to reverse engineer the protocol, kind of
00:23:06Araqand I like to avoid reading too much JS code
00:23:11Araqwhat are my options?
00:23:13onionhammerif you can avoid it :)
00:23:15strcmp1yeah i prefer to use an abstraction that works flawlessly in most/all browsers
00:23:27onionhammeri just write typescript nowadays :)
00:23:40onionhammermakes javascript not so unbearable
00:23:49onionhammerwhats wrong with websockets?
00:23:49strcmp1js is just fine imo
00:23:51*gokr quit (Quit: Leaving.)
00:24:26onionhammerif ur a masochist i guess
00:24:33strcmp1i see nothing wrong it
00:24:38strcmp1i quite enjoy writing it
00:24:39Araqsocket.io looks interesting indeed
00:25:07onionhammeri use signalR mainly, since it's .NETty on the server side
00:26:45AraqLearn how to create a whiteboard that users can draw on simultaneously.
00:26:53AraqComing soon! Check out the chat application guide in the meantime.
00:26:55AraqLOL.
00:27:46strcmp1oh also if you want to push events
00:27:50strcmp1check out sse
00:27:53strcmp1server side events
00:28:07strcmp1sry
00:28:10strcmp1server sent events
00:29:47strcmp1you will run into browser compatibility issues im sure but if you dont care it seems less complicated to lean
00:29:49strcmp1learn
00:31:37Araqwell I guess I will do it differently altogether
00:31:56Araqand just make my server echo the concrete requests and learn the protocol this way
00:32:11Araqhopefully it will work out.
00:32:53strcmp1ohh sorry i missed the start of that, you are learning how web sockets works
00:33:25strcmp1i think it is relatively straight forward
00:33:26Araqnot really, I want to know the low level aspects of it so my server can pretend it's a firebase server
00:33:37strcmp1i see
00:33:54strcmp1i think it uses an old http header to request an upgrade, and then it acts as a regular socket
00:34:01strcmp1but i dont know, i never looked into it deeply
00:35:55strcmp1by old i just mean i dont think it was ever considered useful until someone dreamt up websockets
00:40:49onionhammeraraq the websocket server i wrote in nim is a straight port of a C websocket server iirc
00:40:55onionhammerit was pretty easy to follow
00:41:02onionhammeridk anything about firebase though :)
00:44:52strcmp1seems ok http://enterprisewebbook.com/ch8_websockets.html#HANDSHAKE
00:44:55strcmp1for docs
00:45:02strcmp1and there is more to it than i said
00:58:52Araqonionhammer: I will definitely build upon your work :-)
00:59:24krux02how do I create an empty sequence of some type on the right hand side of an assignment?
01:04:28Araqvar s: seq[string] = @[]
01:06:33krux02Araq, I mean the type needs to be on the right sido of the "=" and on the left it should work with type inference
01:07:08AraqnewSeq[string]()
01:07:17krux02in scala it would be: var list = Seq[String]()
01:07:48Araqvar list = newSeq[string]()
01:14:38krux02thanks very much
01:17:30krux02from a quote within a macro, the quoting of a let expression gives me a weired ast: let foo: (system.[]|system.[]|system.[]|system.[]|system.[]|macros.[]|...)(seq, FooType) = (system.@|system.@|...) []
01:18:02krux02let test = quote do: let foo: seq[FooType] = @[]
01:18:13krux02that was the invocation
01:18:48krux02first of all, the system.[] do there, and why is it so different?
01:20:39*zepolen joined #nim
01:23:34*zepolen_ quit (Ping timeout: 256 seconds)
01:28:53Araqwatch my talks :P
01:29:28Araqbtw I don't use macros.quote
01:29:44Araqyou should use a template and getAst
01:30:02Araqand .dirty on the template if you don't want these symbol sets
01:30:57Araqor does macros.quote now support .dirty?
01:37:58krux02I don't know if it supports .dirty I haven't heared of it
01:38:10krux02where can I get the talks?
01:38:23krux02I only know the oscon talk
01:42:22*nim joined #nim
01:42:46Araqhi nim, what a good nick
01:43:38*nicktick1 joined #nim
01:43:47strcmp1i prefer nimrod
01:43:52strcmp1can you change it pls
01:46:37*Demon_Fox joined #nim
01:46:47*nicktick quit (Ping timeout: 255 seconds)
01:49:20*zepolen quit (Read error: Connection reset by peer)
01:49:52*zepolen joined #nim
02:02:18*nim quit (Ping timeout: 252 seconds)
02:05:17*brson quit (Quit: leaving)
02:11:30krux02Araq: I am really interesed in those talks, but I can't find any
02:12:08Araqkrux02: I will dig them out tomorrow, need to sleep now, good night
02:12:24krux02good point I should also go to bed
02:51:07*jakesyl joined #nim
03:02:16*vendethiel joined #nim
03:17:44*BitPuffin|osx quit (Remote host closed the connection)
03:18:35*phira left #nim ("aarrgh")
03:20:34*darkf joined #nim
03:25:00*vendethiel quit (Ping timeout: 272 seconds)
05:30:06*cyraxjoe quit (Ping timeout: 240 seconds)
05:32:57*cyraxjoe joined #nim
06:05:55*n1ftyn8_ quit (Ping timeout: 240 seconds)
06:11:16*n1ftyn8_ joined #nim
06:44:15*zepolen quit (Read error: Connection reset by peer)
06:46:52*zepolen joined #nim
06:56:59*gour joined #nim
07:06:27*kniteli quit (Ping timeout: 265 seconds)
08:14:41strcmp1i slept at same time as you both and i am now awake, i hope you are also awake or its very lazy of u
08:15:30*jaco60 joined #nim
08:21:30*jaco60 quit (Ping timeout: 260 seconds)
08:22:14*krux02 quit (Quit: Page closed)
08:37:26*desophos quit (Read error: Connection reset by peer)
08:50:53*yglukhov joined #nim
09:06:38*allan0_ joined #nim
09:07:50*allan0 quit (Ping timeout: 272 seconds)
09:10:00*zepolen quit ()
09:18:48*nicktick1 quit (Quit: Leaving.)
09:27:57*lokulin joined #nim
10:00:56*gokr joined #nim
10:40:25*exebook quit (Remote host closed the connection)
10:43:21*exebook joined #nim
10:51:46*ekarlso quit (Changing host)
10:51:46*ekarlso joined #nim
11:08:56*Trustable joined #nim
11:14:23*gokr quit (Read error: Connection reset by peer)
11:14:32*gokr joined #nim
11:18:55Araqyglukhov: people demand some youtube link to my talk at NimCon 2015
11:21:17strcmp1singular 'people' now cmon
11:21:22strcmp1dont be ego trippin
11:21:47yglukhovhttps://www.youtube.com/watch?v=zb3Sqs7lNJo
11:22:56*darkf__ joined #nim
11:23:29strcmp1i guess its too late now but itd be nice if video description described topic more
11:24:16strcmp1'outline' part
11:26:20*darkf quit (Ping timeout: 272 seconds)
11:34:16*yglukhov_ joined #nim
11:34:42*yglukhov quit (Ping timeout: 265 seconds)
11:41:13*tankfeeder joined #nim
11:46:50*darkf__ is now known as darkf
11:52:20*tankfeeder quit (Quit: Leaving)
11:57:58*Demon_Fox quit (Quit: Leaving)
12:03:22*BitPuffin joined #nim
12:04:47dom96Also this one: https://www.youtube.com/watch?v=4rJEBs_Nnaw
12:05:13dom96Annoying that it doesn't show up in youtube search results for "nim lang" or "nim programming language"
12:15:46yglukhov_This is the first search result for me when i search for "nim language". but maybe that's because of my company account...
12:28:17*yglukhov_ quit (Remote host closed the connection)
12:28:50*yglukhov joined #nim
12:30:04*yglukhov_ joined #nim
12:33:40*yglukhov quit (Ping timeout: 272 seconds)
12:34:29*yglukhov_ quit (Ping timeout: 246 seconds)
12:37:54*BitPuffin quit (Ping timeout: 256 seconds)
12:44:12Araqstrcmp1: I thought both strcmp1 and krux02 like to see the link here, making you 2 "people"
12:44:53Araqdom96: http://yehudakatz.com/2010/08/21/using-considered-harmful-or-whats-wrong-with/ maybe Nimble needs a ~> operator for version comparisons too?
12:52:06*BitPuffin joined #nim
13:01:54*yglukhov joined #nim
13:02:57dom96Araq: Already on my todo ;)
13:03:27dom96The syntax will likely be 'pkg 1.x' not 'pkg ~> 1.0' though
13:04:23dom96but hrm, maybe I'll support ~> too
13:07:03*yglukhov quit (Remote host closed the connection)
13:07:04dom96looks more powerful
13:09:01strcmp1Araq: correct
13:09:05*BitPuffin quit (Remote host closed the connection)
13:09:14strcmp1i wanted to see it
13:11:50*nicktick joined #nim
13:22:01Araqdom96: ok, but maybe we should keep >= and change its semantics to adhere to strict versioning and introduce >=! for the "really greater than" operator?
13:22:24dom96Let's not confuse users.
13:22:28Araqpeople write >= because it's the most natural thing.
13:22:50Araqgood defaults don't "confuse users"
13:24:37*jaco60 joined #nim
13:24:44dom96Here is the relevant issue: https://github.com/nim-lang/nimble/issues/130
13:25:31dom96I'll think about doing that
13:25:38dom96might want to write it as a comment there to remind me
13:27:06dom96But no, I don't think I will like it.
13:27:14dom96You're changing the meaning of >= to something completely different
13:27:33dom96better to make the use of >= an error
13:27:49dom96unless you specify some option in the nimble file
13:28:23AraqI replied.
13:28:58Araq~> is ugly though, it should be >~
13:29:29Araqbut *shrug* it's from Ruby, so it's beautiful by definition.
13:30:30dom96*shrug*
13:30:39dom96The color of the bikeshed doesn't matter
13:31:20Araqhackage just uses Dependencies base (>=4.6 && <5), split (>0), wxdirect (>=0.90.1.1)
13:31:30Araq>= && <
13:33:05dom96yeah. Nimble already supports that
13:33:28dom96brb
13:34:42Araqwe need to remove '>' though. "I tested it with X.X and it didn't work so it has to be greater than that"
13:42:54strcmp1yea it use to be the "spermy operator" until ruby became more PC, and in any case it causes much confusion.
13:43:02strcmp1for newbies.
13:47:34Araqlol wut? so what do they call it now?
13:48:15Araq"gender agnostic operator"?
13:54:39strcmp1"appromixation operator" or sth
14:02:14*yglukhov joined #nim
14:02:23*yglukhov quit (Remote host closed the connection)
14:04:04*yglukhov joined #nim
14:08:53*yglukhov quit (Ping timeout: 265 seconds)
14:19:11*BitPuffin joined #nim
14:21:03TrustableHi all. Does anyone know what causes an "Error: internal error: cgmeth.genConv" after update to Nim 0.12.0?
14:26:49reactormonkTrustable, code plz
14:30:53*yglukhov joined #nim
14:32:53Trustablereactormonk: I'm trying to isolate the code. With devel I get "Error: there is no subtype relation between x and y"
14:34:55*yglukhov quit (Ping timeout: 240 seconds)
14:36:23AraqTrustable: we changed how multi methods resolve
14:37:09TrustableAraq: ok, I try to understand that now, I have enough time :)
15:09:53*yglukhov joined #nim
15:15:27dom96Araq: I don't understand your logic for removing `>`
15:16:12Araqdom96: foo > 1.0 is weird.
15:16:27Araqit always is something like foo >= 1.1
15:16:49Araqsince you cannot build and test against > 1.0, but only against a concrete version
15:17:07Araqwhich is why there is always an equality involved
15:17:35Araqfoo >= 1.1 means "I built and tested with 1.1, later versions should work too"
15:17:54dom96foo > 1.0 can mean the same thing, just written differently.
15:17:58dom96I don't see how it harms anyone
15:18:23Araqbut foo > 1.0 might also just be a typo.
15:19:03Araqand strictly speaking "foo > 1.0" means "I tested with 1.0 and it fails, but I assume later than 1.0 works"
15:19:28Araqwhich is not really good enough.
15:21:35dom96Just don't use it if you don't like it.
15:25:03*nicktick quit (Read error: Connection reset by peer)
15:40:04Araqwell sdl2 had this typo.
15:40:12Araqyou cannot tell users to not make typos.
15:40:19Araqthat makes no sense. :P
15:58:20strcmp1cut off their hands
16:33:01AraqTrustable: if it's urgent, fix compiler/cgmeth.nim so that instead of a typo, it just returns the original node and create a PR
16:33:09Araqer
16:33:17Araqinstead of an error, lol
16:34:29TrustableAraq: I first need to understand the reason behind this error message
16:35:08Araqthere is some weird discrepancy between two different compiler passes
16:35:26Araqone says "ok, this overrides that method, that's fine"
16:35:53Araqthe second pass says "wait a sec, there is no subtype relation, I cannot generate code for this"
16:36:14Araqapparently the second pass is wrong and should just shut up.
16:36:34Araqbut it all needs to be rethought by me and written down in the manual
16:36:59Araqthe root cause of the problem is that the manual is silent about how multi method overriding works in detail.
17:04:23*pregressive joined #nim
17:05:45*slaven joined #nim
17:06:12*pregress_ joined #nim
17:06:17*pregressive quit (Remote host closed the connection)
17:06:22*slaven left #nim (#nim)
17:07:09TrustableAraq, reactormonk: can you tell me, why those two examples do not compile? https://gist.github.com/trustable-code/6a42311513460f78b88a
17:18:41def-Trustable: try to add method test(obj: BaseClass, obj2: BaseClass)
17:19:02def-with {.base.}
17:22:48Trustabledef-: wow, that really helps, but why?
17:55:14*yglukhov quit (Remote host closed the connection)
18:07:02*brson joined #nim
18:23:42*gour_ joined #nim
18:26:14*gour quit (Ping timeout: 246 seconds)
18:41:27*cyraxjoe_ joined #nim
18:41:59*cyraxjoe quit (Ping timeout: 255 seconds)
18:47:26*yglukhov joined #nim
18:51:26*yglukhov quit (Ping timeout: 240 seconds)
18:52:22*gour_ is now known as gour
19:06:00*boopisaway is now known as boop
19:13:46*gour left #nim ("WeeChat 1.3")
19:57:34*Jehan_ joined #nim
20:06:11*desophos joined #nim
20:49:43*darkf quit (Quit: Leaving)
20:57:22AraqJehan_: speaking of which, when should method A override method B?
20:57:39Jehan_Araq: Umm, context?
20:58:39Araqwell you can have m1(a, b, c) m2(a', b, c') with a <: a' and c' <: c
20:59:01Araqand b of e.g. type int
21:00:04Araqm2 overrides m1 iff all parameters are subtypes (or identical)
21:00:13Araqright?
21:00:47Jehan_I'm assuming m1 and m2 do not actually have different names?
21:01:10Jehan_But are simply two derived versions of the same method?
21:01:45Araqyes, exactly
21:02:21Jehan_If you question is what should happen if you have one method with type signature (S, T) and one with (T, S) where S <: T, then the answer is that the natural "more specific than" relation is only a partial order which you have to make a total order in some arbitrary way.
21:02:38Jehan_But I don't think there's a single right approach for that.
21:03:52Jehan_It's one of the reasons why I've ultimately come to prefer single dispatch over multiple dispatch for most application domains (that aren't computer algebra).
21:07:10Araqwell the plan always was to mark ambiguities at compile-time
21:07:51Araqof course the runtime ambiguities are resolved from left-to-right
21:08:05Araqsince the alternative would be too expensive
21:09:24Araqbut one could argue that since we now have the .base annotation it's not necessary to be overly strict and allow (S, T) (T, S)
21:09:25Jehan_That's fine. Honestly, people who actively use multiple dispatch need to be explicit about how they want these resolved.
21:09:57Jehan_It is also possible to turn this situation into an error.
21:10:37Araqtried to search for some papers who give definite answers to these questions but couldn't come up with anything really
21:10:37Jehan_So people are forced to disambiguate, i.e. specify the case for (S, S) explicitly.
21:11:15Jehan_I think the problem is that this can blow up for certain use cases.
21:12:13Jehan_In GAP we use order of installation (I think) and allow users to also manipulate a numerical precedence level.
21:12:38Jehan_But that's for an interpreted language.
21:34:32*brson quit (Ping timeout: 272 seconds)
21:41:39*Jehan_ quit (Quit: Leaving)
22:10:13*pregress_ quit (Remote host closed the connection)
22:40:21*Demon_Fox joined #nim
22:41:34*exebook quit (Quit: Leaving)
22:41:42*exebook_ joined #nim
22:46:33*boop is now known as boopisaway
22:47:46*Matthias247 joined #nim
23:12:31*Demon_Fox quit (Quit: Leaving)
23:15:14*saml quit (Quit: Leaving)
23:16:08*Demon_Fox joined #nim
23:25:36*yglukhov joined #nim
23:28:45*yglukhov quit (Remote host closed the connection)
23:35:48*BitPuffin quit (Ping timeout: 256 seconds)
23:55:19*Matthias247 quit (Read error: Connection reset by peer)