00:01:42 | * | anthgur joined #nim |
00:07:58 | * | pregressive quit (Remote host closed the connection) |
00:08:31 | * | pregressive joined #nim |
00:14:17 | reactormonk | wu-lee, check my notes in the backlog |
00:15:11 | reactormonk | wu-lee, but sounds good, got some ideas on how to mess with the compiler to make it work directly? |
00:16:52 | * | pregressive quit (Ping timeout: 276 seconds) |
00:16:55 | reactormonk | wu-lee, try if you can get it work with passL |
00:18:55 | wu-lee | just been fiddling with passL |
00:19:19 | wu-lee | no success yet. |
00:21:35 | reactormonk | how are you invoking the linker? |
00:22:27 | wu-lee | In the Nim->C version which works, I'm not, I'm using avr-gcc to compile and link |
00:22:51 | wu-lee | it adds the crt*.o file magically |
00:23:36 | wu-lee | when compiling with 'nim c', it seems to compile each .o file separately, and link in a final step |
00:23:47 | wu-lee | and so no magic file included. |
00:24:15 | wu-lee | I've tried guessing the right .o and adding it to passL, doesn't seem to work. |
00:24:39 | wu-lee | something will work, but tonight I've burnt out again. |
00:25:08 | wu-lee | happy with this tiny step, time for some zzz |
00:25:40 | wu-lee | try again tomorrow. |
00:35:45 | * | brson joined #nim |
00:37:11 | * | vinnie left #nim ("Leaving") |
00:44:22 | * | tennix joined #nim |
00:49:08 | * | tennix quit (Ping timeout: 252 seconds) |
00:52:28 | * | BitPuffin|osx joined #nim |
00:54:55 | * | tennix joined #nim |
00:58:16 | * | codeswish joined #nim |
01:03:09 | * | yglukhov joined #nim |
01:06:06 | * | jaco60 quit (Ping timeout: 246 seconds) |
01:08:02 | * | yglukhov quit (Ping timeout: 272 seconds) |
01:31:48 | * | bjz joined #nim |
01:34:27 | * | bjz quit (Client Quit) |
01:35:01 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
01:35:29 | * | dddddd quit (Ping timeout: 264 seconds) |
01:40:28 | * | BitPuffin|osx quit (Ping timeout: 255 seconds) |
01:41:52 | * | brson quit (Remote host closed the connection) |
01:49:29 | * | zodiak quit (Read error: Connection reset by peer) |
02:07:58 | * | anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
02:23:52 | * | tennix quit (Remote host closed the connection) |
02:26:08 | * | tennix joined #nim |
02:45:30 | * | rgv151 joined #nim |
02:48:23 | rgv151 | I get this error when I tried to load my Nim lib from C: "Unable to open library: ../libbogo.so: undefined symbol: cmdCount" |
02:49:04 | * | tennix quit (Remote host closed the connection) |
02:49:15 | rgv151 | any advices? |
02:51:07 | fowl | There's some notes in os.nim about that |
02:51:39 | rgv151 | thx fowl, lemme check |
02:52:21 | * | pregressive joined #nim |
02:54:09 | * | darkf joined #nim |
02:55:32 | * | tennix joined #nim |
03:01:47 | rgv151 | fowl: there is a not about getting command line from DLL, but I didn't use that API |
03:02:52 | rgv151 | note* |
03:19:08 | * | tennix quit (Remote host closed the connection) |
03:20:49 | * | saml_ quit (Ping timeout: 264 seconds) |
03:21:34 | * | tennix joined #nim |
03:49:18 | * | pregressive quit (Remote host closed the connection) |
03:58:26 | * | tennix quit (Quit: Leaving...) |
04:05:08 | * | Jesin quit (Quit: Leaving) |
04:18:07 | rgv151 | I got i it working w/ 2 empty function cmdCount and cmdLine |
04:18:45 | rgv151 | new problem is I can't pass string to Nim proc |
04:19:13 | rgv151 | it's empty in Nim proc |
04:27:10 | * | MatrixBridge quit (Ping timeout: 265 seconds) |
04:29:29 | * | vvova quit (Ping timeout: 265 seconds) |
04:29:47 | * | vvova joined #nim |
04:34:21 | * | delian66_ joined #nim |
04:37:52 | * | delian66 quit (Ping timeout: 265 seconds) |
04:47:50 | * | vvova quit (Quit: ChatZilla 0.9.91 [SeaMonkey 2.32/20150112202503]) |
04:48:08 | * | charmander is now known as dtscode |
04:48:32 | * | vvova joined #nim |
04:49:01 | * | Demon_Fox quit (Ping timeout: 264 seconds) |
04:49:05 | * | Demon_Fox_ joined #nim |
04:49:27 | * | jszymanski joined #nim |
04:51:29 | * | rkj-b joined #nim |
05:05:59 | * | ^aurora^ joined #nim |
05:08:08 | * | MatrixBridge joined #nim |
05:08:34 | rgv151 | okay, its cstring, not string :) |
05:11:24 | fowl | rgv151: " Availability: On Posix there is no portable way to get the command line from a DLL" |
05:12:43 | * | FedeOmoto quit (Quit: Leaving) |
05:19:23 | rgv151 | fowl: i c, that's why I implemented two those function in my C code |
05:19:30 | rgv151 | and it's working now |
05:19:36 | rgv151 | thanks you |
05:47:18 | Xe | avsej: can you build your nim stable COPR for fedora 21 x86_64? |
05:51:03 | * | Kingsquee quit (Quit: Konversation terminated!) |
05:55:50 | * | ChrisMAN_ quit (Ping timeout: 244 seconds) |
05:59:18 | * | gokr joined #nim |
05:59:27 | * | gokr quit (Read error: Connection reset by peer) |
06:07:59 | * | gokr joined #nim |
06:15:51 | * | vvova quit (Ping timeout: 246 seconds) |
06:16:36 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:17:48 | * | rkj-b quit (Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253]) |
06:22:39 | * | ^aurora^ joined #nim |
06:29:54 | * | JinShil joined #nim |
06:30:18 | * | jubalh joined #nim |
06:32:19 | * | yglukhov joined #nim |
06:45:57 | * | yglukhov quit (Quit: Be back later ...) |
06:49:05 | * | Ven joined #nim |
06:55:35 | * | bjz joined #nim |
07:23:12 | * | JinShil quit (Quit: Konversation terminated!) |
07:29:57 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:44:26 | * | fowl quit (Excess Flood) |
07:45:06 | * | fowl joined #nim |
07:57:24 | * | dalarmmst quit (Ping timeout: 252 seconds) |
08:03:19 | avsej | Xe, yes |
08:03:39 | Xe | thanks! |
08:04:31 | avsej | submitted: https://copr.fedoraproject.org/coprs/avsej/nim/build/100950/ lets see how it works |
08:08:11 | * | vikaton quit (Quit: Connection closed for inactivity) |
08:15:01 | * | yglukhov joined #nim |
08:16:33 | * | coffeepot joined #nim |
08:22:06 | * | aziz joined #nim |
08:36:07 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
08:59:39 | * | gunn joined #nim |
09:00:20 | * | milosn quit (Quit: leaving) |
09:15:27 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:15:30 | * | vendethiel quit (Ping timeout: 252 seconds) |
09:16:58 | * | vendethiel joined #nim |
09:30:03 | * | delian66_ quit (Remote host closed the connection) |
09:49:41 | r-ku | xoring two uint32 results in RangeError. bug or not? |
09:51:04 | * | aziz quit (Remote host closed the connection) |
09:51:55 | * | jaco60 joined #nim |
09:55:02 | * | Kingsquee joined #nim |
10:13:39 | Araq | r-ku: bug |
10:18:00 | * | Ven joined #nim |
10:19:10 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
10:19:32 | * | coffeepot- joined #nim |
10:43:33 | * | Kingsquee quit (Quit: Konversation terminated!) |
10:49:26 | * | dddddd joined #nim |
10:51:15 | * | archie joined #nim |
10:51:15 | * | archie quit (Client Quit) |
10:53:12 | * | Uint2048 joined #nim |
10:53:24 | * | Uint2048 quit (Client Quit) |
10:55:49 | * | gunn quit (Quit: Textual IRC Client: www.textualapp.com) |
11:45:54 | * | aziz_ joined #nim |
11:53:28 | * | xcombelle joined #nim |
12:09:41 | coffeepot- | how do people return different values from one procedure? I got a proc where I want to return int|string|bool|float is this possible? |
12:30:25 | * | boopsiesisaway is now known as boopsies |
12:32:06 | yglukhov | coffeepot, if the returned value type is runtime dependant, you may wrap it in a variant object |
12:32:45 | yglukhov | if it's known in compile time use generics/templates/overloads, whatever suits you |
12:37:16 | coffeepot- | thanks for the help yglukhov. It's for an SQL parameter function. The problem is, this is already in an object variant, but I want to be able to go: echo query.params["myparam"] |
12:38:08 | coffeepot- | I tried generics but the trouble is then the context defines the type in that going echo param["myparam"] enforces the return type to be string, where the param might be an int in the object variant |
12:38:33 | coffeepot- | for example |
12:39:16 | yglukhov | let query.params["myparam"] be MyVariantType. define proc `$`(v: MyVariantType): string that switches over the type and calls appropriate `$§ |
12:39:45 | yglukhov | then it will be usable with echo |
12:41:48 | coffeepot- | I already have the `$` proc for the param obj variant so this would work. I guess I'm sort of trying to work out some kind of variant conversion to a concrete type without having to go 'case objVar.kind'. I guess this isn't really possible |
12:42:15 | yglukhov | have you tried using converters? |
12:43:13 | coffeepot- | I could set up a mapping of data type to output type with generics, then use converters based on the two types, but that's more work than I had intended tbh |
12:43:19 | yglukhov | well, anyways such implicit conversion is evil, imho. I guess you want your user to be aware that conversion may go wrong, so he is forced to handle invalid conversion |
12:43:29 | coffeepot- | yes, you may be right |
12:43:50 | * | aziz_ quit (Remote host closed the connection) |
12:43:58 | coffeepot- | setting params seems logical though with proc `[]=`*(params: var SQLParams, index: string, data: int|string|bool|float) = |
12:44:26 | yglukhov | yeah, writing is easy. parsing is not =) |
12:44:29 | coffeepot- | but reading them in a transparent way... maybe not so much |
12:44:55 | coffeepot- | :) ok thanks for your help, I think I'll abandon that and stick with returning the obj variant for now |
12:45:41 | yglukhov | or... an optional[T]. |
12:46:14 | coffeepot- | btw, i did try templates, but same probs as generics. I kind of have this idea that it could be made to work with templates but probably not a good use of my time atm, better to just get the thing finished off |
12:46:29 | coffeepot- | is optional[T] in the stdlib now? |
12:46:42 | yglukhov | i think so |
12:46:47 | coffeepot- | cool :) |
12:50:00 | coffeepot- | thanks again yglukhov |
12:50:09 | yglukhov | no problem at all ;) |
12:52:41 | * | Gertm quit (Ping timeout: 256 seconds) |
12:54:51 | * | Gertm joined #nim |
13:10:19 | * | anthgur joined #nim |
13:19:53 | * | xcombelle quit (Quit: Leaving) |
13:20:06 | * | anthgur quit (Remote host closed the connection) |
13:23:22 | gokr | coffeepot-: And you can also use objects and methods of course. |
13:23:30 | gokr | when you get sick of the case switching. |
13:24:35 | gokr | I started out building Ni using variants and case switching - worked for a while but then got ... messy as hell. Switched over to objects and use methods where needed (and procs where not needed) and it worked out much better. At least for me. |
13:27:29 | coffeepot- | gokr, what do you mean? |
13:27:59 | gokr | What I mean? |
13:28:22 | coffeepot- | yeah sorry, what do you mean by using objects and methods to avoid the case switching? |
13:28:38 | coffeepot- | as in proc asInt(...) ? |
13:28:39 | * | aziz_ joined #nim |
13:29:02 | gokr | object variants + case switching is IMHO doing manually what dynamic dispatch with methods do automatically. |
13:29:08 | * | aziz_ is now known as aziz |
13:30:26 | gokr | With an object variant - you only have one type, right? And you need to look at the "kind" field and decide what to do with it. |
13:30:43 | gokr | the good part: you only have one type. The bad part: you only have one type. |
13:31:26 | gokr | With objects and inheritance, you create a base type - and then inherit from it. Then you implement methods for the different concrete sub types. |
13:32:06 | * | aziz quit (Client Quit) |
13:32:11 | gokr | Tada, dynamic dispatch. Use the base type - and then call your method, and Nim will of course dynamically dispatch to the correct method at runtime. |
13:32:16 | coffeepot- | ah yes I see what you mean |
13:32:17 | gokr | But this is basic OO. |
13:32:34 | coffeepot- | that would make sense I think in my scenartio |
13:32:37 | coffeepot- | scenario |
13:32:51 | * | milosn joined #nim |
13:32:57 | coffeepot- | because I could have a base param and a distinguished type for all the params I wanted to deal with |
13:33:02 | gokr | Yep. |
13:33:03 | coffeepot- | then as you say use methods |
13:33:08 | coffeepot- | :) |
13:33:22 | coffeepot- | trouble is I've already done it all as object variants :D |
13:33:23 | gokr | My guess is that it pays off with objects and methods - the more polymorphic behaviors you have. |
13:33:31 | coffeepot- | totally |
13:33:40 | gokr | I started out with variants, but after a while it got really messy. |
13:34:19 | coffeepot- | object variants are really cool, but yeah anything more than a bit complex and it pays to use something more adaptable |
13:34:22 | gokr | I find Nim neat though - you can use procs whenever they work, and use methods when you need to. |
13:34:40 | coffeepot- | btw does an object var always use the max space it needs for it's components? |
13:35:13 | gokr | I presume not, you can't change the kind after creation, right? IIRC |
13:35:34 | gokr | Otherwise it would not seem like a good mechanism. |
13:35:45 | coffeepot- | like if you had an obj variant with byte and array[10, int] it would always be at least pointer size + overheads |
13:36:08 | coffeepot- | I'm not really sure how arrays work in object variants. I kind of presume they're not pointers unless ref |
13:36:36 | coffeepot- | so an array of 10 ints would take up space in the base variant even if the kind hasn't been set? |
13:37:02 | coffeepot- | you can switch branches in an object variant though as long as you reset it before |
13:37:16 | * | wan quit (Ping timeout: 272 seconds) |
13:37:35 | coffeepot- | I ask this specifically because I have an octree implementation at home I'm using that uses object variants with an array of refs |
13:37:46 | * | duban joined #nim |
13:38:02 | * | aziz joined #nim |
13:39:03 | coffeepot- | in pascal object variants always take up the size required for the largest item, but ofc this isn't pascal :) |
13:39:18 | gokr | Hmm, you may be right. |
13:39:34 | gokr | But... then they seem rather... silly to me. |
13:40:00 | coffeepot- | lol, well they are still useful, but something to bear in mind if so |
13:40:14 | coffeepot- | especially if you want an octree with millions of nodes |
13:45:10 | * | bjz joined #nim |
13:45:40 | coffeepot- | according to this fairly old thread http://forum.nim-lang.org/t/196 object variants compile to C unions, so it does seem like they take up the memory of the largest item |
13:47:35 | coffeepot- | ... hmm i might rethink my octree implementation with inheritance to see if i can eek out some more memory after all :) |
13:50:09 | * | wan joined #nim |
13:50:11 | * | FedeOmoto joined #nim |
13:52:55 | * | milosn_ joined #nim |
13:52:57 | * | milosn quit (Read error: Connection reset by peer) |
13:59:20 | * | milosn_ is now known as milosn |
14:15:00 | * | askatasuna joined #nim |
14:15:03 | * | xcombelle joined #nim |
14:20:32 | * | jubalh quit (Quit: Leaving) |
14:22:03 | * | darkf quit (Quit: Leaving) |
15:07:52 | * | aziz quit (Remote host closed the connection) |
15:11:30 | * | doxavore joined #nim |
15:16:13 | * | ChrisMAN_ joined #nim |
15:17:34 | Araq | coffeepot-: usually using an aditional ref for the array part works better than inheritance in this case. ymmv |
15:20:33 | * | jszymanski quit (Quit: computer sleeps...) |
15:24:04 | boopsies | does anyone know how lexim works? (if it even does) |
15:25:16 | Araq | i wrote it |
15:29:01 | * | boopsies nods |
15:29:21 | boopsies | i've tried to build leximt and call it on the ex1.lex file but it's erroring |
15:29:30 | boopsies | is it usable? |
15:34:43 | coffeepot- | araq thanks for mentioning that. I actually do use a ref to an array for the octree branches (had forgotten I'd changed that from a non-ref), so it's nice to know I'm on the right track :) |
15:38:50 | * | Mat4 joined #nim |
15:38:57 | Mat4 | hello |
15:40:13 | reactormonk | Araq, you really want all the text about whitespace in the contributing guide? |
15:40:31 | * | fowl quit (Excess Flood) |
15:42:07 | Araq | reactormonk: i'll remove later what I consider foolish from the contributing guide |
15:42:09 | * | fowl joined #nim |
15:42:14 | reactormonk | Araq, so be it |
15:42:29 | Araq | boopsies: it is usable afaict but ex1.lex is just some cruft |
15:42:38 | Mat4 | I would like to suggest thinking about a library for data transformations. Something like map and other typical operators would be helpful |
15:42:41 | Araq | I'm busy, will tell you later how to use it |
15:43:10 | Araq | Mat4: we have map in system.nim and lots of more in sequtils.nim please check it out before complaining ;-) |
15:43:18 | reactormonk | Mat4, nah, just add concepts to the stdlib |
15:43:40 | Mat4 | Araq: I will take a look |
15:47:54 | * | Shoozza left #nim ("Leaving") |
15:48:30 | boopsies | Araq: alright, thanks! |
15:56:35 | * | aziz joined #nim |
15:56:36 | * | elbow joined #nim |
16:03:13 | * | yglukhov quit (Ping timeout: 250 seconds) |
16:03:53 | * | kashyap__ joined #nim |
16:05:15 | kashyap__ | Hi, I want to try loading DLL's written in nim inside a nim program. How can I do it? I started looking at dynlib module for this but looks like none of the impure libraries use it ... |
16:07:29 | * | Arrrr joined #nim |
16:13:36 | * | Mat4 quit (Quit: Verlassend) |
16:14:26 | Arrrr | Araq, you said once you wanted to change methods. What dont you like? |
16:14:49 | Arrrr | Also, i wonder if they are efficient when you have tens of subtypes |
16:16:48 | * | coffeepot- quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:20:54 | * | Matthias247 joined #nim |
16:23:33 | * | pathetic joined #nim |
16:23:52 | pathetic | Is there any websocket packages? |
16:45:01 | * | pathetic quit (Ping timeout: 246 seconds) |
16:49:31 | * | brson joined #nim |
16:51:53 | kashyap__ | okay .... the dll worked for me after following the instructions from FFI section of the manual .... |
16:52:36 | kashyap__ | How can I re-load a DLL though ... using the FFI steps, I dont explicitly load the library, so how can I reload? |
16:58:18 | Arrrr | I suppose you'll have to search how that works in C |
16:59:24 | FedeOmoto | in C it's dlopen() dlclose() |
17:00:20 | FedeOmoto | (Linux) |
17:00:49 | FedeOmoto | on Windows it's LoadLibrary() and FreeLibrary() |
17:11:11 | * | duban quit (Ping timeout: 248 seconds) |
17:11:43 | Arrrr | I found this while fighting against opengl http://nim-lang.org/docs/dynlib.html#loadLib,string kashyap__ |
17:12:21 | FedeOmoto | you can use loadLib and unloadLib from the dynlib module, calling unloadLib until the reference count on the dynamic library handle reaches zero |
17:13:00 | kashyap__ | interesting ... how do I call a function that I get the address to using symAddr .... |
17:13:12 | kashyap__ | casting a pointer to a proc does not seem to work |
17:14:03 | Arrrr | I found it here https://github.com/nim-lang/opengl/blob/master/src/opengl.nim#L59-L71 |
17:14:41 | kashyap__ | cool ... thanks Arrrr |
17:15:33 | FedeOmoto | yeah, casting should work |
17:15:56 | * | doxavore quit (Quit: I said good day, sir.) |
17:16:52 | kashyap__ | cool ... btw while looking I found this really cool video series - https://www.youtube.com/watch?v=Ee3EtYb8d1o |
17:17:03 | kashyap__ | game development from scratch |
17:18:12 | * | doxavore joined #nim |
17:18:25 | Arrrr | I'll give it a shot, i need to learn stuff from c |
17:18:54 | kashyap__ | We can get the ideas from there and implement in nim :) |
17:20:17 | boopsies | trying to use lexim aand.. |
17:20:19 | boopsies | lib/nim/core/typeinfo.nim(125, 20) Error: VM is not allowed to 'cast' |
17:20:22 | boopsies | :s |
17:20:25 | boopsies | is that a new restriction? |
17:21:41 | Arrrr | I got that error yesterday, i was told it is because you cant do that action in compile time |
17:22:59 | boopsies | yeah |
17:23:04 | boopsies | this is in a lib though |
17:23:12 | boopsies | i assume it used to work.. |
17:23:22 | * | dalarmmst joined #nim |
17:23:26 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:26:12 | * | jszymanski joined #nim |
17:32:28 | Araq | Arrrr: I think we have a 'methods' tag for the git issues. |
17:32:38 | Araq | this is what I don't like, they are broken :P |
17:34:01 | Araq | boopsies: now ... let's see |
17:36:24 | boopsies | Araq: i think i figured out how it's meant to work, but it's complaining about VM casting.. |
17:41:58 | * | vasher_ joined #nim |
17:44:42 | Arrrr | Will you fix methods for 1.0 ? |
17:46:38 | Araq | Arrrr: yes, I think so |
17:47:30 | Arrrr | great! |
17:47:32 | Araq | my plan is to introduce for 0.11.4 a warning "picked foobar as a dispatcher, declare it explicitly" and then mandate it |
17:48:23 | Araq | the most pressing problem is that the compiler "guesses" which method is the starting point for dispatching causing all sorts of trouble |
17:50:28 | * | kashyap__ quit (Ping timeout: 246 seconds) |
17:50:30 | Arrrr | I saw, when calling a method it just generate an if-else for each possible type. What if i have 100+ childs of one type |
17:52:23 | Araq | *shrug* |
17:53:12 | Araq | we can optimize it later |
17:53:33 | Arrrr | Hahah. So, i should use in that case proc pointers, right? |
17:53:42 | * | Jehan` joined #nim |
17:53:58 | Araq | sounds reasonable |
17:55:46 | Araq | boopsies: you need to compile the 'lexe' helper via 'nim c lexe' and then you can run the example in lexim |
17:56:01 | Araq | works for me with devel and I'm quite sure I tested it with 0.11.2 |
17:56:33 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:57:28 | boopsies | Araq: hmm, i'll give it a shot! |
18:03:40 | * | ^aurora^ joined #nim |
18:07:50 | federico3 | any way to "cast" the output of a map() to a fixed-size array? |
18:08:41 | Araq | federico3: no. |
18:09:03 | Arrrr | any way to forward declare a type ? |
18:10:00 | Araq | Arrrr: no, mutually recursive types need to be in a single 'type' section |
18:10:09 | federico3 | essentially the opposite of "@", although it would be nicer if map() was populating the array directly |
18:10:25 | Jehan` | You can use type parameters to work around it, too, Arrrr. |
18:10:40 | Arrrr | Type parameters? |
18:15:50 | Araq | generics. |
18:16:22 | federico3 | how about converting a seq into a tuple? |
18:18:41 | Araq | there is a tuples nimble package for that or something |
18:21:19 | * | infinity0 joined #nim |
18:21:33 | boopsies | Araq: nim c lexim.nim spits out "lib/nim/core/typeinfo.nim(125, 20) Error: VM is not allowed to 'cast'" |
18:22:32 | fowl | federico3: why dont you just use map on an array and modify it |
18:22:42 | infinity0 | any chance of a 0.11.3 "soon"? the debian package is mostly good to go, but i'd rather not include the entirety of 87f65f5 as a patch |
18:23:17 | fowl | federico3: and no you can't just make up a tuple at run time |
18:23:55 | Araq | infinity0: I can try, but no promises |
18:24:06 | infinity0 | ok, thanks |
18:24:27 | Araq | boopsies: what is your Nim version? |
18:25:56 | boopsies | 0.11.2 |
18:27:12 | boopsies | devel that I have on https://github.com/nim-lang/Nim/commit/6820b2fea919c033405e7e204343fddd947c2ef3 |
18:27:14 | boopsies | gives.. |
18:27:34 | boopsies | http://hastebin.com/dowegaqefi.avrasm |
18:27:51 | boopsies | i'll try pulling and building latest |
18:28:46 | * | duban joined #nim |
18:31:04 | Araq | boopsies: that means 'lexe' returned an empty string for some reason |
18:31:18 | boopsies | hmm.. |
18:32:39 | Araq | probably because on unix it cannot find the exe cause it doesn't start with ./ or some other nonsense |
18:33:29 | boopsies | sounds like it |
18:35:32 | boopsies | yep |
18:35:34 | boopsies | PATH=$PATH:. ~/devel/nim/bin/nim c lexim.nim |
18:35:36 | boopsies | works fine |
18:35:52 | boopsies | still get the cast error on 0.11.2 though |
18:36:35 | Araq | 0.11.0 says: |
18:36:37 | Araq | - ``marshal.$$`` and ``marshal.to`` can be executed at compile-time. |
18:36:51 | Araq | so ... not sure, it really should work |
18:37:01 | boopsies | well- it works on devel :) |
18:48:14 | * | brson quit (Ping timeout: 272 seconds) |
18:48:22 | Arrrr | when everything else fails ... devel |
18:57:09 | * | fowl quit (Excess Flood) |
18:58:45 | * | fowl joined #nim |
19:06:33 | * | yglukhov joined #nim |
19:06:58 | * | brson joined #nim |
19:07:54 | * | vikaton joined #nim |
19:10:26 | * | ozra_ joined #nim |
19:10:49 | Araq | hi ozra_ welcome back |
19:11:05 | ozra_ | Hey Araq! |
19:13:04 | vikaton | hi |
19:14:06 | * | fowl quit (Excess Flood) |
19:14:16 | * | fowl joined #nim |
19:14:16 | * | fowl quit (Changing host) |
19:14:16 | * | fowl joined #nim |
19:14:16 | * | fowl quit (Changing host) |
19:14:16 | * | fowl joined #nim |
19:14:49 | * | Trustable joined #nim |
19:16:49 | Arrrr | Hello ozra_, we missed your PRs |
19:17:46 | * | vendethiel- joined #nim |
19:17:47 | * | vendethiel quit (Ping timeout: 246 seconds) |
19:18:24 | * | elbow quit (Remote host closed the connection) |
19:19:37 | ozra_ | Arrrr: I digged and digged in that generic inheritance thing, but every attempt bubbled up a bug in a different place, finally I realized I need more brains and/or time to fix that one. Haha. But I got together a good set of debugging utils. |
19:20:58 | Araq | bummer |
19:23:15 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:25:09 | Arrrr | Ok, as long as you share them with us *sexy wink* |
19:26:35 | ozra_ | Arrrr: Well, it's just macros around guarded echos, unix-style coloring and some node/type dumpers with another format then the internal.. So.. |
19:27:30 | Arrrr | unix-style coloring? |
19:28:54 | ozra_ | Arrrr: Ah, term escape-codes... ```DBG "shit goes down here:".red.bold, someVar.blue.bold, otherVar.yellow``` kinda mini helper |
19:30:23 | ozra_ | just wraps strings in esc color + reset... |
19:42:46 | Araq | ozra_: well what you should do is ask me when the problems are overwhelming you |
19:43:13 | * | Matthias247 joined #nim |
19:52:36 | ozra_ | Araq: Yeah, it was hard to get a grip on the flow through the compiler, I must have been in every file in there, haha. So I did those debug-dumpers to try and get better aquainted with the data structures of the type graphs and the ast. I'm ruining the schedule for my proj, so I just had to drop that one :-/. |
19:53:36 | * | ^aurora^ joined #nim |
20:07:25 | * | filcuc joined #nim |
20:12:23 | * | Arrrr quit (Quit: WeeChat 1.2) |
20:28:29 | * | Mat4 joined #nim |
20:31:19 | Mat4 | Araq: I have taken a look at the functional operators in the libraries. These are nice opportunities. However what I had in mind are mapping function from multible members of structured data to each other |
20:32:15 | Mat4 | ^functions |
20:35:29 | * | xcombelle quit (Quit: Leaving) |
20:35:42 | * | jubalh joined #nim |
20:35:51 | * | Trustable quit (Remote host closed the connection) |
20:37:55 | ozra_ | dom96: If you're around: I made a tricky fix to safen the highlighting even if github chops off the code in the middle, or whatever. So fingers crossed, a lot of issues with it should be gone now. |
20:39:07 | ozra_ | Varriount_: ping. PR should be pulled asap.. |
20:40:01 | * | wan quit (Ping timeout: 264 seconds) |
20:45:09 | Mat4 | by the way what was the correct syntax for writing an uint8 to a dynamic allocated memory buffer (pointer) ? |
20:46:57 | Mat4 | cast[array[0..n, uint8]](pVariable+offset) = value ?!??? |
20:52:24 | * | wan joined #nim |
20:55:46 | * | duban quit (Ping timeout: 276 seconds) |
21:03:07 | FedeOmoto | cast[ptr array[0 .. n, uint8]](pVariable)[0] = value |
21:03:29 | * | gyeates quit (Ping timeout: 246 seconds) |
21:03:41 | * | aziz quit (Quit: Leaving) |
21:05:19 | FedeOmoto | or more correctly: cast[ptr array[0 .. n, uint8]](pVariable)[offset] = value |
21:13:18 | Mat4 | thanks, try it |
21:13:56 | dom96 | ozra_: I'm wondering if github actually does that for diffs, or whether they still highlight the whole file. |
21:15:55 | * | miglo joined #nim |
21:18:15 | ozra_ | dom96: Yeah, it sounds like a hap hazard thing to do, so they likely don't. In any event, the change breaks nothing, it only highlights num literals even though they're not compilable correct. Err on the safe side... |
21:22:58 | reactormonk | On to something more productive, could someone help out https://github.com/nim-lang/Nim/pull/2984 ? |
21:23:29 | * | yglukhov quit (Quit: Be back later ...) |
21:25:17 | Xe | is nim's syntax derived from pascal? |
21:25:50 | Mat4 | I bet Pascal was of influence |
21:30:50 | fowl | The compiler was written in pascal originally |
21:31:10 | fowl | And pas2nim came before c2nim iirc |
21:31:50 | * | Kingsquee joined #nim |
21:32:13 | * | Kingsquee quit (Client Quit) |
21:33:46 | Jehan` | Pascal was an influence, but the syntax is really more Python-inspired, I'd say. |
21:34:30 | miglo | if I create a type like "type T = object"with some properties and then a variable "var t: T" is "t" already pointing to an object on the stack or is it just some sort of reference to which I have to assign an object via "t = T()"? |
21:34:33 | * | jubalh quit (Quit: Leaving) |
21:35:33 | Jehan` | instances of "object" types don't "point" anywhere. They _are_ instances of that type. |
21:35:47 | Jehan` | They exist either in global memory or on the stack. |
21:36:13 | Jehan` | But the concept of "pointing" makes no sense for such variables. |
21:36:15 | fowl | miglo: its like a c struct, but var s: T will initialize it to 0 |
21:36:30 | fowl | miglo: so its fields will be nil or 0 |
21:36:35 | miglo | ok, thanks |
21:37:29 | miglo | but in case of "type T = ref object" the corresponding var is just a pointer? |
21:37:38 | Jehan` | Yes. |
21:38:10 | miglo | so I have explicitly create an object on the heap via "new T" and assign it to the var |
21:38:43 | fowl | You can use the constructor T() |
21:39:12 | fowl | It is nil by default |
21:40:07 | miglo | so, it could be "new t" or "t = T()" |
21:41:20 | * | jszymanski quit (Quit: computer sleeps...) |
21:49:01 | * | filcuc quit (Quit: Konversation terminated!) |
21:50:14 | * | FedeOmoto quit (Quit: Leaving) |
21:50:22 | * | Mat4 quit (Quit: Verlassend) |
22:01:03 | * | doxavore quit (Quit: I said good day, sir.) |
22:09:00 | miglo | Hmmm, so if I have "type A = object" then "var f: A" results into the same as "var f = A()", but in the former f is initialized with defaults and in the latter I could assign an already initialized object via its constructor to f |
22:10:08 | * | dalarmmst quit (Ping timeout: 256 seconds) |
22:12:50 | * | askatasuna quit (Ping timeout: 252 seconds) |
22:15:01 | miglo | another case...if I have a base type like "type base = ref object" from which other types are derived from must those derived types be also "ref object" and would it be wrong to declare them just as "object of base"? |
22:17:31 | miglo | Hmm, probably not in nim's multi-method paradigm |
22:18:00 | miglo | it depends, I guess |
22:22:07 | * | dalarmmst joined #nim |
22:31:21 | * | pregressive joined #nim |
22:34:59 | * | miglo left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
22:38:25 | * | vendethiel- quit (Ping timeout: 250 seconds) |
22:39:25 | * | pregressive quit () |
22:40:37 | fowl | Meh |
22:50:23 | * | boopsies is now known as boopsiesisaway |
22:55:27 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:57:04 | * | ozra_ quit (Ping timeout: 246 seconds) |
22:58:10 | * | Jehan` quit (Quit: Leaving) |
23:02:05 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:08:43 | * | gyeates joined #nim |
23:11:31 | * | milosn quit (Ping timeout: 255 seconds) |
23:13:22 | * | milosn joined #nim |
23:15:43 | federico3 | how can I print truncated/rounded floats? |
23:16:16 | Varriount_ | federico3: http://nim-lang.org/docs/strutils.html#formatFloat,float,FloatFormatMode,range[] |
23:16:54 | federico3 | thanks |
23:19:01 | federico3 | I miss Python's old-style string formatting |
23:22:14 | Varriount_ | federico3: Psh, I miss Python's new-style string formatting. |
23:23:27 | federico3 | well, I find old-stile more practical and quicker to use |
23:25:17 | * | Varriount_ is now known as Varriount |
23:27:36 | apense | Anyone know why comments in templates like https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L3259 don't show up in the documentation (http://nim-lang.org/docs/system.html#..^.t,expr,expr) |
23:30:23 | * | vendethiel joined #nim |
23:30:41 | Varriount | apense: If I had to hazard a guess, that comment wasn't added until April 21st. The documentation was generated at "2015-05-04 19:40:47 UTC" which, if you consider the last number to be the month, means that the code is newer than the documentation. |
23:39:34 | * | MyMind quit (Ping timeout: 276 seconds) |
23:40:13 | * | Pisuke joined #nim |
23:46:39 | * | doxavore joined #nim |
23:51:43 | * | vendethiel quit (Ping timeout: 248 seconds) |
23:58:31 | apense | Varriount, thanks! I think you're right. shouldn't the documentation be updated when there is a new release? 0.11.2 was on May 4. Seems like new docs would go for each release |
23:59:31 | * | fowl quit (Excess Flood) |