<< 26-06-2014 >>

00:11:39*goobles joined #nimrod
00:23:29*q66 quit (Ping timeout: 252 seconds)
00:35:53*q66 joined #nimrod
00:49:16*Trustable quit (Quit: Leaving)
00:50:24*superfunc quit (Ping timeout: 255 seconds)
00:58:46*Kazimuth joined #nimrod
01:13:36*q66 quit (Quit: Leaving)
01:22:48*brson quit (Ping timeout: 255 seconds)
01:30:23*Kazimuth quit (Remote host closed the connection)
01:31:26*hoverbear joined #nimrod
01:35:05*xenagi joined #nimrod
02:06:48*hoverbea_ joined #nimrod
02:07:57*t0ryzal joined #nimrod
02:08:33*btiffin quit (Ping timeout: 240 seconds)
02:10:11*hoverbear quit (Ping timeout: 244 seconds)
02:15:40*t0ryzal left #nimrod ("Leaving")
02:20:11*btiffin joined #nimrod
02:21:37BlameStrosshas anybody declared intent to make a RPC library or wrapper?
02:22:05BlameStrossI'm only just learning nimrod, and it seems like a good learning project for me.
02:29:49*Demos quit (Ping timeout: 244 seconds)
02:38:09def-BlameStross: probably everyone sleeping
02:40:06def-BlameStross: i haven't heard anything about an RPC library for nimrod
02:43:26*Demos joined #nimrod
02:47:22*goobles quit (Ping timeout: 246 seconds)
03:06:17*darkfusion quit (Ping timeout: 264 seconds)
03:12:52*superfunc joined #nimrod
03:14:45*darkfusion joined #nimrod
03:16:03BlameStrossdef-: I haven't seen any object serialization stuff either, that might be the hard part.
03:20:55*brson joined #nimrod
03:22:05*flaviu quit (Ping timeout: 272 seconds)
03:24:35*vendethiel quit (Ping timeout: 244 seconds)
03:25:19*vendethiel joined #nimrod
03:31:15*brson quit (Quit: leaving)
03:44:13*Demos quit (Ping timeout: 244 seconds)
03:57:42*superfunc quit (Read error: Connection reset by peer)
04:04:29*joelmo quit (Quit: Connection closed for inactivity)
04:28:39*xenagi quit (Quit: Leaving)
04:49:42*vendethiel quit (Ping timeout: 240 seconds)
05:38:42*vendethiel joined #nimrod
05:48:17*gkoller joined #nimrod
05:49:05*nande quit (Remote host closed the connection)
06:12:33*reactormonk quit (Ping timeout: 240 seconds)
06:34:35*Skrylar joined #nimrod
06:45:28*hoverbea_ quit ()
07:02:10*reactormonk joined #nimrod
08:09:22*BitPuffin quit (Ping timeout: 245 seconds)
09:01:41AraqBlameStross: we decided marshal.ni + zeroMQ is good enough for RPC for now
09:01:48Araq*marshal.nim
09:04:56*BitPuffin joined #nimrod
10:07:31*kunev joined #nimrod
10:50:57*nequitans quit (Read error: Connection reset by peer)
10:51:13*io2 joined #nimrod
10:51:17*nequitans joined #nimrod
11:16:10dom96hello
11:27:47Araqservus dom96
11:34:33*kunev_ joined #nimrod
11:36:27*kunev quit (Ping timeout: 244 seconds)
11:36:58*kunev_ quit (Client Quit)
11:37:08*kunev joined #nimrod
11:50:26*saml_ joined #nimrod
12:00:33BlameStrossAraq: You are probably right. I was considering just writing a zeroMQ wrapper.
12:03:42*kshlm joined #nimrod
12:13:04*Nimrod__ joined #nimrod
12:13:20*Nimrod__ is now known as Nimrod
12:13:30*Nimrod quit (Changing host)
12:13:30*Nimrod joined #nimrod
12:19:35*Boscop quit (Ping timeout: 252 seconds)
12:24:51*untitaker quit (Ping timeout: 272 seconds)
12:28:00*kemet joined #nimrod
12:29:45*untitaker joined #nimrod
12:31:55*kemet quit (Client Quit)
12:49:43*saml_ quit (Ping timeout: 240 seconds)
12:51:32*Fr4n joined #nimrod
12:54:44AraqBlameStross: we have one as a babel package or in the stdlib
12:54:50AraqFr4n: welcome
12:55:43*BitPuffin quit (Ping timeout: 240 seconds)
13:04:57*darkf quit (Quit: Leaving)
13:06:00*io2 quit (Ping timeout: 260 seconds)
13:16:07*def- left #nimrod (#nimrod)
13:30:30BlameStrossI was hoping to produce something resembling useful while learning :/ I could implement a DHT back-end, but I do not think that is something this community needs that badly.
13:32:06dom96BlameStross: While ZMQ may be "good enough" some people (like myself) dislike the additional dependency. A native Nimrod RPC lib would be nice to have.
13:32:33BlameStrossdom96: Lets start the holy war then: Json or XML?
13:32:40dom96JSON :P
13:33:11Araqwhat's a DHT backend?
13:33:28BlameStrossI'd lean towards json too. The question is: do you want to be reverse compatible with all the stuff that used XML.
13:33:49BlameStrosshttp://en.wikipedia.org/wiki/Distributed_hash_table
13:35:02BlameStrossThere are a few different ways to organize them (with differing pros and cons) but essentially it would let in instantiate and object with an ip and port of another node, then do hash-table style writes and reads to a robust distributed data structure.
13:35:30BlameStrossI'd make two client objects, a pure client and a contributing peer.
13:37:11Araqwell what we badly need is a parser generator :-)
13:38:22BlameStrosswell, that would be one way to begin mastering nimrod.
13:39:14Araqor a pure nimrod bignum library
13:39:52BlameStrossI already started looking into the bignum. It would not be hard to implement, but it would be hard to make easy to use.
13:40:15AraqI don't think so
13:40:33dom96Didn't someone already start working on a bignum lib?
13:40:53Araqyeah but I didn't hear from any progress
13:41:18Araqbut maybe I'm wrong and Skrylar already finished it and didn't tell us
13:41:25BlameStrossI was going to need a bignum library to make a lot of the DHT math saneish.
13:41:45BlameStrossI'll look into it and get back
13:43:09Araqyou could also help with our CEF bindings ... there is no shortage of useful work to be done :-)
13:43:18*flaviu joined #nimrod
13:45:14BlameStrosshttp://forum.nimrod-lang.org/t/472 might be interesting
13:47:24*BlameStross left #nimrod (#nimrod)
14:00:19NimBotAraq/Nimrod new_spawn e712dba Araq [+0 ±1 -0]: added OEMCP for the default OEM codepage
14:00:19NimBotAraq/Nimrod new_spawn eed443d Araq [+1 ±6 -0]: rewrote lambdalifting; fixes deeply nested closures
14:00:38*io2 joined #nimrod
14:00:46Araqdom96: I pushed it into new_spawn for now
14:01:02dom96Araq: that's a bit misleading :P
14:01:14Araqwhen it works flawlessly with async, I'll merge into devel
14:01:30dom96ok, i'll test it now
14:02:20Araqsee you later
14:03:31dom96hm, devel can't build new_spawn?
14:22:45flyxthere isn't any stack type in the stdlib, is there?
14:26:57dom96flyx: there is a pop proc for seq
14:28:21flyxdom96: ah, good
14:41:43*kshlm quit (Ping timeout: 240 seconds)
14:44:07*BlameStross_ joined #nimrod
14:47:33BlameStross_Is there an upper limit to string length? Or will nimrod be happy to fill ram and swap with one very large string?
14:47:37*kunev quit (Quit: leaving)
14:49:08BlameStross_I'm starting to work out how to approach writing bigInt. If I want it truely unbounded by anything but memory, I need a data structure with unbounded size. Arrays are bound to being indexed by ints, so that leaves linked lists, or hopefully strings
14:49:19EXetoCnot all the ram, because the length is represented by int
14:49:33flaviuEXetoC: Ints are frequently int64s
14:50:24flaviuBlameStross_: Strings are implemented as `seq[char]` last time I checked
14:50:41EXetoCwell yes in practice, when it is
14:50:41flaviuOr very similar to them
14:52:38BlameStross_ok, then the best I could get with indexed lists would be seq[uint64]?
14:54:14flaviuYes, although I wouldn't worry about it. A number bigger than can be sequenced is utterly insane.
14:54:17BlameStross_that gets me close to 10^10^10 as max
14:54:47flaviuI'd actually go with uint32s so I could observe overflow more easily
14:54:51BlameStross_Well, it is possible for me to implement everything on a linked-list and have it really be unbounded
14:55:08EXetoClinked list? hm
14:55:21BlameStross_I have not even figured out how to detect overflow yet. I figure this project will force me to learn every aspect of nimrod
14:56:34flaviuI don't think theres a way to detect overflow except to widen uint32s to uint64s and see if the result is greater than high(uint32)
14:56:59BlameStross_bleh. It looks like the floats throw overflow exceptions.
14:59:04BlameStross_ok, I could used signed 64-bit then check the sign to detect overflow
14:59:31BlameStross_that gives me 63 useful bits
15:00:01*gkoller quit (Ping timeout: 276 seconds)
15:02:32dom96BlameStross_: maybe you can use this as a starting point https://github.com/ventor3000/nimrod-lab/blob/master/bigint.nim
15:03:32flaviuI also have a partial bignum implemented, but I haven't tested it at all: https://gist.github.com/4751986bb8e08f223228
15:04:23dom96Skrylar: Did you also start work on a bignum lib?
15:05:11BlameStross_it is that multiplication and division that are going to be hard
15:05:29flaviuBlameStross_: FWI, GMP only goes up to 2^37
15:06:12AraqBlameStross_: anything except 'seq' seems to be a bad idea for bignums
15:06:59BlameStross_Araq: I think yoru right, but I wanted to explore options. There may be room for reallybignum in the future.
15:07:36Araq'seq' can already use all of your RAM, as far as reasonable
15:08:25dom96Araq: https://gist.github.com/dom96/54f99a5bc5d542d28b25
15:08:31dom96You're going to have to clone jester now
15:08:50*BitPuffin joined #nimrod
15:08:55dom96Araq: Good news is that only one part of it results in that error.
15:09:04dom96Araq: So good job, still haven't tested it though
15:09:27BlameStross_no bit shift operator?
15:09:34dom96BlameStross_: shr/shl
15:09:51BlameStross_dom96: thanks
15:10:40Araqdom96: :-(
15:10:49Araqthis is killing me
15:12:43dom96Araq: You've gotten this far, now it should be smooth sailing.
15:13:20*def- joined #nimrod
15:17:57dom96Unfortunately jester doesn't work.
15:18:34Araqjester doesn't work with devel either, right?
15:18:44dom96yes
15:19:06Araqdoes that mean anything then?
15:19:17dom96I should clarify.
15:19:20dom96It compiles.
15:19:23dom96But doesn't work.
15:19:35Araqwhy?
15:19:40dom96On devel it doesn't compile because nested closures don't work.
15:19:56dom96No idea. A future is being completed twice somewhere.
15:22:37dom96Interestingly it does manage to reply to the browser.
15:23:48dom96Argh. The fact that the dispatcher catches all exceptions is ugly.
15:26:29*kunev joined #nimrod
15:30:54*kshlm joined #nimrod
15:36:00EXetoCmildly
15:44:07*goobles joined #nimrod
15:44:26Araqdom96: jester compiles for me ...
15:44:39Araqtests\testapp right?
15:44:42dom96no
15:44:52dom96tests/asynctest
15:45:08Araqah ok
15:45:29Araqwell that too
15:45:49Araqbut I pulled master
15:46:08Araqare you in a different branch?
15:48:17dom96yes
15:48:20dom96new-async
15:48:29dom96oh
15:48:36dom96and you need my changes to asynchttpserver
15:48:55dom96which may be problematic unless you can merge devel into newasync
15:52:10Araq...
15:53:32dom96you can always just switch to devel and copy the changes manually
15:57:18Araqah I already merged devel into new_spawn
15:57:23Araqif that's what you meant
15:57:30Araqand yeah, I can reproduce
15:58:40*io2 quit (Ping timeout: 260 seconds)
16:00:08dom96good
16:00:31dom96it's caused by the last 'get' in routes.nim
16:00:47BlameStross_what is the standard format for a constructor proc?
16:02:26EXetoCinitTType(...): TType for value types and newType(...): PType for pointer types
16:02:44Araqno, initType or newType
16:03:03Araqdunno why people sometimes use initTType but it's wrong
16:03:08EXetoCtypo
16:03:18EXetoCI haven't seen that before
16:03:29Araqdom96: what does 'get' expand into? roughly speaking
16:04:11BlameStross_I was going to ask: what isthe all the TTypename stuff? Hungarian notation?
16:04:39AraqTType # value based type
16:04:42dom96Araq: take a look at jester.matchAddPattern, it's basically an async proc which gets added to the list of routes
16:04:46AraqPType # reference based type
16:05:22AraqBlameStross_: it's useful but too many people dislike it, so new code doesn't use it and we'll get rid of the other typenames too
16:07:13Araqdom96: ok so the 'i' for loop variable is not captured at all
16:07:45dom96Araq: I see.
16:07:51dom96easy to fix?
16:08:05*hoverbear joined #nimrod
16:08:13flaviuI thought there was a newSeqOfCap?
16:10:18EXetoCfor strings only
16:10:58EXetoCit was just an oversight IIRC
16:13:02BlameStross_huh, I just it to throw an overflow error on int64
16:13:32flaviuBlameStross_: Try something like `{.push overflowError: off.}` iirc
16:14:12flaviuBlameStross_: But unless you really really know what you're doing, I'd encourage you to just use uint32s and save a ton of hassle
16:14:42BlameStross_I want it to throw an error, previously it did not. I am not sure what I did to change that.
16:16:18flaviuEXetoC: Ok, did you find a workaround?
16:17:41*Matthias247 joined #nimrod
16:18:29BlameStross_WHat I want to do is detect the overflow then allow it to operate normally.
16:21:00*kunev quit (Ping timeout: 255 seconds)
16:28:48*Boscop joined #nimrod
16:35:41Araqdom96: what does 'send' do?
16:36:10dom96Araq: it's a template defined in jester
16:37:17Araqwell that produces another async proc
16:37:24Araqso it IS a capture after all
16:40:56dom96i never said it wasn't :P
16:42:37flyxhow fast (or slow) is the VM?
16:42:56flyxcompared to compiled nimrod code
16:43:01Araqflyx: faster than python as far as I can tell
16:43:17BlameStross_https://github.com/blamestross/nimrod-BigInt is now a horribly incomplete thing
16:43:27flyxit *does* take a while, but my code might just be really inefficient
16:43:36Araqcompared to compiled nimrod code? factor 10-20 perhaps
16:46:43Araqdom96: when I rename 'i' to 'foobarbaz' it fails in a different way
16:46:58Araqthen it can't find 'response' ...
16:47:47dom96response is defined in the `cb` which is defined in matchAddResponse
16:47:51*Demos joined #nimrod
16:48:01dom96but note that it's an async proc
16:48:11dom96so it gets transformed into an iterator
16:48:25Araqah
16:48:35Araqdoes that mean it's in fact a double indirection?
16:50:47flaviuBlameStross_: For maxInt, try int64(high(int32))
16:52:34dom96Araq: define indirection
16:53:52Araqmeh no
16:56:05flaviuOr maybe don't, high(uint32) + 1 == 2 shl 31
16:58:17Araqdom96: well I just checked an even more complex test program with a "double indirection" and it works
16:58:25Araqso it's slightly subtle
17:01:55BlameStross_flaviu: int64(high(int32)) communicates what it represents better
17:02:29dom96Araq: well apart from that (and other issues which are not to do with nested closures) jester works.
17:07:01*q66 joined #nimrod
17:13:29Araq0:1 !
17:14:32dom96:(
17:14:52Araqfor germany
17:14:57Araqhey, why the :-( ?
17:15:19dom96Because I want USA to win :P
17:15:43Araqfu
17:15:51dom96Germany wins all the time
17:15:52dom96it's boring
17:16:21Araqlol no
17:26:02Araqhmm I think I should name my branch 'araq' ...
17:26:09Araqand then that's the devel devel branch
17:33:46Demosdoes anyone have a windows 64-bit binary of PCRE sitting around?
17:38:24AraqDemos: ask Varriount
17:38:35DemosVarriount, I am asking you the above
17:41:09dom96Araq: you should name it after the feature you are working on
17:45:28*Matthias247 quit (Read error: Connection reset by peer)
17:52:47BlameStross_Do people want full ordinal type integration with bigints?
17:52:57*gkoller joined #nimrod
17:53:06BlameStross_everything but ord(BigInt) works
17:53:50BlameStross_even then I can do something like ord(BigInt) = bottom 32 digits
18:01:08*superfunc joined #nimrod
18:02:06superfuncthanks for the advice dom, it worked
18:03:00dom96superfunc: what advice did I give you? I can't even remember lol
18:03:31superfuncoh, the deadcodeelim for fixing sdl2
18:03:49dom96oh right
18:03:52dom96no problem
18:04:07BlameStross_so, docs are not much help: 0'u32 == 0'u32 #how do I compare unsigned ints?
18:04:33dom96BlameStross_: import unsigned
18:07:10BlameStross_thanks
18:07:38BlameStross_now just to fight the off-by-one errors in my 2's complement code
18:08:31superfuncBlameStross_: What are you working on?
18:08:42BlameStross_BigInt
18:08:58BlameStross_working on comparison code right now
18:09:14BlameStross_then going to use that to bootstrap fun stuff like *,/, mod
18:09:42BlameStross_I'm hesitant to offer pow, but I could do chinese remainder
18:21:05flyxseems like I don't have any TODOs for my html templating engine left. which means, it's ready for beta-release!
18:28:38Demosyay!
18:29:53superfuncMy game just keeps piling up TODOs haha
18:30:23BlameStross_is there a fast/polite int -> hex string function floating around?
18:31:32flyxhum, defining a babel package will be difficult
18:31:55*nande joined #nimrod
18:32:00flyxmy code depends on several pull requests that have not even been merged
18:32:01*superfun1 joined #nimrod
18:32:21BlameStross_found one: strutils
18:32:47Demosflyx, bug someone to merge them... sometimes prs can sit around for way too long
18:34:03dom96unfortunately we mostly only merge them when one of us goes on a PR merging spree
18:34:41superfun1lol
18:38:06flyxso, does anyone feel like spreeing right now?
18:38:50Araqflyx: which ones?
18:39:15flyx1306 and 1308
18:42:42Araqcan't merge it
18:42:55Araq'or' should really be '+' and 'and' should be '*'
18:43:03Araqfor consistency with the builtin sets
18:43:12flyxah
18:43:34Araqand it's -+- for the symmetricDifference but don't bother
18:43:47AraqI have yet to see a single use case for that one
18:44:09flyxwell if I fix the other ones I can fix that one as well
18:45:51*Demos quit (*.net *.split)
18:45:51*flaviu quit (*.net *.split)
18:45:53*Varriount quit (*.net *.split)
18:45:55*kshlm quit (*.net *.split)
18:45:57*silven quit (*.net *.split)
18:45:57*def- quit (*.net *.split)
18:45:58*TylerE quit (*.net *.split)
18:45:59*clone1018 quit (*.net *.split)
18:46:00*betawaffle quit (*.net *.split)
18:46:47*Demos joined #nimrod
18:46:47*kshlm joined #nimrod
18:46:47*def- joined #nimrod
18:46:47*flaviu joined #nimrod
18:46:47*TylerE joined #nimrod
18:46:47*Varriount joined #nimrod
18:46:47*silven joined #nimrod
18:46:47*clone1018 joined #nimrod
18:46:47*betawaffle joined #nimrod
18:48:15*gkoller quit (*.net *.split)
18:48:15*skroll quit (*.net *.split)
18:48:15*oddmunds quit (*.net *.split)
18:48:16*phI||Ip quit (*.net *.split)
18:48:33*skroll joined #nimrod
18:49:00*oddmunds joined #nimrod
18:49:30*phI||Ip joined #nimrod
18:49:56flyxinteresting. github automatically adds my new commit to the pull request
18:50:15flyxAraq: updated
18:51:47NimBotAraq/Nimrod devel b090b7e Felix Krause [+0 ±1 -0]: Fixed handling swap in vmgen
18:51:47NimBotAraq/Nimrod devel bdd3b6c Felix Krause [+1 ±1 -0]: Added logical set operations to TSet
18:51:47NimBotAraq/Nimrod devel 8c93d3e Andreas Rumpf [+1 ±2 -0]: Merge pull request #1306 from flyx/devel... 2 more lines
18:52:18Araqgah now I can't pull your next PR
18:52:27flyxargh
18:52:27Araqany ideas?
18:53:05flyxum. I rebase my second PR on the first one and submit it again
18:55:05flyxcurious why there are merge conflicts. the two have not one file in common
18:56:55*Demos quit (*.net *.split)
18:56:56*flaviu quit (*.net *.split)
18:56:57*Varriount quit (*.net *.split)
18:58:22*brihat quit (Quit: ERC Version 5.3 (IRC client for Emacs))
18:59:11*joelmo joined #nimrod
18:59:47flyxAraq: I see what happened. *somehow* my first commit of the second PR made it into the first PR: https://github.com/Araq/Nimrod/pull/1306
19:00:09flyxthis wasn't in there when I created the PR
19:00:49flyxI guess I have to be careful about this github „auto-add commits to existing PRs“ thing
19:01:02flyxanyway, I fixed it, 1308 should be mergable again
19:01:46*BlameStross_ quit (Ping timeout: 246 seconds)
19:02:11NimBotAraq/Nimrod devel 84643ab Felix Krause [+0 ±1 -0]: Fixed doc comments in sets.nim
19:02:11NimBotAraq/Nimrod devel ac3f872 Felix Krause [+0 ±2 -0]: Fixed TSet proc names to conform with set
19:02:11NimBotAraq/Nimrod devel cb09723 Andreas Rumpf [+0 ±2 -0]: Merge pull request #1308 from flyx/tset_additions... 2 more lines
19:02:40*io2 joined #nimrod
19:02:58flyxthanks!
19:04:05*Trustable joined #nimrod
19:04:09Araqdef-: I think keepItIf is a better name than keepIfIt, though that's open for a debate
19:04:21NimBotAraq/Nimrod devel ca1c516 Clay Sweetser [+0 ±2 -0]: Fixing issue #1090
19:04:21NimBotAraq/Nimrod devel 912ad82 Clay Sweetser [+0 ±1 -0]: Fixed #1090
19:04:21NimBotAraq/Nimrod devel 92d1da4 Andreas Rumpf [+0 ±2 -0]: Merge pull request #1278 from Varriount/fix-1090... 2 more lines
19:05:43*superfun1 quit (Quit: leaving)
19:05:43*superfunc quit (Read error: Connection reset by peer)
19:06:42def-Araq: alright
19:07:02*gkoller joined #nimrod
19:07:14*superfunc joined #nimrod
19:11:27*superfun2 joined #nimrod
19:13:04*superfunc quit (Quit: leaving)
19:14:40Araqdom96: you have a proc->iterator->proc->iterator chain
19:15:08Araqand a proc->iterator->proc->proc chain
19:15:11*Varriount joined #nimrod
19:16:17dom96Araq: ok? is that bad?
19:16:43Araqwell once I fix the compiler bug it remains slow
19:17:14Araqbut hey, at least we don't block :P
19:18:41dom96we can think about optimizing later
19:19:07*Demos joined #nimrod
19:19:07*flaviu joined #nimrod
19:19:16Araqhow so? your jester interface is essentially not optimizable
19:19:35Araqchange the implementation and all client code breaks
19:20:08dom96Araq: Like I said multiple times, I never released jester so breaking client code isn't a problem.
19:20:15Araqok ok
19:20:27Araqeither way it's a nice stress test
19:20:43dom96brb
19:24:34*superfunc joined #nimrod
19:29:47*kunev joined #nimrod
19:35:41*fowl joined #nimrod
19:38:20*nande quit (Remote host closed the connection)
19:38:30*superfunc quit (Quit: leaving)
19:41:13*gkoller quit (Ping timeout: 248 seconds)
19:41:16*io2 quit (Ping timeout: 260 seconds)
19:45:12*superfun2 quit (Ping timeout: 245 seconds)
19:47:34dom96back
19:49:00Araqwell even extracting the control flow out of your mess takes quite some time ...
19:49:20*Araq is trying to come up with a minimal example
19:51:57dom96"mess"? Excuse me. Jester is the second most stargazed nimrod project on Github, give it some respect.
19:52:31*Edelwin joined #nimrod
19:52:39Araqhi Edelwin welcome
19:52:43Edelwinhi Araq
19:52:58*boydgreenfield joined #nimrod
19:53:00Araqdom96: well I'm looking at the code Jester produces
19:53:13Araqgenerated code usually is messy
19:53:37Araqin this case it's making my head explode, but whatever
19:56:25*Jesin quit (Quit: Leaving)
19:57:11Araqdom96: yield foo()() ? but 'foo' is a proc returning PFuture[void]
19:57:20dom96well it is jester + async
19:57:23dom96so i'm not surprised
19:57:26Araqhow does that work?
19:57:43dom96it yields the returned future?
20:00:00Araqbut there are two ()
20:00:37Araqdo you overload () ?
20:00:43dom96no
20:01:06dom96I assume whatever way your outputting the generated code makes a mistake.
20:01:11dom96*you're
20:01:21Araqhmm possible
20:01:30EdelwinAraq: where (and how) can I add custom compilation options for GCC? such as -fstack-protector, -Wstack-protector, -j3...
20:02:38AraqEdelwin: --passC:"option here", you can also put that into your config file
20:02:43Edelwin<3
20:02:48Edelwinthank you
20:02:50Araqwhat's a stack protector?
20:03:06Araqstacks already have a guard page
20:03:46flyxdom96: jester looks interesting. is it usable yet?
20:03:48Edelwinhttps://en.wikipedia.org/wiki/Buffer_overflow_protection
20:04:18dom96flyx: not yet
20:04:23Edelwinhttp://wiki.osdev.org/GCC_Stack_Smashing_Protector Araq
20:04:36*askatasuna joined #nimrod
20:05:07flyxdom96: I worried I need to implement something like that myself to use my templating engine
20:05:34EdelwinAraq: so, the config file would act as Makefile, no?
20:05:43Araqyeah
20:06:05Araqbut you don't need "stack protection" in nimrod code really, nimrod is not C
20:06:09dom96flyx: you can use it already but I would wait if I were you until I get it to work with the new async stuff
20:06:18EdelwinAraq: it was an example
20:06:28Araqgood
20:06:29Edelwin-jx is more intersting :p
20:06:36Edelwin+e
20:06:56flyxdom96: I have still much to do in my templates. I have a working version, but it still needs some work to be a *nicely* working version
20:08:16AraqEdelwin: what's that?
20:09:56EdelwinAraq: how many jobs during the compilation. If I have to build a big program, and that I have, let's say, 4 threads, I'd use -j5
20:10:12*BlameStross1 joined #nimrod
20:10:20dom96isn't that what --parallelBuild uses?
20:10:24Edelwinbut it's a CC option, maybe nimrod has an option that does the same
20:10:30Edelwindom96: yeah might be that
20:10:37Araqyeah that's comparable
20:10:46EdelwinI didn't read the whole manual yet :x
20:11:00Araqand it's active by default and detects the number of cores you have ...
20:11:12Edelwinwow *_*
20:11:14Edelwin<3
20:12:51flyxum, is there any best practice where to put my package in the babel package list?
20:13:01flyxit doesn't seem to be sorted at all
20:13:13Demosat the bottom
20:13:19Demosat least that is what I do
20:14:55Araqis it too late to replace the package list with an sqlite database stored in plaintext?
20:15:00AraqI guess it is ...
20:17:32*brson joined #nimrod
20:18:03Araqflaviu: how would you have designed the list of packages?
20:19:26flyxAraq: would that be editable more easily?
20:20:03dom96that would an extra dependency
20:20:07dom96*add an
20:22:38dom96Araq: My workaround only got me this far
20:22:40dom96I have a problem
20:23:03Araqwell I'm working on it
20:23:08dom96not that
20:23:23dom96I have a /different/ problem
20:23:35Araqbah
20:23:44*Matthias247 joined #nimrod
20:23:47dom96I have templates which contain stuff like 'return' and 'await'
20:23:56dom96the async macro needs to transform those
20:24:09dom96but when it performs its transformations those templates have not been expanded yet
20:24:55Araqis your async macro immediate?
20:25:03fowlEdelwin, nimrod
20:25:10Edelwinfowl: :p
20:25:11fowlEdelwin, er, nimrod's make is called nake
20:25:18Edelwinokay
20:25:20dom96Araq: yes
20:26:45Araqwhat happens when it's not immediate?
20:27:07Edelwinhmmm it's not very logical to get rid of the parentheses when you do ```echo "foo =", foo``` when you could keep them to do echo("foo =",foo)
20:27:14Edelwin(it's my opinion.=
20:27:16Edelwin*)
20:28:17dom96Araq: huh, I get a weird error: invalid visibility '*'
20:28:25Araqgetting rid of parentheses is the whole point of a syntax. otherwise I would have created a Lisp, Edelwin
20:28:47Edelwinhahaha :')
20:28:59EdelwinI just don't understand why you half-use them ;)
20:29:03dom96perhaps if I turn 'get' into a macro?
20:29:33Araqdom96: well no, that's another issue, easy to fix
20:29:55dom96Araq: I think it has to be immediate
20:30:06dom96Araq: Otherwise I will get 'undeclared identifier 'await''.
20:30:29Araqwell you need a dymmy 'await' yes
20:31:13dom96I also won't be able to do 'result = ""'
20:31:17dom96in my async procs
20:31:30dom96in summary it will break code.
20:31:49dom96but what if I make 'get' a macro
20:31:52dom96which is not immediate?
20:31:52AraqI don't understand this, what do you mean with result = ""?
20:32:42dom96https://github.com/Araq/Nimrod/blob/devel/lib/pure/asyncdispatch.nim#L1033
20:33:04dom96The return type is PFuture[string]
20:33:15Araqgot it
20:33:18dom96I guess I could make it 'string'
20:33:31dom96but who knows what other issues there are
20:34:13dom96what about my 'get' as a macro idea?
20:34:22dom96you wanted me to do that anyway IIRC
20:34:39Araqhmm not sure what you mean
20:34:56dom96flyx: you need a .babel file
20:34:59Araqis 'return' only useful in 'get'?
20:35:26dom96get "/halt": halt "blah"; resp "asdaf"
20:35:40flyxdom96: oh, I forgot to push
20:35:50*Mat3 joined #nimrod
20:35:56dom96template halt(txt) = response.content = txt; return
20:36:08flyxdone.
20:36:15Mat3Hello
20:36:19dom96the body of 'get' ends up in an async proc
20:36:45dom96the async macro gets the code as it looks above
20:36:56Araqso how do you transform 'return' then? into a 'raise'?
20:37:04dom96no
20:37:15dom96into a yield; retFuture.complete
20:37:18dom96er
20:37:22dom96other way around
20:37:31dom96or something like that can't remember
20:37:36dom96the retFuture.complete is the important part
20:38:06dom96because when the iterator finishes its associated future must be completed
20:38:18dom96and no I can't just write 'retFuture.complete' in my halt template
20:38:24dom96because retFuture is genSym'd
20:40:21Araqhi Mat3
20:40:31Mat3Hi Araq
20:41:18flyxhow large is an enum? can I set its size, so that I can define a set[TEnumType] with it?
20:41:25dom96Araq: now, do you understand?
20:41:36Araqdom96: of course
20:42:00fowlflyx, size pragma
20:42:01dom96flyx: Did you test your babel package?
20:42:03Araqflyx: don't mess with the size, it's optimal for set[TEnumType]
20:42:11dom96Araq: What is your advice then?
20:42:22dom96Araq: is my 'get' as a macro idea worth pursuing?
20:42:53Araqlooks like it, but the 'gensym' problem remains when get is a macro afaict
20:43:11Araqthe real problem for Jester is that you chose
20:43:17Araqget "foo": stuff
20:43:21Araqget "foo2": stuff2
20:43:28Araqwhereas the language rewards:
20:43:41Araqdispatch:
20:43:45Mat3have someone before build Nimrod on an Android tablet ?
20:43:46Araq get "foo": stuff
20:43:55Araq get "foo2": stuff2
20:44:04Araqso 'dispatch' gets the whole picture
20:44:23Araqno need to mess with a global 'j' etc.
20:44:27dom96Araq: I can do that.
20:44:37dom96hrm, true.
20:44:42dom96I will do that then.
20:44:49dom96the gensym problem should disappear
20:44:57dom96because the templates will be expanded
20:45:00Araqit's cleaner too this way
20:45:10Araqin fact
20:45:15AraqI like it MUCH better
20:45:16dom96and I can just put the resulting code into an async proc
20:45:18dom96although
20:45:20flyxdom96: can I test against my fork?
20:45:36dom96flyx: sure
20:45:40flyxah, obviously
20:45:47Mat3After installing GCC and a nice terminal emulator that would be nice
20:45:51dom96but didn't Araq pull your changes?
20:46:04*Jesin joined #nimrod
20:46:13dom96Araq: But if I generate code which uses the async macro from a non-immediate macro what will happen?
20:46:27dom96Araq: sounds to me like that won't work :\
20:46:48dom96flyx: I'm asking because I can already see something that won't work: Requires = "nimrod#head"
20:46:50AraqI don't follow
20:46:57*kunev quit (Ping timeout: 255 seconds)
20:46:58Araq'dispatch' gets the whole AST
20:47:22Araqyou might need to make 'halt' a "keyword" too then in addition to 'await'
20:47:48flyxdom96: hm, okay. how would I do that correcty? I thought this is how the docs specify it
20:48:00dom96Araq: When i'll transform 'get', I will be transforming it so that its body ends up in an async proc.
20:48:31dom96Araq: get "/": foobar -> proc foo() {.async.} = foobar
20:48:56dom96Araq: (let's not worry about the details of handling the path ("/") for now.)
20:49:00Araqyes. so?
20:49:19dom96Araq: So will that work if a non-immediate macro generates it?
20:49:30dom96Araq: Keeping in mind that async will remain an immediate macro?
20:49:54dom96flyx: You need to specify a version, Requires = "nimrod > 0.9.5"
20:50:12flyxand it works if I use an unreleased version?
20:50:13dom96flyx: well, Requires = "nimrod >= 0.9.5"
20:50:14AraqI don't think that's a problem, dom96 but 'dispatch' can easily be immediate too
20:50:52dom96flyx: It's not perfect of course but as long as the user has version 0.9.5 it will work.
20:51:07dom96Araq: yeah, but then we have the same problem.
20:51:15dom96Araq: Unless I handle 'halt' manually in the macro.
20:52:36dom96Araq: Which I don't like tbh.
20:53:13*Mat3 quit (Quit: Page closed)
20:53:31Araqdom96: that's what I'm suggesting though. 'halt' is special so treat it special
20:55:53dom96yeah, but I have multiple overloads for halt
20:56:03dom96Handling that in a macro will be difficult or even impossible
20:58:36flyxdom96: package works now
21:00:59NimBotnimrod-code/packages master a1ebe6e Felix Krause [+0 ±1 -0]: Added emerald
21:00:59NimBotnimrod-code/packages master 5e6e1d3 Dominik Picheta [+0 ±1 -0]: Merge pull request #66 from flyx/master... 2 more lines
21:02:13dom96voila
21:04:06flyxthanks
21:04:18Araqmultiple overloads for "halt"? I was about to suggest that even 1 "halt" is not required ...
21:04:31flyxhm, how can I benchmark stuff at compile time? the module times seems to work only at runtime
21:04:47dom96Araq: sinatra has it
21:04:49flyxat least as far as cpuTime() is concerned
21:11:10Araqflyx: currently you can't
21:12:22Araqyou could patch the VM though to provide a profiler
21:13:43dom96Araq: if I get rid of the overloads then I can make 'halt' immedaite
21:13:45dom96*immediate
21:14:01dom96which means there is no need to turn get into a macro...
21:14:16Araqif you say so
21:14:32dom96But I don't want to do that
21:14:39dom96so what other alternatives do we have?
21:15:07Araqwhat does 'halt' mean?
21:15:27dom96Araq: stop the execution of a route and respond
21:15:33Araq"stop the 'get' handler"?
21:15:39dom96yes
21:15:53Araqthat's trivially avoided with an 'if' then
21:15:54dom96it's essentially: resp "blah"; return
21:16:11Araqif foo: halt()
21:16:14Araqbar()
21:16:16Araq-->
21:16:22Araqif not foo: bar()
21:16:50Araqand since 'get' handlers shouldn't have much code, it's not an issue to nest
21:18:14flyxwell, bedtime for me. night, folks
21:19:13dom96Araq: ok, what about something like 'redirect' which also stops the route?
21:20:11Araqthat's the same? use nesting, it won't kill you
21:21:03flaviuAraq: Sqlite might work, but not unless there was an automated way to modify the database. People are unlikely to go through the process of installing the sqlite repl, especially windows.
21:21:03flaviuThe current implementation is pretty good, it doesn't use the filesystem as a key-value store, so its fast, and uses json, which is easy to deal with by everyone
21:21:46flaviuWhat problem prompted the question?
21:21:48dom96Araq: I may as well just get rid of all these sinatra things then
21:21:58dom96Araq: But then it loses its charm
21:22:11Araqoh come on
21:22:41Araqhalt and redirect need nesting. big deal. why the extremism?
21:23:08Araqdom96: so here you have it. flaviu thinks your babel repo design is very good.
21:23:28Araqso I'll shut up about it now
21:24:25Araqflaviu: btw was it you who told me I need to rewrite lambdalifting to fix the remaining bugs?
21:24:25dom96Araq: Well then you may as well use asynchttpserver on its own.
21:25:05Araqasynchttpserver doesn't do URL routing at all
21:25:14Araq(I think...)
21:25:23dom96It's just an if away after all
21:25:28dom96Why the extremism? :P
21:25:29Araqwhich is what Jester provides
21:25:30flaviuWhat is the reason behind asking me? I'd like to bikeshed a bit more over this :P, but I'm not sure what its about
21:26:08Araqflaviu: when I don't know something I ask people who know everything
21:27:23flaviuI'm still working on knowing everything, unfortunately :P
21:27:28Araqbut more seriously, your opinion tends to be "reddit compatible", which is what we're optimizing against
21:28:54flaviuReddit might have some fun with the lack of package signing, but the general system doesn't have anything really wrong with it
21:29:56AraqI wonder how representative reddit/hn really is
21:30:09gooblesoh what
21:31:03*Fr4n quit (Ping timeout: 255 seconds)
21:32:16reactormonkmore comments on https://github.com/Araq/Nimrod/pull/1299 please
21:32:39*io2 joined #nimrod
21:34:29*joelmo quit (Quit: Connection closed for inactivity)
21:34:51Araqgah, I don't like it, reactormonk
21:35:07reactormonkAraq, then say something about it there
21:35:31Araqplus gradha really needs to learn how to make cool quotes
21:35:56Araq"bli bla blub" -- Major Motoko Kusanagi what the ...?
21:36:03reactormonk^^
21:36:26dom96Araq: I think he's trying to be funny :P
21:39:11Araq"Heresy grows from idleness"
21:39:18Araqnow was that so hard?
21:40:50Araqdom96: good news I can reproduce it with a small test program
21:43:08reactormonkAraq, put it on github. bit more polite plz.
21:43:47*Fr4n joined #nimrod
21:44:37flaviuAraq: You're right, array[TEnum, Foo] would work for my usecase, but I'm sure that there are some generic usecases where it would be useful
21:46:17fowlflyx, emerald looks pretty cool
21:46:33Araqflaviu: yes but then people use it without noticing the language has something better to offer
21:46:55Araqwe see this already, people using nimrod as if it was some kind of compiled python
21:47:59flaviuFair enough, I thought it was a oversight and expected it to be merged without much discussion, but if you don't want it, don't merge it
21:48:21flaviuI also just realized that the array[Enum, Foo] would not work well for C enums
21:48:44*kshlm quit (Remote host closed the connection)
21:48:53flaviuEspecially the kind that are intended for manual bitset construction
21:49:20AraqI don't care about C's utterly broken notion of an "enum"
21:49:22*johnsoft quit (Ping timeout: 245 seconds)
21:49:22*kshlm joined #nimrod
21:49:58*johnsoft joined #nimrod
21:50:06fowlflaviu, thats why it gives you an error about enums with holes
21:51:00flaviufowl: Really? Great
21:51:18*superfunc joined #nimrod
22:01:40*superfunc quit (Ping timeout: 246 seconds)
22:09:14Araqdom96: lol your code triggers a case that is very similar to what I tested
22:09:33dom96Araq: not similar enough huh? :P
22:09:49Araqit's amazing
22:09:59dom96omg
22:10:01AraqI tested it *really* well with lots of different nestings
22:10:13dom96What is up with these damn nnkDo's popping up out of nowhere?
22:10:30dom96https://gist.github.com/dom96/43e4fa2533b116450bbe
22:10:36dom96that creates an nnkDo
22:10:39dom96it angers me greatly
22:10:50*silven quit (Remote host closed the connection)
22:11:00Araqwell I told zahary it's a bad idea
22:11:03*silven joined #nimrod
22:11:13Araqbut now it's hard to get rid of it in the compiler ...
22:11:21Araqthe idea is that
22:11:22Araqfoo:
22:11:24Araq bar
22:11:28Araqis the same as
22:11:33Araqfoo do:
22:11:34Araq bar
22:12:15dom96you should have stopped him from implementing it IMO
22:12:52dom96why is it hard to remove?
22:13:04Araqbecause I don't know what's affected
22:13:35dom96Let's take a quick survey
22:13:55Araqsurveys are irrelevant
22:14:00dom96bah
22:14:02Araqwe already agree it should go
22:14:07dom96good
22:14:19dom96I guess I'll deal with it for now..
22:14:33Araqmacros.skipDo ?
22:14:46Araqdon't we have that?
22:15:12dom96nope
22:15:52*flaviu quit (Remote host closed the connection)
22:16:43Araqwell add it then
22:17:13dom96k
22:17:43*askatasuna quit (Ping timeout: 252 seconds)
22:18:32*io2 quit (Ping timeout: 260 seconds)
22:21:54*superfunc joined #nimrod
22:26:07*superfun1 joined #nimrod
22:28:33*Matthias247 quit (Read error: Connection reset by peer)
22:28:40*kunev joined #nimrod
22:28:50*superfunc quit ()
22:29:27*Trustable quit (Ping timeout: 252 seconds)
22:33:28*kunev quit (Ping timeout: 260 seconds)
22:39:07Nimrodthis is why I love this channel. It makes me feel loved even while at work.
22:39:26*vendethiel- joined #nimrod
22:40:03*vendethiel quit (Ping timeout: 240 seconds)
22:41:35dom96Nimrod: do the constant highlights not distract you? :P
22:41:42Trixar_zaHehehe. I wrote a python library that will give any reasonable coder nightmares
22:41:43Nimroddom96: Nah
22:42:15*Trustable joined #nimrod
22:43:21*nande joined #nimrod
22:43:50*superfunc joined #nimrod
22:44:12*vendethiel- quit (Ping timeout: 260 seconds)
22:58:42*flaviu joined #nimrod
23:01:09*Trustable quit (Quit: Leaving)
23:15:07*darkf joined #nimrod
23:15:08boydgreenfieldbabel question – is it possible to include a dependency in a private Git repo? (Sorry if I’m just missing where in the docs). Thx!
23:15:38flaviuboydgreenfield: I'm not sure about babel, but fowl did something like that
23:15:45flaviuMaybe I can dig it up, 1 sex
23:15:52flaviu*sec
23:16:29boydgreenfieldflaviu: Thanks!
23:16:43fowlhttps://gist.github.com/fowlmouth/8cc9ee26bcf509b5fea5
23:17:00flaviuThanks, thats it
23:17:26dom96i'd suggest using babel instead
23:18:14dom96boydgreenfield: Requires: "git://url.here"
23:18:26dom96in your .babel file under the [Deps]
23:18:26fowlthat method can only really work for importing one file since it doesnt touch include directories, i recommend using babel too
23:18:50boydgreenfielddom96: Got it. That’s very heplful, thanks.
23:20:34*hoverbear quit ()
23:43:13boydgreenfielddom96: What’s the exact syntax on that? Having a build error with something like `Requires: "[email protected]:username/package.git”`
23:44:38fowlboydgreenfield, use a url like https://bitbucket.org/fowlmouth/entoody.git
23:45:01fowlthe read-only url ^^
23:45:14fowlis what its called on github
23:45:17boydgreenfieldHrm — but then it’ll try to use HTTPS auth w/ github, no?
23:45:27boydgreenfield(or at least that’s what it does locally for me — and I need it to work via ssh)
23:45:48dom96boydgreenfield: try git://[email protected]:username/package.git
23:46:29boydgreenfielddom96: Hrm that doesn’t work for me, though it looks right
23:47:57dom96boydgreenfield: maybe ssh:// ?
23:48:13boydgreenfieldThere we go
23:48:20dom96:)
23:48:27boydgreenfieldssh://[email protected]/username/reponame
23:48:30boydgreenfield*reponame.git
23:50:47dom96oh, interesting.
23:51:00BlameStross1so, nimrod-BigInt is mostly featured at this point. I have not yet implemented the shift-based multiplication and division, so it is really slow. WIP https://github.com/blamestross/nimrod-BigInt
23:52:02boydgreenfieldUgh — now that breaks my CI server despite working locally. Fun times.
23:53:24AraqBlameStross1: wow, you're quick!
23:54:09*boydgreenfield quit (Quit: boydgreenfield)
23:56:03AraqBlameStross1: the convention is to name the module bigints.nim (with the s)
23:56:18Araqyou're overusing 'cast' a lot
23:56:47Araqand you have to learn how to deal with sequences, you allocate one in initBigInt
23:57:37Araqand then doesn't really use it but overwrite it via result.digits = digits