<< 12-07-2014 >>

00:03:49*EXetoC quit (Quit: WeeChat 0.4.3)
00:05:35*noam joined #nimrod
00:16:00*ics joined #nimrod
00:17:57NimBotVarriount/NimLime master bbea65d Erik O'Leary [+0 ±2 -0]: Added 'auto' keyword
00:32:05*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:42:06*Matthias247 quit (Read error: Connection reset by peer)
00:50:28*nande quit (Remote host closed the connection)
00:56:28def-Hm, it's a bit unexpected that random for TSlices excludes the last element
01:06:37*BitPuffin quit (Ping timeout: 240 seconds)
01:08:11*saml_ joined #nimrod
01:11:54OrionPKwhats up kids
01:12:03*lorxu quit (Ping timeout: 240 seconds)
01:28:46*Varriount|Mobile quit (Remote host closed the connection)
01:32:22OrionPKis there any way to say in-code to use the CPP compiler
01:32:23OrionPKinstead of C
01:38:25*brson quit (Quit: leaving)
01:38:37*brson joined #nimrod
01:42:20*q66 quit (Quit: Leaving)
01:47:45*ics joined #nimrod
02:36:11*bjz joined #nimrod
02:38:18*Varriount|Mobile joined #nimrod
03:01:10*Demos_ quit (Ping timeout: 264 seconds)
03:01:34*Demos joined #nimrod
03:01:57*Demos is now known as Guest39981
03:53:50*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:02:21*lorxu joined #nimrod
04:20:54*bjz joined #nimrod
04:43:50*brson quit (Ping timeout: 240 seconds)
04:58:53*saml_ quit (Quit: Leaving)
05:42:06*vendethiel quit (Ping timeout: 272 seconds)
05:42:23*vendethiel joined #nimrod
06:05:51*vendethiel quit (Quit: q+)
06:12:47*Guest39981 quit (Read error: Connection reset by peer)
06:33:18*bjz quit (Ping timeout: 240 seconds)
06:35:39*bjz joined #nimrod
06:35:39fowlOrionPK, no, but you have defined(CPP)
07:30:56*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:49:34*Varriount|Mobile quit (Read error: Connection reset by peer)
08:03:50*kunev joined #nimrod
08:07:25*Varriount_ joined #nimrod
08:10:51*Varriount quit (Ping timeout: 240 seconds)
08:25:43*bjz joined #nimrod
08:48:35*flaviu quit (Ping timeout: 264 seconds)
09:12:11*kemet joined #nimrod
09:18:09*kemet quit (Read error: Connection reset by peer)
09:18:14*kemet1 joined #nimrod
09:18:33*kemet1 quit (Client Quit)
09:26:33*Matthias247 joined #nimrod
09:37:01*Trustable joined #nimrod
10:09:35*io2 joined #nimrod
10:43:19*BitPuffin joined #nimrod
10:50:06*MayurYa joined #nimrod
10:50:07*MayurYa quit (Changing host)
10:50:07*MayurYa joined #nimrod
10:55:20*q66 joined #nimrod
11:07:38dom96hallo
11:07:46def-hi
11:07:59dom96hey def-, how are you?
11:08:34def-Fine, thanks. And yourself, dom96?
11:08:49dom96good.
11:09:28dom96Up to much?
11:09:44def-Trying to figure out why foldl/foldr only work outside of procs
11:10:33dom96interesting. Maybe I can help?
11:12:13*Matthias247 quit (Read error: Connection reset by peer)
11:13:44def-i don't know, it's kind of weird
11:14:16*dom96 is fighting async
11:21:16*PsyMinerva joined #nimrod
11:22:33*PsyMinerva left #nimrod ("Salir")
11:23:22def-ok, it's another issue with inference of parameter types
11:24:54def-and additionally you need a "result = x" instead of x
11:27:47dom96can you show me the issue?
11:27:58def-sure, wait 1 moment
11:28:43*Matthias247 joined #nimrod
11:29:12def-dom96: https://gist.github.com/def-/2578abe885f99670e35e
11:29:22def-it's not with foldr/foldl right now, but they have the same problem
11:29:29def-prime works, but i wanted prime2
11:32:05dom96ahh
11:32:48dom96Does primer2[T](a: T): bool work?
11:33:38dom96Also, "toSeq 2 .. int sqrt float a" is that correct?
11:34:09def-apparently yes
11:35:44dom96I'm having a hard time parsing that in my head lol
11:37:04Araqint(sqrt(float(a)))
11:37:22dom96i see
11:41:03*MayurYa quit (Ping timeout: 240 seconds)
11:41:29Araqand before you complain about it
11:41:42Araqthis feature enables your 'await' syntax
11:41:52Araq:P
11:44:31dom96yes, i'm aware.
11:45:01dom96So I have to blame def- for overusing it :P
11:45:34def-I just didn't like all the brackets!
11:46:07Araqand rightly so. I always blame Einstein for his use of integrals
11:46:08def-my compromise for now is sqrt(a.float).int, so that the important stuff is at the start, and the type stuff at the end
11:47:21Araqdef-: the point of a syntax is to avoid brackets
11:47:41Araqso you're doing just fine ;-)
11:52:58*io2 quit (Ping timeout: 240 seconds)
11:59:06*io2 joined #nimrod
11:59:08*io2 quit (Changing host)
11:59:08*io2 joined #nimrod
12:06:32*Varriount_ quit (*.net *.split)
12:06:32*BlameStross quit (*.net *.split)
12:06:32*Francisco quit (*.net *.split)
12:06:32*Jesin quit (*.net *.split)
12:06:33*Skrylar quit (*.net *.split)
12:06:33*betawaffle quit (*.net *.split)
12:06:34*noam quit (*.net *.split)
12:06:34*rektide quit (*.net *.split)
12:06:34*mko quit (*.net *.split)
12:06:34*clone1018 quit (*.net *.split)
12:06:35*flyx quit (*.net *.split)
12:06:35*kunev quit (*.net *.split)
12:06:35*lorxu quit (*.net *.split)
12:06:36*fowl quit (*.net *.split)
12:06:36*btiffin quit (*.net *.split)
12:06:36*CARAM_ quit (*.net *.split)
12:06:36*Zuchto quit (*.net *.split)
12:06:37*dom96 quit (*.net *.split)
12:06:37*rixx quit (*.net *.split)
12:06:38*Raynes quit (*.net *.split)
12:06:38*silven quit (*.net *.split)
12:06:38*Matthias247 quit (*.net *.split)
12:06:39*Roin quit (*.net *.split)
12:06:39*Amrykid quit (*.net *.split)
12:06:39*Araq quit (*.net *.split)
12:06:40*darkfusi1n quit (*.net *.split)
12:06:40*TylerE quit (*.net *.split)
12:06:41*mal`` quit (*.net *.split)
12:06:41*milosn_ quit (*.net *.split)
12:06:41*untitaker quit (*.net *.split)
12:06:42*phI||Ip quit (*.net *.split)
12:06:42*mmatalka quit (*.net *.split)
12:06:42*reloc0 quit (*.net *.split)
12:06:42*comex quit (*.net *.split)
12:06:42*jez0990_ quit (*.net *.split)
12:06:43*oddmunds quit (*.net *.split)
12:06:43*bstrie quit (*.net *.split)
12:06:43*def- quit (*.net *.split)
12:07:24*Matthias247 joined #nimrod
12:07:24*Varriount_ joined #nimrod
12:07:24*kunev joined #nimrod
12:07:24*lorxu joined #nimrod
12:07:24*noam joined #nimrod
12:07:24*BlameStross joined #nimrod
12:07:24*Francisco joined #nimrod
12:07:24*rektide joined #nimrod
12:07:24*milosn_ joined #nimrod
12:07:24*Jesin joined #nimrod
12:07:24*mko joined #nimrod
12:07:24*btiffin joined #nimrod
12:07:24*untitaker joined #nimrod
12:07:24*clone1018 joined #nimrod
12:07:24*Skrylar joined #nimrod
12:07:24*flyx joined #nimrod
12:07:24*def- joined #nimrod
12:07:24*oddmunds joined #nimrod
12:07:24*jez0990_ joined #nimrod
12:07:24*comex joined #nimrod
12:07:24*bstrie joined #nimrod
12:07:24*betawaffle joined #nimrod
12:07:24*reloc0 joined #nimrod
12:07:24*mmatalka joined #nimrod
12:07:24*phI||Ip joined #nimrod
12:07:24*Roin joined #nimrod
12:07:24*Amrykid joined #nimrod
12:07:24*Araq joined #nimrod
12:07:24*darkfusi1n joined #nimrod
12:07:24*TylerE joined #nimrod
12:07:24*mal`` joined #nimrod
12:07:24*CARAM_ joined #nimrod
12:07:24*Zuchto joined #nimrod
12:07:24*dom96 joined #nimrod
12:07:24*rixx joined #nimrod
12:07:24*Raynes joined #nimrod
12:07:24*silven joined #nimrod
12:07:24*fowl joined #nimrod
12:10:03*X-Scale quit (Ping timeout: 249 seconds)
12:15:32*Jesin quit (Excess Flood)
12:16:25*Jesin joined #nimrod
12:17:02*t0d0r joined #nimrod
12:17:44Araqhi t0d0r welcome
12:18:24*X-Scale joined #nimrod
12:30:51*untitaker quit (Ping timeout: 240 seconds)
12:35:24*t0d0r quit (Quit: t0d0r)
12:36:33*untitaker joined #nimrod
12:37:33*t0d0r joined #nimrod
12:40:40*saml_ joined #nimrod
12:50:46*t0d0r quit (Quit: t0d0r)
12:54:05*kunev quit (Quit: е те)
12:58:02*darkf quit (Quit: Leaving)
13:12:09*t0d0r joined #nimrod
13:12:10*t0d0r quit (Client Quit)
13:24:02*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
13:24:20*io2 joined #nimrod
13:25:51*ARCADIVS quit (Quit: WeeChat 0.4.3)
13:35:03*BitPuffin quit (Ping timeout: 256 seconds)
14:01:52*EXetoC joined #nimrod
14:04:03*q66 quit (Quit: Leaving)
14:04:24*q66 joined #nimrod
14:12:58*milosn_ quit (Read error: No route to host)
14:13:15*milosn joined #nimrod
14:45:24OrionPKfowl doesnt work
14:45:34OrionPKCPP isnt defined w/ cpp compiler chosen
14:45:58Araqbut it should be
14:46:35OrionPKsec
14:47:19OrionPKoops
14:47:22OrionPKI used if instead of when
14:47:26OrionPKmy bad, it totally works
14:47:32Araqwhat do you guys think of foo.bar(.int, string, int.) as a syntax to refer to a particular overload
14:48:19OrionPKyou mean to pass it?
14:48:31AraqI mean the (. .) brackets
14:48:52*flaviu joined #nimrod
14:49:07OrionPKwell, I dislike the {. .} brackets, so u know my opinion probably :P
14:49:22AraqI see
14:49:49Araqwell do you have an alternative that works with nimrod's syntax?
14:52:54OrionPK(int, string => int)foo.bar
14:52:55OrionPKidk
14:53:04OrionPKthats like a cast
14:53:09OrionPKif it fulfills the cast it compiles
14:53:40dom96That would be inconsistent with the stuff in the future module I think
14:54:04OrionPK((int, string) => int)foo.bar probably
14:55:08dom96Yeah, that could work. Maybe.
14:55:18dom96Araq: How is it done in other languages?
14:58:33Araqdom96: it isn't done
15:01:03OrionPKis my syntax even feasible?
15:01:53*Matthias247 quit (Read error: Connection reset by peer)
15:02:11OrionPKbecause I think cast syntax is a lot more familiar
15:33:49*BitPuffin joined #nimrod
15:54:18*ics quit (Ping timeout: 240 seconds)
15:55:53flaviuWhat use would refering to a specific overload be?
15:56:59flaviuIf its unclear what the types are, foo.bar(a.int, b.string, c.int) is fine
15:57:12*saml_ quit (Quit: Leaving)
15:57:26*ics joined #nimrod
16:15:04def-Oh, I can't use any character as an operator =/
16:18:42*vendethiel joined #nimrod
16:33:01*Puffin joined #nimrod
16:33:08*Puffin quit (Client Quit)
16:33:17*Puffin joined #nimrod
16:33:28*Puffin quit (Client Quit)
16:35:58*BitPuffin quit (Ping timeout: 240 seconds)
16:51:54*Jehan_ joined #nimrod
16:52:36*BitPuffin joined #nimrod
17:03:44dom96yay, async works.
17:04:29Araq:O
17:04:33Araqrelease tomorrow!
17:04:41dom96lol
17:04:45Araqwell
17:04:55dom96still slower than Go on linux though
17:04:58Araqyou now have to test it with the new_spawn branch
17:05:02dom96doesn't seem to scale as well
17:06:38*xenagi joined #nimrod
17:07:13Araqhmmm "Would you buy nimrod.org at $499? "
17:07:15EXetoCI mentioned nimrod in a lua channel, and of course case sensitivity came up in addition to "too pythony" :>
17:07:48AraqI mentioned Lua in the #nimrod channel and ofc "dynamic typing" came up
17:07:55EXetoC^_^
17:08:25dom96Araq: I wouldn't, have you decided not to rename?
17:09:19AraqI haven't decided anything
17:09:34Araqbut no, I'm not buying nimrod.org for 500 dollars
17:10:01Jehan_I still think that researching the applicability of the Sapir-Whorf hypothesis to programming languages could be a fruitful exercise.
17:10:13EXetoCnimlang
17:11:23Jehan_Just call it the N programming language. :)
17:12:02flaviuHuh. That actually hasn't been taken
17:12:19EXetoCnevermind searchability
17:12:22AraqI still don't know how anybody with half a brain can think case sensitivity to be a useful feature ...
17:12:25flaviuEXetoC: NLang
17:12:59Araqon many Linux machines foo<tab> doesn't work when the directory is called Foobar
17:13:02Jehan_Araq: I think that both case sensitivity and case insensitivity can be useful and have their advantages and disadvantages.
17:13:47Jehan_None of which are (IMO) strong enough to stress out over.
17:14:48Araqwhat's the advantage?
17:16:09flaviuAraq: For case sensitivity? You can't access foo as FoO, the compiler enforces that your naming is consistant
17:17:07Araqflaviu: you should use the machine for what it's good for: automating stuff
17:17:42Araqwith insensitivity you can make your tools ensure it's displayed consistently
17:18:18fowlAraq, i was just thinking about specific overloads outside
17:18:29flaviuMake code linters part of the compile process basicly?
17:19:33Araqbbl
17:19:48Araquse case:
17:20:35Araqvm.registerProc("stdlib.system.open(.TFile, OpenFlags.)", openWrapper)
17:24:10fowli think it can be done with a macro like specificf(open, TFile, OpenFlags)
17:26:22Jehan_W.r.t case sensitivity: the most common use case is disambiguation, where you want to use both "foo" and "Foo" (because the domain demands it), but can't.
17:26:43Jehan_As I said, this is a minor thing. It's not like case-insensitivity has compelling advantages, either.
17:30:16*enurlyx joined #nimrod
17:35:08fowlAraq, https://gist.github.com/fowlmouth/609a8057fc473f9e2519
17:38:11fowlworks better as a template
17:39:06Araqfowl: impressive :-)
17:40:45Araqbut it doesn't solve the problem
17:40:53*Demos joined #nimrod
17:41:15AraqI need this syntax to be encoded in string literals, see my example
17:41:53AraqI thought it would be nice to come up with a syntax that will also be valid nimrod syntax for that
17:42:31Jehan_You're trying to disambiguate overloaded functions from what I can see in the log?
17:43:03fowlAraq, oh
17:43:41AraqJehan_: yes
17:44:36Jehan_In Talis, I'm using :: as an "interpret as type of" operator to resolve ambiguities in type inference (of which ambiguous overloading is just a special case).
17:44:45fowlAraq, you need a custom thing your vm, so you want to encode the function type to a string, and get the right function pointer, (as a void pointer i assume), right?
17:45:00Jehan_C++ allows you to resolve it in two ways:
17:45:28Jehan_(1) a static_cast to the desired type and (2) assignment to a variable of the desired type.
17:45:29Araqfowl: yes
17:46:19AraqJehan_: I know and nimrod allows the same
17:46:21Jehan_Generally, function overloading is equivalent to generics with invisible type parameters, so this would be another way to resolve it.
17:46:29fowlAraq, i would just make it parse a string like "(a,b)c" for proc(:a, :b): c
17:46:57Araqfowl: that's too ugly
17:47:17Araqbut lol
17:47:24Jehan_You already need to handle generics, right?
17:47:26fowlit'd be super simple, left to right
17:47:48Araqwell your subconcious suggestion is excellent
17:47:50fowlnow araq cares about code beauty in the compiler
17:48:03Araqfowl: no, it's an exposed API
17:48:22Araqstdlib.system.open(:TFile, :TFileMode)
17:48:43Araqyour way with the ':' prefix is cool
17:49:00fowlAraq, can you pass a str literal and call parseexpr on it? if so you can just use "proc(f:TFile, mode:TFileMode)" :)
17:49:26fowlAraq, i was just using that to demonstrate the result type (a proc with arg names that dont matter)
17:49:58Araqfowl: yes, I know, but I really like it
17:51:31Araqwell if it'd be valid nimrod syntax, I could indeed parseExpr it
17:53:47Jehan_For your specific example, why can't you just use a proc prototype for the string?
17:54:18fowlJehan_, i just try it and parseexpr wont take "proc(a,b:int):int"
17:54:35Jehan_E.g.L vm.registerProc("stdlib.system.open(x: TFile, y: OpenFlags)", openWrapper)
17:54:51Araqand more importantly: proc stlib.system.open ... is not valid syntax
17:55:16Jehan_fowl: Yeah, but any new syntax would need new parser support, anyway?
17:55:28fowlthats not new syntax, its a proc type
17:55:31AraqI could however do it like this:
17:55:48Araqvm.registerProc("stdlib", "system", "proc open ...")
17:55:49Jehan_fowl: Yes. I mean, if Araq were to use a new syntax for this.
17:56:13fowli'm trying to do it without new syntax because you guys dont see it but every time new syntax is added i throw my arms up in outrage and sometimes it comes out of my shoulder
17:56:51fowllol
17:57:02Araqfowl: can't tell if you're serious
17:57:06fowl"(proc(a,b:int):int)" parseexprs, but not without the parens
17:57:59Jehan_Perhaps we need a parseType primitive, too? Or is there one already?
17:58:55Araqyeah well
17:59:13Araq"parseExpr" wasn't really planned either
17:59:21Araqit grew into existance
18:00:48Araqhow do I tell parseExpr to use #! strongSpaces?
18:01:08Araqsee? - no planning involved
18:02:44Jehan_Heh. :)
18:03:54*gsingh93_ joined #nimrod
18:04:19Araqthe types API however has been designed
18:04:25fowlAraq, so, looks like you can do it right away with something like specificf(system.open, "(proc(f:TFile; flags:OpenFlags))") i'd make it return a literal tuple with all that info ("system.open","proc(..)",functionpointer)
18:04:42Araqtook me years to come up with its design
18:04:58Araqand it's superb
18:05:18Araqthe only problem is that it hasn't been implemented ... ;-)
18:06:20Araqfowl: are you really that concerned about syntax additions?
18:06:53Araqif so, I can make the syntax in the string literals a special case that has nothing to do with proper nimrod syntax
18:06:59fowlis it planned for some kind of halfway type alias? like type intptr_t{.importc:"intptr_t",header:"stdint.h".} = int # <- uses int instead of intptr_t
18:07:13fowlcurrently^
18:07:26Araqhmm that should alredy work
18:08:43fowlAraq, i dont think any new syntax would be clearer than proc(...), we have a new syntax for declaring proc types though, in future.nim, it looks like (int,int)->int
18:09:19Araqfowl: no we don't
18:09:26Araqtechnically it's not new syntax at all
18:09:30Araqbut you know that
18:09:50fowlhttp://build.nimrod-lang.org/docs/future.html#-%3E.m,expr,expr
18:10:03fowlit matches do syntax, and thats newish
18:10:28Araqwell I didn't change the parser for the feature, so it's not new syntax
18:10:49Araqin fact, that's exactly what caused some problems already
18:11:36Araq(x, y) => x + y # was always valid nimrod code
18:11:50*Jesin quit (Quit: Leaving)
18:14:19*Jesin joined #nimrod
18:14:25fowli dont think (int) -> (int) -> int works either
18:16:28fowli can fix that though
18:16:47Araqgo for it please
18:17:30Araqargh
18:18:06Araqall I wanted to do is to give the VM stuff from os and math.nim
18:18:22Araqnow I'm writing some generic proc signature matcher
18:18:49fowlmy way doesnt work?
18:19:27Araqyour way is too ugly for an API that the VM exposes
18:20:14*Matthias247 joined #nimrod
18:29:10Jehan_Araq: If the use is limited, why not write wrapper functions without overloading and pass them around?
18:40:04*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
18:41:52Araqwell system.open exists and is overloaded
18:42:30Araqand I dont want to make people use staticOpen for cte
18:44:48Araqbut pckg.module.ident is good enough for a start anyway
18:48:33*bjz quit (Ping timeout: 240 seconds)
18:48:37Araqfowl: what about my operator lifting syntax? you dislike that idea as well?
18:51:14*bjz joined #nimrod
18:56:37*ics joined #nimrod
19:03:14fowlAraq, "open(:tfile, :filemode):void" ?
19:07:16fowllooks fine
19:07:32Araqyes indeed
19:08:20fowlwill i be able to use wrappers on the vm them?
19:08:22fowlthen*
19:08:55Araqno, only what has been registered to the VM
19:09:08fowlis the VM in the RTL
19:10:28Araqsoon
19:11:01fowlshould be possible when it is
19:11:59Araqwell I made libFFI work with it onc
19:12:00Araq*once
19:12:04AraqI won't do it again
19:12:15Araqit's full of subtle edge cases
19:12:17dom96The 'do' notation caused more problems than it solved IMO.
19:13:10dom96Araq: What will registerProc do?
19:13:11Araqdom96: yes, but it's also quite sucessful
19:16:47fowldom96, it resolves the function to the right type and returns it, with information on the type, to the vm, to be exposed as a compile-time function
19:17:50fowlresolving overloads and such
19:18:05dom96oh, so this is a part of the infamous type API?
19:18:16Araqno, it's not
19:18:51*kunev joined #nimrod
19:18:57dom96ahh, so it doesn't return info about the type to the user, just to the VM?
19:19:12Araqit tells the VM what to do with system.open
19:19:20Araqhow it should be executed
19:19:51dom96I still don't get it.
19:20:07dom96What is there to tell the VM?
19:22:21Araqwell look at how 'echo' is implemented
19:22:31Araqit's got its own opcode, opcEcho
19:22:39Araqwe already have hundreds of opcodes
19:22:46Araqand the limit is 256
19:23:17Araqthis doesn't work for everything we like the VM to do
19:23:29Araqso we need a mechanism to extend the VM
19:23:42Araqwhich is what registerProc provides
19:24:31*Demos_ joined #nimrod
19:26:03*Demos quit (Ping timeout: 240 seconds)
19:29:10dom96ok so this is a workaround to you not allowing FFI in the VM?
19:31:09Araqexactly
19:36:43dom96Araq: C#'s Task.Run works together with async await.
19:38:17*kunev quit (Ping timeout: 256 seconds)
19:40:37*io2 quit (Ping timeout: 240 seconds)
19:41:16*q66_ joined #nimrod
19:42:58*q66 quit (Ping timeout: 240 seconds)
19:43:13Araqdom96: so?
19:43:17fowlhow can i make this use dot syntax (x.foo instead of x<<foo) https://gist.github.com/fowlmouth/ab9100de8c57c30d7c3e
19:43:39dom96Araq: It's nice. Thought you might be interested.
19:44:32Araqah ok
19:44:48Araqfowl: dunno if its possible
19:45:08Araqmaybe you shouldn't use a maybe if the maybe gets annoying
19:45:52Araqeven Haskell has exceptions and even Haskell doesn't wrap OOM in a maybe
19:46:03fowlyou're right, .? is a better operator anyways, thanks araq (:
19:46:19*io2 joined #nimrod
19:46:20*Araq is tired of FP propaganda
19:48:26fowltemplate `.?` [T] (a:TMaybe[T]; b): expr =
19:48:26fowl (if a.has: just(a.val.b) else: nothing[type(a.val.b)]())
19:48:43fowlallows field access too
19:50:36dom96Anybody got a link to that Nimrod VS plugin handy?
19:52:38Araqfowl: what about having a @`+` b as a shortcut for: `@`(`+`, a, b)
19:52:56Araqwould be nice for some general lifting operator
19:53:46fowlwhat is that lifting exactly?
19:53:54fowli would just type @(a + b)
19:55:30dom96The fact that Futures capture exceptions is slightly problematic.
19:55:39dom96It appears that C# does exactly the same.
19:56:45dom96The problem is that the exceptions disappear once they reach the global scope instead of being thrown.
19:57:00dom96hrm, I just got an idea how to solve that.
19:57:39Araqfowl: for instance going from T to seq[T]
19:57:51Araqa + b # for ints
19:58:00dom96No, that won't work.
19:58:02Araqa @`+` b # for seqs of ints
19:58:08dom96Araq: I need your input on this.
19:58:28Araqwhats the problem?
19:58:51Araqexceptions already keep the original stack trace for reasons like this
19:58:56dom96a @`+` b, you're adding two sequences?
19:59:19Araqdom96: element-wise, yes
19:59:58AraqI could overload + for seqs, but that's not the point
20:00:23dom96So: @[a[0] + b[0], a[1] + b[1], ...] ?
20:00:41Araqyup
20:02:12dom96I don't like it.
20:02:42dom96It would be rarely used I think?
20:02:49dom96So why give it an operator?
20:03:03Araqit's a slightly more general 'map'
20:03:17Araqit's not rare at all
20:05:34dom96Then there must be a well known name for a function that performs this operation
20:05:50Araq'lift' ?
20:06:15dom96I don't think so
20:09:06Araqok ok, so I'm not gonna add it
20:10:57dom96good :P
20:10:59dom96now
20:11:12*Boscop quit (Read error: Connection reset by peer)
20:11:23dom96proc foo {.async.} = raise newException(EBase, "foo")
20:11:27dom96foo()
20:11:34dom96# No exception raised
20:11:39dom96That is the problem.
20:13:37fowldom96, does foo keep running after the raise?
20:14:48dom96no
20:15:03*EXetoC quit (Ping timeout: 240 seconds)
20:15:39dom96foo will return a Future after the raise.
20:18:23Matthias247and what's wrong about that? async methods should always return Futures? They do that in C# too
20:18:42*Jesin quit (Quit: Leaving)
20:19:01Araqdom96: when IS the exception raised then?
20:19:14dom96What is wrong is that the exception is lost.
20:19:36dom96We can say that it's up to the programmer to make sure that they ensure they are not discarding any futures accidentally.
20:19:46dom96Especially in the global scope.
20:20:05dom96Araq: Never, unless you await the future returned by 'foo' or try to read it manually.
20:22:14BitPuffindom96: you should look at lwt
20:22:34*EXetoC joined #nimrod
20:22:47Matthias247The exception should get stored in the returned future
20:23:08dom96Matthias247: That is what happens.
20:23:08Matthias247and when you await foo it should be rethrown
20:23:37Araqyes what Matthias247 says
20:24:03Matthias247when you simply discard the future without doing anything with it - yes, it will be lost
20:24:04BitPuffindom96: http://ocsigen.org/lwt/2.4.3/manual/manual
20:24:13Matthias247that''s however the same for all Future/Task implementations
20:24:31Araqdom96: you could throw it in a finalizer if it hasn't been thrown already
20:24:33dom96Matthias247: I see. Doing this feels risky though.
20:24:42Araqbut I'm not sure it's a good idea
20:24:43*Jesin joined #nimrod
20:24:46dom96Araq: Tried that. Finalizer doesn't seem to be called.
20:25:03Araqwell it's not deterministic
20:25:10dom96This means that everyone will need to basically write:
20:25:12dom96var fut = foo()
20:25:27Matthias247Araq: I wouldn't do that. I often discard Tasks by intention
20:25:31dom96fut.callback = proc () = if fut.failed: raise fut.exception
20:25:35Matthias247when I'm really not itnerested in the return value
20:25:50Matthias247and it would kill my applications when that throws somewhere
20:25:53AraqMatthias247: yeah I can imagine
20:26:06AraqI don't propose this solution
20:26:18AraqI'm only saying it's possible
20:26:23Matthias247you would event not know where it throws - because a future has no determined position at which it is fulfilled
20:27:03Araqwell it's more like a crash than a throw
20:27:26dom96yes, that is likely a bad idea.
20:28:11dom96I fear everyone will forget to check for exceptions though.
20:28:18*io2 quit (Ping timeout: 240 seconds)
20:28:20dom96And then they will be puzzled about why their stuff doesn't work.
20:28:57dom96The only thing I can do is to provide a function which will essentially do what I wrote above.
20:29:08dom96Unless you guys have any other ideas?
20:29:19dom96If not then ideas for a name for this function would be great.
20:30:17AraqpropagateException()
20:30:27dom96too long
20:30:52AraqpropagateError
20:32:08dom96too long
20:34:09Araqwait a sec
20:34:17Araqwhen do people have to call it?
20:34:31dom96Only at the global scope
20:34:45dom96Which makes me feel like it shouldn't be necessary :\
20:35:24Araqyou mean like in:
20:35:33Araqvar globalVar = foo()
20:35:35Araq?
20:35:50Araqvar localVar = foo() # is fine?
20:36:00Matthias247hmm, either you want the result and then you await the future or make Future.get() or sth. like this and then the exception is thrown
20:36:05Matthias247or you are not itnerested
20:36:50dom96actually you're right.
20:36:54dom96It's not just the global scope.
20:37:25dom96Matthias247: What is the proc returns void?
20:37:27dom96*if
20:37:51Matthias247you mean Future<void>?
20:38:00dom96yes
20:38:16dom96you may await it
20:38:23Matthias247yes
20:38:29dom96but if you're not, you won't be interested in its result
20:38:38dom96unless you remember that exceptions can happen heh
20:38:49Matthias247you wait for it's completion, even if there's no return value
20:39:34dom96what if you don't want to wait?
20:39:35Matthias247if you are interested if an error happened you can still either await it or do future.get()
20:40:05Matthias247in Java you can query Future.isCompletedExceptionally(). I think in other implementations similar
20:40:06dom96the problem is that you likely are always interested
20:40:07Matthias247http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
20:40:17dom96it's just that programmers will not be used to thinking this way
20:40:39dom96And it's a PITA to check every async proc for exceptions
20:40:48dom96(that you do not await)
20:41:15Matthias247yes, because the majority of programmers are not familar with modern async concepts
20:41:33Matthias247but you won't make it better if you do it differnt than the other implemntations
20:45:34dom96perhaps I shouldn't make async procs discardable
20:45:54Araqyes indeed, you shouldn't
20:46:10*Jesin quit (Remote host closed the connection)
20:48:01AraqI always wondered why you did it this way
20:48:11Araqwhy are they discardable in the first place?
20:49:24dom96for convenience :P
20:50:38Araqgood
20:50:45Araqthat means it's easy to change
20:51:01AraqI feared there is some technical reason to do so
20:51:27dom96well maybe I had a better reason
20:51:31dom96I can't remember.
20:53:38Araqwell soon you will be remembered
20:54:10dom96yeah, I probably shouldn't be watching The International :P
20:54:11*Johz joined #nimrod
21:08:32OrionPKdom96 any progress on that 64kb SCGI issue?
21:09:25dom96OrionPK: Try switching to Jester new_async branch and not using scgi.
21:10:07*ARCADIVS joined #nimrod
21:12:16dom96OrionPK: You may need to change some code for it.
21:12:20dom96Unfortunately.
21:12:47*vendethiel quit (Remote host closed the connection)
21:13:27*enurlyx left #nimrod (#nimrod)
21:14:46OrionPK:\
21:14:48OrionPKbut im using nginx
21:15:28*vendethiel joined #nimrod
21:15:47dom96OrionPK: You could probably use nginx as a proxy
21:19:07OrionPK:\
21:27:28dom96OrionPK: whysad?
21:38:02*Eurck joined #nimrod
21:39:03*lorxu quit (Ping timeout: 240 seconds)
21:41:04*Eurck_ joined #nimrod
21:42:58*Eurck quit (Ping timeout: 240 seconds)
21:46:15*Eurck_ quit (Quit: Lingo - http://www.lingoirc.com)
21:47:08*BitPuffin quit (Ping timeout: 240 seconds)
21:48:46*Utkan joined #nimrod
21:49:28*Utkan quit (Client Quit)
21:52:11*ics quit (Ping timeout: 264 seconds)
21:54:09NimBotAraq/Nimrod devel cf5c8a2 Dominik Picheta [+0 ±4 -0]: Many async optimisations.... 7 more lines
21:54:17*ics joined #nimrod
22:03:53*Utkan joined #nimrod
22:06:36*Utkan quit (Remote host closed the connection)
22:07:03*Utkan joined #nimrod
22:09:51*Johz quit (Quit: Leaving)
22:18:52*Utkan quit ()
22:19:19*Utkan joined #nimrod
22:21:02*Utkan quit (Client Quit)
22:33:54*io2 joined #nimrod
22:37:52Araqdom96: forum action
22:40:46*BitPuffin joined #nimrod
22:51:35*saml_ joined #nimrod
22:55:36*q66_ is now known as q66
22:59:16OrionPKbecause I want to use scgi dom96
22:59:23dom96OrionPK: why?
22:59:35OrionPKbecause why shoudlnt i
22:59:49OrionPKi've already got it all configured how I want it
23:00:47OrionPKis this new async http server better than the old one?
23:02:31dom96of course
23:04:07dom96Araq: I think you should merge new_spawn, I just hit a bug which doesn't happen with new_spawn
23:06:47dom96Araq: fuck, nvm
23:09:12*darkf joined #nimrod
23:13:02NimBotAraq/Nimrod devel 634a416 Dominik Picheta [+0 ±1 -0]: Async fixes for Linux.
23:21:03dom96anyway
23:21:11dom96OrionPK: It'd be nice if you tested it
23:21:24OrionPKdom96 if i find time to..
23:21:36OrionPKDemos you removed the dependency for libnimrod? there's still a ton of code referencing it
23:21:57dom96oh yeah
23:22:05dom96Demos_: where is this plugin of yours for Visual Studio?
23:23:30dom96It seems the difference between select and IOCP is practically nothing
23:23:41dom96difference between select and epoll is noticeable though
23:25:38Demos_https://github.com/barcharcraz/VisualNimrod
23:25:59OrionPKError 108 Cannot find the interop type that matches the embedded interop type 'Microsoft.VisualStudio.Shell.Interop.IVsToolboxItemProvider'. Are you missing an assembly reference?
23:28:43*Jehan_ quit (Quit: Leaving)
23:28:43Demos_during build?
23:28:46OrionPKyeah
23:29:00Demos_do you have the visual studio extensibility SDK
23:29:16OrionPKyeah... I was using the plugin before. did you add another dependency?
23:29:33Demos_no
23:29:37Demos_what file is it in?
23:29:44OrionPKNimrodProject
23:29:57OrionPKNimrodProjectFactory
23:30:01Demos_oh, that is not nessassary yet
23:30:24OrionPKdont i need it to make a nimrod project?
23:31:26Demos_no. the NimrodProject project is the beginning of working toward a having projects that do not depend on MPFProj or any project file, they would just mirror the filesystem and edit a project.nimrod.cfg file
23:31:39OrionPKah
23:32:10OrionPKI have syntax highlighting!
23:32:20Demos_indeed!
23:32:26Demos_build and run probably won't work
23:32:32Demos_but they might, you never really know
23:32:33*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
23:32:35OrionPKno, it works
23:32:38Demos_w00t
23:32:38OrionPKctrl + f5 launched
23:33:01Demos_I did not edit the template yet. Just got my project working by editing the XML
23:33:06Demos_have to get that into vsgen as well
23:33:17OrionPKtabulators not allowed heh
23:33:22OrionPKhowd a tab get in there?
23:33:26Demos_yeah, change the VS editor settings
23:33:32OrionPKI always uses spaces
23:33:43Demos_I think there are seperate settings for nimrod
23:33:50OrionPKah, odd...
23:33:50Demos_I need to figure how to limit them
23:33:55Demos_if that can even be done
23:34:00OrionPKoh, im sure it can ben
23:34:01OrionPKbe*
23:34:16Demos_but this is a good start already
23:34:26OrionPKyeah
23:34:30OrionPKso far so good man
23:34:52Demos_completion should work to
23:35:21OrionPKyeah, need to start highlighting proc calls if possible
23:35:50Demos_it should already do so. although it condiers a proc call anything that ends in a () or * (for definitions you understand)
23:36:01Demos_but the default color for identifiers is just black
23:36:02OrionPKah
23:36:04OrionPKdoesnt do "echo"
23:36:06Demos_so they do not show up
23:36:12Demos_yeah
23:36:23Demos_I am not sure how perf intensive that would be
23:36:37Demos_since idetools --serve does not work I need to launch up a whole new process for each query
23:36:47OrionPKyeah
23:36:58OrionPKI know that deal. I worked on the ST plugin
23:37:01Demos_the compiler is so motherfucking fast that it may not matter
23:37:04OrionPKwish someone would get that working
23:37:12OrionPKI think i just did a special case for echo
23:37:13Demos_soes the ST plugin use idetools?
23:37:16OrionPKjust because it's common
23:37:19OrionPKyeah it uses idetools
23:37:22dom96it is? Not in my experience.
23:37:34dom96well, not fast enough for idetools
23:37:34Demos_yeah, nimrod.vim special cases stuff like add, del, and echo
23:37:42OrionPKDemos_ ahh nice, just hit F12 :)
23:37:47OrionPKon readline
23:37:54OrionPKthat works in ST2 as well
23:38:01Demos_dom96, I use it for ctrl-space suggestions and go to definition
23:38:41Demos_although come to think of it just builing a list of everything with a * after it would work OK
23:39:54OrionPKyeah this is workin nicely
23:40:12OrionPKit'd be cool if I could just open a folder
23:41:00OrionPKDemos_ you dont have the block keyword
23:41:16OrionPKor static
23:41:22dom96odd, it doesn't work in Aporia
23:41:31*dom96 assumed it was broken in the compiler
23:41:33Demos_damn
23:41:46OrionPKwhat doesnt work in aporia?
23:42:10OrionPKDemos_ also an highlighting characters
23:42:16dom96Go to definition
23:42:22Demos_yeah the char thing I need to work on
23:42:28Demos_but I just added block and static
23:42:38OrionPKtake a look at Varriount/NimLime
23:42:39dom96so how do I install this plugin?
23:42:56Demos_geesus it is in heavy beta
23:43:37OrionPKDemos_ if you clean up some of the old stuff and help me get F5 to test the plugin I might try helping contribute to the plugin ;P
23:44:06dom96I may give up on Aporia and contribute too :P
23:44:11Demos_f5 to test?
23:44:12OrionPKim a lot better at C# than nimrod
23:44:30OrionPKI mean able to build and run the plugin to launch a new instance of visual studio and test the plugin
23:44:44OrionPKinstead of having to browse to the vsix and uninstall/reinstall it
23:44:46OrionPKit's a pain
23:45:02Demos_https://onedrive.live.com/redir?resid=BE38BDD0FF029113!17198&authkey=!AJSbdatljKDgwdc&ithint=file%2c.vsix
23:45:05Demos_for dom96
23:45:31OrionPKhow do you get the breakpoint stuff going?
23:45:40Demos_just building it adds the plugin to the experimental instance of VS
23:46:08OrionPKoh really
23:46:22OrionPKwhats the experimental instance of VS
23:46:51dom96yeah, that sounds dangerous lol
23:47:35OrionPKthats what I cant get to launch, I think.. this 'experimental instance'
23:47:36Demos_it is just a seperate envirenment for VS so that you dont break your tools with your tools
23:48:42Demos_well I think I just got start to launch it for you
23:48:42OrionPKyeah but how do you launch it
23:50:05OrionPKstart just gives me that error about starting a library
23:50:12Demos_well the VS SDK adds a start menu shortcut to the exp instance
23:50:18OrionPKahhh
23:50:23OrionPKboom
23:50:25OrionPKthat's the ticket
23:50:30Demos_I got start to work but it wont synch to git because the changes are in the .user file I think
23:50:38OrionPKahh
23:50:38OrionPKlame
23:50:50Demos_the VS extensibility API is a total clusterfuck
23:50:56dom96I guess I need to install VS SDK
23:51:28OrionPKare you going to remove the dependencies on libnimrod
23:51:45Demos_I mean you dont actually need it right now
23:52:06Demos_I have just not removed the deps from the project yet. I guess I should do that
23:52:17OrionPK"block:" isn't highlighted
23:52:28OrionPKblock name:
23:52:29OrionPKis
23:52:36Demos_yeah, bug in the tokenizer
23:52:41OrionPKgotcha
23:53:09OrionPKI think there's a list of actual keywords kept in the compiler source
23:53:27Demos_I got my list from the manual list of reserved words
23:53:40OrionPKhttps://github.com/Araq/Nimrod/blob/05e89ffceb4a0cb85b59eb1ca34d27b0d5cb63dd/lib/packages/docutils/highlite.nim
23:53:51OrionPKnimrodKeywords = [..]
23:54:19Demos_yeah, that is not actually the problem atm though
23:54:22Demos_not with block:
23:54:25OrionPKno, I know
23:54:29Demos_it is just that I parse block: as one token
23:54:33Demos_and block: is not a keyword
23:54:35Demos_block: is
23:54:41Demos_erm block is
23:54:45OrionPKi got that that wasnt the issue
23:55:08*Trustable quit (Quit: Leaving)
23:55:21dom96where the hell do I download this SDK?
23:55:35dom96nvm
23:55:38OrionPKhttp://msdn.microsoft.com/en-us/vstudio/vextend.aspx
23:55:40dom96my google-fu failed me momentarily
23:56:00Demos_as usual you need VS pro or above
23:56:05Demos_and the project is for VS 2013
23:56:36dom96yeah, got that.
23:56:41dom96Thanks to Dreamspark :D
23:57:02OrionPKwill the plugin work in express?
23:57:54dom96yeah, why does it only work in professional?
23:58:12OrionPKMAKING the plugin only works in professional
23:58:16OrionPKand up
23:58:26OrionPKim wondering about using it
23:58:46dom96i see
23:58:59Demos_no. Plugins only work in professional and above
23:59:40OrionPKahh, that's a shame.