<< 23-06-2015 >>

00:02:13reactormonkAraq, got an idea about how to move main() in the C code?
00:02:28reactormonkavr apparently cares
00:02:51reactormonkUint2048, global var? eh.
00:02:53*vikaton joined #nim
00:03:06reactormonkUint2048, and yup, guess why. It's not a var.
00:03:11Araqyou mean it has to be the first function?
00:03:18reactormonkyup
00:03:27Araqin what sense?
00:03:37reactormonkyee log
00:03:50Araqthe first function of the .c file. the first function in the universe?
00:04:07reactormonkif main() is moved to top of blink.c nimcache file, it can upload and run successfully
00:04:15reactormonkUint2048, to solve it, return a var <type>
00:04:42Araqthat's some bizarre C dialect
00:06:12reactormonkyes, it is
00:07:13Araqthere is no support in the C codegen for "move this thing at the top of the C file"
00:07:50reactormonkany way to hack it?
00:08:15Araqsure but requires yet another pragma
00:10:20Araqjust use "sed" to modify the C code. oh wait ... regexes cannot count braces so I suppose it's tricky
00:10:44reactormonkfuck
00:19:45*renesac quit (Ping timeout: 252 seconds)
00:20:45*vendethiel quit (Ping timeout: 250 seconds)
00:23:04*renesac joined #nim
00:23:58*BitPuffin quit (Ping timeout: 265 seconds)
00:32:43*gsingh93_ quit (Quit: Connection closed for inactivity)
00:32:48*tennix joined #nim
00:38:14*tennix quit (Ping timeout: 256 seconds)
00:44:03reactormonkerr, wut. nim c still not producing output binary
00:45:24*vendethiel joined #nim
00:46:42DemosI tracked down that twitter bug, I think she was using {.header: "<glfw3.dll>".}
00:46:46Demoserm .h
00:47:11Demosbecause if I import initGlfw via dynlib it mangles the name of the function
00:47:47Demoschanging the generated name of the init function would help, but there's no way we can be collision-free in all cases with header files
00:48:00Demosesp since it's good to try not to mangle too much for debugging reasons
00:48:25fowlPeople report issues via twitter now?
00:48:49Xepeople do everything via twitter
00:48:52Xeincluding tweeting
00:49:59*pregressive joined #nim
00:50:23Demossomeone I follow happened to be complaning about nim on her feed
00:52:34federico3how can I do a blocking readLine() over a device file?
00:52:58reactormonkfederico3, err, you just do it?
00:53:42federico3reactormonk: readLine is frequently returning an empty string
00:54:41reactormonkfederico3, maybe a select is what you're looking for?
00:57:00federico3reactormonk: hm, this one? http://nim-lang.org/docs/osproc.html#select,seq[Process],int
00:57:15federico3I don't think so
00:57:34reactormonkfederico3, that's for child processes, I was thinking of posix select
00:58:04*Uint2048 quit (Quit: Page closed)
00:58:16federico3(shouldn't readLine block until \n is found?)
00:59:05reactormonkcheck the source
00:59:18reactormonkAraq, any way I can add -I stuff via pragma?
01:00:11federico3oh, there's a serial interface in http://nimio.us/
01:00:35Araqreactormonk: yes, .passL or .passC
01:00:44reactormonkah, sweet
01:01:43*Jesin quit (Quit: Leaving)
01:02:02*jaco60 quit (Ping timeout: 256 seconds)
01:03:39*yglukhov____ joined #nim
01:05:00*Jesin joined #nim
01:06:35*vendethiel quit (Ping timeout: 246 seconds)
01:08:22reactormonkwu-lee, sooo you want your own main or is setup/loop fine?
01:09:02*yglukhov____ quit (Ping timeout: 252 seconds)
01:10:45reactormonkAraq, err, any way to add some C files to be compiled?
01:11:01Xe.compile prefix?
01:11:24Xepragma*
01:11:33Araq{.compile: "foobar.c".}
01:12:46reactormonkAraq, not in here: http://nim-lang.org/docs/manual.html
01:13:14Araqhttp://nim-lang.org/docs/nimc.html#additional-features-compile-pragma
01:13:19Araqas I said
01:13:33Araqimplementation specific pragmas are in nimc, not in the manual
01:13:48Araqbut I guess at this point nobody cares about this distinction
01:14:35Araqalso who did that CSS for the docs again? it's still superb
01:15:18VarriountAraq: The thing is, people expect the compiler user guide to tell how the compiler is supposed to be invoked, not explain new pragmas.
01:15:48VarriountEven a link in the pragmas section of the manual would clear things up.
01:15:57*vendethiel joined #nim
01:20:52AraqVarriount: theindex works in any case
01:21:10Araqbut yeah we can move these over to the manual anyway
01:21:18reactormonkAraq, uhm, I invoke nim, no errors, but not output file is produced
01:21:41Araq--genscript implies --compileOnly? dunno
01:22:13reactormonkAraq, http://pastie.org/10254039
01:22:48Araqtry -f
01:23:09Araqbut I dunno, seems like gcc produces the output somewhere else?
01:23:39reactormonknope, no help
01:24:34reactormonkI have no idea where.
01:25:27Araq--listCmd -f
01:25:58reactormonk... nothing
01:26:13reactormonkah there, found it.
01:26:18reactormonkcheck the command line again ^^
01:26:48Araq'c' in the wrong position?
01:27:10reactormonknope, forgot a passC in front of the mmcu
01:27:17Araqtrue
01:27:26Araqer
01:27:34reactormonkbut why doesn't the compiler compilain?
01:27:34Araqshouldn't Nim complain about this command line?
01:28:58reactormonkyes, it should
01:33:08reactormonkAraq, importc on vars -> no decl, exportc -> decl?
01:33:28Araqnot really
01:33:48Araqbut good enough
01:33:49Araqgood night
01:33:54reactormonk^^ ok
01:36:20*dddddd quit (Ping timeout: 272 seconds)
01:38:52*vendethiel quit (Ping timeout: 256 seconds)
01:40:30*vendethiel joined #nim
01:41:16reactormonkwu-lee, got to another problem
01:42:35*gyeates quit (Ping timeout: 252 seconds)
01:49:41*brson quit (Remote host closed the connection)
02:02:34*vendethiel quit (Ping timeout: 252 seconds)
02:04:52*saml_ quit (Ping timeout: 264 seconds)
02:09:07reactormonkwu-lee, code size too big.
02:15:48*vendethiel joined #nim
02:23:19*tennix joined #nim
02:26:49*Kingsquee joined #nim
02:27:07*BitPuffin|osx quit (Ping timeout: 276 seconds)
02:27:52*tennix quit (Ping timeout: 252 seconds)
02:31:33reactormonkwu-lee, https://gist.github.com/5400966dfcca17660fdb nim -d:release --cpu:avr --os:standalone --deadCodeElim:on --gc:none --parallelBuild:1 --passC:-mmcu=atmega328p c blink.nim
02:31:39reactormonkchange as needed for your board
02:32:40dtscodewho is this wu-lee person?
02:35:21*pregressive quit (Remote host closed the connection)
02:36:22reactormonkdtscode, see chatlog
02:36:41dtscodeah
02:36:50dtscodeI thought I was missing half the convo
02:38:31*vendethiel quit (Ping timeout: 256 seconds)
02:38:34reactormonkwu-lee, apparently it's horribly inefficient because .text overflow here
02:57:02*dtscode is now known as charmande
02:57:05*charmande is now known as charmander
03:00:19Demoswhat do we think about using __nim__moduleInit instead of moduleInit or moduleInit0000
03:03:50*FedeOmoto joined #nim
03:13:44*FedeOmoto is now known as FedeOmoto_
03:14:20*FedeOmoto_ is now known as FedeOmoto__
03:14:30*FedeOmoto__ is now known as FedeOmoto
03:20:38*FedeOmoto quit (Quit: Leaving)
03:20:51*darkf joined #nim
03:22:29*FedeOmoto joined #nim
03:23:19*FedeOmoto quit (Client Quit)
03:25:05*charmander is now known as dtscode
03:30:07*gunn_ joined #nim
03:53:43*ozra quit (Ping timeout: 246 seconds)
03:58:55*rgv151 quit (Remote host closed the connection)
04:02:31*profan joined #nim
04:06:02*Demos quit (Read error: Connection reset by peer)
04:12:03*tennix joined #nim
04:16:24*tennix quit (Ping timeout: 252 seconds)
04:27:41*tennix joined #nim
04:34:49*gyeates joined #nim
04:39:25*gyeates quit (Ping timeout: 244 seconds)
04:48:07*tennix quit (Remote host closed the connection)
04:49:15*tennix joined #nim
04:54:47*Varriount_ joined #nim
04:55:37*Jesin quit (Quit: Leaving)
04:55:39*katis_ quit (Quit: WeeChat 0.3.7)
04:56:28*brson joined #nim
04:58:34*Varriount quit (Ping timeout: 276 seconds)
04:59:36*brson quit (Client Quit)
05:08:19*tennix quit (Read error: Connection reset by peer)
05:14:16vikatonooo
05:14:18vikatonarduino
05:14:50*zulmin_ is now known as zulmin
05:17:32*tennix joined #nim
05:17:32*tennix quit (Changing host)
05:17:32*tennix joined #nim
05:43:52*jszymanski joined #nim
05:45:43*gunn_ quit (Max SendQ exceeded)
05:56:10*wuehlmaus quit (Quit: Lost terminal)
06:16:04*jubalh joined #nim
06:16:42*jubalh quit (Client Quit)
06:17:49*jubalh joined #nim
06:19:16*jszymanski quit (Quit: computer sleeps...)
06:20:27*jubalh quit (Client Quit)
06:36:33*jubalh joined #nim
06:38:45*yglukhov____ joined #nim
06:42:37vikatonwhat gcc version does Nim use
06:43:42reactormonkvikaton, system one
06:49:01*dalarmmst quit (Ping timeout: 250 seconds)
06:49:44*Senketsu joined #nim
07:03:56*mnemonikk quit (Ping timeout: 276 seconds)
07:05:30*lyro joined #nim
07:06:17*mnemonikk joined #nim
07:06:25*mnemonikk quit (Changing host)
07:06:25*mnemonikk joined #nim
07:10:32*dalarmmst joined #nim
07:12:14*bjz joined #nim
07:13:53*bjz quit (Client Quit)
07:15:03*dalarmmst quit (Ping timeout: 256 seconds)
07:27:19*jszymanski joined #nim
07:39:05*tennix quit (Remote host closed the connection)
07:39:38*tennix joined #nim
07:41:23*rinukkusu quit (Ping timeout: 246 seconds)
07:44:31*Trustable joined #nim
07:49:20*tennix quit (Remote host closed the connection)
07:50:30*tennix joined #nim
07:51:43*huonw quit (Ping timeout: 248 seconds)
07:53:27*bjz joined #nim
07:54:46*huonw joined #nim
08:04:32*rinukkusu joined #nim
08:08:01*zviryatk0 joined #nim
08:08:03*wuehlmaus joined #nim
08:09:46*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:16:08*coffepot joined #nim
08:16:09*coffepot quit (Client Quit)
08:16:49*coffeepot joined #nim
08:25:50*mnemonikk quit (Ping timeout: 276 seconds)
08:26:07*dalarmmst joined #nim
08:26:42*mnemonikk joined #nim
08:27:38*mnemonikk quit (Changing host)
08:27:38*mnemonikk joined #nim
08:30:28*zodiak joined #nim
08:32:15*dalarmmst quit (Ping timeout: 248 seconds)
08:41:17*MyMind joined #nim
08:43:16*Sembei quit (Ping timeout: 264 seconds)
08:45:29*tennix quit (Remote host closed the connection)
08:46:01*mnemonikk quit (Ping timeout: 276 seconds)
08:46:37*mnemonikk joined #nim
08:46:37*mnemonikk quit (Changing host)
08:46:37*mnemonikk joined #nim
08:49:34*tennix joined #nim
08:59:41*tennix quit (Remote host closed the connection)
09:01:09*tennix joined #nim
09:11:06*tennix quit (Remote host closed the connection)
09:14:39*tennix joined #nim
09:26:53*tennix quit (Remote host closed the connection)
09:28:28*tennix joined #nim
09:38:37*lokulin_ quit (Changing host)
09:38:37*lokulin_ joined #nim
09:39:49*lokulin_ is now known as lokulin
09:50:31*Johnjohn joined #nim
09:50:32*Johnjohn quit (Client Quit)
09:50:53*JohnYy joined #nim
09:58:11*vikaton quit (Quit: Connection closed for inactivity)
10:15:14*ekarlso joined #nim
10:18:37*Ven joined #nim
10:23:11r-kuhow do i define struct so it does not have "TNimObject Sup;"? need to parse binary file here
10:23:25Araqdon't use inheritance
10:23:49r-kuthat will need ugly workaround. oh well. thanks
10:24:25Araqyou can also use .inheritable, pure iirc
10:25:10Araqit's surprising how often that is required for wrappers, or maybe not
10:25:30r-kuthat looks like what i need. thank you
10:26:32r-kuone more question Araq. {.packed.} does not take an argument. is there really no way to specify custom alignment?
10:27:04*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:27:24Araqnah, but you can .importc, header the whole struct and then it's compatible since the compiler doesn't generate its own version of the struct
10:27:37Araqthis way even bit fields work
10:28:31r-kuyeah i thought of that, but was hoping to write everything in nim too. anyway not that i need it. but there are some applications that could surely use this option.
10:28:46Araqthat said, the C code really shouldn't use customized alignment. C's advantage is supposedly an "ABI" compatibility
10:32:15Araqr-ku: yeah even more control would be nice, but people also count the number of pragmas and yell "too complex".
10:32:45Araqapparently they never count C's pragmas or C#'s annotations
10:33:52r-kuwell... in this specific case there already is pragma for packing. so if it could take param and put it into generated c code it would be like minimal added complexity.
10:34:50Araqyeah I agree
10:34:50r-kuwhile i too think there are lots of pragmas its also a nice unified syntax to customize behavior. i rather have 50 pragmas instead of 50 different rarely used syntaxes to learn
10:36:27*Ven joined #nim
10:39:19*Kingsquee quit (Quit: Konversation terminated!)
11:03:25*Ven quit (Remote host closed the connection)
11:08:15*Ven joined #nim
11:16:03*mnemonikk quit (Ping timeout: 276 seconds)
11:16:06*tennix_ joined #nim
11:16:11*tennix quit (Remote host closed the connection)
11:19:31*mnemonikk joined #nim
11:19:31*mnemonikk quit (Changing host)
11:19:31*mnemonikk joined #nim
11:30:52*tennix_ quit (Remote host closed the connection)
11:39:37*tennix joined #nim
11:39:44*tennix quit (Remote host closed the connection)
11:42:24*dddddd joined #nim
11:46:36*mnemonikk quit (Ping timeout: 276 seconds)
11:50:48*mnemonikk joined #nim
11:50:48*mnemonikk quit (Changing host)
11:50:48*mnemonikk joined #nim
12:09:12*aziz_ joined #nim
12:10:08*aziz_ is now known as aziz
12:17:30*zviryatk0 quit (Ping timeout: 256 seconds)
12:40:28*tennix joined #nim
12:42:40*jaco60 joined #nim
12:45:46*tennix quit (Ping timeout: 272 seconds)
13:03:08*FedeOmoto joined #nim
13:08:59*yglukhov____ quit (Ping timeout: 252 seconds)
13:09:37*yglukhov____ joined #nim
13:18:40*gyeates joined #nim
13:19:11*askatasuna joined #nim
13:22:35*zviryatk0 joined #nim
13:32:13*aziz quit (Remote host closed the connection)
13:37:45*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
13:38:39*coffeepot joined #nim
13:39:56*coffeepot quit (Client Quit)
13:43:00*bjz joined #nim
13:43:19*coffeepot joined #nim
14:11:13*tennix joined #nim
14:15:29*tennix quit (Ping timeout: 246 seconds)
14:37:55*pregressive joined #nim
14:39:02*vendethiel joined #nim
14:49:19*tennix joined #nim
14:49:38*gyeates quit (Ping timeout: 252 seconds)
14:53:35*tennix quit (Ping timeout: 248 seconds)
15:04:12*Arrrr joined #nim
15:07:46wuehlmaushi, all. One question that arrises here is if nre is broken in 0.11.2 but only works in the dev version right now. True?
15:14:16*gyeates joined #nim
15:14:52*drewsrem joined #nim
15:15:43drewsremCan I "resolve" a symbol in a macro? - As in: can I have a macro that takes a string argument and reads its content?
15:19:43*Ven_ joined #nim
15:21:51*gyeates quit (Ping timeout: 248 seconds)
15:22:29*Ven quit (Ping timeout: 265 seconds)
15:44:19*tennix joined #nim
15:45:21*yglukhov____ quit (Quit: Be back later ...)
15:48:35*tennix quit (Ping timeout: 246 seconds)
15:52:12*dalarmmst joined #nim
15:53:49*xcombelle joined #nim
15:55:47*darkf quit (Quit: Leaving)
15:56:06*gyeates joined #nim
16:03:14*tennix joined #nim
16:04:00*Ven_ quit (Ping timeout: 272 seconds)
16:07:53*tennix quit (Ping timeout: 264 seconds)
16:09:04*AxBen joined #nim
16:09:15AxBenWhere's windows.nim?
16:10:57coffeepotAxBen: on my Nim it's under C:\Nim\lib\windows
16:11:36AxBenI cloned from GitHub (fresh install) and it's no longer there....
16:11:44coffeepotoh, no idea then :/
16:12:12EastBytehttps://github.com/nim-lang/Nim/tree/devel/lib/windows
16:12:19EastBytelooks pretty empty there
16:13:14AxBenI cloned from git clone https://github.com/nim-lang/Nim.git
16:13:33AxBenA lot of stuff there, but no windows.nim
16:15:48*brson joined #nim
16:17:30drewsremIs it possible to escape the ending triple-quotes in a triple-quoted-string-literal?
16:18:27Arrrrlol
16:18:45ArrrrMaybe with \ ?
16:19:33Arrrr"$parentDir/nim.cfg where $parentDir stands for any parent directory of the project file's path" Do this actually work?
16:22:09*Ven joined #nim
16:30:10*Kelet joined #nim
16:30:37*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:40:15*gyeates quit (Ping timeout: 248 seconds)
16:50:49*FedeOmoto quit (Ping timeout: 255 seconds)
16:53:48*yglukhov joined #nim
16:58:04*gyeates joined #nim
17:02:23*pregressive quit (Remote host closed the connection)
17:02:37*pregressive joined #nim
17:03:08*pregressive quit (Remote host closed the connection)
17:04:31*FedeOmoto joined #nim
17:05:37AraqAxBen: it got removed because it's archaic. it'll be a nimble package soon, "oldwinapi"
17:06:43Araqdrewsrem: nope, you need to use string concatenation instead
17:06:51drewsremAraq, thanks
17:07:38Araqas for your other question, there is bindSym but it takes a compile-compile-time value
17:07:53Araqand doesn't allow for 'getImpl' (which is planned though)
17:10:24*brson quit (Quit: leaving)
17:11:14*yeye123 joined #nim
17:19:37drewsremthanks, will search for it
17:26:38*askatasuna quit (Quit: WeeChat 1.2)
17:27:07*askatasuna joined #nim
17:28:20*drewsrem quit (Quit: Leaving)
17:34:07*Kelet quit (Quit: Page closed)
17:40:45*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:46:23AxBen:@Araq: What would I do in the meantime? Not compile Nim no more? When is soon? Where would I get an archaiv version of Nim?
17:46:49Araqtake it from the master branch?
17:47:02*Ven joined #nim
17:47:11Araqtake from an official release?
17:48:00Araqwe have the releases to develop against, it's bad to depend on "nim devel"
17:48:28Araqif that doesn't work for you, tell us and we can reconsider this approach or perhaps release more frequently
17:49:52AxBenThat sure doesn't work for me, as some of my "libs" depend on the windows module. The current situation leaves me in the nowhere.
17:50:37Araqhrm can you elaborate?
17:54:24AxBenDo I really have to elaborate that? If you would mark all the functions a deprecated or so, wouldn't mind it. But cutting the whole module all at a sudden W/O A REPLACEMENT forces me to go back to the master branch with just a few releases per year, making it impossible to git pull new stuff.
17:55:09AxBenWhy not leave the stuff in? I sure doesn't break things...
17:55:22Araqwell I can finish "oldwinapi" *now*
17:55:41Araqmy question is if that's good enough or if that cannot work for some reason for you
17:56:17Araqand i need to restore it for "nim devel"
17:56:18AxBenThat would depend on the functionality of oldwinapi. Haven't seen any docs so far.
17:56:38Araqit's windows.nim with a cleaned up license text
17:56:56*zviryatk0 quit (Ping timeout: 256 seconds)
17:57:12AxBenI have no probs with that and would gladly change my sources, but I need sth that I can use...
17:57:52Araqok, good. give me a few minutes
17:58:00AxBenGREAT
17:59:19*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:00:31*brson joined #nim
18:10:37*tennix joined #nim
18:11:30*boopsiesisaway is now known as boopsies
18:13:52*yeye123 quit (Quit: Leaving)
18:15:15*drewsrem joined #nim
18:15:33AxBenGot to leave. Looking forward to "oldwinapi" (grin). Thanks for your efforts!
18:15:46AxBen:quit
18:15:55*AxBen quit (Quit: Page closed)
18:17:33drewsremAssuming I have an ref-object type, called foo, with a field called bar which is an int, is there a way to create a setter for bar that has access to foo? - i.e. foo.bar = 10 calls a "setter"-proc
18:19:22*tennix quit (Ping timeout: 276 seconds)
18:19:46Arrrri think it is possible with proc `.bar=`
18:26:45drewsremArrrr, `bar=` worked, thanks
18:28:47*Matthias247 joined #nim
18:30:05*brson quit (Remote host closed the connection)
18:32:04*Trustable quit (Ping timeout: 256 seconds)
18:32:53*Trustable joined #nim
18:36:51Araqwell too bad.
18:37:05Araqoldwinapi is a nimble package now.
18:37:14Araq(I mean too bad he left)
18:39:03ArrrrQuick Q: how do i tell to my exe "the path for this dll is in x folder" ?
18:40:00Araqnot too sure, you can edit %PATH% but usually just put it next to the .exe
18:42:04*fowl quit (Excess Flood)
18:42:58*fowl joined #nim
18:43:36ArrrrI wanted to load the dll from a different place, but saw i can change it from where the dynlib is declared
18:44:02*fowl quit (Excess Flood)
18:44:13*brson joined #nim
18:45:58*fowl joined #nim
18:48:18AraqArrrr: yeah you can do that
18:48:23*fowl quit (Excess Flood)
18:59:59*gyeates quit (Ping timeout: 248 seconds)
19:00:59*xcombelle quit (Remote host closed the connection)
19:04:49*jubalh quit (Quit: Leaving)
19:08:09*Jesin joined #nim
19:12:06*tennix joined #nim
19:17:10*tennix quit (Ping timeout: 272 seconds)
19:18:51*jubalh joined #nim
19:23:59*gyeates joined #nim
19:27:24*jszymanski quit (Quit: computer sleeps...)
19:27:44*jszymanski joined #nim
19:27:50*zviryatk0 joined #nim
19:37:28*fowl joined #nim
19:42:04Arrrrhttp://www.reddit.com/r/programming/comments/3arcgs/the_unix_philosophy_and_elixir_as_an_alternative/csfl06s
19:43:50pigmejArrrr: you know what's funny ? Elixir is NOT fast
19:45:41Araqwhat has this thing to do with unix?
19:46:22pigmejAraq: nothing ? Just like most of 'innovative' things on reddit
19:46:37Araqno I skimmed the real article
19:46:44Araqand found no reference to unix
19:47:14ArrrrComplain about it, the author is shitting on nim
19:47:28fowlWho cares
19:48:06AraqI don't think he shits on nim in particular.
19:48:07*zahary joined #nim
19:48:33Araqit's just a way of saying "look at me, I'm up to date"
19:48:47Araqexcept that he is not :P
19:49:02Araqcause he missed Crystal. XD
19:49:48Arrrrsigh (thinks about blaxpirit)
19:50:20pigmejArrrr: the author compliments JVM...
19:50:27*tennix joined #nim
19:51:19Arrrrw-what's wrong about that
19:51:48pigmejArrrr: nothing straight, but it's kindof opposite of nim, rust
19:52:40*miglo joined #nim
19:53:46miglois there something like an abstract method in nim?
19:54:24migloI would like to define an abstract type as it is known from Java/C++
19:54:45miglo...as abstract class
19:54:58Arrrryes "method doSomething() = quit "Surprise""
19:55:05*tennix quit (Ping timeout: 250 seconds)
19:55:09pigmejArrrr: rotfl:D
19:55:28pigmejbut anyway, I once hit something like this in some wonderfull library in python
19:55:46pigmejit had somewhere sys.exit('..') in some error catching things
19:56:23migloArrrr: but this isn't really an abstract method, isn't it?
19:56:43ArrrrNo, the compiler wont yell at you if you dont implement it
19:57:10ArrrrBut it's the closest thing you'll see
19:57:44ArrrrMaybe with pragmas and macros it is possible to get something like this
20:02:57Araqwell you can raise an exception instead
20:03:55fowlcant you put {.error.} Inside the base function
20:04:11fowlFor a compile time err
20:04:27Araqyeah but then it would always produce a compile-time error
20:04:39fowlOh
20:04:45Araqthe error pragma knows nothing about "I want people to override this"
20:05:29*zaquest quit (Ping timeout: 246 seconds)
20:14:13*fowl quit (Excess Flood)
20:15:58*fowl joined #nim
20:19:15*drewsrem quit (Quit: Leaving)
20:19:41*Arrrr quit (Quit: WeeChat 1.2)
20:24:07*wu-lee quit (Remote host closed the connection)
20:29:26reactormonkIsn't an abstract method something for a concept?
20:33:32*zviryatk0 quit (Quit: Konversation terminated!)
20:34:11*zaquest joined #nim
20:34:51*key_ joined #nim
20:37:42*wu-lee joined #nim
20:47:55*^aurora^ joined #nim
20:48:28*filcuc joined #nim
20:49:34*Matthias247 quit (Read error: Connection reset by peer)
20:49:56*tennix joined #nim
20:51:12*Phaal joined #nim
20:51:40*Matthias247 joined #nim
20:53:12PhaalHello! I looking for download/upload http library with speed limiting and resume capability. Something like curl. Is there something like that in pure nim, or should i better stick with curl?
20:54:09Araqwe used to have libcurl in the stdlib ... but *cough* it got deleted and will be a nimble package real soon ... but hey, you can still get it from the master branch
20:54:11reactormonkPhaal, pretty sure there's no rate limiting in there.
20:54:25*tennix quit (Ping timeout: 264 seconds)
20:54:35reactormonkAraq, pfft. Just deleting random stuff whenever you feel like it.
20:54:50Araqreactormonk: it was part of some RFC
20:55:09reactormonkAnd no one felt like adding it?
20:55:18*^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
20:55:31Araqadding what?
20:55:40*^aurora^ joined #nim
20:55:52reactormonklibcurl back into a git repo somwhere, e.g. nim-lang
20:55:57PhaalI have Nim 0.11.2 installed and curl header is still there... so ok, i will use curl.
20:56:17Araqreactormonk: I'm working on it ...
20:56:29PhaalThx for info :)
20:56:49reactormonkAraq, I assume it follows the old TFoo conventions?
20:57:25Araqno idea, I think it has got an update in the meantime
20:58:38Araqhrm I wonder where ozra is ... last words from him were something like "I'll be drunk like there is no tomorrow"
20:59:19Araqshould have taken him seriously :P
21:01:35*jszymanski quit (Quit: computer sleeps...)
21:01:56*yglukhov quit (Quit: Be back later ...)
21:14:54miglohas someone used / implemented the strategy pattern in nim or knows a good example that shows it in the sense of "that's how it's done in nim"?
21:19:25migloI have implemented it for exercise but I'm still thinking in terms of interfaces, objects, abstract objects/methods, polymorphism
21:20:30Araqusually you just pass a closure proc to the constructor, store it in the object and then invoke it
21:20:45Araqif you even need the object
21:21:06miglook, so same as in python
21:21:25Araqsimilar to Python yeah
21:21:45Araqthough Python has more support for the classical OO ways I guess
21:28:09*dtscode is now known as charmander
21:29:43*filcuc quit (Quit: Konversation terminated!)
21:33:55JohnYyDuring Nim installation on Windows, if you check the "Setup Path Environment" box and you don't have a Path environment variable, it's not created
21:33:58JohnYyso it's not added at all
21:34:18JohnYyis it a bug?
21:34:56JohnYy(I just tried to make my little sister install Nim heh)
21:38:31*jubalh quit (Quit: Leaving)
21:39:46PhaalIs there somewhere example of curl write callback (in Nim) ?... i dont know how to pass nim File type through pointer to this callback :(
21:40:17fowlJohnYy: never heard of not having PATH but I guess its possible
21:41:24fowlPhaal: Nims File is File* in c
21:42:50Phaalhmm... i rewriting this example to Nim: http://curl.haxx.se/libcurl/c/ftpget.html
21:43:31Phaali passed File to callback function, then i tried open it in callback, but i get error
21:43:32reactormonkPhaal, try c2nim :D
21:43:59Phaalok , i ll try :)
21:44:44*askatasuna quit (Ping timeout: 272 seconds)
21:45:50reactormonkPhaal, although probably a bad idea.
21:45:56reactormonkit will procude shitty nim code imo
21:48:59Phaalhmm... i tried: var outstream = cast[File] (outstream)
21:49:03Phaalbut sigsev
21:50:25Phaalthis is my code: http://pastebin.com/ib6qpCiS
21:53:18reactormonkpretty sure there's a better idea than casting.... but I donno
21:54:58Phaalthis is what c2nim suggested to me ..hehe
21:55:42*tennix joined #nim
21:55:58AraqJohnYy: environment vars are in the registry these days, not in autoexec.bat ...
21:58:22Araqinstall "rapid environment editor" and see for yourself. don't use windows absurdly complex ways to arrive at the bullshit UI for dealing with the environment vars
22:00:19*tennix quit (Ping timeout: 250 seconds)
22:01:50JohnYyI don't know what autoexec.bat is...
22:01:58Araqgood.
22:02:39JohnYyall I know is, in Windows environment variable (in the config panel...), there's 2 lists of environment variable, one for the current user, and one for the system
22:02:39migloI've a created a type: type Callback = proc () ... and additionally: proc newBox(f: Callback) ... that should act as a constructor ... now I'm passing proc action() = echo "action" ... to newBox(action)
22:02:57JohnYyNim's installer add the folders paths to the Path variable of the user
22:03:19JohnYybut if he doesn't have one, it doesn't do anything so it has to be added manually
22:03:20miglobut the compiler complains always :-/
22:04:17AraqJohnYy: possible but why is there no path variable?
22:04:25miglonow it works
22:04:29JohnYyI don't know why she doesn't have one
22:04:42JohnYy(and she doesn't either)
22:04:48Araqshe should have. everybody has.
22:07:15migloit's difficult to change the way how to think ... to think nim'ish
22:09:58Araqmiglo: not sure about that. YAGNI goes a long way in Nim. ;-)
22:10:04dom96Araq: Everybody has a *system* PATH
22:10:12dom96not necessarily a *user* PATH
22:10:32dom96The installer should probably add Nim to the *system* PATH.
22:10:52JohnYyor... add the path to the user path
22:11:08JohnYyGolang has its own GOPATH variable
22:12:09Araqdom96: *shrug* fix it. :P
22:12:21dom96I'm not in charge of the installers
22:12:29dom96Time to delegate.
22:12:31Araqnow you are.
22:12:48JohnYyis it on Github?
22:13:03Araqof course
22:15:52*gyeates quit (Ping timeout: 252 seconds)
22:18:23fowlmiglo: what was the issue
22:18:43fowlEr how did you fix it
22:21:45*Kingsquee joined #nim
22:22:36migloI'm still learning nim and what I did was "var x: newBox(action)" instead "var x: Box " and then "x = newBox(action)"
22:25:05fowlAh
22:25:57miglomy impression is that the classical oop strategy pattern needs a lot of boilerplate code
22:26:31miglothe functional style seems to be more ... mmm ... practical
22:26:48fowlShow me what you have maybe it can be reduced
22:27:51migloI've followed the advice of Araq and passed the "strategy" just as an function to the constructor of an object
22:28:24miglothe code is much simpler then my first more oop oriented solution
22:28:58*gyeates joined #nim
22:29:14*fowl quit (Excess Flood)
22:29:29migloand I think that it even doesn't provide any disadvantages compared to the typical oop solution
22:29:58*fowl joined #nim
22:30:28*fowl quit (Excess Flood)
22:30:48miglosimple but nevertheless still easy to extend if more 'strategies' are needed
22:32:28*fowl joined #nim
22:33:54migloI also stumbled about the programming language "pony" which seems to be also very interesting
22:35:13miglobut their tutorial is not complete, yet
22:36:23*boopsies is now known as boopsiesisaway
22:36:24migloseems to be a very young language
22:42:13*miglo left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.")
22:46:05*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:48:54*gyeates quit (Ping timeout: 246 seconds)
22:50:55*Phaal quit (Quit: Page closed)
23:01:22*gyeates joined #nim
23:06:03*pregressive joined #nim
23:06:57*tennix joined #nim
23:09:44*JohnYy quit (Quit: Page closed)
23:12:08*tennix quit (Ping timeout: 272 seconds)
23:21:15*Trustable quit (Remote host closed the connection)
23:31:35*Matthias247 quit (Read error: Connection reset by peer)
23:32:06*tennix joined #nim
23:34:11*vikaton joined #nim
23:36:32*tennix quit (Ping timeout: 246 seconds)
23:36:45reactormonkself-hosting? :-@s9
23:40:23Araqreactormonk: last time I checked, I couldn't download it anywhere
23:41:24Araqhowever poly-lang is a great example of how to design a language. Designed by people who chose what makes sense in the *context of their language* rather than worrying about "oh this looks like in Python but behaves differently so it will be confusing"
23:45:47wu-leereactormonk: another progress report
23:46:06wu-leegood news this time, I think I just found the problem
23:47:26wu-leeabsense of crt.o, hence entry point at start of .text only works if main() routine happens to be on the execution path from there
23:49:36wu-leein that, compiling nim -> c, and then c -> bin -> hex -> upload now works for me
23:50:33*brson quit (Ping timeout: 244 seconds)
23:50:47wu-leemy makefile had a two step .c -> .o, .o ->.bin compilation, which doesn't implicitly add a crt.o object
23:51:14wu-leeas happens when a one step .c -> .bin is used (compile and link)
23:55:17wu-leeseems that the nim compiler does the same, omits the crt.o
23:56:27wu-leein this case, anyway.
23:56:47*saml_ joined #nim
23:57:03*gokr quit (Quit: Leaving.)