00:10:01 | * | BitPuffin quit (Ping timeout: 255 seconds) |
00:29:29 | * | Etheco joined #nim |
00:34:31 | * | saml_ joined #nim |
00:35:22 | * | skyfex__ joined #nim |
00:39:56 | * | brson quit (Quit: leaving) |
00:40:30 | * | skyfex__ quit (Ping timeout: 272 seconds) |
00:43:52 | * | davidhq joined #nim |
00:46:21 | * | gmpreussner|afk joined #nim |
00:47:08 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
00:47:56 | * | gmpreussner|afk is now known as gmpreussner |
01:09:40 | * | keyle quit (Quit: leaving) |
01:17:57 | * | ARCADIVS joined #nim |
01:27:47 | * | BitPuffin joined #nim |
01:28:47 | * | reem joined #nim |
01:30:47 | * | springbok joined #nim |
01:32:30 | gmpreussner | is the complete syntax for the docs comments documented anyway? |
01:32:49 | def- | gmpreussner: it's rest, isn't it? |
01:32:57 | def- | rst |
01:34:27 | gmpreussner | found it |
01:34:32 | gmpreussner | http://nim-lang.org/docgen.html |
01:41:58 | Synatra | sup |
01:42:00 | gmpreussner | hmm... there's some funky stuff going on. sometimes the text is bold or italic or both, even though i didn't add formatting |
01:43:11 | gmpreussner | and it doesn't always honor paragraph spacing |
01:47:06 | Synatra | Can i see Nim bot in action? |
01:52:06 | Synatra | NimBot: "hi" |
01:52:29 | Synatra | NimBot: echo "hi" |
01:53:20 | EXetoC | it's nimbus/mimbus that has that, none of which are here now |
01:55:49 | * | brson joined #nim |
01:56:10 | Synatra | Who controls whether is here or not? |
01:56:14 | Synatra | whether? |
01:58:55 | * | darkf joined #nim |
02:07:09 | * | gsingh93 joined #nim |
02:13:23 | * | Mimbus joined #nim |
02:13:38 | flaviu | .give Synatra echo("o/") |
02:13:41 | Mimbus | Synatra: o/ |
02:14:09 | Synatra | o |
02:14:11 | Synatra | ho2use |
02:14:20 | flaviu | .eval echo("123") |
02:14:23 | Mimbus | flaviu: 123 |
02:14:57 | flaviu | The input is first preprocessed with s/; ?/\n/g |
02:15:40 | flaviu | If you just want to mess around with it, do it in #nim-offtopic so that people don't get annoyed. |
02:24:13 | * | skyfex__ joined #nim |
02:24:23 | * | SneakySnake quit (Quit: Leaving) |
02:24:27 | * | sampwing quit (Ping timeout: 252 seconds) |
02:28:53 | * | skyfex__ quit (Ping timeout: 265 seconds) |
02:34:57 | * | brson_ joined #nim |
02:38:04 | * | brson quit (Ping timeout: 255 seconds) |
02:44:28 | * | VinceAddons quit (Read error: Connection reset by peer) |
03:00:34 | * | vendethiel quit (Ping timeout: 255 seconds) |
03:02:50 | * | vendethiel joined #nim |
03:07:59 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
03:11:52 | * | BitPuffin quit (Ping timeout: 272 seconds) |
03:13:18 | * | dymk quit (Ping timeout: 245 seconds) |
03:14:53 | * | dymk joined #nim |
03:18:55 | * | saml_ quit (Quit: Leaving) |
03:23:47 | * | vendethiel quit (Ping timeout: 246 seconds) |
03:25:11 | * | EXetoC quit (Ping timeout: 264 seconds) |
03:27:29 | * | vendethiel joined #nim |
03:38:14 | * | Outlande1 joined #nim |
03:39:17 | * | fizzbooze joined #nim |
03:40:10 | * | Outlander quit (Ping timeout: 255 seconds) |
03:59:22 | * | Demon_Fox_ joined #nim |
04:00:48 | * | Demon_Fox quit (Ping timeout: 245 seconds) |
04:03:00 | * | gmpreussner_ joined #nim |
04:03:11 | * | gmpreussner quit (Ping timeout: 244 seconds) |
04:08:07 | * | BitPuffin joined #nim |
04:11:18 | * | vendethiel quit (Ping timeout: 276 seconds) |
04:12:47 | * | BitPuffin quit (Ping timeout: 245 seconds) |
04:13:05 | * | skyfex__ joined #nim |
04:13:26 | * | gmpreussner__ joined #nim |
04:13:31 | * | gmpreussner_ quit (Ping timeout: 244 seconds) |
04:17:39 | * | skyfex__ quit (Ping timeout: 265 seconds) |
04:31:46 | * | Synatra quit (Quit: Connection closed for inactivity) |
04:33:39 | * | brson_ quit (Quit: leaving) |
04:36:56 | chroem | How will Nim's FFI behave if some outside C code throws an exception? |
04:37:17 | chroem | Is it possible to catch an exception thrown by some C code? |
04:39:27 | chroem | Well, C++ code, I guess. |
04:49:41 | * | gmpreussner__ quit (Ping timeout: 244 seconds) |
04:49:53 | * | gmpreussner__ joined #nim |
05:08:51 | * | BitPuffin joined #nim |
05:11:18 | * | ehaliewicz joined #nim |
05:14:20 | * | BitPuffin quit (Ping timeout: 276 seconds) |
05:16:03 | * | fizzbooze quit (Ping timeout: 252 seconds) |
05:18:03 | * | vendethiel joined #nim |
05:26:33 | * | reem quit (Remote host closed the connection) |
05:41:20 | * | vendethiel quit (Ping timeout: 246 seconds) |
05:47:02 | * | gmpreussner__ quit (Ping timeout: 244 seconds) |
05:47:23 | * | gmpreussner__ joined #nim |
05:50:59 | * | SplinterOfChaos quit (Ping timeout: 264 seconds) |
05:53:22 | * | threewood quit (Ping timeout: 240 seconds) |
05:53:59 | * | SplinterOfChaos joined #nim |
05:58:05 | * | vendethiel joined #nim |
06:01:56 | * | skyfex__ joined #nim |
06:06:40 | * | skyfex__ quit (Ping timeout: 272 seconds) |
06:19:15 | * | SplinterOfChaos quit (Ping timeout: 264 seconds) |
06:20:37 | * | gmpreussner__ quit (Ping timeout: 244 seconds) |
06:21:08 | * | vendethiel quit (Ping timeout: 244 seconds) |
06:31:07 | * | bjz joined #nim |
06:42:53 | * | skyfex__ joined #nim |
06:45:09 | * | JinShil joined #nim |
06:48:00 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
06:58:10 | * | chroem quit (Ping timeout: 246 seconds) |
07:07:55 | * | Demon_Fox_ quit (Quit: Leaving) |
07:22:39 | * | vendethiel joined #nim |
07:24:39 | * | skroll3 quit (Ping timeout: 256 seconds) |
07:24:55 | * | skroll3 joined #nim |
07:26:28 | * | Outlande1 quit (Ping timeout: 272 seconds) |
07:35:17 | * | VinceAddons joined #nim |
07:45:39 | * | vendethiel quit (Ping timeout: 245 seconds) |
07:46:22 | * | bjz joined #nim |
07:57:29 | * | johnsoft quit (Ping timeout: 276 seconds) |
08:02:40 | * | d3m1gd joined #nim |
08:09:52 | * | vendethiel joined #nim |
08:11:17 | * | gsingh93 quit (Quit: Connection closed for inactivity) |
08:32:39 | * | vendethiel quit (Ping timeout: 256 seconds) |
08:38:29 | * | vendethiel joined #nim |
08:40:02 | * | BlaXpirit joined #nim |
08:42:19 | * | Sphax joined #nim |
08:44:12 | * | Trustable joined #nim |
08:45:38 | * | ehaliewicz quit (Ping timeout: 272 seconds) |
08:49:50 | * | Outlander joined #nim |
09:00:27 | * | vendethiel quit (Ping timeout: 252 seconds) |
09:05:31 | * | dumdum joined #nim |
09:05:54 | * | Outlander quit (Ping timeout: 272 seconds) |
09:07:52 | * | JinShil quit (Quit: Konversation terminated!) |
09:20:08 | gokr | We really should start maintaining a list of links to Nim articles on the homepage |
09:26:01 | BlaXpirit | isn't that what the planet is supposed to achieve |
09:54:31 | * | kapil__ joined #nim |
10:08:56 | * | ARCADIVS quit (Quit: ARCADIVS) |
10:10:42 | * | Outlander joined #nim |
10:16:58 | gokr | BlaXpirit: Yes, but... it will be filled with quite a bit of noise probably. |
10:17:30 | gokr | My Octopress blog has feeds per tag, so I can point the planet to my Nim feed. But many other blogs don't have that. |
10:18:03 | gokr | Also, it might be worth having a "manual" list of articles - with a oneliner describing the article. A bit of quality control. |
10:29:54 | * | kashyap_ joined #nim |
10:31:08 | * | MajorWork joined #nim |
10:31:09 | kashyap_ | Is there a bug in nim ... the code here (average of numbers from stdin) http://lpaste.net/119298 seems to generate incorrect result (I am using the lastest nim) |
10:32:11 | def- | kashyap_: compared to what? |
10:32:54 | kashyap_ | Compared to expected output ... from the code it appears that it should generate the average of the list of numbers entered |
10:32:54 | def- | if you're comparing to python, python includes the newline character(s) in lines while nim doesn't |
10:34:32 | def- | looks correct to me |
10:34:34 | kashyap_ | Oh got it! |
10:34:52 | novist | any idea if i can dump AST **after** all the macros/templates/code transforms are done? |
10:34:52 | kashyap_ | I was entering the numbers separated by newline ... |
10:35:09 | kashyap_ | thanks |
10:40:21 | kashyap_ | What's the story behind the name Nim? |
10:40:43 | def- | not sure, but you can at least do it for a single template/macro invocation: static: echo treeRepr(getAst(foo("foo"))) |
10:41:32 | novist | thats probably good enough, thanks def- |
10:41:34 | BlaXpirit | def-, i've been looking into this |
10:41:39 | BlaXpirit | Error: 'getAst' can only be used in compile-time context |
10:42:28 | def- | The name was Nimrod, but it didn't help that it's an insult in american english. So Nim is short from Nimrod and means nothing |
10:43:14 | def- | BlaXpirit: there was a better way to do this but i forgot |
10:44:31 | BlaXpirit | ah, def- and novist |
10:44:37 | BlaXpirit | just put that into static: |
10:44:39 | BlaXpirit | and it works |
10:44:57 | def- | BlaXpirit: i said so :P |
10:45:11 | BlaXpirit | facepalm |
10:45:18 | kashyap_ | cool ... thanks def-> ... Nim seems so awesome (yet so non-conspicusous) ... glad I ran into it! |
10:46:22 | * | MajorWork quit (Changing host) |
10:46:22 | * | MajorWork joined #nim |
10:51:53 | * | vendethiel joined #nim |
10:59:04 | * | JinShil joined #nim |
11:04:44 | def- | kashyap_: got nimkernel working |
11:05:22 | * | vendethiel quit (Quit: q+) |
11:05:32 | kashyap_ | dev-> nope ... I just got started ... have posted on the forum |
11:05:40 | def- | kashyap_: no, i got it working |
11:05:47 | kashyap_ | Hurray!!!! |
11:05:51 | novist | var b = (var n = (ref MyType)(id: 10, value: 20); init(n[]); n) |
11:06:01 | def- | I'm making the PRs right now, were pretty small changes |
11:06:02 | novist | can n somehow not escape this "scope"? |
11:06:10 | novist | i want it just as temporary placeholder to call init. |
11:06:17 | novist | (this is template for macro ast) |
11:06:55 | kashyap_ | def-> can I clone from somewhere? |
11:07:45 | def- | There was a small problem in Nim itself: https://github.com/def-/Nim/tree/more-deprecations |
11:08:34 | def- | and here's nimkernel itself: https://github.com/def-/nimkernel |
11:09:05 | kashyap_ | I'd need the fixed Nim to compile? |
11:10:00 | def- | just 1 file changed, no need to recompile Nim |
11:10:13 | def- | https://github.com/def-/Nim/commit/2d3db9cd6b6abac7a3ddd9689d62f733d1d451cf |
11:10:35 | def- | and that's if you're on the devel branch, maybe it works if you have 0.10.2 |
11:11:27 | kashyap_ | great ... thanks def- |
11:13:35 | novist | btw answer to my question is inline proc: var b = (proc(): ref MyType = result = (ref MyType)(id: 10, value: 20); init(result[]))() |
11:13:45 | novist | def- that kernel project is pretty damn awesome |
11:15:02 | gunn | gokr: also would be nice to get nim recognised on wikipedia |
11:15:08 | * | polde quit (Quit: WeeChat 1.2-dev) |
11:15:26 | def- | gunn: need external sources about nim for this, otherwise it's useless |
11:15:30 | * | keyle joined #nim |
11:16:36 | gunn | def-: yep, there wasn't anything sufficient when I looked ~6 months ago |
11:18:45 | * | vendethiel joined #nim |
11:20:00 | * | Sphax quit (Quit: ZZZZZzzzzz) |
11:20:11 | * | polde joined #nim |
11:20:19 | * | BitPuffin joined #nim |
11:20:47 | dom96 | def-: Pulled. Thanks for fixing. |
11:20:59 | def- | dom96: should I update the binutils/gcc versions? |
11:21:39 | dom96 | If they work then sure. |
11:21:48 | def- | yeah, i built with the most recent ones |
11:23:21 | dom96 | In that case go for it. |
11:24:55 | * | BitPuffin quit (Ping timeout: 252 seconds) |
11:28:24 | dumdum | mispelled two as too at : https://github.com/Araq/Nim/blob/master/lib/pure/collections/sets.nim#L253 " The `initialSize` parameter needs to be a power of too" |
11:34:38 | def- | dumdum: you can create a pull request yourself if you want |
11:35:14 | def- | good idea to get started with helping Nim |
11:35:53 | * | ARCADIVS joined #nim |
11:46:51 | * | davidhq joined #nim |
11:51:08 | * | VinceAddons quit (Read error: Connection reset by peer) |
12:00:52 | dumdum | I am not fluent in git, I had cloned using: https://github.com/Araq/Nim.git, is there any guide how to 'create a pull request' |
12:01:16 | def- | https://help.github.com/articles/creating-a-pull-request/ |
12:01:39 | def- | it's a bit complicated for something so simple, i guess |
12:02:11 | dumdum | yes |
12:02:14 | def- | you could also edit the file on github diretly with the pencil symbol in the top right corner |
12:02:53 | dom96 | Yeah, clicking the edit file button on github is probably the right way to go about a simple change like this. |
12:04:53 | * | Araq_ is now known as Araq |
12:05:21 | dumdum | yes, it was easier, hope I got it right: https://github.com/Araq/Nim/pull/2015 |
12:06:19 | def- | Looks good. Now you can fix the entire documentation! |
12:06:24 | * | lyro quit (Read error: No route to host) |
12:06:38 | dumdum | :) |
12:21:39 | * | dumdum1 joined #nim |
12:22:04 | * | keyle left #nim (#nim) |
12:22:51 | * | Sphax joined #nim |
12:22:56 | * | keyle_ joined #nim |
12:23:11 | Araq | hey keyle_ |
12:23:28 | * | dumdum quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
12:29:17 | ekarlso | hmm |
12:29:26 | ekarlso | should allowed download methods be a pre-set list ? |
12:29:31 | ekarlso | or used specified.. |
12:30:09 | * | keyle_ quit (Quit: Lost terminal) |
12:32:27 | Araq | novist: () do not introduce a scope, nor should they |
12:34:31 | novist | yeah figured as much already |
12:34:32 | * | lyro joined #nim |
12:35:06 | Araq | we have hygienic templates for that, or in a macro you can use 'gensym' |
12:36:36 | novist | i was thinking how template could be used but figured its probably not easy enough to separate type and params list |
12:49:54 | * | saml_ joined #nim |
12:51:53 | * | BlaXpirit_ joined #nim |
12:55:12 | * | BlaXpirit quit (Ping timeout: 264 seconds) |
12:58:20 | * | dumdum1 quit (Quit: Leaving.) |
13:02:56 | * | dumdum joined #nim |
13:06:16 | * | keyle_ joined #nim |
13:06:47 | keyle_ | sys |
13:06:54 | keyle_ | oops |
13:08:43 | keyle_ | hey back Araq |
13:09:35 | keyle_ | this elementaryOS linux is fantastic. |
13:09:45 | * | cow_2001 quit (Quit: ASCII Muhammad - @o<-<) |
13:18:25 | dumdum | if my method signature is: proc classes(node: Node): ref HashSet[string] , then how does nim create 'result' var? |
13:19:17 | dumdum | var result = new(HashSet[string]) ? |
13:22:15 | * | keyle_ quit (Quit: brb) |
13:23:13 | * | JinShil quit (Quit: Konversation terminated!) |
13:24:05 | * | keyle_ joined #nim |
13:24:59 | def- | dumdum: no, it's just initialized to binary 0, i guess |
13:25:23 | * | keyle_ is now known as keyle |
13:25:56 | dumdum | def-: on heap? |
13:26:54 | def- | dumdum: no, the pointer is just a 0, so nothing is allocated yet |
13:26:56 | dumdum | or just a null pointer on stack |
13:27:00 | def- | exactly |
13:27:07 | dumdum | ok, thanks |
13:27:16 | def- | to initialize it you can do "result = new HashSet[string]" yourself |
13:27:51 | dumdum | yes |
13:30:07 | def- | dumdum: oh, there was something wrong with the PR after all =/ |
13:30:37 | dumdum | PR? |
13:30:42 | def- | pull request |
13:30:46 | dumdum | oops tell me |
13:31:25 | def- | https://github.com/Araq/Nim/pull/2015 |
13:34:20 | Araq | def-: can you test https://github.com/Araq/Nim/pull/2010 on linux please? |
13:34:52 | * | EXetoC joined #nim |
13:35:19 | def- | Araq: sure |
13:37:14 | dumdum | def-: done,https://github.com/Araq/Nim/pull/2016 |
13:41:07 | def- | Araq: good that we tested, doesn't bootstrap anymore |
13:41:41 | def- | Araq: i did the regular boostrap, should i have created special csources first or something? |
13:42:02 | ekarlso | keyle: u got time for some layout love or ? |
13:42:04 | Araq | dumdum: thanks. applied. |
13:42:35 | Araq | def-: nah, if it fails, it fails. why does it fail? |
13:42:59 | keyle | ekarlso, nope sorry |
13:43:09 | ekarlso | keyle: :'( |
13:43:16 | ekarlso | i guess noone cares for it :D |
13:45:50 | def- | Araq: linking fails: https://github.com/Araq/Nim/pull/2010 |
13:46:01 | ekarlso | keyle: $dayjob$ business ? ;) |
13:46:27 | keyle | nightjob business |
13:46:45 | ekarlso | keyle: anyawys, if you get the time would appreciate some html help :P |
13:47:53 | Araq | def-: er, are you sure it's not caused be the jsgen fix that I pulled? |
13:48:08 | def- | Araq: oh, didn't check if devel bootstraps right now |
13:48:36 | ekarlso | is there a reason why ^ stuff isn't checked pr commit on devel ? |
13:49:06 | Araq | ekarlso: yes. nobody configured our buildbot to do that |
13:49:17 | ekarlso | Araq: meh :P |
13:49:35 | Araq | Varriount__ did a really good job on it, but nobody helps him with it afaict |
13:49:49 | keyle | Araq, btw I found docgen can generate json of the nim stdlib |
13:49:53 | keyle | so it's all good there |
13:50:05 | Araq | keyle: oh? |
13:50:10 | ekarlso | keyle: u doing anything cool with nim-lang atm ? |
13:50:14 | Araq | it can already do that? |
13:50:38 | keyle | but I couldn't compile docgen for some reason, the nested folders in lib... |
13:51:02 | keyle | Araq, according to this, it can http://nim-lang.org/docgen.html |
13:51:32 | keyle | ekarlso, a better way to browse the stdlib |
13:51:42 | def- | Araq: devel builds just fine |
13:51:47 | wtw | def-: strange, when I last tested, the freebsd fix didn't cause any Linux build problems, but now I can also see an error |
13:51:52 | ekarlso | keyle: awesome (: |
13:51:58 | keyle | time to get nim on this elementaryos |
13:52:01 | * | threewood joined #nim |
13:52:04 | ekarlso | does nim have it's own buildbot thing or ? |
13:52:13 | ekarlso | as in written in nim Iguess |
13:52:14 | def- | wtw: ah, you're here. I have no idea what causes it |
13:53:35 | Araq | keyle: ah, forgot about that one, but "Note that this tool is built off of the doc command, and therefore is performed before semantic checking." kinda sux |
13:54:10 | keyle | Araq, docgen2 ? |
13:54:45 | def- | ekarlso: it had, but was replaced with a python one |
13:54:48 | keyle | aka nim doc2 |
13:55:02 | def- | https://github.com/nim-lang/nimbuild |
13:55:05 | def- | http://buildbot.nim-lang.org/ |
13:55:37 | keyle | so I have nim koch'ed up and bin/nim is good - how do I install it system wide on a ubuntu based system ? |
13:55:47 | ekarlso | hmmms, why not just use jenkins ? *guess someone will shrug java* .. |
13:55:51 | keyle | aka `make install` ? |
13:56:14 | def- | keyle: easiest is to add the bin directory to your $PATH |
13:56:18 | Araq | ekarlso: jenkins ... lol, used that one in production. sucks. but ymmv |
13:56:34 | ekarlso | Araq: openstack runs it in massive scale to say the least :P |
13:56:36 | ekarlso | works dandy |
13:56:57 | Araq | it may "work" but its web UI is a pita |
13:57:18 | ekarlso | Araq: they dont use the ui, they have a tool that parses "yaml" templates into jobs ;p |
13:57:19 | keyle | we use Jenkins at work too, it's a bit wonky |
13:57:36 | ekarlso | submit a change to a repo > puppet applies stuff > new jenkins configs |
13:57:37 | keyle | is travis CI good enough ? |
13:57:45 | keyle | def-, ok thanks |
13:58:01 | Araq | meh I love nimbuild even with all its warts |
13:58:45 | ekarlso | now a fun challenge, how to do db migrations in nim... |
13:58:57 | def- | Araq: I think it's nice if we use tools actually built in nim (like the forum), people always ask where nim is used |
13:59:18 | ekarlso | def-: for some stuff it's no use in reinventing stuff :p |
13:59:54 | Araq | ekarlso: nobody helps Varriount__. even though it doesn't reinvent anything. so much for that theory. |
14:00:11 | ekarlso | Araq: uhm, I can try out.. |
14:00:37 | ekarlso | wanna fix nimble / packages stuff first though :( |
14:01:51 | Araq | bbl |
14:02:14 | wtw | def-: I'm at work currently, so I'm not really following, but I'll have a look what causes the problem |
14:02:34 | keyle | def-: Araq: you could also advertise that irclogs is made with nim |
14:03:16 | keyle | Araq: any plans on distributing nightlies? |
14:04:30 | ekarlso | meh, great nimble doesn't work behind a proxy ... |
14:04:37 | ekarlso | yay for corp proxies |
14:05:13 | keyle | ekarlso: make a proxy in nim :P |
14:05:30 | ekarlso | keyle: haha |
14:05:33 | ekarlso | no thnx :p |
14:06:01 | xeizlif | ekarlso: Can you SSH? Use ssh's -D option and tsocks |
14:07:06 | xeizlif | wait, hm, I'm actually not sure if that works, because I think tsocks uses LD_PRELOAD to hook libc's connect(), not any kernel-level hook, and I don't know if nim uses libc or directly talks to the kernel |
14:08:04 | ekarlso | or just make a patch for nim to support using http_proxy vars :p |
14:08:04 | xeizlif | disclaimer: you'll probably get fired if you get caught, please don't blame me ;D |
14:08:32 | xeizlif | yeah but... finding a hackish workaround is The Programmer Way! /s ;) |
14:09:09 | keyle | Araq: jsondoc appear to work ok: "code": "proc cmpIgnoreStyle*(a, b: string): int {.noSideEffect, rtl, \u000A extern: \"nsuCmpIgnoreStyle\", procvar.}" |
14:09:19 | keyle | I can work with that. |
14:09:37 | ekarlso | BlaXpirit_: u about ? |
14:15:22 | * | johnsoft joined #nim |
14:15:50 | * | BitPuffin joined #nim |
14:17:37 | * | reem joined #nim |
14:18:26 | dom96 | ekarlso: keyle: i'm rewriting nimbuild currently |
14:18:50 | def- | dom96: oh, nice |
14:19:08 | * | reem quit (Remote host closed the connection) |
14:21:20 | * | reem joined #nim |
14:23:40 | ekarlso | hmmm, does "os" define a args variable or smth? |
14:24:07 | def- | ekarlso: yes: http://nim-lang.org/os.html#paramCount, |
14:27:26 | ekarlso | https://bpaste.net/show/a213d09ccbea lib/system.nim(1954, 16) Error: undeclared identifier: 'data' |
14:27:30 | ekarlso | dont get it why :| |
14:27:38 | ekarlso | nim -c -r test.nim |
14:27:43 | * | keyle quit (Ping timeout: 272 seconds) |
14:27:43 | ekarlso | ehm, -c > c |
14:29:37 | * | keyle joined #nim |
14:29:37 | * | keyle quit (Client Quit) |
14:30:16 | ekarlso | ah, crap it needs tables imporT! |
14:31:51 | * | sillesta joined #nim |
14:36:01 | * | reem quit (Remote host closed the connection) |
14:38:56 | * | ARCADIVS quit (Read error: Connection reset by peer) |
14:41:34 | * | Synatra joined #nim |
14:43:40 | onionhammer1 | so when will nimsuggest work?:) |
14:44:26 | Synatra | whats nimsuggest |
14:49:30 | dumdum | ide tools! I am tired of switching between editor and docs :( hunting for methods |
14:50:30 | Synatra | tell me about -.- |
14:51:06 | Synatra | Everytime I try to do sometinhg in Rust, I later find out (after finishig it) that theres a method for it |
14:51:51 | dumdum | nim docs are easier on the eye than rust ones i think |
14:59:37 | dumdum | would Nim be compilable to rust? |
15:05:47 | dom96 | Sure. But why would you want to do that? |
15:06:42 | EXetoC | what about bf? |
15:07:14 | xeizlif | no |
15:08:05 | xeizlif | you can *compute* anything in brainf***, i.e. it's turing complete, but it is not possible to do everything a normal nim program would do |
15:08:26 | EXetoC | damn |
15:09:43 | xeizlif | you'd also have a difficult time trying to compile to Rust because Nim is less safe / pedantic than Rust. You could probably write a compiler that could do it, but it would not be as easy as compiling to C |
15:10:14 | EXetoC | unsafe everywhere? :-) |
15:10:23 | xeizlif | That will do part of the job |
15:11:44 | EXetoC | what about exceptions? |
15:11:59 | xeizlif | [I'm not sure how to deal with those~] |
15:12:21 | EXetoC | the project cfg is not taken into account when nim.vim checks for errors. I don't know why |
15:15:18 | * | dumdum quit (Quit: Leaving.) |
15:18:00 | xeizlif | Is there some way I can get the equivalent of "#pragma once" in nim for files included with the include keyword? |
15:18:21 | * | dumdum joined #nim |
15:18:27 | wtw | funny, when sleeping long enough before linking, the linux version bootstraps with the freebsd parallel build fix |
15:18:48 | wtw | exactly the inverse situation as before (when sleep was necessary on freebsd) |
15:20:08 | wtw | bbl |
15:27:58 | * | VinceAddons joined #nim |
15:28:00 | * | dumdum quit (Quit: Leaving.) |
15:32:15 | onionhammer1 | hm |
15:32:32 | onionhammer1 | the 'declared' example uses 'defined' in the system.nim documentation ;) |
15:36:15 | * | BitPuffin` joined #nim |
15:36:19 | gokr | onionhammer1: Nimsuggest works now AFAIK. At least Andreas said it works. |
15:36:38 | gokr | Not yet integrated with aporia though of course, Andreas wrote it this last weekend. |
15:36:40 | onionhammer1 | i tried it last night, didnt do much |
15:37:13 | onionhammer1 | gave me some hints when i tried to do a 'def' |
15:37:22 | gokr | Ok, then hang on and ask Andreas when he gets back. |
15:37:53 | * | onionhammer1 is now known as onionhammer |
15:38:31 | onionhammer | gokr where did he say it works? |
15:38:59 | gokr | I just know he worked on it this weekend and that he uses it himself and that it works quite well already. |
15:38:59 | * | BitPuffin quit (Ping timeout: 245 seconds) |
15:39:06 | * | BitPuffin` is now known as BitPuffin |
15:39:13 | onionhammer | oh okay |
15:39:47 | gokr | He aims to integrate it with Aporia this upcoming weekend I think. |
15:40:04 | onionhammer | well i plan to integrate it into nimlime soon :) |
15:42:24 | onionhammer | but only if it works. |
15:43:59 | onionhammer | ah got it working :) |
15:44:57 | onionhammer | so it works sometimes! |
15:48:24 | * | darkf quit (Quit: Leaving) |
15:54:51 | * | kapil__ quit (Quit: Connection closed for inactivity) |
15:54:53 | * | dumdum joined #nim |
15:57:01 | dumdum | is there a function to consume an iterator to a list? |
15:57:34 | Synatra | why wouldnt you want to compile down to rust? :) |
15:59:24 | dumdum | I have an iterator over strings, and want to use: proc toSet[A](keys: openArray[A]): HashSet[A] |
15:59:37 | dumdum | so can pass the iterator as is? |
16:03:23 | gmpreussner|work | xeizlif: consider using import instead? include should only be used to split up files, i think, not to manage dependencies. |
16:05:47 | * | SplinterOfChaos joined #nim |
16:06:40 | EXetoC | dumdum: see sequtils.toSeq |
16:07:15 | EXetoC | dumdum: I don't think you can pass an iterator, but it's easy to try |
16:11:10 | dumdum | thank you |
16:13:22 | * | cyraxjoe joined #nim |
16:13:33 | * | clone1018_ joined #nim |
16:13:35 | * | xeizlif_ joined #nim |
16:15:35 | * | vegai_ joined #nim |
16:16:19 | * | elie joined #nim |
16:18:00 | * | clone1018__ quit (Quit: No Ping reply in 180 seconds.) |
16:18:00 | * | MightyJoe quit (Quit: No Ping reply in 180 seconds.) |
16:18:00 | * | xeizlif quit (Ping timeout: 276 seconds) |
16:18:01 | * | vegai quit (Ping timeout: 276 seconds) |
16:18:01 | * | kokozedman quit (Ping timeout: 276 seconds) |
16:18:34 | * | dumdum quit (Quit: Leaving.) |
16:20:32 | xeizlif_ | gmpreussner|work: Yeah, I probably should, heh. I've just got a project where there's currently a lot of coupling that I probably should fix anyway. Right now it all works if I only ever include from my main file, just syntastic breaks because it doesn't know all the symbols defined elsewhere |
16:21:06 | * | xeizlif_ is now known as xeizlif |
16:21:46 | gmpreussner|work | xeizlif, sounds like some refactor is in order :) |
16:25:18 | Varriount__ | Meep |
16:25:22 | * | Varriount__ is now known as Varriount |
16:34:11 | * | zahary quit (Read error: Connection reset by peer) |
16:34:50 | * | kuzy000 joined #nim |
16:41:03 | onionhammer | Varriount__ it looks like our CaaS usage wont work anymore with araqs changes |
16:41:14 | onionhammer | but the go-to-definition stuff works again |
16:41:22 | onionhammer | with the caas turned off |
16:43:04 | Varriount | onionhammer: To be honest, I've never had CaaS work for me |
16:45:01 | onionhammer | apparently araq worked on it this past weekend |
16:45:16 | onionhammer | so i can get it working from the command line |
16:45:36 | onionhammer | but w/in nim he's changed it so it expects a project.nim on initialization i think |
16:50:12 | * | vegai_ is now known as vegai |
16:50:41 | ekarlso | not possible to do if "foo" not in sequence ? |
16:51:16 | EXetoC | notin? |
16:51:24 | ekarlso | -,,- |
16:51:50 | EXetoC | or add some parens, but notin is better |
17:04:14 | * | gsingh93 joined #nim |
17:04:49 | * | vendethiel quit (Ping timeout: 252 seconds) |
17:06:03 | Araq | hey onionhammer. what do you want to know? |
17:07:43 | reactormonk | Araq, btw, do you wanna make the caas use json? |
17:08:15 | * | vendethiel joined #nim |
17:08:26 | Araq | reactormonk: no. there will be a --json switch to change the output format |
17:08:33 | reactormonk | Araq, perfect |
17:08:39 | Araq | but the tab based thingie will stay |
17:08:52 | Araq | I noticed it's lots of pointless effort to change the format now |
17:08:56 | Araq | for no gain whatsoever |
17:09:28 | reactormonk | Probably. |
17:11:45 | * | Matthias247 joined #nim |
17:12:16 | gmpreussner|work | what's CaaS? |
17:12:23 | onionhammer | Araq are you basically splitting idetools out of nim and into nimsuggest? |
17:12:31 | onionhammer | should we use nimsuggest going forward? |
17:12:42 | Araq | that's what I did. |
17:12:44 | reactormonk | gmpreussner|work, compiler as a service, aka asking the compiler for IED information |
17:12:52 | gmpreussner|work | ah ok |
17:13:01 | Araq | nimsuggest is the future |
17:13:05 | onionhammer | okay |
17:13:13 | Araq | and for me it works well |
17:13:29 | onionhammer | Araq I guess some more documentation would be nice then; it's not working for me thus far |
17:13:37 | Araq | I'm testing it on a 25K project and the compiler itself |
17:13:42 | onionhammer | does it work w/ absolute paths? |
17:13:51 | onionhammer | or only relative |
17:13:58 | Araq | I only use relative paths |
17:14:05 | onionhammer | hmmm |
17:14:14 | Araq | and don't use the dirty buffer feature |
17:14:18 | onionhammer | ok.. |
17:14:41 | Araq | also, completion in templates and generics doesn't work at all yet, but I'll fix that |
17:15:05 | Araq | you can enable debug mode |
17:15:17 | Araq | and then it's often clear why something can't work |
17:15:24 | Araq | well for me |
17:15:28 | Araq | gotta go, see you later |
17:15:54 | onionhammer | okay |
17:16:05 | onionhammer | i'll look into it more, thanks |
17:16:21 | onionhammer | oh.. is it going up on nimble? |
17:16:23 | onionhammer | ;) |
17:19:49 | onionhammer | it'd be nice to be able to launch nimsuggest without specifying a project file too ;) |
17:20:24 | * | brson joined #nim |
17:26:38 | * | kniteli joined #nim |
17:27:02 | * | Sphax quit (Quit: ZZZZZzzzzz) |
17:35:57 | novist | whats the purpose of nnkEmpty in AST? |
17:37:13 | * | reem joined #nim |
17:39:00 | ldlework | Do I hear something about idetools working now? |
17:39:49 | * | rational joined #nim |
17:41:40 | * | UberLambda joined #nim |
17:42:45 | EXetoC | ldlework: with caas disabled I think |
17:43:20 | ldlework | EXetoC: ah that causes a bit of pausing for each operation right |
17:44:48 | * | Sphax joined #nim |
17:45:33 | Matthias247 | should still be usable (it was at least quite performant when it worked a year ago) |
17:48:54 | EXetoC | does it also report error messages? because I'm using nim.vim and spurious errors are reported because either implicit imports are ignored, or the project cfg is |
17:49:13 | EXetoC | ldlework: I would assume so |
17:49:23 | onionhammer | no caas works |
17:49:37 | onionhammer | but nimsuggest isnt done yet I guess |
17:49:46 | onionhammer | Araq | also, completion in templates and generics doesn't work at all yet, but I'll fix that |
18:02:08 | ekarlso | EXetoC: https://nim-pkg.svcs.io/#/tags/list < based on current package.json |
18:02:21 | novist | would any of you fine gentlemen know why i would get "test.nim(77, 21) Error: type expected" on https://paste2box.com/6/#/NJjWGQ/1SxjjUIUQcp1-RuMp5us9lHSW6i9QY1EO6eW3J-zejE/tS3Avwtf.txt ? |
18:03:02 | ekarlso | novist: drop the new |
18:03:06 | ekarlso | MyType() |
18:03:13 | ekarlso | or ? |
18:03:15 | * | Sphax quit (Quit: ZZZZZzzzzz) |
18:03:37 | novist | yeah well - im trying to make it work so that kind of defeats purpose ;) |
18:03:50 | novist | if you did not notice new implementation is above |
18:06:52 | ekarlso | I wonder what the performance is on using sqlite backend vs mysql |
18:07:54 | novist | depends on your workload |
18:08:13 | novist | unless its something big sqlite is pretty good |
18:08:31 | novist | even moderately concurrent application does well w/ sqlite |
18:10:06 | novist | these compiler error messages are really vague at times |
18:13:46 | * | dumdum joined #nim |
18:14:20 | EXetoC | ekarlso: great |
18:26:07 | UberLambda | Araq, how much did it take to bootstrap the Nim compiler? |
18:38:55 | * | Gonzih joined #nim |
18:42:00 | * | Etheco quit (Read error: Connection reset by peer) |
18:45:38 | * | reem quit (Remote host closed the connection) |
18:46:01 | * | Matthias247 quit (Read error: Connection reset by peer) |
18:48:01 | dumdum | I get the following error in my first ever nim template: Error: template/macro instantiation too nested |
18:48:20 | dumdum | for code here: http://pastebin.com/nbwE0bbH |
18:48:52 | * | Gonzih quit (Quit: leaving) |
18:49:28 | dumdum | I want to pass the expr: 'c != openQuote' to the closure created inside the template |
18:51:25 | def- | dumdum: inside your template you invoke your template again |
18:51:37 | def- | consume_while is the same as consumeWhile |
18:51:46 | * | flknfkjnsfkjwnFK joined #nim |
18:52:27 | dumdum | wow, thanks! |
18:53:20 | * | reem joined #nim |
18:53:35 | * | Gonzih joined #nim |
19:07:05 | * | Sphax joined #nim |
19:10:30 | Araq | UberLambda: first bootstrap after 2 years of work iirc |
19:10:57 | Araq | but note that this was with a then completely new GC implementation |
19:11:20 | UberLambda | Araq: hm, bootstrapped from? |
19:11:32 | Araq | Delphi/FPC |
19:11:37 | UberLambda | Araq: thanks |
19:11:57 | UberLambda | Araq: I'm considering on starting a small scripting language, but I'm not sure if it's worth the effort |
19:12:17 | UberLambda | Araq: just a toy lang, nothing serious |
19:12:35 | Araq | it's trivial, just adapt compiler/vm.nim and the parser etc ... ;-) |
19:14:17 | UberLambda | Araq: I could try implementing it from scratch in Haskell :P |
19:14:27 | UberLambda | Araq: mainly because of Parsec and LLVM |
19:14:35 | UberLambda | well, that's not really from scratch then |
19:14:39 | Araq | yeah or you could be productive and use Ocaml instead :P |
19:16:16 | UberLambda | Araq: yeah, but no parser combinators... |
19:19:42 | Araq | *shrug* never needed those |
19:21:04 | Araq | onionhammer: just to be clear: afaict nimsuggest works as good as caas did or better. it's not like caas can do autocomplete in a template/generic |
19:22:11 | UberLambda | Araq: they really simplify lexers |
19:22:34 | Araq | also that it works for a single project has a deliberate design decision to keep complexity down |
19:22:40 | Araq | *was a |
19:23:49 | Araq | UberLambda: lexers are trivial either way. most work is to get the buffer handling efficient and parser combinators don't help you with that either |
19:26:07 | * | Sphax quit (Quit: CYA!!) |
19:26:36 | UberLambda | Araq: it wouldn't need to be efficient :P |
19:29:09 | Araq | and if you want some tooling support for lexers, flex or re2c or ... are quite good, they let you use regular expressions instead of building the patterns via function calls |
19:33:00 | * | sillesta quit (Ping timeout: 276 seconds) |
19:33:23 | * | dumdum quit (Ping timeout: 256 seconds) |
19:36:49 | threewood | Araq: how much of the language design did you have figured out when you started bootstrapping? |
19:41:24 | ekarlso | should we enforce lower case names for pacakges ? |
19:47:19 | * | matkuki joined #nim |
19:50:57 | ldlework | that'd be nice |
19:52:26 | wtw | def-: Araq: regarding the freebsd compatibility - I have no problems making the tiny change freebsd-only. however, I'm not sure if the way it currently works is fully POSIX-compatible |
19:52:42 | wtw | i.e. it'll work under Linux but probably not other POSIX systems |
19:53:03 | wtw | all (un)educated guesses however :) |
19:55:12 | def- | wtw: yeah, would be nicer to find a solution that works properly on all POSIX |
19:55:53 | wtw | problem is, the current behavior is not really documented, at least that's what I get from the docs |
19:56:48 | wtw | well, I'll investigate a little more, strange thing is, on my ubuntu 14.4 vm everything works perfectly |
19:56:52 | wtw | (bootstrap) |
19:57:16 | def- | but you also saw the problem elsewhere? |
19:57:42 | wtw | yes, on my machine @work it also showed (8 cores) |
19:58:15 | wtw | i.e. my patch is definitely not perfect :) |
20:05:51 | Araq | wtw: well the same code run on macosx without any problems |
20:06:07 | Araq | and who cares if it's posix compliant. |
20:06:35 | Araq | linux itself isn't really |
20:07:06 | wtw | I'm merely pointing out concerns, things I'm not sure about. If you're ok with the current version, that's fine with me |
20:07:38 | wtw | this little patch is not difficult to include in the freebsd port or as a defined or however |
20:10:54 | * | Outlander quit (Ping timeout: 244 seconds) |
20:11:58 | * | sampwing joined #nim |
20:12:54 | matkuki | This code "https://bpaste.net/show/ce0ac66cc91a" gives me a "Error: for a 'var' type a variable needs to be passed" error in line 4. |
20:12:55 | * | irrequietus joined #nim |
20:12:56 | matkuki | Is there an iterator that could do this or is the only option to use "for i in 0..len(sprite_objects)-1:"? |
20:13:32 | ldlework | matkuki: seq[var ActiveObject] |
20:13:43 | matkuki | let me try... |
20:14:17 | def- | matkuki: we want to add the mitems iterator, then it will work |
20:14:42 | matkuki | def-: Great! In the next release? |
20:15:15 | def- | matkuki: probably even earlier. i just ran into a compiler error when implementing them, so they're half finished |
20:15:56 | ldlework | def-: so my answer was wrong? |
20:16:02 | def- | oh, it's fixed! |
20:16:12 | def- | that means I can finish implementing mitems, will do that today |
20:16:38 | def- | ldlework: no idea if it works with a set |
20:16:39 | ekarlso | ldlework: i was thinking to just change the package name to toLower when the request is received api side :p |
20:16:46 | ekarlso | so it would always be lowercase not matter what the user types |
20:16:50 | ldlework | ekarlso: do it |
20:16:59 | ekarlso | already doing it for tags so :P |
20:17:04 | ldlework | though we should enforce it at the language level |
20:17:16 | ekarlso | ldlework: meaning ? |
20:17:34 | ldlework | ekarlso: only allowing lower case package names |
20:17:36 | matkuki | Idlework: I get "Error: invalid type: 'proc (seq[var ActiveObject], cint)'"? |
20:17:42 | ekarlso | ldlework: uh sure |
20:17:48 | ldlework | ekarlso: ? |
20:17:55 | ekarlso | ldlework: that's fine as well : ) |
20:18:15 | ldlework | "Why wont nimble let me create a package with upper case letter but Nim will?" |
20:18:17 | ldlework | etc |
20:18:37 | ekarlso | yeah, i'll add a api enforcement on that one |
20:19:22 | def- | Araq: So, any opinion on this, or should I just do mitems?: http://forum.nim-lang.org/t/723#4013 |
20:20:58 | ekarlso | I wonder if I should allow a user or so to create a "service" token |
20:21:16 | ekarlso | so you could use for example nimble to auto-publish packages to it |
20:22:56 | * | alexanderkyte joined #nim |
20:23:00 | * | EastByte joined #nim |
20:23:34 | ldlework | ekarlso: definitely |
20:23:41 | ldlework | please use oauth like everyone else |
20:24:12 | ekarlso | ldlework: hmmms, how you do that for services though ? ^ |
20:24:20 | ldlework | What do you mean |
20:24:21 | ekarlso | already added jwt tokens for the api itself |
20:25:05 | ldlework | ekarlso: that's OpenID right? |
20:25:54 | ekarlso | good q ldlework ;p |
20:25:57 | wtw | def-: got a second for the freebsd stuff? |
20:26:41 | * | Arcanum_za joined #nim |
20:26:50 | ldlework | ekarlso: OAuth is the right thing to implement if you want automated applications to be interact with the service without human intervention |
20:28:11 | * | iiivvvooo joined #nim |
20:28:25 | ekarlso | ldlework: I wonder how it's done for pypi / npm etc |
20:28:42 | ldlework | ekarlso: both of those are terrible examples to follow |
20:28:59 | ekarlso | ldlework: -,,- |
20:29:03 | ldlework | Just saying. |
20:29:23 | ekarlso | isn't oauth hard to implement though ? |
20:30:15 | wtw | def-: could you remove the "if WIFEXITED(status):" in lib/pure/osproc.nim in my fixed version and tell me if the resulting code is functionally equivalent to before the fix? |
20:30:49 | wtw | def-: because on my test machine it doesn't bootstrap like this either although, I think there is no difference to before |
20:32:42 | * | Trixar_za quit (*.net *.split) |
20:32:42 | * | iivvoo quit (*.net *.split) |
20:32:42 | * | EastByte_ quit (*.net *.split) |
20:32:43 | * | akyte quit (*.net *.split) |
20:35:12 | ekarlso | ldlework: so oauth2 is not user / password based or ? |
20:35:57 | ldlework | ekarlso: oauth is easy to implement |
20:36:24 | ldlework | ekarlso: user logs into the website, goes to some control panel, asks to generate oauth token, user uses this oauth token to provide auth to api requests |
20:36:33 | ldlework | user can later delete this token from the same control panel |
20:36:39 | ldlework | there isn't much more than that |
20:36:46 | ekarlso | ldlework: how long are they valid then ? |
20:36:53 | ldlework | ekarlso: let the user specify |
20:37:00 | ldlework | with indefinite being an option |
20:37:03 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:37:11 | ekarlso | ldlework: really then I already have that using JWT |
20:37:21 | ekarlso | just need to add the checks etc |
20:37:58 | ldlework | ekarlso: sure ok, just that JWT isn't really a widespread standard at this point |
20:38:01 | ldlework | but oauth is |
20:38:10 | ldlework | I'm sure JWT will be fine |
20:38:19 | def- | wtw: oh, you're right, still doesn't bootstrap |
20:39:00 | wtw | but it should, shouldn't it? :) |
20:39:22 | def- | I'm wondering why that is |
20:39:24 | wtw | the other changes (WIFEXITED etc that I moved) don't change anything |
20:39:48 | wtw | is this 'var status' initialized with zero by default? |
20:39:56 | def- | yes, should be |
20:40:11 | wtw | hmm probably that's a problem, let me check |
20:40:53 | wtw | lol |
20:40:56 | wtw | success :| |
20:41:18 | wtw | could you try: var status : cint = 111 (or whatever) |
20:41:27 | wtw | re-include the WIFEXITED |
20:41:29 | def- | why not 0? |
20:41:30 | wtw | and try again |
20:41:44 | wtw | i think, posix waitpid() says, if status is zero, it won't do anything |
20:41:46 | wtw | :| |
20:41:49 | wtw | or rather |
20:41:54 | wtw | if status == NULL |
20:42:04 | def- | ehm, shouldn't status be a pointer then? |
20:42:20 | wtw | oops, |
20:42:20 | wtw | sure |
20:42:51 | def- | hm, no |
20:42:58 | wtw | I figured, this works automatically somehow... |
20:42:59 | def- | proc waitpid*(a1: TPid, a2: var cint, a3: cint): TPid |
20:43:11 | wtw | well, but: http://linux.die.net/man/2/waitpid |
20:43:12 | def- | yeah, with the "var cint" that's the intention i think |
20:43:16 | wtw | pid_t waitpid(pid_t pid, int *status, int options); |
20:44:55 | wtw | it also worked/acted as a pointer before when passing p.exitCode |
20:44:59 | * | sillesta joined #nim |
20:45:43 | wtw | I'm too ignorant of Nim too tell what's happening there |
20:45:46 | wtw | ;) |
20:47:20 | def- | should do a ./koch clean |
20:47:25 | EXetoC | wtw: zero-initialization for everything not annotated with noInit |
20:47:35 | def- | otherwise it works no matter what's in osproc |
20:47:41 | def- | so I don't think it's the 0 after all |
20:48:39 | wtw | yeah, a clean is imperative, I also missed that when first committing |
20:48:52 | * | d3m1gd quit (Ping timeout: 240 seconds) |
20:49:10 | wtw | but it won't build from after a clean? |
20:49:12 | wtw | for you |
20:50:29 | wtw | EXetoC: I was referring to the c interface, because the function I'm working with (waitpid) is supposed to take a pointer as second argument, however in posix.nim it has a 'cint' but still behaves as if it was passed a pointer |
20:52:34 | def- | wtw: it works for me with 111, strangely |
20:52:43 | def- | the c code for running looks ok though |
20:52:53 | def- | it actually passes a pointer to status: |
20:52:54 | wtw | well ok, this is at least consistent with posix/the linux doc |
20:52:57 | def- | ret = waitpid((*p).Id, (&status), WNOHANG); |
20:52:59 | wtw | ah ok |
20:53:21 | def- | so this makes no sense to me right now |
20:53:23 | wtw | ok and the doc says if you pass a NULL for status it won't do anything, that's ok |
20:53:31 | def- | no, that's not ok |
20:53:37 | wtw | not? :) |
20:53:43 | * | fizzbooze joined #nim |
20:53:52 | def- | the doc says the pointer should not be NULL, for us the value it points to is 0 |
20:53:53 | def- | right? |
20:53:58 | def- | the pointer should never be NULL |
20:54:17 | wtw | it says it will only put something in *status if it is not NULL |
20:54:39 | wtw | and by default it is NULL so the status will never be set and the build fails |
20:54:41 | def- | if the pointer is not NULL |
20:54:52 | ekarlso | ldlework: if you want oauth do you volunteer ? :D |
20:55:15 | ldlework | ekarlso: nope, like I said JWT is probably fine |
20:55:21 | ekarlso | ;P |
20:56:48 | wtw | def-: ah, you mean pointer vs pointed-to value? |
20:57:02 | def- | wtw: exactly |
20:57:44 | dtscode | who would have intimate knowledge of the inner workings of the nim compiler? is it still Araq ? |
20:58:21 | * | bjz joined #nim |
20:58:50 | wtw | so if status is 0 the &status should fail basically |
20:59:10 | wtw | but apparently something else is happening? |
21:00:04 | dtscode | wtw, hmmm? |
21:00:22 | wtw | sry, answered def- |
21:00:30 | dtscode | o |
21:00:47 | dtscode | how can you have &status? |
21:00:51 | dtscode | if its an int |
21:00:51 | Araq | dtscode: zahary and jehan know plenty of internals too |
21:01:05 | Araq | but they are usually not as available as I am :P |
21:01:19 | dtscode | awesome. do you mind a few questions about the code generation part? |
21:02:50 | wtw | Araq: can you shed some light on why waitpid() has a cint as second parameter but the compiled-to-c version uses a pointer? |
21:02:58 | def- | wtw: that looks ok |
21:03:24 | wtw | ok, I don't really get it, somehow |
21:03:26 | wtw | :D |
21:03:37 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:05:37 | BlaXpirit_ | wtw, what are you talking about |
21:05:46 | BlaXpirit_ | it is not cint, it is var cint |
21:05:56 | wtw | yeah sry I'm a little confused ;) |
21:06:29 | wtw | Araq, disregard ;) |
21:06:49 | BlaXpirit_ | var argument is pretty much like ptr, but you use it as normal |
21:06:57 | ekarlso | ldlework: with oauth2 does oen typically create specific service accounts then or ? |
21:07:24 | wtw | ok, got it |
21:07:29 | wtw | thanks |
21:08:02 | * | bjz joined #nim |
21:09:20 | dtscode | i should really learn asyncdispatch and asyncnet |
21:09:22 | dtscode | :( |
21:09:44 | def- | wtw: from my experiments waitpid works properly in a small example |
21:10:56 | wtw | yeah, the only difference between linux and freebsd being, freebsd actually changes status even if the child has not exited |
21:11:03 | * | ehaliewicz joined #nim |
21:11:17 | * | UberLambda quit (Quit: Leaving the Matrix) |
21:11:22 | wtw | therefore I checked if it is really exited (WIFEXITED) and only change p.exitCode then |
21:12:28 | def- | wtw: i guess WIFEXITED is wrong |
21:12:33 | * | bjz quit (Max SendQ exceeded) |
21:12:51 | wtw | but didn't it work for you with status = 111? |
21:13:15 | def- | WIFEXITED only returns true if the child terminated with exit(3) or _exit(2) |
21:13:22 | * | Demon_Fox joined #nim |
21:13:26 | wtw | or by returning from main() |
21:13:30 | def- | that one doesn't work for me |
21:13:33 | def- | strangely |
21:13:35 | * | Outlander joined #nim |
21:14:09 | def- | https://gist.github.com/def-/61014b994a1c07a6556a |
21:14:25 | ekarlso | ldlework: should there be a type of expiry time or smth? |
21:14:27 | def- | try commenting out the quit(3), then status is 0 instead of 768 |
21:14:32 | wtw | sec |
21:14:52 | ldlework | ekarlso: it should be settable when the token is creatable |
21:14:55 | ldlework | created |
21:15:11 | ekarlso | ldlework: yeah, but I guess one wants to enforce a maximum ? |
21:15:15 | ekarlso | so it's not like 10 years |
21:15:23 | ldlework | I don't see why |
21:15:41 | wtw | def-: yep, same behavior for me |
21:16:45 | ekarlso | ldlework: fine by me, ldlework the kneat thing with jwt is you dont have to store tokens server side :D |
21:16:50 | ekarlso | just the JTI |
21:19:43 | def- | wtw: I thought that's because of Nim, but same behaviour in C |
21:19:57 | def- | so waitpid doesn't behave as documented, nice |
21:20:26 | def- | ah wait, my bad |
21:20:52 | def- | by exit(3) they mean the manpage 3 of course |
21:21:06 | wtw | yeah |
21:21:12 | wtw | ah, you returned 3, i see ;) |
21:21:31 | ekarlso | ldlework: ideas for it would be welcome :D |
21:21:37 | wtw | I only checked the compiled c output and saw a "return nim_program_result" |
21:23:05 | wtw | I also checked by forking and executing clang and gcc, there WIFEXITED works |
21:23:25 | wtw | WIFEXITED is actually only a check for 0 |
21:23:52 | ekarlso | is there any logging library for nim atm ? |
21:24:45 | def- | wtw: yeah, i see. hmmm |
21:25:08 | wtw | def-: aren't we ok then with settings status = 1 and leaving the rest? |
21:25:26 | Varriount | ekarlso: No, though there should probably be one. |
21:25:26 | def- | wtw: that sometimes fails for me too |
21:25:34 | wtw | :/ ok |
21:25:36 | ekarlso | Varriount: :'( |
21:27:21 | wtw | def-: I did three fully-fresh checkout bootstrap runs and they all worked, are you sure your nim binary was not corrupted by a previous run? |
21:30:55 | def- | ooh, now i get why it should work. I'm a bit slow today |
21:31:19 | wtw | me too :D |
21:32:03 | wtw | question remains why it worked on freebsd at all, because freebsd's doc say the same thing about status being NULL |
21:32:59 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805]) |
21:33:29 | def- | nono, that's not the reason |
21:33:47 | def- | the reason is that WIFEXITED checks whether the value is 0 |
21:33:59 | def- | freebsd probably sets the value to something other than 0 |
21:34:02 | def- | while linux does not |
21:34:30 | wtw | yep it does, freebsd sets the value every time waitpid is called, while linux only does so on proper exit |
21:34:44 | wtw | ah |
21:34:45 | wtw | :D |
21:34:55 | * | wtw is even slower today |
21:34:56 | def- | so setting status to 1 before is the way to go |
21:34:57 | wtw | ;) |
21:35:23 | def- | tried a clean build, compiles for me |
21:35:38 | def- | had some old stuff flying around before, I guess |
21:35:46 | wtw | already tried it before and works |
21:36:02 | wtw | arg, why didn't I realize this |
21:39:45 | * | milosn quit (Ping timeout: 256 seconds) |
21:39:49 | * | sampwing quit (Ping timeout: 252 seconds) |
21:39:56 | wtw | def-: pushed |
21:40:37 | * | Outlander quit (Ping timeout: 255 seconds) |
21:40:46 | wtw | thanks for the heads-up :) |
21:42:02 | Varriount | Araq: Is there a way to get the address of something that isn't a var type? |
21:42:37 | Varriount | I promise I won't modify anything - it's purely for diagnostic reasons |
21:43:09 | EXetoC | not if it's something other than a pointer |
21:43:59 | def- | Varriount: repr might sometimes work for diagnostics? |
21:45:51 | EXetoC | can asm subvert the type system? |
21:46:16 | * | milosn joined #nim |
21:46:21 | EXetoC | nvm |
21:47:16 | * | Matthias247 joined #nim |
21:47:45 | EXetoC | Varriount: you want the stack offset? |
21:50:19 | * | sampwing joined #nim |
21:51:16 | EXetoC | what's it useful for? |
21:53:41 | Varriount | EXetoC: Comparing that a piece of data hasn't been copied. |
21:54:07 | Varriount | EXetoC: I'm writing a 'StringView' data type, which is like a slice to a string, but not a copy. |
21:56:01 | EXetoC | ok but 'var' makes no difference in this case, right? unless you mean var parameter |
21:56:26 | EXetoC | I'm talking rubbish again. later |
21:58:08 | dom96 | ekarlso: Varriount: There is one. The 'logging' module. |
21:58:08 | EXetoC | but var and let locals only differ in mutability, so why not try with 'var'? |
21:58:44 | dom96 | ekarlso: The package names should be normalised. Use strutils.normalise i.e. they should be style insensitive like the rest of Nim. |
21:59:29 | dom96 | Varriount: cast[pointer](nonVarSymbol) |
21:59:43 | EXetoC | dom96: what do you think about the necessity of specialized tools because of the style-insensitivity? |
22:00:18 | Varriount | EXetoC: I can't take the address of a parameter without making it a var, which hampers usability. |
22:00:47 | dom96 | EXetoC: I think that most grepping tools have regex support so style insensitive search with them is trivial. |
22:01:08 | EXetoC | Varriount: I guess we have to live with that. I've just stopped worrying |
22:01:37 | EXetoC | Varriount: Araq said he didn't like the 'const' present in some languages. I don't know what the alternatives are |
22:02:02 | EXetoC | dom96: so underscores included? ok |
22:02:05 | ekarlso | dom96: how you mean normalized ? |
22:02:11 | EXetoC | grep too? |
22:03:43 | Varriount | EXetoC: I don't see how lack of 'const' affects anything. I just need a 'addrForImmutableTypesYesIKnowWhatImDoing' |
22:04:41 | dom96 | Varriount: I just told you how to do it. |
22:04:51 | dom96 | ekarlso: strutils.normalise. Look it up. |
22:04:58 | EXetoC | dom96: doesn't it cast the value? |
22:05:04 | EXetoC | rather then the address |
22:05:14 | EXetoC | I mean, location containing the address |
22:06:05 | EXetoC | that's easy to find out I guess |
22:07:15 | Varriount | dom96: Will that work with integers? |
22:08:57 | ekarlso | dom96: would be awesome if you could add exception stuff to jester -,,- |
22:09:20 | EXetoC | Varriount: try it. should be easy to figure out |
22:09:24 | dom96 | Varriount: Dunno. |
22:09:28 | dom96 | Varriount: Play around with casts. |
22:09:50 | dom96 | dtscode: You should really just ask Araq questions instead of asking whether you can ask him questions. |
22:09:57 | EXetoC | .eval 1 |
22:10:00 | Mimbus | EXetoC: eval.nim(3, 0) Error: value of type 'int literal(1)' has to be discarded |
22:11:13 | dom96 | Not asking to ask is a rule on many IRC channels. |
22:11:21 | dom96 | *in |
22:13:13 | dom96 | hrm, you can actually cast to 'var T' |
22:13:14 | EXetoC | Varriount: it'll just treat the value as a pointer |
22:13:27 | EXetoC | ok |
22:13:28 | dom96 | Doesn't seem to work as expected though |
22:14:41 | * | matkuki joined #nim |
22:15:39 | EXetoC | either way, it's the value that's being reinterpreted, not the address, which you just can't get to |
22:16:41 | * | matkuki quit (Client Quit) |
22:20:34 | EXetoC | Varriount: such an operator would be a very minor change that would increase the usage of 'let'. I'm generally not a fan of making low level operations more verbose, but having an operator with a long name for this purpose might be justified |
22:21:29 | * | fizzbooze quit (Quit: WeeChat 1.1) |
22:22:40 | EXetoC | Varriount: was that an actual suggestion btw? ;) how about a pragma? |
22:25:48 | EXetoC | "let x {.allowAddr.} = 3" |
22:27:32 | * | fizzbooze joined #nim |
22:44:14 | flaviu | What's the point of that? |
22:44:17 | flaviu | Just use var... |
22:48:03 | EXetoC | the use case was explained |
22:49:07 | fowlmouth | lol |
22:50:02 | EXetoC | flaviu: the point is to use let if one is sure that nothing will be mutated, but then maybe it makes more sense to annotate parameters instead |
22:51:16 | Araq | Varriount: yes, 'unsafeAddr' is in the works |
22:52:13 | flaviu | I still don't like it, too much added complexity. |
22:52:16 | fowlmouth | i have only ever needed to do that when interfacing with C |
22:52:31 | fowlmouth | (take the address of a parameter) |
22:52:41 | EXetoC | fowlmouth: that's not what he's doing though apparently |
22:52:52 | EXetoC | Varriount: got some code? |
22:53:04 | fowlmouth | i know, he wants to avoid marking a parameter 'var' because of some reason |
22:53:54 | * | saml_ quit (Quit: Leaving) |
22:54:09 | Araq | fowlmouth: yes it's for interfacing with C |
22:54:54 | EXetoC | it's about mutability like I said |
22:56:04 | Araq | dtscode: I'm ready for your questions now |
22:56:11 | Araq | if you're still awake |
22:57:39 | def- | Araq: Any thoughts on this? Should I just implement mitems?: http://forum.nim-lang.org/t/723#4013 |
22:58:12 | * | kuzy000 quit (Ping timeout: 264 seconds) |
22:58:35 | reactormonk | def-, why not |
22:58:40 | Araq | def-: well I like the explicitness, but overloading based on 'var' is a feature we need |
22:58:42 | reactormonk | and I should troll around the nim forums |
22:59:01 | Araq | the current workaround a la foo: (var T){lvalue} is just weird |
23:00:04 | Araq | so .. actually I like overloading based on 'var' (which is already in the language anyway, but weird) but still like the items vs mitems split |
23:00:20 | reactormonk | Araq, how come? |
23:00:22 | EXetoC | that's the actual syntax? |
23:00:24 | Araq | but mget should be [] |
23:01:07 | Araq | reactormonk: as I said, I think the explicitness is really nice, especially since the compiler still doesn't ensure memory safety for 'var T' as a return type |
23:01:18 | Araq | !!! |
23:01:52 | reactormonk | Araq, what does that do exactly, when not ensuring memory safety? |
23:04:28 | dtscode | sorry i started watching doctor who |
23:04:42 | dtscode | ill have to write out a list now and get back to you :} |
23:05:35 | flaviu | dtscode: Post it in the mailing list! |
23:10:02 | Araq | reactormonk: it crashes when you do use it wrongly? |
23:10:13 | Araq | what do you think memory safety means? |
23:10:22 | dtscode | flaviu, :D yes! |
23:10:35 | * | Outlander joined #nim |
23:10:42 | reactormonk | Araq, leak protection by the GC |
23:11:19 | Araq | memory safety pretty much means crash safety for some definition of 'crash' |
23:11:34 | reactormonk | Why does it crash exactly? Data corruption? |
23:11:59 | Araq | when you use it wrongly, you create a pointer to a stack frame that disappears too early |
23:12:43 | reactormonk | Got an example around how to do that? |
23:15:31 | Araq | proc trick(x: var int): var int = x # trick the semantic checking |
23:16:30 | Araq | proc foo(): var int = |
23:16:36 | Araq | var local: int |
23:16:43 | Araq | result = trick(local) |
23:19:14 | reactormonk | Ok, I see. Any way to detect that? (looks like bad code to me anyway) |
23:22:23 | Araq | yeah but it's ... complex |
23:22:48 | Araq | we figured out how to do it ~3 years ago though |
23:23:44 | Araq | but with the effect system we can do it differently, I think |
23:25:22 | * | sillesta quit (Ping timeout: 240 seconds) |
23:26:50 | Araq | in fact ... a simple heuristic should do |
23:29:32 | * | Trustable quit (Remote host closed the connection) |
23:35:09 | * | Etheco joined #nim |
23:38:42 | * | irrequietus quit () |
23:46:26 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:48:11 | ekarlso | ldlework: https://github.com/ekarlso/nim-packages/issues/3 |
23:57:00 | * | fizzbooze quit (Ping timeout: 272 seconds) |