<< 14-07-2015 >>

00:09:47*Cryptotoad quit (Quit: Leaving)
00:10:18infinity0i'm trying to patch Nim to get it to pass LDFLAGS and CFLAGS through to gcc, any pointers?
00:15:38Varriountinfinity0: I believe there are command line options
00:16:44Varriountinfinity0: --passC and --passL should do the trick.
00:17:01VarriountLook the output of `nim --advanced`
00:17:02infinity0aha, thanks
00:21:01*yglukhov_____ joined #nim
00:25:30*yglukhov_____ quit (Ping timeout: 256 seconds)
00:28:30*gyeates quit (Ping timeout: 248 seconds)
00:46:19*jaco60 quit (Ping timeout: 256 seconds)
01:10:26*johnsoft joined #nim
01:11:39infinity0oh, and what's the difference between build.sh and makefile?
01:19:49Varriountinfinity0: I don't know. I would presume they do the same thing.
01:20:04infinity0ah, it looks like makefile is newer and meant for parallel builds
01:20:12VarriountI'm on Windows, so I've never used the makefile for Nim
01:23:44*vendethiel quit (Ping timeout: 250 seconds)
01:25:16*vendethiel joined #nim
01:26:37Varriountinfinity0: So, how do you find Nim so far?
01:26:56infinity0haven't tried the language yet, still trying to package the compiler, lol
01:27:07infinity0are there syntax highlighters for it yet?
01:27:13VarriountPackage the compiler? Do you mean bootstrapping it?
01:28:31Varriountinfinity0: https://github.com/nim-lang/Nim/wiki/Editor-Support
01:29:53infinity0Varriount: i mean make a debian package for it. trying to do #2128 in a nice way atm, i think it's working.
01:29:56infinity0cool, thanks for the link
01:30:47infinity0ah, the editor i use, geany, has a pull request open
01:31:37infinity0i guess i could try gedit first
01:35:17*Demos_ joined #nim
01:36:04EXetoCthe one from 2013?
01:38:27*Demos quit (Ping timeout: 252 seconds)
01:40:10*Demos_ quit (Ping timeout: 264 seconds)
01:40:16infinity0are you talking about the syntax hl? apparently this is from 2 months ago https://github.com/nim-lang/Aporia/blob/master/share/gtksourceview-2.0/language-specs/nim.lang
01:41:21*rgv151 quit (Ping timeout: 255 seconds)
01:47:40*brson quit (Remote host closed the connection)
01:58:09*bogen-work quit (Quit: Lost terminal)
02:03:57*EXetoC quit (Ping timeout: 256 seconds)
02:19:37*apense quit (Read error: Connection reset by peer)
02:20:02*apense joined #nim
02:28:53*BitPuffin|osx joined #nim
02:46:46*Kingsquee joined #nim
03:08:51*vasher_ quit (Quit: Connection closed for inactivity)
03:13:05*saml_ quit (Quit: Leaving)
03:23:23*pregressive joined #nim
03:45:16*darkf joined #nim
03:49:12*pregressive quit (Read error: Connection reset by peer)
03:54:17*BitPuffin|osx quit (Ping timeout: 240 seconds)
03:55:51*pregressive joined #nim
04:06:39*brson joined #nim
04:14:23*Kingsquee quit (Quit: Konversation terminated!)
04:24:15*vendethiel quit (Ping timeout: 255 seconds)
04:25:35*vendethiel joined #nim
05:03:39*brson quit (Remote host closed the connection)
05:45:00*pregressive quit (Remote host closed the connection)
05:50:41*vendethiel quit (Ping timeout: 244 seconds)
05:57:36*vendethiel joined #nim
06:21:02*vendethiel quit (Ping timeout: 248 seconds)
06:24:07*jszymanski joined #nim
06:56:17*apense quit (Ping timeout: 240 seconds)
07:09:01*_stowa joined #nim
07:10:03*vendethiel joined #nim
07:11:00*yglukhov_____ joined #nim
07:11:01*yglukhov_____ quit (Remote host closed the connection)
07:11:36*yglukhov_____ joined #nim
07:17:09*_stowa quit (Remote host closed the connection)
07:21:29*_stowa joined #nim
07:28:55*solidsnack joined #nim
07:33:48*vendethiel quit (Ping timeout: 250 seconds)
07:39:17*vendethiel joined #nim
07:44:56*Trustable joined #nim
07:54:32*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:00:13*coffeepot joined #nim
08:00:16*vendethiel quit (Ping timeout: 246 seconds)
08:09:18*vendethiel joined #nim
08:14:41*xet7_ joined #nim
08:15:50*solidsnack joined #nim
08:23:51*solidsnack quit (Read error: Connection reset by peer)
08:28:00*jaco60 joined #nim
08:32:28*vendethiel quit (Ping timeout: 246 seconds)
08:34:35*wb joined #nim
08:36:38*vendethiel joined #nim
08:47:58*xcombelle joined #nim
08:52:06*bjz joined #nim
09:19:44*Kingsquee joined #nim
09:24:16*vendethiel quit (Ping timeout: 246 seconds)
09:25:51coffeepotis there any way to declare a type that points to an array of undetermined size? This is just for convenience of working with C style buffers. For example, currently I have something like type ByteBuf = ptr array[0..MaxBufSize, byte] but I'd like to be able to resize (via alloc0) the memory the type points to. Is there like, an unchecked length arr
09:25:51coffeepotay I can define?
09:28:41def-coffeepot: http://nim-lang.org/docs/manual.html#foreign-function-interface-unchecked-pragma
09:29:01coffeepotdef- <3 thankyou! :D
09:31:30Araqcoffeepot: you can also just use 'string' for a growable byte buffer
09:32:57Araqalso I'm still waiting for a PR from you :P
09:33:17*vendethiel joined #nim
09:36:48coffeepotI know I can use cstring and string but what if down the line string chars become indexed by widechar? Even if this is very unlikely, I prefer to be explicit that I'm dealing with bytes. I did think of using a seq though as I'm fairly sure they're contiguous? Btw do you mean PR for the times.nim module?
09:37:12Araqfor everthing
09:37:15Araqthe times module
09:37:24Araqyour sql server wrapper
09:37:37Araqand yes, they are contiguous
09:39:50coffeepotodbc module only needs a bit of fiddling for some variable length params and adding of 'begin/end transaction'. But those shouldn't take too long.
09:41:00Araqand I still like to have a disphelper wrapper ...
09:41:07*zahary__ quit (Read error: Connection reset by peer)
09:41:09coffeepotI have this for times utils https://gist.github.com/anonymous/b048d17d216a54a87482
09:42:03Araqgood enough :-)
09:42:05coffeepotthe main thing being, being able to convert epoch seconds to TimeInfo
09:42:28Araqwell dom96 will review it once you created a proper PR
09:42:55coffeepotok, well this'll be my first PR so I'll have to work out what's what :)
09:50:41*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:52:00coffeepotI'm not quite sure why, with a function that returns TimeInfo (which is object of RootObj), I get the error "cannot prove result is initialised" when it hits "result.year = " Why would it need initialisation?
09:52:22coffeepotsorry not error, warning, but it states it will become an error in future
09:52:51Araqyeah it still contains a not-defaultable type like range[1..100]
09:53:09Araqthis tags the type as "init it properly"
09:53:27coffeepotoh! okay fair enough, I'll sort that out then
09:53:32Araqfor TimeInfo this means instead of result.a = x; result.b = y;
09:53:49Araqyou need to do: result = TimeInfo(a: x, b: y)
09:53:56coffeepotahh ok will do
10:00:06baabelfishcan nim deduce the return value of a procedure without explicitly writing the type?
10:00:14baabelfishlike auto in C++14
10:00:17*bjz joined #nim
10:00:34Araqbaabelfish: yes, with 'auto'
10:00:41Araqproc foo: auto = 19
10:00:44baabelfishAraq: haha
10:00:49baabelfishhow did I miss that
10:01:10baabelfishthanks
10:07:32*vasher_ joined #nim
10:07:59*Jehan_ joined #nim
10:29:16Varriountreactormonk: Here's an (unfinished) version of the new nim-by-example strings page.
10:29:29Varriountreactormonk: https://gist.github.com/Varriount/c3ba438533497bc636da
10:29:54*Trustable quit (Read error: Connection reset by peer)
10:31:16*Trustable joined #nim
10:36:01*EXetoC joined #nim
10:44:56coffeepotwhen doing this PR, is it worth leaving in my comments with urls to where I adapted the algorithms from or shall i just strip that?
10:45:27coffeepoti mean, they're pretty universal algorithms tbh
10:45:57Araqurls are fine
10:46:00coffeepotk
10:55:48*dv- quit (Ping timeout: 258 seconds)
10:56:07*Ven joined #nim
10:56:45*dv- joined #nim
10:59:59coffeepotok PR done
11:00:02coffeepotfor times.nim
11:00:56*mnemonikk quit (Ping timeout: 258 seconds)
11:03:33*mnemonikk joined #nim
11:03:43*mnemonikk quit (Changing host)
11:03:43*mnemonikk joined #nim
11:05:53coffeepot...and already had to make a comment on the commit for something I missed :)
11:08:35*xet7_ quit (Read error: Connection reset by peer)
11:08:46*xet7_ joined #nim
11:11:32*raza joined #nim
11:28:55*Jehan_ quit (Quit: Leaving)
11:35:24*arnetheduck joined #nim
11:38:31*UberLambda joined #nim
11:39:06UberLambdaHello everyone, am I the only one that can't compile nimsuggest? It can't find the securehash module
11:39:29UberLambdawhere by compiling I mean installing from nimble
11:41:17UberLambdaWait, my Nim was too old. Fixed :P
11:58:59*xet7_ quit (Ping timeout: 246 seconds)
12:12:42*xet7_ joined #nim
12:18:50*vasher_ quit (Quit: Connection closed for inactivity)
12:26:30*luke joined #nim
12:26:33*luke is now known as Guest54649
12:27:18Guest54649so nim, just downloaded and am trying to figure it out. it seems similar to python which I know well. whats the advantage to using a sequence over an array?
12:28:03*xcombelle quit (Quit: Leaving)
12:28:30coffeepotseqs are variable length, whereas arrays are not :)
12:28:31def-Guest54649: array size has to be known at compile time and is fixed, seqs can be variable size and resized
12:28:53Guest54649ah thanks for that
12:41:45*UberLambda quit (Remote host closed the connection)
12:45:00federico3Guest54649: not that similar
12:46:46VarriountGuest54649: Some other facts about sequences: They are backed by dynamically allocated arrays (so their performance is comparable), and they are copy-on-assignment.
12:48:03Guest54649federico3: well at first glance it is more similar than any other programming language I know, such as C or java. They certainly are similar, sorry if they are not 'that similar'. and cheers Varriount!
12:49:19Guest54649I like how it has similar set rules to python and it has the 'in' operator. I do like this language
12:49:24coffeepotYou've probably seen these already, but if not some nice tutorials here http://nim-lang.org/learn.html and the manual is great for learning too http://nim-lang.org/docs/manual.html
12:49:33AraqI think it's fair to say "Nim is Python-like except for all the stuff we improved" ;-) multi-line lambdas come to mind
12:49:51federico3Guest54649: I mean - be careful around the differences
12:51:02federico3...and speed. But no handy interactive interpreter, dir(), help()
12:51:17Guest54649yeah thanks coffeepot, going through some now. and I'm sorry guys, I just meant it as a nice fact, I love the python syntax, its fast to type but this Nim seems faster. I know there are differences that will matter on large but it was meant as a compliment. :D
12:52:15federico3Guest54649: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
12:53:05pigmejAraq: though one of the biggest gotchas of Nim for Pythoners are inclusive ranges
12:54:10Araqpigmej: really? I don't think so. a[i:j] is not valid syntax and the replacement is a[i ..< j]
12:54:26Araqwe need to communicate this fact better perhaps
12:55:28Araqand in my humble opinion the distinction of '..' vs '..<' is beautiful
12:56:26*themagician quit ()
12:56:29pigmejAraq: sure it is
12:56:31federico3+1
12:56:43pigmejbut still it's different than one might be used to
12:56:44Guest54649I was surprised about the inclusive ranges. it is interesting
12:57:40Guest54649federico3: sorry if I insulted the language in your opinion, it seems like I did for you but cheers for the link. I should have clarified that the syntax was similar.
13:07:54*xet7_ quit (Ping timeout: 250 seconds)
13:12:19dgellowI am looking for the `new` (like in `new(result)`) implementation. I found this line in 'system.nim' `proc new*[T](a: var ref T) {.magic: "New", noSideEffect.}`. Where can I found the magic implementation ?
13:13:21Araqdgellow: magic means "built into the compiler"
13:14:03Araqyou can nimgrep for mNew in the compiler dir to see what it does
13:14:25*UberLambda joined #nim
13:14:38Araqit mostly delegates the work to newObj defined in lib/system/gc.nim
13:20:09UberLambdaIs it normal for nimsuggest not to suggest anything? company-nim.el from the official Emacs mode receives no suggestions, and trying to invoke it from shell (via sug filename:line:col) yields the same result :/
13:20:21UberLambdaDo I have to configure something else?
13:20:27dgellowAraq: Thank you
13:21:23AraqUberLambda: for me nimsuggest works well. we need proper bug reports to improve the experience for others
13:23:49UberLambdaAraq: hm, I'll try to fiddle around, and I could open a bug report if I can't do anything about it. Maybe it's because I left nimsuggest in .nimble/nimsuggest and I haven't put it in the compiler's bin folder
13:24:22AraqUberLambda: when you run it from command line use the --debug switch
13:24:30Araqto see what the problem is
13:24:48UberLambdaAraq: oh, I'll try it now
13:26:32UberLambdaAraq: wait, it tells me that "imp" is not declared... that means that no suggestions can't be made if the file is not syntactically correct? I thought it could also autocomplete things like "import"
13:26:44UberLambda^ I was trying to autocomplete the import keyword
13:28:40UberLambdaWell, seems like suggestions work now from the shell, and not from Emacs... hm
13:30:44bogenHi Araq
13:38:24*xet7_ joined #nim
13:44:00reactormonkVarriount, I'd take the two literal examples into separate code blocks
13:46:17*BitPuffin|osx joined #nim
13:47:54*Demos joined #nim
13:49:26*Demos quit (Read error: Connection reset by peer)
13:49:32*Demos_ joined #nim
13:54:43federico3Guest54649: no insult at all :) I was just warning you about the differences :)
13:55:06*xet7_ quit (Read error: Connection reset by peer)
13:56:16*xet7_ joined #nim
13:57:03*doxavore joined #nim
13:58:23Demos_good morning nim
14:03:10coffeepotmornin' :)
14:08:52*xet7_ quit (Ping timeout: 256 seconds)
14:12:41*vendethiel quit (Ping timeout: 252 seconds)
14:12:48*wb_ joined #nim
14:13:24*wb quit (Ping timeout: 244 seconds)
14:14:27*vendethiel joined #nim
14:18:53*FedeOmoto joined #nim
14:22:27Demos_lol your name
14:22:30Demos_:D
14:24:43EXetoC?
14:24:46*yglukhov_____ quit (Ping timeout: 248 seconds)
14:26:24pigmejUberLambda: hmm, do epc:controller and kill all nimsuggest processes
14:26:49pigmejalso could you please check what was the proces cmdline ? For both one from emacs and from cmd
14:27:12pigmejgenerally emacs should return the same results BUT it might detect incorrect / other / invalid project file
14:27:24pigmejand obviously it might just crash :)
14:27:26UberLambdapigmej: I'll do it later, thanks for the help. I can't now though :P
14:27:40UberLambdaGTG
14:27:41pigmejUberLambda: np
14:27:45pigmejping me if so
14:27:55UberLambdapigmej: Will do, thanks :D
14:28:02pigmejI'am the one behind nim-company :) so... I should be able to check what's going on:)
14:28:36UberLambdapigmej: the right person then :P
14:28:44pigmejwe will see :P
14:30:25*pregressive joined #nim
14:33:09*pregressive quit (Remote host closed the connection)
14:33:24*UberLambda quit (Ping timeout: 264 seconds)
14:34:03*pregressive joined #nim
14:36:15*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:37:09*vendethiel quit (Ping timeout: 255 seconds)
14:39:48*vendethiel joined #nim
14:40:36EXetoCdom96: shouldn't asyncnet.connect fail immediately if the host isn't available?
14:41:26EXetoCalso, might asyncCheck not be useful regardless of whether or not a value is returned?
14:43:31*bjz joined #nim
14:50:30EXetoCno it shouldn't. I'm just considering micro-optimizations again.
14:52:43EXetoC*micro-conveniences
14:54:31coffeepotffffffffffff transactions in ODBC according to microsoft:
14:54:41coffeepotTransactions in ODBC are completed at the connection level.
14:54:41coffeepot An application calls SQLSetConnectAttr to switch between the two ODBC modes of managing transactions.
14:54:41coffeepot The ability to set statement attributes at the connection level by calling SQLSetConnectAttr has been deprecated in ODBC 3.x
14:54:41coffeepot ODBC applications should not use Transact-SQL transaction statements such as BEGIN TRANSACTION, COMMIT TRANSACTION, or ROLLBACK TRANSACTION because this can cause indeterminate behavior in the driver.
14:54:41coffeepot ಠ_ಠ
14:55:20*brson joined #nim
14:55:23coffeepotoops meant to post this to offtopic
14:55:26federico3nim-company?
14:57:47*FedeOmoto quit (Ping timeout: 240 seconds)
14:58:23*raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:04:13renesacI have no idea how to use nim's list comprehensions
15:04:22renesacwhat is "<-"?
15:06:23dgellowrenesac: you mean the do notation ?
15:06:32renesachow I do something like pytyhons "a = [x for i, x in enumerate(y) if i == 1]
15:06:40renesacyes, the documentation is insuficient
15:06:52EXetoClooks like the name given to the iterator variable
15:07:15renesac?
15:07:29coffeepotisn't there a list comprehensions macro somewhere? In futures?
15:07:47renesacI also don't understand what comes before | does
15:07:54renesaccoffeepot: I'm talking about it
15:08:05EXetoCand "x" to the left there appends 'x' to the list
15:08:29coffeepotah sorry
15:08:33EXetoCit's just an arbitrary expression (x, y, z) below constructs a tuple instead, and I assume it changes the type of the list that is to be generated
15:09:16renesacso, can you give the expression equivalent to that python one I wrote above?
15:09:52renesacyou said "<-" is the "iterator variable"
15:09:55*FedeOmoto joined #nim
15:09:56renesacI don't know what is it
15:10:14renesacis it another name for "for in"
15:10:16renesac?
15:10:46EXetoCthat appears to be the case
15:11:04renesacbut "var o = lc[e | (i, e <- s, i == e), int]" don't works
15:11:51renesacand this list comprehension syntax seems completely alien to nim's syntax
15:13:54EXetoC"x <- foo.pairs" works, while "i, x <- foo.pairs" does not
15:14:52renesacand if I put (i, x) in parenthesis it gives an error "identifier expected"
15:15:01EXetoCrenesac: do you have any suggestions for alternative syntaxes? would anything else be more obvious while remaining compact?
15:15:19renesacideally something like python I think..
15:16:04renesacvar o = lc[e for i, e in s if i == e]
15:16:22renesacit should infer the type
15:17:32renesacand be immediatelly obvious for a nim programmer what it does
15:17:38renesac(or almost)
15:18:55renesacthe non-list comprehension way of doing that in nim would be:
15:19:06def-renesac: i just made the list comprehensions to show off nim's macros and then someone asked me to make a PR to the future module
15:19:09renesacvar o = newSeq[int]()
15:19:10renesacfor i, e in s:
15:19:10renesac if i == e: o.add(i)
15:19:21EXetoCthe difference would be trivial. I don't really care either way, but an optional explicit return type would be nice
15:20:29renesacdef-: can you write that nim snippet above using your list comprehension syntax?
15:21:00EXetoCit might be necessary to do this for now: "lc[pair.val | (pair <- x.pairs, pair.val mod 2 == 0), int]"
15:21:06renesacthe problem is that I don't understand your syntax at all
15:21:21renesacand there isn't sufficient explanation on the documentation
15:21:31renesacof what each thing does and what is permitted
15:21:35*Kingsquee quit (Quit: Konversation terminated!)
15:22:47def-renesac: feel free to make the syntax more nim-ish and document it better I guess. let me see
15:23:17renesacI don't know how to make macros yet
15:24:25renesacand ok, the last EXetoC version works
15:25:27EXetoC<- is just to differentiate between iterator and any (optional) conditions I think
15:26:44renesacok, the "|" seems equivalent to python "for" and "<-" seems kinda equivalent to for's "in", but not as powerfull
15:27:19EXetoCI'll submit a feature request
15:27:19renesacand the "," seems equivalent to python's "if"
15:27:28dgellowI never understand why python puts the returned statement at the start of the list comprehension.
15:27:41renesacdgellow: where would you put it?
15:27:49dgellowAt the end.
15:28:13renesaca = [x**2 for i, x in enumerate(y) if i == 1]
15:28:21renesachow would you put the return at the end?
15:28:30dgellowin elixir, the list comprehension looks like this: `for x <- 0..100, x*x > 3, do: x*2`. So your snippet would looks like: `for i, x <- enumerate(y), if i == 1, do: x`. It looks like some nim code to my noob eyes.
15:29:19renesacyeah, just replace <- by "in"
15:31:00dgellowa = for i, x in enumerate(y), if i == 1, do: x **2
15:31:19renesacactually, it would be nice if nim's for loop returned a seq already
15:31:43dgellow+1
15:32:12renesaca = for i, x, in y: if i == 1: x.pow 2
15:33:02EXetoCit's on github now if you have anything to add
15:33:03renesacit is ok if I need to put lc[] around it to work
15:33:13renesacEXetoC: link?
15:33:28dgellowhttps://github.com/nim-lang/Nim/issues/3116
15:35:58EXetoCgoogling the filename of a module rarely includes a link to the source for some reason. bah :p
15:36:46EXetoC"lc" is a global var? hm ok
15:40:37EXetoCis varargs[expr] necessary in order to make the return type argument optional?
15:41:06def-EXetoC: i just hacked around to make list comprehensions close to haskell's: http://rosettacode.org/wiki/List_comprehensions#Haskell
15:43:12renesacok, posted my suggested syntax there
15:44:08renesacdgellow: now I understand why python put the return at the start
15:44:10renesac^^'
15:44:14*Demos_ quit (Remote host closed the connection)
15:44:20*FedeOmoto quit (Ping timeout: 244 seconds)
15:48:54*Ven quit (Read error: No route to host)
15:56:05*FedeOmoto joined #nim
15:57:08*Jehan_ joined #nim
15:57:50*xcombelle joined #nim
16:00:54dgellowrenesac: And ? What's the reason ?
16:01:09renesacsee my answer in the issue
16:01:19renesac":" is too weak of a separator
16:01:20renesacvisually
16:02:18renesac(I personally quite like the lua's "if .. then .." for one liners)
16:03:49dgellowhmm … maybe.
16:06:22EXetoCare those vertically centered dots present on certain keyboards?
16:08:17*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:11:07dgellow
16:11:37*Demos joined #nim
16:11:48dgellowEXetoC: https://en.wikipedia.org/wiki/Interpunct That's what you are talking about ?
16:14:07EXetoCdgellow: yes. I just thought there was a key for that on certain layouts, but maybe you have to press modifier keys
16:16:06EXetoCΩΩΩΩ
16:18:46renesacEXetoC: http://meta.japanese.stackexchange.com/questions/656/how-do-i-type-the-interpunct
16:18:58renesacjapanese uses it often
16:22:19Jehan_Alt-shift-9 on a Mac.
16:29:38*darkf quit (Quit: Leaving)
16:31:41renesacaltgr + . on linux ·: https://en.wikipedia.org/wiki/Interpunct#Keyboard_input
16:41:26*yglukhov_____ joined #nim
16:43:42*gmpreussner|work quit (Read error: Connection reset by peer)
16:50:19*raza joined #nim
16:52:25*raza quit (Client Quit)
17:00:23*themagician joined #nim
17:02:30*doxavore quit (Quit: I said good day, sir.)
17:04:47*Demos quit (Ping timeout: 240 seconds)
17:05:04*doxavore joined #nim
17:06:21*Demos joined #nim
17:09:04*apense joined #nim
17:09:32*filcuc joined #nim
17:14:53*jszymanski1 joined #nim
17:16:17*jszymanski quit (Ping timeout: 256 seconds)
17:20:15*Demos quit (Remote host closed the connection)
17:20:36*Demos joined #nim
17:20:40*raza joined #nim
17:28:17*Demos quit (Remote host closed the connection)
17:29:47*leru joined #nim
17:29:53*Demos joined #nim
17:32:15*Demos quit (Remote host closed the connection)
17:36:17*Demos joined #nim
17:40:35*Demos quit (Ping timeout: 252 seconds)
17:41:55*UberLambda joined #nim
17:48:23*jszymanski joined #nim
17:48:31UberLambdapigmej: so, what do I need to do? :)
17:49:25*jszymanski1 quit (Ping timeout: 256 seconds)
17:53:43*Demos joined #nim
17:55:16*kokozedman joined #nim
17:58:26kokozedmanhey guys, does it cause memory over/allocation to create a RingBuffer that's very big?
18:01:13Araqyes it does?
18:06:19*xificurC_ joined #nim
18:08:27*Demos_ joined #nim
18:10:14*xificurC quit (Ping timeout: 246 seconds)
18:10:36*Demos quit (Ping timeout: 264 seconds)
18:24:16*dewdrop quit (Read error: Connection reset by peer)
18:26:19*wuehlmau1 joined #nim
18:26:20*seumirem1rque joined #nim
18:26:40*dv-_ joined #nim
18:28:08*dgellox joined #nim
18:28:28*doxavore_ joined #nim
18:29:18*eldamar_ joined #nim
18:29:28*jefus_ joined #nim
18:30:49*doxavore quit (*.net *.split)
18:30:49*FedeOmoto quit (*.net *.split)
18:30:49*dv- quit (*.net *.split)
18:30:49*jaco60 quit (*.net *.split)
18:30:50*someplace quit (*.net *.split)
18:30:50*wuehlmaus quit (*.net *.split)
18:30:50*[CBR]Unspoken1 quit (*.net *.split)
18:30:50*seumiremorque quit (*.net *.split)
18:30:50*dgellow quit (*.net *.split)
18:30:51*eldamar quit (*.net *.split)
18:30:51*Jefus quit (*.net *.split)
18:30:51*DecoPerson quit (*.net *.split)
18:30:51*tstm quit (*.net *.split)
18:30:52*cryzed quit (*.net *.split)
18:31:00*someplac- joined #nim
18:33:59*jefus_ is now known as jefus
18:35:20*cryzed joined #nim
18:37:33kokozedmanAraq: ah, ok... is there a kind of FIFO buffer, producer & consummer style already for Nim?
18:38:11Araqkokozedman: for threading TChannel works
18:40:37kokozedmanAraq: no, just a kind of queue for convinience
18:41:01Araqwe have an efficient queue impl in the stdlib
18:41:05Araqsomewhere
18:41:22kokozedmanah, good to know... I'll look for that
18:41:53kokozedmanAraq: http://nim-lang.org/docs/queues.html ?
18:42:39Araqyes
18:46:31kokozedmanAraq: unfortunately, it doesn't have a direct access to the underlying sequence; my use case is for a kind of FIFO buffer, I'll have to loop/iterate around it to be able to get the buffers... it's preferable though to have a [] direct access to it's element so it can efficienly be used where C arrays are expected
18:49:57Araqthe implementation is tiny, just copy from it what you need
18:54:16kokozedmanOK, what exactly does the shallowCopy do? I see in the implementation that it makes use of that proc
18:54:18*apense_ joined #nim
18:56:15Demos_and [] probably won't be that efficient in a queue
18:56:24Demos_I mean it can be OK, but usually it's not great
18:56:32*apense quit (Ping timeout: 244 seconds)
18:57:40kokozedmanyeah, I'm looking at the implementation... and it makes use of loops instead of moveMem or copyMem which are likely to be more efficient for buffers
19:02:32EXetoCthose operations also rely on loops
19:02:33*Demos_ quit (Remote host closed the connection)
19:03:09renesacEXetoC: yes, but use many tricks on top of that
19:03:30renesacespecially relevant for larger copies
19:04:08renesac(if it is anything like memcpy from C)
19:04:14*vikaton joined #nim
19:05:43renesacI will take a shot trying to improve a bit this queue library
19:05:44EXetoCsuch as minimizing branching, right?
19:07:14renesachttp://joryanick.com/retro/memcpy.htm
19:07:40AraqcopyMem
19:07:54Araqthere is a reason why it's not used here btw
19:08:01Araqmaybe you'll figure it out :P
19:09:56*Demos joined #nim
19:11:00*sparrk joined #nim
19:11:00EXetoCwasn't someone trying to implement simd support?
19:12:13*Miko___ joined #nim
19:13:25renesacAraq: I don't know why, In C I would use realloc + memcpy for the stuff that wrapped around
19:13:36renesacEXetoC: yes, there are some SSE instructions for copying too
19:14:07*Demos quit (Remote host closed the connection)
19:15:12*Demos joined #nim
19:16:48*Demos quit (Remote host closed the connection)
19:17:12*yglukhov_____ quit (Quit: Be back later ...)
19:22:02renesacAraq: does it have something to do with keeping the GC informed?
19:22:09*Demos joined #nim
19:23:48*Demos quit (Remote host closed the connection)
19:25:25*Demos joined #nim
19:27:21*Demos quit (Remote host closed the connection)
19:30:49*Demos joined #nim
19:32:20*someplac- is now known as someplace
19:33:38dgelloxDoes Nim have something like Clojure's protocols ?
19:36:48EXetoCconcepts? but there are some bugs
19:38:29*xificurC_ quit (Quit: WeeChat 1.2)
19:38:44*xificurC joined #nim
19:43:33*leru quit (Quit: Nettalk6 - www.ntalk.de)
19:48:55*MatrixBridge quit (Remote host closed the connection)
19:49:03*MatrixBridge joined #nim
19:49:23*FedeOmoto joined #nim
19:49:34*jaco60 joined #nim
19:49:43*[CBR]Unspoken1 joined #nim
19:50:06*rgv151 joined #nim
19:52:55*tstm joined #nim
19:56:09*Matthias247 joined #nim
19:58:24*DecoPerson joined #nim
19:58:47*FedeOmoto quit (Ping timeout: 240 seconds)
20:01:28*Demos quit (Remote host closed the connection)
20:02:54*xcombelle quit (Remote host closed the connection)
20:04:08*wuehlmau1 is now known as wuehlmaus
20:11:27*filcuc quit (Ping timeout: 244 seconds)
20:11:33*Demos joined #nim
20:11:33*Demos quit (Remote host closed the connection)
20:11:35*FedeOmoto joined #nim
20:11:45Araqrenesac: yes
20:12:12*Demos joined #nim
20:17:54renesachum, ok
20:18:08*filcuc joined #nim
20:18:16renesackokozedman: here an enchanced queues module for you
20:18:19renesachttps://gist.github.com/ReneSac/6a7a52b5e71ec175f004
20:19:46renesacI added a lot of functions
20:20:22renesacq.pop() combines better with q.add() IMHO, and makes enqueue() and dequeue() obsolete
20:21:23*xet7 joined #nim
20:21:40renesacI got the names mainly from C++ queues, I'm not sure if it fits nim naming style, especially q.front() and q.back()
20:23:05renesacDemos: [] is still O(1) on queues implemented as a circular vector, like nim's
20:23:15renesacI think it is ok to have
20:29:01renesacAraq: as an speed optimization it could check if T contains a pointer and if it doesn't use the faster method with copyMem, right?
20:29:22Araqright. planned typetrait.
20:29:32renesaccool
20:30:09Demosrenesac: o
20:30:25DemosI kinda assumed nim's queue was a linked list of small vectors
20:30:56renesacwhy use a linked list if you can't insert in the middle of it
20:31:07*rgv151 quit (Quit: rcirc on GNU Emacs 24.5.1)
20:31:39fowlIs there a b-tree library for nim
20:32:10Araqyour xBoundsCheck is beautiful
20:32:55renesacAraq: is that sarcasm or a real compliment?
20:33:24EXetoCAraq: do you prefer wxwidgets over other widget toolkits?
20:34:53*fowl quit (Excess Flood)
20:37:27Araqrenesac: a real compliment
20:37:35renesacthank you
20:37:56AraqEXetoC: not really, but it was missing and it makes a great example for OSCON
20:38:23EXetoCok
20:39:18renesacI actually originally got it from the seqslices module, but modified it with compileOption("boundChecks") instead of "when not defined(release):" for example
20:39:54renesacand added the index that was tried and failed in the output
20:40:20renesacand removed the lower bound check using Natural as a parameter
20:44:08renesacby the way updated gist fixing the indexing (wrong variable names from copypasta)
20:44:21*fowl joined #nim
20:44:38renesacshould I do a PR?
20:47:51*Kingsquee joined #nim
20:48:57Araqhrm I like it. kokozedman, good enough for you?
20:54:37*UberLambda quit (Quit: GTG)
20:57:12vikatonIs the Nim v Rust heat over yet ?
20:58:25*Demos quit (Remote host closed the connection)
20:58:48Araqyep. everybody uses Nim now. :-)
21:00:42*Trustable quit (Remote host closed the connection)
21:00:57*sparrk quit (Ping timeout: 256 seconds)
21:02:11*raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
21:02:18EXetoCwoohoo
21:02:52*Miko___ quit (Ping timeout: 246 seconds)
21:04:20vikatonIdk y some of u guys can't stand Rust haha
21:05:36fowlvikaton: takes too long to compile
21:05:51fowlAnd a pro like me doesn't need memory safety
21:06:31vikatonfowl, FYI, Rust 1.3 compile times are much faster
21:07:10fowlThere's another thing that keeps me from rust thats the community full of social justice warriors
21:07:38EXetoCwhat's the injustice this time?
21:07:43fowlThat skrillex, I mean steveklabnik, is on the committee or w/e
21:08:28*pregressive quit (Remote host closed the connection)
21:09:24*pregressive joined #nim
21:10:08EXetoCum ok
21:10:12vikatonwat
21:10:40*strcmp1 joined #nim
21:10:55vikatonSteve is a nice guy...
21:11:26EXetoCmin you, that's the opinion of certain SJW's, apparently
21:11:47reactormonkAraq, so should I just go by identifier name or should I actually hook into another compiler pass for types iun docs?
21:12:31*unclechu joined #nim
21:13:27*jszymanski quit (Quit: computer sleeps...)
21:13:45vikatonInfoWorld posted an article on Rust's apparent SJW
21:13:53EXetoCvikaton: why can't they stand it? I'll take Rust any day over any old-ish crap language, but I don't need memory safety either
21:13:55reactormonkSJW?
21:14:06EXetoCSocial Justice Warrior
21:14:24fowlvikaton: he's a nice guy, an Arch Whiteknight you might call him
21:14:34EXetoCand I can't be bothered to type so many brackets :p
21:14:57Jehan_<-- SJW and proud of it. Just FYI. :)
21:14:59fowlReady to defend anybody from systematic oppression
21:16:03Jehan_But this is probably something for #nim-offtopic, anyway.
21:16:08vikatonThere were a few from Nim who went all out trying to degrade Rust and glorify Nim
21:16:13vikatonGo does the same too
21:16:21vikatonWhy can't we all be friends :(
21:16:56fowlThere are accounts that exist only to speak negatively about nim too
21:17:31vikatonThat is also true
21:17:51Jehan_My opinion is that good languages can generally succeed on their strengths and that badmouthing others is counterproductive.
21:18:37*X67r joined #nim
21:18:59Jehan_Attacking others in general makes it sound as though you don't have positive selling points yourself.
21:19:54fowlCriticism == attacks in 2015
21:20:09fowlAny negative feedback is offensive
21:20:48Jehan_Eh, it's usually easy to tell the difference between rational criticism and attacks.
21:28:47*filcuc quit (Quit: Konversation terminated!)
21:29:42*flaviu quit (Ping timeout: 250 seconds)
21:44:07*Jehan_ quit (Quit: Leaving)
21:44:18kokozedmanrenesac: thanks! I'll try to use it...
21:45:35*kokozedman quit (Quit: Page closed)
21:48:30*flaviu joined #nim
21:49:54federico3just ignore the trolls
21:52:10reactormonkwe have trolls?
21:54:25*Matthias247 quit (Read error: Connection reset by peer)
21:59:29*Demos joined #nim
22:00:58*doxavore_ quit (Quit: I said good day, sir.)
22:01:12*gmpreussner|work joined #nim
22:03:42*Demos quit (Ping timeout: 246 seconds)
22:17:22*FedeOmoto quit (Quit: Leaving)
22:42:33*wb_ quit (Ping timeout: 246 seconds)
22:54:48*sparrk joined #nim
22:58:38*unclechu quit (Quit: Leaving.)
23:00:30*sparrk quit (Quit: Leaving)
23:02:21*Ven joined #nim
23:05:29*zaspard joined #nim
23:06:43zaspardAre there any examples of nim being used in production or in a launched game?
23:07:54*sparrk joined #nim
23:08:06*sparrk quit (Client Quit)
23:11:29*Jesin quit (Quit: Leaving)
23:13:58*X67r quit (Quit: leaving)
23:14:02*Jesin joined #nim
23:15:39reactormonkzaspard, Araq's currently using it in production
23:15:59reactormonkthere might be other examples, gotta collect them
23:18:32*yglukhov_____ joined #nim
23:23:23*yglukhov_____ quit (Ping timeout: 264 seconds)
23:24:05*pregressive quit (Remote host closed the connection)
23:27:28def-zaspard: Not really production, but I do play on my emulator sometimes: https://github.com/def-/nimes
23:43:00EXetoCneat
23:44:02*dgellox is now known as dgellow
23:56:02*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:57:10*bjz joined #nim