00:00:44 | zanget | Araq: thank you. seems like a nice channel |
00:00:56 | Dirkson | "Error: tabulators are not allowed" - What? Is it telling me that I can't use tabs for indentation? |
00:01:14 | zanget | oh should have read the last bit before hilighting him |
00:02:48 | fowl | Dirkson, yes |
00:02:58 | Dirkson | fowl: How do I fix that behavior. |
00:03:03 | fowl | use spaces |
00:03:06 | Dirkson | No. |
00:06:57 | * | Dirkson begins to suspect he's wasted a day. |
00:08:25 | Dirkson | Araq: Can I get a confirmation that I cannot use tabulators to supply indentation? |
00:12:32 | * | wlhlm quit (Ping timeout: 259 seconds) |
00:14:58 | MFlamer | no, you have to use spaces. But text editors conver tabs to spaces so I never even think about it |
00:15:49 | * | MFlamer quit (Remote host closed the connection) |
00:29:11 | Dirkson | The idea of making an indent-dependent language, then disallowing the use of the indent character just blows my mind. Why would you even? There's no downsides to using tabs..... |
00:34:31 | profmakx | except that there is |
00:35:29 | Dirkson | What is it?? |
00:40:04 | Dirkson | profmakx: Maybe additional complexity of tab-completion, if your dev environment does tab-completion? |
00:40:30 | Dirkson | But that's just dealing with the physical key, not the actual tabs-as-printed. More of an editor problem. |
00:52:54 | * | Dirkson tries to make vim deal with spaces like it does with tabs, "Nope. Can't do it. I can get tab and backspace to mostly work ok using spaces instead of tabs, but I can't make arrow keys or delete function properly." |
01:10:49 | * | q66 quit (Quit: Leaving) |
01:24:33 | * | Associat0r quit (Quit: Associat0r) |
01:35:51 | * | DAddYE quit (Ping timeout: 272 seconds) |
01:58:33 | * | Associat0r joined #nimrod |
01:58:33 | * | Associat0r quit (Changing host) |
01:58:33 | * | Associat0r joined #nimrod |
01:59:57 | * | DAddYE joined #nimrod |
02:13:06 | * | fowl quit (Quit: Leaving) |
02:34:03 | * | Associ8or joined #nimrod |
02:35:50 | * | Associat0r quit (Ping timeout: 245 seconds) |
02:42:07 | * | Associ8or quit (Quit: Associ8or) |
02:43:53 | * | DAddYE quit (Remote host closed the connection) |
02:52:53 | * | DAddYE joined #nimrod |
03:02:17 | * | BitPuffin quit (Read error: Connection reset by peer) |
03:04:06 | * | BitPuffin joined #nimrod |
03:11:46 | * | xenagi joined #nimrod |
03:17:37 | Dirkson | Despite trying for some time, I have yet to find anything else I like nearly so much as nimrod, which is frustrating. Rust's focus on concurrency is cool... But Damn that language is ugly. Ugly Ugly Ugly. And I'm coming from C, its intended audience. |
03:19:06 | xenagi | i agree about the elegance |
03:19:17 | xenagi | or lack thereof |
03:19:44 | * | gdos joined #nimrod |
03:19:47 | BitPuffin | wouldn't really say that there isn't any focus on concurrency in nimrod either though |
03:20:03 | Dirkson | BitPuffin: Really? Well, that's good. |
03:20:05 | xenagi | in terms of Rust vs Go, I side myself with Go (aside from Nimrod, ofc) |
03:20:10 | Dirkson | It's just the damn tab thing, then. |
03:20:31 | BitPuffin | tab? |
03:20:31 | BitPuffin | you mean indentation? |
03:20:34 | Dirkson | Yes. |
03:20:43 | xenagi | Nimrod has 0 tabs |
03:20:45 | BitPuffin | what about it? |
03:20:57 | Dirkson | Space indentation drives me insane, and I cannot adjust my editor enough to fake it effectively enough to be functional. |
03:21:09 | BitPuffin | use a better editor :p |
03:21:12 | Dirkson | vim. |
03:21:19 | BitPuffin | I use vim |
03:21:20 | xenagi | just use 4 spaces |
03:21:34 | xenagi | I likes braces too, but 4 spaces is enough to make it out |
03:21:36 | BitPuffin | it's super easy to indent and de-indent |
03:21:44 | BitPuffin | ctrl+d to de indent |
03:22:03 | Dirkson | I can tell vim to input 4 spaces instead of tab when I press tab, and that also overloads the backspace key, but it doesn't overload the arrow keys, which is a problem for actually getting around the resultant code. |
03:22:17 | xenagi | huh I've been doing >> to indent and << to de-indent |
03:22:19 | BitPuffin | set tabstop=2 shiftwidth=2 |
03:22:27 | BitPuffin | set expandtab |
03:22:28 | BitPuffin | done |
03:22:36 | Dirkson | BitPuffin: Doesn't affect the arrow keys. |
03:22:38 | xenagi | well, if you're using arrow keys in vim, you've got another problem lol |
03:22:58 | BitPuffin | xenagi: well in edit mode you do tab and ctrl+d |
03:23:09 | BitPuffin | I mean |
03:23:12 | BitPuffin | insert mode |
03:23:30 | xenagi | ah |
03:23:36 | xenagi | ive always just done it from control mode |
03:23:40 | xenagi | command mode* |
03:23:54 | BitPuffin | ah |
03:24:01 | BitPuffin | well it's good to do both |
03:24:09 | Dirkson | My current best plan is either to ditch nimrod, or write some sort of insane wrapper around nimrod's binary to convert any file it touches to/from the stupid space-only format. |
03:24:28 | xenagi | but i've mapped ESC to be ^C for the ease of swithing back/forth to command mode easily |
03:24:45 | BitPuffin | Dirkson: I don't see why doing the space thing is a problem |
03:24:54 | xenagi | try Python Dirkson ;) |
03:25:09 | BitPuffin | space based indentation is better anyways |
03:25:15 | BitPuffin | as it will format the same everywhere |
03:25:31 | BitPuffin | remember when you spent time making your comments look pleasing? |
03:25:35 | Dirkson | BitPuffin: *considers* I fear I'd screw it up. It also doesn't help adoption of the language, which I actually like - I am not the only guy who prefers tabs to spaces. I believe we're actually the majority. |
03:25:42 | BitPuffin | Well if you used tabs chances are they look like balls on github |
03:26:07 | BitPuffin | Dirkson: it's because default is kind |
03:26:15 | Dirkson | xenagi: I actually love python. But it's as speedy as my girlfriend's pet. Which is a snail. |
03:26:16 | BitPuffin | Dirkson: Nothing to screw up, just do it! |
03:26:32 | BitPuffin | Dirkson: that's where nimrod comes in |
03:27:43 | xenagi | if you love python, i'm not understanding how the spacing in Nimrod bothers you |
03:27:47 | Dirkson | BitPuffin: I'd rather see something /in/ the language. There's no reason tabs can't be used instead of spaces in any particular file. That way I know the language isn't hobbled by its own bizare choices. |
03:28:00 | xenagi | that's like saying you love Parmesan but hate cheese :/ |
03:28:24 | BitPuffin | pythonistas (?) prefer spaces too |
03:28:31 | xenagi | ^ |
03:28:40 | Dirkson | xenagi: I believe I can use tabs in python? O.o To be fair, I haven't used python in a while - It's my favorite language, but I almost never run into a problem that can't be solved better by bash or a faster programming language. |
03:28:42 | xenagi | because it's too easy to confuse spaces for tabs...cuz they're invisible |
03:29:01 | xenagi | and you really see the f-ups when you move the file to/from windows and the shit is out of indentation |
03:29:13 | Dirkson | xenagi: And, to be clear, I love the concept of indentation-is-control. That's a great concept. |
03:29:30 | BitPuffin | anyways, any self respecting programmer should be able to switch between tabs and spaces. But you are right, it does hurt adoption a bit. And should be an option |
03:30:00 | xenagi | I actually dislike Python |
03:30:12 | Dirkson | BitPuffin: It seems like it should be a relatively easy option, too - First indented line. Does it use tabs or spaces? If tabs, use tabs for the file. If spaces, use spaces. |
03:30:13 | xenagi | Python is great...if you use the REPL |
03:30:40 | BitPuffin | xenagi: that's what lisp is for though |
03:30:41 | xenagi | but, imo, Nimrod is what Python should have been. Or, maybe I just prefer static, compiled languages that produce binaries |
03:31:21 | xenagi | i've been bit one too many times on the ass with python's dependency hell |
03:31:30 | BitPuffin | Dirkson: yeah, but anyways I told you how to do it in vim, if you want to you can look up how to do it for only nimrod, it isn't hard, just that I do that indentation in pretty much every language |
03:32:08 | Dirkson | Hehehe. Whenever I approach python as a user, I run into that too, Xenagi. |
03:32:18 | BitPuffin | I think nimrod should perhaps have "stronger" types |
03:32:31 | BitPuffin | like without implicit casts etc |
03:32:57 | xenagi | where does it implicitly cast? |
03:33:08 | BitPuffin | xenagi: when mixing different datatypes? |
03:33:21 | BitPuffin | xenagi: Say a float and an int, or an int32 and an int64 |
03:33:24 | Dirkson | BitPuffin: Does your vim solution fix the arrow keys too? In insert mode, I absolutely depend on tabs being tab-width - press left once, and I'm less nested. Press right once, I'm more nested. |
03:33:36 | Dirkson | BitPuffin: (Suddenly an XKCD springs to mind) |
03:33:48 | Dirkson | http://xkcd.com/1172/ |
03:33:50 | BitPuffin | Dirkson: you should probably stop using arrow keys |
03:34:00 | BitPuffin | Dirkson: But no, but it should be simple to set up |
03:34:03 | xenagi | adding an int64 and a int32 should not be done without error or at least warning. are you saying that it does go unnoticed? |
03:34:26 | BitPuffin | xenagi: it does |
03:34:38 | BitPuffin | xenagi: I think you should be forced to be explicit about the cast |
03:34:49 | xenagi | agreed |
03:35:00 | BitPuffin | haha |
03:35:05 | BitPuffin | nice xkcd |
03:35:23 | BitPuffin | and I think it should use type inference a bit more |
03:35:55 | Dirkson | Aye. I realize my arrow key usage in vim is a little like that - There are certainly better ways to get around in vim than I use. |
03:35:55 | BitPuffin | like why have proc [T](a, b): T = a + b |
03:36:06 | BitPuffin | when you can have proc(a, b) = a + b |
03:36:13 | BitPuffin | um |
03:36:24 | BitPuffin | proc [t](a, b: T]: T = a + b ** |
03:36:51 | BitPuffin | Dirkson: just stop, you'll get used to it in no time |
03:37:45 | Dirkson | BitPuffin: I honestly don't know how I'd get around in vim without them.... Sometimes I switch lines using line numbers, but mostly if I'm going +5 lines or something, I just press downarrow 5 times. |
03:39:10 | xenagi | or... 5j |
03:45:20 | Dirkson | BitPuffin: Asked in #vim how to fix the arrow keys. Maybe that'll help : ) ... Although the first guy to answer answered the non-question portion of my question, rather than the question portion. Maybe I need to write most clearly. |
03:47:31 | * | DAddYE quit (Remote host closed the connection) |
03:51:54 | * | OrionPK quit (Quit: Leaving) |
03:59:45 | * | DAddYE joined #nimrod |
04:02:09 | * | DAddYE quit (Remote host closed the connection) |
04:05:29 | * | MFlamer joined #nimrod |
04:09:53 | * | MFlamer quit (Client Quit) |
04:30:12 | * | xenagi quit (Quit: Leaving) |
04:30:33 | * | brson quit (Ping timeout: 272 seconds) |
04:38:50 | BitPuffin | Dirkson: you get around with hjkl instead of arrows |
04:44:45 | Dirkson | *laughs* Well, that doesn't solve the whole "spaces aren't tabs for navigation" problem. |
05:03:19 | * | DAddYE joined #nimrod |
05:07:28 | * | DAddYE quit (Ping timeout: 240 seconds) |
05:08:42 | * | DAddYE joined #nimrod |
05:13:12 | * | Varriount loves reading logs |
05:14:23 | BitPuffin | Dirkson: no but it solves the arrow key problem |
05:20:50 | Varriount | Dirkson, I see your problem. |
05:20:58 | Varriount | It's vim |
05:21:02 | Varriount | :P |
05:22:51 | Varriount | Seriously though, you could probably either A - Write a script that replaces all indents in a file with spaces, saves the file, compiles it with nimrod, and then converts the spaces back to tabs |
05:23:10 | * | DAddYE quit (Remote host closed the connection) |
05:23:28 | Varriount | or B - Modify the nimrod compiler to use tabs as delimiters |
05:23:38 | * | DAddYE joined #nimrod |
05:23:45 | Varriount | or C - Use a different editor (sublime text anyone?) |
05:24:16 | BitPuffin | Varriount: meh sublime text |
05:24:37 | Varriount | Ok, Aporia |
05:26:22 | BitPuffin | no, vim :P |
05:26:47 | Varriount | By the way, the reason python still allows tabs to be used, instead of forcing spaces, is strictly backwards compatibility. Even then, if you somehow manage to mix up spaces and tabs in a single file, python will randomly pick either only indent delimited lines, or space delimited lines, when parsing the file |
05:27:03 | Varriount | Which has led to several weird bugs in the past. |
05:27:44 | Varriount | BitPuffin, vim scares small children, and eats babies. |
05:27:59 | Varriount | Do you really want to use an editor that scares children? |
05:28:04 | BitPuffin | yes? |
05:28:17 | Varriount | -_- |
05:28:33 | * | DAddYE quit (Ping timeout: 272 seconds) |
05:28:57 | * | Varriount slaps BitPuffin with a salmon |
05:33:07 | Varriount | Araq, changed my documentation pull request to meet with your request. |
05:34:27 | Dirkson | Today I stepped on a bee. |
05:34:30 | * | Varriount is now known as BytePuffin |
05:34:32 | Dirkson | Don't step on bees. |
05:34:54 | BytePuffin | Dirkson, I swatted a Bee onto my neck once. I thought it was a fly. |
05:35:01 | Dirkson | Ouch |
05:35:20 | * | BytePuffin waves at BitPuffin |
05:35:42 | BitPuffin | BytePuffin: So you are a fat version of me? |
05:36:02 | BitPuffin | you do take up 8 times as much space |
05:36:13 | BytePuffin | I prefer to think of myself as 8 times taller than you. |
05:37:15 | * | Dirkson is now known as NibblePuffin |
05:37:21 | BytePuffin | XD |
05:37:49 | BytePuffin | It's one in the morning, I'm in bed, and, right now, I'm really glad I |
05:38:00 | BytePuffin | I'm the only one who sleeps in the basement |
05:38:10 | * | NibblePuffin used to live in a basement ^^ |
05:38:24 | * | NibblePuffin is not used to being NibblePuffin yet. |
05:39:53 | BytePuffin | Oddly enough, the only context in which I've heard "nibble" used is in networking |
05:40:17 | NibblePuffin | I've never actually heard it used, except pedantically. I.e. "Did you know nibble exists?" |
05:41:03 | BytePuffin | Mostly, I heard it when helping someone (who was much more experienced than me) develop a custom beta minecraft server in python. |
05:41:15 | BytePuffin | *minecraft beta |
05:41:38 | NibblePuffin | Interesting |
05:42:32 | BytePuffin | After that project, I never looked at minecraft the same way again (and had to stop playing it for various personal reasons) |
05:42:46 | BytePuffin | It's a nice concept but... poorly executed, to say the least. |
05:45:54 | NibblePuffin | My own game deals with a very large number of voxels. It's not perfect, but I'd say I do a better job at moving them around efficiently than Minecraft does with its blocks. |
05:47:30 | BytePuffin | NibblePuffin, for my sanity, and your health, please make any networking packets easy to parse, especially if they contain variable length data types (eg, strings) |
05:47:44 | * | NibblePuffin is now known as Dirkson |
05:47:51 | * | BytePuffin is now known as Varriount |
05:48:29 | Varriount | null terminated strings are a pain to parse from a socket stream. |
05:49:12 | Dirkson | Varriount: And potentially unsafe! No, I implmented length-prepended strings. Strings shorter than 255 in a char, stringers longer in a short int. Very long strings haven't come up yet. |
05:50:36 | Dirkson | I abstracted away packing and unpacking data into packets via some nice functions. Init a simple counter variable, pass the data to some special functions, and the data is packed into your packet. Do the reverse, and the data is unpacked. |
05:51:06 | Dirkson | The system is pretty handy, although I did have to deal with pointers in some strange ways to make it work out in C. |
05:52:32 | Varriount | Dirkson, read this (written by that much more experienced person I mentioned.) -> http://corbinsimpson.com/entries/take-a-bow.html |
05:52:50 | Varriount | Beware... BeWaRe! |
05:54:31 | Dirkson | Varriount: *looks* That'd probably be something at the enet layer... But considering that enet packets consist mostly of udp datagrams, I don't expect this to be a problem. |
05:55:26 | Varriount | Just beware of thread-per-connection design |
05:55:39 | Dirkson | I don't do that either : ) |
05:56:24 | Dirkson | The main server uses, I think, one thread currently. The clients use 2 or 4 threads, with only one of those threads capable of networking. |
05:56:50 | * | Varriount claps in appreciation |
05:58:36 | Dirkson | Honestly, the whole "Spawn multiple threads in response to load" thing was not the way I thought to approach threading. My problem is *mostly* separatable into multiple portions that can work on hunks of ram on their lonesome, so I just set up multiple threads with their own loops. It doesn't balance as nicely as the response-to-load style threading, but it also doesn't fall prey to some of the problems I |
05:58:38 | Dirkson | hear about. |
05:59:23 | Varriount | It also sounds like a lot less hassle when it comes to situations such as threads interacting with each other. |
05:59:23 | Dirkson | I.e. I only ever spawn new threads at the start of the program, where I spawn exactly the number of threads as there are physical cores. |
05:59:57 | Dirkson | Aye. The few situations in which threads /do/ need to interact are a little tricky.... Buuut I only have like 4 mutexes, and they rarely run into issues these days. |
06:00:21 | Varriount | As another (much more experienced) friend of mine once grumbled - "Threading is a dark art.." |
06:00:27 | Dirkson | I did have to do some tapdancing to make sure I wasn't fuddling around with the part of the memory that gets randered *while* it was being rendered. |
06:00:38 | Dirkson | *rendered |
06:00:48 | Dirkson | One of these days I will learn to type. But it will not be this day! |
06:01:32 | Varriount | Ah, I've always wondered what would happen if you loaded a new texture into an area of memory used by an old texture. |
06:01:57 | Dirkson | Depends! |
06:02:02 | Varriount | Oh? |
06:02:21 | Dirkson | I don't use textures like normal people - Everything is voxel based, though, so I have a fake "texture" I use to store the voxel data. |
06:02:38 | Varriount | Thrifty |
06:04:47 | Dirkson | That texture goes through a couple stages - I first need to fill it up with stuff in system-ram. Then I need to get it on to the gpu. Then I need to render with it. If I make changes while it's in the fill-up stage, random large sections of ram get corrupted - Almost always a crash, since that's a core part of my program. If I make changes while it's uploading, you generally get mostly-ok data, most of the |
06:04:50 | Dirkson | time... and then certain frames where all hell breaks loose, and most of the data contained in the textures gets rendered as random data. Sort of like you malloced a big bunch of data, then tried to read it out. |
06:05:58 | Dirkson | And I can freely change the texture on the system-side once it's uploaded to the gpu - Then the gpu has its own copy, and I don't need to worry about it : ) Opengl doesn't allow me to render /during/ the upload, so that problem can't happen. |
06:06:15 | * | BitPuffin quit (Ping timeout: 260 seconds) |
06:06:20 | Varriount | Multicolored pixels/texture regions? |
06:06:32 | Dirkson | Basically, yes : ) |
06:06:51 | Dirkson | Although I also store /location/ in textures, so that goes wild for me too. |
06:06:59 | Varriount | Ouch |
06:07:12 | Dirkson | On the positive side, it's VERY obvious when this has happened :D |
06:07:27 | Dirkson | Oh, I think I have screenshot of just that happening. Hold on a tick. |
06:09:18 | Dirkson | Varriount: http://media.indiedb.com/images/games/1/16/15558/beautifulerror.png - The color data got messed up. I forget what exactly caused the lines. This was something very early in development, I think it was some sort of mass render test. |
06:09:38 | Dirkson | Varriount: And this is what I do, in case you missed the earlier link: https://www.scrumbleship.com/ |
06:09:51 | Dirkson | (I.e. That's what it's SUPPOSED to look like :D ) |
06:10:01 | Varriount | I saw it. If I have the time (and the money) I plan to buy it. |
06:11:03 | Dirkson | Much appreciated! |
06:11:10 | Varriount | Even if I don't play it, there's a chance my siblings will. |
06:11:15 | Dirkson | *nods* |
06:12:18 | Varriount | By the way, that is a pretty beautiful error. I'm tempted to use it as a desktop background. |
06:12:31 | Dirkson | Feel absolutely free : ) |
06:13:21 | Varriount | Anyway, sorry to have to go, but I must get to sleep. I have classes in.. about 9 hours |
06:13:27 | Dirkson | Sleep well! |
06:13:39 | * | Varriount is now known as Varaway |
06:24:19 | * | DAddYE joined #nimrod |
06:31:31 | * | DAddYE quit (Ping timeout: 272 seconds) |
06:41:39 | * | Endy joined #nimrod |
07:54:22 | * | Associat0r joined #nimrod |
07:54:22 | * | Associat0r quit (Changing host) |
07:54:22 | * | Associat0r joined #nimrod |
07:55:11 | * | DAddYE joined #nimrod |
07:56:37 | * | tortue_ joined #nimrod |
08:00:35 | * | Araq_ joined #nimrod |
08:36:54 | * | wlhlm joined #nimrod |
08:57:31 | * | DAddYE quit (Remote host closed the connection) |
09:15:36 | * | zahary_ joined #nimrod |
09:31:58 | * | q66 joined #nimrod |
09:38:14 | * | Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]) |
11:15:12 | * | [1]Endy joined #nimrod |
11:19:25 | * | Endy quit (Ping timeout: 272 seconds) |
11:19:26 | * | [1]Endy is now known as Endy |
11:28:47 | * | faassen joined #nimrod |
11:40:12 | * | Araq_ joined #nimrod |
11:42:53 | * | Araq_ quit (Client Quit) |
12:39:03 | * | jamil_1 joined #nimrod |
12:41:38 | jamil_1 | hi all, is it possible to create algebraic datatypes (ADTs) like in haskell ? e.g data Option t = None | Some a |
12:54:09 | * | Ricky_Ricardo joined #nimrod |
13:28:27 | * | OrionPK joined #nimrod |
13:44:38 | * | faassen left #nimrod (#nimrod) |
13:46:23 | * | OrionPK quit (Quit: Page closed) |
13:50:11 | * | Ricky_Ricardo quit (Quit: laptop[lid].close) |
13:51:44 | * | Ricky_Ricardo joined #nimrod |
14:02:41 | * | Ricky_Ricardo quit (Quit: laptop[lid].close) |
14:20:38 | * | wlhlm quit (Ping timeout: 264 seconds) |
14:37:20 | dom96 | jamil_1: I think you can get pretty close with object variants. |
14:40:54 | jamil_1 | dom96: I have something compiling here: http://paste.ubuntu.com/6289360/ |
14:41:19 | jamil_1 | dom96: but can't instantiate a value of type TOption[T] |
14:41:33 | dom96 | Replace the 'empty: void' with 'nil' |
14:41:50 | * | gdos quit (Ping timeout: 240 seconds) |
14:42:36 | dom96 | You are close. You should then be able to use it as: TOption(kind: Some, value: x) |
14:42:54 | dom96 | You can create constructor procs for Some and None |
14:43:08 | jamil_1 | with var a = TOption(kind: Some, "Hello") |
14:43:08 | jamil_1 | I get error Error: object constructor needs an object type |
14:43:29 | dom96 | it needs to be 'value: "Hello"' |
14:43:44 | dom96 | Here is an example of a Maybe type: https://github.com/fowlmouth/nimlibs/blob/master/fowltek/maybe_t.nim |
14:44:14 | dom96 | it's done a bit differently it seems |
14:44:46 | jamil_1 | dom96: yep, not as disjoint union type |
14:45:09 | jamil_1 | var a = TOption(kind: Some, value:"Hello") still gives the same error |
14:45:34 | dom96 | But yeah, it should give you an idea of how to do it. It's up to you how you want to do it. |
14:46:54 | dom96 | ahh, you need to give it the type of 'T' explicitly. |
14:47:00 | dom96 | var a = TOption[string](kind: Some, value: "Hello") |
14:47:20 | * | Ricky_Ricardo joined #nimrod |
14:48:09 | jamil_1 | dom96: oh, I though it would infer it. But it works now :) |
14:49:30 | jamil_1 | dom96: also how can I instantiate with None ? |
14:49:48 | * | Ricky_Ricardo quit (Client Quit) |
14:50:42 | * | gdos joined #nimrod |
14:50:57 | dom96 | jamil_1: TOption[void] should work |
14:53:56 | jamil_1 | dom96: TOption[void](kind: None) doesn't work |
14:54:24 | dom96 | Works for me. |
14:54:42 | dom96 | which version of Nimrod are you using? |
14:54:58 | jamil_1 | 0.9.2 |
14:55:26 | dom96 | That may be why. I suggest using the github version. |
14:55:58 | jamil_1 | umm build it locally ? |
14:56:20 | dom96 | yeah |
14:56:26 | dom96 | it's easy |
14:57:59 | dom96 | you can also download a pre-built binary from nimbuild |
14:58:25 | jamil_1 | where is nimbuild ? |
14:58:58 | jamil_1 | or perhaps `what` |
14:59:17 | jamil_1 | a build server ? |
14:59:22 | dom96 | Tell me what OS/CPU architecture you're on and i'll give you a link |
14:59:58 | jamil_1 | 32-bit windows 7 |
15:00:27 | dom96 | http://build.nimrod-code.org/commits/windows-x86/nimrod_bb6a172a2db8.zip |
15:02:06 | jamil_1 | dom96: thank you! I will get back after trying out with the new version |
15:03:24 | dom96 | no problem :) |
15:17:10 | jamil_1 | ok TOption[void] is compiling now |
15:17:14 | jamil_1 | but I have new issue |
15:18:09 | jamil_1 | here: http://paste.ubuntu.com/6289529/ |
15:18:38 | jamil_1 | TList[string](kind: NonEmpty, head: "hello", tail: nil) works fine |
15:19:15 | jamil_1 | but TList[void](kind: Empty) gives me: Error: internal error: genTraverseProc() |
15:19:58 | dom96 | looks like a compiler bug then :\ |
15:23:43 | dom96 | yeah, please submit a bug report on Github |
15:23:45 | jamil_1 | I guess I should contribute to test suite :] |
15:25:48 | dom96 | if you're lucky maybe Araq will fix it for you today :) |
16:13:29 | * | wlhlm joined #nimrod |
16:13:52 | Varaway | jamil_1, if your'e up to building nimrod, you could always build it in debug mode, so you can get more information about the error. |
16:13:59 | * | Varaway is now known as Varriount |
16:24:14 | * | fowl joined #nimrod |
16:36:49 | * | gdos quit (Read error: Operation timed out) |
16:39:39 | * | gdos joined #nimrod |
16:46:46 | * | Hannibal_Smith joined #nimrod |
16:54:45 | fowl | hi |
16:55:07 | dom96 | hey fowl |
17:07:37 | NimBot | Araq/Nimrod master 874bef3 Dominik Picheta [+0 ±4 -0]: Made TSocketHandle distinct and fixed problems it caused for SSL. |
17:07:40 | * | Kelet quit (Quit: Words do not express thoughts very well.) |
17:11:38 | * | MFlamer joined #nimrod |
17:12:05 | MFlamer | Hi all |
17:12:22 | wlhlm | hi, MFlamer! |
17:13:00 | dom96 | hello MFlamer |
17:14:19 | * | DAddYE joined #nimrod |
17:14:34 | * | DAddYE quit (Remote host closed the connection) |
17:15:09 | * | DAddYE joined #nimrod |
17:15:33 | * | DAddYE quit (Remote host closed the connection) |
17:15:52 | * | DAddYE joined #nimrod |
17:16:05 | * | Associat0r quit (Quit: Associat0r) |
17:19:32 | * | OrionPK joined #nimrod |
17:19:56 | dom96 | OrionPK: You should be able to compile babel now. |
17:24:25 | OrionPK | dom96 cool, openSSL fixed? |
17:24:32 | dom96 | yes |
17:25:02 | OrionPK | cool |
17:25:20 | OrionPK | I'll give the other issue a shot now that that's building on this machine |
17:25:39 | OrionPK | actually |
17:25:40 | OrionPK | lib\windows\winlean.nim(395, 38) Error: undeclared identifier: 'TSocketHandle |
17:26:39 | * | zahary quit (Ping timeout: 260 seconds) |
17:27:14 | Dirkson | Although you guys are probably talking about openssl for interfacing with existing websites, if you ever feel like writing a wrapper for a cool cryptography library, I fell in love with this one when I used it on another project: https://github.com/jedisct1/libsodium |
17:27:36 | dom96 | OrionPK: bah, that's what happens when I don't cross-compile for Windows |
17:28:16 | * | zahary joined #nimrod |
17:30:26 | NimBot | Araq/Nimrod master ec63966 Dominik Picheta [+0 ±2 -0]: Fixed socket compilation problems on Windows. |
17:30:33 | dom96 | OrionPK: Hopefully will work now |
17:31:08 | Varriount | dom96, Why is it that the builder crashes when you send out a new update? |
17:33:32 | dom96 | Varriount: No idea. What's the traceback? |
17:35:38 | Varriount | Nothing, I get a segfault/crash |
17:35:52 | Varriount | It happens after the builder has recieved a second request to update |
17:36:27 | Varriount | Let me get one of the builder's running in GDB, and inspect the dump windows made. |
17:38:39 | OrionPK | dom96 ???(???, ???) Error: type mismatch: got (cuint, cuint) but expected one of: winlean.==(x: TSocketHandle, y: TSocketHandle): bool |
17:39:39 | dom96 | '???' 0_o |
17:40:39 | Varriount | Probably an optimized away line number. |
17:40:55 | dom96 | gah, is there no `==` for cuint? |
17:40:59 | Varriount | Try compiling with --debuginfo --linedir:on |
17:41:49 | dom96 | OrionPK: are you on 32bit? |
17:42:24 | OrionPK | I am |
17:42:32 | OrionPK | at least gcc is 32 bit |
17:43:36 | dom96 | try adding 'import unsigned' into winlean |
17:47:52 | OrionPK | yeah, that does it |
17:48:17 | * | dom96 wonders if Araq will kill him if he adds that to winlean |
17:49:02 | Varriount | dom96, what are you trying to do? |
17:49:08 | OrionPK | and babel builds now as well |
17:49:54 | dom96 | Varriount: SOCKET is unsigned int on Win32 |
17:50:32 | Varriount | SOCKET, or TSocketHandle? |
17:51:05 | dom96 | SOCKET is TSocketHandle. |
17:51:16 | dom96 | SOCKET in the winsock2 header. |
17:51:18 | Varriount | dom96, It's not an int |
17:51:24 | Varriount | Its a pointer to an unsigned long |
17:51:36 | dom96 | only on 64bit |
17:51:56 | Varriount | dom96, the size of a pointer on windows is always 32 bits |
17:52:14 | Varriount | Wait, no, my mistake |
17:52:26 | Varriount | *looks up type information* |
17:52:46 | dom96 | https://gist.github.com/dom96/f3bc533ac151d528e65f |
17:52:49 | dom96 | That's from winsock2.h |
17:52:56 | Varriount | http://stackoverflow.com/questions/384502/what-is-the-bit-size-of-long-on-64-bit-windows |
17:53:21 | Varriount | dom96, what datatype are you using to store the socket handle? |
17:53:39 | OrionPK | just confirmed asyncio httpserver not working on my work computer as well |
17:54:07 | Varriount | Also, as long as you don't directly manipulate the handle, you can store it in an signed data type |
17:54:09 | dom96 | Varriount: cuint on 32bit, int on 64bit |
17:54:43 | dom96 | dunno, maybe it's fine to have it as int for both but that's not how the header defines it. |
17:55:29 | Varriount | dom96, use winlean.TSocketHandle |
17:55:47 | Varriount | I think |
17:55:54 | dom96 | Varriount: What? I changed TSocketHandle to that. |
17:56:09 | Varriount | -_- |
17:56:28 | Varriount | I'll talk to you in about an hour, I have algebra to do. |
18:00:15 | * | brson joined #nimrod |
18:10:55 | * | zahary quit (Ping timeout: 268 seconds) |
18:11:12 | * | zahary joined #nimrod |
18:11:31 | MFlamer | How's it going zahary? |
18:17:14 | Varriount | Ok, I have 10 minutes |
18:17:37 | Varriount | dom96, are you casting the socket to another type somewhere? |
18:17:59 | dom96 | I don't think so, why? |
18:18:36 | Varriount | Casting might bork up the socket handle |
18:18:41 | * | tortue__ joined #nimrod |
18:21:11 | Varriount | dom96, I think I know what the problem is. |
18:21:36 | Varriount | When I created the TSocketHandle type, I wasn't able to verify that the entire stdlib switched to using it. |
18:21:50 | * | tortue_ quit (Ping timeout: 240 seconds) |
18:22:09 | dom96 | The only current problem is the use of unsigned int's. |
18:22:22 | * | DAddYE quit (Remote host closed the connection) |
18:22:40 | Varriount | ? |
18:22:45 | dom96 | I know that Araq doesn't like that so I don't want to import unsigned into winlean which is imported by 99% of modules. |
18:22:58 | Varriount | Why is it needed? |
18:23:54 | dom96 | As I said, I looked at how SOCKET is defined in winsock2.h, its type is different for 32bit and 64bit windows. |
18:24:32 | Varriount | dom96, tell me, what is the difference, on the memory level, of say, an integer and an unsigned integer? |
18:25:03 | Varriount | As in, how much memory is allocated for each? |
18:26:38 | dom96 | There is no difference. |
18:26:43 | Varriount | Exactly. |
18:27:04 | Varriount | Unless you plan on directly manipulating handle data, you don't need to store it as an unsigned int |
18:29:54 | Varriount | dom96, looking at the winlean module, the TSocketHandle type is an int. |
18:30:18 | Varriount | Which, for nimrod, always means a 32 bit int on a 32 bit processor, or a 64 bit int on a 64 bit processor |
18:30:23 | Varriount | regardles of OS |
18:30:32 | dom96 | It still seems incorrect though. The socket handle on Windows can never be negative as far as I can tell. I suppose the likelihood of it overflowing is low. |
18:30:59 | Varriount | dom96, the concept of "negative" is relative |
18:31:19 | Varriount | esentially, an int is a range of values. |
18:31:36 | Varriount | for unsigned ints, "zero" is the lowest value |
18:31:55 | Varriount | while for signed ints, "zero" is the middle value in that range |
18:32:26 | Varriount | Anyway, have to go. I'l be back on in about 45 minutes. |
18:35:38 | fowl | no, 0 is 0 |
18:45:22 | * | tortue joined #nimrod |
18:48:21 | * | tortue__ quit (Ping timeout: 245 seconds) |
18:53:05 | Varriount | dom96, |
18:53:06 | Varriount | c:\64\nimrod\lib\wrappers\openssl.nim(269, 5) Hint: 'openssl.CRYPTO_set_mem_functions(a: pointer, b: pointer, c: pointer)' is declared but not used |
18:53:06 | Varriount | tNotUsed] |
18:53:06 | Varriount | c:\64\nimrod\lib\pure\sockets.nim(318, 15) Error: type mismatch: got (PSSL, TSocketHandle) |
18:53:06 | Varriount | but expected one of: |
18:53:07 | Varriount | openssl.SSL_set_fd(ssl: PSSL, fd: cint): cint |
18:53:17 | Varriount | change fd to TSocketHandle |
18:53:31 | Varriount | and the return type to TSocketHandle |
18:54:03 | Varriount | That's my best guess |
18:57:02 | OrionPK | interesting project - someone should port it to nimrod :P - https://github.com/quarnster/lime |
18:57:06 | dom96 | I've already done that. Well, changing the return type is not correct. |
18:57:22 | dom96 | I changed 'fd' to TSocketHandle though |
18:57:26 | Varriount | And what error results? |
18:57:52 | dom96 | hrm? There is no error. |
18:58:08 | Varriount | Then... there's no problem? |
18:58:33 | dom96 | ... |
18:59:31 | * | Varriount is confused |
18:59:42 | dom96 | Yeah, sure. There isn't. |
19:00:54 | dom96 | It's more of a dilemma. |
19:01:00 | Varriount | ? |
19:01:34 | * | DAddYE joined #nimrod |
19:01:47 | dom96 | But you've already argued your point, TSocketHandle should be 'int' for both 32bit and 64bit. |
19:02:21 | Varriount | Sorry if I came off as annoying/bitchy/mean |
19:02:52 | dom96 | nah, don't worry. |
19:03:45 | dom96 | I think you're right. |
19:10:05 | fowl | aporia needs an icon |
19:10:23 | dom96 | Aporia needs a lot more than an icon :\ |
19:11:11 | Varriount | Aporia just needs to integrate with other IDE's |
19:11:26 | Varriount | It's the law of convenience. |
19:11:45 | Hannibal_Smith | Eclipse plugin? :-P |
19:12:10 | Varriount | And/Or vim/emacs/sublime text/notepad++/etc |
19:12:33 | Varriount | People dislike having to use different editors for different languages (with some exceptions) |
19:12:49 | Varriount | Eclipse is a good example of this. |
19:13:20 | MFlamer | I vote Sublime. Eclipse is too big and heavy |
19:14:14 | MFlamer | not that anyones asking :-) |
19:18:58 | * | tortue left #nimrod ("Gone") |
19:19:33 | * | sebcrozet joined #nimrod |
19:32:36 | * | DAddYE quit (Remote host closed the connection) |
19:35:40 | OrionPK | the only issue w/ sublime is its' not free or open source |
19:35:49 | OrionPK | (but I still love it) |
19:36:11 | * | DAddYE joined #nimrod |
19:36:51 | fowl | i like how its nagware |
19:36:56 | fowl | you dont see that these days |
19:44:29 | * | Hannibal_Smith quit (Quit: Sto andando via) |
20:07:38 | fowl | hey wasnt there an mitems iterator for seqs |
20:07:50 | fowl | mitems[T](some: var seq[T]): var T |
20:08:36 | NimBot | Araq/Nimrod master b1a7acf Dominik Picheta [+0 ±1 -0]: Fixed sockets on Win32. |
20:10:48 | * | Associat0r joined #nimrod |
20:10:48 | * | Associat0r quit (Changing host) |
20:10:48 | * | Associat0r joined #nimrod |
20:20:28 | OrionPK | dom96 I think babel needs a gitignore for nimcache |
20:20:42 | OrionPK | and babel/babel.exe :0 |
20:22:07 | dom96 | I just remember not to git add it :P |
20:24:49 | OrionPK | just clutter |
20:24:56 | * | fowl quit (Ping timeout: 256 seconds) |
20:24:59 | * | Endy quit (Ping timeout: 272 seconds) |
20:25:16 | dom96 | git status -uno :P |
20:34:23 | Varriount | Yay, builder crashed. |
20:34:36 | Varriount | Now I get to look at all the squishy insides. |
20:35:53 | * | BitPuffin joined #nimrod |
20:36:03 | Varriount | dom96, lookee -> https://gist.github.com/Varriount/7126214 |
20:36:48 | Varriount | It's right after a new thread is created. |
20:37:51 | dom96 | Looks like a Nimrod bug. |
20:38:21 | Varriount | Unfortunately, I don't know how to get a more specific stack trace. |
20:38:49 | Varriount | I'l try compiling the compiler in debug mode as well. |
20:40:51 | * | fowl joined #nimrod |
20:42:35 | fowl | verlet physics port https://gist.github.com/fowlmouth/7126203 |
20:43:21 | Varriount | Anyone care to explain why "the smaller the stdlib, the better"? |
20:44:55 | dom96 | Varriount: Compiler in debug mode will only help you with compiler crashes. |
20:44:58 | fowl | Varriount, only a few people have the ability to merge changes into the main repo, having libraries outside the stdlib means the language developers can focus on the language and not the libraries |
20:45:54 | Varriount | Then... who is managing the libraries? |
20:46:29 | dom96 | It also means that less libraries depend on the release cycle of Nimrod. They can have independent release cycles which is useful for some stuff like wrappers which I continually have the need to update. |
20:46:41 | fowl | the community |
20:47:05 | Varriount | -_- Can you be a bit more specific? |
20:47:23 | Araq | Varriount: as long as the same people manage the libs there is not much benefit IMO; however I can easily give write access to the "SDL guy" (if there is one) without giving him access to everything |
20:47:39 | Araq | also more github projects mean more awareness |
20:52:11 | * | brson quit (Ping timeout: 248 seconds) |
20:54:24 | sebcrozet | Hi! |
20:54:53 | dom96 | hello sebcrozet! |
20:55:21 | sebcrozet | I’m just playing a bit with nimrod. |
20:55:25 | sebcrozet | Looks fantastic so far. |
20:55:28 | Varriount | dom96, Araq, windows reports that the builder crashed due to an Access violation, or exception c0000005 |
20:55:49 | sebcrozet | Is it possible to make a template generate a new type? |
20:55:53 | Araq | hi sebcrozet, welcome |
20:56:18 | Araq | it's possible, yes |
20:57:37 | sebcrozet | ah, I tried something like: `template declare_the_type() : stmt = type Toto = tuple[a: int] ` (with the correct indentation) |
20:57:44 | sebcrozet | And it does not seem to work :( |
20:58:35 | Araq | make the template {.dirty.} |
20:58:52 | Varriount | And immediate? |
20:59:40 | sebcrozet | Araq: it works with dirty… What does that mean? |
21:00:10 | Araq | it means that declared identifiers can escape the template definition |
21:00:55 | sebcrozet | I see. |
21:01:10 | Varriount | sebcrozet, any specific reason you're using a template to generate a type, instead of type class conditions? |
21:03:05 | sebcrozet | Varriount: I’m trying to generate a Vector type with a specific dimension. For example I want the `declare_vec(4)` template instanciation to decrale the type `Vec[N] = tuple[x: N, y: N, z: N, w: N]`. |
21:03:42 | sebcrozet | Varriount: In fact, I’m not sure this is possible with templates. |
21:03:59 | Varriount | Sounds quite possible. |
21:04:10 | Araq | sebcrozet: nimrod's templates are a form of a macro, you likely want to use generics instead |
21:04:46 | Dirkson | Araq: Hi! Can I put in a request to accept tabulators as a valid method of spacing? Quite a large number of people, myself included, are pretty solidly married to using the things, and it definitely slows adoption. Tabulators, used properly as left-side indentation only, also have no negatives when compared to spaces, although mixed tabulators/spaces in a single file obviously has issues. |
21:04:49 | * | MFlamer quit (Ping timeout: 268 seconds) |
21:05:21 | Varriount | Araq, how would he have a generic generate multiple attributes? |
21:06:29 | dom96 | Sounds like he needs a macro for that. |
21:06:44 | Araq | ah I misunderstood then |
21:07:34 | sebcrozet | Can generics be parametrized with integrers? (in wich case I might be able to do something like: Vec[N, dim] = [0..dim, N]) |
21:08:15 | Araq | Dirkson: you might get the feature but most code I look at uses tabs as an compression technique for 8 spaces so that I can't set tabs to anything except 8 |
21:08:38 | Araq | 4 spaces indentation, but 8 spaces are "compressed" to a tab is VERY common |
21:08:50 | Araq | I think it's some braindead emacs setting |
21:09:05 | sebcrozet | dom96: macro is the AST-generation thing, right? |
21:09:23 | Dirkson | Araq: Interesting. I'm used to thinking of tabs as variable spacing - I.e. "Indent this bit, but let the developer's text editor figure out what it actually looks like" |
21:09:27 | dom96 | sebcrozet: yep |
21:09:36 | Varriount | sebcrozet, macros are a lower level form of templates. |
21:10:07 | Varriount | Araq, could Dirkson use source code filters (http://nimrod-code.org/filters.html) to achieve what he wants? |
21:10:33 | dom96 | sebcrozet: Arrays accept a range, you could use that if you don't want to mess with macros. |
21:10:54 | Araq | Varriount: huh, that might work indeed :-) |
21:11:13 | * | Varriount likes reading docs. |
21:11:15 | Araq | #! replace("\t", " ") |
21:11:30 | Araq | I don't think this has ever been tested though :P |
21:12:08 | sebcrozet | dom96: if I understand correctly, I need macros here because the generation of type members (x, y, z, w, etc) requires a loop (with a number of iterations depending on the vector dimension) which cannot be done with "normal" templates ? |
21:12:37 | Araq | sebcrozet: that is correct |
21:13:03 | sebcrozet | ok, I’ll try that then. |
21:13:11 | sebcrozet | Thanks. |
21:13:34 | Dirkson | Araq: For a simple test, appears to work like a *charm* |
21:14:15 | Varriount | :D |
21:14:23 | sebcrozet | About Nimrod itself, what is its current development status (how far from 1.0, how big is the comunity)? |
21:14:24 | fowl | haha |
21:14:48 | Dirkson | Araq: That solves the need for me, but I have seen other people complaining about the tab thing. Can I push ya' to include that little snippet in the tutorial, as an option for people? |
21:15:45 | Araq | sebcrozet: the community is growing, though not rapidly; version 1.0 is planned for the end of 2014 |
21:15:45 | OrionPK | :set expandtab |
21:15:48 | fowl | Dirkson, echo "\t\t" and see if it echos 4 spaces |
21:16:01 | Dirkson | fowl: Good idea |
21:16:37 | Dirkson | fowl: inexplicably no. |
21:16:53 | OrionPK | wh dont you want to uses spaces, dirkson? |
21:17:00 | sebcrozet | Araq: is the compiler stable enough to start a medium-sized project (involving a lot of math computations) ? |
21:17:14 | Dirkson | OrionPK: It helps, but it doesn't fix the arrow keys, and doesn't work in all editors. |
21:17:17 | Varriount | Dirkson, change the " " to " " |
21:17:36 | OrionPK | what editors? |
21:17:38 | Araq | sebcrozet: sure, can't see why not |
21:17:50 | OrionPK | notepad? |
21:17:51 | Varriount | By the way, is there a escape code for spaces? |
21:18:00 | Dirkson | OrionPK: Dunno! Whatever other people use instead of vim. Sticks and rocks? |
21:18:09 | Varriount | Sublime Text |
21:18:10 | Araq | \x20 Varriount |
21:18:16 | Varriount | Danke |
21:18:22 | OrionPK | Varriount sublime handles spaces and tabs pretty well |
21:18:32 | OrionPK | the question is what editors dont |
21:18:35 | Araq | keine Ursache |
21:19:35 | dom96 | I think the biggest annoyance that spaces cause for tab people is that they have to press the arrow keys too much. |
21:19:36 | OrionPK | if anyone else collaborates with someone using tabs to indent.. ugh |
21:19:38 | sebcrozet | Araq: ok. If my vector thing works, I will thy to find some time to port some of my Rust projects to Nimrod. |
21:19:55 | OrionPK | dont use the arrowkeys dom96 :P |
21:19:59 | Araq | sebcrozet: we have vectors in the stdlib, you know |
21:20:27 | Araq | unfortunately the docs are not up to date because nimbuild has some issues |
21:20:34 | OrionPK | I use up/down arrowkey, home/end, and sometimes ctrl+left/right arrowkeys |
21:20:43 | dom96 | same |
21:21:03 | Araq | well I can live with allowing tabs instead of spaces if the file then only uses tabs |
21:21:16 | Araq | but the tab people like "tabs for indentation, spaces for alignment" |
21:21:34 | OrionPK | ew |
21:21:42 | Araq | which I've yet to see work in practice and which is a different beast to handle |
21:21:50 | sebcrozet | Araq: ah. just found the "basic{3,2}d.nim" files. |
21:21:56 | * | BitPuffin quit (Quit: WeeChat 0.4.2) |
21:21:58 | Dirkson | I'm not a big fan of that either. But then, I rarely do much in the way of alignment. |
21:22:05 | sebcrozet | Araq: though those are not sufficient for my projects :( |
21:22:44 | * | BitPuffin joined #nimrod |
21:22:45 | Varriount | I'm too lazy to align things. Besides, it gets all messed up as soon as you refactor or rename. |
21:23:05 | OrionPK | form > function :P |
21:23:19 | OrionPK | make code pretty, then make it work lol |
21:23:27 | Dirkson | dom96: And yeah, you're entirely correct - When I'm in insert mode in vim and just want to move around a couple lines, I find arrow keys faster and easier than switching to command mode. I really like tab's ability to instantly jump levels of indentation with one left/right arrow. |
21:23:29 | Varriount | form = function-1 |
21:24:25 | Araq | sebcrozet: BitPuffin has some vector/matrix stuff too, using generics but not a variable number of dimensions I think |
21:24:41 | BitPuffin | sure do |
21:24:54 | BitPuffin | Araq: it is variable dimensions |
21:24:56 | OrionPK | dirkson I dont really understand what you get by being able to put your cursor in the middle of some whitespace |
21:25:17 | OrionPK | why wouldnt you want to go to either side of the whitespace, not the middle |
21:25:25 | OrionPK | i.e. use home/end or ctrl+arrow |
21:25:29 | dom96 | OrionPK: I can see it being useful when you want to insert some statement at that indentation level. |
21:25:43 | OrionPK | thats what auto-indent is for |
21:25:47 | OrionPK | and tab/shift+tab |
21:25:57 | OrionPK | the key not the char |
21:26:10 | sebcrozet | Araq: ok, I’ll take a look at that. |
21:26:49 | BitPuffin | I should at least finish up the matrix stuff and release 0.2 |
21:26:53 | BitPuffin | it's way overdue |
21:26:55 | Dirkson | OrionPK: Well, imagine I wanted to edit the start of a line a couple lines up, a couple of indents out. In insert mode with tabs, that's up left left up. Without insert mode, it's escape-home-up-up-^ It's only a key, but doesn't involve any state changes and seems more intuitive, so I got really used to it. |
21:27:01 | BitPuffin | but I'm currently focusing on my drivers license |
21:27:09 | sebcrozet | Are every procedure parameters passed by-ref ? |
21:27:41 | sebcrozet | BitPuffin: what do you mean by "variable dimensions" ? |
21:27:55 | OrionPK | Dirkson if I did that, I would hit home+enter+enter+up+up on the current line |
21:27:56 | Varriount | sebcrozet, compiler determines whether to pass procedures by ref or copy automatically |
21:28:13 | OrionPK | and it would be at the same indent level as the current code |
21:28:17 | BitPuffin | sebcrozet: that you can set an arbitrary dimension when you create the matrix, so it's not hardcoded |
21:28:18 | Varriount | sebcrozet, although you can explicitly tell it whether to pass by reference or copy |
21:28:21 | * | MFlamer joined #nimrod |
21:28:58 | sebcrozet | Varriount: how does it make the decision? (and how can y force the by-copy or reference argument passing?) |
21:29:00 | dom96 | OrionPK: Auto-indent? How would it know where I want it? The language is indentation based :P |
21:29:21 | OrionPK | dom96 of course autoindent |
21:29:57 | Varriount | sebcrozet, I have no idea how it does it automatically. |
21:29:58 | dom96 | Say I am below an if block, how would it know whether I want my statement inside the if block or outside its scope? |
21:29:58 | sebcrozet | BitPuffin: Is it your github "linalg" project? |
21:30:03 | OrionPK | dom96 even aporia has autoindent to some degre |
21:30:22 | Varriount | However, you can make it force to pass a reference by passing a reference type. |
21:30:31 | OrionPK | dom96 how would the editor know? |
21:30:33 | sebcrozet | BitPuffin: oh, it is in bitbucket now… |
21:30:36 | Dirkson | OrionPK: Er... Ah, I see. You mean escape+home+up+up+up+enter+insert ? I didn't actually know enter did that in command mode, that's rather neat... Buuut it's still more than four keys, and isn't as intuitive |
21:30:52 | BitPuffin | sebcrozet: yes it's on bitbucket |
21:30:53 | fowl | jesus |
21:31:01 | Araq | sebcrozet: the compiler decides for you and knows better than you in general, you have to use 'var' to gain write access |
21:31:01 | fowl | Dirkson, thats like a street fighter combo |
21:31:08 | Dirkson | fowl: I know, right? :D |
21:31:09 | dom96 | OrionPK: yes, how would it? |
21:31:13 | OrionPK | lol |
21:31:14 | BitPuffin | sebcrozet: if you grab the latest hg version its got some matrix stuff, but it's unfinished and subject to change |
21:31:37 | Varriount | sebcrozet, type TVector = tuple[x, y:int]; PVector = ref TVector |
21:31:37 | OrionPK | dom96 always assumes same scope as you're in, until you shift+tab |
21:31:45 | Dirkson | fowl: OrionPK codes by hadouken ^.^ |
21:31:56 | dom96 | OrionPK: ahh, now I see what you mean. |
21:32:08 | Varriount | sebcrozet, and when you pass PVector, you pass a reference. |
21:32:11 | OrionPK | I have good muscle memory :p |
21:32:14 | dom96 | Shift+tab definitely helps. |
21:32:24 | sebcrozet | BitPuffin: I’ll take a look at your lib. Do you accept contributions? |
21:32:27 | OrionPK | but I dont use vim anymore, I use sublime/aporia for nimord |
21:32:28 | Varriount | Bye guys, I have to take siblings to events, do homework, etc. |
21:32:30 | OrionPK | nimrod* |
21:32:43 | BitPuffin | sebcrozet: yeah kind of, but only if it's the way I want it to be lol :P |
21:32:45 | sebcrozet | Varriount: Bye, and thanks for the help :) |
21:32:56 | Varriount | Araq, I'm probably not going to be on much until next Wednesday, I have tests coming up. |
21:33:00 | BitPuffin | sebcrozet: But I'll probably fix it up within weeks |
21:33:10 | * | Varriount is now known as Varaway |
21:33:12 | dom96 | Varriount: bye! Good luck with your tests :) |
21:33:15 | OrionPK | there's a lot less 'mode switching' in sublime |
21:33:19 | Araq | Varriount: thanks for telling me, good luck |
21:34:00 | * | cespare quit (Ping timeout: 240 seconds) |
21:35:48 | fowl | now with a picture https://gist.github.com/fowlmouth/7126203 |
21:36:12 | sebcrozet | BitPuffin: Ok. It will take me some time to learn nimrod anyway. I still have figure out if I prefer Nimrod or Rust :P (I already wrote a lot of Rust code). |
21:36:36 | BitPuffin | sebcrozet: Okay! Well then maybe I'll fix it up by the time you decide that nimrod is superior :P |
21:37:43 | sebcrozet | Does anybody else have some experience with Rust here? |
21:37:55 | fowl | i tried to read some rust once |
21:37:59 | fowl | it made my eyes water |
21:38:10 | fowl | the doctor told me to stay away from it.. |
21:38:10 | BitPuffin | sebcrozet: I have minor |
21:38:30 | dom96 | I tried compiling the Rust compiler once, I gave up after waiting 40 minutes... |
21:38:57 | sebcrozet | Yeah, the first compilation can take hours (they have to compile a customized LLVM). |
21:39:18 | fowl | why must it be customized |
21:39:30 | sebcrozet | No idea. |
21:39:49 | sebcrozet | I dont know anything about the Rust compiler internals. |
21:40:28 | sebcrozet | btw, Is there any full-time dev on Nimrod? |
21:40:44 | Araq | no |
21:41:12 | sebcrozet | too bad :( |
21:41:26 | BitPuffin | that's pretty much the advantage of rust |
21:41:33 | BitPuffin | it's got mozilla behind it |
21:41:38 | reactormonk | nimrod foundation? ^^ |
21:43:03 | reactormonk | sebcrozet, yeah, we still have the hit-by-a-bus problem |
21:43:21 | sebcrozet | reactormonk: "hit-by-a-bus problem" ? |
21:43:40 | BitPuffin | sebcrozet: if Araq gets hit by a bus who saves nimrod |
21:43:49 | Araq | reactormonk: not really, zahary knows everything too |
21:44:02 | reactormonk | Araq, but would he take over? |
21:44:02 | Araq | but he has even less time, so I guess that doesn't count |
21:44:03 | BitPuffin | that's what I was thinking |
21:44:11 | BitPuffin | well |
21:44:19 | BitPuffin | two is not enough to solve the hit by a bus factor |
21:44:36 | reactormonk | and the single-name variables don't help either |
21:44:54 | Araq | well Jehan on the forum is doing pretty well, I think he might know everything soon too |
21:45:00 | OrionPK | single character name variables? |
21:45:11 | Araq | reactormonk: the single-letter vars are irrelevant |
21:45:13 | BitPuffin | in the compiler |
21:45:25 | BitPuffin | Araq: not really |
21:45:27 | sebcrozet | what seems weird, is that even if Nimrod does not have full-time devs, I dont have the feeling it is less stable than Rust (though I did not try complicated things at the moment). |
21:45:47 | BitPuffin | sebcrozet: that's because rust is like 2 years old and nimrod is like 8 years old |
21:46:03 | Araq | Rust is older than 2 years |
21:46:09 | BitPuffin | but nimrod does have it fair share of bugs |
21:46:14 | BitPuffin | Araq: yeah it was a guesstimate |
21:46:34 | Araq | it started as a "one random guy implements a compiler" too |
21:46:38 | * | brson joined #nimrod |
21:46:42 | * | BitPuffin quit (Quit: WeeChat 0.4.2) |
21:46:43 | Araq | in 2008 I think |
21:47:28 | * | BitPuffin joined #nimrod |
21:48:21 | Araq | BitPuffin: the bugs are not really the problem, the problem is that every half-decent half-modern systems programming language needs TONS of features |
21:49:10 | sebcrozet | Araq: well I dont feel like Nimrod has a ton of features (neither does Rust). |
21:49:19 | Araq | hence the insanely long development times |
21:49:51 | Araq | sebcrozet: that's because many features are now taken for granted |
21:50:11 | reactormonk | compilation to JS \o/ |
21:50:18 | sebcrozet | Araq: possible. |
21:50:39 | Araq | named parameters, default parameters, generics, some form of meta programming, first class functions, closures |
21:50:54 | Araq | some iterator abstraction |
21:50:59 | Araq | async io |
21:51:09 | BitPuffin | Araq: Well yeah, and having lots of shit causes bugs, never said that bugs were the problem |
21:51:26 | BitPuffin | just claimed that they exist |
21:51:26 | Araq | multithreading |
21:51:42 | reactormonk | Araq, we have multithreading? |
21:51:45 | * | OrionPK quit (Ping timeout: 250 seconds) |
21:51:50 | sebcrozet | Araq: what I think I will like the most with Nimrod is the minimalistic OOP (I prefer procedural programming a lot, and every modern language seems to focus of OOP… this is kind of annoying). |
21:52:02 | Araq | yeah I know and I can only either implement new stuff or fix bugs :P |
21:52:30 | BitPuffin | really though we need a foundation |
21:52:58 | BitPuffin | some non coder people who market nimrod and comes up with a way to fund it |
21:53:12 | Araq | reactormonk: yes we do |
21:53:56 | BitPuffin | the best way is to just make the language programmable clean and people can add features themselves |
21:53:56 | reactormonk | Araq, interesting. |
21:53:59 | BitPuffin | and we have macros |
21:54:01 | BitPuffin | so much is possible |
21:55:28 | BitPuffin | maybe we're taking a too monolithic approach |
21:56:22 | fowl | how so |
21:56:53 | BitPuffin | Well I mean like there is probably a handful of features that could be implemented in libraries |
21:57:05 | BitPuffin | like threading etc |
21:57:13 | Araq | lol |
21:57:18 | Araq | doesn't work |
21:57:27 | BitPuffin | "works" for C |
21:57:30 | Araq | nope |
21:57:37 | Araq | there are papers about it |
21:57:45 | Araq | showing that it really CAN'T work |
21:58:12 | BitPuffin | ah |
21:58:16 | BitPuffin | well you know more than I do |
21:58:27 | BitPuffin | it was just a suggestion |
21:58:44 | Araq | we plan to have pattern matching as a macro |
21:58:53 | sebcrozet | got to go. Thanks for the help and your friendliness :) |
21:59:06 | Araq | where is this macro? who writes it? Rust already has pattern matching! ;-) |
21:59:34 | fowl | show an example of what the end code should look like and ill write it |
21:59:55 | Araq | match x: |
22:00:19 | BitPuffin | Araq: but is there a way to add them as guards to procs? |
22:00:32 | * | sebcrozet quit (Quit: Gone) |
22:00:39 | Araq | of Asgn(a, b+4): ... |
22:00:43 | * | BitPuffin quit (Quit: WeeChat 0.4.2) |
22:02:54 | * | OrionPK joined #nimrod |
22:05:42 | * | BitPuffin joined #nimrod |
22:07:05 | Araq | BitPuffin: proc p(){.m.} is transformed to |
22:07:07 | Araq | m: |
22:07:09 | Araq | proc p() |
22:07:20 | Araq | so you can use a macro to add guards |
22:07:30 | fowl | Araq, need a full example |
22:07:39 | fowl | and we cant use _ |
22:07:42 | fowl | which would be nice |
22:08:11 | Araq | fowl: '_' will be allowed soon |
22:08:26 | Araq | and there are tons of examples on the net |
22:08:33 | BitPuffin | Araq: ah cool! |
22:09:55 | BitPuffin | Araq: Possibly not the most elegant but it should do the job |
22:11:34 | fowl | Araq, im looking at rust tutorial, these examples are stupid |
22:11:59 | BitPuffin | Araq: By the way why are we allowing implicit casts in nimrod? |
22:12:14 | fowl | lol why do you think that BitPuffin |
22:12:20 | BitPuffin | fowl: we do |
22:12:29 | BitPuffin | fowl: with different number types |
22:12:31 | fowl | the only way something is implicit cast is if there's a converter for it, or literal numbers |
22:12:40 | BitPuffin | fowl: float + int = float |
22:12:51 | fowl | no, float + int literal = float |
22:12:58 | BitPuffin | ah |
22:13:08 | BitPuffin | well that's a pretty good compromise |
22:13:20 | BitPuffin | well actually it is ideal |
22:15:17 | fowl | and you know about converters right |
22:15:42 | BitPuffin | yeah |
22:16:13 | BitPuffin | but I'm not sure I like them |
22:17:11 | reactormonk | BitPuffin, they're not really casts, + is defined for float,int int,int etc. |
22:17:57 | BitPuffin | reactormonk: well it's still relatively expensive to mix them right? |
22:19:55 | * | MFlamer quit (Ping timeout: 246 seconds) |
22:21:28 | fowl | Araq, invalid expression? https://gist.github.com/fowlmouth/80dd150d0f1d218aaba0 |
22:21:48 | fowl | oh is it because of the tuple syntax |
22:21:55 | reactormonk | BitPuffin, not too much |
22:22:15 | BitPuffin | reactormonk: well I mean compared to doing it with the same types |
22:22:22 | fowl | nvm it needed {.immediate.} |
22:22:40 | fowl | Araq, i have no idea how the end code should look |
22:23:33 | fowl | scan the of branches for identifiers, check if field == val for other fields, but the other field could be an ident variable |
22:39:26 | fowl | guess i could use definedInScope to determine that |
22:46:58 | Araq | fowl: it doesn't really matter, all it matters that we get pattern matching and somebody writes an article about it |
22:47:14 | fowl | it has to be useful |
22:47:28 | fowl | i cant do var x = match(foo): \n of 1: ... |
22:47:36 | Araq | well in fact ... the pattern matching language needs to be adapted to the tree |
22:48:54 | fowl | itd be more impressive if it could be accomplished with a macro |
22:58:06 | Dirkson | Comparing the tutorial for Nimrod to the one for Rust is absolutely hilarious. Most things in nimrod make some kind of *sense*. Araq, are you sure you don't need to add 4 different pointer reference/dereference symbols? :P |
23:20:41 | Dirkson | stdlib is rather large - Does nimrod contain any genercs for quad/octrees? I think I saw mention of a binary tree in there. |
23:27:59 | * | q66 quit (Quit: Leaving) |
23:28:39 | fowl | i have a quadtree in fowltek |
23:28:52 | Dirkson | Link? Mind sharing? : ) |
23:29:00 | fowl | babel install fowltek |
23:29:07 | fowl | github/fowlmouth/nimlibs |
23:36:01 | * | wlhlm quit (Ping timeout: 245 seconds) |
23:36:14 | Dirkson | fowl: I think I've got it ^^ |
23:36:42 | Dirkson | fowl: Is there any documentation for the quadtree stuffs? |
23:37:31 | fowl | there should be an example of use at the bottom of the code |
23:38:44 | Dirkson | fowl: The when isMainModule: stuff? |
23:39:25 | Dirkson | fowl: Considering that you use your own sdl2 module, I assume the stdlib sdl module in Nimrod is sdl1? |
23:41:04 | fowl | im notoriously bad at documenting but always include examples |
23:42:20 | * | xenagi joined #nimrod |
23:46:40 | fowl | Dirkson, yes |
23:51:26 | Dirkson | Woof. I am not used to reading this stuff yet. |
23:56:37 | Dirkson | Actually, no, I'm not sure my problem has to do with reading? |
23:56:55 | Dirkson | I think my problem is the fact that the data is implicetly typed from something I can't see. |
23:57:12 | Dirkson | i.e: depthColors = [colGreen.toSDLcolor, colBlue.toSDLcolor, colYellow.toSDLcolor, colRed.toSDLcolor, colWhite.toSDLcolor] |
23:57:32 | Dirkson | To figure out what depthColors is, I need to figure out what colgreen.toSdlcolor is. |