<< 08-03-2015 >>

00:00:22flaviucurl https://raw.githubusercontent.com/ekarlso/nimvm/master/install.sh | bash should be curl https://raw.githubusercontent.com/ekarlso/nimvm/master/scripts/install.sh | sh
00:00:43ekarlso:p
00:00:57ekarlsoflaviu: pm welcome :p
00:04:19*goobles quit (Ping timeout: 246 seconds)
00:05:30*reem quit (Remote host closed the connection)
00:05:57BlaXpirit.eval var a: seq[int]; a.items
00:06:00MimbusBlaXpirit: eval.nim(4, 1) Error: expression 'items' cannot be called
00:06:01BlaXpiritwhat does this mean?
00:06:14Araqit's an iterator
00:06:26Araqyou can call it in a for loop context
00:06:39BlaXpirithow do I pass it to a function then?
00:06:43BlaXpiritoh..
00:06:46BlaXpiritclosure, huh
00:07:37*reem joined #nim
00:12:52OderWat@flaviu @ekarlso the instructions are not up to date anyway. the path does not exists anymore
00:13:33flaviuOderWat: https://raw.githubusercontent.com/ekarlso/nim-vm/master/bin/nim-vm
00:13:50OderWatI wrote a "change" list about nim-vm in the forum: http://forum.nim-lang.org/t/996 ... The readme needs to be fixed and I think there should be some instructions too. But know I am lazy for the remaining evening I guess
00:14:26OderWatTY @flaviu ;-)
00:14:46OderWatknow = now :)
00:32:17BlaXpirithow to implement typeclass for random access container?
00:32:41BlaXpiritc.high is SomeInteger is good
00:32:46BlaXpiritc[i] is T is not good
00:45:51OderWat@ekarlso pull request for readme is up :)
00:57:25ekarlsoflaviu: would you have a lumx app or a bootstrap one ?
00:57:33ekarlsoI tested bootstrap just for the feck of it
00:58:30flaviulumx looks better
00:58:30flaviu/me loves the click circles
00:58:31flaviuTry enabling caching first, see how that improves performance.
00:58:37ekarlsook :p
00:58:40flaviu\me loves the click circles
00:58:55ekarlsoclient failure :p
01:00:26flaviuLooking at the code a bit, can you use flex-item=2 on the version and CC? Seems to fix all the overlapping issues.
01:00:53ekarlsoflaviu: yeah
01:01:08ekarlsobtw, version isnt supported on the backend yet :p
01:01:17ekarlsoi got it here locally running just not upped it
01:01:36Varriountekarlso: Responded to your post for nim-vm on the forum.
01:02:24ekarlsohuh ? :p
01:02:29ekarlsoi didnt post anything there :p
01:02:33ekarlsoI think
01:02:35OderWat@Varriount I guess you mean me :)
01:02:39VarriountOh, wait, that was OderWat
01:02:51flaviuWhat if I want to choose Nim 0.10.2? The backend won't let me choose between 0.10.2 and 0.10.2!
01:02:57flaviu;)
01:03:14ekarlsobetween what flaviu ? :p
01:04:48flaviuIt's a joke, I'm presenting an alternative choice identical to the other choice.
01:06:37VarriountDo I choose hydrogen dioxide, or water. I don't know. :P
01:06:54ekarlsoflaviu: is perf any better ?
01:07:31flaviuekarlso: I don't think adding nginx is enough, you probably need to add something to the config.
01:07:51BlaXpiritOderWat, you wanna make a pull request with this? https://gist.github.com/BlaXpirit/ef63776bbe566be1a93c I'll take it from there
01:08:27BlaXpirit(talking about random) to the bottom of common.nim
01:08:32*Jehan_ quit (Quit: Leaving)
01:09:07flaviuekarlso: http://www.cruisemaniac.com/nginx-caching-and-compression
01:11:05OderWat@Varriount I answered on the forum. not sure how helpful that is actually. I have not idea about installing on windows
01:14:38OderWat@BlaXpirit I make one! Looks cood
01:16:36BlaXpirit3 AM though :|
01:16:47OderWat@BlaXpirit Do you want me to replace the existing iterator or add it as a proc?
01:17:16BlaXpiritOderWat, you can pretty much append the code to the bottom of src/random/common.nim
01:17:57OderWatHmm it looks more it belongs into random.nim as there is a iterator with the same name at the lower part of the source
01:18:32BlaXpiritrandom.nim just has aliases. you can make an alias as well if you want
01:18:59OderWatah well I just looked into the common.nim makes more sense !
01:23:14ekarlsomeh flaviu http://185.56.186.94/#/
01:23:18ekarlsodoesnt seem to help too much :/
01:25:27*BlaXpirit quit (Quit: Quit Konversation)
01:27:50*BlaXpirit joined #nim
01:27:57ekarlsooh
01:27:58flaviuekarlso: It helps *tremendously*.
01:27:59ekarlsonvm
01:28:02ekarlsoit's caching now :p
01:28:22ekarlsoso yeah, nginx is now serving all content :)
01:28:34flaviu320ms page loads are 10x better than 3s page loads.
01:28:42ekarlso:P
01:28:54ekarlsodoesn't help that you are over tha atlantic also :D
01:29:00ekarlsothe server is located in norway ;)
01:29:17flaviuYep, move the server to atlanta! I want 50ms page loads!
01:29:31ekarlsohah :p
01:29:42ekarlsoI got hpcloud in nevada if that's fine :p
01:30:53flaviuThat's only 2x closer than norway :/
01:31:06flaviubut 320 ms is fast enough.
01:31:06ekarlsohah :p
01:31:18flaviuIf Nim gets bigger, you can get a CDN for the assets.
01:31:29ekarlsonim gets bigger ?
01:31:40ekarlsohow does that change it :)
01:32:06ekarlsofixed the width of the select flaviu
01:32:20ekarlsoso then just gotta fix passing of the opts to the api
01:32:28ekarlsoill get that up tmrw
01:32:42ekarlsonow I gotta go sleep before the kiddo wakes up :/
01:33:35onionhammerekarlso latest output should be at the top\
01:33:48flaviuekarlso: How about cloudflare?
01:33:52*akiradeveloper quit (Remote host closed the connection)
01:34:01ekarlsoflaviu: probably :)
01:34:14flaviuThey have a free tier that looks pretty useful.
01:36:26flaviuI'm going to bug dom96 to add cloudflare to the nim site.
01:37:37ekarlso:p
01:37:43ekarlsodocs from the nim site
01:37:53ekarlsoshould have it's own domain ish a'ls docs.nim-lang.org
01:38:13ekarlsoonionhammer: fixed
01:38:39ekarlsoanyways, calling it a night, seeya tmrw
01:39:06onionhammergod natt
01:39:29*darkf joined #nim
01:39:54*akiradeveloper joined #nim
01:48:39*gsingh93 joined #nim
01:55:28*BlaXpirit quit (Quit: Bye)
02:09:12*a5i joined #nim
02:16:11*TEttinger joined #nim
02:17:02*fizzbooze joined #nim
02:36:36*akiradeveloper quit (Remote host closed the connection)
02:36:38*JusticeFries joined #nim
02:39:18*a5i quit ()
02:45:09*darkf quit (Quit: Leaving)
02:48:24*MagusOTB joined #nim
02:51:11MagusOTBI think I found a typo in opengl.nim
02:51:14MagusOTB GLarray4f* = GLvectorf4
02:51:33*chemist69_ joined #nim
02:51:38MagusOTBthe rest of them are GLarrayTN
02:54:36*chemist69 quit (Ping timeout: 246 seconds)
03:00:52*darkf joined #nim
03:01:15*a5i joined #nim
03:09:26*JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…)
03:12:22*JusticeFries joined #nim
03:18:35*jsudlow__ joined #nim
03:20:09*jsudlow quit (Ping timeout: 246 seconds)
03:27:03*akiradeveloper joined #nim
03:49:12*NimBot joined #nim
04:07:04*kashyap_ joined #nim
04:07:37kashyap_How do I declare a variable "static" as in local variable but program lifetime
04:14:21*davidhq joined #nim
04:14:31*davidhq quit (Client Quit)
04:16:52*davidhq joined #nim
04:18:59*akiradeveloper quit (Remote host closed the connection)
04:21:09*akiradeveloper joined #nim
04:21:37*reem quit (Remote host closed the connection)
04:29:53fowlkashyap_, proc main = ...; main()
04:30:18fowloh nevermind i read that wrong
04:30:26kashyap_ok :)
04:30:41fowla global variable is defined in the top level of a module
04:30:58kashyap_yeah ..that's what I am doing for now
04:30:59fowlinside a function you can get static variable with {.global.}
04:32:11fowlvar x{.global.} = 0
04:34:48kashyap_oh cool, thanks fowl
04:35:02*JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…)
04:52:49*reem joined #nim
04:54:22fowlekarlso, the repl looks good. i was going to recommend dyndns for a url but they arent free anymore, found this though http://lifehacker.com/the-best-free-alternatives-to-dyndns-1561556205
05:00:34*akiradeveloper quit (Remote host closed the connection)
05:04:19kashyap_is there a way to initialize arrays in a way that I assign values to specific indices ...
05:04:50*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:05:15*Menche quit (Quit: going home, brb)
05:05:25fowlother than arr[n] = value, arr = [0,1,2,3]
05:12:17*reem quit (Remote host closed the connection)
05:20:27kashyap_yes ... in c one can do int x[10] = { [9] 100}
05:20:35kashyap_where 9th index has the value 100
05:27:21fowli would write a macro to do it
05:29:13kashyap_oh okay
05:32:13*gsingh93 quit (Ping timeout: 264 seconds)
05:32:19fowlkashyap_, https://gist.github.com/fowlmouth/faf44627440db3ef70f1
05:32:37*reem joined #nim
05:32:46kashyap_awesome...thank you so much fowl
05:33:16fowloops that should be len(args)-1
05:33:38kashyap_ok
05:35:35*fizzbooze quit (Ping timeout: 246 seconds)
05:36:20kashyap_fowl quick question - cant the macro do the declaration as well?
05:36:56fowlit could
05:38:58kashyap_actually, fowl, could you give me a macro that expands to initialization instead of assignment
05:39:30*JusticeFries joined #nim
05:40:49fowlyep 1 sec
05:41:29*akiradeveloper joined #nim
05:53:47*JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:55:37*johnsoft quit (Ping timeout: 264 seconds)
05:57:47*johnsoft joined #nim
05:59:19*JusticeFries joined #nim
06:00:07fowlkashyap_, i cant make it work right now , found a bug
06:00:21kashyap_bug in nim?
06:00:32fowlyea
06:01:36kashyap_good something good came out of it :)
06:02:31fowlkashyap_, to make it work at initialization i was going to return (; var x: ty; x[index] = value; x)
06:04:19kashyap_actually fowl .. what I need is more like - setIndeces(x, 5, 0, 9, 2, 20) -> var x: array[5, int] = [9, 0, 20, 0, 0]
06:04:46fowlkashyap_, that version works
06:05:06kashyap_oh great. ... could you post it please
06:08:46fowlkashyap_, https://gist.github.com/fowlmouth/faf44627440db3ef70f1#file-gistfile2-nim
06:10:07kashyap_super!
06:10:28*Jesin joined #nim
06:11:14fowlmacros are awesome
06:11:38*ldlework quit (Ping timeout: 246 seconds)
06:12:41*saml_ quit (Remote host closed the connection)
06:13:42fowloh it wasnt a bug that kept that from working
06:13:55fowli needed to change :stmt on the macro to expr
06:14:55*johnsoft quit (Ping timeout: 256 seconds)
06:15:23*epichero joined #nim
06:15:27*johnsoft joined #nim
06:15:51kashyap_fowl you bet :)
06:17:44*Menche joined #nim
06:24:58*johnsoft quit (Ping timeout: 256 seconds)
06:30:27*johnsoft joined #nim
06:47:45*filwit joined #nim
07:02:05*flaviu quit (Remote host closed the connection)
07:02:11*flaviu joined #nim
07:02:59*JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…)
07:07:10*johnsoft quit (Ping timeout: 255 seconds)
07:08:57*a5i quit (Quit: Connection closed for inactivity)
07:18:08*quasinoxen quit (Ping timeout: 246 seconds)
07:18:51*quasinoxen joined #nim
07:19:23kashyap_Hey fowl, you there?
07:19:43fowlsup
07:20:11kashyap_the declArray seems to do the assignment .. which means the values are assigned at run time
07:20:29kashyap_It's not doing - setIndeces(x, 5, 0, 9, 2, 20) -> var x: array[5, int] = [9, 0, 20, 0, 0]
07:23:02*untitaker quit (Ping timeout: 246 seconds)
07:30:02*untitaker joined #nim
07:37:09fowlno its not
07:42:03kashyap_hey fowl .. could I request you to give me a version that produces the initialization array - I am trying with nnkBracket but its not working
07:44:33*reem_ joined #nim
07:44:46*reem quit (Read error: Connection reset by peer)
07:46:58fowlkashyap_, i updated the gist
07:47:35fowlkashyap_, i filled the nnkBracket with size 0s then in the loop i replace the 0 with the argument
07:47:46kashyap_cool :)
07:48:06*bcinman quit (Ping timeout: 264 seconds)
07:48:20kashyap_thank you so much fowl
07:49:00fowlkashyap_, i did it the other way so that it could work on any type, you should pass a default value so that it could be an array of something other than int
07:57:02*epichero quit (Read error: Connection reset by peer)
07:57:17*epichero joined #nim
07:58:41*epichero_ joined #nim
07:58:42*epichero quit (Read error: Connection reset by peer)
08:01:49*gmpreussner|work quit (Read error: Connection reset by peer)
08:05:04*reem_ is now known as reem
08:13:37*kashyap_ quit (Ping timeout: 246 seconds)
08:29:47*reem quit (Remote host closed the connection)
08:41:20*reem joined #nim
08:43:50*reem quit (Remote host closed the connection)
08:48:55*gokr quit (Quit: Leaving.)
08:52:53*reem joined #nim
08:53:09*quasinoxen quit (Ping timeout: 252 seconds)
08:53:46*arnetheduck joined #nim
08:56:56*reem quit (Remote host closed the connection)
09:00:59*xificurC joined #nim
09:07:23*reem joined #nim
09:13:17*akiradeveloper quit (Remote host closed the connection)
09:13:55*reem quit (Remote host closed the connection)
09:16:55*reem joined #nim
09:22:28*akiradeveloper joined #nim
09:30:00*reem quit (Remote host closed the connection)
09:32:06*reem joined #nim
09:41:23*arnetheduck quit (Read error: Connection reset by peer)
09:43:23*BlaXpirit joined #nim
09:47:00*epichero_ quit (Remote host closed the connection)
09:51:15*reem quit (Remote host closed the connection)
09:57:13*reem joined #nim
09:58:17*arnetheduck joined #nim
10:11:12BlaXpiritIs there a way to invoke a macro on an include?
10:14:59*reem quit (Remote host closed the connection)
10:17:01*akiradeveloper quit (Remote host closed the connection)
10:20:50*reem joined #nim
10:22:35*Matthias247 joined #nim
10:24:16*TEttinger quit (Ping timeout: 255 seconds)
10:27:36*reem quit (Remote host closed the connection)
10:27:53*arnetheduck quit (Read error: Connection reset by peer)
10:31:51novistBlaXpirit: doesnt my_macro include "thing" work?
10:34:19BlaXpiritwha
10:35:01novistactually guess not. but i suppose you can make my_include("file.nim") which would make ast of include with whatever else you want
10:37:55ekarlsomorning :p
10:38:20*goobles joined #nim
10:41:22*xificurC quit (Ping timeout: 240 seconds)
10:47:53*epichero joined #nim
10:52:28*epichero quit (Ping timeout: 252 seconds)
10:53:02*akiradeveloper joined #nim
11:08:14fowlBlaXpirit, m: include foo
11:09:06BlaXpiriti remember doing something like this, it told me include must be at top level
11:09:31fowlyou might be able to emit include at the top level then
11:10:32BlaXpiritbut it seems to work. i probably did something different
11:10:45BlaXpiritthanks
11:11:13BlaXpiritwhat the heck
11:11:18BlaXpiritimporting modules gives me output
11:11:45BlaXpiritoh including*
11:12:32BlaXpiritand by output i mean the unit tests run
11:15:49*reem joined #nim
11:17:40fowlthat makes sense
11:17:45fowli meant to say import
11:20:14*reem quit (Ping timeout: 245 seconds)
11:26:01*Matthias247 quit (Quit: Matthias247)
11:33:44BlaXpiritseems like having multiple templates with the same name doesn't work
11:35:39*Matthias247 joined #nim
11:56:56AraqBlaXpirit: of course it works.
11:57:15BlaXpiritwell it told me wrong number of arguments
11:57:18Araqbut not with .immediate
11:57:26BlaXpiritright
12:00:29Araqdef-: why is my.a[0..my.a.high] = my.c[0..my.c.high] still faster than the alternatives?
12:00:45Araqthe my.c[..] produces a fresh substring
12:04:25*arnetheduck joined #nim
12:14:26arnetheduckhi, a question about the nim source code: is the T before the types necessary somehow or just convention? if convention, is it intentional, or a leftover from pascal?
12:14:52BlaXpiritobsolete convention
12:15:25arnetheduckok, seems kind of redundant since the types are already uppercased
12:15:36def-Araq: strange, can't reproduce in microbenchmarks. my bad then I guess
12:15:39arnetheduckwhat about P for ref types, also obsolete?
12:15:42BlaXpiritNim used to be completely case-insensitive
12:16:02arnetheduckah, interesting
12:16:34Araqarnetheduck: T was for value types, P for reference types, contrary to popular belief case-insensitivity was not the primary reason for this convention
12:18:20Araqgot compile-times of 'niminst' from 10s to 2s :D
12:18:38Araqwith a 2 line fix in the GC
12:18:41def-Araq: what made it slow?
12:18:53Araqthe compiler hates my GC :P
12:19:01Araqit's deeply recursive
12:19:16*Matthias247 quit (Read error: Connection reset by peer)
12:19:29BlaXpiritI have a type `array[5, int]`. how to get the `int` from it?
12:19:39Araqtype(a[0]) ?
12:20:14BlaXpiritError: internal error: cannot generate VM code for type (bytes[0])
12:20:30Araqnice :-)
12:21:27AraqBlaXpirit: in a VM context it's better to use the new types API
12:21:41BlaXpiritany pointer to it?
12:22:00arnetheduckso doc/intern.txt is also obsolete/needs-fix? looks like it's still recommending T/P..
12:22:28Araqdoc/intern.txt is about the compiler, the compiler still uses T/P
12:23:38AraqBlaXpirit: macros.getType()
12:29:30arnetheduckI saw some redundant whitespace cleanup in the compiler the other day, could post a quick patch removing the rest if there's interest
12:30:45arnetheducks/redundant/trailing
12:31:09def-arnetheduck: some people tried before, PRs were not accepted
12:31:33Araqarnetheduck: I prefer to do it incrementally
12:31:46Araqwhenever I touch a file, whitespace is not deleted
12:31:53Araq*is now
12:32:26Araqbut I don't like huge whitespace cleanup commits
12:34:24arnetheducknoticed, had to go look for the ignore whitespace option when looking at recent developments ;)
12:39:57arnetheduckanother question - dead code elimination is listed as a feature, and when running nim, it looks like it compiles all deps every time to figure it out.. is there anything planned for incremental / partial compiles? I tried symbolFiles but couldn't get it to work (issue 1031)
12:41:03arnetheduckalso, dce is akin to running whole-program lto in the c/c++ world?
12:44:01*dyu joined #nim
12:45:05Araqarnetheduck: well --symbolfiles worked quite well before we broke them. so as a proof of the concept, yes it works. but we'll fix it after 1.0 is out.
12:49:00Araqand yeah dce==lto
12:50:05*emilsp-home joined #nim
12:50:42emilsp-homehello, this might not be a completely related question, but how does one do efficient string searching ?
12:50:51emilsp-homeif it were ascii, I'd just have a tree
12:52:33Araqdepends on lots of aspects
12:53:00Araqbut you can usually treat utf-8 strings like ascii strings for searching
12:53:40Araqperhaps you need some normalization step before the search
12:53:52emilsp-homeso I can just cast a single character to int and compare it as such to build a balanced tree ?
12:54:09Araqyou don't need to cast anything
12:54:20Araqyou can do someChar < otherChar
12:54:45emilsp-homethat's convenient. Thanks.
12:54:46Araqbut usually hash tables completely outperform trees
12:55:10Araqyou can try if Nim's crit bit trees beat hash tables
12:55:16Araqbut iirc usually they don't
12:55:42Araqand a critbit tree is MUCH better than a balanced tree for strings
12:55:56emilsp-homeI need it to be promiscuous, or can I actually make a substring's hash match a real string ?
12:57:11Araqhum?
12:57:31Araqusually our hashing function is fine
12:58:29emilsp-homewell, what I mean by that is can I find all strings which are a 'superstring' of a substring by using a hashmap ?
12:58:33emilsp-homeif so, how does that work ?
12:59:40*Zigara joined #nim
13:05:07Araqah well it doesn't :P
13:07:52emilsp-homethus, a crit bit tree would be the best choice. Thanks for the assistance :)
13:18:33*akiradeveloper quit ()
13:23:58ekarlsoOderWat: you around ?
13:42:54OderWat@ekarlso now.. hey
13:47:53BlaXpirit.eval echo uint64.high
13:47:56MimbusBlaXpirit: eval.nim(3, 11) Error: invalid argument for 'high'
13:47:57BlaXpiritwhy
13:48:38Araqbecause uint64 is not an ordinal type
13:48:47BlaXpiritwhat can be done about this?
13:49:21*davidhq joined #nim
13:49:21Araqgo through the whole compiler and ensure that it handles uint64 <-> int64 computations everywhere properly
13:51:44BlaXpirita kludge it is then
13:52:15Araqas a bonus you'll learn to appreciate what a mess it is to support C's type zoo.
13:52:38Araqand you'll learn to hate unsigned as much as I do.
13:52:58BlaXpiritor i just write when T is uint64:
13:53:21arnetheduckhm, let's say I'm working on a module (without a main).. what's an easy way to compile just that module to see that it's syntax is ok etc? ie without compiling the main?
13:54:27fowlarnetheduck, put your "main code" inside when isMainModule: block
13:54:57fowlmany modules have tests at the bottom of them
13:55:18fowlthat code only runs when you compile that module directly, or include it
13:55:32*JusticeFries joined #nim
13:56:21Araqarnetheduck: 'nim check module.nim'
13:59:31arnetheduckAraq, perfect, thanks! not part of nim --help
14:00:01*JStoker quit (Remote host closed the connection)
14:00:13arnetheduckfowl, I'm fooling around a little with the compiler, so I want to check my changes without recompiling the entire project
14:00:58fowlah
14:21:12*JStoker joined #nim
14:31:26*sepisoad joined #nim
14:32:37sepisoadis it possible to get latest nim compiler version using nimble package manager?
14:35:57BlaXpiritno, that's not what it does
14:36:19BlaXpiritthere might be a possibility, but i've never heard of this
14:40:36sepisoadBlaXpirit, i'm trying to install c2nim package via nimble, but unfortunately this package depends on nim (>= 0.10.3) where my nim compiler version is 0.10.2
14:40:48BlaXpiritok
14:41:49BlaXpiritsepisoad, http://google.com/#q=site%3Anim-lang.org+0.10.3
14:45:09*gokr joined #nim
14:45:38*filwit quit (Quit: Leaving)
15:03:21*johnsoft joined #nim
15:18:36*epichero joined #nim
15:20:13*johnsoft quit (Ping timeout: 264 seconds)
15:21:02*johnsoft joined #nim
15:23:11*epichero quit (Ping timeout: 246 seconds)
15:27:20*darkf quit (Quit: Leaving)
15:30:16sepisoadI got the latest nim compiler, but unfortunately when I try to install c2nim I get this error:
15:30:17sepisoad.nimble/pkgs/compiler-0.10.3/compiler/msgs.nim(727, 9) Error: undeclared identifier: 'stackTraceAvailable'
15:35:59OderWatI found that it is best to not have compiler installed with nimble at all
15:37:08OderWatand use the current compiler from source.. maybe with the "new" https://github.com/ekarlso/nim-vm which I just updated to handle that easily
15:39:10OderWatI just tried it. delete compiler from packages and remove it from the nimble file of c2nim .. nimble build .. works
15:39:51*epichero joined #nim
15:41:54*dyu quit (Disconnected by services)
15:42:19*dyu_ joined #nim
15:45:50sepisoadI dunno, will try it tomorrow, my mind is tired
15:47:43*JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…)
15:54:09OderWat@ekarlso :) quick merges! I just tested manual install from "nothing" to "100%" on osx and ubuntu. seems to work fine. I didn't check your bootscript though.
16:03:24*gokr quit (Ping timeout: 252 seconds)
16:24:53*arnetheduck quit (Ping timeout: 252 seconds)
16:45:21*davidhq_ joined #nim
16:47:49*davidhq quit (Ping timeout: 264 seconds)
16:55:54*Jehan_ joined #nim
17:00:05*novist quit (Quit: ZNC - http://znc.in)
17:03:22*Mimbus quit (Remote host closed the connection)
17:06:26*flaviu quit (Ping timeout: 246 seconds)
17:10:49*flaviu joined #nim
17:13:52*Jesin quit (Quit: Leaving)
17:15:59*wb joined #nim
17:18:19*Jesin joined #nim
17:23:11*Jesin quit (Client Quit)
17:24:50*Matthias247 joined #nim
17:26:06*Jesin joined #nim
17:58:54*quasinoxen joined #nim
18:00:30*^aurora^ joined #nim
18:08:18ekarlsoflaviu: u tharr ?
18:08:26flaviuyep
18:08:32ekarlsohttp://185.56.186.94/#/
18:08:38ekarlsoversions doesnt work but cc does
18:08:44ekarlsoand the switches
18:10:08flaviuhttp://i.imgur.com/DsEFgQz.png
18:11:21flaviuWork for me on gcc
18:11:35flaviuLooks good though!
18:19:31*ldlework joined #nim
18:21:31*perturbation joined #nim
18:24:11perturbationhey all
18:25:52perturbationI was looking through the wrapper for Urhonimo (trying to use to figure out better wrapping methods for C++)
18:26:12perturbationand there's some magic that it does with importcpp for wrapping a template that I'm trying to figure out
18:26:26perturbationanyone know what this (https://gist.github.com/singularperturbation/98af505d5623712b29fe) does?
18:26:40onionhammerekarlso hows it coming
18:26:47onionhammerits looking good :)
18:27:13onionhammerekarlso you should set up CTRL+enter to run w/o unfocusing editor
18:29:14ekarlsoonionhammer: patches are welcome :p
18:31:10*bcinman joined #nim
18:31:13fowlperturbation, i will find the docs for it, basically '*0 is a pattern splat the generics
18:31:18*no_name_ joined #nim
18:32:55no_name_any folks with jester experience around? I'm having trouble with c compilation errors whenever I call a function with a variable parameter in a resp
18:33:25perturbationfowl: gotcha, thanks (I thought so after reading through http://forum.nim-lang.org/t/870#5740)
18:36:38fowlperturbation, i can't find docs for it, basically @ expands to all arguments, so a static function looks like importcpp:"Foo::X(@)", you can use # for individual arguments "#->foo(#@)" will expand the first param on the left of -> and the rest in the parens (it might be @#)
18:36:49*no_name_ is now known as devzerp
18:37:12perturbationthanks fowl
18:37:58fowl'0 is type param 0, '*0 is 0 .. all type params iirc
18:38:38*xificurC joined #nim
18:39:29*novist joined #nim
18:40:26devzerpoh weird.. the jest problem is caused by running the main webserver look from inside of a proc - why would that be a problem?
18:40:55devzerper.. the jester compilation problem is caused by running the main webserver loop from inside of a proc - why would that be a problem?
18:41:38fowldevzerp, can you paste the errors in a gist
18:41:50fowland compile with -d:debug
18:42:00fowlpaste all output from compilation
18:43:46devzerpfowl: https://gist.github.com/anonymous/15eb423c256704d556db
18:44:12*UberLambda joined #nim
18:44:37UberLambdaIs there any way to specify an absolute path for the nimcache folder?
18:44:53UberLambdaThe --nimcache option seems to always treat a path as relative to the source file
18:46:09devzerpfowl: here's the compiler output: https://gist.github.com/anonymous/8b5bec6e3054b03464cb
18:49:20devzerpif I remove the web() proc, it compiles and runs as expected, also if I change the variable to a const (as opposed to a var or let) it also compiles even inside the function
18:53:00fowldevzerp, probably because you're capturing a string thats local to a function in one thread
18:53:46devzerpI didn't realize that there are multiple threads in play with this code
18:54:49fowlasyncdispatch uses futures but thats all hidden from jester
18:55:29devzerpif you pass it in as an argument to web(), it also fails -- how are you supposed to interact with external procs?
18:56:11devzerpall state has to be an annotated global variable?
18:56:44fowlrunForever runs forever, it should probably be in the top level of the module?
18:57:28fowlhttps://gist.github.com/fowlmouth/5f297fed52ae5fadada5
18:57:39devzerpfowl: I wanted to run two parallel threads (one was a webserver, the other a scheduled task background task handler) and wanted to spawn each off as a function
18:58:56devzerpis that a bad idea?
19:00:26fowlhmm i dont see the purpose
19:01:21devzerpmaybe I just don't understand threading and futures in nim yet - do you have any documentation pointers that might help me?
19:01:27fowli bet you could wrap the second thing into a future though to accomplish it
19:02:38devzerpyeah, that sounds like I might want to do that
19:03:11*johnsoft quit (Read error: Connection reset by peer)
19:03:32fowlstick around for someone who actually knows though
19:03:57*johnsoft joined #nim
19:05:18*johnsoft quit (Read error: Connection reset by peer)
19:05:52*johnsoft joined #nim
19:07:35fowldocumentation on asyncdispatch is sparse
19:07:38ekarlsoOderWat: I think ill revert your change about "nimvm install / update" executes use as well
19:07:41fowlhttp://nim-lang.org/asyncdispatch.html
19:08:03*^aurora^ quit (Quit: Leaving.)
19:18:25*milosn quit (Read error: Connection reset by peer)
19:23:25*perturbation quit (Quit: Leaving)
19:24:49*milosn joined #nim
19:28:01dom96devzerp: 'routes' should be at the top level.
19:28:10dom96You shouldn't be putting them inside a function.
19:38:02*sepisoad quit (Quit: Leaving)
19:39:40*jsudlow__ is now known as jsudlow
19:41:57*quasinoxen quit (Ping timeout: 245 seconds)
19:42:34*quasinoxen joined #nim
19:49:43*for1096 joined #nim
19:50:20*for1096 left #nim ("Leaving")
19:55:36OderWat@ekarlso well I was not sure about them anyway. What about adding an "activate" or "use" as additional parameter for convenience?
19:56:17ekarlsoOderWat: yeah
19:56:57OderWat@ekarlso I think activate is better than use what do you think?
19:57:12ekarlsoOderWat: :p
19:57:36OderWat@ekarlso :-P
20:00:21onionhammerekarslo I'll make pull requests if I can get it running locally :p
20:01:00onionhammerdom96 it shouldnt generate C errors imo
20:01:19ekarlsoonionhammer: play ?
20:01:20dom96onionhammer: if it's generating C errors then it's a bug
20:01:32onionhammerekarlso yeah
20:01:37dom96likely already been reported though
20:01:41*fizzbooze joined #nim
20:02:02Araqyup
20:03:21*smodo joined #nim
20:04:18onionhammerekarlso instructions for getting it running w/ vagrant :)
20:05:56*UberLambda quit (Quit: Leaving the Matrix)
20:10:07ekarlsowhat you guys think
20:10:14ekarlso1 chroot pr version
20:10:18ekarlsoor 1 chroot for all ?
20:18:25ekarlsono meanings about that ? :p
20:21:48OderWatchroot-beer for all! (I made PRs for the nim-vm changes)
20:22:27ekarlsoOderWat: meh :p
20:22:31ekarlsoI fixed it I think already :p
20:22:35*saml_ joined #nim
20:23:14*flaviu quit (Read error: Connection reset by peer)
20:23:53OderWatnp. it's better than mine I guess. but take the other PR it fixes 0.9 builds
20:25:34ekarlsodone :p
20:26:32*epichero quit (Remote host closed the connection)
20:26:55BlaXpiritguys, what do you think about adding likely,unlikely pragmas for `if` conditions? http://stackoverflow.com/questions/109710
20:27:46AraqBlaXpirit: system.likely exists
20:27:59Araqa bit weird it's not a pragma
20:28:10Araqbut understandable when you look at the implementation
20:28:30BlaXpiritsure is weird because I only looked in manual and didn't find
20:28:56Araqwill you ever use the index?
20:29:16BlaXpiritwhy would I look for a pragma in the index?
20:30:44*JusticeFries joined #nim
20:30:48Araqnimc.html also lists a couple of pragmas
20:31:11*flaviu joined #nim
20:32:06*matkuki joined #nim
20:32:54*quasinoxen quit (Ping timeout: 252 seconds)
20:33:16*quasinoxen joined #nim
20:34:25*TEttinger joined #nim
20:34:38*a5i joined #nim
20:37:49matkukiHi guys, a question. Just noticed that in an 'if' statement with an empty block you put a double comment and nothing else, the compiler accepts it.
20:37:51matkukiNo need for a discard statement. Is this the correct behaviour?
20:42:47AraqI think so as documentation comments are part of the AST/grammar
20:43:07Araqthis used to be valid for any comment
20:43:28Araqbut now comments are ignored "properly"
20:43:35Araqand doc comments are not
20:44:20matkukiAraq: Thanks.
20:47:09emilsp-homehey, regarding the unicode module, how do I construct a rune and how would I transform a regular string to a sequence of runes ?
20:47:10*Mat4 joined #nim
20:47:13Mat4hello
20:47:38emilsp-homehello, Mat4
20:47:53Mat4hi emilsp-hole
20:47:59Mat4sorry home
20:48:36BlaXpiritD: Mat4, you gotta try to type em<Tab>
20:48:36Araqemilsp-home: don't do that. even UTF-32 is a variable length encoding, so you don't gain anything
20:48:39OderWat@ekarlso well your activate thing does not work at all for me? did you test it actually?
20:49:19BlaXpiritAraq, this is misleading
20:50:14Mat4BlaXpirit: thanks
20:50:14AraqBlaXpirit: no, it's not.
20:50:21Araqit's the truth
20:50:21Jehan_Assuming `str` is UTF-8, toSeq(str.runes) should do it. `toSeq` is in strutils.
20:50:41Araqunicode is *hard* ;-)
20:50:45Jehan_Whether you really want to do it is a different story. :)
20:50:58OderWatunicode != UTF-whatever though
20:51:14Mat4oh, unicode related discussions, great
20:51:22OderWatnooooooo
20:51:26VarriountMat4: Duck and cover!
20:52:39ekarlsowhat error OderWat ? :/
20:53:11OderWat@ekarlso see the issue but just looking at the code shows that this can not work :)
20:54:06OderWat@ekarlso it also does not do anything good with the getopts for me anyway as I just tested :(
20:54:38Mat4Varriound: Sorry, what does this mean ?
20:57:33*epichero joined #nim
21:01:41BlaXpiritD: Mat4, you gotta try to type va<Tab>
21:02:32Mat4well, keyboard and coffee is a bad combination
21:02:32flaviu"UTF-32 is a variable length encoding"
21:02:32flaviuSource please?
21:04:46BlaXpiritflaviu, just FUD about combining characters
21:04:53def-flaviu: maybe he means that multiple combining marks can belong to a character
21:05:01flaviuAh, I see.
21:06:00Jehan_Huh, I'm seeing that only now. My mind had somehow read that as UTF-16.
21:08:24OderWat@ekarlso your new fix won't work either (for me?) I made one which works here
21:10:44OderWat@ekarlso what shell do you use ? if [ something = 1]; then .. will always execute something as cmd for me.
21:12:47OderWat@ekarlso it also strips all parameters till "--" such that if you give nim-vm -a arg1 arg2 it will always strip all the arguments and shows usage cause $1 is gone
21:13:10OderWatahem.. how to start a private conversation. irc help please :)
21:13:43OderWatfound it :)
21:16:08*Mat4 quit (Quit: Verlassend)
21:16:28*dyu_ quit (Quit: Leaving)
21:16:59fowlekarlso, can you share yet? i dont see it
21:19:38*JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…)
21:21:12*JusticeFries joined #nim
21:21:16*JusticeFries quit (Client Quit)
21:23:18*JusticeFries joined #nim
21:23:23*JusticeFries quit (Client Quit)
21:24:14BlaXpiritwhere is ldexp?
21:25:35*akiradeveloper joined #nim
21:26:49BlaXpirit{.importc: "ldexp", header: "<math.h>".} i suppose
21:27:42def-BlaXpirit: and when defined(Posix) and not defined(haiku): {.passl: "-lm".}
21:28:05BlaXpiritdef-, doesn't "import math" guarantee that?
21:28:10def-sure, it does
21:28:23BlaXpiriti'd rather do that the
21:28:24BlaXpiritn
21:31:00AraqBlaXpirit: well yes, I'm talking about combining characters
21:32:23Varriountonionhammer: How well does the suggestion part of NimLime work so far?
21:32:34Araqcause you need to take these into account for most things I can think of
21:32:52emilsp-homeI am guessing nim doesn't have any libraries for reading from id3/vorbis tags ?
21:33:00fowldef-, are math things in a different lib in haiku
21:33:31fowlemilsp-home, you can use any c library
21:33:38*xificurC quit (Ping timeout: 244 seconds)
21:33:48def-fowl: i guess you just don't need -lm
21:33:55Araqand when you do, it's of variable length. no FUD here.
21:34:05flaviuAm I at least guaranteed that concatenating valid unicode strings will produce a valid unicode string?
21:35:43fowlemilsp-home, btw you asked before what i used the neural networks for, i havent used them yet but i want to point them at stock market data or something see if i can get rich
21:36:19def-flaviu: i would assume so
21:37:04*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
21:37:41Araqflaviu: yeah, quite sure but this hold for utf-32, utf-16, utf-8. utf-32 has no advantage for concat
21:39:27BlaXpirithas no advantage for valid strings, yes
21:41:56*Shoozza quit (Ping timeout: 265 seconds)
21:42:16*Shoozza joined #nim
21:42:56*quasinoxen quit (Ping timeout: 252 seconds)
21:43:00*quasinoxen joined #nim
21:48:07fowlonionhammer, i want to add inheritance to clibpp, how should it look? class(X, parent: Y)? X of Y could be handled
21:49:03BlaXpiritwhat will happen to multiple inheritance?
21:49:12BlaXpiritfowl, do you think SFML can be wrapped directly now?
21:49:30fowli think so BlaXpirit
21:49:33BlaXpirit:s
21:49:40fowli have a workaround for multiple inheritance
21:49:58fowltype Drawable = CircleShape | RectangleShape #| ...
21:49:58fowlproc setFillColor* (this:Drawable; color:Color) {.importcpp,header:graphics_h.}
21:50:50BlaXpiritdon't forget inheriting from drawable
21:51:16BlaXpiritto me it really seems like this should be a typeclass
21:51:27fowlthat is a typeclass
21:51:38BlaXpirityou can't make your own drawable
21:51:50BlaXpiriti mean typeclass like = generic stuff
21:52:58fowlill have to look at the hierarchy to see how it even works
21:53:48BlaXpiritdrawable is a class that has virtual function draw
21:54:01BlaXpiritso it's like an interface
21:54:04BlaXpiritso it's like a typeclass
21:54:12Araqbzzzt. wrong.
21:55:02fowlin c would (Drawable)(x).draw(...) invoke the virtual function then?
21:55:33BlaXpiritI don't understand
21:55:48*n0x0ff joined #nim
21:55:52BlaXpiritare you talking about CSFML?
21:55:57fowlno
22:00:21*akiradeveloper quit ()
22:02:15*Trustable joined #nim
22:05:09*milosn quit (Ping timeout: 244 seconds)
22:05:43*madmalik joined #nim
22:06:51*milosn joined #nim
22:07:58onionhammerfowl ill have to think for a bit...
22:09:36onionhammerVarriount it needs more testing.. sometimes it works sometimes it doesnt
22:12:39*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805])
22:13:47onionhammerfowl probably "of"
22:13:50onionhammerinstead of "parent"
22:14:04onionhammerclass(X, of: Y)
22:14:22fowlthats not possible since of is a keyword
22:14:28onionhammeru sure?
22:15:04Araqflaviu's class macro solved that
22:15:19fowlonionhammer, i was recommending "X of Y"
22:15:56onionhammermm?
22:17:07fowlclass(X of Y)
22:17:27onionhammerah, if that works thats better
22:21:06fowlAraq, what was his solution
22:21:43Araqclass Animal of RootObj:
22:21:44Araq var name: string
22:21:46Araq method vocalize: string = "..."
22:22:24fowlAraq, thats what this is except its for c++
22:22:59fowlplus i wrote that oop macro lol
22:23:53Araqsorry I'm not really paying attention. I'm fixing bugs
22:24:13fowlgood dont pay attention
22:24:40fowlbbl
22:38:05*vendethiel quit (Ping timeout: 256 seconds)
22:48:30*banister joined #nim
23:03:11*Trustable quit (Remote host closed the connection)
23:05:35*davidhq_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:14:37*gokr joined #nim
23:18:56*reem joined #nim
23:21:09*Demon_Fox joined #nim
23:22:52*Jehan_ quit (Ping timeout: 240 seconds)
23:25:19*emilsp-home quit (Ping timeout: 264 seconds)
23:27:41*davidhq joined #nim
23:41:21*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:50:01*JusticeFries joined #nim
23:50:46*vendethiel joined #nim
23:54:43*OderWat quit (Ping timeout: 255 seconds)