00:09:47 | * | Cryptotoad quit (Quit: Leaving) |
00:10:18 | infinity0 | i'm trying to patch Nim to get it to pass LDFLAGS and CFLAGS through to gcc, any pointers? |
00:15:38 | Varriount | infinity0: I believe there are command line options |
00:16:44 | Varriount | infinity0: --passC and --passL should do the trick. |
00:17:01 | Varriount | Look the output of `nim --advanced` |
00:17:02 | infinity0 | aha, 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:39 | infinity0 | oh, and what's the difference between build.sh and makefile? |
01:19:49 | Varriount | infinity0: I don't know. I would presume they do the same thing. |
01:20:04 | infinity0 | ah, it looks like makefile is newer and meant for parallel builds |
01:20:12 | Varriount | I'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:37 | Varriount | infinity0: So, how do you find Nim so far? |
01:26:56 | infinity0 | haven't tried the language yet, still trying to package the compiler, lol |
01:27:07 | infinity0 | are there syntax highlighters for it yet? |
01:27:13 | Varriount | Package the compiler? Do you mean bootstrapping it? |
01:28:31 | Varriount | infinity0: https://github.com/nim-lang/Nim/wiki/Editor-Support |
01:29:53 | infinity0 | Varriount: i mean make a debian package for it. trying to do #2128 in a nice way atm, i think it's working. |
01:29:56 | infinity0 | cool, thanks for the link |
01:30:47 | infinity0 | ah, the editor i use, geany, has a pull request open |
01:31:37 | infinity0 | i guess i could try gedit first |
01:35:17 | * | Demos_ joined #nim |
01:36:04 | EXetoC | the one from 2013? |
01:38:27 | * | Demos quit (Ping timeout: 252 seconds) |
01:40:10 | * | Demos_ quit (Ping timeout: 264 seconds) |
01:40:16 | infinity0 | are 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:51 | coffeepot | is 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:51 | coffeepot | ay I can define? |
09:28:41 | def- | coffeepot: http://nim-lang.org/docs/manual.html#foreign-function-interface-unchecked-pragma |
09:29:01 | coffeepot | def- <3 thankyou! :D |
09:31:30 | Araq | coffeepot: you can also just use 'string' for a growable byte buffer |
09:32:57 | Araq | also I'm still waiting for a PR from you :P |
09:33:17 | * | vendethiel joined #nim |
09:36:48 | coffeepot | I 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:12 | Araq | for everthing |
09:37:15 | Araq | the times module |
09:37:24 | Araq | your sql server wrapper |
09:37:37 | Araq | and yes, they are contiguous |
09:39:50 | coffeepot | odbc 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:00 | Araq | and I still like to have a disphelper wrapper ... |
09:41:07 | * | zahary__ quit (Read error: Connection reset by peer) |
09:41:09 | coffeepot | I have this for times utils https://gist.github.com/anonymous/b048d17d216a54a87482 |
09:42:03 | Araq | good enough :-) |
09:42:05 | coffeepot | the main thing being, being able to convert epoch seconds to TimeInfo |
09:42:28 | Araq | well dom96 will review it once you created a proper PR |
09:42:55 | coffeepot | ok, 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:00 | coffeepot | I'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:22 | coffeepot | sorry not error, warning, but it states it will become an error in future |
09:52:51 | Araq | yeah it still contains a not-defaultable type like range[1..100] |
09:53:09 | Araq | this tags the type as "init it properly" |
09:53:27 | coffeepot | oh! okay fair enough, I'll sort that out then |
09:53:32 | Araq | for TimeInfo this means instead of result.a = x; result.b = y; |
09:53:49 | Araq | you need to do: result = TimeInfo(a: x, b: y) |
09:53:56 | coffeepot | ahh ok will do |
10:00:06 | baabelfish | can nim deduce the return value of a procedure without explicitly writing the type? |
10:00:14 | baabelfish | like auto in C++14 |
10:00:17 | * | bjz joined #nim |
10:00:34 | Araq | baabelfish: yes, with 'auto' |
10:00:41 | Araq | proc foo: auto = 19 |
10:00:44 | baabelfish | Araq: haha |
10:00:49 | baabelfish | how did I miss that |
10:01:10 | baabelfish | thanks |
10:07:32 | * | vasher_ joined #nim |
10:07:59 | * | Jehan_ joined #nim |
10:29:16 | Varriount | reactormonk: Here's an (unfinished) version of the new nim-by-example strings page. |
10:29:29 | Varriount | reactormonk: 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:56 | coffeepot | when 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:27 | coffeepot | i mean, they're pretty universal algorithms tbh |
10:45:57 | Araq | urls are fine |
10:46:00 | coffeepot | k |
10:55:48 | * | dv- quit (Ping timeout: 258 seconds) |
10:56:07 | * | Ven joined #nim |
10:56:45 | * | dv- joined #nim |
10:59:59 | coffeepot | ok PR done |
11:00:02 | coffeepot | for 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:53 | coffeepot | ...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:06 | UberLambda | Hello everyone, am I the only one that can't compile nimsuggest? It can't find the securehash module |
11:39:29 | UberLambda | where by compiling I mean installing from nimble |
11:41:17 | UberLambda | Wait, 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:18 | Guest54649 | so 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:30 | coffeepot | seqs are variable length, whereas arrays are not :) |
12:28:31 | def- | Guest54649: array size has to be known at compile time and is fixed, seqs can be variable size and resized |
12:28:53 | Guest54649 | ah thanks for that |
12:41:45 | * | UberLambda quit (Remote host closed the connection) |
12:45:00 | federico3 | Guest54649: not that similar |
12:46:46 | Varriount | Guest54649: 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:03 | Guest54649 | federico3: 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:19 | Guest54649 | I like how it has similar set rules to python and it has the 'in' operator. I do like this language |
12:49:24 | coffeepot | You'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:33 | Araq | I 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:51 | federico3 | Guest54649: I mean - be careful around the differences |
12:51:02 | federico3 | ...and speed. But no handy interactive interpreter, dir(), help() |
12:51:17 | Guest54649 | yeah 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:15 | federico3 | Guest54649: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers |
12:53:05 | pigmej | Araq: though one of the biggest gotchas of Nim for Pythoners are inclusive ranges |
12:54:10 | Araq | pigmej: really? I don't think so. a[i:j] is not valid syntax and the replacement is a[i ..< j] |
12:54:26 | Araq | we need to communicate this fact better perhaps |
12:55:28 | Araq | and in my humble opinion the distinction of '..' vs '..<' is beautiful |
12:56:26 | * | themagician quit () |
12:56:29 | pigmej | Araq: sure it is |
12:56:31 | federico3 | +1 |
12:56:43 | pigmej | but still it's different than one might be used to |
12:56:44 | Guest54649 | I was surprised about the inclusive ranges. it is interesting |
12:57:40 | Guest54649 | federico3: 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:19 | dgellow | I 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:21 | Araq | dgellow: magic means "built into the compiler" |
13:14:03 | Araq | you can nimgrep for mNew in the compiler dir to see what it does |
13:14:25 | * | UberLambda joined #nim |
13:14:38 | Araq | it mostly delegates the work to newObj defined in lib/system/gc.nim |
13:20:09 | UberLambda | Is 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:21 | UberLambda | Do I have to configure something else? |
13:20:27 | dgellow | Araq: Thank you |
13:21:23 | Araq | UberLambda: for me nimsuggest works well. we need proper bug reports to improve the experience for others |
13:23:49 | UberLambda | Araq: 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:22 | Araq | UberLambda: when you run it from command line use the --debug switch |
13:24:30 | Araq | to see what the problem is |
13:24:48 | UberLambda | Araq: oh, I'll try it now |
13:26:32 | UberLambda | Araq: 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:44 | UberLambda | ^ I was trying to autocomplete the import keyword |
13:28:40 | UberLambda | Well, seems like suggestions work now from the shell, and not from Emacs... hm |
13:30:44 | bogen | Hi Araq |
13:38:24 | * | xet7_ joined #nim |
13:44:00 | reactormonk | Varriount, 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:43 | federico3 | Guest54649: 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:23 | Demos_ | good morning nim |
14:03:10 | coffeepot | mornin' :) |
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:27 | Demos_ | lol your name |
14:22:30 | Demos_ | :D |
14:24:43 | EXetoC | ? |
14:24:46 | * | yglukhov_____ quit (Ping timeout: 248 seconds) |
14:26:24 | pigmej | UberLambda: hmm, do epc:controller and kill all nimsuggest processes |
14:26:49 | pigmej | also could you please check what was the proces cmdline ? For both one from emacs and from cmd |
14:27:12 | pigmej | generally emacs should return the same results BUT it might detect incorrect / other / invalid project file |
14:27:24 | pigmej | and obviously it might just crash :) |
14:27:26 | UberLambda | pigmej: I'll do it later, thanks for the help. I can't now though :P |
14:27:40 | UberLambda | GTG |
14:27:41 | pigmej | UberLambda: np |
14:27:45 | pigmej | ping me if so |
14:27:55 | UberLambda | pigmej: Will do, thanks :D |
14:28:02 | pigmej | I'am the one behind nim-company :) so... I should be able to check what's going on:) |
14:28:36 | UberLambda | pigmej: the right person then :P |
14:28:44 | pigmej | we 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:36 | EXetoC | dom96: shouldn't asyncnet.connect fail immediately if the host isn't available? |
14:41:26 | EXetoC | also, might asyncCheck not be useful regardless of whether or not a value is returned? |
14:43:31 | * | bjz joined #nim |
14:50:30 | EXetoC | no it shouldn't. I'm just considering micro-optimizations again. |
14:52:43 | EXetoC | *micro-conveniences |
14:54:31 | coffeepot | ffffffffffff transactions in ODBC according to microsoft: |
14:54:41 | coffeepot | Transactions in ODBC are completed at the connection level. |
14:54:41 | coffeepot | An application calls SQLSetConnectAttr to switch between the two ODBC modes of managing transactions. |
14:54:41 | coffeepot | The ability to set statement attributes at the connection level by calling SQLSetConnectAttr has been deprecated in ODBC 3.x |
14:54:41 | coffeepot | 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:41 | coffeepot | ಠ_ಠ |
14:55:20 | * | brson joined #nim |
14:55:23 | coffeepot | oops meant to post this to offtopic |
14:55:26 | federico3 | nim-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:13 | renesac | I have no idea how to use nim's list comprehensions |
15:04:22 | renesac | what is "<-"? |
15:06:23 | dgellow | renesac: you mean the do notation ? |
15:06:32 | renesac | how I do something like pytyhons "a = [x for i, x in enumerate(y) if i == 1] |
15:06:40 | renesac | yes, the documentation is insuficient |
15:06:52 | EXetoC | looks like the name given to the iterator variable |
15:07:15 | renesac | ? |
15:07:29 | coffeepot | isn't there a list comprehensions macro somewhere? In futures? |
15:07:47 | renesac | I also don't understand what comes before | does |
15:07:54 | renesac | coffeepot: I'm talking about it |
15:08:05 | EXetoC | and "x" to the left there appends 'x' to the list |
15:08:29 | coffeepot | ah sorry |
15:08:33 | EXetoC | it'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:16 | renesac | so, can you give the expression equivalent to that python one I wrote above? |
15:09:52 | renesac | you said "<-" is the "iterator variable" |
15:09:55 | * | FedeOmoto joined #nim |
15:09:56 | renesac | I don't know what is it |
15:10:14 | renesac | is it another name for "for in" |
15:10:16 | renesac | ? |
15:10:46 | EXetoC | that appears to be the case |
15:11:04 | renesac | but "var o = lc[e | (i, e <- s, i == e), int]" don't works |
15:11:51 | renesac | and this list comprehension syntax seems completely alien to nim's syntax |
15:13:54 | EXetoC | "x <- foo.pairs" works, while "i, x <- foo.pairs" does not |
15:14:52 | renesac | and if I put (i, x) in parenthesis it gives an error "identifier expected" |
15:15:01 | EXetoC | renesac: do you have any suggestions for alternative syntaxes? would anything else be more obvious while remaining compact? |
15:15:19 | renesac | ideally something like python I think.. |
15:16:04 | renesac | var o = lc[e for i, e in s if i == e] |
15:16:22 | renesac | it should infer the type |
15:17:32 | renesac | and be immediatelly obvious for a nim programmer what it does |
15:17:38 | renesac | (or almost) |
15:18:55 | renesac | the non-list comprehension way of doing that in nim would be: |
15:19:06 | def- | 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:09 | renesac | var o = newSeq[int]() |
15:19:10 | renesac | for i, e in s: |
15:19:10 | renesac | if i == e: o.add(i) |
15:19:21 | EXetoC | the difference would be trivial. I don't really care either way, but an optional explicit return type would be nice |
15:20:29 | renesac | def-: can you write that nim snippet above using your list comprehension syntax? |
15:21:00 | EXetoC | it might be necessary to do this for now: "lc[pair.val | (pair <- x.pairs, pair.val mod 2 == 0), int]" |
15:21:06 | renesac | the problem is that I don't understand your syntax at all |
15:21:21 | renesac | and there isn't sufficient explanation on the documentation |
15:21:31 | renesac | of what each thing does and what is permitted |
15:21:35 | * | Kingsquee quit (Quit: Konversation terminated!) |
15:22:47 | def- | renesac: feel free to make the syntax more nim-ish and document it better I guess. let me see |
15:23:17 | renesac | I don't know how to make macros yet |
15:24:25 | renesac | and ok, the last EXetoC version works |
15:25:27 | EXetoC | <- is just to differentiate between iterator and any (optional) conditions I think |
15:26:44 | renesac | ok, the "|" seems equivalent to python "for" and "<-" seems kinda equivalent to for's "in", but not as powerfull |
15:27:19 | EXetoC | I'll submit a feature request |
15:27:19 | renesac | and the "," seems equivalent to python's "if" |
15:27:28 | dgellow | I never understand why python puts the returned statement at the start of the list comprehension. |
15:27:41 | renesac | dgellow: where would you put it? |
15:27:49 | dgellow | At the end. |
15:28:13 | renesac | a = [x**2 for i, x in enumerate(y) if i == 1] |
15:28:21 | renesac | how would you put the return at the end? |
15:28:30 | dgellow | in 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:19 | renesac | yeah, just replace <- by "in" |
15:31:00 | dgellow | a = for i, x in enumerate(y), if i == 1, do: x **2 |
15:31:19 | renesac | actually, it would be nice if nim's for loop returned a seq already |
15:31:43 | dgellow | +1 |
15:32:12 | renesac | a = for i, x, in y: if i == 1: x.pow 2 |
15:33:02 | EXetoC | it's on github now if you have anything to add |
15:33:03 | renesac | it is ok if I need to put lc[] around it to work |
15:33:13 | renesac | EXetoC: link? |
15:33:28 | dgellow | https://github.com/nim-lang/Nim/issues/3116 |
15:35:58 | EXetoC | googling the filename of a module rarely includes a link to the source for some reason. bah :p |
15:36:46 | EXetoC | "lc" is a global var? hm ok |
15:40:37 | EXetoC | is varargs[expr] necessary in order to make the return type argument optional? |
15:41:06 | def- | EXetoC: i just hacked around to make list comprehensions close to haskell's: http://rosettacode.org/wiki/List_comprehensions#Haskell |
15:43:12 | renesac | ok, posted my suggested syntax there |
15:44:08 | renesac | dgellow: now I understand why python put the return at the start |
15:44:10 | renesac | ^^' |
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:54 | dgellow | renesac: And ? What's the reason ? |
16:01:09 | renesac | see my answer in the issue |
16:01:19 | renesac | ":" is too weak of a separator |
16:01:20 | renesac | visually |
16:02:18 | renesac | (I personally quite like the lua's "if .. then .." for one liners) |
16:03:49 | dgellow | hmm … maybe. |
16:06:22 | EXetoC | are 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:07 | dgellow | ● |
16:11:37 | * | Demos joined #nim |
16:11:48 | dgellow | EXetoC: https://en.wikipedia.org/wiki/Interpunct That's what you are talking about ? |
16:14:07 | EXetoC | dgellow: yes. I just thought there was a key for that on certain layouts, but maybe you have to press modifier keys |
16:16:06 | EXetoC | ΩΩΩΩ |
16:18:46 | renesac | EXetoC: http://meta.japanese.stackexchange.com/questions/656/how-do-i-type-the-interpunct |
16:18:58 | renesac | japanese uses it often |
16:22:19 | Jehan_ | Alt-shift-9 on a Mac. |
16:29:38 | * | darkf quit (Quit: Leaving) |
16:31:41 | renesac | altgr + . 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:31 | UberLambda | pigmej: 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:26 | kokozedman | hey guys, does it cause memory over/allocation to create a RingBuffer that's very big? |
18:01:13 | Araq | yes 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:33 | kokozedman | Araq: ah, ok... is there a kind of FIFO buffer, producer & consummer style already for Nim? |
18:38:11 | Araq | kokozedman: for threading TChannel works |
18:40:37 | kokozedman | Araq: no, just a kind of queue for convinience |
18:41:01 | Araq | we have an efficient queue impl in the stdlib |
18:41:05 | Araq | somewhere |
18:41:22 | kokozedman | ah, good to know... I'll look for that |
18:41:53 | kokozedman | Araq: http://nim-lang.org/docs/queues.html ? |
18:42:39 | Araq | yes |
18:46:31 | kokozedman | Araq: 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:57 | Araq | the implementation is tiny, just copy from it what you need |
18:54:16 | kokozedman | OK, 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:15 | Demos_ | and [] probably won't be that efficient in a queue |
18:56:24 | Demos_ | I mean it can be OK, but usually it's not great |
18:56:32 | * | apense quit (Ping timeout: 244 seconds) |
18:57:40 | kokozedman | yeah, 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:32 | EXetoC | those operations also rely on loops |
19:02:33 | * | Demos_ quit (Remote host closed the connection) |
19:03:09 | renesac | EXetoC: yes, but use many tricks on top of that |
19:03:30 | renesac | especially relevant for larger copies |
19:04:08 | renesac | (if it is anything like memcpy from C) |
19:04:14 | * | vikaton joined #nim |
19:05:43 | renesac | I will take a shot trying to improve a bit this queue library |
19:05:44 | EXetoC | such as minimizing branching, right? |
19:07:14 | renesac | http://joryanick.com/retro/memcpy.htm |
19:07:40 | Araq | copyMem |
19:07:54 | Araq | there is a reason why it's not used here btw |
19:08:01 | Araq | maybe you'll figure it out :P |
19:09:56 | * | Demos joined #nim |
19:11:00 | * | sparrk joined #nim |
19:11:00 | EXetoC | wasn't someone trying to implement simd support? |
19:12:13 | * | Miko___ joined #nim |
19:13:25 | renesac | Araq: I don't know why, In C I would use realloc + memcpy for the stuff that wrapped around |
19:13:36 | renesac | EXetoC: 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:02 | renesac | Araq: 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:38 | dgellox | Does Nim have something like Clojure's protocols ? |
19:36:48 | EXetoC | concepts? 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:45 | Araq | renesac: yes |
20:12:12 | * | Demos joined #nim |
20:17:54 | renesac | hum, ok |
20:18:08 | * | filcuc joined #nim |
20:18:16 | renesac | kokozedman: here an enchanced queues module for you |
20:18:19 | renesac | https://gist.github.com/ReneSac/6a7a52b5e71ec175f004 |
20:19:46 | renesac | I added a lot of functions |
20:20:22 | renesac | q.pop() combines better with q.add() IMHO, and makes enqueue() and dequeue() obsolete |
20:21:23 | * | xet7 joined #nim |
20:21:40 | renesac | I 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:05 | renesac | Demos: [] is still O(1) on queues implemented as a circular vector, like nim's |
20:23:15 | renesac | I think it is ok to have |
20:29:01 | renesac | Araq: 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:22 | Araq | right. planned typetrait. |
20:29:32 | renesac | cool |
20:30:09 | Demos | renesac: o |
20:30:25 | Demos | I kinda assumed nim's queue was a linked list of small vectors |
20:30:56 | renesac | why 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:39 | fowl | Is there a b-tree library for nim |
20:32:10 | Araq | your xBoundsCheck is beautiful |
20:32:55 | renesac | Araq: is that sarcasm or a real compliment? |
20:33:24 | EXetoC | Araq: do you prefer wxwidgets over other widget toolkits? |
20:34:53 | * | fowl quit (Excess Flood) |
20:37:27 | Araq | renesac: a real compliment |
20:37:35 | renesac | thank you |
20:37:56 | Araq | EXetoC: not really, but it was missing and it makes a great example for OSCON |
20:38:23 | EXetoC | ok |
20:39:18 | renesac | I actually originally got it from the seqslices module, but modified it with compileOption("boundChecks") instead of "when not defined(release):" for example |
20:39:54 | renesac | and added the index that was tried and failed in the output |
20:40:20 | renesac | and removed the lower bound check using Natural as a parameter |
20:44:08 | renesac | by the way updated gist fixing the indexing (wrong variable names from copypasta) |
20:44:21 | * | fowl joined #nim |
20:44:38 | renesac | should I do a PR? |
20:47:51 | * | Kingsquee joined #nim |
20:48:57 | Araq | hrm I like it. kokozedman, good enough for you? |
20:54:37 | * | UberLambda quit (Quit: GTG) |
20:57:12 | vikaton | Is the Nim v Rust heat over yet ? |
20:58:25 | * | Demos quit (Remote host closed the connection) |
20:58:48 | Araq | yep. 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:18 | EXetoC | woohoo |
21:02:52 | * | Miko___ quit (Ping timeout: 246 seconds) |
21:04:20 | vikaton | Idk y some of u guys can't stand Rust haha |
21:05:36 | fowl | vikaton: takes too long to compile |
21:05:51 | fowl | And a pro like me doesn't need memory safety |
21:06:31 | vikaton | fowl, FYI, Rust 1.3 compile times are much faster |
21:07:10 | fowl | There's another thing that keeps me from rust thats the community full of social justice warriors |
21:07:38 | EXetoC | what's the injustice this time? |
21:07:43 | fowl | That 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:08 | EXetoC | um ok |
21:10:12 | vikaton | wat |
21:10:40 | * | strcmp1 joined #nim |
21:10:55 | vikaton | Steve is a nice guy... |
21:11:26 | EXetoC | min you, that's the opinion of certain SJW's, apparently |
21:11:47 | reactormonk | Araq, 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:45 | vikaton | InfoWorld posted an article on Rust's apparent SJW |
21:13:53 | EXetoC | vikaton: 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:55 | reactormonk | SJW? |
21:14:06 | EXetoC | Social Justice Warrior |
21:14:24 | fowl | vikaton: he's a nice guy, an Arch Whiteknight you might call him |
21:14:34 | EXetoC | and I can't be bothered to type so many brackets :p |
21:14:57 | Jehan_ | <-- SJW and proud of it. Just FYI. :) |
21:14:59 | fowl | Ready to defend anybody from systematic oppression |
21:16:03 | Jehan_ | But this is probably something for #nim-offtopic, anyway. |
21:16:08 | vikaton | There were a few from Nim who went all out trying to degrade Rust and glorify Nim |
21:16:13 | vikaton | Go does the same too |
21:16:21 | vikaton | Why can't we all be friends :( |
21:16:56 | fowl | There are accounts that exist only to speak negatively about nim too |
21:17:31 | vikaton | That is also true |
21:17:51 | Jehan_ | 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:59 | Jehan_ | Attacking others in general makes it sound as though you don't have positive selling points yourself. |
21:19:54 | fowl | Criticism == attacks in 2015 |
21:20:09 | fowl | Any negative feedback is offensive |
21:20:48 | Jehan_ | 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:18 | kokozedman | renesac: thanks! I'll try to use it... |
21:45:35 | * | kokozedman quit (Quit: Page closed) |
21:48:30 | * | flaviu joined #nim |
21:49:54 | federico3 | just ignore the trolls |
21:52:10 | reactormonk | we 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:43 | zaspard | Are 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:39 | reactormonk | zaspard, Araq's currently using it in production |
23:15:59 | reactormonk | there 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:28 | def- | zaspard: Not really production, but I do play on my emulator sometimes: https://github.com/def-/nimes |
23:43:00 | EXetoC | neat |
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 |