00:01:24 | * | bjz quit (Max SendQ exceeded) |
00:03:13 | * | bjz joined #nim |
00:06:20 | ekarlso- | Araq https://github.com/Araq/Nim/pull/1926 |
00:09:29 | * | irrequietus quit () |
00:13:11 | * | rpag quit (Quit: Leaving) |
00:14:40 | Araq | flaviu: did you do any performance measurements for https://github.com/Araq/Nim/pull/1855 ? |
00:15:32 | flaviu | Araq: No, and 44a5899 wasn't supposed to have gotten in. |
00:15:41 | flaviu | But I'm working on my own PCRE library now |
00:16:23 | flaviu | I'll look at it again once I finish, sorry to keep you waiting. |
00:21:37 | * | saml_ quit (Quit: Leaving) |
00:25:40 | * | dain_ quit (Quit: dain_) |
00:27:15 | * | Shoozza left #nim ("Leaving") |
00:29:46 | * | dain_ joined #nim |
00:32:33 | * | dain_ quit (Client Quit) |
00:34:09 | * | BitPuffin joined #nim |
00:34:15 | * | bjz quit (Ping timeout: 264 seconds) |
00:35:15 | * | brson joined #nim |
00:37:55 | * | keyle joined #nim |
00:42:01 | keyle | dom96: I can help with web related things, I'm a web dev/designer by trade |
00:42:14 | keyle | (re forum, css, etc.) |
00:43:36 | keyle | Morning! |
00:43:54 | ekarlso- | keyle: packages stuff needs that too :D |
00:44:47 | keyle | as an early user, I didn't find the forum too bad. Searching the manual / lib pages is tougher. I'm thinking of ways to make that better. |
00:45:07 | ekarlso- | keyle: well, i'm doing a package index program atm |
00:45:44 | keyle | also nim needs recipes, or examples. Rosetta thing is a great start but hard to browse |
00:46:15 | keyle | ekarlso-: great, that's also what I was thinking |
00:46:25 | def- | keyle: yeah, terrible to browse. but you can get all the nim examples from it in an automated way if you want to do anything with them |
00:46:29 | def- | (i have a nim program to do that) |
00:46:31 | EXetoC | http://nim-by-example.github.io |
00:46:52 | keyle | EXetoC: sorry I had forgotton about nim-by-example |
00:46:53 | EXetoC | and we have many examples on rosetta |
00:47:14 | keyle | that needs a search |
00:47:27 | def- | http://rosettacode.org/wiki/Category:Nim |
00:47:27 | Triplefox | are all these things linked properly from the site |
00:47:35 | keyle | I'm not saying there isn't stuff, I'm saying it's hard to navigate, find |
00:47:46 | EXetoC | right |
00:48:58 | Triplefox | early on haxe mostly relied on a wiki...however one issue with this wiki was always that it was a homebrew thing so it didn't have all the features it needed |
00:49:23 | Triplefox | pages got lost in it pretty easily |
00:49:43 | keyle | I used haxe extensively as well. What it did have right is google indexing. |
00:50:11 | Triplefox | yes, i think i did rely on google for a lot of things |
00:50:52 | Triplefox | i remember looking up "flash haxe security" and finding the wiki page i had written on it two years prior that summarized everything you needed to know better than any other doc at the time, even the as3 specific ones |
00:51:24 | Triplefox | that was kind of gratifying cause i forgot i had done it the first time |
00:53:20 | keyle | anyways there are tons of ways to improve but nim is pretty great |
00:54:48 | keyle | ekarlso-: what is your plan with the package indexer |
00:56:38 | Triplefox | my plans for nim projects in the near future: build out a cube voxel renderer, some sound synthesis code, and then a game engine around that |
00:57:08 | Triplefox | right now i'm still the middle of doing rendering |
00:57:30 | Varriount | Araq: Is there some long running test that was recently introduced? I don't recall the test suite taking 2+ hours |
00:57:37 | keyle | sweet, but that's no small feat |
00:57:58 | EXetoC | maybe find out who was working on an engine before |
00:58:11 | EXetoC | about 2 guys did. I don't know if they got far |
00:58:23 | ekarlso- | keyle: make a program and a onepage app to register packages and releases |
00:58:42 | keyle | ekarlso-: like nimble and npm? |
00:58:58 | Triplefox | i'm not worried about anything after the rendering part, really. it's the only thing i haven't done myself before |
00:59:09 | Araq | Varriount: on the contrary I got rid of long running tests ... |
00:59:26 | keyle | Triplefox: impressive. So using OpenGL backing? |
00:59:46 | Triplefox | yeah, targeting GL 2.1 for higher compatibility |
01:00:00 | Triplefox | (really annoying to find accurate documentation for) |
01:00:47 | EXetoC | I think it's excessive these days |
01:03:57 | flaviu | re documentation search: http://nimlets.github.io/ |
01:04:12 | flaviu | I've added client-side javascript search, it works fairly well |
01:04:32 | keyle | ah! |
01:04:41 | flaviu | I don't actually have more than one example, but otherwise it works. |
01:05:18 | EXetoC | it accepts any string though |
01:12:33 | renesac | keyle: about the docs, you should talk with filwit, he had some great interface in development |
01:12:49 | renesac | but don't seem to have much time to work on it now |
01:13:33 | renesac | you could sort by all sorts of proprieties, etc |
01:13:48 | renesac | not sure if it went much beyond the mockup phase |
01:13:59 | Araq | pretty sure it didn't |
01:14:20 | Araq | so there is not much need to talk with filwit I think |
01:14:32 | flaviu | renesac: nope, it didn't get past that |
01:15:15 | keyle | I was thinking starting by a simple command line app |
01:15:34 | keyle | first run it indexes all of nim libs |
01:15:57 | keyle | ./nimhelp splitlines |
01:16:04 | keyle | shows the splitlines proc |
01:16:25 | keyle | ./nimhelp -args TType |
01:16:36 | keyle | shows the first 10 procs using TType as argument |
01:16:50 | keyle | with a -all for showing all |
01:16:51 | def- | keyle: wouldn't that be something that belongs in idetools? |
01:17:06 | renesac | if we had a working REPL, it could belong to it too |
01:17:09 | renesac | like in python |
01:17:12 | keyle | def-: probably, at the moment it's in my head |
01:17:28 | keyle | but as a new user, I feel like I need this |
01:17:30 | def- | I started working on a working REPL, will hopefully have time in a week to continue |
01:17:53 | * | HakanD quit (Quit: Be back later ...) |
01:17:59 | flaviu | def-: What technique were you using? |
01:18:00 | keyle | also a -source sends you to the github source file#L.123 |
01:18:17 | def- | flaviu: i'm trying to use tcc |
01:18:27 | flaviu | Ah, ok |
01:18:28 | keyle | once that nimhelp command line app is done, it can be used as a library, and use jester as a webservice |
01:18:41 | keyle | so then you can have a neat ajax search |
01:18:56 | renesac | Araq: still, the mockups were great and were discussed and improved uppon at least one time |
01:19:01 | renesac | someone have a link to them? |
01:19:07 | flaviu | http://reign-studios.net/philipwitte/nimrod/docs/docs.htm |
01:19:25 | renesac | thanks |
01:19:34 | flaviu | CSS is a bit over-the-top, but that's not a real problem. |
01:20:04 | flaviu | keyle: It may not be as easy as you imagine, but still, go for it! |
01:20:05 | keyle | not bad |
01:20:17 | flaviu | I'd be interested in seeing what comes out. |
01:20:46 | keyle | so it'd use git the first time to index nim contents |
01:21:08 | keyle | save all procs definitions as json or something |
01:21:19 | keyle | maybe |
01:22:02 | EXetoC | hash map? |
01:22:06 | keyle | it'd be neat to search for 'what takes a file and spits out a string' when you don't really know what you're after |
01:22:10 | EXetoC | might be really slow otherwise |
01:23:24 | keyle | how would you go about parsing the procs and ## doc? |
01:23:48 | keyle | using a bastardized lexer/parser or AST? |
01:24:11 | keyle | I'm guessing that's already done since we have lib.html |
01:25:02 | EXetoC | use the compiler |
01:25:12 | EXetoC | its api |
01:25:17 | * | bjz joined #nim |
01:27:59 | keyle | EXetoC: can you be more specific? |
01:28:00 | flaviu | I don't see a way to dump the AST of a compilation, a patched compiler is probably necessary. |
01:28:33 | keyle | generally, don't parser dump the comments anyway? so all the ## would be gone |
01:29:00 | def- | keyle: look how nim's documentation is parsed? |
01:29:00 | * | wrl left #nim (#nim) |
01:29:16 | keyle | looking at docgen2 now |
01:29:48 | * | Jesin quit (Quit: Leaving) |
01:30:03 | * | bjz quit (Read error: Connection reset by peer) |
01:30:14 | * | bjz joined #nim |
01:31:38 | * | Jesin joined #nim |
01:31:39 | * | bjz_ joined #nim |
01:31:42 | renesac | by the way, the docs css behave poorly with 1080 pixels width (portrait) |
01:31:54 | flaviu | What happened to nim pretty? |
01:32:18 | Araq | it got replaced by "nimfix" |
01:32:36 | def- | renesac: you're right, let me try to fix that |
01:32:39 | renesac | horizontal scroll bars on code snippets while there is relatively large blank spage on the sides |
01:32:56 | Araq | renesac: +1 |
01:33:07 | Araq | these scroll bars surely are annoying |
01:33:33 | def- | Araq: make the code snippets just go further right than the page then? |
01:33:49 | renesac | Araq: I tried running nimfix on winlean.nim & cia, and it didn't correct the PascalCase for the procs |
01:34:05 | Araq | keyle: I can give you 'nim json' easily |
01:34:24 | Araq | renesac: that's because nimfix is smart and knows that would break the importc |
01:34:31 | keyle | Araq: that'd save me tons of time |
01:34:51 | renesac | hum, can't it modify the importc to use a different name than nim? |
01:35:07 | Araq | renesac: that would be even smarter but is harder to do |
01:35:13 | renesac | ^^' |
01:35:17 | * | bjz quit (Ping timeout: 245 seconds) |
01:36:02 | Araq | I stopped working on nimfix once it could fix the compiler itself |
01:36:32 | Araq | was a huge amount of work already and if it's good enough for the compiler it's good enough for you :P |
01:36:32 | renesac | def-: for 1080 pixels at least there is plenity of white space in the sides to reduce |
01:36:38 | def- | renesac: yes, will do that |
01:36:56 | renesac | Araq: ok, not priority |
01:37:00 | def- | renesac: but i think the entire page should scroll right, not just the code snippets |
01:37:27 | Araq | def-: I don't care how you fix it |
01:37:28 | renesac | hum, a possibility |
01:37:52 | renesac | yeah, I think it is really more useful |
01:38:03 | renesac | the scroll be on the page as a whole |
01:38:37 | flaviu | renesac: I disagree |
01:38:40 | keyle | you can use responsive css so it works on ipad and iphones |
01:38:56 | flaviu | It already uses responsive, but it also needs to make margins more responsive |
01:41:12 | reactormonk | Araq, nice issue spree ;-) |
01:42:11 | Araq | reactormonk: still looking for interesting bugs |
01:44:54 | reactormonk | Any way to encode "I need proc X, Y and Z defined for for the generic T"? |
01:45:18 | Araq | reactormonk: typeclasses or a 'when compiles' in the generic proc |
01:45:32 | flaviu | reactormonk: http://nim-lang.org/manual.html#user-defined-type-classes |
01:46:44 | Araq | Varriount: is is too late to consider to revive nimbuild instead of whatever-we-have-now ? |
01:46:45 | reactormonk | will do, thanks |
01:47:44 | * | jpoirier quit (Ping timeout: 245 seconds) |
01:48:44 | * | jpoirier joined #nim |
01:53:25 | * | bjz_ quit (Max SendQ exceeded) |
01:56:24 | * | bjz joined #nim |
01:56:27 | Araq | jpoirier: explain https://github.com/Araq/Nim/issues/1819 please |
02:04:57 | * | MrOrdinaire joined #nim |
02:07:08 | * | brson quit (Quit: leaving) |
02:07:16 | flaviu | .eval import re; let tre = re""; echo(split("123", tre)) |
02:07:21 | Mimbus | flaviu: @[123] |
02:07:41 | flaviu | shouldn't that result in @["1", "2", "3"] instead? |
02:08:06 | Araq | your splitter is empty |
02:08:12 | flaviu | Exactly. |
02:08:18 | Araq | so it doesn't split |
02:08:24 | flaviu | It has a 0-length match at every point. |
02:08:46 | Araq | so that's ["", "", "", "", ...] then |
02:09:04 | Araq | an infinite sequence is rather hard to handle with a computer |
02:09:35 | flaviu | man7.org/linux/man-pages/man3/pcreapi.3.html |
02:09:43 | flaviu | ctrl-f "Finding all the matches in a subject" |
02:11:12 | Araq | so? |
02:11:28 | Araq | our re uses pcre as an implementation detail |
02:11:57 | Araq | we don't have to care for weirdnesses like you quoted |
02:13:04 | jpoirier | Araq: look at the output on the page in the advanced commands section, http://nim-lang.org/nimc.html |
02:13:11 | flaviu | Javascript does the same thing as is described there. |
02:13:48 | Araq | jpoirier: yes, some switches belong to the 'idetools' mode |
02:13:50 | flaviu | perl does the same thing |
02:14:20 | Araq | flaviu: so fix it. nevertheless an empty spitter might as well raise an exception |
02:14:35 | flaviu | PCRE is a whole lot more than an implementation detail. |
02:14:59 | flaviu | Araq: I'm currently fixing it for my own library, but I wanted to mention it. |
02:15:26 | Araq | flaviu: and I'm very grateful for that. |
02:15:34 | flaviu | And there's no way to determine if a splitter is empty |
02:15:41 | flaviu | r" ?" |
02:15:51 | flaviu | is that empty? Depends on the context. |
02:16:32 | Araq | well I can test for an empty string at least. maybe you can't but it's possible, trust me. |
02:17:19 | flaviu | Araq: Actually, you're right! |
02:17:21 | flaviu | PCRE_INFO_MATCH_EMPTY |
02:17:44 | flaviu | I don't like the idea of restricting the user, but it's possible. |
02:19:26 | Araq | I don't like the idea of using a regex package that doesn't know about this article: http://swtch.com/~rsc/regexp/regexp1.html |
02:20:16 | flaviu | Araq: I've seen it. |
02:20:53 | flaviu | I can add a flag for pcre_dfa_exec if there's interest. |
02:21:39 | flaviu | But you can tell PCRE to give up after a set amount of work anyway. |
02:21:52 | flaviu | So that you help mitigate DOS attacks |
02:22:33 | * | girvo joined #nim |
02:22:36 | girvo | Hi all :) |
02:23:14 | flaviu | hey girvo, welcome! |
02:24:02 | girvo | quick q: I'm having fun translating C++ SDL tutorials into Nim, however I'm curious what I should be doing to check for "nullptr" in nim? |
02:24:18 | girvo | Is it just `if (window == nil):` ? |
02:24:18 | Araq | nil |
02:24:24 | girvo | Yeah I figured, perfect! |
02:24:30 | Araq | if window == nil: |
02:24:35 | Araq | get rid of the () |
02:24:39 | girvo | hah yeah, oops :) |
02:25:06 | girvo | Nim has come a long way, so nice to use now. Very impressed :) |
02:25:16 | girvo | (not that it wasn't nice before, mind you!) |
02:25:32 | flaviu | http://www.pcre.org/original/doc/html/pcredemo.html |
02:25:42 | flaviu | doing a proper find is ugly |
02:26:57 | girvo | This is more of a lib question, but SDL_Init returns something of the type SDL_Return, what's the best way to check for if it's failed? |
02:27:11 | * | Trustable quit (Quit: Leaving) |
02:27:16 | girvo | `if init != true:` is what I'm currently using and it seems to work, but that was me just guessing |
02:28:01 | girvo | I see it's got a toBool rter |
02:28:23 | girvo | Oh, never mind, answered my own question :3 |
02:28:24 | girvo | ` SDL_Return* {.size: sizeof(cint).} = enum SdlError = -1, SdlSuccess = 0 ##\ |
02:30:15 | girvo | I absolutely love being able to do `tex.DestroyTexture |
02:30:30 | girvo | So much nicer than `SDL_DestroyTexture(tex)` everywhere |
02:31:32 | def- | "tex.destroy" or "destroy tex" should also work |
02:32:20 | girvo | beautiful, cheers |
02:35:21 | girvo | I notice in the sdl2.nim file, it says that SDL will be statically linked, is that correct? If so, that's freakin' awesome :D |
02:35:25 | girvo | (on OSX) |
02:36:17 | Araq | that's possible |
02:36:48 | Araq | it's always possible via dynlibOverride but maybe sdl 2 doesn't even need that |
02:39:22 | Araq | good night |
02:43:02 | girvo | Night :) |
02:43:19 | jpoirier | Araq: proper looking output https://gist.github.com/jpoirier/31076f15ac14147a9802 |
02:44:29 | Varriount | gokr1: Ping |
02:46:15 | Varriount | jpoirier: +1 |
02:46:38 | girvo | Now I'm in over my head; trying to write a generic `cleanup` proc that takes a vararg set of SDL items and calls the appropriate destroy function for it |
02:46:51 | MyMind | an equivalent to erand48() ? |
02:47:10 | Varriount | MyMind: It would help if I knew what erand480 does. |
02:47:27 | MyMind | http://linux.about.com/library/cmd/blcmdl3_erand48.htm |
02:47:30 | Varriount | girvo: Could you explain a bit more? I might be able to help. |
02:47:58 | Varriount | girvo: Do the random numbers need to be cryptographically random? |
02:48:03 | MyMind | functions return non-negative double-precision floating-point values uniformly distributed between [0.0, 1.0). |
02:48:03 | girvo | Varriout, sure :) http://www.willusher.io/sdl2%20tutorials/2014/08/01/postscript-1-easy-cleanup/ |
02:48:23 | Varriount | MyMind: : Do the random numbers need to be cryptographically random? |
02:48:34 | girvo | The way I'm trying to do it, is to have a top level "cleanup" proc that takes a vararg, and calls an overloaded internal "cleanup" function (based on the type of the current item) |
02:48:53 | MyMind | don't think so Varriount |
02:48:55 | girvo | Ignore the shitty code: |
02:49:12 | Varriount | girvo: Does this require variadic types? |
02:49:14 | * | MrOrdinaire quit (Remote host closed the connection) |
02:49:14 | girvo | http://hastebin.com/lewaqebubi.nim |
02:49:22 | girvo | I don't know :) |
02:50:34 | Varriount | MyMind: Look at the math module and the mersenne module. |
02:51:01 | Varriount | girvo: What's the problem with that code? |
02:51:44 | Varriount | girvo: If you need to dispatch on the *runtime* type of a type instance, use a method |
02:51:59 | gmpreussner | what's the best practices for adding long (multi-line) code comments for field names in type declarations? do they start after the field declaration, or on the next line? |
02:52:28 | girvo | Haha I don't know if theres anything wrong with my code, I'm just a bit rusty with Nim :P |
02:52:50 | girvo | The types of all of the items are defined at compile time anyway |
02:53:11 | girvo | But I want the cleanup() proc to take any amount of the items (all different types) |
02:54:39 | Varriount | gmpreussner: https://gist.github.com/Varriount/21316c1c99e07ceb0244 |
02:55:00 | Varriount | gmpreussner: I don't know if you can do it the other way (though, if you can't, open an issue for it) |
02:55:41 | Varriount | girvo: Do the types share a commong parent type? |
02:55:48 | Varriount | *common |
02:56:09 | gmpreussner | Varriount: i added a comment |
02:56:36 | gmpreussner | the problem is that some of the field declarations are rather long |
02:56:44 | gmpreussner | i'd rather start the comment on the next line, if that works |
02:56:44 | girvo | It doesn't look like it Varriount, thats the first thing I tried to find |
02:56:56 | girvo | well, the "shared" base is `ptr object` |
02:57:02 | girvo | Which is a bit too general it seems ;) |
02:57:04 | Varriount | gmpreussner: You can't, not with a doc-comment. |
02:57:38 | Varriount | gmpreussner: You can do it with an ordinary comment, but that doesn't end up in the AST |
02:57:40 | flaviu | math.random is technically wrong, but practically it's close enough. |
02:57:55 | Varriount | gmpreussner: Please open an issue for that. |
02:59:10 | Varriount | girvo: You *might* be able to use methods, in combination with a conversion. |
03:00:23 | Varriount | girvo: A surefire way would be to embed a reference to the cleanup procedure in each type's structure. |
03:00:44 | * | rpag joined #nim |
03:00:48 | girvo | Hm, not a bad idea |
03:01:27 | Varriount | girvo: Also, remember the tradeoffs for dynamic method dispatch VS direct dispatch |
03:01:35 | girvo | grr I can't seem to get varargs to work |
03:02:03 | Varriount | girvo: Write a conversion procedure which converts/casts the given type to a ptr object |
03:03:15 | Varriount | girvo: Methods have a O(n) overhead, with n being the number of types that could be dispatched from. |
03:03:31 | girvo | Here's what I've got: http://hastebin.com/ixanoxeviv.nim |
03:03:37 | girvo | Which doesn't work |
03:03:43 | girvo | Probably because I've no idea what I'm doing ;) |
03:03:43 | flaviu | What is the standard order of the needle and haystack for nim? |
03:04:11 | Varriount | flaviu: No idea. I want to say (haystack, needle), but please check. |
03:04:20 | girvo | this is the compilation error: http://hastebin.com/iqavelezeg.bash |
03:05:46 | Varriount | girvo: Try this: http://hastebin.com/viguyajube.coffee |
03:07:19 | Varriount | girvo: If the compiler doesn't like having the cast in the varargs, wrap it in a 'proc castToPtr[T](elem: T): ptr object = cast[ptr object](elem)' |
03:07:20 | * | ajhager joined #nim |
03:07:21 | flaviu | Varriount: Yes, it seems that the majority of functions are haystack, needle. |
03:07:22 | girvo | `postscript1.nim(21, 48) Error: '(' expected` |
03:07:58 | Varriount | girvo: Wrap it then. |
03:08:16 | girvo | Trying that now :) |
03:08:20 | girvo | I appreciate your help btw |
03:08:31 | flaviu | Maybe needle-haystack order would make a good addition to NEP 1 |
03:08:57 | Varriount | flaviu: I'm wondering if I should change 'style guide' to 'convention guide' or something |
03:09:12 | Varriount | Or maybe make a second page with good practices? |
03:09:27 | girvo | Interesting: postscript1.nim(6, 4) Error: cannot instantiate: 'result:type' |
03:09:51 | keyle | as a new user I had been seeking best practices |
03:10:07 | Varriount | keyle: If we were to write such a page, where should we post the link? |
03:10:33 | keyle | it's more about making sure it's found via google |
03:10:39 | Varriount | I'm going on a 4 hour bus ride tomorrow, so I'd have google. |
03:10:47 | keyle | nimrod anything: god and religion - wtf |
03:10:57 | keyle | nim anything: nothing good |
03:11:04 | Varriount | keyle: Oh sure, let me just ask my contact at google to bump up our search score. :/ |
03:11:11 | keyle | hehe |
03:11:14 | keyle | I can help with that |
03:11:15 | girvo | haha |
03:11:31 | flaviu | Varriount: Google provides tools to help you with that, but dom96 hasn't set it up yet |
03:11:43 | keyle | imho it's critical |
03:11:44 | flaviu | https://www.google.com/webmasters/tools/home?hl=en |
03:12:00 | girvo | I've been doing what I needed to do for searching go stuff: `nim lang` instead of just `nim` (sometimes `nimrod lang`) |
03:12:34 | Varriount | girvo, keyle: Well, we just switched from 'Nimrod' to 'Nim', so the search bots haven't crawled and indexed everything yet. |
03:12:41 | girvo | Yeah exactly :) |
03:12:56 | keyle | I usually go from manual.html, lib.html, forum search and in desperation, the nim repo |
03:12:58 | Varriount | girvo, keyle: You two do know we have a style guide, right? |
03:14:11 | keyle | I didn't |
03:14:32 | flaviu | I've sent a message to that MIT website that mirrors the Nim docs |
03:14:34 | * | jefus__ joined #nim |
03:14:35 | keyle | I format mine based off the nim source as convention |
03:14:48 | flaviu | hopefully they take it down soon, that should help google a bit. |
03:14:54 | keyle | flaviu: fantastic |
03:15:36 | keyle | Varriount: this is why I asked whether nim had a nimfmt, a la gofmt |
03:15:53 | keyle | something you run on a directory, opens all nim files, formats it nicely |
03:15:58 | flaviu | What happened to nim pretty? |
03:16:49 | Varriount | flaviu: Replaced by nimfix. |
03:16:58 | Varriount | flaviu: I don't know if that does formatting. |
03:17:30 | keyle | It can also check that your identifiers adhere to the official style guide and optionally modify them to do so (via --styleCheck:auto). |
03:17:31 | girvo | Oh, calling a proc that has a single varargs argument (with type T), am I supposed to wrap in it []? (ie. `cleanup([bmp, tex])`? |
03:17:36 | girvo | Or am I crazy? |
03:18:01 | Varriount | girvo: You shouldn't have to. |
03:18:14 | gmpreussner | is there a way to override the alignment of objects? |
03:18:19 | * | jefus_ quit (Ping timeout: 264 seconds) |
03:18:22 | girvo | Because without it, it seems to not overload properly |
03:18:40 | girvo | I've changed the name of the top-level proc to remove that overload temporarily |
03:18:45 | gmpreussner | i was looking for something like {.align: 8.} but couldn't find anything :| |
03:19:15 | Varriount | gmpreussner: I don't think so, sorry. |
03:19:19 | girvo | With the castToPtr in it I get this error (which I'm unsure what it means): Error: cannot instantiate: 'result:type' |
03:19:41 | gmpreussner | Varriount: hmmk... i'll file another issue |
03:20:21 | EXetoC | girvo: if there's a collision then yes you probably need [] then |
03:20:24 | Varriount | girvo: Could you just past the actual file? It would be much easier for me. |
03:20:37 | Varriount | *paste |
03:21:07 | girvo | Sure :) |
03:21:26 | girvo | http://hastebin.com/hodapimati.nim |
03:21:35 | girvo | Ignore my horrid code, I'm learning again :) |
03:22:05 | girvo | Oh, the runCleanup(tex) command should be runCleanup(tex, bmp, renderer, win) |
03:22:13 | * | darkf joined #nim |
03:22:38 | girvo | wrapping the runCleanup call in [] gives this: |
03:22:39 | girvo | Error: type mismatch: got (PSurface) but expected 'PTexture' |
03:23:21 | girvo | So it looks like I've overloaded incorrectly perhaps? |
03:23:37 | keyle | Varriount: has any effort been made to bring a nim compiler on a web page? |
03:23:53 | Varriount | keyle: The closes we have is the Mimbus IRC bot |
03:24:17 | keyle | how does Mimbus handle security, ignores "import os" and such? |
03:24:36 | Varriount | keyle: Ask flaviu. I believe he has it sandboxed |
03:24:50 | keyle | !eval while true: echo 1; |
03:24:59 | keyle | ok |
03:25:11 | Varriount | .eval echo(1) |
03:25:12 | girvo | !eval echo("Hello, world") |
03:25:14 | Mimbus | Varriount: 1 |
03:25:16 | girvo | .eval echo("Hello, world") |
03:25:19 | Mimbus | girvo: Hello, world |
03:25:25 | girvo | Hah, cool. |
03:25:38 | Varriount | If you guys need to use it a lot, go to #nim-offtopic |
03:25:45 | keyle | .eval for i in 1..10: echo $i |
03:25:48 | Mimbus | keyle: eval.nim(3, 21) Error: type mismatch: got (proc (varargs[expr]){.locks: 0.}, int) |
03:26:10 | Varriount | girvo: I don't know what problem the compiler is having. |
03:26:12 | keyle | yep ok |
03:26:26 | Varriount | girvo: You could also try a template. |
03:26:38 | girvo | Yeah I think a template will be the way to go |
03:26:51 | girvo | That's how it's done in the original C++ code, though their templates are different to nims iirc :P |
03:27:53 | girvo | I'll leave it for now, it's not super important, and come back to it later. I'm translating all of this tutorial sets code: http://www.willusher.io/sdl2%20tutorials/2013/08/17/lesson-2-dont-put-everything-in-main/ |
03:27:59 | girvo | So that I can write it up for Nim instead :) |
03:28:22 | girvo | Translating between the two has been a lot easier than I imagined, considering how rusty I am with nim |
03:28:43 | * | VinceAddons quit (Read error: Connection reset by peer) |
03:28:51 | girvo | And the end result code is much cleaner than the C++, while being basically as fast and far easier to comprehend -- this is why I love Nim haha |
03:33:59 | girvo | And gosh Nim plays nicely with Make |
03:36:16 | Varriount | girvo: Eeew, you said the unfun word |
03:38:40 | * | girvo quit (Ping timeout: 244 seconds) |
03:38:51 | Varriount | ._. |
03:56:36 | * | djruffkutz joined #nim |
03:57:35 | * | djruffkutz quit (Excess Flood) |
04:01:37 | * | sillesta quit (Ping timeout: 246 seconds) |
04:02:22 | keyle | are _variable forbidden? |
04:02:43 | def- | yes |
04:03:06 | keyle | what was the thinking behind that? |
04:03:13 | def- | http://nim-lang.org/manual.html#identifiers-keywords |
04:03:45 | keyle | thx |
04:05:05 | * | girvo joined #nim |
04:14:36 | * | JinShil quit (Quit: Konversation terminated!) |
04:16:07 | * | JinShil joined #nim |
04:17:14 | * | JinShil quit (Client Quit) |
04:17:50 | flaviu | keyle: I have it set up as it's own user |
04:18:03 | flaviu | It's not really sandboxed, but it can't access any of my personal information |
04:18:28 | * | HakanD joined #nim |
04:18:29 | flaviu | .eval echo(readFile("/etc/passwd")) |
04:18:32 | Mimbus | flaviu: root:x:0:0:root:/root:/usr/bin/zsh |
04:18:32 | * | Mimbus quit (Excess Flood) |
04:18:38 | * | Mimbus joined #nim |
04:18:40 | keyle | heh |
04:19:05 | flaviu | .eval echo(readFile("/home/user/file.md")) |
04:19:08 | Mimbus | flaviu: Error: unhandled exception: cannot open: /home/user/file.md [IOError] |
04:19:34 | keyle | for a web version like this https://play.golang.org/ |
04:19:40 | keyle | it'd probably be better sandboxed |
04:19:43 | flaviu | Yep |
04:19:48 | flaviu | linux containers or something |
04:19:48 | * | JinShil joined #nim |
04:20:08 | keyle | just strip out contents before compiling nim |
04:20:15 | flaviu | but here, we can just ban people who really try to exploit it. |
04:20:25 | keyle | indeed |
04:21:00 | flaviu | anyway, it's bedtime. Good night. |
04:23:07 | * | HakanD quit (Ping timeout: 264 seconds) |
04:29:07 | * | girvo quit (Ping timeout: 264 seconds) |
05:01:59 | * | gmpreussner_ joined #nim |
05:02:10 | * | AMorpork is now known as AFKMorpork |
05:02:13 | * | gmpreussner quit (Ping timeout: 264 seconds) |
05:04:45 | * | vendethiel quit (Ping timeout: 244 seconds) |
05:07:40 | * | gmpreussner__ joined #nim |
05:08:13 | * | gmpreussner_ quit (Ping timeout: 264 seconds) |
05:08:37 | * | EXetoC quit (Ping timeout: 245 seconds) |
05:16:16 | * | FreedomOverdose joined #nim |
05:24:16 | * | kapil__ joined #nim |
05:44:09 | keyle | any ideas why? http://hastebin.com/okunopiyic.bash |
05:47:49 | * | FreedomOverdose quit (Quit: Leaving) |
05:48:31 | * | MrOrdinaire joined #nim |
05:48:47 | def- | keyle: echo(...) |
05:48:51 | def- | or use strong spaces |
05:49:13 | def- | the $ binds differently than expected |
05:49:31 | keyle | ah makes sense now, thanks |
05:50:39 | def- | but you don't need to write $list.len here anyway |
05:50:49 | def- | just write it like this: echo list.len, " results" |
05:51:08 | def- | echo automatically converts all its arguments to a string using `$` |
05:51:23 | keyle | ah |
05:51:25 | * | MrOrdinaire quit (Client Quit) |
05:51:34 | keyle | I've been using `&` |
05:51:50 | keyle | thanks |
05:52:10 | def- | you're welcome. I'm off |
05:59:02 | * | gmpreussner__ quit (Ping timeout: 245 seconds) |
05:59:13 | * | gmpreussner__ joined #nim |
06:10:39 | * | gmpreussner___ joined #nim |
06:11:33 | * | gmpreussner__ quit (Ping timeout: 252 seconds) |
06:28:37 | * | BitPuffin quit (Ping timeout: 265 seconds) |
06:40:58 | * | Demos quit (Read error: Connection reset by peer) |
06:45:54 | * | Demon_Fox quit (Quit: Leaving) |
06:59:10 | * | gmpreussner joined #nim |
06:59:13 | * | gmpreussner___ quit (Ping timeout: 252 seconds) |
06:59:40 | * | gour joined #nim |
07:06:51 | * | gour quit (Remote host closed the connection) |
07:08:53 | * | kniteli quit (Ping timeout: 240 seconds) |
07:13:12 | * | gour joined #nim |
07:25:37 | * | kniteli joined #nim |
07:26:41 | * | HakanD joined #nim |
07:35:04 | * | HakanD quit (Quit: Be back later ...) |
07:36:16 | * | brson joined #nim |
07:37:04 | * | brson quit (Client Quit) |
08:10:14 | * | SplinterOfChaos quit (Ping timeout: 245 seconds) |
08:23:55 | * | gokr1 quit (Quit: Leaving.) |
08:27:53 | * | johnsoft quit (Ping timeout: 240 seconds) |
08:34:37 | * | keyle_mac joined #nim |
08:36:03 | * | HakanD joined #nim |
08:37:05 | keyle | compiling nim on a mac from git devel, I get this : http://hastebin.com/noyebosama.sm - any ideas? |
08:37:23 | keyle | (following the website steps) |
08:37:43 | keyle | I did notice it used clang tho... |
08:38:41 | dtscode | care to paste all of the terminal output starting with the git clone git://github.com/Araq/nim/ ? |
08:38:54 | dtscode | because right now i say its a build error, but i would like to be sure |
08:39:04 | keyle | ok |
08:40:40 | keyle_mac | dtscode: http://hastebin.com/elenevogut.md |
08:40:57 | dtscode | k hold on |
08:41:25 | keyle | no worries thank you :) |
08:43:12 | * | HakanD quit (Ping timeout: 245 seconds) |
08:43:52 | dtscode | yes my best bet would be a build issue. i have three recommendations |
08:44:18 | dtscode | the first, open an issue on the repo documenting what you did (ie link to the hastebin) and the issue |
08:44:30 | dtscode | the second, try building master, since that should work |
08:44:42 | dtscode | the third, wait for someone to come on who might be able to help more |
08:45:23 | keyle | thanks |
08:45:32 | dtscode | np |
08:45:45 | keyle | I wanted devel because various stdlib have been fixed and I need those fixes |
08:45:52 | keyle | had the issue on PC |
08:47:39 | dtscode | o rly? hmmm... windows? |
08:48:30 | keyle | the devel build is ok on windows |
08:48:41 | dtscode | what do you mean had the issue on pc then |
08:48:42 | dtscode | ? |
08:49:04 | keyle | compiling with nim master, some packages have issues |
08:49:15 | dtscode | oic |
08:49:15 | keyle | devel has the fixes |
08:49:47 | dtscode | whats the current version? |
08:49:54 | keyle | https://github.com/Araq/Nim/issues/1932 |
08:50:08 | keyle | hm |
08:50:36 | * | HakanD joined #nim |
08:50:38 | dtscode | i wonder... |
08:50:44 | dtscode | do you have gcc installed/ |
08:50:48 | keyle | 0.10.3 (2015-01-11) [Linux: amd64] |
08:51:13 | keyle | yep |
08:51:20 | dtscode | ok, i have one more idea. since 10.3 builds fine for me |
08:51:27 | dtscode | ok, what does echo $CC say? |
08:51:42 | keyle | blank line |
08:51:51 | dtscode | oh wait |
08:53:31 | dtscode | hold on. im trying to remmeber the env variable for the system compiler |
08:55:14 | * | ajhager quit (Ping timeout: 245 seconds) |
09:00:55 | * | gsingh93 quit (Quit: Connection closed for inactivity) |
09:01:46 | dv- | gcc 0.10.3? i think that might be a bit out of date |
09:02:24 | dtscode | dv-, nim |
09:04:05 | keyle_mac | export CC=gcc-4.2 |
09:04:06 | dv- | oh, haha |
09:04:09 | keyle_mac | didn' t help |
09:04:26 | keyle_mac | still uses clang |
09:04:30 | keyle_mac | I should see gcc no? |
09:05:12 | dtscode | keyle, thats what i thought, but i guess im wroong. i cant figure out how to get it to use gcc :/ |
09:05:23 | dtscode | oh duh |
09:05:32 | keyle_mac | http://stackoverflow.com/questions/6796982/clang-and-the-default-compiler-in-os-x-lion |
09:05:34 | dtscode | alias clang=gcc |
09:05:35 | keyle_mac | this might do it |
09:06:55 | dtscode | run that command in your terminal and then try it again |
09:08:49 | keyle | still says clang! |
09:08:56 | dtscode | it should |
09:09:05 | dtscode | but internally it *should* be using gcc |
09:09:10 | keyle | oh |
09:09:32 | keyle | sadly same result |
09:09:38 | keyle | I gtg, thanks for the help |
09:09:43 | dtscode | hmmm.... yeah im out of ideas then |
09:09:48 | dtscode | later and good luck |
09:10:52 | * | z1y joined #nim |
09:12:04 | * | gmpreussner|work quit (Ping timeout: 246 seconds) |
09:13:07 | * | z1y quit (Remote host closed the connection) |
09:13:45 | * | z1y joined #nim |
09:14:10 | * | keyle_mac quit (Ping timeout: 246 seconds) |
09:19:38 | * | girvo joined #nim |
09:24:33 | * | BitPuffin joined #nim |
09:29:13 | * | BitPuffin quit (Ping timeout: 264 seconds) |
09:29:13 | * | ashersyed joined #nim |
09:32:57 | * | ashersyed quit () |
09:33:33 | * | z1y1 joined #nim |
09:34:52 | * | z1y quit (Ping timeout: 245 seconds) |
09:41:58 | Araq | gmpreussner: use ## \ |
09:43:07 | Araq | dtscode: we just dicussed nim doesnt use the CC environment variable |
09:43:37 | * | z1y1 quit (Ping timeout: 264 seconds) |
09:43:40 | dtscode | Araq, i just got off of a 10 hour work shift with incompetent employees, so i probably missed it |
09:48:39 | * | gokr joined #nim |
09:48:45 | * | gokr quit (Read error: Connection reset by peer) |
09:49:25 | * | gokr joined #nim |
09:49:51 | * | girvo quit (Ping timeout: 264 seconds) |
09:56:45 | * | BlaXpirit joined #nim |
10:05:07 | * | z1y joined #nim |
10:13:09 | * | MrOrdinaire joined #nim |
10:14:10 | * | MrOrdinaire quit (Client Quit) |
10:19:59 | * | brson joined #nim |
10:21:35 | * | kapil__ quit (Quit: Connection closed for inactivity) |
10:44:54 | * | gokr quit (Quit: Leaving.) |
10:49:12 | * | UberLambda joined #nim |
10:49:53 | * | UberLambda quit (Client Quit) |
10:52:23 | * | bjz quit (Ping timeout: 240 seconds) |
10:53:06 | * | bjz joined #nim |
10:55:38 | * | brson quit (Quit: leaving) |
10:56:22 | * | minciue joined #nim |
10:56:56 | * | VinceAddons joined #nim |
11:02:33 | * | kapil__ joined #nim |
11:16:23 | * | z1y left #nim (#nim) |
11:17:21 | * | gour_ joined #nim |
11:20:52 | * | gour quit (Ping timeout: 240 seconds) |
11:23:50 | * | gour_ is now known as gour |
11:26:01 | * | girvo joined #nim |
11:27:20 | * | Trustable joined #nim |
11:28:25 | ekarlso- | keyle: more like the registry part of npm |
11:28:29 | ekarlso- | nimble is the client |
11:30:08 | * | z1y joined #nim |
11:44:13 | * | girvo quit (Ping timeout: 264 seconds) |
11:50:14 | * | Matthias247 joined #nim |
11:56:58 | * | girvo joined #nim |
12:19:17 | * | keyle_mac joined #nim |
12:25:18 | * | sillesta joined #nim |
12:27:29 | * | z1y quit (Quit: Leaving.) |
12:27:38 | * | z1y joined #nim |
12:29:23 | keyle | Araq: responded to 1932 |
12:30:26 | Araq | good but I'm not here. |
12:30:52 | keyle | ekarlso-: ok |
12:31:26 | keyle | Is there a nightly system for builds win/mac/linux for nim? |
12:33:13 | * | z1y quit (Ping timeout: 244 seconds) |
12:35:42 | Araq | yes but we replaced the old system "nimbuild" with a python based that doesn't work at all |
12:36:28 | Araq | the idea was to free dev resources |
12:36:54 | Araq | now people want to repeat this success story with the documentation builder |
12:37:43 | keyle | that'd be handy to just go pick up the latest nightly compiler instead of stuffing around with my mac |
12:40:15 | Araq | keyle do this please |
12:40:20 | Araq | gdb bin/nim |
12:40:23 | Araq | run c koch |
12:40:32 | Araq | --> attach this stack trace |
12:40:46 | keyle | ah |
12:42:19 | keyle_mac | Araq: http://hastebin.com/uyequvofam.coffee |
12:43:01 | Araq | is that a 32 bit setup? |
12:43:28 | MyMind | what does it mean |
12:43:30 | MyMind | Error: internal error: GetUniqueType |
12:43:32 | MyMind | No stack traceback available |
12:43:34 | MyMind | ? |
12:43:39 | keyle_mac | this mac was the first gen intel mac |
12:44:01 | Araq | MyMind: it means you typed 'var x = int' instead of 'var x: int' |
12:44:15 | MyMind | but doesnt show the line |
12:44:16 | * | Sphax joined #nim |
12:44:32 | keyle_mac | 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 |
12:44:39 | Araq | keyle_mac: sorry that's still not a stack trace |
12:44:45 | Araq | type 'bt' in gdb |
12:45:03 | Araq | MyMind: well an internal error is a bug too of course |
12:45:30 | Araq | and this GetUniqueType bug should really be a showstopper by now I guess |
12:46:02 | keyle_mac | http://hastebin.com/otivivogah.coffee |
12:46:15 | MyMind | should be full of bugs its my first attempt https://gist.github.com/Sembei/7f58ab6e1c84f5d5300e |
12:49:19 | Araq | keyle_mac: print *ol |
12:50:52 | * | vendethiel joined #nim |
12:52:04 | keyle_mac | http://hastebin.com/lejusucoyo.pl |
12:52:42 | Araq | keyle_mac: ok that's all very interesting :-) |
12:52:52 | Araq | you got some very nice corruption here |
12:52:56 | keyle_mac | 27 instead of 28? |
12:53:09 | Araq | but I need to go now, see you later |
12:53:18 | keyle_mac | will update ticket, thanks |
12:53:19 | Araq | no the typ has 'address' 0x36 |
12:53:42 | keyle_mac | ok |
12:59:55 | * | EXetoC joined #nim |
13:00:08 | * | keyle_mac quit (Quit: Page closed) |
13:05:05 | * | HakanD quit (Quit: Be back later ...) |
13:13:34 | * | keyle_ joined #nim |
13:17:23 | * | keyle quit (Ping timeout: 272 seconds) |
13:17:45 | * | keyle_ quit (Client Quit) |
13:27:02 | ekarlso- | wonder how hard it would be to add package registration to nimble |
13:27:12 | ekarlso- | nimble register in a current directory would push it up |
13:29:53 | * | HakanD joined #nim |
13:32:48 | * | gmpreussner_ joined #nim |
13:33:19 | * | gmpreussner quit (Ping timeout: 264 seconds) |
13:37:50 | * | kokozedman quit (Quit: WeeChat 0.3.7) |
13:38:45 | * | CARAM__ quit (Read error: Connection reset by peer) |
13:40:12 | * | CARAM__ joined #nim |
13:41:46 | * | BitPuffin joined #nim |
13:51:39 | * | nickles joined #nim |
13:54:08 | nickles | *: Trying to compile third sample from the manual "Special Types; static[T]" fails. Should that work already? |
13:55:55 | flaviu | http://nim-lang.org/unicode.html#runeLenAt,string,int doesn't appear to deal well with malformed input |
13:57:05 | flaviu | ie, 0b1100_0000 0b0010_1010 will return 2 instead of raising an error. |
13:58:27 | EXetoC | nickles: I assume it has worked at some point |
13:58:51 | flaviu | Also, UTF-8 apparently doesn't support 5-6 byte encoding |
13:59:01 | * | brson joined #nim |
14:01:27 | * | z1y joined #nim |
14:01:57 | * | Jesin quit (Quit: Leaving) |
14:04:18 | * | gmpreussner__ joined #nim |
14:04:40 | * | gmpreussner_ quit (Ping timeout: 244 seconds) |
14:17:45 | * | gmpreussner___ joined #nim |
14:17:47 | * | gmpreussner__ quit (Ping timeout: 244 seconds) |
14:24:18 | * | jpoirier quit (Ping timeout: 244 seconds) |
14:29:15 | * | gmpreussner joined #nim |
14:30:07 | * | gmpreussner___ quit (Ping timeout: 256 seconds) |
14:32:27 | * | nickles quit (Quit: Page closed) |
14:36:21 | * | jpoirier joined #nim |
14:38:27 | * | z1y quit (Ping timeout: 264 seconds) |
14:38:43 | * | gmpreussner quit (Ping timeout: 264 seconds) |
14:41:07 | * | gmpreussner joined #nim |
14:43:20 | * | Jesin joined #nim |
14:56:10 | * | Etheco- joined #nim |
14:59:35 | * | ramnes_ joined #nim |
15:03:54 | * | Etheco quit (Ping timeout: 264 seconds) |
15:03:54 | * | ramnes quit (Ping timeout: 264 seconds) |
15:03:54 | * | BitPuffin quit (Ping timeout: 264 seconds) |
15:10:05 | * | brson quit (Quit: leaving) |
15:12:14 | * | leavengood joined #nim |
15:12:38 | * | leavengood is now known as Guest55090 |
15:16:29 | * | girvo quit (Ping timeout: 244 seconds) |
15:16:47 | * | Guest55090 quit (Ping timeout: 252 seconds) |
15:18:39 | * | ajhager joined #nim |
15:19:46 | * | HakanD quit (Quit: Be back later ...) |
15:21:41 | * | gmpreussner_ joined #nim |
15:22:31 | * | gmpreussner quit (Ping timeout: 264 seconds) |
15:25:15 | * | HakanD joined #nim |
15:29:09 | * | gmpreussner__ joined #nim |
15:29:24 | * | gmpreussner_ quit (Ping timeout: 245 seconds) |
15:30:25 | * | Etheco- quit (Read error: Connection reset by peer) |
15:31:55 | * | z1y joined #nim |
15:32:00 | * | Etheco joined #nim |
15:35:38 | * | JinShil quit (Quit: Konversation terminated!) |
15:39:15 | * | [CBR]Unspoken quit (Ping timeout: 256 seconds) |
15:48:34 | * | jpoirier quit (Quit: Leaving) |
15:49:03 | * | z1y quit (Ping timeout: 252 seconds) |
15:52:42 | * | BitPuffin joined #nim |
15:56:33 | * | gokr joined #nim |
16:05:28 | * | minciue quit (Quit: minciue) |
16:10:23 | * | gokr quit (Quit: Leaving.) |
16:17:29 | * | darkf quit (Quit: Leaving) |
16:21:35 | * | kapil__ quit (Quit: Connection closed for inactivity) |
16:26:38 | * | jpoirier joined #nim |
16:32:21 | * | nimnoob joined #nim |
16:36:47 | MyMind | I'm getting a redefinition error at C compile time but nim doesn't show any error |
16:36:57 | MyMind | https://gist.github.com/Sembei/2effe9b703559c1f28cb |
16:41:40 | * | HakanD quit (Quit: Be back later ...) |
16:46:55 | flaviu | MyMind: I don't get it either |
16:47:19 | MyMind | you get redefinition error? |
16:47:29 | flaviu | apparently nim line 112 and line 128 have the same names |
16:47:41 | * | HakanD joined #nim |
16:47:44 | flaviu | but they don't. |
16:48:01 | MyMind | if you go to the c file |
16:48:11 | MyMind | it does 2 definitions |
16:48:41 | * | nimnoob quit (Remote host closed the connection) |
16:49:21 | MyMind | nimcache/smallpt.c:865:9: error: redefinition of 'p' |
16:51:26 | flaviu | Oh, I see the problem. |
16:51:37 | flaviu | You have two variables, p and P |
16:51:56 | flaviu | but nim normalizes identifiers before outputting the C code |
16:52:21 | flaviu | MyMind: Make a bug report |
16:52:47 | MyMind | on the same scope? |
16:53:25 | MyMind | where is the second p? |
16:53:46 | * | matkuki joined #nim |
16:54:31 | flaviu | MyMind: 159, 114 |
16:54:43 | MyMind | ah yes |
16:54:45 | MyMind | I see it |
16:55:15 | * | jpoirier quit (Quit: Leaving) |
16:57:44 | * | BlaXpirit_ joined #nim |
16:58:09 | MyMind | ty flaviu |
16:58:22 | * | AFKMorpork is now known as AMorpork |
17:00:51 | * | BlaXpirit quit (Read error: Connection reset by peer) |
17:02:46 | * | nimnoob joined #nim |
17:06:07 | MyMind | how you get stdin args ? |
17:07:57 | flaviu | MyMind: If you want stdin, then system.stdin |
17:08:06 | flaviu | If you want commandline args, then os.commandLineParams |
17:08:15 | MyMind | the second one |
17:08:21 | MyMind | main(int argc, char *argv[]) <<< |
17:08:29 | flaviu | yep, that has nothing to do with stdin |
17:08:47 | MyMind | you have any sample code ? |
17:09:20 | EXetoC | it returns a seq[TaintedString] |
17:09:25 | flaviu | I don't, but it's just a string sequence |
17:09:54 | EXetoC | seq[TaintedString] actually, but TaintedString is an alias for string unless a certain symbol is defined |
17:11:33 | EXetoC | remember when I talked about distinct? "when taintMode: type TaintedString* = distinct string ... else: type TaintedString* = string" (from the system module) |
17:18:03 | EXetoC | .eval echo os.paramStr[0] |
17:18:06 | Mimbus | EXetoC: eval.nim(3, 17) Error: type expected |
17:18:19 | EXetoC | .eval echo os.paramStr(0) |
17:18:23 | Mimbus | EXetoC: ./eval |
17:20:45 | EXetoC | test it by passing --taintmode:on to nim |
17:23:49 | * | gour quit (Remote host closed the connection) |
17:24:40 | * | gour joined #nim |
17:34:38 | * | rpag quit (Ping timeout: 244 seconds) |
17:44:28 | * | SplinterOfChaos joined #nim |
17:53:49 | * | nimnoob quit (Ping timeout: 255 seconds) |
17:59:05 | * | Sphax quit (Quit: CYA!!) |
18:00:21 | * | nimnoob joined #nim |
18:05:23 | * | Varriount|OnABus joined #nim |
18:08:56 | Varriount|OnABus | Meep |
18:09:06 | ekarlso- | so, any web devs here ? |
18:15:14 | ekarlso- | oh well, styling will be horrible then :P |
18:15:32 | matkuki | flaviu: Yesterday we talked about how 'T' and 'P' prefixes can be omitted by using the partial case sensitivity. |
18:15:35 | matkuki | There are a lot of these 'T' and 'P' types in sdl2.nim. How would this work? |
18:16:05 | * | nimnoob quit (Remote host closed the connection) |
18:21:32 | matkuki | Sorry, maybe I should rephrase the question. How does the alternative to the 'T' and 'P' prefix system look like? |
18:22:23 | Varriount|OnABus | matkuki: https://github.com/Araq/Nim/wiki/NEP-1-:-Style-Guide-for-Nim-Code |
18:24:45 | * | gmpreussner__ quit (Ping timeout: 244 seconds) |
18:24:47 | * | gmpreussner___ joined #nim |
18:26:21 | matkuki | Varriount: Thanks. So no more "TSurface" and "PSurface", replaced with "Surface" and "SurfacePtr"? |
18:26:35 | flaviu | Yeah, but I don't use any suffix |
18:27:03 | flaviu | If the type is best as a pointer, I make it a ref. If it's best as a value, I make it an object |
18:27:33 | flaviu | If I need an object as a pointer, I use var T |
18:28:31 | matkuki | flaviu: Got it, thanks. |
18:28:53 | Varriount|OnABus | matkuki: Yep. |
18:28:57 | EXetoC | but then you might want to introduce the basic type |
18:29:04 | Varriount|OnABus | matkuki: I'm currently writing a 'Common Conventions and Practices' page too |
18:29:28 | matkuki | Great, on the same wiki? |
18:31:08 | matkuki | Varriount: On "https://github.com/Araq/Nim/wiki/" ? |
18:32:21 | * | nimnoob joined #nim |
18:37:07 | EXetoC | flaviu: and if you then need just 'object'? |
18:37:21 | Varriount|OnABus | matkuki: Well, it will be. Right now I'm typing out in my text editor |
18:37:46 | flaviu | EXetoC: You don't need just object. A ref T has a superset of the functionality a T has. |
18:37:51 | Varriount|OnABus | matkuki: I'm on a bus with slow wifi. |
18:40:20 | Varriount|OnABus | Hm. Besides using new<Type> and init<Type> for construction procedures, what other conventions should I make note of? |
18:41:08 | EXetoC | flaviu: someone might |
18:42:05 | * | HakanD quit (Quit: Be back later ...) |
18:42:33 | flaviu | EXetoC: As I said, ref T's functionality is a super-set of a T's. |
18:42:50 | flaviu | If they really want a T, then they can hack around with casts or whatever |
18:44:13 | EXetoC | I was thinking in terms of performance, in which case it'd be redundant |
18:45:23 | flaviu | EXetoC: It's the library author's responsibility to realize that a reference isn't the right choice for a Vec2 |
18:46:44 | * | HakanD joined #nim |
18:47:14 | Varriount|OnABus | Hello HakanD |
18:47:54 | EXetoC | flaviu: and larger types? |
18:47:59 | HakanD | hey |
18:48:25 | flaviu | EXetoC: I don't understand your question. |
18:50:36 | EXetoC | flaviu: there might be rare cases where you want to omit 'ref' for larger types as well |
18:52:12 | EXetoC | doesn't anyone think it would be a good idea to omit ptr or ref from parameters, unless required? but it might be a pain in the ass to do foo[].bar() everywhere |
18:52:16 | flaviu | My point wasn't that Vec2 is small, I was trying say that new Vec2s would be made constantly. |
18:52:52 | flaviu | ie, you can't go 20 lines in a game without seeing a mention of Vec2 and friends |
18:53:39 | EXetoC | right |
18:54:16 | flaviu | But say something like a regex pattern. You don't care if it's a pointer, you'll allocate it once and use it millions of times. |
18:54:28 | flaviu | the overhead doesn't matter much |
18:56:55 | * | Varriount|OnABus quit (Ping timeout: 246 seconds) |
19:00:00 | EXetoC | and if said type is big and only ptr/ref happens to be exposed? and said user has to avoid allocations for whatever reason. do you think that library writers can predict these things in general |
19:00:07 | EXetoC | but this might end up being a non-issue |
19:00:20 | * | gmpreussner joined #nim |
19:00:25 | * | gmpreussner___ quit (Ping timeout: 264 seconds) |
19:00:49 | flaviu | A nice big "Dynamic allocation and garbage collection is required" in the readme should solve that problem. |
19:02:01 | EXetoC | then what? look for a similar library that provides more freedom? |
19:02:38 | flaviu | I suppose, or patch the library for your purposes |
19:03:05 | flaviu | It's an unusual situation, you're probably used to dealing with that if you live under those constraints. |
19:04:14 | EXetoC | yep |
19:05:36 | * | nimnoob quit (Remote host closed the connection) |
19:09:48 | flaviu | Varriount: I see you've made it upload the test results. |
19:11:01 | renesac | Varriount: : not sure if it fits your conventions page or would be better as a new page |
19:11:17 | renesac | but you could do one on how to better make bindings |
19:11:24 | * | rpag joined #nim |
19:11:41 | renesac | a low level binding plus a higher level? |
19:11:52 | renesac | export the low level procs? |
19:12:00 | renesac | keep the .h file on the nimrod repository? |
19:12:01 | renesac | etc |
19:12:34 | * | Sphax joined #nim |
19:17:44 | renesac | and how to name the low level bindings |
19:21:11 | * | HakanD quit (Quit: Be back later ...) |
19:25:16 | * | Sphax quit (Quit: ZZZZZzzzzz) |
19:39:06 | onionhammer | Varriount|OnABus did you do that thing? |
19:41:05 | onionhammer | ah he left |
19:41:08 | * | johnsoft joined #nim |
19:42:21 | BlaXpirit_ | Will Nim run on Android? :| |
19:42:27 | onionhammer | yes |
19:42:49 | BlaXpirit_ | uh cool |
19:50:31 | * | Sphax joined #nim |
19:50:39 | flaviu | BlaXpirit_: http://buildbot.nim-lang.org/builders/linux-arm5-builder |
19:58:50 | BlaXpirit_ | ok but has anyone got an actual working application? |
19:59:17 | flaviu | grahda has one for OSX |
19:59:30 | flaviu | That's all I know |
20:01:57 | ekarlso- | flaviu: signup / login complete |
20:04:56 | * | gmpreussner quit (Quit: Konversation terminated!) |
20:05:32 | * | gmpreussner joined #nim |
20:06:40 | * | Demos joined #nim |
20:06:55 | * | Sphax quit (Quit: CYA!!) |
20:08:58 | gmpreussner | hmm... looks like my builders are down |
20:09:02 | gmpreussner | lemme take a look |
20:10:21 | flaviu | ekarlso-: I don't see it yet |
20:10:43 | ekarlso- | flaviu: working out some quriks :P |
20:12:58 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045]) |
20:16:11 | * | HakanD joined #nim |
20:16:12 | * | bjz quit (Ping timeout: 244 seconds) |
20:17:40 | ekarlso- | flaviu: so i'm making a JWT lib as well |
20:18:25 | * | minciue joined #nim |
20:22:20 | * | UberLambda joined #nim |
20:25:02 | UberLambda | /msg NickServ SETPASS UberLambda ffdnalpnnjjs tm3pFreeNodeCreation! |
20:25:12 | UberLambda | dang lol |
20:25:17 | Araq | welcome UberLambda |
20:25:35 | UberLambda | Thank you :) |
20:26:00 | UberLambda | I guess I'll be more cautious when changing my password next time |
20:27:27 | UberLambda | Araq: BTW Nim(rod) is an amazing language |
20:28:42 | Araq | thank you :-) |
20:30:31 | UberLambda | And the fact that it can interface so easily with C code makes it even better |
20:32:31 | * | superfunc joined #nim |
20:37:44 | gmpreussner | flaviu: it looks like both my builders ran out of disk space. could this be because of buildbot? |
20:38:30 | Araq | gmpreussner: how much disk space do these machines have? |
20:39:36 | gmpreussner | they previously used the onboard flash, which is not a lot (512 MB). i moved the build storage to another drive now (16GB), but it looks like that wasn't the issue. there must be some other files filling up /dev/root... perhaps log files |
20:39:58 | flaviu | gmpreussner: Yeah, it's just 585M for me |
20:40:04 | flaviu | mostly csources. |
20:41:34 | ekarlso- | too bad I can't use employers resources for nim :på |
20:42:22 | UberLambda | Is github working for you? |
20:42:41 | UberLambda | I can't clone any repo and any of its pages don't load for me right now |
20:43:01 | flaviu | UberLambda: Did your country ban github? |
20:43:27 | UberLambda | flaviu: No, it seems like a overload peak |
20:44:05 | UberLambda | Github web pages now work, but nimrod.vim is stuck at 0byte/s while cloning |
20:44:15 | UberLambda | I guess it's just overloaded |
20:44:17 | flaviu | Restart your router and modem? |
20:45:14 | UberLambda | flaviu: I'll try |
20:45:29 | * | nimnoob joined #nim |
20:46:24 | * | gsingh93 joined #nim |
20:48:32 | * | UberLambda_ joined #nim |
20:48:58 | * | UberLambda_ left #nim (#nim) |
20:49:37 | * | UberLambda quit (Ping timeout: 246 seconds) |
20:49:48 | * | UberLambda joined #nim |
20:50:42 | UberLambda | Nope, github is still unresponsive |
20:52:36 | * | Varriount|Mobile joined #nim |
20:53:37 | * | adam_s joined #nim |
20:54:52 | * | Varriount|Mobile quit (Client Quit) |
20:55:10 | * | Varriount|Mobile joined #nim |
20:55:27 | Varriount|Mobile | flaviu: ping |
20:55:40 | flaviu | Varriount|Mobile: Pong |
20:56:17 | * | matkuki joined #nim |
20:56:39 | Varriount|Mobile | flaviu: Could you work some Linux magic and find out why the tester on your arm slave is hanging? |
20:56:59 | Varriount|Mobile | I'd ask gokr to do the same, but he isn't here. |
20:57:33 | flaviu | I don't think it's hanging |
20:57:35 | gmpreussner | flaviu: Araq: armv7 is back up. i'll fix armv6 in about 30 minutes. brb. |
20:57:52 | flaviu | Varriount|Mobile: You should wait at least 10 hours |
20:58:03 | Varriount|Mobile | Oh, yeah. |
20:58:24 | matkuki | Can someone tell me what th "$1" means in the pragma "{.push importc: "SDL_$1".}" ? It's from the sdl2.nim module. |
20:58:30 | Varriount|Mobile | Well, somethings going on with the other Linux builders |
20:58:32 | Araq | you could disable long running tests |
20:59:12 | Varriount|Mobile | matkuki: $1 is replaced by the procedure name. |
20:59:17 | Araq | but apparently nobody really is interested in making this thing run smoothly, let's hack around for a few more months instead |
20:59:19 | flaviu | Varriount|Mobile: I helped it past the async test, lets see if that makes it go faster |
20:59:36 | matkuki | Varriount: Thanks |
20:59:39 | Varriount|Mobile | Araq: What? |
21:00:13 | Varriount|Mobile | I'm not hacking anything together... :< |
21:01:52 | * | superfunc quit (Ping timeout: 246 seconds) |
21:02:24 | Araq | Varriount|Mobile: why should the process wait for 10 *hours* then? |
21:02:56 | ekarlso- | packages.nim(552, 31) Error: expression '.(client, "request", "vg.no")' cannot be called < hmmm |
21:03:03 | ekarlso- | can't u call client.request |
21:03:26 | Varriount|Mobile | Araq: What's the point of running tests if you don't run them all? |
21:04:03 | flaviu | Varriount|Mobile: If a test is fairly stable, you could probably run it every 10 runs or so |
21:04:11 | flaviu | then if it fails, just bisect. |
21:04:24 | Araq | what's the point of a build system that is so unreliable that I never look at the results? |
21:04:45 | Varriount|Mobile | Araq: Fine, then build your own. |
21:04:47 | Araq | when I break something I get github issues before the tester tells me |
21:04:51 | * | Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) |
21:05:13 | flaviu | ekarlso-: I can't figure out how to do tags in nim-packages. |
21:05:32 | ekarlso- | flaviu: uh, how so ? |
21:05:44 | flaviu | How would I add a new tag? |
21:06:04 | ekarlso- | flaviu: that part is a ... bit broken atm! |
21:06:08 | flaviu | Ah, ok! |
21:06:14 | ekarlso- | ideally something like POST /packages/<id>/tags |
21:06:27 | UberLambda | Just wondering, why is the use of unsigned integers discouraged? |
21:06:30 | ekarlso- | a a PATCH / PUT .. |
21:06:40 | * | vezzy joined #nim |
21:06:47 | * | quasinoxen quit (Ping timeout: 256 seconds) |
21:08:09 | flaviu | ekarlso-: Also, sqlite doesn't have varchar, that's just syntax sugar. |
21:08:18 | flaviu | It's all Text |
21:08:19 | ekarlso- | for ? |
21:08:21 | ekarlso- | ahhh |
21:08:25 | ekarlso- | well, that's a bit sad :p |
21:13:45 | * | gour quit (Remote host closed the connection) |
21:14:08 | * | Mat4|work joined #nim |
21:14:21 | Mat4|work | hello |
21:14:31 | Araq | hi Mat4|work |
21:15:00 | Mat4|work | Hi Araq |
21:15:48 | Mat4|work | I'm working to finish my documentation. What was the compiler flag again for compilation without library dependencies ? |
21:17:23 | Araq | --os:standalone |
21:17:37 | Mat4|work | thanks |
21:24:00 | Mat4|work | I document the compilation of a small test program for Parallax Propeller as general example (the Propeller MCU is a good target because of its memory architecture). Hope this is sufficient |
21:33:00 | * | UberLambda quit (Quit: Page closed) |
21:34:01 | ekarlso- | is there a pw hashing thing in nim already ? :D |
21:35:21 | flaviu | ekarlso-: https://github.com/nim-lang/packages/blob/master/packages.json |
21:35:48 | flaviu | https://bitbucket.org/BitPuffin/scrypt.nim, git://github.com/ithkuil/bcryptnim/ |
21:36:01 | ekarlso- | ah, bcrypt |
21:36:02 | flaviu | https://github.com/flaviut/easy-bcrypt.git |
21:36:03 | ekarlso- | :) |
21:36:14 | ekarlso- | flaviu: which one -,,- |
21:36:15 | flaviu | That last link is clearly the best :) |
21:36:19 | ekarlso- | HAHA :D |
21:36:59 | ekarlso- | flaviu: how you add that to .nimble file ? :/ |
21:37:33 | * | AMorpork is now known as AFKMorpork |
21:37:35 | flaviu | Requires: "easy-bcrypt >= 1.0.0" |
21:37:49 | ekarlso- | nvm |
21:37:50 | ekarlso- | ye |
21:51:44 | * | nimnoob quit (Remote host closed the connection) |
22:00:32 | gmpreussner | Varriount: you around? |
22:02:43 | Araq | I'm afraid I drove him off :-( |
22:04:52 | Araq | Varriount: I'm sorry! |
22:05:27 | matkuki | I have a type TColor* {.pure, final.} = tuple[r: uint8, g: uint8, b: uint8, a: uint8]. |
22:05:29 | matkuki | Why is "var text_color :TColor = (r:128,g:128,b:128,a:255)" an error? |
22:05:55 | Araq | matkuki: (r: 128u8, ...) |
22:06:16 | Araq | and get rid of the .pure, final, it's not necessary |
22:06:21 | BlaXpirit_ | matkuki, let me ask you |
22:06:24 | BlaXpirit_ | is that SFML? |
22:06:41 | matkuki | Araq: Ahh, thanks. |
22:06:50 | EXetoC | Araq: bug? |
22:06:52 | * | flan3002 joined #nim |
22:07:02 | matkuki | BlaXpitit_: No, SDL2. |
22:07:12 | Araq | EXetoC: not for me. |
22:07:16 | BlaXpirit_ | lol the type looks exactly the same |
22:07:19 | Araq | others may disagree |
22:07:41 | EXetoC | they are compile-time values after all, but that's fine |
22:07:58 | matkuki | BlaXpirit_: Are there bindings for SFML? |
22:07:59 | EXetoC | considering how you feel about unsigned types, and I do agree |
22:08:05 | BlaXpirit_ | matkuki, 2 different ones |
22:09:13 | matkuki | BlaXpirit_: Are you fowlmouth? |
22:09:21 | BlaXpirit_ | no |
22:09:40 | BlaXpirit_ | I just finished new awesome SFML bindings a few days ago |
22:09:59 | BlaXpirit_ | fowlmouth made the previous library, doesn't seem to have time for anything right now |
22:10:40 | matkuki | Are your bindings available anywhere? Might check them out. |
22:11:02 | BlaXpirit_ | matkuki, http://forum.nim-lang.org/t/734 |
22:11:19 | * | Mat4|work quit (Read error: Connection reset by peer) |
22:11:34 | matkuki | BlaXpirit_: Cool, thanks! |
22:11:47 | BlaXpirit_ | would be nice if someone finally gave em a try, because I don't think anyone went beyond trying out the examples |
22:14:12 | * | Mat4 joined #nim |
22:15:55 | * | Mat4 well, nice try (get sober) |
22:19:38 | flaviu | I have a nimble package, how would I get the path of package's directory? |
22:20:20 | BitPuffin | ekarlso-: scrypt is better than bcrypt |
22:21:21 | flaviu | BitPuffin: You should include the relevant c files with your package. |
22:21:45 | BitPuffin | flaviu: no, I don't wanna take responsibility in keeping them up to date in case they get patched :P |
22:21:55 | BitPuffin | not that they would probably |
22:22:03 | BitPuffin | but it's better anyway to get it from the official source |
22:22:13 | BitPuffin | so he can verify signatures and such |
22:22:15 | flaviu | Yeah, but it's a pain |
22:22:20 | BitPuffin | security always is |
22:22:58 | flaviu | Anyway, it's risky to add a backdoor to a hash function |
22:23:08 | EXetoC | flaviu: what do you need the path for? |
22:23:12 | gmpreussner | Varriount: nevermind, all good |
22:23:24 | flaviu | EXetoC: So I know which C files need compiling |
22:23:33 | gmpreussner | armv6 and armv7 builders are both back up |
22:23:59 | BitPuffin | flaviu: yeah it is, but if all I have is the bindings he doesn't need to trust me |
22:24:18 | BitPuffin | it's the whole point |
22:24:21 | flaviu | BitPuffin: It's ok, I trust you. |
22:24:39 | ekarlso- | why is scrypt better ? :p |
22:25:02 | flaviu | ekarlso-: It can't be effectively done on a GPU. |
22:25:21 | BitPuffin | flaviu: your trust is not good security practice |
22:25:33 | flaviu | BitPuffin: It's good enough. |
22:25:33 | * | HakanD quit (Quit: Be back later ...) |
22:25:37 | ekarlso- | flaviu: https://bpaste.net/show/a3a9b5d949c7 ... |
22:25:40 | BitPuffin | I don't think so |
22:25:49 | flaviu | ekarlso-: I know |
22:25:52 | flaviu | working on it right now |
22:26:03 | ekarlso- | flaviu: ping me when u got it :D |
22:26:05 | ekarlso- | I wanna use :D |
22:26:17 | * | ekarlso- waits |
22:26:52 | flaviu | ekarlso-: ping |
22:26:58 | flaviu | try 1.0.1 |
22:27:33 | ekarlso- | worked :D |
22:33:43 | * | Trustable quit (Quit: Leaving) |
22:34:00 | ekarlso- | flaviu: how can u load a string into PasswordSalt? |
22:34:26 | flaviu | ekarlso-: Excellent point, I'm 80% done with v2.0.0 |
22:34:31 | flaviu | :P |
22:34:34 | ekarlso- | :/ |
22:34:40 | ekarlso- | since u write |
22:34:50 | ekarlso- | let savedHasH = ... |
22:34:59 | ekarlso- | but dont u load savedHash from a string ? |
22:35:10 | flaviu | Well, it's an array of char, but that's technically an implementation detail. |
22:35:25 | ekarlso- | well, db uses string anyways |
22:37:42 | ekarlso- | flaviu: how far off is that ? :D |
22:37:47 | ekarlso- | I need to have it for login in packages ;P |
22:37:54 | flaviu | ekarlso-: Less than 20 min. |
22:38:07 | ekarlso- | kewl :) |
22:38:19 | flaviu | I want to do some verification too, or it'd be just ~5 min. |
22:44:25 | * | keyle joined #nim |
22:46:42 | Araq | hi keyle can you compile nim devel with some working nim and -d:useSysAssert -d:useGcAsssert -d:release ? |
22:47:41 | matkuki | Can a cint constant literal be defined without defining a new constant? For use with a function like e.g: proc MyFunc(x: cint): cint |
22:48:06 | keyle | Araq: I'm at work, will try in approx 8hrs ;) |
22:48:23 | Araq | uhh ok, no worries |
22:48:29 | * | stapler joined #nim |
22:48:42 | matkuki | MyFunc(?) |
22:49:05 | * | stapler quit (Changing host) |
22:49:05 | * | stapler joined #nim |
22:49:14 | Araq | matkuki: if the literal fits a cint it should just work |
22:49:41 | Araq | myFunc(42) #ok, compiler knows 42 fits a cint |
22:50:37 | * | gmpreussner quit (Quit: Konversation terminated!) |
22:50:53 | matkuki | Araq: I have a "TRect* = tuple[x, y: cint, w, h: cint]". "rectangle :TRect = (x:10, y:10, w:200, h:200)" doesn't compile. |
22:51:40 | Araq | well this rule doesn't extend to tuples, there is a high priority feature request for it though |
22:52:10 | * | brson joined #nim |
22:52:25 | matkuki | Araq: What is the easiest solution for this? |
22:53:04 | Araq | matkuki: (x: 10i32, y: 10i32, ...) or write a template to lessen the pain |
22:53:28 | ekarlso- | wonder how hard it would be to do something like JWS / JWT in nim.. |
22:53:50 | matkuki | Araq: Great, thanks! The i32 postfix is just fine. |
22:54:08 | Araq | template mrect(a, b, c, d): expr = (x: a.cint, y: b.cint, w: c.cint, h: d.cint) |
22:54:23 | Araq | mrect(10, 10, 200, 200) |
22:54:48 | ekarlso- | what would you guys advise to use for now for tokens ? |
22:58:50 | * | Sergio965 joined #nim |
23:01:11 | Araq | ekarlso-: I don't understand the question |
23:01:13 | matkuki | Araq: Thanks for the template. I'm not that good at them yet. |
23:02:00 | ekarlso- | Araq: as in what way would be easiest atm to do tokens in nim |
23:02:09 | ekarlso- | I was wondering about doing JWT stuff but |
23:02:57 | flaviu | ekarlso-: Ok, pushed |
23:11:27 | ekarlso- | flaviu: did you break $hash ? |
23:12:06 | flaviu | ekarlso-: No, but I properly namespaced it |
23:12:14 | flaviu | you have to import easy_bcrypt |
23:15:11 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:18:51 | ekarlso- | flaviu: https://bpaste.net/show/22fb52add40b |
23:18:56 | ekarlso- | doesnt that look corecT? |
23:18:58 | * | jpoirier joined #nim |
23:22:52 | flaviu | ekarlso-: Ok, use 2.0.1 |
23:23:13 | flaviu | Don't screw up the hash or bad things will happen :P |
23:23:41 | ekarlso- | flaviu: how you mean ? |
23:24:28 | flaviu | I have no idea what happens when you pass in an invalid hash. |
23:24:51 | ekarlso- | ah |
23:25:58 | * | sillesta quit (Ping timeout: 244 seconds) |
23:28:36 | ekarlso- | great, now getting another error :p |
23:28:52 | ekarlso- | https://bpaste.net/show/6f20b1f63289 flaviu |
23:29:05 | ekarlso- | nothing confidential there |
23:29:32 | * | Demos quit (Read error: Connection reset by peer) |
23:29:49 | flaviu | ekarlso-: post the code please. |
23:30:18 | flaviu | specifically the database insertion code. |
23:30:21 | ekarlso- | https://bpaste.net/show/aa5f9a5b2f63 |
23:31:47 | * | ajhager quit (Ping timeout: 252 seconds) |
23:32:14 | flaviu | ekarlso-: s/\?/'?'/g |
23:33:44 | ekarlso- | then it blows up with a sql insert error |
23:34:00 | ekarlso- | https://bpaste.net/show/0833699781eb |
23:35:00 | * | z1y joined #nim |
23:36:31 | ekarlso- | that goes *boom* |
23:38:51 | flaviu | ekarlso-: I don't really know |
23:39:00 | ekarlso- | i guess the pw thing returns a ' in the token |
23:39:04 | ekarlso- | and it blows due to it ? |
23:39:07 | flaviu | It shouldn't. |
23:39:27 | flaviu | the only valid characters are [a-zA-Z$0-9./-] |
23:40:45 | ekarlso- | btw |
23:41:19 | BlaXpirit_ | can someone help me diagnose a compiler crash? |
23:41:22 | ekarlso- | is it let foo = $jsonobject["foo"] or jsonobject["foo"].str to get the elements ? |
23:41:27 | ekarlso- | ehm, element as string |
23:41:27 | BlaXpirit_ | my program just doesn't work and i have no idea why |
23:41:36 | BlaXpirit_ | it used to work on old version of nimrod |
23:41:37 | * | JinShil joined #nim |
23:41:47 | BlaXpirit_ | now i get a compiler crash and nothing |
23:41:49 | ekarlso- | if I do $jsonobject["foo"] it makes it "value" |
23:43:13 | flaviu | ekarlso-: Yes, `$` on json is renders it as json. |
23:43:25 | BlaXpirit_ | basically, can someone try to run this example: https://github.com/BlaXpirit/nim-random#readme |
23:43:37 | BlaXpirit_ | to compile it even, because it crashes the compiler |
23:43:56 | ekarlso- | hmm, flaviu I wonder if the sql stuff does some quoting or smth that make sit bork |
23:47:55 | ekarlso- | Araq: is dbQuote bugged in this case ? |
23:49:03 | keyle | I made this yesterday, good way to learn nim https://github.com/keyle/hastebin |
23:49:19 | ekarlso- | the error seems to be that dbquote is adding ' at the front of the hash flaviu but not the end |
23:50:24 | flaviu | ekarlso-: Nope, it looks good. |
23:50:36 | flaviu | https://github.com/Araq/Nim/blob/master/lib/impure/db_sqlite.nim#L50 |
23:50:54 | ekarlso- | but why aint it working then :P |
23:52:13 | flaviu | BlaXpirit_: echo to_seq(rng.random_sample(a, 3)) is broken, dunno why. |
23:52:56 | BlaXpirit_ | oh yeah, works without it |
23:52:58 | flaviu | ekarlso-: Go in lib/impure/db_sqlite.nim and patch dbQuote to print the result. |
23:53:05 | BlaXpirit_ | i assumed it broke on something during import. |
23:53:07 | BlaXpirit_ | thanks |
23:55:29 | flaviu | BlaXpirit_: Have you seen http://www.pcg-random.org/ ? |
23:55:35 | BlaXpirit_ | no |
23:55:41 | ekarlso- | flaviu: it's borked |
23:55:49 | ekarlso- | INSERT INTO users (email, password, display_name) VALUES ('[email protected]', '$2a$12$gdoZAAyoHmxbvp/i1aOz9.43GP3iSmiuzoIiZ/sdRG5BJKpf64Rbq < clearly bork sql |
23:55:58 | flaviu | ekarlso-: Oh, my fault. |
23:56:06 | ekarlso- | flaviu: :D |
23:56:07 | flaviu | stray null byte |
23:56:17 | * | NimrodBot joined #nim |
23:56:32 | ekarlso- | .eval let foo = 1 |
23:56:35 | Mimbus | ekarlso-: <no output> |
23:56:51 | ekarlso- | one more version then flaviu ?:) |
23:56:57 | flaviu | 1 sec |
23:57:16 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045]) |
23:57:27 | * | z1y quit (Ping timeout: 265 seconds) |
23:57:38 | * | NimrodBot quit (Read error: Connection reset by peer) |
23:58:39 | flaviu | ekarlso-: 2.0.2 |
23:59:05 | * | rpag quit (Quit: Leaving) |
23:59:25 | * | ajhager joined #nim |