<< 11-01-2015 >>

00:01:24*bjz quit (Max SendQ exceeded)
00:03:13*bjz joined #nim
00:06:20ekarlso- Araq https://github.com/Araq/Nim/pull/1926
00:09:29*irrequietus quit ()
00:13:11*rpag quit (Quit: Leaving)
00:14:40Araqflaviu: did you do any performance measurements for https://github.com/Araq/Nim/pull/1855 ?
00:15:32flaviuAraq: No, and 44a5899 wasn't supposed to have gotten in.
00:15:41flaviuBut I'm working on my own PCRE library now
00:16:23flaviuI'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:01keyledom96: I can help with web related things, I'm a web dev/designer by trade
00:42:14keyle(re forum, css, etc.)
00:43:36keyleMorning!
00:43:54ekarlso-keyle: packages stuff needs that too :D
00:44:47keyleas 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:07ekarlso-keyle: well, i'm doing a package index program atm
00:45:44keylealso nim needs recipes, or examples. Rosetta thing is a great start but hard to browse
00:46:15keyleekarlso-: great, that's also what I was thinking
00:46:25def-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:29def-(i have a nim program to do that)
00:46:31EXetoChttp://nim-by-example.github.io
00:46:52keyleEXetoC: sorry I had forgotton about nim-by-example
00:46:53EXetoCand we have many examples on rosetta
00:47:14keylethat needs a search
00:47:27def-http://rosettacode.org/wiki/Category:Nim
00:47:27Triplefoxare all these things linked properly from the site
00:47:35keyleI'm not saying there isn't stuff, I'm saying it's hard to navigate, find
00:47:46EXetoCright
00:48:58Triplefoxearly 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:23Triplefoxpages got lost in it pretty easily
00:49:43keyleI used haxe extensively as well. What it did have right is google indexing.
00:50:11Triplefoxyes, i think i did rely on google for a lot of things
00:50:52Triplefoxi 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:24Triplefoxthat was kind of gratifying cause i forgot i had done it the first time
00:53:20keyleanyways there are tons of ways to improve but nim is pretty great
00:54:48keyleekarlso-: what is your plan with the package indexer
00:56:38Triplefoxmy 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:08Triplefoxright now i'm still the middle of doing rendering
00:57:30VarriountAraq: Is there some long running test that was recently introduced? I don't recall the test suite taking 2+ hours
00:57:37keylesweet, but that's no small feat
00:57:58EXetoCmaybe find out who was working on an engine before
00:58:11EXetoCabout 2 guys did. I don't know if they got far
00:58:23ekarlso-keyle: make a program and a onepage app to register packages and releases
00:58:42keyleekarlso-: like nimble and npm?
00:58:58Triplefoxi'm not worried about anything after the rendering part, really. it's the only thing i haven't done myself before
00:59:09AraqVarriount: on the contrary I got rid of long running tests ...
00:59:26keyleTriplefox: impressive. So using OpenGL backing?
00:59:46Triplefoxyeah, targeting GL 2.1 for higher compatibility
01:00:00Triplefox(really annoying to find accurate documentation for)
01:00:47EXetoCI think it's excessive these days
01:03:57flaviure documentation search: http://nimlets.github.io/
01:04:12flaviuI've added client-side javascript search, it works fairly well
01:04:32keyleah!
01:04:41flaviuI don't actually have more than one example, but otherwise it works.
01:05:18EXetoCit accepts any string though
01:12:33renesackeyle: about the docs, you should talk with filwit, he had some great interface in development
01:12:49renesacbut don't seem to have much time to work on it now
01:13:33renesacyou could sort by all sorts of proprieties, etc
01:13:48renesacnot sure if it went much beyond the mockup phase
01:13:59Araqpretty sure it didn't
01:14:20Araqso there is not much need to talk with filwit I think
01:14:32flaviurenesac: nope, it didn't get past that
01:15:15keyleI was thinking starting by a simple command line app
01:15:34keylefirst run it indexes all of nim libs
01:15:57keyle./nimhelp splitlines
01:16:04keyleshows the splitlines proc
01:16:25keyle./nimhelp -args TType
01:16:36keyleshows the first 10 procs using TType as argument
01:16:50keylewith a -all for showing all
01:16:51def-keyle: wouldn't that be something that belongs in idetools?
01:17:06renesacif we had a working REPL, it could belong to it too
01:17:09renesaclike in python
01:17:12keyledef-: probably, at the moment it's in my head
01:17:28keylebut as a new user, I feel like I need this
01:17:30def-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:59flaviudef-: What technique were you using?
01:18:00keylealso a -source sends you to the github source file#L.123
01:18:17def-flaviu: i'm trying to use tcc
01:18:27flaviuAh, ok
01:18:28keyleonce that nimhelp command line app is done, it can be used as a library, and use jester as a webservice
01:18:41keyleso then you can have a neat ajax search
01:18:56renesacAraq: still, the mockups were great and were discussed and improved uppon at least one time
01:19:01renesacsomeone have a link to them?
01:19:07flaviuhttp://reign-studios.net/philipwitte/nimrod/docs/docs.htm
01:19:25renesacthanks
01:19:34flaviuCSS is a bit over-the-top, but that's not a real problem.
01:20:04flaviukeyle: It may not be as easy as you imagine, but still, go for it!
01:20:05keylenot bad
01:20:17flaviuI'd be interested in seeing what comes out.
01:20:46keyleso it'd use git the first time to index nim contents
01:21:08keylesave all procs definitions as json or something
01:21:19keylemaybe
01:22:02EXetoChash map?
01:22:06keyleit'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:10EXetoCmight be really slow otherwise
01:23:24keylehow would you go about parsing the procs and ## doc?
01:23:48keyleusing a bastardized lexer/parser or AST?
01:24:11keyleI'm guessing that's already done since we have lib.html
01:25:02EXetoCuse the compiler
01:25:12EXetoCits api
01:25:17*bjz joined #nim
01:27:59keyleEXetoC: can you be more specific?
01:28:00flaviuI don't see a way to dump the AST of a compilation, a patched compiler is probably necessary.
01:28:33keylegenerally, don't parser dump the comments anyway? so all the ## would be gone
01:29:00def-keyle: look how nim's documentation is parsed?
01:29:00*wrl left #nim (#nim)
01:29:16keylelooking 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:42renesacby the way, the docs css behave poorly with 1080 pixels width (portrait)
01:31:54flaviuWhat happened to nim pretty?
01:32:18Araqit got replaced by "nimfix"
01:32:36def-renesac: you're right, let me try to fix that
01:32:39renesachorizontal scroll bars on code snippets while there is relatively large blank spage on the sides
01:32:56Araqrenesac: +1
01:33:07Araqthese scroll bars surely are annoying
01:33:33def-Araq: make the code snippets just go further right than the page then?
01:33:49renesacAraq: I tried running nimfix on winlean.nim & cia, and it didn't correct the PascalCase for the procs
01:34:05Araqkeyle: I can give you 'nim json' easily
01:34:24Araqrenesac: that's because nimfix is smart and knows that would break the importc
01:34:31keyleAraq: that'd save me tons of time
01:34:51renesachum, can't it modify the importc to use a different name than nim?
01:35:07Araqrenesac: that would be even smarter but is harder to do
01:35:13renesac^^'
01:35:17*bjz quit (Ping timeout: 245 seconds)
01:36:02AraqI stopped working on nimfix once it could fix the compiler itself
01:36:32Araqwas a huge amount of work already and if it's good enough for the compiler it's good enough for you :P
01:36:32renesacdef-: for 1080 pixels at least there is plenity of white space in the sides to reduce
01:36:38def-renesac: yes, will do that
01:36:56renesacAraq: ok, not priority
01:37:00def-renesac: but i think the entire page should scroll right, not just the code snippets
01:37:27Araqdef-: I don't care how you fix it
01:37:28renesachum, a possibility
01:37:52renesacyeah, I think it is really more useful
01:38:03renesacthe scroll be on the page as a whole
01:38:37flaviurenesac: I disagree
01:38:40keyleyou can use responsive css so it works on ipad and iphones
01:38:56flaviuIt already uses responsive, but it also needs to make margins more responsive
01:41:12reactormonkAraq, nice issue spree ;-)
01:42:11Araqreactormonk: still looking for interesting bugs
01:44:54reactormonkAny way to encode "I need proc X, Y and Z defined for for the generic T"?
01:45:18Araqreactormonk: typeclasses or a 'when compiles' in the generic proc
01:45:32flaviureactormonk: http://nim-lang.org/manual.html#user-defined-type-classes
01:46:44AraqVarriount: is is too late to consider to revive nimbuild instead of whatever-we-have-now ?
01:46:45reactormonkwill 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:27Araqjpoirier: explain https://github.com/Araq/Nim/issues/1819 please
02:04:57*MrOrdinaire joined #nim
02:07:08*brson quit (Quit: leaving)
02:07:16flaviu.eval import re; let tre = re""; echo(split("123", tre))
02:07:21Mimbusflaviu: @[123]
02:07:41flaviushouldn't that result in @["1", "2", "3"] instead?
02:08:06Araqyour splitter is empty
02:08:12flaviuExactly.
02:08:18Araqso it doesn't split
02:08:24flaviuIt has a 0-length match at every point.
02:08:46Araqso that's ["", "", "", "", ...] then
02:09:04Araqan infinite sequence is rather hard to handle with a computer
02:09:35flaviuman7.org/linux/man-pages/man3/pcreapi.3.html
02:09:43flaviuctrl-f "Finding all the matches in a subject"
02:11:12Araqso?
02:11:28Araqour re uses pcre as an implementation detail
02:11:57Araqwe don't have to care for weirdnesses like you quoted
02:13:04jpoirierAraq: look at the output on the page in the advanced commands section, http://nim-lang.org/nimc.html
02:13:11flaviuJavascript does the same thing as is described there.
02:13:48Araqjpoirier: yes, some switches belong to the 'idetools' mode
02:13:50flaviuperl does the same thing
02:14:20Araqflaviu: so fix it. nevertheless an empty spitter might as well raise an exception
02:14:35flaviuPCRE is a whole lot more than an implementation detail.
02:14:59flaviuAraq: I'm currently fixing it for my own library, but I wanted to mention it.
02:15:26Araqflaviu: and I'm very grateful for that.
02:15:34flaviuAnd there's no way to determine if a splitter is empty
02:15:41flaviur" ?"
02:15:51flaviuis that empty? Depends on the context.
02:16:32Araqwell I can test for an empty string at least. maybe you can't but it's possible, trust me.
02:17:19flaviuAraq: Actually, you're right!
02:17:21flaviuPCRE_INFO_MATCH_EMPTY
02:17:44flaviuI don't like the idea of restricting the user, but it's possible.
02:19:26AraqI 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:16flaviuAraq: I've seen it.
02:20:53flaviuI can add a flag for pcre_dfa_exec if there's interest.
02:21:39flaviuBut you can tell PCRE to give up after a set amount of work anyway.
02:21:52flaviuSo that you help mitigate DOS attacks
02:22:33*girvo joined #nim
02:22:36girvoHi all :)
02:23:14flaviuhey girvo, welcome!
02:24:02girvoquick 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:18girvoIs it just `if (window == nil):` ?
02:24:18Araqnil
02:24:24girvoYeah I figured, perfect!
02:24:30Araqif window == nil:
02:24:35Araqget rid of the ()
02:24:39girvohah yeah, oops :)
02:25:06girvoNim has come a long way, so nice to use now. Very impressed :)
02:25:16girvo(not that it wasn't nice before, mind you!)
02:25:32flaviuhttp://www.pcre.org/original/doc/html/pcredemo.html
02:25:42flaviudoing a proper find is ugly
02:26:57girvoThis 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:16girvo`if init != true:` is what I'm currently using and it seems to work, but that was me just guessing
02:28:01girvoI see it's got a toBool rter
02:28:23girvoOh, never mind, answered my own question :3
02:28:24girvo` SDL_Return* {.size: sizeof(cint).} = enum SdlError = -1, SdlSuccess = 0 ##\
02:30:15girvoI absolutely love being able to do `tex.DestroyTexture
02:30:30girvoSo much nicer than `SDL_DestroyTexture(tex)` everywhere
02:31:32def-"tex.destroy" or "destroy tex" should also work
02:32:20girvobeautiful, cheers
02:35:21girvoI 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:25girvo(on OSX)
02:36:17Araqthat's possible
02:36:48Araqit's always possible via dynlibOverride but maybe sdl 2 doesn't even need that
02:39:22Araqgood night
02:43:02girvoNight :)
02:43:19jpoirierAraq: proper looking output https://gist.github.com/jpoirier/31076f15ac14147a9802
02:44:29Varriountgokr1: Ping
02:46:15Varriountjpoirier: +1
02:46:38girvoNow 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:51MyMindan equivalent to erand48() ?
02:47:10VarriountMyMind: It would help if I knew what erand480 does.
02:47:27MyMindhttp://linux.about.com/library/cmd/blcmdl3_erand48.htm
02:47:30Varriountgirvo: Could you explain a bit more? I might be able to help.
02:47:58Varriountgirvo: Do the random numbers need to be cryptographically random?
02:48:03MyMindfunctions return non-negative double-precision floating-point values uniformly distributed between [0.0, 1.0).
02:48:03girvoVarriout, sure :) http://www.willusher.io/sdl2%20tutorials/2014/08/01/postscript-1-easy-cleanup/
02:48:23VarriountMyMind: : Do the random numbers need to be cryptographically random?
02:48:34girvoThe 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:53MyMinddon't think so Varriount
02:48:55girvoIgnore the shitty code:
02:49:12Varriountgirvo: Does this require variadic types?
02:49:14*MrOrdinaire quit (Remote host closed the connection)
02:49:14girvohttp://hastebin.com/lewaqebubi.nim
02:49:22girvoI don't know :)
02:50:34VarriountMyMind: Look at the math module and the mersenne module.
02:51:01Varriountgirvo: What's the problem with that code?
02:51:44Varriountgirvo: If you need to dispatch on the *runtime* type of a type instance, use a method
02:51:59gmpreussnerwhat'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:28girvoHaha I don't know if theres anything wrong with my code, I'm just a bit rusty with Nim :P
02:52:50girvoThe types of all of the items are defined at compile time anyway
02:53:11girvoBut I want the cleanup() proc to take any amount of the items (all different types)
02:54:39Varriountgmpreussner: https://gist.github.com/Varriount/21316c1c99e07ceb0244
02:55:00Varriountgmpreussner: I don't know if you can do it the other way (though, if you can't, open an issue for it)
02:55:41Varriountgirvo: Do the types share a commong parent type?
02:55:48Varriount*common
02:56:09gmpreussnerVarriount: i added a comment
02:56:36gmpreussnerthe problem is that some of the field declarations are rather long
02:56:44gmpreussneri'd rather start the comment on the next line, if that works
02:56:44girvoIt doesn't look like it Varriount, thats the first thing I tried to find
02:56:56girvowell, the "shared" base is `ptr object`
02:57:02girvoWhich is a bit too general it seems ;)
02:57:04Varriountgmpreussner: You can't, not with a doc-comment.
02:57:38Varriountgmpreussner: You can do it with an ordinary comment, but that doesn't end up in the AST
02:57:40flaviumath.random is technically wrong, but practically it's close enough.
02:57:55Varriountgmpreussner: Please open an issue for that.
02:59:10Varriountgirvo: You *might* be able to use methods, in combination with a conversion.
03:00:23Varriountgirvo: 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:48girvoHm, not a bad idea
03:01:27Varriountgirvo: Also, remember the tradeoffs for dynamic method dispatch VS direct dispatch
03:01:35girvogrr I can't seem to get varargs to work
03:02:03Varriountgirvo: Write a conversion procedure which converts/casts the given type to a ptr object
03:03:15Varriountgirvo: Methods have a O(n) overhead, with n being the number of types that could be dispatched from.
03:03:31girvoHere's what I've got: http://hastebin.com/ixanoxeviv.nim
03:03:37girvoWhich doesn't work
03:03:43girvoProbably because I've no idea what I'm doing ;)
03:03:43flaviuWhat is the standard order of the needle and haystack for nim?
03:04:11Varriountflaviu: No idea. I want to say (haystack, needle), but please check.
03:04:20girvothis is the compilation error: http://hastebin.com/iqavelezeg.bash
03:05:46Varriountgirvo: Try this: http://hastebin.com/viguyajube.coffee
03:07:19Varriountgirvo: 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:21flaviuVarriount: Yes, it seems that the majority of functions are haystack, needle.
03:07:22girvo`postscript1.nim(21, 48) Error: '(' expected`
03:07:58Varriountgirvo: Wrap it then.
03:08:16girvoTrying that now :)
03:08:20girvoI appreciate your help btw
03:08:31flaviuMaybe needle-haystack order would make a good addition to NEP 1
03:08:57Varriountflaviu: I'm wondering if I should change 'style guide' to 'convention guide' or something
03:09:12VarriountOr maybe make a second page with good practices?
03:09:27girvoInteresting: postscript1.nim(6, 4) Error: cannot instantiate: 'result:type'
03:09:51keyleas a new user I had been seeking best practices
03:10:07Varriountkeyle: If we were to write such a page, where should we post the link?
03:10:33keyleit's more about making sure it's found via google
03:10:39VarriountI'm going on a 4 hour bus ride tomorrow, so I'd have google.
03:10:47keylenimrod anything: god and religion - wtf
03:10:57keylenim anything: nothing good
03:11:04Varriountkeyle: Oh sure, let me just ask my contact at google to bump up our search score. :/
03:11:11keylehehe
03:11:14keyleI can help with that
03:11:15girvohaha
03:11:31flaviuVarriount: Google provides tools to help you with that, but dom96 hasn't set it up yet
03:11:43keyleimho it's critical
03:11:44flaviuhttps://www.google.com/webmasters/tools/home?hl=en
03:12:00girvoI've been doing what I needed to do for searching go stuff: `nim lang` instead of just `nim` (sometimes `nimrod lang`)
03:12:34Varriountgirvo, keyle: Well, we just switched from 'Nimrod' to 'Nim', so the search bots haven't crawled and indexed everything yet.
03:12:41girvoYeah exactly :)
03:12:56keyleI usually go from manual.html, lib.html, forum search and in desperation, the nim repo
03:12:58Varriountgirvo, keyle: You two do know we have a style guide, right?
03:14:11keyleI didn't
03:14:32flaviuI've sent a message to that MIT website that mirrors the Nim docs
03:14:34*jefus__ joined #nim
03:14:35keyleI format mine based off the nim source as convention
03:14:48flaviuhopefully they take it down soon, that should help google a bit.
03:14:54keyleflaviu: fantastic
03:15:36keyleVarriount: this is why I asked whether nim had a nimfmt, a la gofmt
03:15:53keylesomething you run on a directory, opens all nim files, formats it nicely
03:15:58flaviuWhat happened to nim pretty?
03:16:49Varriountflaviu: Replaced by nimfix.
03:16:58Varriountflaviu: I don't know if that does formatting.
03:17:30keyleIt can also check that your identifiers adhere to the official style guide and optionally modify them to do so (via --styleCheck:auto).
03:17:31girvoOh, 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:36girvoOr am I crazy?
03:18:01Varriountgirvo: You shouldn't have to.
03:18:14gmpreussneris there a way to override the alignment of objects?
03:18:19*jefus_ quit (Ping timeout: 264 seconds)
03:18:22girvoBecause without it, it seems to not overload properly
03:18:40girvoI've changed the name of the top-level proc to remove that overload temporarily
03:18:45gmpreussneri was looking for something like {.align: 8.} but couldn't find anything :|
03:19:15Varriountgmpreussner: I don't think so, sorry.
03:19:19girvoWith the castToPtr in it I get this error (which I'm unsure what it means): Error: cannot instantiate: 'result:type'
03:19:41gmpreussnerVarriount: hmmk... i'll file another issue
03:20:21EXetoCgirvo: if there's a collision then yes you probably need [] then
03:20:24Varriountgirvo: Could you just past the actual file? It would be much easier for me.
03:20:37Varriount*paste
03:21:07girvoSure :)
03:21:26girvohttp://hastebin.com/hodapimati.nim
03:21:35girvoIgnore my horrid code, I'm learning again :)
03:22:05girvoOh, the runCleanup(tex) command should be runCleanup(tex, bmp, renderer, win)
03:22:13*darkf joined #nim
03:22:38girvowrapping the runCleanup call in [] gives this:
03:22:39girvoError: type mismatch: got (PSurface) but expected 'PTexture'
03:23:21girvoSo it looks like I've overloaded incorrectly perhaps?
03:23:37keyleVarriount: has any effort been made to bring a nim compiler on a web page?
03:23:53Varriountkeyle: The closes we have is the Mimbus IRC bot
03:24:17keylehow does Mimbus handle security, ignores "import os" and such?
03:24:36Varriountkeyle: Ask flaviu. I believe he has it sandboxed
03:24:50keyle!eval while true: echo 1;
03:24:59keyleok
03:25:11Varriount.eval echo(1)
03:25:12girvo!eval echo("Hello, world")
03:25:14MimbusVarriount: 1
03:25:16girvo.eval echo("Hello, world")
03:25:19Mimbusgirvo: Hello, world
03:25:25girvoHah, cool.
03:25:38VarriountIf you guys need to use it a lot, go to #nim-offtopic
03:25:45keyle.eval for i in 1..10: echo $i
03:25:48Mimbuskeyle: eval.nim(3, 21) Error: type mismatch: got (proc (varargs[expr]){.locks: 0.}, int)
03:26:10Varriountgirvo: I don't know what problem the compiler is having.
03:26:12keyleyep ok
03:26:26Varriountgirvo: You could also try a template.
03:26:38girvoYeah I think a template will be the way to go
03:26:51girvoThat's how it's done in the original C++ code, though their templates are different to nims iirc :P
03:27:53girvoI'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:59girvoSo that I can write it up for Nim instead :)
03:28:22girvoTranslating 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:51girvoAnd 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:59girvoAnd gosh Nim plays nicely with Make
03:36:16Varriountgirvo: Eeew, you said the unfun word
03:38:40*girvo quit (Ping timeout: 244 seconds)
03:38:51Varriount._.
03:56:36*djruffkutz joined #nim
03:57:35*djruffkutz quit (Excess Flood)
04:01:37*sillesta quit (Ping timeout: 246 seconds)
04:02:22keyleare _variable forbidden?
04:02:43def-yes
04:03:06keylewhat was the thinking behind that?
04:03:13def-http://nim-lang.org/manual.html#identifiers-keywords
04:03:45keylethx
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:50flaviukeyle: I have it set up as it's own user
04:18:03flaviuIt's not really sandboxed, but it can't access any of my personal information
04:18:28*HakanD joined #nim
04:18:29flaviu.eval echo(readFile("/etc/passwd"))
04:18:32Mimbusflaviu: root:x:0:0:root:/root:/usr/bin/zsh
04:18:32*Mimbus quit (Excess Flood)
04:18:38*Mimbus joined #nim
04:18:40keyleheh
04:19:05flaviu.eval echo(readFile("/home/user/file.md"))
04:19:08Mimbusflaviu: Error: unhandled exception: cannot open: /home/user/file.md [IOError]
04:19:34keylefor a web version like this https://play.golang.org/
04:19:40keyleit'd probably be better sandboxed
04:19:43flaviuYep
04:19:48flaviulinux containers or something
04:19:48*JinShil joined #nim
04:20:08keylejust strip out contents before compiling nim
04:20:15flaviubut here, we can just ban people who really try to exploit it.
04:20:25keyleindeed
04:21:00flaviuanyway, 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:09keyleany ideas why? http://hastebin.com/okunopiyic.bash
05:47:49*FreedomOverdose quit (Quit: Leaving)
05:48:31*MrOrdinaire joined #nim
05:48:47def-keyle: echo(...)
05:48:51def-or use strong spaces
05:49:13def-the $ binds differently than expected
05:49:31keyleah makes sense now, thanks
05:50:39def-but you don't need to write $list.len here anyway
05:50:49def-just write it like this: echo list.len, " results"
05:51:08def-echo automatically converts all its arguments to a string using `$`
05:51:23keyleah
05:51:25*MrOrdinaire quit (Client Quit)
05:51:34keyleI've been using `&`
05:51:50keylethanks
05:52:10def-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:05keylecompiling nim on a mac from git devel, I get this : http://hastebin.com/noyebosama.sm - any ideas?
08:37:23keyle(following the website steps)
08:37:43keyleI did notice it used clang tho...
08:38:41dtscodecare to paste all of the terminal output starting with the git clone git://github.com/Araq/nim/ ?
08:38:54dtscodebecause right now i say its a build error, but i would like to be sure
08:39:04keyleok
08:40:40keyle_macdtscode: http://hastebin.com/elenevogut.md
08:40:57dtscodek hold on
08:41:25keyleno worries thank you :)
08:43:12*HakanD quit (Ping timeout: 245 seconds)
08:43:52dtscodeyes my best bet would be a build issue. i have three recommendations
08:44:18dtscodethe first, open an issue on the repo documenting what you did (ie link to the hastebin) and the issue
08:44:30dtscodethe second, try building master, since that should work
08:44:42dtscodethe third, wait for someone to come on who might be able to help more
08:45:23keylethanks
08:45:32dtscodenp
08:45:45keyleI wanted devel because various stdlib have been fixed and I need those fixes
08:45:52keylehad the issue on PC
08:47:39dtscodeo rly? hmmm... windows?
08:48:30keylethe devel build is ok on windows
08:48:41dtscodewhat do you mean had the issue on pc then
08:48:42dtscode?
08:49:04keylecompiling with nim master, some packages have issues
08:49:15dtscodeoic
08:49:15keyledevel has the fixes
08:49:47dtscodewhats the current version?
08:49:54keylehttps://github.com/Araq/Nim/issues/1932
08:50:08keylehm
08:50:36*HakanD joined #nim
08:50:38dtscodei wonder...
08:50:44dtscodedo you have gcc installed/
08:50:48keyle0.10.3 (2015-01-11) [Linux: amd64]
08:51:13keyleyep
08:51:20dtscodeok, i have one more idea. since 10.3 builds fine for me
08:51:27dtscodeok, what does echo $CC say?
08:51:42keyleblank line
08:51:51dtscodeoh wait
08:53:31dtscodehold 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:46dv-gcc 0.10.3? i think that might be a bit out of date
09:02:24dtscodedv-, nim
09:04:05keyle_macexport CC=gcc-4.2
09:04:06dv-oh, haha
09:04:09keyle_macdidn' t help
09:04:26keyle_macstill uses clang
09:04:30keyle_macI should see gcc no?
09:05:12dtscodekeyle, thats what i thought, but i guess im wroong. i cant figure out how to get it to use gcc :/
09:05:23dtscodeoh duh
09:05:32keyle_machttp://stackoverflow.com/questions/6796982/clang-and-the-default-compiler-in-os-x-lion
09:05:34dtscodealias clang=gcc
09:05:35keyle_macthis might do it
09:06:55dtscoderun that command in your terminal and then try it again
09:08:49keylestill says clang!
09:08:56dtscodeit should
09:09:05dtscodebut internally it *should* be using gcc
09:09:10keyleoh
09:09:32keylesadly same result
09:09:38keyleI gtg, thanks for the help
09:09:43dtscodehmmm.... yeah im out of ideas then
09:09:48dtscodelater 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:58Araqgmpreussner: use ## \
09:43:07Araqdtscode: we just dicussed nim doesnt use the CC environment variable
09:43:37*z1y1 quit (Ping timeout: 264 seconds)
09:43:40dtscodeAraq, 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:25ekarlso-keyle: more like the registry part of npm
11:28:29ekarlso-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:23keyleAraq: responded to 1932
12:30:26Araqgood but I'm not here.
12:30:52keyleekarlso-: ok
12:31:26keyleIs there a nightly system for builds win/mac/linux for nim?
12:33:13*z1y quit (Ping timeout: 244 seconds)
12:35:42Araqyes but we replaced the old system "nimbuild" with a python based that doesn't work at all
12:36:28Araqthe idea was to free dev resources
12:36:54Araqnow people want to repeat this success story with the documentation builder
12:37:43keylethat'd be handy to just go pick up the latest nightly compiler instead of stuffing around with my mac
12:40:15Araqkeyle do this please
12:40:20Araqgdb bin/nim
12:40:23Araqrun c koch
12:40:32Araq--> attach this stack trace
12:40:46keyleah
12:42:19keyle_macAraq: http://hastebin.com/uyequvofam.coffee
12:43:01Araqis that a 32 bit setup?
12:43:28MyMindwhat does it mean
12:43:30MyMindError: internal error: GetUniqueType
12:43:32MyMindNo stack traceback available
12:43:34MyMind?
12:43:39keyle_macthis mac was the first gen intel mac
12:44:01AraqMyMind: it means you typed 'var x = int' instead of 'var x: int'
12:44:15MyMindbut doesnt show the line
12:44:16*Sphax joined #nim
12:44:32keyle_mac10.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:39Araqkeyle_mac: sorry that's still not a stack trace
12:44:45Araqtype 'bt' in gdb
12:45:03AraqMyMind: well an internal error is a bug too of course
12:45:30Araqand this GetUniqueType bug should really be a showstopper by now I guess
12:46:02keyle_machttp://hastebin.com/otivivogah.coffee
12:46:15MyMindshould be full of bugs its my first attempt https://gist.github.com/Sembei/7f58ab6e1c84f5d5300e
12:49:19Araqkeyle_mac: print *ol
12:50:52*vendethiel joined #nim
12:52:04keyle_machttp://hastebin.com/lejusucoyo.pl
12:52:42Araqkeyle_mac: ok that's all very interesting :-)
12:52:52Araqyou got some very nice corruption here
12:52:56keyle_mac27 instead of 28?
12:53:09Araqbut I need to go now, see you later
12:53:18keyle_macwill update ticket, thanks
12:53:19Araqno the typ has 'address' 0x36
12:53:42keyle_macok
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:02ekarlso-wonder how hard it would be to add package registration to nimble
13:27:12ekarlso-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:08nickles*: Trying to compile third sample from the manual "Special Types; static[T]" fails. Should that work already?
13:55:55flaviuhttp://nim-lang.org/unicode.html#runeLenAt,string,int doesn't appear to deal well with malformed input
13:57:05flaviuie, 0b1100_0000 0b0010_1010 will return 2 instead of raising an error.
13:58:27EXetoCnickles: I assume it has worked at some point
13:58:51flaviuAlso, 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:47MyMindI'm getting a redefinition error at C compile time but nim doesn't show any error
16:36:57MyMindhttps://gist.github.com/Sembei/2effe9b703559c1f28cb
16:41:40*HakanD quit (Quit: Be back later ...)
16:46:55flaviuMyMind: I don't get it either
16:47:19MyMindyou get redefinition error?
16:47:29flaviuapparently nim line 112 and line 128 have the same names
16:47:41*HakanD joined #nim
16:47:44flaviubut they don't.
16:48:01MyMindif you go to the c file
16:48:11MyMindit does 2 definitions
16:48:41*nimnoob quit (Remote host closed the connection)
16:49:21MyMindnimcache/smallpt.c:865:9: error: redefinition of 'p'
16:51:26flaviuOh, I see the problem.
16:51:37flaviuYou have two variables, p and P
16:51:56flaviubut nim normalizes identifiers before outputting the C code
16:52:21flaviuMyMind: Make a bug report
16:52:47MyMindon the same scope?
16:53:25MyMindwhere is the second p?
16:53:46*matkuki joined #nim
16:54:31flaviuMyMind: 159, 114
16:54:43MyMindah yes
16:54:45MyMindI see it
16:55:15*jpoirier quit (Quit: Leaving)
16:57:44*BlaXpirit_ joined #nim
16:58:09MyMindty 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:07MyMindhow you get stdin args ?
17:07:57flaviuMyMind: If you want stdin, then system.stdin
17:08:06flaviuIf you want commandline args, then os.commandLineParams
17:08:15MyMindthe second one
17:08:21MyMindmain(int argc, char *argv[]) <<<
17:08:29flaviuyep, that has nothing to do with stdin
17:08:47MyMindyou have any sample code ?
17:09:20EXetoCit returns a seq[TaintedString]
17:09:25flaviuI don't, but it's just a string sequence
17:09:54EXetoCseq[TaintedString] actually, but TaintedString is an alias for string unless a certain symbol is defined
17:11:33EXetoCremember when I talked about distinct? "when taintMode: type TaintedString* = distinct string ... else: type TaintedString* = string" (from the system module)
17:18:03EXetoC.eval echo os.paramStr[0]
17:18:06MimbusEXetoC: eval.nim(3, 17) Error: type expected
17:18:19EXetoC.eval echo os.paramStr(0)
17:18:23MimbusEXetoC: ./eval
17:20:45EXetoCtest 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:56Varriount|OnABusMeep
18:09:06ekarlso-so, any web devs here ?
18:15:14ekarlso-oh well, styling will be horrible then :P
18:15:32matkukiflaviu: Yesterday we talked about how 'T' and 'P' prefixes can be omitted by using the partial case sensitivity.
18:15:35matkukiThere 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:32matkukiSorry, maybe I should rephrase the question. How does the alternative to the 'T' and 'P' prefix system look like?
18:22:23Varriount|OnABusmatkuki: 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:21matkukiVarriount: Thanks. So no more "TSurface" and "PSurface", replaced with "Surface" and "SurfacePtr"?
18:26:35flaviuYeah, but I don't use any suffix
18:27:03flaviuIf 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:33flaviuIf I need an object as a pointer, I use var T
18:28:31matkukiflaviu: Got it, thanks.
18:28:53Varriount|OnABusmatkuki: Yep.
18:28:57EXetoCbut then you might want to introduce the basic type
18:29:04Varriount|OnABusmatkuki: I'm currently writing a 'Common Conventions and Practices' page too
18:29:28matkukiGreat, on the same wiki?
18:31:08matkukiVarriount: On "https://github.com/Araq/Nim/wiki/" ?
18:32:21*nimnoob joined #nim
18:37:07EXetoCflaviu: and if you then need just 'object'?
18:37:21Varriount|OnABusmatkuki: Well, it will be. Right now I'm typing out in my text editor
18:37:46flaviuEXetoC: You don't need just object. A ref T has a superset of the functionality a T has.
18:37:51Varriount|OnABusmatkuki: I'm on a bus with slow wifi.
18:40:20Varriount|OnABusHm. Besides using new<Type> and init<Type> for construction procedures, what other conventions should I make note of?
18:41:08EXetoCflaviu: someone might
18:42:05*HakanD quit (Quit: Be back later ...)
18:42:33flaviuEXetoC: As I said, ref T's functionality is a super-set of a T's.
18:42:50flaviuIf they really want a T, then they can hack around with casts or whatever
18:44:13EXetoCI was thinking in terms of performance, in which case it'd be redundant
18:45:23flaviuEXetoC: 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:14Varriount|OnABusHello HakanD
18:47:54EXetoCflaviu: and larger types?
18:47:59HakanDhey
18:48:25flaviuEXetoC: I don't understand your question.
18:50:36EXetoCflaviu: there might be rare cases where you want to omit 'ref' for larger types as well
18:52:12EXetoCdoesn'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:16flaviuMy point wasn't that Vec2 is small, I was trying say that new Vec2s would be made constantly.
18:52:52flaviuie, you can't go 20 lines in a game without seeing a mention of Vec2 and friends
18:53:39EXetoCright
18:54:16flaviuBut 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:28flaviuthe overhead doesn't matter much
18:56:55*Varriount|OnABus quit (Ping timeout: 246 seconds)
19:00:00EXetoCand 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:07EXetoCbut 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:49flaviuA nice big "Dynamic allocation and garbage collection is required" in the readme should solve that problem.
19:02:01EXetoCthen what? look for a similar library that provides more freedom?
19:02:38flaviuI suppose, or patch the library for your purposes
19:03:05flaviuIt's an unusual situation, you're probably used to dealing with that if you live under those constraints.
19:04:14EXetoCyep
19:05:36*nimnoob quit (Remote host closed the connection)
19:09:48flaviuVarriount: I see you've made it upload the test results.
19:11:01renesacVarriount: : not sure if it fits your conventions page or would be better as a new page
19:11:17renesacbut you could do one on how to better make bindings
19:11:24*rpag joined #nim
19:11:41renesaca low level binding plus a higher level?
19:11:52renesacexport the low level procs?
19:12:00renesackeep the .h file on the nimrod repository?
19:12:01renesacetc
19:12:34*Sphax joined #nim
19:17:44renesacand 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:06onionhammerVarriount|OnABus did you do that thing?
19:41:05onionhammerah he left
19:41:08*johnsoft joined #nim
19:42:21BlaXpirit_Will Nim run on Android? :|
19:42:27onionhammeryes
19:42:49BlaXpirit_uh cool
19:50:31*Sphax joined #nim
19:50:39flaviuBlaXpirit_: http://buildbot.nim-lang.org/builders/linux-arm5-builder
19:58:50BlaXpirit_ok but has anyone got an actual working application?
19:59:17flaviugrahda has one for OSX
19:59:30flaviuThat's all I know
20:01:57ekarlso-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:58gmpreussnerhmm... looks like my builders are down
20:09:02gmpreussnerlemme take a look
20:10:21flaviuekarlso-: I don't see it yet
20:10:43ekarlso-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:40ekarlso-flaviu: so i'm making a JWT lib as well
20:18:25*minciue joined #nim
20:22:20*UberLambda joined #nim
20:25:02UberLambda /msg NickServ SETPASS UberLambda ffdnalpnnjjs tm3pFreeNodeCreation!
20:25:12UberLambdadang lol
20:25:17Araqwelcome UberLambda
20:25:35UberLambdaThank you :)
20:26:00UberLambdaI guess I'll be more cautious when changing my password next time
20:27:27UberLambdaAraq: BTW Nim(rod) is an amazing language
20:28:42Araqthank you :-)
20:30:31UberLambdaAnd the fact that it can interface so easily with C code makes it even better
20:32:31*superfunc joined #nim
20:37:44gmpreussnerflaviu: it looks like both my builders ran out of disk space. could this be because of buildbot?
20:38:30Araqgmpreussner: how much disk space do these machines have?
20:39:36gmpreussnerthey 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:58flaviugmpreussner: Yeah, it's just 585M for me
20:40:04flaviumostly csources.
20:41:34ekarlso-too bad I can't use employers resources for nim :på
20:42:22UberLambdaIs github working for you?
20:42:41UberLambdaI can't clone any repo and any of its pages don't load for me right now
20:43:01flaviuUberLambda: Did your country ban github?
20:43:27UberLambdaflaviu: No, it seems like a overload peak
20:44:05UberLambdaGithub web pages now work, but nimrod.vim is stuck at 0byte/s while cloning
20:44:15UberLambdaI guess it's just overloaded
20:44:17flaviuRestart your router and modem?
20:45:14UberLambdaflaviu: 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:42UberLambdaNope, 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:27Varriount|Mobileflaviu: ping
20:55:40flaviuVarriount|Mobile: Pong
20:56:17*matkuki joined #nim
20:56:39Varriount|Mobileflaviu: Could you work some Linux magic and find out why the tester on your arm slave is hanging?
20:56:59Varriount|MobileI'd ask gokr to do the same, but he isn't here.
20:57:33flaviuI don't think it's hanging
20:57:35gmpreussnerflaviu: Araq: armv7 is back up. i'll fix armv6 in about 30 minutes. brb.
20:57:52flaviuVarriount|Mobile: You should wait at least 10 hours
20:58:03Varriount|MobileOh, yeah.
20:58:24matkukiCan someone tell me what th "$1" means in the pragma "{.push importc: "SDL_$1".}" ? It's from the sdl2.nim module.
20:58:30Varriount|MobileWell, somethings going on with the other Linux builders
20:58:32Araqyou could disable long running tests
20:59:12Varriount|Mobilematkuki: $1 is replaced by the procedure name.
20:59:17Araqbut apparently nobody really is interested in making this thing run smoothly, let's hack around for a few more months instead
20:59:19flaviuVarriount|Mobile: I helped it past the async test, lets see if that makes it go faster
20:59:36matkukiVarriount: Thanks
20:59:39Varriount|MobileAraq: What?
21:00:13Varriount|MobileI'm not hacking anything together... :<
21:01:52*superfunc quit (Ping timeout: 246 seconds)
21:02:24AraqVarriount|Mobile: why should the process wait for 10 *hours* then?
21:02:56ekarlso-packages.nim(552, 31) Error: expression '.(client, "request", "vg.no")' cannot be called < hmmm
21:03:03ekarlso-can't u call client.request
21:03:26Varriount|MobileAraq: What's the point of running tests if you don't run them all?
21:04:03flaviuVarriount|Mobile: If a test is fairly stable, you could probably run it every 10 runs or so
21:04:11flaviuthen if it fails, just bisect.
21:04:24Araqwhat's the point of a build system that is so unreliable that I never look at the results?
21:04:45Varriount|MobileAraq: Fine, then build your own.
21:04:47Araqwhen 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:13flaviuekarlso-: I can't figure out how to do tags in nim-packages.
21:05:32ekarlso-flaviu: uh, how so ?
21:05:44flaviuHow would I add a new tag?
21:06:04ekarlso-flaviu: that part is a ... bit broken atm!
21:06:08flaviuAh, ok!
21:06:14ekarlso-ideally something like POST /packages/<id>/tags
21:06:27UberLambdaJust wondering, why is the use of unsigned integers discouraged?
21:06:30ekarlso-a a PATCH / PUT ..
21:06:40*vezzy joined #nim
21:06:47*quasinoxen quit (Ping timeout: 256 seconds)
21:08:09flaviuekarlso-: Also, sqlite doesn't have varchar, that's just syntax sugar.
21:08:18flaviuIt's all Text
21:08:19ekarlso-for ?
21:08:21ekarlso-ahhh
21:08:25ekarlso-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:21Mat4|workhello
21:14:31Araqhi Mat4|work
21:15:00Mat4|workHi Araq
21:15:48Mat4|workI'm working to finish my documentation. What was the compiler flag again for compilation without library dependencies ?
21:17:23Araq--os:standalone
21:17:37Mat4|workthanks
21:24:00Mat4|workI 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:01ekarlso-is there a pw hashing thing in nim already ? :D
21:35:21flaviuekarlso-: https://github.com/nim-lang/packages/blob/master/packages.json
21:35:48flaviuhttps://bitbucket.org/BitPuffin/scrypt.nim, git://github.com/ithkuil/bcryptnim/
21:36:01ekarlso-ah, bcrypt
21:36:02flaviuhttps://github.com/flaviut/easy-bcrypt.git
21:36:03ekarlso-:)
21:36:14ekarlso-flaviu: which one -,,-
21:36:15flaviuThat last link is clearly the best :)
21:36:19ekarlso-HAHA :D
21:36:59ekarlso-flaviu: how you add that to .nimble file ? :/
21:37:33*AMorpork is now known as AFKMorpork
21:37:35flaviuRequires: "easy-bcrypt >= 1.0.0"
21:37:49ekarlso-nvm
21:37:50ekarlso-ye
21:51:44*nimnoob quit (Remote host closed the connection)
22:00:32gmpreussnerVarriount: you around?
22:02:43AraqI'm afraid I drove him off :-(
22:04:52AraqVarriount: I'm sorry!
22:05:27matkukiI have a type TColor* {.pure, final.} = tuple[r: uint8, g: uint8, b: uint8, a: uint8].
22:05:29matkukiWhy is "var text_color :TColor = (r:128,g:128,b:128,a:255)" an error?
22:05:55Araqmatkuki: (r: 128u8, ...)
22:06:16Araqand get rid of the .pure, final, it's not necessary
22:06:21BlaXpirit_matkuki, let me ask you
22:06:24BlaXpirit_is that SFML?
22:06:41matkukiAraq: Ahh, thanks.
22:06:50EXetoCAraq: bug?
22:06:52*flan3002 joined #nim
22:07:02matkukiBlaXpitit_: No, SDL2.
22:07:12AraqEXetoC: not for me.
22:07:16BlaXpirit_lol the type looks exactly the same
22:07:19Araqothers may disagree
22:07:41EXetoCthey are compile-time values after all, but that's fine
22:07:58matkukiBlaXpirit_: Are there bindings for SFML?
22:07:59EXetoCconsidering how you feel about unsigned types, and I do agree
22:08:05BlaXpirit_matkuki, 2 different ones
22:09:13matkukiBlaXpirit_: Are you fowlmouth?
22:09:21BlaXpirit_no
22:09:40BlaXpirit_I just finished new awesome SFML bindings a few days ago
22:09:59BlaXpirit_fowlmouth made the previous library, doesn't seem to have time for anything right now
22:10:40matkukiAre your bindings available anywhere? Might check them out.
22:11:02BlaXpirit_matkuki, http://forum.nim-lang.org/t/734
22:11:19*Mat4|work quit (Read error: Connection reset by peer)
22:11:34matkukiBlaXpirit_: Cool, thanks!
22:11:47BlaXpirit_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:38flaviuI have a nimble package, how would I get the path of package's directory?
22:20:20BitPuffinekarlso-: scrypt is better than bcrypt
22:21:21flaviuBitPuffin: You should include the relevant c files with your package.
22:21:45BitPuffinflaviu: no, I don't wanna take responsibility in keeping them up to date in case they get patched :P
22:21:55BitPuffinnot that they would probably
22:22:03BitPuffinbut it's better anyway to get it from the official source
22:22:13BitPuffinso he can verify signatures and such
22:22:15flaviuYeah, but it's a pain
22:22:20BitPuffinsecurity always is
22:22:58flaviuAnyway, it's risky to add a backdoor to a hash function
22:23:08EXetoCflaviu: what do you need the path for?
22:23:12gmpreussnerVarriount: nevermind, all good
22:23:24flaviuEXetoC: So I know which C files need compiling
22:23:33gmpreussnerarmv6 and armv7 builders are both back up
22:23:59BitPuffinflaviu: yeah it is, but if all I have is the bindings he doesn't need to trust me
22:24:18BitPuffinit's the whole point
22:24:21flaviuBitPuffin: It's ok, I trust you.
22:24:39ekarlso-why is scrypt better ? :p
22:25:02flaviuekarlso-: It can't be effectively done on a GPU.
22:25:21BitPuffinflaviu: your trust is not good security practice
22:25:33flaviuBitPuffin: It's good enough.
22:25:33*HakanD quit (Quit: Be back later ...)
22:25:37ekarlso-flaviu: https://bpaste.net/show/a3a9b5d949c7 ...
22:25:40BitPuffinI don't think so
22:25:49flaviuekarlso-: I know
22:25:52flaviuworking on it right now
22:26:03ekarlso-flaviu: ping me when u got it :D
22:26:05ekarlso-I wanna use :D
22:26:17*ekarlso- waits
22:26:52flaviuekarlso-: ping
22:26:58flaviutry 1.0.1
22:27:33ekarlso-worked :D
22:33:43*Trustable quit (Quit: Leaving)
22:34:00ekarlso-flaviu: how can u load a string into PasswordSalt?
22:34:26flaviuekarlso-: Excellent point, I'm 80% done with v2.0.0
22:34:31flaviu:P
22:34:34ekarlso-:/
22:34:40ekarlso-since u write
22:34:50ekarlso-let savedHasH = ...
22:34:59ekarlso-but dont u load savedHash from a string ?
22:35:10flaviuWell, it's an array of char, but that's technically an implementation detail.
22:35:25ekarlso-well, db uses string anyways
22:37:42ekarlso-flaviu: how far off is that ? :D
22:37:47ekarlso-I need to have it for login in packages ;P
22:37:54flaviuekarlso-: Less than 20 min.
22:38:07ekarlso-kewl :)
22:38:19flaviuI want to do some verification too, or it'd be just ~5 min.
22:44:25*keyle joined #nim
22:46:42Araqhi keyle can you compile nim devel with some working nim and -d:useSysAssert -d:useGcAsssert -d:release ?
22:47:41matkukiCan 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:06keyleAraq: I'm at work, will try in approx 8hrs ;)
22:48:23Araquhh ok, no worries
22:48:29*stapler joined #nim
22:48:42matkukiMyFunc(?)
22:49:05*stapler quit (Changing host)
22:49:05*stapler joined #nim
22:49:14Araqmatkuki: if the literal fits a cint it should just work
22:49:41AraqmyFunc(42) #ok, compiler knows 42 fits a cint
22:50:37*gmpreussner quit (Quit: Konversation terminated!)
22:50:53matkukiAraq: 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:40Araqwell 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:25matkukiAraq: What is the easiest solution for this?
22:53:04Araqmatkuki: (x: 10i32, y: 10i32, ...) or write a template to lessen the pain
22:53:28ekarlso-wonder how hard it would be to do something like JWS / JWT in nim..
22:53:50matkukiAraq: Great, thanks! The i32 postfix is just fine.
22:54:08Araqtemplate mrect(a, b, c, d): expr = (x: a.cint, y: b.cint, w: c.cint, h: d.cint)
22:54:23Araqmrect(10, 10, 200, 200)
22:54:48ekarlso-what would you guys advise to use for now for tokens ?
22:58:50*Sergio965 joined #nim
23:01:11Araqekarlso-: I don't understand the question
23:01:13matkukiAraq: Thanks for the template. I'm not that good at them yet.
23:02:00ekarlso-Araq: as in what way would be easiest atm to do tokens in nim
23:02:09ekarlso-I was wondering about doing JWT stuff but
23:02:57flaviuekarlso-: Ok, pushed
23:11:27ekarlso-flaviu: did you break $hash ?
23:12:06flaviuekarlso-: No, but I properly namespaced it
23:12:14flaviuyou have to import easy_bcrypt
23:15:11*Matthias247 quit (Read error: Connection reset by peer)
23:18:51ekarlso-flaviu: https://bpaste.net/show/22fb52add40b
23:18:56ekarlso-doesnt that look corecT?
23:18:58*jpoirier joined #nim
23:22:52flaviuekarlso-: Ok, use 2.0.1
23:23:13flaviuDon't screw up the hash or bad things will happen :P
23:23:41ekarlso-flaviu: how you mean ?
23:24:28flaviuI have no idea what happens when you pass in an invalid hash.
23:24:51ekarlso-ah
23:25:58*sillesta quit (Ping timeout: 244 seconds)
23:28:36ekarlso-great, now getting another error :p
23:28:52ekarlso-https://bpaste.net/show/6f20b1f63289 flaviu
23:29:05ekarlso-nothing confidential there
23:29:32*Demos quit (Read error: Connection reset by peer)
23:29:49flaviuekarlso-: post the code please.
23:30:18flaviuspecifically the database insertion code.
23:30:21ekarlso-https://bpaste.net/show/aa5f9a5b2f63
23:31:47*ajhager quit (Ping timeout: 252 seconds)
23:32:14flaviuekarlso-: s/\?/'?'/g
23:33:44ekarlso-then it blows up with a sql insert error
23:34:00ekarlso-https://bpaste.net/show/0833699781eb
23:35:00*z1y joined #nim
23:36:31ekarlso-that goes *boom*
23:38:51flaviuekarlso-: I don't really know
23:39:00ekarlso-i guess the pw thing returns a ' in the token
23:39:04ekarlso-and it blows due to it ?
23:39:07flaviuIt shouldn't.
23:39:27flaviuthe only valid characters are [a-zA-Z$0-9./-]
23:40:45ekarlso-btw
23:41:19BlaXpirit_can someone help me diagnose a compiler crash?
23:41:22ekarlso-is it let foo = $jsonobject["foo"] or jsonobject["foo"].str to get the elements ?
23:41:27ekarlso-ehm, element as string
23:41:27BlaXpirit_my program just doesn't work and i have no idea why
23:41:36BlaXpirit_it used to work on old version of nimrod
23:41:37*JinShil joined #nim
23:41:47BlaXpirit_now i get a compiler crash and nothing
23:41:49ekarlso-if I do $jsonobject["foo"] it makes it "value"
23:43:13flaviuekarlso-: Yes, `$` on json is renders it as json.
23:43:25BlaXpirit_basically, can someone try to run this example: https://github.com/BlaXpirit/nim-random#readme
23:43:37BlaXpirit_to compile it even, because it crashes the compiler
23:43:56ekarlso-hmm, flaviu I wonder if the sql stuff does some quoting or smth that make sit bork
23:47:55ekarlso-Araq: is dbQuote bugged in this case ?
23:49:03keyleI made this yesterday, good way to learn nim https://github.com/keyle/hastebin
23:49:19ekarlso-the error seems to be that dbquote is adding ' at the front of the hash flaviu but not the end
23:50:24flaviuekarlso-: Nope, it looks good.
23:50:36flaviuhttps://github.com/Araq/Nim/blob/master/lib/impure/db_sqlite.nim#L50
23:50:54ekarlso-but why aint it working then :P
23:52:13flaviuBlaXpirit_: echo to_seq(rng.random_sample(a, 3)) is broken, dunno why.
23:52:56BlaXpirit_oh yeah, works without it
23:52:58flaviuekarlso-: Go in lib/impure/db_sqlite.nim and patch dbQuote to print the result.
23:53:05BlaXpirit_i assumed it broke on something during import.
23:53:07BlaXpirit_thanks
23:55:29flaviuBlaXpirit_: Have you seen http://www.pcg-random.org/ ?
23:55:35BlaXpirit_no
23:55:41ekarlso-flaviu: it's borked
23:55:49ekarlso-INSERT INTO users (email, password, display_name) VALUES ('[email protected]', '$2a$12$gdoZAAyoHmxbvp/i1aOz9.43GP3iSmiuzoIiZ/sdRG5BJKpf64Rbq < clearly bork sql
23:55:58flaviuekarlso-: Oh, my fault.
23:56:06ekarlso-flaviu: :D
23:56:07flaviustray null byte
23:56:17*NimrodBot joined #nim
23:56:32ekarlso-.eval let foo = 1
23:56:35Mimbusekarlso-: <no output>
23:56:51ekarlso-one more version then flaviu ?:)
23:56:57flaviu1 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:39flaviuekarlso-: 2.0.2
23:59:05*rpag quit (Quit: Leaving)
23:59:25*ajhager joined #nim