<< 27-01-2015 >>

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:30gmpreussneris the complete syntax for the docs comments documented anyway?
01:32:49def-gmpreussner: it's rest, isn't it?
01:32:57def-rst
01:34:27gmpreussnerfound it
01:34:32gmpreussnerhttp://nim-lang.org/docgen.html
01:41:58Synatrasup
01:42:00gmpreussnerhmm... 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:11gmpreussnerand it doesn't always honor paragraph spacing
01:47:06SynatraCan i see Nim bot in action?
01:52:06SynatraNimBot: "hi"
01:52:29SynatraNimBot: echo "hi"
01:53:20EXetoCit's nimbus/mimbus that has that, none of which are here now
01:55:49*brson joined #nim
01:56:10SynatraWho controls whether is here or not?
01:56:14Synatrawhether?
01:58:55*darkf joined #nim
02:07:09*gsingh93 joined #nim
02:13:23*Mimbus joined #nim
02:13:38flaviu.give Synatra echo("o/")
02:13:41MimbusSynatra: o/
02:14:09Synatrao
02:14:11Synatraho2use
02:14:20flaviu.eval echo("123")
02:14:23Mimbusflaviu: 123
02:14:57flaviuThe input is first preprocessed with s/; ?/\n/g
02:15:40flaviuIf 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:56chroemHow will Nim's FFI behave if some outside C code throws an exception?
04:37:17chroemIs it possible to catch an exception thrown by some C code?
04:39:27chroemWell, 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:08gokrWe really should start maintaining a list of links to Nim articles on the homepage
09:26:01BlaXpiritisn'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:58gokrBlaXpirit: Yes, but... it will be filled with quite a bit of noise probably.
10:17:30gokrMy 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:03gokrAlso, 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:09kashyap_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:11def-kashyap_: compared to what?
10:32:54kashyap_Compared to expected output ... from the code it appears that it should generate the average of the list of numbers entered
10:32:54def-if you're comparing to python, python includes the newline character(s) in lines while nim doesn't
10:34:32def-looks correct to me
10:34:34kashyap_Oh got it!
10:34:52novistany idea if i can dump AST **after** all the macros/templates/code transforms are done?
10:34:52kashyap_I was entering the numbers separated by newline ...
10:35:09kashyap_thanks
10:40:21kashyap_What's the story behind the name Nim?
10:40:43def-not sure, but you can at least do it for a single template/macro invocation: static: echo treeRepr(getAst(foo("foo")))
10:41:32novistthats probably good enough, thanks def-
10:41:34BlaXpiritdef-, i've been looking into this
10:41:39BlaXpiritError: 'getAst' can only be used in compile-time context
10:42:28def-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:14def-BlaXpirit: there was a better way to do this but i forgot
10:44:31BlaXpiritah, def- and novist
10:44:37BlaXpiritjust put that into static:
10:44:39BlaXpiritand it works
10:44:57def-BlaXpirit: i said so :P
10:45:11BlaXpiritfacepalm
10:45:18kashyap_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:44def-kashyap_: got nimkernel working
11:05:22*vendethiel quit (Quit: q+)
11:05:32kashyap_dev-> nope ... I just got started ... have posted on the forum
11:05:40def-kashyap_: no, i got it working
11:05:47kashyap_Hurray!!!!
11:05:51novistvar b = (var n = (ref MyType)(id: 10, value: 20); init(n[]); n)
11:06:01def-I'm making the PRs right now, were pretty small changes
11:06:02novistcan n somehow not escape this "scope"?
11:06:10novisti want it just as temporary placeholder to call init.
11:06:17novist(this is template for macro ast)
11:06:55kashyap_def-> can I clone from somewhere?
11:07:45def-There was a small problem in Nim itself: https://github.com/def-/Nim/tree/more-deprecations
11:08:34def-and here's nimkernel itself: https://github.com/def-/nimkernel
11:09:05kashyap_I'd need the fixed Nim to compile?
11:10:00def-just 1 file changed, no need to recompile Nim
11:10:13def-https://github.com/def-/Nim/commit/2d3db9cd6b6abac7a3ddd9689d62f733d1d451cf
11:10:35def-and that's if you're on the devel branch, maybe it works if you have 0.10.2
11:11:27kashyap_great ... thanks def-
11:13:35novistbtw answer to my question is inline proc: var b = (proc(): ref MyType = result = (ref MyType)(id: 10, value: 20); init(result[]))()
11:13:45novistdef- that kernel project is pretty damn awesome
11:15:02gunngokr: also would be nice to get nim recognised on wikipedia
11:15:08*polde quit (Quit: WeeChat 1.2-dev)
11:15:26def-gunn: need external sources about nim for this, otherwise it's useless
11:15:30*keyle joined #nim
11:16:36gunndef-: 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:47dom96def-: Pulled. Thanks for fixing.
11:20:59def-dom96: should I update the binutils/gcc versions?
11:21:39dom96If they work then sure.
11:21:48def-yeah, i built with the most recent ones
11:23:21dom96In that case go for it.
11:24:55*BitPuffin quit (Ping timeout: 252 seconds)
11:28:24dumdummispelled 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:38def-dumdum: you can create a pull request yourself if you want
11:35:14def-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:52dumdumI 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:16def-https://help.github.com/articles/creating-a-pull-request/
12:01:39def-it's a bit complicated for something so simple, i guess
12:02:11dumdumyes
12:02:14def-you could also edit the file on github diretly with the pencil symbol in the top right corner
12:02:53dom96Yeah, 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:21dumdumyes, it was easier, hope I got it right: https://github.com/Araq/Nim/pull/2015
12:06:19def-Looks good. Now you can fix the entire documentation!
12:06:24*lyro quit (Read error: No route to host)
12:06:38dumdum:)
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:11Araqhey keyle_
12:23:28*dumdum quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
12:29:17ekarlsohmm
12:29:26ekarlsoshould allowed download methods be a pre-set list ?
12:29:31ekarlsoor used specified..
12:30:09*keyle_ quit (Quit: Lost terminal)
12:32:27Araqnovist: () do not introduce a scope, nor should they
12:34:31novistyeah figured as much already
12:34:32*lyro joined #nim
12:35:06Araqwe have hygienic templates for that, or in a macro you can use 'gensym'
12:36:36novisti 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:47keyle_sys
13:06:54keyle_oops
13:08:43keyle_hey back Araq
13:09:35keyle_this elementaryOS linux is fantastic.
13:09:45*cow_2001 quit (Quit: ASCII Muhammad - @o<-<)
13:18:25dumdumif my method signature is: proc classes(node: Node): ref HashSet[string] , then how does nim create 'result' var?
13:19:17dumdumvar 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:59def-dumdum: no, it's just initialized to binary 0, i guess
13:25:23*keyle_ is now known as keyle
13:25:56dumdumdef-: on heap?
13:26:54def-dumdum: no, the pointer is just a 0, so nothing is allocated yet
13:26:56dumdumor just a null pointer on stack
13:27:00def-exactly
13:27:07dumdumok, thanks
13:27:16def-to initialize it you can do "result = new HashSet[string]" yourself
13:27:51dumdumyes
13:30:07def-dumdum: oh, there was something wrong with the PR after all =/
13:30:37dumdumPR?
13:30:42def-pull request
13:30:46dumdumoops tell me
13:31:25def-https://github.com/Araq/Nim/pull/2015
13:34:20Araqdef-: can you test https://github.com/Araq/Nim/pull/2010 on linux please?
13:34:52*EXetoC joined #nim
13:35:19def-Araq: sure
13:37:14dumdumdef-: done,https://github.com/Araq/Nim/pull/2016
13:41:07def-Araq: good that we tested, doesn't bootstrap anymore
13:41:41def-Araq: i did the regular boostrap, should i have created special csources first or something?
13:42:02ekarlsokeyle: u got time for some layout love or ?
13:42:04Araqdumdum: thanks. applied.
13:42:35Araqdef-: nah, if it fails, it fails. why does it fail?
13:42:59keyleekarlso, nope sorry
13:43:09ekarlsokeyle: :'(
13:43:16ekarlsoi guess noone cares for it :D
13:45:50def-Araq: linking fails: https://github.com/Araq/Nim/pull/2010
13:46:01ekarlsokeyle: $dayjob$ business ? ;)
13:46:27keylenightjob business
13:46:45ekarlsokeyle: anyawys, if you get the time would appreciate some html help :P
13:47:53Araqdef-: er, are you sure it's not caused be the jsgen fix that I pulled?
13:48:08def-Araq: oh, didn't check if devel bootstraps right now
13:48:36ekarlsois there a reason why ^ stuff isn't checked pr commit on devel ?
13:49:06Araqekarlso: yes. nobody configured our buildbot to do that
13:49:17ekarlsoAraq: meh :P
13:49:35AraqVarriount__ did a really good job on it, but nobody helps him with it afaict
13:49:49keyleAraq, btw I found docgen can generate json of the nim stdlib
13:49:53keyleso it's all good there
13:50:05Araqkeyle: oh?
13:50:10ekarlsokeyle: u doing anything cool with nim-lang atm ?
13:50:14Araqit can already do that?
13:50:38keylebut I couldn't compile docgen for some reason, the nested folders in lib...
13:51:02keyleAraq, according to this, it can http://nim-lang.org/docgen.html
13:51:32keyleekarlso, a better way to browse the stdlib
13:51:42def-Araq: devel builds just fine
13:51:47wtwdef-: 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:52ekarlsokeyle: awesome (:
13:51:58keyletime to get nim on this elementaryos
13:52:01*threewood joined #nim
13:52:04ekarlsodoes nim have it's own buildbot thing or ?
13:52:13ekarlsoas in written in nim Iguess
13:52:14def-wtw: ah, you're here. I have no idea what causes it
13:53:35Araqkeyle: 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:10keyleAraq, docgen2 ?
13:54:45def-ekarlso: it had, but was replaced with a python one
13:54:48keyleaka nim doc2
13:55:02def-https://github.com/nim-lang/nimbuild
13:55:05def-http://buildbot.nim-lang.org/
13:55:37keyleso 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:47ekarlsohmmms, why not just use jenkins ? *guess someone will shrug java* ..
13:55:51keyleaka `make install` ?
13:56:14def-keyle: easiest is to add the bin directory to your $PATH
13:56:18Araqekarlso: jenkins ... lol, used that one in production. sucks. but ymmv
13:56:34ekarlsoAraq: openstack runs it in massive scale to say the least :P
13:56:36ekarlsoworks dandy
13:56:57Araqit may "work" but its web UI is a pita
13:57:18ekarlsoAraq: they dont use the ui, they have a tool that parses "yaml" templates into jobs ;p
13:57:19keylewe use Jenkins at work too, it's a bit wonky
13:57:36ekarlsosubmit a change to a repo > puppet applies stuff > new jenkins configs
13:57:37keyleis travis CI good enough ?
13:57:45keyledef-, ok thanks
13:58:01Araqmeh I love nimbuild even with all its warts
13:58:45ekarlsonow a fun challenge, how to do db migrations in nim...
13:58:57def-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:18ekarlsodef-: for some stuff it's no use in reinventing stuff :p
13:59:54Araqekarlso: nobody helps Varriount__. even though it doesn't reinvent anything. so much for that theory.
14:00:11ekarlsoAraq: uhm, I can try out..
14:00:37ekarlsowanna fix nimble / packages stuff first though :(
14:01:51Araqbbl
14:02:14wtwdef-: I'm at work currently, so I'm not really following, but I'll have a look what causes the problem
14:02:34keyledef-: Araq: you could also advertise that irclogs is made with nim
14:03:16keyleAraq: any plans on distributing nightlies?
14:04:30ekarlsomeh, great nimble doesn't work behind a proxy ...
14:04:37ekarlsoyay for corp proxies
14:05:13keyleekarlso: make a proxy in nim :P
14:05:30ekarlsokeyle: haha
14:05:33ekarlsono thnx :p
14:06:01xeizlifekarlso: Can you SSH? Use ssh's -D option and tsocks
14:07:06xeizlifwait, 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:04ekarlsoor just make a patch for nim to support using http_proxy vars :p
14:08:04xeizlifdisclaimer: you'll probably get fired if you get caught, please don't blame me ;D
14:08:32xeizlifyeah but... finding a hackish workaround is The Programmer Way! /s ;)
14:09:09keyleAraq: jsondoc appear to work ok: "code": "proc cmpIgnoreStyle*(a, b: string): int {.noSideEffect, rtl, \u000A extern: \"nsuCmpIgnoreStyle\", procvar.}"
14:09:19keyleI can work with that.
14:09:37ekarlsoBlaXpirit_: u about ?
14:15:22*johnsoft joined #nim
14:15:50*BitPuffin joined #nim
14:17:37*reem joined #nim
14:18:26dom96ekarlso: keyle: i'm rewriting nimbuild currently
14:18:50def-dom96: oh, nice
14:19:08*reem quit (Remote host closed the connection)
14:21:20*reem joined #nim
14:23:40ekarlsohmmm, does "os" define a args variable or smth?
14:24:07def-ekarlso: yes: http://nim-lang.org/os.html#paramCount,
14:27:26ekarlsohttps://bpaste.net/show/a213d09ccbea lib/system.nim(1954, 16) Error: undeclared identifier: 'data'
14:27:30ekarlsodont get it why :|
14:27:38ekarlsonim -c -r test.nim
14:27:43*keyle quit (Ping timeout: 272 seconds)
14:27:43ekarlsoehm, -c > c
14:29:37*keyle joined #nim
14:29:37*keyle quit (Client Quit)
14:30:16ekarlsoah, 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:40onionhammer1so when will nimsuggest work?:)
14:44:26Synatrawhats nimsuggest
14:49:30dumdumide tools! I am tired of switching between editor and docs :( hunting for methods
14:50:30Synatratell me about -.-
14:51:06SynatraEverytime I try to do sometinhg in Rust, I later find out (after finishig it) that theres a method for it
14:51:51dumdumnim docs are easier on the eye than rust ones i think
14:59:37dumdumwould Nim be compilable to rust?
15:05:47dom96Sure. But why would you want to do that?
15:06:42EXetoCwhat about bf?
15:07:14xeizlifno
15:08:05xeizlifyou 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:26EXetoCdamn
15:09:43xeizlifyou'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:14EXetoCunsafe everywhere? :-)
15:10:23xeizlifThat will do part of the job
15:11:44EXetoCwhat about exceptions?
15:11:59xeizlif[I'm not sure how to deal with those~]
15:12:21EXetoCthe 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:00xeizlifIs 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:27wtwfunny, when sleeping long enough before linking, the linux version bootstraps with the freebsd parallel build fix
15:18:48wtwexactly the inverse situation as before (when sleep was necessary on freebsd)
15:20:08wtwbbl
15:27:58*VinceAddons joined #nim
15:28:00*dumdum quit (Quit: Leaving.)
15:32:15onionhammer1hm
15:32:32onionhammer1the 'declared' example uses 'defined' in the system.nim documentation ;)
15:36:15*BitPuffin` joined #nim
15:36:19gokronionhammer1: Nimsuggest works now AFAIK. At least Andreas said it works.
15:36:38gokrNot yet integrated with aporia though of course, Andreas wrote it this last weekend.
15:36:40onionhammer1i tried it last night, didnt do much
15:37:13onionhammer1gave me some hints when i tried to do a 'def'
15:37:22gokrOk, then hang on and ask Andreas when he gets back.
15:37:53*onionhammer1 is now known as onionhammer
15:38:31onionhammergokr where did he say it works?
15:38:59gokrI 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:13onionhammeroh okay
15:39:47gokrHe aims to integrate it with Aporia this upcoming weekend I think.
15:40:04onionhammerwell i plan to integrate it into nimlime soon :)
15:42:24onionhammerbut only if it works.
15:43:59onionhammerah got it working :)
15:44:57onionhammerso 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:01dumdumis there a function to consume an iterator to a list?
15:57:34Synatrawhy wouldnt you want to compile down to rust? :)
15:59:24dumdumI have an iterator over strings, and want to use: proc toSet[A](keys: openArray[A]): HashSet[A]
15:59:37dumdumso can pass the iterator as is?
16:03:23gmpreussner|workxeizlif: 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:40EXetoCdumdum: see sequtils.toSeq
16:07:15EXetoCdumdum: I don't think you can pass an iterator, but it's easy to try
16:11:10dumdumthank 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:32xeizlif_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:46gmpreussner|workxeizlif, sounds like some refactor is in order :)
16:25:18Varriount__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:03onionhammerVarriount__ it looks like our CaaS usage wont work anymore with araqs changes
16:41:14onionhammerbut the go-to-definition stuff works again
16:41:22onionhammerwith the caas turned off
16:43:04Varriountonionhammer: To be honest, I've never had CaaS work for me
16:45:01onionhammerapparently araq worked on it this past weekend
16:45:16onionhammerso i can get it working from the command line
16:45:36onionhammerbut 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:41ekarlsonot possible to do if "foo" not in sequence ?
16:51:16EXetoCnotin?
16:51:24ekarlso-,,-
16:51:50EXetoCor add some parens, but notin is better
17:04:14*gsingh93 joined #nim
17:04:49*vendethiel quit (Ping timeout: 252 seconds)
17:06:03Araqhey onionhammer. what do you want to know?
17:07:43reactormonkAraq, btw, do you wanna make the caas use json?
17:08:15*vendethiel joined #nim
17:08:26Araqreactormonk: no. there will be a --json switch to change the output format
17:08:33reactormonkAraq, perfect
17:08:39Araqbut the tab based thingie will stay
17:08:52AraqI noticed it's lots of pointless effort to change the format now
17:08:56Araqfor no gain whatsoever
17:09:28reactormonkProbably.
17:11:45*Matthias247 joined #nim
17:12:16gmpreussner|workwhat's CaaS?
17:12:23onionhammerAraq are you basically splitting idetools out of nim and into nimsuggest?
17:12:31onionhammershould we use nimsuggest going forward?
17:12:42Araqthat's what I did.
17:12:44reactormonkgmpreussner|work, compiler as a service, aka asking the compiler for IED information
17:12:52gmpreussner|workah ok
17:13:01Araqnimsuggest is the future
17:13:05onionhammerokay
17:13:13Araqand for me it works well
17:13:29onionhammerAraq I guess some more documentation would be nice then; it's not working for me thus far
17:13:37AraqI'm testing it on a 25K project and the compiler itself
17:13:42onionhammerdoes it work w/ absolute paths?
17:13:51onionhammeror only relative
17:13:58AraqI only use relative paths
17:14:05onionhammerhmmm
17:14:14Araqand don't use the dirty buffer feature
17:14:18onionhammerok..
17:14:41Araqalso, completion in templates and generics doesn't work at all yet, but I'll fix that
17:15:05Araqyou can enable debug mode
17:15:17Araqand then it's often clear why something can't work
17:15:24Araqwell for me
17:15:28Araqgotta go, see you later
17:15:54onionhammerokay
17:16:05onionhammeri'll look into it more, thanks
17:16:21onionhammeroh.. is it going up on nimble?
17:16:23onionhammer;)
17:19:49onionhammerit'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:57novistwhats the purpose of nnkEmpty in AST?
17:37:13*reem joined #nim
17:39:00ldleworkDo I hear something about idetools working now?
17:39:49*rational joined #nim
17:41:40*UberLambda joined #nim
17:42:45EXetoCldlework: with caas disabled I think
17:43:20ldleworkEXetoC: ah that causes a bit of pausing for each operation right
17:44:48*Sphax joined #nim
17:45:33Matthias247should still be usable (it was at least quite performant when it worked a year ago)
17:48:54EXetoCdoes 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:13EXetoCldlework: I would assume so
17:49:23onionhammerno caas works
17:49:37onionhammerbut nimsuggest isnt done yet I guess
17:49:46onionhammerAraq | also, completion in templates and generics doesn't work at all yet, but I'll fix that
18:02:08ekarlsoEXetoC: https://nim-pkg.svcs.io/#/tags/list < based on current package.json
18:02:21novistwould 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:02ekarlsonovist: drop the new
18:03:06ekarlsoMyType()
18:03:13ekarlsoor ?
18:03:15*Sphax quit (Quit: ZZZZZzzzzz)
18:03:37novistyeah well - im trying to make it work so that kind of defeats purpose ;)
18:03:50novistif you did not notice new implementation is above
18:06:52ekarlsoI wonder what the performance is on using sqlite backend vs mysql
18:07:54novistdepends on your workload
18:08:13novistunless its something big sqlite is pretty good
18:08:31novisteven moderately concurrent application does well w/ sqlite
18:10:06novistthese compiler error messages are really vague at times
18:13:46*dumdum joined #nim
18:14:20EXetoCekarlso: great
18:26:07UberLambdaAraq, 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:01dumdumI get the following error in my first ever nim template: Error: template/macro instantiation too nested
18:48:20dumdumfor code here: http://pastebin.com/nbwE0bbH
18:48:52*Gonzih quit (Quit: leaving)
18:49:28dumdumI want to pass the expr: 'c != openQuote' to the closure created inside the template
18:51:25def-dumdum: inside your template you invoke your template again
18:51:37def-consume_while is the same as consumeWhile
18:51:46*flknfkjnsfkjwnFK joined #nim
18:52:27dumdumwow, thanks!
18:53:20*reem joined #nim
18:53:35*Gonzih joined #nim
19:07:05*Sphax joined #nim
19:10:30AraqUberLambda: first bootstrap after 2 years of work iirc
19:10:57Araqbut note that this was with a then completely new GC implementation
19:11:20UberLambdaAraq: hm, bootstrapped from?
19:11:32AraqDelphi/FPC
19:11:37UberLambdaAraq: thanks
19:11:57UberLambdaAraq: I'm considering on starting a small scripting language, but I'm not sure if it's worth the effort
19:12:17UberLambdaAraq: just a toy lang, nothing serious
19:12:35Araqit's trivial, just adapt compiler/vm.nim and the parser etc ... ;-)
19:14:17UberLambdaAraq: I could try implementing it from scratch in Haskell :P
19:14:27UberLambdaAraq: mainly because of Parsec and LLVM
19:14:35UberLambdawell, that's not really from scratch then
19:14:39Araqyeah or you could be productive and use Ocaml instead :P
19:16:16UberLambdaAraq: yeah, but no parser combinators...
19:19:42Araq*shrug* never needed those
19:21:04Araqonionhammer: 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:11UberLambdaAraq: they really simplify lexers
19:22:34Araqalso that it works for a single project has a deliberate design decision to keep complexity down
19:22:40Araq*was a
19:23:49AraqUberLambda: 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:36UberLambdaAraq: it wouldn't need to be efficient :P
19:29:09Araqand 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:49threewoodAraq: how much of the language design did you have figured out when you started bootstrapping?
19:41:24ekarlsoshould we enforce lower case names for pacakges ?
19:47:19*matkuki joined #nim
19:50:57ldleworkthat'd be nice
19:52:26wtwdef-: 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:42wtwi.e. it'll work under Linux but probably not other POSIX systems
19:53:03wtwall (un)educated guesses however :)
19:55:12def-wtw: yeah, would be nicer to find a solution that works properly on all POSIX
19:55:53wtwproblem is, the current behavior is not really documented, at least that's what I get from the docs
19:56:48wtwwell, I'll investigate a little more, strange thing is, on my ubuntu 14.4 vm everything works perfectly
19:56:52wtw(bootstrap)
19:57:16def-but you also saw the problem elsewhere?
19:57:42wtwyes, on my machine @work it also showed (8 cores)
19:58:15wtwi.e. my patch is definitely not perfect :)
20:05:51Araqwtw: well the same code run on macosx without any problems
20:06:07Araqand who cares if it's posix compliant.
20:06:35Araqlinux itself isn't really
20:07:06wtwI'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:38wtwthis 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:54matkukiThis 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:56matkukiIs there an iterator that could do this or is the only option to use "for i in 0..len(sprite_objects)-1:"?
20:13:32ldleworkmatkuki: seq[var ActiveObject]
20:13:43matkukilet me try...
20:14:17def-matkuki: we want to add the mitems iterator, then it will work
20:14:42matkukidef-: Great! In the next release?
20:15:15def-matkuki: probably even earlier. i just ran into a compiler error when implementing them, so they're half finished
20:15:56ldleworkdef-: so my answer was wrong?
20:16:02def-oh, it's fixed!
20:16:12def-that means I can finish implementing mitems, will do that today
20:16:38def-ldlework: no idea if it works with a set
20:16:39ekarlsoldlework: i was thinking to just change the package name to toLower when the request is received api side :p
20:16:46ekarlsoso it would always be lowercase not matter what the user types
20:16:50ldleworkekarlso: do it
20:16:59ekarlsoalready doing it for tags so :P
20:17:04ldleworkthough we should enforce it at the language level
20:17:16ekarlsoldlework: meaning ?
20:17:34ldleworkekarlso: only allowing lower case package names
20:17:36matkukiIdlework: I get "Error: invalid type: 'proc (seq[var ActiveObject], cint)'"?
20:17:42ekarlsoldlework: uh sure
20:17:48ldleworkekarlso: ?
20:17:55ekarlsoldlework: that's fine as well : )
20:18:15ldlework"Why wont nimble let me create a package with upper case letter but Nim will?"
20:18:17ldleworketc
20:18:37ekarlsoyeah, i'll add a api enforcement on that one
20:19:22def-Araq: So, any opinion on this, or should I just do mitems?: http://forum.nim-lang.org/t/723#4013
20:20:58ekarlsoI wonder if I should allow a user or so to create a "service" token
20:21:16ekarlsoso 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:34ldleworkekarlso: definitely
20:23:41ldleworkplease use oauth like everyone else
20:24:12ekarlsoldlework: hmmms, how you do that for services though ? ^
20:24:20ldleworkWhat do you mean
20:24:21ekarlsoalready added jwt tokens for the api itself
20:25:05ldleworkekarlso: that's OpenID right?
20:25:54ekarlsogood q ldlework ;p
20:25:57wtwdef-: got a second for the freebsd stuff?
20:26:41*Arcanum_za joined #nim
20:26:50ldleworkekarlso: 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:25ekarlsoldlework: I wonder how it's done for pypi / npm etc
20:28:42ldleworkekarlso: both of those are terrible examples to follow
20:28:59ekarlsoldlework: -,,-
20:29:03ldleworkJust saying.
20:29:23ekarlsoisn't oauth hard to implement though ?
20:30:15wtwdef-: 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:49wtwdef-: 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:12ekarlsoldlework: so oauth2 is not user / password based or ?
20:35:57ldleworkekarlso: oauth is easy to implement
20:36:24ldleworkekarlso: 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:33ldleworkuser can later delete this token from the same control panel
20:36:39ldleworkthere isn't much more than that
20:36:46ekarlsoldlework: how long are they valid then ?
20:36:53ldleworkekarlso: let the user specify
20:37:00ldleworkwith indefinite being an option
20:37:03*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:37:11ekarlsoldlework: really then I already have that using JWT
20:37:21ekarlsojust need to add the checks etc
20:37:58ldleworkekarlso: sure ok, just that JWT isn't really a widespread standard at this point
20:38:01ldleworkbut oauth is
20:38:10ldleworkI'm sure JWT will be fine
20:38:19def-wtw: oh, you're right, still doesn't bootstrap
20:39:00wtwbut it should, shouldn't it? :)
20:39:22def-I'm wondering why that is
20:39:24wtwthe other changes (WIFEXITED etc that I moved) don't change anything
20:39:48wtwis this 'var status' initialized with zero by default?
20:39:56def-yes, should be
20:40:11wtwhmm probably that's a problem, let me check
20:40:53wtwlol
20:40:56wtwsuccess :|
20:41:18wtwcould you try: var status : cint = 111 (or whatever)
20:41:27wtwre-include the WIFEXITED
20:41:29def-why not 0?
20:41:30wtwand try again
20:41:44wtwi think, posix waitpid() says, if status is zero, it won't do anything
20:41:46wtw:|
20:41:49wtwor rather
20:41:54wtwif status == NULL
20:42:04def-ehm, shouldn't status be a pointer then?
20:42:20wtwoops,
20:42:20wtwsure
20:42:51def-hm, no
20:42:58wtwI figured, this works automatically somehow...
20:42:59def-proc waitpid*(a1: TPid, a2: var cint, a3: cint): TPid
20:43:11wtwwell, but: http://linux.die.net/man/2/waitpid
20:43:12def-yeah, with the "var cint" that's the intention i think
20:43:16wtwpid_t waitpid(pid_t pid, int *status, int options);
20:44:55wtwit also worked/acted as a pointer before when passing p.exitCode
20:44:59*sillesta joined #nim
20:45:43wtwI'm too ignorant of Nim too tell what's happening there
20:45:46wtw;)
20:47:20def-should do a ./koch clean
20:47:25EXetoCwtw: zero-initialization for everything not annotated with noInit
20:47:35def-otherwise it works no matter what's in osproc
20:47:41def-so I don't think it's the 0 after all
20:48:39wtwyeah, a clean is imperative, I also missed that when first committing
20:48:52*d3m1gd quit (Ping timeout: 240 seconds)
20:49:10wtwbut it won't build from after a clean?
20:49:12wtwfor you
20:50:29wtwEXetoC: 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:34def-wtw: it works for me with 111, strangely
20:52:43def-the c code for running looks ok though
20:52:53def-it actually passes a pointer to status:
20:52:54wtwwell ok, this is at least consistent with posix/the linux doc
20:52:57def-ret = waitpid((*p).Id, (&status), WNOHANG);
20:52:59wtwah ok
20:53:21def-so this makes no sense to me right now
20:53:23wtwok and the doc says if you pass a NULL for status it won't do anything, that's ok
20:53:31def-no, that's not ok
20:53:37wtwnot? :)
20:53:43*fizzbooze joined #nim
20:53:52def-the doc says the pointer should not be NULL, for us the value it points to is 0
20:53:53def-right?
20:53:58def-the pointer should never be NULL
20:54:17wtwit says it will only put something in *status if it is not NULL
20:54:39wtwand by default it is NULL so the status will never be set and the build fails
20:54:41def-if the pointer is not NULL
20:54:52ekarlsoldlework: if you want oauth do you volunteer ? :D
20:55:15ldleworkekarlso: nope, like I said JWT is probably fine
20:55:21ekarlso;P
20:56:48wtwdef-: ah, you mean pointer vs pointed-to value?
20:57:02def-wtw: exactly
20:57:44dtscodewho would have intimate knowledge of the inner workings of the nim compiler? is it still Araq ?
20:58:21*bjz joined #nim
20:58:50wtwso if status is 0 the &status should fail basically
20:59:10wtwbut apparently something else is happening?
21:00:04dtscodewtw, hmmm?
21:00:22wtwsry, answered def-
21:00:30dtscodeo
21:00:47dtscodehow can you have &status?
21:00:51dtscodeif its an int
21:00:51Araqdtscode: zahary and jehan know plenty of internals too
21:01:05Araqbut they are usually not as available as I am :P
21:01:19dtscodeawesome. do you mind a few questions about the code generation part?
21:02:50wtwAraq: 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:58def-wtw: that looks ok
21:03:24wtwok, I don't really get it, somehow
21:03:26wtw:D
21:03:37*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:05:37BlaXpirit_wtw, what are you talking about
21:05:46BlaXpirit_it is not cint, it is var cint
21:05:56wtwyeah sry I'm a little confused ;)
21:06:29wtwAraq, disregard ;)
21:06:49BlaXpirit_var argument is pretty much like ptr, but you use it as normal
21:06:57ekarlsoldlework: with oauth2 does oen typically create specific service accounts then or ?
21:07:24wtwok, got it
21:07:29wtwthanks
21:08:02*bjz joined #nim
21:09:20dtscodei should really learn asyncdispatch and asyncnet
21:09:22dtscode:(
21:09:44def-wtw: from my experiments waitpid works properly in a small example
21:10:56wtwyeah, 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:22wtwtherefore I checked if it is really exited (WIFEXITED) and only change p.exitCode then
21:12:28def-wtw: i guess WIFEXITED is wrong
21:12:33*bjz quit (Max SendQ exceeded)
21:12:51wtwbut didn't it work for you with status = 111?
21:13:15def-WIFEXITED only returns true if the child terminated with exit(3) or _exit(2)
21:13:22*Demon_Fox joined #nim
21:13:26wtwor by returning from main()
21:13:30def-that one doesn't work for me
21:13:33def-strangely
21:13:35*Outlander joined #nim
21:14:09def-https://gist.github.com/def-/61014b994a1c07a6556a
21:14:25ekarlsoldlework: should there be a type of expiry time or smth?
21:14:27def-try commenting out the quit(3), then status is 0 instead of 768
21:14:32wtwsec
21:14:52ldleworkekarlso: it should be settable when the token is creatable
21:14:55ldleworkcreated
21:15:11ekarlsoldlework: yeah, but I guess one wants to enforce a maximum ?
21:15:15ekarlsoso it's not like 10 years
21:15:23ldleworkI don't see why
21:15:41wtwdef-: yep, same behavior for me
21:16:45ekarlsoldlework: fine by me, ldlework the kneat thing with jwt is you dont have to store tokens server side :D
21:16:50ekarlsojust the JTI
21:19:43def-wtw: I thought that's because of Nim, but same behaviour in C
21:19:57def-so waitpid doesn't behave as documented, nice
21:20:26def-ah wait, my bad
21:20:52def-by exit(3) they mean the manpage 3 of course
21:21:06wtwyeah
21:21:12wtwah, you returned 3, i see ;)
21:21:31ekarlsoldlework: ideas for it would be welcome :D
21:21:37wtwI only checked the compiled c output and saw a "return nim_program_result"
21:23:05wtwI also checked by forking and executing clang and gcc, there WIFEXITED works
21:23:25wtwWIFEXITED is actually only a check for 0
21:23:52ekarlsois there any logging library for nim atm ?
21:24:45def-wtw: yeah, i see. hmmm
21:25:08wtwdef-: aren't we ok then with settings status = 1 and leaving the rest?
21:25:26Varriountekarlso: No, though there should probably be one.
21:25:26def-wtw: that sometimes fails for me too
21:25:34wtw:/ ok
21:25:36ekarlsoVarriount: :'(
21:27:21wtwdef-: 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:55def-ooh, now i get why it should work. I'm a bit slow today
21:31:19wtwme too :D
21:32:03wtwquestion 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:29def-nono, that's not the reason
21:33:47def-the reason is that WIFEXITED checks whether the value is 0
21:33:59def-freebsd probably sets the value to something other than 0
21:34:02def-while linux does not
21:34:30wtwyep it does, freebsd sets the value every time waitpid is called, while linux only does so on proper exit
21:34:44wtwah
21:34:45wtw:D
21:34:55*wtw is even slower today
21:34:56def-so setting status to 1 before is the way to go
21:34:57wtw;)
21:35:23def-tried a clean build, compiles for me
21:35:38def-had some old stuff flying around before, I guess
21:35:46wtwalready tried it before and works
21:36:02wtwarg, 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:56wtwdef-: pushed
21:40:37*Outlander quit (Ping timeout: 255 seconds)
21:40:46wtwthanks for the heads-up :)
21:42:02VarriountAraq: Is there a way to get the address of something that isn't a var type?
21:42:37VarriountI promise I won't modify anything - it's purely for diagnostic reasons
21:43:09EXetoCnot if it's something other than a pointer
21:43:59def-Varriount: repr might sometimes work for diagnostics?
21:45:51EXetoCcan asm subvert the type system?
21:46:16*milosn joined #nim
21:46:21EXetoCnvm
21:47:16*Matthias247 joined #nim
21:47:45EXetoCVarriount: you want the stack offset?
21:50:19*sampwing joined #nim
21:51:16EXetoCwhat's it useful for?
21:53:41VarriountEXetoC: Comparing that a piece of data hasn't been copied.
21:54:07VarriountEXetoC: I'm writing a 'StringView' data type, which is like a slice to a string, but not a copy.
21:56:01EXetoCok but 'var' makes no difference in this case, right? unless you mean var parameter
21:56:26EXetoCI'm talking rubbish again. later
21:58:08dom96ekarlso: Varriount: There is one. The 'logging' module.
21:58:08EXetoCbut var and let locals only differ in mutability, so why not try with 'var'?
21:58:44dom96ekarlso: The package names should be normalised. Use strutils.normalise i.e. they should be style insensitive like the rest of Nim.
21:59:29dom96Varriount: cast[pointer](nonVarSymbol)
21:59:43EXetoCdom96: what do you think about the necessity of specialized tools because of the style-insensitivity?
22:00:18VarriountEXetoC: I can't take the address of a parameter without making it a var, which hampers usability.
22:00:47dom96EXetoC: I think that most grepping tools have regex support so style insensitive search with them is trivial.
22:01:08EXetoCVarriount: I guess we have to live with that. I've just stopped worrying
22:01:37EXetoCVarriount: Araq said he didn't like the 'const' present in some languages. I don't know what the alternatives are
22:02:02EXetoCdom96: so underscores included? ok
22:02:05ekarlsodom96: how you mean normalized ?
22:02:11EXetoCgrep too?
22:03:43VarriountEXetoC: I don't see how lack of 'const' affects anything. I just need a 'addrForImmutableTypesYesIKnowWhatImDoing'
22:04:41dom96Varriount: I just told you how to do it.
22:04:51dom96ekarlso: strutils.normalise. Look it up.
22:04:58EXetoCdom96: doesn't it cast the value?
22:05:04EXetoCrather then the address
22:05:14EXetoCI mean, location containing the address
22:06:05EXetoCthat's easy to find out I guess
22:07:15Varriountdom96: Will that work with integers?
22:08:57ekarlsodom96: would be awesome if you could add exception stuff to jester -,,-
22:09:20EXetoCVarriount: try it. should be easy to figure out
22:09:24dom96Varriount: Dunno.
22:09:28dom96Varriount: Play around with casts.
22:09:50dom96dtscode: You should really just ask Araq questions instead of asking whether you can ask him questions.
22:09:57EXetoC.eval 1
22:10:00MimbusEXetoC: eval.nim(3, 0) Error: value of type 'int literal(1)' has to be discarded
22:11:13dom96Not asking to ask is a rule on many IRC channels.
22:11:21dom96*in
22:13:13dom96hrm, you can actually cast to 'var T'
22:13:14EXetoCVarriount: it'll just treat the value as a pointer
22:13:27EXetoCok
22:13:28dom96Doesn't seem to work as expected though
22:14:41*matkuki joined #nim
22:15:39EXetoCeither 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:34EXetoCVarriount: 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:40EXetoCVarriount: was that an actual suggestion btw? ;) how about a pragma?
22:25:48EXetoC"let x {.allowAddr.} = 3"
22:27:32*fizzbooze joined #nim
22:44:14flaviuWhat's the point of that?
22:44:17flaviuJust use var...
22:48:03EXetoCthe use case was explained
22:49:07fowlmouthlol
22:50:02EXetoCflaviu: 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:16AraqVarriount: yes, 'unsafeAddr' is in the works
22:52:13flaviuI still don't like it, too much added complexity.
22:52:16fowlmouthi have only ever needed to do that when interfacing with C
22:52:31fowlmouth(take the address of a parameter)
22:52:41EXetoCfowlmouth: that's not what he's doing though apparently
22:52:52EXetoCVarriount: got some code?
22:53:04fowlmouthi know, he wants to avoid marking a parameter 'var' because of some reason
22:53:54*saml_ quit (Quit: Leaving)
22:54:09Araqfowlmouth: yes it's for interfacing with C
22:54:54EXetoCit's about mutability like I said
22:56:04Araqdtscode: I'm ready for your questions now
22:56:11Araqif you're still awake
22:57:39def-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:35reactormonkdef-, why not
22:58:40Araqdef-: well I like the explicitness, but overloading based on 'var' is a feature we need
22:58:42reactormonkand I should troll around the nim forums
22:59:01Araqthe current workaround a la foo: (var T){lvalue} is just weird
23:00:04Araqso .. 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:20reactormonkAraq, how come?
23:00:22EXetoCthat's the actual syntax?
23:00:24Araqbut mget should be []
23:01:07Araqreactormonk: 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:18Araq!!!
23:01:52reactormonkAraq, what does that do exactly, when not ensuring memory safety?
23:04:28dtscodesorry i started watching doctor who
23:04:42dtscodeill have to write out a list now and get back to you :}
23:05:35flaviudtscode: Post it in the mailing list!
23:10:02Araqreactormonk: it crashes when you do use it wrongly?
23:10:13Araqwhat do you think memory safety means?
23:10:22dtscodeflaviu, :D yes!
23:10:35*Outlander joined #nim
23:10:42reactormonkAraq, leak protection by the GC
23:11:19Araqmemory safety pretty much means crash safety for some definition of 'crash'
23:11:34reactormonkWhy does it crash exactly? Data corruption?
23:11:59Araqwhen you use it wrongly, you create a pointer to a stack frame that disappears too early
23:12:43reactormonkGot an example around how to do that?
23:15:31Araqproc trick(x: var int): var int = x # trick the semantic checking
23:16:30Araqproc foo(): var int =
23:16:36Araq var local: int
23:16:43Araq result = trick(local)
23:19:14reactormonkOk, I see. Any way to detect that? (looks like bad code to me anyway)
23:22:23Araqyeah but it's ... complex
23:22:48Araqwe figured out how to do it ~3 years ago though
23:23:44Araqbut with the effect system we can do it differently, I think
23:25:22*sillesta quit (Ping timeout: 240 seconds)
23:26:50Araqin 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:11ekarlsoldlework: https://github.com/ekarlso/nim-packages/issues/3
23:57:00*fizzbooze quit (Ping timeout: 272 seconds)