00:02:05 | * | reem joined #nim |
00:04:08 | * | reem quit (Remote host closed the connection) |
00:05:13 | onionhammer | Varriount you should add a c/cpp/obj setting ;) |
00:09:07 | * | gsingh93 quit (Ping timeout: 255 seconds) |
00:18:41 | * | Mat4-coding is now known as Mat4 |
00:18:48 | * | Mat4 quit (Quit: Verlassend) |
00:27:18 | * | chernobyl joined #nim |
00:27:27 | * | chernobyl quit (Client Quit) |
00:29:02 | * | johnsoft quit (Ping timeout: 246 seconds) |
00:29:19 | * | johnsoft joined #nim |
00:31:16 | Varriount | onionhammer: Hm? |
00:41:35 | * | filwit quit (Quit: Leaving) |
00:45:09 | * | pregressive quit (Remote host closed the connection) |
00:45:28 | * | pregressive joined #nim |
00:47:53 | * | jsudlow joined #nim |
00:49:55 | * | enquora quit (Quit: enquora) |
01:06:03 | * | sampwing quit (Ping timeout: 252 seconds) |
01:22:41 | * | infinity0_ joined #nim |
01:22:41 | * | infinity0_ quit (Changing host) |
01:22:41 | * | infinity0_ joined #nim |
01:22:41 | * | infinity0 is now known as Guest28183 |
01:22:41 | * | Guest28183 quit (Killed (asimov.freenode.net (Nickname regained by services))) |
01:22:41 | * | infinity0_ is now known as infinity0 |
01:34:39 | * | reem joined #nim |
01:40:05 | * | kjo left #nim (#nim) |
01:47:50 | * | willwillson quit (Read error: Connection reset by peer) |
01:51:42 | * | reem quit (Remote host closed the connection) |
02:00:00 | * | d3m1gd quit (Ping timeout: 244 seconds) |
02:04:57 | * | dhasenan joined #nim |
02:05:17 | * | reem joined #nim |
02:09:52 | * | nande_ quit (Ping timeout: 240 seconds) |
02:12:20 | * | koz_desktop joined #nim |
02:12:55 | * | Trustable quit (Quit: Leaving) |
02:14:11 | koz_desktop | Does Nim's compiler perform TCO? |
02:14:20 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
02:18:32 | flaviu | This doesn't make much sense. One of my hotspots is somehow being called from a local variable. |
02:19:05 | flaviu | err, global variable |
02:27:06 | * | jholland quit (Quit: Connection closed for inactivity) |
02:30:44 | * | reem quit (Remote host closed the connection) |
02:34:04 | * | nande joined #nim |
02:35:34 | koz_desktop | For the hash tables in the tables module, is a tuple considered a 'simple standard type'? |
02:35:38 | * | pregressive quit (Read error: Connection reset by peer) |
02:35:44 | * | darkf joined #nim |
02:36:43 | * | nande quit (Remote host closed the connection) |
02:37:09 | flaviu | .eval import tables; let x = initTable[tuple[x: int, y: string],int]() |
02:37:13 | Mimbus | flaviu: <no output> |
02:37:51 | flaviu | koz_desktop: There's no type mismatch, so it qualifies as "simple" |
02:37:57 | koz_desktop | flaviu: Thanks! |
02:38:26 | flaviu | But "simple standard type" has no general meaning - here it's just referring to something that doesn't have a hash() function in the stdlib. |
02:40:52 | koz_desktop | flaviu: That's what I was checking. Thanks! |
02:41:21 | koz_desktop | Also, nim's compiler is pretty smart - it figured out I wanted it to compile stuff in the src directory without me telling it to! |
02:43:40 | * | reem joined #nim |
02:46:39 | * | reem quit (Remote host closed the connection) |
02:49:44 | * | pregressive joined #nim |
02:49:47 | * | pregressive quit (Remote host closed the connection) |
03:00:50 | * | kapil___ joined #nim |
03:05:00 | Varriount | koz_desktop: The compiler itself doesn't do TCO, however the C/C++/ObjC compiler might. |
03:07:13 | * | RayoGundead joined #nim |
03:08:23 | koz_desktop | Varriount: On GNU/Linux, does Nim use GCC to compile the C? |
03:08:57 | Varriount | koz_desktop: It uses whatever C compiler it finds. I forget how it finds out. |
03:09:19 | koz_desktop | Well, I have both GCC and Clang, so that's why I'm curious. |
03:09:33 | Varriount | I think it uses GCC by default. You can tell it to use another compiler via a command line/config switch |
03:09:45 | koz_desktop | OK - does it pass any -O parameters to it? |
03:09:56 | koz_desktop | Because if it does, then yes, Nim does TCO as far as I'm concerned. |
03:09:57 | Varriount | koz_desktop: Try adding '--verbosity:2' to the output |
03:10:23 | Varriount | You should see, near the end of the compilation process, the invokation of the C compiler. |
03:10:48 | koz_desktop | Oh, cool. On normal, it doesn't pass any -O parameters. |
03:11:16 | koz_desktop | And -O3 with -d:release |
03:11:25 | koz_desktop | That's freaking awesome, thanks Varriount. |
03:12:50 | koz_desktop | Suppose I declare a type like type Foo = tuple[a,b: int] |
03:13:05 | koz_desktop | Is this type going to be available outside the current file? |
03:13:09 | koz_desktop | If not, where do I put the *? |
03:13:13 | renesac | koz_desktop: look at the config directory on nimrod instalation |
03:13:26 | renesac | for more about the compiler parameters |
03:14:14 | renesac | koz_desktop: it won't, unless you include instead of importing it |
03:14:25 | renesac | put the * before Foo |
03:14:39 | koz_desktop | renesac: So type *Foo = ... ? |
03:14:44 | Varriount | Actually, it needs to be after Foo |
03:14:53 | renesac | oops |
03:14:57 | renesac | sorry |
03:15:02 | koz_desktop | So type Foo* = ... |
03:15:23 | Varriount | koz_desktop: Yep. And you can apply * to mark fields and procedures as externally visible too. |
03:15:32 | * | renesac don't programs in nimrod since some weeks |
03:15:53 | renesac | Varriount: for tuples, all the fields are visible right? |
03:16:03 | koz_desktop | I knew about fields and procedures already - just not types. |
03:16:12 | renesac | only objects can hide fields, I think |
03:16:18 | renesac | but I'm not sure |
03:16:28 | koz_desktop | Also, is someone in the Nim community responsible for the nim-mode available in Emacs? |
03:17:05 | renesac | https://github.com/Araq/Nim/wiki/Editor-Support |
03:17:27 | renesac | is it the code of one of them? |
03:17:59 | koz_desktop | Yeah, it is. I even found an answer for th eissue I was having with it. |
03:18:05 | flaviu | yep, all the tuple fields are visible. |
03:25:40 | * | reem joined #nim |
03:26:10 | koz_desktop | OK, in the tables module, it gives an example of how to init a Table as var salaries = initTable[Person, int]() |
03:26:18 | koz_desktop | If I wanted a TableRef instead, what would I do? |
03:27:46 | koz_desktop | (sorry for all these questions - I'm new to Nim and I learn best by imitation) |
03:29:36 | * | gsingh93 joined #nim |
03:29:47 | Varriount | renesac: I don't quite know. |
03:34:50 | koz_desktop | Also, how would I return a new TableRef from a proc that generates it? |
03:35:36 | koz_desktop | Do I just assign it to result? |
03:36:11 | * | gsingh93 quit (Ping timeout: 250 seconds) |
03:43:49 | Varriount | koz_desktop: What do you mean? |
03:44:09 | Varriount | Assigning the output to result should work. |
03:45:09 | koz_desktop | Varriount: Thanks. Also, where do I find the doc for countup? |
03:46:21 | flaviu | koz_desktop: see initTable vs newTable |
03:46:36 | koz_desktop | flaviu: Thanks. |
03:49:24 | koz_desktop | OK, I'm getting weird errors from this program: http://dpaste.com/0S4Y2YH |
03:49:38 | koz_desktop | I think I have a type mismatch somewhere, but it's not being very helpful in telling me where |
03:50:49 | renesac | koz_desktop: about countup: learn to use http://nim-lang.org/theindex.html |
03:51:06 | renesac | it is in system IIRC |
03:51:17 | koz_desktop | renesac: Thanks. |
03:51:39 | renesac | you will normally use the '..' operator though |
03:51:41 | renesac | for countup |
03:51:45 | flaviu | koz_desktop: Sure it does. See all the "Info: template/generic instantiation from here"? They're all part of the error message. |
03:52:17 | flaviu | The problem is at test.nim(8, 19) |
03:52:43 | koz_desktop | When I assign to result? |
03:52:47 | koz_desktop | Am I missing a cast or somethign? |
03:52:50 | koz_desktop | something* |
03:52:50 | flaviu | It's unable to find a hash function for uint32. |
03:53:01 | koz_desktop | Ah. |
03:53:19 | koz_desktop | So I need to write one that delegates to int64? |
03:54:01 | flaviu | Sure, that's a solution. |
03:54:07 | koz_desktop | How would I do that? |
03:54:38 | flaviu | proc hash(self: uint32): ... = hash(int64(self)) |
03:56:02 | koz_desktop | Shouldn't it be result = hash(int64(self)) ? |
03:58:54 | koz_desktop | Writing it exactly as you said (replacing ... with THash) seems to have no effect on the error message. |
03:59:13 | flaviu | That would be equivalent, but I don't like using two equal signs on the same line. |
03:59:57 | flaviu | Did you import hashes? If so, you should get a typemismatch on `==`. Just import unsigned. |
04:01:25 | koz_desktop | OK, my program now looks like this: http://dpaste.com/1DSQ1KA |
04:01:30 | koz_desktop | I still get the same error from the same place. |
04:01:58 | flaviu | That's because nim doesn't do automatic forward declarations. |
04:02:15 | flaviu | move hash() to above make_line_graph() |
04:02:23 | koz_desktop | I'll add a forward declaration |
04:03:15 | koz_desktop | OK, it works now, thanks! |
04:04:38 | flaviu | great! |
04:04:38 | * | sitaram quit (Ping timeout: 246 seconds) |
04:04:41 | * | pregressive joined #nim |
04:04:51 | koz_desktop | Also, is there any support in Nim for contract programming? |
04:06:46 | * | sitaram joined #nim |
04:06:46 | * | sitaram quit (Changing host) |
04:06:46 | * | sitaram joined #nim |
04:08:57 | flaviu | No, but nim is very extensible. Write your desired syntax inside dumpTree and if it compiles, it's possible. |
04:09:27 | flaviu | https://gist.github.com/ae3135451aa7158db9ff |
04:09:44 | koz_desktop | I see. |
04:10:11 | koz_desktop | In that case, can I take a subrange such that I can only have floats in the interval (0.0 ; 1.0)? |
04:11:34 | koz_desktop | (I want to make the only valid inputs to make_line_graph's k parameter to be in that range) |
04:11:43 | flaviu | No, but https://github.com/Araq/Nim/issues/1095 |
04:12:09 | koz_desktop | Ah. |
04:14:32 | koz_desktop | I guess I'll just use doAssert for now. |
04:16:21 | koz_desktop | I guess uint32 is an ordinal? |
04:18:41 | koz_desktop | Also, the compiler seems unhappy with type Positive* = range[0..high(uint32)] |
04:18:45 | koz_desktop | Did I do something wrong? |
04:19:20 | flaviu | I think that positive is already taken. |
04:19:27 | koz_desktop | Ah, ok. |
04:19:29 | flaviu | http://nim-lang.org/system.html#Positive |
04:19:44 | koz_desktop | OK, U32Positive it is! |
04:20:29 | * | gsingh93 joined #nim |
04:20:33 | koz_desktop | type U32Positive* = range[1..high(uint32)] is still not satisfactory :( |
04:23:02 | flaviu | I'm not sure what the problem is, but I need to go to bed now. Araq will probably be around in the morning, ask again then. |
04:23:15 | koz_desktop | OK, thanks! |
04:24:09 | * | brson joined #nim |
04:26:01 | koz_desktop | Varriount: Any chance you'd know? |
04:34:25 | * | sitaram quit (Ping timeout: 256 seconds) |
04:35:42 | * | pregress_ joined #nim |
04:38:23 | * | pregressive quit (Ping timeout: 256 seconds) |
04:41:35 | * | sitaram joined #nim |
04:41:35 | * | sitaram quit (Changing host) |
04:41:35 | * | sitaram joined #nim |
04:51:10 | * | hasenj joined #nim |
04:51:11 | * | sitaram quit (Ping timeout: 252 seconds) |
04:51:15 | * | pregressive joined #nim |
04:52:04 | * | davidhq joined #nim |
04:52:06 | hasenj | total noob question |
04:52:11 | hasenj | I'm trying to use the map function |
04:52:22 | hasenj | http://hastebin.com/ovujanucig.md (4 lines of code) |
04:52:46 | hasenj | I defined the function I want to map as: |
04:52:55 | hasenj | proc square[T](n: T): T{.closure.} = n * n |
04:53:27 | hasenj | The compiler is saying it's expecting the function to have the signature: |
04:53:29 | hasenj | proc (T): S{.closure.} |
04:53:58 | * | pregress_ quit (Ping timeout: 255 seconds) |
04:55:14 | hasenj | at leaset that's how I'm reading the error message .. |
04:55:50 | hasenj | http://hastebin.com/ogihaxeqed.pl |
05:03:17 | * | sitaram joined #nim |
05:03:35 | * | sitaram quit (Changing host) |
05:03:35 | * | sitaram joined #nim |
05:08:46 | * | reem quit (Remote host closed the connection) |
05:09:20 | * | reem joined #nim |
05:10:13 | * | gsingh93 quit (Ping timeout: 250 seconds) |
05:15:39 | * | kniteli quit (Ping timeout: 245 seconds) |
05:25:17 | * | saml_ joined #nim |
05:27:58 | * | saml_ quit (Client Quit) |
05:28:48 | Varriount | hasenj: You still here? |
05:28:51 | * | saml_ joined #nim |
05:28:53 | hasenj | yea |
05:29:21 | hasenj | Varriount: yes |
05:30:53 | Varriount | hasenj: Ok, I'm looking at it. |
05:31:21 | koz_desktop | Varriont: Any chance you could help me with my issue as well? |
05:33:26 | Varriount | koz_desktop: Sure, what is it? |
05:34:24 | * | reem quit (Remote host closed the connection) |
05:34:39 | koz_desktop | type U32Positive* = range[1..high(uint32)] is still not satisfactory :( |
05:34:44 | koz_desktop | I get a type mismatch for some reason. |
05:34:57 | Varriount | hasenj: It seems to be a compiler limitation/language ambiguity |
05:35:00 | * | reem joined #nim |
05:35:12 | hasenj | Varriount: ok, thanks |
05:35:20 | hasenj | I guess I should post in the forum or something |
05:35:44 | Varriount | hasenj: When you reference 'square', the compiler puts in the actual generic procedure type, with unfilled type parameters |
05:35:52 | Varriount | hasenj: Make an issue. |
05:36:37 | hasenj | ok |
05:36:41 | Varriount | hasenj: You have to put explicit type params |
05:36:49 | Varriount | echo sum(map(components, square[int, int])) |
05:36:58 | hasenj | aaah, ok |
05:36:59 | hasenj | thanks |
05:40:00 | Varriount | koz_desktop: Looking into it now. It might be a compiler bug. |
05:41:19 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:42:41 | hasenj | https://github.com/Araq/Nim/issues/2188 |
05:43:06 | koz_desktop | Varriount: Thanks! |
05:43:58 | Varriount | koz_desktop: A range expects two ordinals of the same type. |
05:44:42 | Varriount | Since an integer literal is assumed to be an 'int' unless otherwise stated, the compiler is complaining about you giving it a range with two types, uint32 and int |
05:45:28 | Varriount | If nothing else, that error message needs to be improved. It's understandable behavior, in hindsight, but the compiler doesn't give much information. |
05:45:48 | Varriount | koz_desktop: 'type U32Positive* = range[1'u32..high(uint32)]' |
05:46:50 | Varriount | koz_desktop: I don't supposed you could hunt down where the error message is being called from, and improve it? |
05:48:28 | Varriount | koz_desktop: All you need to do is try to compile the invalid code with a version of the compiler that has stacktraces and linetraces enabled (which is always, unless -d:release is used) |
05:49:39 | * | kniteli joined #nim |
05:49:54 | Varriount | Hey kniteli |
05:50:33 | kniteli | Evening |
05:51:40 | * | MightyJoe joined #nim |
05:52:29 | * | kapil___ quit (Quit: Connection closed for inactivity) |
05:52:50 | * | cyraxjoe quit (Ping timeout: 246 seconds) |
05:54:34 | * | hasenj quit (Quit: hasenj) |
05:58:37 | * | MightyJoe quit (Ping timeout: 264 seconds) |
05:59:57 | * | MightyJoe joined #nim |
06:01:41 | * | sitaram quit (Ping timeout: 256 seconds) |
06:02:53 | * | reem quit (Remote host closed the connection) |
06:03:27 | * | sitaram joined #nim |
06:03:35 | * | sitaram quit (Changing host) |
06:03:35 | * | sitaram joined #nim |
06:04:14 | * | nimnoob123 joined #nim |
06:07:46 | * | reem joined #nim |
06:11:03 | * | sitaram quit (Ping timeout: 250 seconds) |
06:17:03 | dhasenan | How do I get nim to print out its linker command? |
06:17:55 | * | sitaram joined #nim |
06:18:58 | Varriount | dhasenan: Try --verbosity:2 |
06:20:43 | dhasenan | Varriount: thanks. |
06:24:22 | koz_desktop | Varriount: I'll have a look |
06:25:43 | koz_desktop | It gives this: graph.nim(27, 24) Error: type mismatch |
06:25:59 | koz_desktop | Where that line is the one I pasted. |
06:26:23 | * | sitaram quit (Ping timeout: 246 seconds) |
06:27:15 | koz_desktop | And for your version, it gives the error 'range is empty'. |
06:28:03 | Varriount | koz_desktop: Huh? |
06:28:23 | koz_desktop | I'll paste my whole progrma. |
06:28:28 | nimnoob123 | spent two days trying to figure out how to do this http://pastie.org/9967958, before my syntax was type x = ref object of RootObj and it would throw errors like: http://pastie.org/9967924, still a bit confused on the ref object syntax |
06:28:54 | koz_desktop | Varriount: http://dpaste.com/2072NBF |
06:29:31 | koz_desktop | The error is emitted from the line where I declare that range, and says 'Error: range is empty' |
06:30:01 | Varriount | koz_desktop: What version of the compiler are you using? |
06:30:08 | Varriount | I get 'test2.nim(13, 22) Error: invalid type: 'U32Positive' in this context: 'proc (U32Positive, float32): Matrix' |
06:30:08 | Varriount | proc make_line_graph* (n : U32Positive, k : float32) : Matrix =' |
06:30:59 | koz_desktop | Ummm... wtf? |
06:31:15 | koz_desktop | Version 0.10.2 |
06:33:27 | * | sitaram joined #nim |
06:33:29 | * | sitaram quit (Changing host) |
06:33:29 | * | sitaram joined #nim |
06:34:02 | fowl | nimnoob123, so that example failed when you use MyObj = ref object of RootObj ? |
06:34:08 | nimnoob123 | yep |
06:34:20 | * | saml_ quit (Quit: Leaving) |
06:34:26 | nimnoob123 | i got a compiler error from the c source |
06:34:37 | Varriount | koz_desktop: Ah. I'm using the development version. |
06:35:05 | nimnoob123 | I'm on windows |
06:36:07 | koz_desktop | Varriount: So what should I do? |
06:36:19 | koz_desktop | I mean, I guess I don't have to use the type system quite so heavily, but what I'm doing *should* work, right? |
06:36:54 | Varriount | nimnoob123: What version of Nim are you using? |
06:37:03 | nimnoob123 | 0.10.2 iirc |
06:37:19 | fowl | nimnoob123, i tried on HEAD it works |
06:37:24 | nimnoob123 | Nim Compiler Version 0.10.2 (2014-12-30) [Windows: i386] |
06:37:33 | Varriount | nimnoob123, koz_desktop: Both of your errors are due to bugs in the stable version. |
06:37:48 | nimnoob123 | should i use nightly? |
06:38:07 | Varriount | nimnoob123: Yes, if you want bugfixes. |
06:38:12 | fowl | Varriount, nim should adopt a policy of renaming stable to stale after a week |
06:38:14 | nimnoob123 | alright |
06:38:36 | koz_desktop | Varriount: I see. Oh well. |
06:38:54 | Varriount | koz_desktop: I'll look into *why* nim doesn't like your code. |
06:39:03 | * | MightyJoe quit (Ping timeout: 250 seconds) |
06:39:06 | Varriount | It's erroring, but at least its giving a slightly more sensible error. |
06:39:16 | koz_desktop | Thanks Varriount. |
06:41:33 | nimnoob123 | when's the next stable release expected to be released again? |
06:41:43 | * | MightyJoe joined #nim |
06:41:55 | Varriount | nimnoob123: I don't know. |
06:42:27 | Varriount | koz_desktop: Well, it seems as if disallowing the range is intentional. I wonder why |
06:42:46 | koz_desktop | I wonder as well - it's not *that* unusual surely? |
06:42:52 | * | sitaram quit (Ping timeout: 240 seconds) |
06:43:06 | * | sitaram joined #nim |
06:43:31 | Varriount | koz_desktop: It may be something to do with the type check. |
06:44:09 | Varriount | The specific procedure is 'typeAllowed', in compiler/types.nim |
06:44:12 | nimnoob123 | damn i wonder how many things i ran into that were just bugs, all I know is after messing with that snippet using ref's i've been left confused since then lol |
06:45:38 | koz_desktop | nimnoob123: This happens even with stable languages. I managed to find a very pernicious bug with D's standard library, all the while thinking I was insane. |
06:46:06 | nimnoob123 | hehe |
06:46:12 | fowl | i consider HEAD to be stable |
06:46:49 | fowl | there has probably been hundreds of commits since the last release |
06:47:39 | Varriount | nimnoob123, koz_desktop: I consider the 'stable' releases to be markers. |
06:48:08 | koz_desktop | Varriount: I just got whatever release is in my package manager. Given that I'm on an Arch variant, I expected it was fairly recent... guess not. :P |
06:48:15 | Varriount | It marks a point where the installers and such should be updated, and tells the world that yes, we're still alive. |
06:48:43 | * | sitaram quit (Ping timeout: 256 seconds) |
06:48:46 | Varriount | koz_desktop: Well, I think we release at the beginning of February? |
06:48:49 | Varriount | *January |
06:49:15 | Varriount | 10.0.2 is that latest stable. |
06:49:19 | fowl | it is as recent as possible for a non -git package, so |
06:49:28 | Varriount | Er, 0.10.2 |
06:49:32 | koz_desktop | I see. |
06:49:39 | koz_desktop | Well, that's OK - you guys have been *very* helpful! |
06:49:53 | * | reem quit (Remote host closed the connection) |
06:50:06 | Varriount | koz_desktop: Your error might be a flaw in that one procedure. I'm looking at it to see if I can decipher it. |
06:50:33 | fowl | koz_desktop, i recommend bootstrapping from somewhere in ~, you can symlink the binary into PATH, easy install and removal |
06:50:37 | nimnoob123 | think ill play around w/ rebuilding from github tomorrow/today (late here) when I'm a little more awake |
06:51:08 | Varriount | koz_desktop: What happens when the ordinals of the range are different types? |
06:51:20 | Varriount | Eg, uint8, int, etc |
06:52:05 | koz_desktop | I'll give it a go! |
06:52:56 | koz_desktop | Varriount: Type mismatch. |
06:54:09 | Varriount | koz_desktop: I forgot to mention, also modify your program so that it's correct again. |
06:54:26 | Varriount | koz_desktop: I'm trying out a fix, I'll see if it works. |
06:55:20 | * | reem joined #nim |
06:56:00 | Varriount | Can someone remind me what unsigned types are considered ordinals? |
07:00:53 | * | pregressive quit (Remote host closed the connection) |
07:02:25 | koz_desktop | I should make myself some Nim headers for my modules, lol. |
07:02:28 | * | pregressive joined #nim |
07:02:32 | koz_desktop | I guess that's why include is a thing. |
07:02:33 | * | reem quit (Remote host closed the connection) |
07:04:05 | Varriount | koz_desktop: Sorry for the wait, my laptop shutdown unexpectedly |
07:04:26 | koz_desktop | Varriount: That happens sometimes. |
07:05:52 | Varriount | koz_desktop: It worked! Or at least, it compiled... |
07:06:26 | * | reem joined #nim |
07:06:31 | koz_desktop | ? |
07:06:33 | koz_desktop | What did you do? |
07:07:06 | Varriount | koz_desktop: I added uint8, uint16, and uint32 to the set of types allowed in a range by typeAllowed |
07:07:28 | Varriount | It compiles. Whether it works or runs is another matter. |
07:07:37 | * | Outlander quit (Ping timeout: 264 seconds) |
07:07:48 | koz_desktop | Is there a reason why those types weren't allows in ranges? |
07:08:13 | Varriount | koz_desktop: Can you modify the code to test the range? Explicitly pass an int that is out of the range? |
07:08:39 | koz_desktop | I need to fetch the latest compiler, though, right? |
07:08:45 | Varriount | koz_desktop: Oversight? I don't know, there aren't too many comments in the compiler source code (which is something I've been trying to improve) |
07:08:58 | Varriount | koz_desktop: Well, I could run it for you. |
07:09:06 | koz_desktop | If you would, that'd be great. |
07:09:12 | koz_desktop | Do you need another link to the code in question? |
07:09:18 | Varriount | koz_desktop: But yes, you could build the latest compiler too, if it suits you (it's not all that hard) |
07:09:24 | Varriount | koz_desktop: Yes please. |
07:12:39 | * | pregressive quit (Remote host closed the connection) |
07:12:48 | koz_desktop | Varriount: http://dpaste.com/39TCVDN |
07:12:54 | * | pregressive joined #nim |
07:14:43 | * | reem quit (Remote host closed the connection) |
07:14:52 | Varriount | koz_desktop: Ok, it seems to work and run fine. |
07:15:22 | koz_desktop | Wheeeee. |
07:15:32 | koz_desktop | Extra power through type safety! |
07:16:01 | Varriount | koz_desktop: If you want, I can tell you what line to edit to fix the bug. |
07:16:37 | koz_desktop | Varriount: Have you already pushed the bugfix? |
07:16:45 | koz_desktop | If so, I'll just clone it and build myself. |
07:16:48 | * | reem joined #nim |
07:17:21 | * | kapil___ joined #nim |
07:18:12 | koz_desktop | Also, Varriount: Can you do some code review for me? I'm new to Nim, and I want to learn how I can write better. It's not a lot of code. |
07:30:26 | Varriount | koz_desktop: You still there? |
07:30:45 | koz_desktop | I am! |
07:33:58 | Varriount | koz_desktop: https://gist.github.com/Varriount/064333ad3ee3a996fe71 |
07:35:12 | koz_desktop | Ah, so doc comments go inside the proc they're documenting> |
07:35:14 | koz_desktop | ?* |
07:35:18 | Varriount | Yes |
07:35:23 | koz_desktop | OK, thanks! |
07:35:48 | Varriount | koz_desktop: I also made some stylistic changes, following https://github.com/Araq/Nim/wiki/Style-Guide-for-Nim-Code |
07:36:23 | koz_desktop | I'll have a read of the style guide. Thanks very much. |
07:37:29 | Varriount | koz_desktop: It's not mandatory (Well, except for not using T/P prefixes and tabs) |
07:38:37 | Varriount | There are ways to get around the tab limitation, but It's not recommended - It'll increase compilation time. |
07:38:50 | koz_desktop | It's better to stick to a style everyone recognizes. |
07:41:09 | Varriount | koz_desktop: Just remind me, are uint16's and uint8's considered ordinal types? |
07:43:13 | koz_desktop | According to the documentation, 'integer types' are considered ordinal. |
07:45:54 | * | koz_ joined #nim |
07:46:02 | Varriount | koz_desktop: I'll send out a pull request. Since this is a bugfix for the compiler, it'll have to wait until araq can review it, or otherwise gives the go-ahead |
07:46:27 | koz_ | Varriount: Thanks very much. You've been incredibly helpful! |
07:46:37 | Varriount | koz_: You're welcome. |
07:55:14 | * | pregressive quit (Remote host closed the connection) |
08:06:21 | * | brson quit (Quit: leaving) |
08:16:24 | * | sillesta joined #nim |
08:33:13 | * | Outlander joined #nim |
08:37:54 | * | nimnoob123 quit (Quit: Page closed) |
08:55:24 | * | wb quit (Ping timeout: 244 seconds) |
09:01:41 | * | kuzy000_ joined #nim |
09:02:14 | * | dumdum joined #nim |
09:07:46 | * | fizzbooze quit (Ping timeout: 255 seconds) |
09:12:27 | * | reem quit (Remote host closed the connection) |
09:18:29 | * | BlaXpirit joined #nim |
09:27:02 | * | d3m1gd joined #nim |
09:29:17 | * | reem joined #nim |
09:42:08 | BlaXpirit | I don't know how to make User defined type classes work with `var` |
09:43:35 | BlaXpirit | I have type RNG* = generic rng rng.randomUint64() is uint64 but it doesn't detect proc randomUint64*(self: var Type): uint64 |
09:45:14 | * | Matthias247 joined #nim |
09:46:35 | fowl | you mean var RNG? |
09:46:53 | fowl | oh |
09:47:18 | fowl | BlaXpirit, randomuint64(var rng) |
09:47:26 | BlaXpirit | fowl, doesn't seem to work either |
09:47:48 | BlaXpirit | type RNG* = generic RNG randomUint64(var RNG) is uint64 same thing |
09:49:08 | fowl | use lowercase generic rng and var rng |
09:50:00 | BlaXpirit | same thing |
09:50:11 | BlaXpirit | https://bpaste.net/show/6ef5955ccc92 |
09:53:33 | fowl | BlaXpirit, what is randomint() |
09:53:58 | fowl | when i remove it and only use randomuint64() it compiles |
09:54:06 | BlaXpirit | something that would be based, for example, on randomUint64 |
09:54:22 | BlaXpirit | of course when you remove it then the generic is taken out of the equation |
09:57:36 | fowl | huh ok |
10:00:15 | fowl | BlaXpirit, the problem is Xorshift128Plus is not validating for RNG, you check it like `ty is RNG` |
10:01:14 | fowl | i discovered the right place to put "var" by experimenting, now it compiles https://gist.github.com/fowlmouth/89e93d498104ebcafb2e |
10:01:32 | fowl | `generic var x` |
10:01:37 | BlaXpirit | ooh. thanks |
10:06:43 | * | sitaram joined #nim |
10:06:43 | * | sitaram quit (Changing host) |
10:06:43 | * | sitaram joined #nim |
10:23:58 | * | reem quit (Remote host closed the connection) |
10:51:08 | * | ob_ quit (Ping timeout: 244 seconds) |
10:56:06 | * | pregressive joined #nim |
10:57:19 | * | koz_ quit (Ping timeout: 245 seconds) |
11:00:21 | * | pregressive quit (Ping timeout: 250 seconds) |
11:07:24 | * | koz_ joined #nim |
11:16:07 | * | TEttinger quit (Ping timeout: 250 seconds) |
12:18:00 | * | Trustable joined #nim |
12:22:32 | * | Trustable quit (Remote host closed the connection) |
12:28:41 | * | Trustable joined #nim |
12:35:42 | * | koz_ quit (Ping timeout: 245 seconds) |
12:50:33 | * | wb joined #nim |
13:01:38 | * | d3m1gd quit (Quit: WeeChat 1.1.1) |
13:07:16 | * | renesac left #nim (#nim) |
13:10:37 | * | pafmaf joined #nim |
13:21:55 | * | darkf quit (Quit: Leaving) |
13:25:26 | * | reem joined #nim |
13:29:45 | * | reem quit (Ping timeout: 244 seconds) |
13:47:44 | * | ob_ joined #nim |
13:52:07 | * | ob_ quit (Ping timeout: 250 seconds) |
14:07:39 | * | chemist69 joined #nim |
14:09:21 | * | sitaram left #nim (#nim) |
14:11:17 | * | dumdum quit (Ping timeout: 256 seconds) |
14:18:05 | * | RayoGundead quit (Quit: Page closed) |
14:19:24 | * | saml_ joined #nim |
14:28:23 | * | BlaXpirit quit (Quit: Quit Konversation) |
14:34:57 | * | pafmaf_ joined #nim |
14:35:13 | * | pafmaf quit (Ping timeout: 264 seconds) |
14:35:30 | * | BlaXpirit joined #nim |
14:50:52 | * | BlaXpirit-UA joined #nim |
14:53:52 | * | BlaXpirit quit (Ping timeout: 240 seconds) |
15:30:43 | * | dyu joined #nim |
15:42:08 | * | dumdum joined #nim |
15:44:15 | * | akiradeveloper joined #nim |
15:46:46 | * | ob_ joined #nim |
15:48:21 | akiradeveloper | logging module hides handlers variable in devel... |
15:49:02 | dom96 | akiradeveloper: Yeah, you should use addHandler now. |
15:49:05 | akiradeveloper | please at least add addHandler() in master branch before go forward. build failure is painful |
15:49:16 | akiradeveloper | master branch doesn't have it |
15:50:14 | dom96 | You can check for the existance of the variable with 'when declared(handlers)' |
15:51:22 | akiradeveloper | I see |
16:07:59 | * | pregressive joined #nim |
16:08:14 | * | pregressive quit (Remote host closed the connection) |
16:17:57 | * | gsingh93 joined #nim |
16:20:11 | * | pregressive joined #nim |
16:24:49 | * | nande joined #nim |
16:29:49 | * | gsingh93 quit (Ping timeout: 264 seconds) |
16:45:35 | ekarlso | dom96: is tehre a way atm to tell nimble which directory to use ? |
16:45:57 | dom96 | directory for what? |
16:46:04 | ekarlso | install packages |
16:47:14 | * | perturbation joined #nim |
16:47:17 | * | Matthias247 quit (Ping timeout: 246 seconds) |
16:50:47 | * | kernasi joined #nim |
16:50:49 | kernasi | hi |
16:51:37 | dom96 | ekarlso: You can change it in Nimble's config. |
16:52:00 | dom96 | https://github.com/nim-lang/nimble#configuration |
16:57:37 | * | pregress_ joined #nim |
17:00:29 | * | pregressive quit (Ping timeout: 252 seconds) |
17:06:30 | * | BitPuffin joined #nim |
17:12:50 | * | pregressive joined #nim |
17:13:14 | * | akiradeveloper quit () |
17:16:02 | * | pregress_ quit (Ping timeout: 252 seconds) |
17:20:49 | * | Boscop_ quit (Ping timeout: 250 seconds) |
17:21:52 | * | [CBR]Unspoken quit (Ping timeout: 240 seconds) |
17:26:52 | * | [CBR]Unspoken joined #nim |
17:28:36 | * | kernasi__ joined #nim |
17:31:55 | * | davidhq joined #nim |
17:32:31 | * | kernasi quit (Ping timeout: 250 seconds) |
17:38:28 | * | pregressive quit (Remote host closed the connection) |
17:39:18 | * | kernasi__ quit (Ping timeout: 244 seconds) |
17:40:08 | * | Boscop joined #nim |
17:41:50 | * | kernasi joined #nim |
17:43:57 | * | pregressive joined #nim |
17:46:23 | * | Boscop quit (Ping timeout: 265 seconds) |
17:54:09 | * | quasinoxen joined #nim |
18:01:38 | * | Cykacykacyka joined #nim |
18:02:22 | Cykacykacyka | hello, is there a nice tutorial on asynchttpserv ? I am at a loss, I can't even understand where do I manage the posted data, where do I check the requested url. |
18:03:40 | dom96 | Cykacykacyka: No tutorials as far as I know. All of what you need is stored inside this object: http://nim-lang.org/asynchttpserver.html#Request |
18:04:22 | dom96 | You most likely want to use Jester though: https://github.com/dom96/jester |
18:04:45 | Cykacykacyka | will look into that |
18:05:19 | Cykacykacyka | yes, seems like it would suit my usecase the most. Considering this is a hackathon and i've got ~18 hours to go |
18:06:13 | dom96 | Cykacykacyka: oh cool. What hackathon is this? |
18:07:12 | * | pregressive quit (Remote host closed the connection) |
18:10:19 | * | UberLambda joined #nim |
18:10:26 | kernasi | secret hackathon |
18:11:54 | Cykacykacyka | dom96, stacshack |
18:12:19 | Cykacykacyka | hmm, Jester seems really http oriented, I'm mostly going to use this server to push json back and forth |
18:12:35 | kernasi | so? |
18:13:02 | Cykacykacyka | so I must just respond with a jsonified string ? ok. |
18:13:28 | kernasi | http isn't really picky about what you send and receiver :) |
18:13:32 | Cykacykacyka | being the inexperienced person I am, I would have to do all my DB stuff in a different thread ? |
18:13:32 | dom96 | Cykacykacyka: Why were you looking at asynchttpserver in the first place then? |
18:13:33 | kernasi | -r |
18:14:04 | Cykacykacyka | dom96, it's asynchronous, it's http, didn't really think I'd need much more than that. |
18:14:18 | dom96 | nah, just let it block, it shouldn't affect performance that much if the db is local. |
18:14:32 | Cykacykacyka | ok then |
18:15:02 | flaviu | And it's a hackathon. |
18:15:09 | Cykacykacyka | I'm guessing the mongodb library isn't well documented is it ? |
18:15:45 | flaviu | So your last worries are performance and clean code. Do whatever takes you the least time to implemnt |
18:16:30 | kernasi | time for a schnaps |
18:16:51 | Cykacykacyka | well, hopefully you here are patient, as I intend to use this hackathon exclusively to do things I've never done before, e.g. nim, web and mongo |
18:17:19 | kernasi | probably the best channel you can find for nim |
18:17:45 | Cykacykacyka | I'd believe so. |
18:18:02 | kernasi | and now with schnaps in the blood... |
18:18:05 | kernasi | :) |
18:29:34 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
18:29:49 | * | panzone joined #nim |
18:31:05 | * | hasenj joined #nim |
18:41:08 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
18:43:32 | gokr | dom96: Sidenote - the HyperDex db client C library is designed asynchronously. |
18:43:44 | gokr | The one I played with in my "Wrapping C" article. |
18:50:44 | Cykacykacyka | gokr, I've rarely understood how a basic sql/nosql database would handle concurrency. This of course is me being stupid, but wouldn't checking for race conditions/conflicts be too big of a perf penalty to allow concurrency ? |
18:56:40 | gokr | Ehm, there are plenty of techniques. But the reason for me mentioning the HyperDex db as an interesting option for Dominik is that it has a fully asynchronous client C library. None of the calls into it are blocking. |
18:56:42 | * | fizzbooze joined #nim |
18:58:22 | perturbation | Most of the time (e.g. with node.js) you get away with this by being concurrent, but not parallel... as gokr says, it's not blocking, so the main event loop can continue to listen/respond to requests while you wait on the DB to respond with JSON/XML/whatever |
18:59:04 | perturbation | but (with node.js, not sure how asynchttpserver works), it's only ever doing one thing at a time, so there aren't race conditions |
19:00:01 | perturbation | </parallelism vs concurrency rant> |
19:00:24 | gokr | Basically every request to the HyperDex db - gives you back a receipt immediately. Then when you get responses back you need to match it to the right request via the receipt. |
19:09:37 | Cykacykacyka | gokr, so, the requests can be 'concurrent/paralell', but they are dealt with one at a time ? |
19:13:24 | * | dyu quit (Quit: Leaving) |
19:20:57 | Cykacykacyka | hmm, why does jester say bad gateway when I post to "/stuff" if I've defined post "/stuff" |
19:25:13 | * | panzone quit (Ping timeout: 256 seconds) |
19:25:19 | * | panzone joined #nim |
19:27:14 | dom96 | Cykacykacyka: Does your route use 'resp' to respond to the request? |
19:28:44 | Cykacykacyka | yes |
19:29:09 | Cykacykacyka | maybe it never gets to respond, because I'm trying to parse json from the request body ? |
19:31:49 | Cykacykacyka | yes, I am failing to var push = parseJson(@"payload") |
19:32:49 | * | panzone quit (Ping timeout: 255 seconds) |
19:33:09 | dom96 | perhaps |
19:33:30 | dom96 | does it give you a stack trace in the response? |
19:33:41 | Cykacykacyka | yes, that was exactly that, the client wasn't sending any valid json at all |
19:33:42 | * | panzone joined #nim |
19:34:09 | Cykacykacyka | or actually anything, due to No 'Access-Control-Allow-Origin' header |
19:35:37 | * | perturbation quit (Ping timeout: 265 seconds) |
19:35:46 | * | alexruf joined #nim |
19:35:56 | * | UberLambda quit (Quit: Leaving the Matrix) |
19:35:56 | * | koz_ joined #nim |
19:37:40 | Varriount | Meep |
19:39:07 | Varriount | Cykacykacyka: When's the hackathon? |
19:51:30 | ekarlso | does nim support something like compile upon file change ? |
19:51:43 | * | reem joined #nim |
19:51:48 | Varriount | ekarlso: Do you mean hotswapping code? |
19:52:10 | Varriount | ekarlso: Or just detecting when a file changes and recompiling? |
19:52:11 | ekarlso | Varriount: like nim c --reload |
19:52:13 | ekarlso | or smth |
19:52:16 | ekarlso | the last :) |
19:52:54 | Varriount | ekarlso: No, not at the moment, although I'm willing to bet that there are external tools that will run a command when a set of files has been altered. |
19:53:08 | ekarlso | Varriount: like ? |
19:53:13 | kernasi | on linux inotify |
19:53:40 | kernasi | or just a small script that runs forever :) |
19:53:44 | ekarlso | :P |
19:55:42 | kernasi | or tell your editor to execute a makefile or script on save |
19:56:03 | ekarlso | hmmm |
19:56:07 | ekarlso | isn'nt there caas ? |
19:57:49 | kernasi | caas? :) |
19:57:54 | kernasi | c as a service? |
19:58:08 | ekarlso | compiler as a service |
19:58:19 | kernasi | oh |
19:58:32 | ekarlso | is there any docs on that Varriount ? |
20:01:26 | Varriount | ekarlso: There are, but I don't recall any compilation-on-save feature. |
20:01:42 | Varriount | ekarlso: Again, that's usually something an editor or external tool does. |
20:02:13 | Varriount | 'Watching' files for changes is a nontrivial task. |
20:05:27 | * | dumdum quit (Ping timeout: 256 seconds) |
20:07:21 | * | Gonzih joined #nim |
20:07:28 | Varriount | ekarlso: What OS are you using? |
20:08:23 | ekarlso | Varriount: linux |
20:09:14 | Varriount | ekarlso: http://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes |
20:09:36 | kernasi | oh, inotify again |
20:09:42 | kernasi | listen to me, ekarlso :) |
20:11:32 | onionhammer | varriount i was talking about a quick way to switch backend compiler |
20:11:38 | onionhammer | in nimlime |
20:11:44 | ekarlso | someone should seriously add CI ... |
20:11:46 | ekarlso | lib/windows/winlean.nim(76, 19) Error: undeclared identifier: 'TUtf16Char' |
20:11:49 | ekarlso | devel is borked |
20:13:23 | * | panzone quit (Ping timeout: 256 seconds) |
20:13:27 | Varriount | ekarlso: Just pushed a fix for that. |
20:13:44 | ekarlso | :p |
20:13:59 | * | panzone joined #nim |
20:14:01 | Varriount | ekarlso: We have CI |
20:14:18 | ekarlso | Varriount: then why is stuff like this getting merged ? :P |
20:14:29 | ekarlso | not first time i've seen it :/ |
20:14:49 | Varriount | ekarlso: Because the CI runs *after* commits have been made, and I can't help it when people push directly to the repo. |
20:14:50 | Varriount | http://buildbot.nim-lang.org/waterfall |
20:15:08 | Varriount | ekarlso: We don't have fancy Travis CI support that will test PR's for us. |
20:15:09 | ekarlso | sounds like you should start using something like gerrit or so instead :P |
20:15:31 | ekarlso | Varriount: checked out http://gerrithub.io? |
20:17:10 | * | pipeep quit (Ping timeout: 252 seconds) |
20:17:17 | Varriount | ekarlso: Does the new commit fix things? |
20:18:08 | ekarlso | Varriount: seems so : ) |
20:18:41 | Varriount | ekarlso: Could you test something for me? Try compiling a non-empty nim file with the C++ backend. |
20:18:56 | * | pipeep joined #nim |
20:19:08 | ekarlso | uh, gimme a few |
20:21:10 | ekarlso | Varriount: trying to get play working :) |
20:24:42 | * | BlaXpirit-UA quit (Remote host closed the connection) |
20:25:39 | ekarlso | any of you good at c ? |
20:25:58 | koz_ | ekarlso: I'm not bad. |
20:26:20 | ekarlso | looking for someone that could look at playpen and add user_ns support |
20:26:24 | * | BlaXpirit joined #nim |
20:26:50 | koz_ | ekarlso: Well, I'm not really sure I'd be the right person for that particular job. |
20:27:13 | ekarlso | ;P |
20:28:14 | * | jholland joined #nim |
20:29:17 | * | reem quit (Remote host closed the connection) |
20:30:06 | * | reem joined #nim |
20:30:21 | * | saml_ quit (Ping timeout: 250 seconds) |
20:40:05 | * | alexruf quit (Quit: Textual IRC Client: www.textualapp.com) |
20:41:05 | * | kernasi quit (Ping timeout: 246 seconds) |
20:41:46 | * | bjz joined #nim |
20:44:21 | * | brson joined #nim |
20:50:38 | Cykacykacyka | Varriount, it's now. |
20:51:55 | * | gokr_ joined #nim |
21:01:17 | ekarlso | Cykacykacyka: what hackathon ? |
21:01:55 | Cykacykacyka | stacshack, basically a shameless atempt by major companies to employ good students whilst offering free food |
21:02:26 | Cykacykacyka | which I am exploiting by not being a good student and eating as much as I can. |
21:10:02 | * | pregress_ joined #nim |
21:11:03 | flaviu | haha |
21:14:23 | * | pregress_ quit (Client Quit) |
21:23:32 | Varriount | Cykacykacyka: Oh good. I was going to say "I hope that it's during a time when this channel is active" |
21:26:40 | * | ob_ quit (Ping timeout: 255 seconds) |
21:43:17 | * | dumdum joined #nim |
21:50:30 | * | hasenj quit (Quit: hasenj) |
21:51:09 | * | reem quit (Remote host closed the connection) |
21:53:24 | * | gokr_ quit (Quit: IRC for Sailfish 0.9) |
21:57:49 | * | reem joined #nim |
21:59:00 | * | hasenj joined #nim |
21:59:02 | * | hasenj quit (Client Quit) |
22:01:35 | Varriount | Araq: C++ compilation is broken. I'm almost done finding the breaking commit. |
22:03:40 | Varriount | Araq: It's commit 45a2c1b1d1f18aedeb363b9ef41f9f73b028b581 |
22:06:59 | * | reem quit (Remote host closed the connection) |
22:15:28 | * | shodan45 joined #nim |
22:19:32 | Varriount | Araq: Or this url: https://github.com/Araq/Nim/commit/45a2c1b1d1f18aedeb363b9ef41f9f73b028b581 |
22:25:02 | Varriount | In fact, I don't quite understand a lot of what's in there... |
22:30:17 | * | johnsoft quit (Ping timeout: 245 seconds) |
22:30:34 | * | johnsoft joined #nim |
22:31:49 | Cykacykacyka | hmm, is there a way I can spawn a 'thread' every some seconds ? Or would it be best to just run a while loop that would sleep for 30 seconds and repeat ? Also, it would be relatively safe to block on sqlite operations, right ? |
22:35:53 | * | Cykacykacyka quit (Remote host closed the connection) |
22:36:07 | * | emils_ joined #nim |
22:36:19 | * | emils_ is now known as Cykacykacyka |
22:40:02 | * | reem joined #nim |
22:43:43 | Varriount | Cykacykacyka: What are you aiming to do? |
22:44:23 | Varriount | Cykacykacyka: http://nim-lang.org/threads.html |
22:44:54 | * | filwit joined #nim |
22:49:43 | * | panzone quit (Remote host closed the connection) |
22:50:45 | * | brson quit (Quit: leaving) |
22:50:46 | * | ob_ joined #nim |
22:53:19 | dom96 | Cykacykacyka: Just a warning: there is currently a bug which prevents mixing of threads and async await. |
22:54:47 | * | shodan45 quit (Quit: Konversation terminated!) |
23:03:04 | * | reem quit (Remote host closed the connection) |
23:03:21 | * | brson joined #nim |
23:07:21 | * | dumdum quit (Ping timeout: 256 seconds) |
23:07:34 | * | reem joined #nim |
23:08:53 | Cykacykacyka | Varriount, I have to check ever so often whether an user is late or not. Of course, I may as well just do that every time the client checks back. |
23:09:11 | Cykacykacyka | dom96, I'm guessing I won't be using threads then/ |
23:09:49 | dom96 | Cykacykacyka: You can do that using async |
23:10:37 | Cykacykacyka | also, what am I doing wrong here ? I do a let init_sql = open('path/to/text.sql').readAll() and then exec(db, sql(init_sql), []) complains that sql has been passed a file, not a string |
23:10:52 | Cykacykacyka | well, we have to get to actual interaction with clients :) |
23:11:07 | filwit | dom96: hey i started porting my NimKate colors to Aporia. Was going to give you PR tonight but looks like I need to take off now. Just wanted to ask one thing first though: I'm going to port the colors from the website (the ones on the banner) to Aporia as well.. any idea on what we call it (since those weren't copied from any existing color schema)? :) |
23:11:47 | dom96 | Cykacykacyka: You should use readFile instead. |
23:12:15 | dom96 | filwit: No idea. I'm bad at names :P |
23:12:49 | * | reem quit (Remote host closed the connection) |
23:13:01 | Cykacykacyka | dom96, yes, just found out that method. How do you deal with namespaces ? |
23:13:17 | Cykacykacyka | if I want to use open in the same file for both opening a database and a file ? |
23:13:31 | filwit | hmm... well i want to name is something cool (cause it's like the main Nim colors new people will see.. and I was even hoping to make it Aporia's default scheme, if that was cool with you) |
23:13:57 | dom96 | filwit: I wanna keep my theme default. |
23:14:07 | filwit | dom96: okay |
23:14:17 | Varriount | Cykacykacyka: You can reference the module name |
23:14:21 | dom96 | Cykacykacyka: Use the module names. |
23:14:28 | filwit | dom96: i guess i'll just name it like 'nimsite' or something... that just sounded a bit bland |
23:14:33 | BlaXpirit | can I use gcc builtins in nim? |
23:14:51 | filwit | dom96: anyways, just thought I'd see if you had any good ideas on what to call it. Later. |
23:15:26 | * | kuzy000_ quit (Ping timeout: 264 seconds) |
23:15:52 | Cykacykacyka | ok, how then I create a connection to my sqlite 'file' ? |
23:15:52 | * | filwit quit (Quit: Leaving) |
23:17:32 | * | wb_ joined #nim |
23:17:48 | dom96 | http://nim-lang.org/db_sqlite.html#open,string,string,string,string |
23:18:22 | ekarlso | what stuff again to use for calling external cmd ? |
23:18:56 | Cykacykacyka | man, I should've imported db_sqlite a long time ago, from where did I even get an idea to use import sqlite3... |
23:19:02 | * | mal`` quit (Ping timeout: 252 seconds) |
23:20:14 | dom96 | ekarlso: osproc |
23:20:29 | * | wb quit (Ping timeout: 250 seconds) |
23:21:38 | * | mal`` joined #nim |
23:23:30 | Cykacykacyka | what's the fastest way to define a new module? |
23:25:41 | * | sillesta quit (Ping timeout: 265 seconds) |
23:25:52 | BlaXpirit | self-answer: trivially: proc clz(n: culong): cint {.importc: "__builtin_clzl".} |
23:28:34 | BlaXpirit | the real question is how to use it and provide a fallback if it is absent |
23:29:44 | * | sillesta joined #nim |
23:33:41 | dom96 | Cykacykacyka: create a new file |
23:34:33 | * | miko_ joined #nim |
23:35:03 | * | reem joined #nim |
23:36:47 | miko_ | I have a question with regard to the design of he syntax. Why does nim (like python) have a ":" before every most indentation? (i.e. after control structures?) They seem superfluous. |
23:38:25 | BlaXpirit | miko_, http://forum.nim-lang.org/t/676 |
23:39:43 | miko_ | So I'm not the only one wondering, and it has a reason. |
23:39:45 | miko_ | Thanks |
23:41:32 | flaviu | BlaXpirit: https://en.wikipedia.org/wiki/Find_first_set |
23:43:26 | fowl | lol some people think coffeescript is readable |
23:43:42 | BlaXpirit | well it is |
23:44:53 | fowl | see |
23:45:18 | fowl | its not really comparable to nim |
23:45:51 | fowl | syntax doesnt contain as much information (types) |
23:46:26 | * | banister joined #nim |
23:46:39 | * | banister quit (Max SendQ exceeded) |
23:48:01 | * | banister joined #nim |
23:48:12 | * | banister quit (Max SendQ exceeded) |
23:48:20 | * | pafmaf_ quit (Quit: Verlassend) |
23:50:50 | * | BitPuffin quit (Ping timeout: 246 seconds) |
23:51:47 | * | reem quit (Remote host closed the connection) |
23:52:32 | * | reem joined #nim |
23:54:36 | * | banister joined #nim |
23:56:57 | * | reem quit (Ping timeout: 245 seconds) |