<< 16-01-2014 >>

00:00:33OrionPKwhatever works best
00:04:56*psquid quit (Ping timeout: 252 seconds)
00:15:07*AndChat|206976 joined #nimrod
00:15:07*vvbitt quit (Read error: Connection reset by peer)
00:29:07Demosanyone have a libarchive binding handy?
01:06:38*vvbitt joined #nimrod
01:06:38*AndChat|206976 quit (Read error: Connection reset by peer)
01:31:46*XAMPP joined #nimrod
01:39:52vvbittHi araq
01:43:14*DAddYE quit (Remote host closed the connection)
01:47:50*brson quit (Quit: leaving)
01:48:23*brson joined #nimrod
01:53:40*vvbitt quit (Read error: Connection reset by peer)
01:53:41*AndChat|206976 joined #nimrod
01:54:45*vvbitt joined #nimrod
01:54:46*AndChat|206976 quit (Read error: Connection reset by peer)
02:05:01*AndChat|206976 joined #nimrod
02:05:01*vvbitt quit (Read error: Connection reset by peer)
02:06:41*Demos quit (Read error: Connection reset by peer)
02:13:29*Demos joined #nimrod
02:14:04dom96Looks like Araq's talk is finally public: http://www.infoq.com/presentations/nimrod :D
02:14:22Demosif I have a proc {.importc, dynlib: "foo.so", cdecl.} can I still use a static library and tell the compiler to ignore the import? what if I am on windows where libraries end in dll?
02:16:21dom96when defined(windows): const dllName = "foo.dll" else: const dllName = "foo.so"
02:17:18Demosright, and what about substituting a static lib, I was thinking of a custom pragma that was a noop when some condition is true, like when useStatic: noop
02:20:06dom96I think there is an --overrideDynlib option that you can use
02:20:33dom96Demos: In case you missed it, Araq's talk is public now http://www.infoq.com/presentations/nimrod
02:20:42DemosI saw
02:20:55OrionPKheh rumpf
02:20:56Demosyou posted that literally 5 mins ago
02:21:18dom96Demos: Yes, but you weren't here when I posted it.
02:21:24OrionPKhe's got such a stereotypical german accent
02:21:29DemosI was actually, I just connected
02:22:02dom96Demos: According to my client you connected 40 seconds after I posted it here.
02:22:27Demosmaybe my client on windows reconnected or something
02:23:28Demoswowah did the doc sidebar change color!
02:25:25dom96well anyway.
02:25:27dom96I should sleep.
02:25:31dom96Good night
02:27:41*AndChat|206976 quit (Ping timeout: 272 seconds)
02:28:07Demosbefore you go I got a question about babel
02:41:12*psquid joined #nimrod
02:44:53*DAddYE joined #nimrod
02:49:04*DAddYE quit (Ping timeout: 246 seconds)
03:17:19Demosw00t, my binding to libalpm works
03:17:29Demoswell it fails to crash
03:33:41*DAddYE joined #nimrod
04:23:13*BitPuffin quit (Ping timeout: 246 seconds)
04:23:36*Demos_ joined #nimrod
04:24:58*dmac quit (Quit: Leaving.)
04:25:10*dyu joined #nimrod
04:25:42*dmac joined #nimrod
04:28:09*dyu is watching Araq's talk
04:30:44Demos_I liked it! I wish he talked more about his design process and rationale though
04:33:24OrionPKwell that talk was meant to be focused on meta programming stuff iirc
04:34:32*DAddYE quit ()
04:39:33dyu"what? oh no" ...
04:40:08dyuwhen the staff told him he has 10 minutes left :-)
04:40:34dyuthat's gotta suck when you've got to speed up your talk all of a sudden
04:40:52*xenagi joined #nimrod
04:41:31*dmac quit (Quit: Leaving.)
04:41:49discolodai tend to talk really fast when im doing something like that, just to get it over with
04:52:59discolodahe did a good job
04:54:34dyuyea he did
05:22:23*jimboj joined #nimrod
05:24:38*jimboj quit (Client Quit)
05:29:35*brson quit (Ping timeout: 260 seconds)
05:36:31*xenagi quit (Quit: Leaving)
05:42:10*dmac joined #nimrod
05:42:28*dmac quit (Client Quit)
05:52:11*dmac joined #nimrod
05:52:12*Demos_ quit (Quit: Leaving)
05:58:06*Demos quit (Remote host closed the connection)
06:20:23*dmac quit (Quit: Leaving.)
06:27:58*dmac joined #nimrod
06:38:57*psquid quit (Ping timeout: 265 seconds)
06:39:14*psquid joined #nimrod
07:15:56*vvbitt joined #nimrod
07:31:52*aftershave quit (Quit: Textual IRC Client: www.textualapp.com)
07:32:17*aftershave joined #nimrod
07:32:33*Mordecai joined #nimrod
07:33:29*psquid quit (Ping timeout: 272 seconds)
08:40:33*odc joined #nimrod
08:57:15*Araq__ quit (Read error: Connection timed out)
08:58:05*Araq_ joined #nimrod
09:03:07*j-renner joined #nimrod
09:03:22*vbtt joined #nimrod
09:04:16j-rennerfirst time with nimrod, I can't get it to build on linux as per instructions
09:05:30fowlare you on ubuntu and trying to build 0.9.2?
09:06:33j-renneryep
09:06:47j-rennerundefined reference to 'lrint'
09:06:54j-rennersemfold.c
09:07:16fowlubuntu's gcc is missing that
09:07:26fowlits fixed in nimrod on HEAD
09:07:44j-rennerbuild from master should be ok then?
09:08:06fowlyea
09:08:37j-rennercan I build with clang?
09:10:25j-rennerapparently yes
09:11:26fowlyes i think so
09:21:40*vvbitt quit (Ping timeout: 245 seconds)
09:33:38*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
09:37:00*CarpNet joined #nimrod
09:57:50*ddl_smurf quit (Quit: ddl_smurf)
10:06:58*Araq_ quit (Read error: Operation timed out)
10:08:06*Araq_ joined #nimrod
10:09:08*dmac quit (Quit: Leaving.)
10:10:59*dmac joined #nimrod
10:15:29*dmac quit (Ping timeout: 265 seconds)
10:51:30*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
11:02:17*dmac joined #nimrod
11:09:19*dmac quit (Ping timeout: 260 seconds)
11:11:45*Araq_ joined #nimrod
11:12:28*Araq_ quit (Client Quit)
11:23:30*BitPuffin joined #nimrod
11:55:11*faassen joined #nimrod
11:59:43*Araq_ joined #nimrod
12:07:04*dmac joined #nimrod
12:11:51*dmac quit (Ping timeout: 260 seconds)
12:16:10dom96hello
12:22:57*Araq_ quit (Read error: Connection timed out)
12:25:00*Araq_ joined #nimrod
12:25:01*fowl quit (Read error: Connection reset by peer)
12:25:20*fowl joined #nimrod
12:41:32odcdoes someone here knows how to make statement macros?
12:42:07dom96This may help: http://build.nimrod-lang.org/docs/manual.html#statement-macros
12:42:30odci'm trying to implement `unless` which is simply `if (not())`
12:42:45odcdom96, other than that?
12:43:12dom96use dumpTree to check what the ast for `if not x` looks like and then build it in the macro
12:43:30dom96you could probably use a template to create `unless`
12:43:43dom96instead of a macro
12:43:55odcyou think it's possible?
12:43:57zahary_template unless(x: expr, body: stmt): stmt = if(not x): body
12:44:21odc-_-
12:44:29odcthank you
12:58:49*Araq_ quit (Read error: Connection timed out)
12:59:58*Araq_ joined #nimrod
13:07:11odcjust a small problem, when using this template, if i call return "something" in the body, nimrod says Error: no return type declared
13:07:25*dmac joined #nimrod
13:07:50dom96try adding {.immediate, dirty.} to the template
13:09:08odcthat works thx
13:09:27odcso many flags ;_;
13:11:42*dmac quit (Ping timeout: 252 seconds)
13:21:48*darkf quit (Quit: Leaving)
13:24:21*Araq_ quit (Read error: Connection timed out)
13:25:01*Araq_ joined #nimrod
13:39:08*j-renner quit (Quit: WeeChat 0.4.1)
13:51:02odcq: is there an equivalent of `!!x` to get the boolean value of x?
13:52:34zahary_you can define it if you want, but the idiomatic way is to just check for nil, 0, etc
13:53:58odchm ok
14:07:40*Araq_ quit (Read error: Connection timed out)
14:07:43*dmac joined #nimrod
14:08:58*Araq_ joined #nimrod
14:12:21*dmac quit (Ping timeout: 248 seconds)
14:36:06*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
14:42:32*Araq_ joined #nimrod
14:51:12*Mordecai quit (Quit: work)
14:51:33*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
15:08:04*dmac joined #nimrod
15:12:27*dmac quit (Ping timeout: 260 seconds)
15:30:32*[1]Endy joined #nimrod
15:34:39NimBotAraq/Nimrod devel 277df7f Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds using statement to the one and only true index.
15:34:39NimBotAraq/Nimrod devel 890f0e7 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds docstrings to lines() iterators.
15:34:39NimBotAraq/Nimrod devel 81c7a3d Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds note about procs and multiple variable assignment.
15:34:39NimBotAraq/Nimrod devel 3d6d210 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds note about iterators having same signature as procs.
15:34:39NimBot10 more commits.
16:03:57BitPuffinaw Araq, nice talk, you were a good dragon
16:05:31*[2]Endy joined #nimrod
16:07:59*Demos joined #nimrod
16:08:23*dmac joined #nimrod
16:08:55*[1]Endy quit (Ping timeout: 260 seconds)
16:12:40*dmac quit (Ping timeout: 246 seconds)
16:37:58*shevy joined #nimrod
16:38:03*brson joined #nimrod
17:08:53*dmac joined #nimrod
17:13:15*dmac quit (Ping timeout: 252 seconds)
17:29:04*vbtt joined #nimrod
17:31:53vbtthello, watching Araq's talk on infoq
17:34:24dom96hey vbtt :)
17:34:31vbtthi dom96
17:38:13vbttbikeshedding here, but I really like ':' before the proc body for indented procs. '=' for one line procs is fine.
17:38:50Demosare they both currently valid?
17:39:04Araqnope
17:39:19Araqvbtt: you should be able to see why that's not supported :P
17:39:34vbttyeah
17:39:44vbttthe ':' has other uses?
17:40:08vbttreturn type, for e.g. and this would look funny too `proc f(): int :`
17:40:52Araqbbl
17:42:29*dyu quit (Quit: Leaving)
17:49:55*Demos quit (Quit: Textual IRC Client: www.textualapp.com)
17:59:38vbttvery nice talk.
18:00:00vbttAraq: you should do more :)
18:00:23vbttnobody posted the video to reddit yet?
18:11:09*dmac joined #nimrod
18:13:47Araqvbtt: do more what? talks?
18:14:44vbttAraq: yes. your infoq talk is very nice.
18:15:14*DAddYE joined #nimrod
18:15:17vbttto the point, interesting and good demo of the language feature overloading the audience.
18:15:30vbtti learnt more by watching it than browsing around the docs.
18:15:44dom96vbtt: Araq told me not to post it.
18:15:54dom96So i'm just waiting for his approval.
18:16:08vbttdom96:ok
18:18:09vbttsorry, meant *without* overloading the audience
18:18:13vbttAraq: ^
18:18:48Araqactually the audience was full of experts and so ... I could have raised the bar
18:19:22vbttreally? I thought you were pretty succinct? Also many more lesser experts will watch the video.
18:20:14dom96In any case I think we should submit it and then upvote it simultaneously.
18:20:42vbttdom96: what's your karma?
18:21:00dom96613 link karma
18:21:08dom96and on HN 369
18:21:22dom96you can submit it if you want.
18:21:36dom96I don't really care about karma
18:22:10vbttno i was asking because if you have high karma then links you post will be higher to start out, no?
18:22:16vbtti dont care about it either.
18:22:30vbttactually, even if you dont post, in a fwe days someone else will.
18:23:02dom96no, that's not how it works.
18:23:16vbttalso, i dont think you need to do the simultaneous votes. i'm pretty sure it will make it's way to the first page. new languages are always interesting, specially ones that are reasonably complete and *work*
18:23:32dom96better to be safe than sorry
18:23:34dom96especially on HN
18:23:47vbttwhat about LTU?
18:23:49dom96We will be off of /new on HN in ~30 minutes
18:24:18*CarpNet quit (Quit: Leaving)
18:24:21dom96LTU doesn't really attract as much traffic as reddit or HN
18:24:33vbttright, I'm more interested in generating quality discussion.
18:25:42vbttanyway, the term rewriting stuff looks pretty powerful and elegant. It's almost like I can create a new language using nimrod metaprograming :)
18:26:47vbttAraq: I was thinking about poking around at some coroutine type stuff. But is it possible to do stack pointer manipulation from within nimrod?
18:26:48dom96Araq: So, do we have your approval?
18:27:09dom96vbtt: I posted about Nimrod on LTU once and it hasn't generated much discussion.
18:27:29Araqdom96: yes
18:27:56vbttdom96: yeah I saw that I think. the response was positive but low volume.
18:28:09*dmac quit (Quit: Leaving.)
18:30:07Araqvbtt: stack switching requires inline assembler
18:30:19dom96Should I just make the title "Nimrod: A New Approach to Metaprogramming"?
18:31:11Araqmake sure you also link to the PDF slides
18:31:21Araqand sure the title is fine
18:31:29vbttAraq: yeah I suspected that. so different for every platform..
18:31:44*dmac joined #nimrod
18:32:19dom96https://news.ycombinator.com/item?id=7071429
18:33:08dom96http://www.reddit.com/r/programming/comments/1vdo3l/nimrod_a_new_approach_to_metaprogramming/
18:33:17vbttAraq: what about stack copying? you could use some tricks (address of local) to get the stack address and copy it around, no?
18:33:25reactormonkAraq, as mentioned, can you make the devel branch the default?
18:33:46Araqreactormonk: let me see
18:33:49reactormonkbtw, how about some publicity on codegolf or similar?
18:34:15OrionPKCan user-defined type classes be used yet in the main branch?
18:35:22dom96reactormonk: No, that will most likely break nimbuild.
18:38:00dom96Araq: Good enough? http://www.reddit.com/r/programming/comments/1vdo3l/nimrod_a_new_approach_to_metaprogramming/cer7548
18:38:17reactormonkdom96, where is that defined in nimbuild?
18:38:58Araqdom96: sure
18:39:40Araqreactormonk: can't find how to do that :-/
18:40:23reactormonkAraq, ask the support
18:41:27dom96oh, I see. I guess you want PRs to be made against devel now.
18:41:35dom96Well it makes sense to make 'devel' default then.
18:41:52dom96Araq: https://help.github.com/articles/setting-the-default-branch
18:46:10Araqdom96: lol that was easy
18:46:21Araqwait a sec
18:46:40Araqcan we prune the history only for the devel branch? argh, no can't work
18:47:02reactormonkAraq, how so?
18:47:35reactormonkMight get messy to merge over master commits
18:48:44reactormonkwan, does the zmq you mentioned work with pub/sub?
18:53:42Araqbrb
18:54:58dom96Yeah, it's already almost off /new on HN.
18:55:12dom96Now would be the time to upvote it.
18:55:59odcdone
18:57:29dom96Thanks :)
18:57:31dom96bbl
19:02:02*shevy left #nimrod ("I'll be back ... maybe")
19:02:12vbttbtw you should link the video from nimrod-lang.org
19:14:29vbttsomeone's blog about nimrod says "memory can still be managed manually even while the GC is enabled"
19:14:33vbttwhat does it mean?
19:14:45Araqit means to use "ptr"
19:14:50*Mat3 joined #nimrod
19:15:01*OrionPK quit (Remote host closed the connection)
19:15:05*dymk joined #nimrod
19:15:10Araqhi Mat3 upvote us on hacker news, please
19:15:15dymkhello!
19:15:28Mat3hi Araq, dymk and all
19:15:30dymkI saw the infoq talk post on Reddit; I thought it was really neat
19:15:42Araqhi dymk please upvote us then
19:15:48dymkI certainly did so
19:16:06Mat3Araq: hacker news ?
19:16:21dymkI'd like to try writing a little side project in Nimrod I think; does Nimrod have HTTP libraries, and a library for RabbitMQ?
19:16:50Araqit has http client and server which must be pretty good since people constantly complain about it
19:17:03Mat3a these hacker news
19:17:58dymkAraq, haha, well, okay then.. Would you consider them stable/solid, being the designer of the language?
19:18:38Araqorionpk has better ones ;-)
19:19:08dymkwhat's that?
19:19:11*OrionPK joined #nimrod
19:19:15Araqit's him
19:19:26dymkspeak of the devil
19:19:35dymkOrionPK, I hear you've got HTTP client libraries
19:19:44OrionPKoh have I?
19:19:49dymkhave you?
19:19:58OrionPKnot sure what you mean
19:20:12dymkI'm gonna delegate this one to Araq then
19:20:39AraqOrionPK: I thought you have some vastly better httpclient module
19:20:41OrionPKhttp client library is kind of broad, I have lots of http servery type stuff
19:20:51dymkbasically, I'm looking to write a side project in Nimrod, but I'd need an HTTP client library, and a RabbitMQ library
19:20:57OrionPKi havent done anything w/ http client, sorry
19:21:03dymkah alright, thanks anyways
19:21:06Araqwhat's rabbitMQ ?
19:21:22reactormonkAraq, something like zmq from the sound of it
19:21:27Araqdymk: afaik gradha uses our httpclient and it works good enough for him
19:21:36Araqreactormonk: oh really? amazing
19:21:43OrionPKdymk what about libcurl?
19:21:47dymkAraq, rabbitmq is a message queue
19:21:50reactormonkAraq, :-P
19:21:59OrionPKhttp://nimrod-lang.org/lib.html#network-programming-and-internet-protocols
19:22:19reactormonkAraq, you really drank sarcasm with your mother's milk
19:22:20OrionPKhttp://curl.haxx.se/libcurl/
19:22:42OrionPKreactormonk not sure if that translates to english well lol
19:22:48dymklibcurl is an option, yeah. Might look into that.
19:23:04*io2 joined #nimrod
19:23:21vbttwhat language does the mother's milk thing come from?
19:23:37Araqgerman
19:23:47reactormonkOrionPK, kk, the correct translation is "you really imbibed sarcasm from your infancy"
19:24:02OrionPK:P
19:24:09OrionPKthats an awesome figure of speech
19:24:21io2dom96: you missed the strangeloop tweet about nimrod metaprogramming :)
19:24:22OrionPKbut figures of speech should be left in their mother tongue :p
19:24:33reactormonkOrionPK, nope
19:24:44Mat3Araq: ok, domne
19:24:47Mat3^done
19:24:51AraqMat3: thanks
19:24:57VarriountHey guys.
19:25:07Araqnow do the same for reddit, Mat3 :D
19:25:23vbttinteresting
19:25:27reactormonkdymk, any opinion on zmq? The lib in the stdlib doesn't work :-/
19:25:55dymkreactormonk, I just started looking at zmq, it seem to be a "lighter weight" rabbitmq
19:26:08dymkyeah it'd work fine for me probably
19:26:16dymkbut the bindings to it are broken, you say?
19:26:17wanreactormonk: yes, the zmq4 bindings I have work with pub/sub, I am using them for it
19:26:30reactormonkwan, could you create a babel package?
19:26:41wanOk
19:27:07Araqlet's remove it from the stdlib then
19:27:12Araqif it's broken
19:27:13reactormonkwan, ... and a PR to do that
19:27:14wanThe current stdlib bindings work with zeromq v2
19:27:35reactormonkwell, we want to outsource that anyway AFAIK
19:27:36wanSo dymk, if you have zeromq 3 or 4 on your system, it won't work
19:27:57Araqyeah, reactormonk is right, slim down the stdlib
19:28:01dymkah bummer
19:28:45wandymk: but I'll have this https://github.com/idlewan/nawak/blob/master/lib/zmq4.nim that you can use right away
19:29:15dymkoh that's awesome, thanks
19:29:16wanSo I'll make a PR, and a babel package? Or just the PR?
19:29:27reactormonkwan, both
19:29:35reactormonkwan, and a few examples on how to use it
19:29:47reactormonkwell, the PR is just to delete the old zmq.nim
19:29:57AraqMat3: if you translate Add regA, regB, regC into call addImpl what do you do with the VM registers?
19:30:34AraqI mean translating the opcodes into "call opcodeImplementation" in the machine's assembler
19:30:54Araqhow would you pass the instruction's arguments?
19:31:01vbttyeah it would be nice if non-standard stuff is out of the stdlib
19:32:18Mat3Araq: well, implicit parameters following typical directly after the call instruction because there can be fetched simply by poping the return address into a register
19:32:38wandom96: We don't care any more to be off /newest, we're on HN's front page
19:32:59*XAMPP quit (Ping timeout: 272 seconds)
19:33:04Mat3^popping?
19:33:36AraqMat3: can't follow, sorry, so you translate these into assembler too?
19:35:49Mat3these method is called subroutine threading; A trace of VM instructions (which will fit into the 1st level cache) is translated into a stream of subroutine calls. Immediate parameters are inserted right after compiling the call instruction
19:36:11Araqyes exactly i'm talking about subroutine threading
19:38:13Mat3if immediate arguments are compiled right after the call instruction, there can be fetched from the vm-instruction routine by simply loading them indexed though the stack pointer (or better just by popping each value from there)
19:38:30Araqyeah ok got it
19:39:31Mat3this is both cheap in terms of the instructions needed as processed cycles
19:41:30EXetoCyup it's popping
19:41:53Mat3hi EXetoC
19:42:26EXetoCMat3: ohai
19:42:37AraqVarriount: why are you not in #nimbuild anymore?
19:43:28reactormonkwan, http://dpaste.com/1555149/ any reason why it doesn't recieve anything?
19:44:21VarriountAraq: Odd. My client must have not rejoined when I got disconnected
19:45:52Araqvbtt: there are various hacks in pure C to implement stack copying but they all have the same problem: (a) slow and (b) requires GC support unless you can live with GC_disable/enable and the mark&sweep GC
19:49:16Mat3vbtt: I think at least two GCC related extensions are quite useful: The label-as-value extension and local function definations
19:50:46vbttOK, is gcc a requirement for nimrod?
19:51:04vbttI thought clang should always work too.
19:51:27discolodaclang can pretty much do what gcc does, missing a few minor extensions
19:52:42Mat3As I know no problems using clang as compiler (ICC should also work but not tested)
19:53:11vbttg2g, bbl
19:53:15vbttthanks!
19:53:16VarriountClang is yet another piece of software I could never get to compile natively on my computer.
19:53:50VarriountWhy must I be left to depend on the whims of those who can release binaries?
19:54:26Mat3^you mean compiling clang itself or compiling Nimrod with clang ?
19:54:57VarriountCompiling clang itself.
19:55:12*mietek joined #nimrod
19:55:32mietekHi
19:55:37Mat3hmm, strange
19:55:37VarriountHello!
19:55:45Mat3hi mietek
20:02:05*io2 quit (Ping timeout: 272 seconds)
20:03:18Mat3Varriount: Beside that LLVM + clang is a over complicated mess in my opinion, clang should compile easily, I just followed the build descriptions on there home page. Which system do you use ?
20:03:36VarriountWin64
20:04:47OrionPKi was able to compile clang fine iirc
20:06:03Mat3get cygwin and compile from there
20:07:42reactormonkNote that when you use a SUB socket you must set a subscription using zmq_setsockopt() and SUBSCRIBE
20:07:44reactormonkok.
20:12:00*Mat3 thinking about creating a blog
20:12:14reactormonkhow do I convert a string to a ptr string? With the whole allocation etc.
20:12:18reactormonkMat3, gitflow?
20:12:43VarriountI've been meaning to ask, Mat3, what is it that you are working on? Something to do with assembly and documentation?
20:13:22Araqreactormonk: are you sure that's necessary
20:13:38AraqI managed to do without any copy from string iirc
20:13:50Araqfor the zeromq wrapper
20:13:57reactormonkAraq, http://api.zeromq.org/3-2:zmq-setsockopt
20:15:27reactormonkAraq, https://github.com/hiteshjasani/Nimrod/commit/760e4d0f5bc6e4896e9a71214a9f3e1a3cde1745 looks good?
20:15:56Mat3Varriount: I have created an interpreter/compiler environment implementing my own ISA (AVM) which I use as base for a Nimrod subset
20:16:01reactormonkAraq, setsockopt wants pointer to string / string len
20:16:35Araqreactormonk: just skimmed it, it's correct
20:16:50NimBotAraq/Nimrod devel 760e4d0 Hitesh Jasani [+0 ±1 -0]: Add docs for constraining and qualifying imports.
20:16:50NimBotAraq/Nimrod devel 7778e79 Simon Hafner [+0 ±1 -0]: Merge pull request #818 from hiteshjasani/pr_devel_doc_import_constraints... 2 more lines
20:17:02Araqreactormonk: so use cast[pointer](cstring(nimrodstring)), nimrodstring.len
20:17:33wanreactormonk: I used it like this: https://github.com/idlewan/nawak/blob/master/nawak_mongrel.nim#L54
20:17:53reactormonkwan, I'll send over a PR
20:18:13Mat3get some sleep, ciao
20:18:18*dymk quit (Quit: This computer has gone to sleep)
20:19:04*Mat3 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
20:19:28reactormonkHow do I go from int to size_t?
20:19:50wanThat's maybe the thing to change in the bindings I've made
20:20:01reactormonkwan, nah, just overload it
20:20:26reactormonkgot (TConnection, int literal(6), string) - zmq4.setsockopt(s: PSocket, option: cint, optval: string): cint
20:20:47reactormonk... wait.
20:21:14reactormonkcint <-> int problem?
20:21:27wanAraq says uint should be avoided, and for bindings, passing int to {.cdecl.} that expect uint/size_t is 'autoconverted' from what I understood. So I might change uint/size_t to ints in the bindings.
20:21:45Araqyeah please do so
20:21:50Araqsize_t == Nimrod's int
20:22:05reactormonkwan, also use this:
20:22:06Araqwan: it's not restricted to 'cdecl'
20:22:07reactormonkproc setsockopt*(s: PSocket, option: cint, optval: string): cint =
20:22:07*io2 joined #nimrod
20:22:09reactormonk setsockopt(s, option, cast[pointer](cstring(optval)), optval.len)
20:22:57Araqreactormonk: TConnection vs PSocket seems your problem
20:23:07reactormonkoh
20:24:13reactormonkError: type mismatch: got (PSocket, cint, pointer, int)
20:24:19reactormonkzmq4.setsockopt(s: PSocket, option: cint, optval: pointer, optvallen: size_t): cint
20:24:50reactormonkwan, I suppose that can go to the unofficial nimrod API as well, the modified setsockopt
20:24:51wanYeah, for now, do optvallen.uint
20:25:08wanI'll change the uints
20:25:31reactormonka macro to create a new proc from old proc + two names to pass the string to C api might be nice
20:26:28wanYes, indeed
20:26:52wanOr just a proc should suffice
20:26:54*ehaliewicz joined #nimrod
20:27:04Araqhi ehaliewicz welcome
20:27:11ehaliewiczhi
20:27:12reactormonkworks \o/
20:27:39reactormonknow on to zlib
20:29:12mietekWhat exactly is nil in Nimrod?
20:29:27Araqmietek: the NULL pointer
20:29:33mietekThe tutorial mentions it's also a "do nothing statement"
20:29:46mietekIs it really a statement, or an expression?
20:29:48Araqthat's about to become deprecated
20:29:51*vendethiel quit (Quit: q+)
20:29:56Araqcurrently it's both
20:29:56mietekGood
20:29:59reactormonkAraq, \o/
20:30:26mietekAraq: are you the principal designer of Nimrod?
20:30:35Araqyes
20:31:03reactormonkhow do I convert Zlib::Inflate.new(Zlib::MAX_WBITS).inflate(data) to nimrod?
20:31:20reactormonkI don't find the MAX_WBITS constant
20:31:40mietekI'm very happy to see one more language besides Erlang with per-process heaps and message-passing
20:32:58Araqmietek: do you know how erlang's message passing is implemented?
20:33:09Araqbecause we had a discussion recently
20:33:43mietekI know a little, but I haven't dug through the VM sources
20:33:56Araqtoo bad ;-)
20:34:04mietekIf you have questions, I know people who did
20:34:40mietekOne thing I do know is Erlang binaries are often shared behind the scenes
20:35:20mietekThere is no difference in behaviour to the programmer, though
20:36:13reactormonkapparently zlib doesn't come with a manual, does it
20:38:21OrionPKthere's a zlib manual
20:38:26OrionPKhttp://www.zlib.net/zlib_how.html
20:39:03reactormonkYeah, that's what I'm reading atm
20:39:17reactormonkgotta say, the ruby interface was simpler ;-)
20:39:24*dymk joined #nimrod
20:39:33OrionPKive got some zlib nimrod code you might be able to use
20:39:35OrionPKif you want
20:39:46reactormonk\o/
20:39:51Araqmietek: I don't really like erlang's model but it's harder to come up with something better if you care about thread local GC
20:39:51reactormonkinflating?
20:40:12mietekAraq: what don't you like about it?
20:40:30Araqmessage passing is for concurrency, not for parallelism
20:41:18OrionPKreactormonk i have deflating, not inflating
20:41:28mietekFair enough
20:41:36OrionPKhttps://gist.github.com/onionhammer/8463022
20:42:26mietekAraq: I'm also happy that you're at least aware of *ML and Haskell, which is more than I can say for the designers of Go...
20:42:33*shodan45 joined #nimrod
20:42:35OrionPKreactormonk note that this is for GZIP
20:42:49Araqmietek: well thanks :-)
20:43:03mietekAraq: what about nullable types, though?
20:43:11mietekHoare's billion-dollar mistake?
20:43:19Araqyeah yeah yeah, I'll blog about it
20:43:28Araqit's getting annoying
20:43:33mietekI sincerely believe types should be explicitly annotated as nullable or not
20:43:34reactormonkOrionPK, hmmmm
20:43:57Araqmietek: we have "not nil" as an annotation and the compiler now checks against it, fwiw
20:44:07mietekWhether you call it Option (SML, OCaml), Maybe (Haskell), or Nullable (C#)...
20:44:18Araqthe default is still "nilable" though
20:44:27Araqalso
20:44:32shodan45Araq: just watched your presentation :)
20:44:38mietekAraq: why is it the default?
20:44:54reactormonkmietek, will change with 1.0 I presume
20:45:06Araqyeah I guess
20:45:25Araqbut "not nil" is NOT simple to do for a systems programming language
20:45:29Araqand no
20:45:46Araqjust because Haskell and ML can do it easily doesn't mean it's easy for systems programming
20:46:03mietekCertainly. Have you looked at BitC?
20:46:25Araqyeah
20:46:47mietekI've held a certain amount of hope for it
20:46:49OrionPKreactormonk not much different
20:46:51shodan45Araq: I particularly liked your flannel shirt :P
20:46:59OrionPKreactormonk the principle behind it is the same, but in reverse :p
20:47:06Araqshodan45: that's mean :P
20:47:07OrionPKreactormonk and w/o the header & footer of gzip
20:47:10reactormonkOrionPK, can you moonwalk?
20:47:16OrionPKwhat
20:47:20mietekAraq: http://www.bitc-lang.org/docs/papers/APLAS2008.html for one
20:47:26reactormonkOrionPK, the principle behind it is the same, but in reverse
20:47:42Araqmietek: what about Rust?
20:48:03mietekRust loses from the beginning by not assuming GC
20:48:07ehaliewiczjust a random question, but considering nimrod's focus on efficiency, is there any way to do runtime code generation, ala Common Lisp's compile?
20:48:18OrionPKreactormonk ah :p
20:48:31Varriountshodan45: You saw Araq ?
20:48:49shodan45Varriount: http://www.infoq.com/presentations/nimrod
20:49:00Varriount:D
20:49:12mietekAraq: because of that, they decided they won't have tail-call optimisation
20:49:24mietekAnd there was something else recently which made me ignore it
20:49:36Varriountshodan45: Is this the rumored StrangeLoop presentation I've been waiting for?
20:50:06*faassen left #nimrod (#nimrod)
20:50:09mietekAraq: I still think it's possible to have a systems programming language with complete (not local-only) type inference
20:50:13Araqehaliewicz: not really, but we'll soon have "eval" which compiles to bytecode
20:50:16mietekWhat's your view on type classes?
20:50:40Araqwe're getting type classes or rather something close to them
20:50:47ehaliewiczAraq: interesting, thanks
20:51:22Araqmietek: nimrod is not about solving problems in type theory ;-)
20:51:43mietekSure
20:51:51mietekIt looks quite pragmatic, which I like
20:51:56Araqcomplete type inference for instance prevents many ways of adding adhoc typing rules etc.
20:52:44reactormonkremind me, how do I allocate and initialize a TZStream?https://github.com/Araq/Nimrod/blob/master/lib/wrappers/zip/zlib.nim
20:53:03mietekAraq: are you building Nimrod for your secret company?
20:53:07reactormonkohh, fancy new syntax
20:53:33Varriountreactormonk: Where?
20:53:37shodan45Araq: what I want to know is: can I code an AI with nimrod's templates & macros? so that I can compile a file with just "make me rich" in it, and it just works? :D
20:54:12reactormonkVarriount, it's rather old, I have to say
20:55:00Araqmietek: yes but don't hold your breath
20:55:12Araqlife is complicated these days
20:55:24Araqin the long run everything looks rosey though
20:55:34Araq*rosy
20:55:52mietekI'm just interested what applications are there for Nimrod today
20:55:55Varriountfuture.add(genColor("rosy")
20:55:59Varriount*)
20:56:08Varriountmietek: Quite a lot
20:56:36vbttAraq: bytecode, really?
20:56:39Varriountmietek: It *is* a multi-paradigm programming language, with many bindings (and a binding generator!)
20:56:52Araqshodan45: sure, nimrod's macros are turing complete
20:57:16*[2]Endy quit (Ping timeout: 272 seconds)
20:57:33shodan45Araq: sweet :)
20:57:36*shodan45 gets to work on that
20:57:57Araqvbtt: devel branch already has vm.nim
20:58:23Araqand in case you wonder: yes it's very simple to add full coroutines to that
20:58:30vbttwowz. any docs about what's supported?
20:58:46vbttAraq: heh why didn't you tell me before!?
20:58:46Araqwell it's the new macro evaluation engine
20:59:07AraqI thougth you already know :P
20:59:10vbttI would've not bugged you about compiled coroutines :)
20:59:36Araqnah, we need them compiled
20:59:45Araqthe FFI is still buggy as hell for the vm
21:00:09vbttwell that'll get fixed at some point..
21:00:47reactormonkSo how to I convert my string to a stream?
21:01:44Araqreactormonk: gzgets perhaps?
21:02:19OrionPKto a stream?
21:02:33reactormonkso I can go "gimme 10 bytes" incl. state
21:02:37reactormonkbasically an iterator
21:02:52reactormonkerr, "gimme the next 10 bytes".
21:02:58Araqreactormonk: var s: TZStream # declare the stream, init value might be fine
21:03:00OrionPKmake a 10 byte string
21:03:14OrionPKactually its probably supposed to be a multiple of 16 kilobytes or something
21:03:31reactormonkI considered to just shove in the whole string every time
21:03:46OrionPKreactormonk just follow the inflate/deflate example
21:03:51OrionPKno the zlib page
21:04:11OrionPKon*
21:04:19OrionPKand follow what I did for nimrod
21:04:21reactormonkthere's an example?
21:04:45Araqvbtt: supporting --gc:markAndSweep with multiple stacks is actually quite easy, it's the realtime gc which makes some problems
21:04:50*dymk quit (Quit: This computer has gone to sleep)
21:05:06OrionPKi linked it to you
21:05:09Araqspeaking of which ... say we had first class "yield" already
21:05:21Araqhow do you map epoll onto that?
21:05:22OrionPKhttps://gist.github.com/onionhammer/8463022
21:06:13vbttAraq: any coroutine support in nimrod will be extremely useful for concurrency. at the least it will help iron out the high level semantics.
21:06:17*dymk joined #nimrod
21:06:31vbttyou can optimize it for real time gc later if you want - I personally dont need that.
21:07:05shodan45hm, anyone consider compiling nimrod into java?
21:07:12vbttAraq: is the mark-and-sweep generational?
21:07:48shodan45oh and anyone make an iOS app with nimrod?
21:08:02*ddl_smurf joined #nimrod
21:08:37Araqvbtt: no, it's primitive
21:08:46AraqI plan to make it parallel though
21:09:12*dymk quit (Client Quit)
21:09:39Araqor perhaps I'll implement this: http://www.cs.bell-labs.com/who/lorenz/papers/ismm98.pdf
21:09:53reactormonkOrionPK, my current problem is how to take chucks from the string.
21:10:13Araqshodan45: there is an example in the repo but it uses quite some Objective C
21:10:22Araqask gradha when he's around
21:10:46vbttAraq: primitive mark-and-sweep is fine too if I can control it - so I invoke it at regular intervals outside of the work it's doing. meanwhile other threads will be doing the work.
21:11:37vbttbasically each thread will loop: 1. process work in by spwaning a bunch of coroutines 2. stop processing work and run gc.collect() 3. repeat
21:11:47vbttso the latency of the gc is not an issue.
21:12:03Araqshodan45: I explain in the FAQ that compiling to java is foolish
21:13:38VarriountSo Araq, what are you working on at the moment?
21:14:14shodan45Araq: I'm no fan of java, just curious because of android
21:14:15*dymk joined #nimrod
21:14:34Araqshodan45: we have an example for andriod too iirc
21:14:35Varriountshodan45: NDK
21:14:59AraqVarriount: I'm working on making the test suite green
21:15:10Araqso we can finally get 0.9.14 out
21:15:11VarriountOoh, pretty.
21:15:28vbttin fact I dont even need to run the gc, I could just kill the thread and spawn a new one.
21:15:49shodan45Araq: :O
21:15:59OrionPKreactormonk just use substr or something then :p
21:16:04Araqvbtt: now that's easy
21:16:05OrionPKor copymem into the in buffer
21:16:35reactormonkOrionPK, yup, substr it is.
21:17:08Araqvbtt: please wrap some C coroutine library then, use gc:markAndSweep, disable it, enable it when it's safe and there you go
21:18:25AraqI'll gladly help when you're stuck
21:19:51vbttok I'll give it a shot when I find time. So the gc should be disabled when multiple coroutines are active because it can't traverse the suspended coroutine stack frames?
21:20:17Araqyeah but you can also easily add conservative stack marking for them
21:20:43AraqI don't have the time to do it either, but I have the time to help you ;-)
21:21:55reactormonkOrionPK, ttp://dpaste.com/1555262/
21:22:00reactormonkthat's what I came up with
21:22:52OrionPKyou should probably clean up after you're done
21:22:55vbttAraq:what is conservative stack marking? I add the object address to a list somewhere? Or twiddle a flag in the object?
21:23:45OrionPKalso let new_data = data[index..index+CHUNK]
21:23:46reactormonkOrionPK, the GC doesn't take care of that?
21:23:51OrionPKseems... not good
21:23:55OrionPKno
21:24:21Araqyou need to introduce an array/linked list where each entry contains the stack's address range and teach the gc to iterate over these stacks just like it iterates over the main stack
21:25:26reactormonkOrionPK, hm, I need two nested loops apparently
21:25:36Araqbut oh you also need to teach your coroutines to set the current stack pointer when they "yield" otherwise it scans the whole stack region instead of the subset that's currently in use
21:25:49OrionPKyes you do
21:25:58OrionPKwell, you should need 1 nested loop
21:25:59Araqthis would otherwise produce many false positives
21:25:59reactormonkemdr.nim(34, 22) Error: ambiguous identifier: 'uint' -- use a qualifier
21:26:01reactormonkhuh?
21:26:21Araqreactormonk: some shitty wrapper introduced its own "uint"
21:26:24reactormonkOrionPK, and a bit more error handling
21:26:38reactormonkAraq, most likely zlib ;-)
21:27:41reactormonkwell, it does compile for now
21:28:15reactormonkyeah, segfault@s.
21:28:26OrionPKyeah
21:28:34OrionPKthe zlib wrapper kinda.. isnt nice
21:37:15*deniska joined #nimrod
21:38:31*deniska left #nimrod (#nimrod)
21:40:33OrionPKwho wrote the libuv wrapper? http://nimrod-lang.org/libuv.html
21:40:55Araqdunno perhaps zahary
21:41:16OrionPKyeah, it was zahary
21:41:28OrionPKegad, 2 years ago
21:41:28*Demos joined #nimrod
21:41:32OrionPKprobably massively out of date
21:41:39zaharyI wrote the first one, but DAddYE created a newer version at some point
21:42:04zaharysearch github for node.nim IIRC
21:42:12OrionPKmm, interesting
21:42:15OrionPKis it on babel?
21:42:28OrionPKnope..
21:42:51Demoscan we just un-export that shitty symbol?
21:45:50Araqimport foo except shit
21:46:46Demosspeaking of babel, what is the recommended path for getting wrappers up there? I wrote a wrapper for libalpm last evening that could be useful for someone (maybe even babel itself :D). And I was going to say removing the * from that symbol in the library, it sounds like a mistake to export something called uint at all.
21:47:03OrionPKsubmit a pull request
21:47:11OrionPKand bug dom96 until he bothers to merge it
21:47:52Demosheh yeah. I will test it a bit more. It would be badass to have babel use libalpm though! (I just want uninstall functionality :D)
21:49:47Araqimho dom96 should give somebody else write access to babel, so he doesn't need to merge everything himself
21:50:09OrionPKi still think we should do the sub-list idea
21:50:14Demoswell I am not convinced that a github repo is a good place to put a package database
21:50:35reactormonkmeh, the c2nim fails at http://www.zlib.net/zpipe.c
21:50:40OrionPKe.g. his package list could add references to other people's package lists
21:50:54OrionPKand then babel would get 1 extra level
21:51:09Demosreactormonk why are you converting a C file anyways? just convert the header and importc stuff
21:51:29OrionPK"trusted" publishers then can upload packages as they please and cant touch anyone else's
21:51:50DemosI like the idea of babel becoming a alpm repo, as a bonus you could add it to your pacman sources if you have arch
21:52:18reactormonkDemos, so I can compare their sources ot ours
21:52:47EXetoCinteresting
21:56:41EXetoCDemos: simplicity might've played a part in that decision
21:57:05Demosyeah, that is what I figured
21:57:43DemosI like alpm because it does some really neat stuff in a pretty simple and usable way
21:57:47Demosalso I like good C code
22:05:39Araqzahary: https://github.com/Araq/Nimrod/pull/819 makes a nice example for AOP
22:05:49bstrieAraq: I see people mentioning nimrod's "GC", are they just misrepresenting the deferred RC or does nimrod actually have a GC?
22:06:28reactormonkbstrie, yup, there's a GC.
22:06:29Araqbstrie: deferred RC is a form of GC but nimrod has 2-5 GCs depending on how you count them
22:06:38bstrieah ok, I thought it was deferred RC all the way
22:06:43bstrievery interesting
22:07:05Araqthe primary gc is deferred rc with a cycle collector
22:10:14TylerEAraq - got a link to your article about the compiler proving purity of procs?
22:12:21AraqTylerE: not sure what you mean, I guess you mean this: http://nimrod-lang.org/blog/writetracking.html
22:12:35Araqbut please note that this is not yet implemented
22:12:54TylerEahh, yea, that's the one
22:12:55TylerEthanks
22:13:11Araqthough I'm quite sure by now the algorithm is sound, albeit the description of it could be more detailed
22:13:15*brson quit (Ping timeout: 276 seconds)
22:16:45*odc quit (Ping timeout: 252 seconds)
22:17:59AraqTylerE: I think the algorithm can be extended to compute "lent" pointers
22:18:27TylerEthat'd be interesting
22:24:07Araqa pointer parameter "p" is not lent iff there is an assignment of the form path(q) = x where (x in writeset(p)) and q is a parameter, global or a thread local variable
22:26:01Araq(or if it's passed as a not lent pointer to some other routine)
22:26:33reactormonkhow do I place a condition at the end of a loop?
22:26:48Araqreactormonk: while true: foo; if bar: break
22:30:45reactormonkcan I have a random finally block to ensure the cleanup happens?
22:31:40reactormonkaww, I can't do raise <string>?
22:32:26Araqraise newException(EBase, "lazy guy")
22:32:55reactormonkCan I write an issue about that?
22:33:47Araqno?
22:34:06Araqraising strings has been deprecated in python and removed in python 3
22:34:13Araqwhy do we want to introduce it?
22:34:28reactormonkconvert it to an EBase
22:34:43Araqyou know what I think of converters
22:35:25reactormonktemplate raise(message: string) = raise newException(EBase, message)
22:36:05Araq"raise" is a keyword :P
22:36:19Araqmake it sraise
22:36:46reactormonkcan't overload keywords? :-(
22:37:10Araqno. but you can do template `!!!`(msg: string) ...
22:37:16Araq!!!"argh"
22:38:09reactormonkwould you accept that into stdlib? ;-)
22:38:17Araqnope
22:38:38reactormonkfigured.
22:38:59reactormonkhmm, this zlib goes out of memory, at least it says so
22:39:49reactormonkmaybe I should increase the loop counter
22:42:07reactormonkbut nimrod accepted my finally: clause flawlessly
22:42:51Araqthat's something at least
22:43:24reactormonkworks \o/
22:43:46reactormonkOrionPK, http://dpaste.com/1555381/
22:43:48OrionPKit would be nice if newException didnt need a first param
22:44:03OrionPKbut im just lazy
22:44:20vbttcouldn't you just make a closure?
22:44:22reactormonkAraq, ^ overload it?
22:44:25reactormonkvbtt, huh?
22:44:46OrionPKreactormonk you're still doing new_data = data[index..index+CHUNK]
22:44:51reactormonkOrionPK, soooo what?
22:44:56AraqOrionPK, reactormonk you're doing it wrong
22:45:12reactormonkthe master has spoken.
22:45:27OrionPKwhat'd i do now
22:45:56Araqtemplate check(x: expr) = if x != librarySpecificReturnCode: raise newException(librarySpecificException, librarySpecificErrorMessageGetter())
22:46:11reactormonkAraq, it's not lib code yet
22:46:15Araqcheck stupidCapi(a ,b)
22:46:39Araqcheck anotherGuyFromThe70iesCalled()
22:46:52Araqcheck heWantsExceptionsForC()
22:47:14*brson joined #nimrod
22:47:21OrionPKis string[0...4] a shortcut for substr?
22:47:26reactormonkyup
22:47:36OrionPKhm, ok
22:47:48*dymk quit (Quit: This computer has gone to sleep)
22:47:56reactormonkOrionPK, wanna combine the two into a nice looking lib?
22:48:19OrionPKi considered writing a higher level zlib based library
22:48:35OrionPKbut be my guest
22:48:36OrionPK:p
22:48:39reactormonknow you have something to start with
22:49:06reactormonkOrionPK, you could just take the ruby C bindings and copy them to a certain degree
22:49:53Araqruby C bindings is likely full of conversions to VALUE though
22:50:03reactormonkAraq, yeah, you gotta ignore them
22:50:17Araqyeah but then what's the point?
22:50:19reactormonkhow do I create a sha-something hash?
22:50:26reactormonkAraq, copy the interface etc.
22:50:43Araqreactormonk: the interface is full of VALUE
22:50:52fowlOrionPK, i found some zlib stuff in my gists, 1 sec
22:51:20OrionPKi dont need it, thanks though
22:51:29OrionPKreactormonk was the one who was trying to get it working
22:51:37reactormonkwhich I did
22:51:38OrionPKi have zlib working in familiar
22:52:11fowlhttps://gist.github.com/fowlmouth/3503440
22:52:16reactormonkany sha1/sha256 something available?
22:52:46OrionPKsha1 is on babel
22:52:54OrionPKnot sha256
22:55:21reactormonkcute
22:55:32reactormonknow how do I make http PUT requests
22:56:31reactormonkjester for the server-side
22:56:34reactormonkany curl bindings?
22:56:41*noam joined #nimrod
22:56:47OrionPKyes
22:56:49Araq result = ""
22:56:50Araq result.setLen destLen
22:56:52Araq-->
22:56:59Araq result = newString(destLen)
22:57:02reactormonkOrionPK, not on babel
22:57:02OrionPKhttp://nimrod-lang.org/lib.html#network-programming-and-internet-protocols
22:57:17OrionPKhttp://nimrod-lang.org/libcurl.html
22:57:52OrionPKhttps://github.com/trevorlinton/webkit.js
22:59:05reactormonkdafuq
23:00:25discolodahas someone made a nimrod.js?
23:00:51OrionPKi think discolada was going to
23:01:05Araqdiscoloda: what's a nimrod.js?
23:01:16OrionPKnimrod -> emscripten -> nimrod.js :P
23:02:39Araqnimrod js myfile.nim ?
23:03:05Araqbut sure go ahead, emscripten is actually a different target
23:03:46OrionPKdiscoloda you have permission now
23:05:51Araqhey, I rarely tell people what to do
23:06:08OrionPKso what about select()
23:06:35AraqI told dom96 what to do
23:07:03Araqnot sure if he's still against it or simply away
23:07:14OrionPKwhat'd you tell him to do
23:07:19OrionPKthe jist
23:07:38Araqto fix it with your help for good and document it well
23:07:54OrionPKoh, was i there for that? because i feel like i was
23:08:05OrionPK& dom96 didnt want to fix it like that
23:08:11AraqI feel like you were, yes
23:08:30OrionPKseemed like he was anti, and things were kind of left unresovled
23:08:53Araqbut afterwards I called him names in PM and now he shall obey
23:09:04OrionPKahh, perfect
23:09:26OrionPKso we adding a new 'selectors' module and removing 'select' from sockets?
23:09:57Araqno, just fix select in sockets
23:10:04*Demos quit (Quit: Textual IRC Client: www.textualapp.com)
23:10:05OrionPKoh
23:10:07Araqselectors still has a long way to go
23:10:12OrionPKyeah i figured
23:10:21OrionPKI already did submit a PR to fix it
23:10:32OrionPKalong w/ fixing a lot of usages of it
23:10:42Araqoh hm
23:10:56Araqfixed *every* usage? ;-)
23:11:05OrionPKthat I could find in the araq/nimrod repo, yeah
23:11:16Araqcool, wasn't aware
23:11:26AraqI guess I should do even more code reviews ...
23:11:47OrionPKit was some months back, so it'd need to be reviewed thoroughly
23:13:39OrionPKhttps://github.com/Araq/Nimrod/pull/655
23:16:27*darkf joined #nimrod
23:18:22reactormonkPslist* = ptr Tslist
23:18:30reactormonkhow do I allocate/create that one?
23:19:17reactormonkin C it's a struct curl_slist *headers = NULL; but I'm not really sure how to express that in nimrod
23:19:26reactormonka simple var headers = PSList() doesn't do it
23:21:58EXetoCit should work if the members are initialized, right?
23:22:28EXetoCor maybe that's for ref and values only
23:22:57EXetoCalloc?
23:22:58Araqyeah, for "ptr" you still need to use alloc or allo0
23:23:04Araq*allocß
23:23:07Araq*alloc0
23:23:14reactormonkemdr.nim(61, 22) Error: object constructor needs an object type
23:23:52reactormonksoooo how do I use alloc0?
23:24:37fowlreactormonk, are you interfacing?
23:24:43fowlreactormonk, alloc0(sizeof(T))
23:24:47reactormonkfowl, yup
23:24:49reactormonkkk
23:24:51fowlcast[ptr T](alloc0(..))
23:25:06fowlreactormonk, you can use fowltek/pointer_arithm
23:25:32reactormonkfowl, via babel?
23:27:34fowlyea
23:28:11AraqOrionPK: can you please do that PR against devel?
23:28:18fowlthen you have alloc[T](): ptr T
23:28:44OrionPKwhen i get some time araq
23:28:51OrionPKwont be til tomrrow probably
23:31:28dom96Araq: I already gave access to gradha and fowl.
23:31:48Araqdom96: oh alright never mind then
23:32:29dom96Araq: Sure, pull the select() "fix". But all the breakage is on you ;)
23:32:46Araqdom96: devel branch :P
23:34:19reactormonkmeh, curl segfaults
23:35:02reactormonkhow come I can't use string literals as cstring literals?
23:35:16fowlyou can
23:35:33reactormonkwithout the cstring() around?
23:35:36fowlyes
23:36:56reactormonkhmmm
23:37:43reactormonk http://dpaste.com/1555428/ segfaults on perform
23:39:21reactormonksometimes I wish for httparty :-/
23:42:14reactormonkgreat, backtrace somewhere into libcurl :-(
23:43:26*psquid joined #nimrod
23:49:05fowlreactormonk, isnt there already a curl wrapper
23:51:06reactormonkfowl, maybe, haven't found it
23:51:58reactormonkI removed the headers, now curl_perform hangs.
23:52:06dom96reactormonk: Why are you using curl?
23:52:10fowlreactormonk, http://build.nimrod-lang.org/docs/libcurl.html
23:52:30reactormonkdom96, posting http stuff. Got a better option?
23:52:36dom96reactormonk: httpclient?
23:55:05reactormonklet's see
23:55:13reactormonkError: unhandled exception: 400 Bad Request [EHttpRequestErr]
23:55:45reactormonkI guess that's not that bad
23:55:47reactormonkdom96, thanks.
23:56:09dom96reactormonk: What are you working on?
23:56:26dom96httpclient is currently not suited for multiple rapid requests to the same server.
23:56:30reactormonkdom96, emdr -> couchdb, a small project to gather data for something bigger
23:56:37reactormonkdom96, meh
23:56:48reactormonkI can always bulk store stuff
23:57:45reactormonkdom96, and btw, how should I get the rest for the body from the response when it raises on bad request?
23:58:46dom96only the *Content procs raise exceptions on 4xx and 5xx errors.