00:04:01 | * | shodan45 joined #nim |
00:11:31 | vikaton | where Araq at th0 |
00:18:42 | * | boop is now known as boopisaway |
00:19:56 | * | bakeymemnet joined #nim |
00:24:51 | vikaton | NimBot |
00:24:56 | vikaton | what does it do? |
00:26:21 | * | shodan45 quit (Quit: Konversation terminated!) |
00:26:38 | * | shodan45 joined #nim |
00:30:56 | * | shodan45 quit (Client Quit) |
00:33:55 | * | vendethiel joined #nim |
00:44:04 | * | bakeymemnet quit (Quit: Leaving.) |
00:58:00 | * | vendethiel quit (Ping timeout: 252 seconds) |
01:00:31 | * | ozra quit (Ping timeout: 246 seconds) |
01:01:45 | * | gsingh93 joined #nim |
01:18:42 | * | vikaton quit () |
01:19:34 | reactormonk | dom96, drag sexp.nim along too |
01:19:51 | dtscode | sex.nim? |
01:27:57 | * | yglukhov____ joined #nim |
01:29:03 | * | Siecje1 quit (Read error: Connection reset by peer) |
01:31:16 | * | fioco joined #nim |
01:31:31 | fioco | :D !! I just made nim run in a web interface! |
01:31:46 | fioco | Server side nim sent to client, client runs in sandbox |
01:32:24 | fioco | Well, it runs in an environment.... not a sandbox, YET |
01:32:52 | * | yglukhov____ quit (Ping timeout: 272 seconds) |
01:34:54 | jackv | fioco, that sounds pretty sweet |
01:35:34 | fioco | Yeah |
01:35:52 | fioco | I say interface because it recieves html, yet only parses <nim> </nim> |
01:36:04 | fioco | (custom html tags) |
01:38:23 | fioco | Issue is, only stdlib is used.... no multi file support yet |
01:38:37 | * | jaco60 quit (Ping timeout: 265 seconds) |
01:39:26 | * | datanoise quit (Ping timeout: 276 seconds) |
01:41:58 | * | vikaton joined #nim |
01:44:58 | * | vendethiel joined #nim |
01:46:08 | * | gokr quit (Quit: Leaving.) |
01:55:19 | dtscode | Time to look at the IRC module again |
01:58:46 | fioco | dtscode:Can you do me a favor? |
02:06:16 | * | fioco is now known as testiuskjf |
02:06:39 | * | vendethiel quit (Ping timeout: 265 seconds) |
02:07:17 | * | testiuskjf is now known as fioco |
02:10:51 | * | datanoise joined #nim |
02:17:57 | * | fioco left #nim (#nim) |
02:25:12 | * | fioco joined #nim |
02:29:47 | * | vendethiel joined #nim |
02:30:08 | * | pregressive joined #nim |
02:32:30 | * | fioco left #nim (#nim) |
02:34:48 | * | pregressive quit (Ping timeout: 272 seconds) |
02:37:03 | * | Quikli joined #nim |
02:39:04 | * | Quikli quit (Client Quit) |
02:40:09 | * | elbow quit (Ping timeout: 240 seconds) |
02:49:39 | * | pregressive joined #nim |
02:50:39 | * | vendethiel quit (Ping timeout: 245 seconds) |
02:50:57 | * | brson quit (Quit: leaving) |
02:54:33 | * | dtscode is now known as charmander |
02:54:55 | * | dddddd quit (Ping timeout: 244 seconds) |
03:28:19 | * | BitPuffin|osx quit (Ping timeout: 265 seconds) |
03:40:52 | * | strcmp1 quit (Quit: Leaving) |
03:46:18 | jackv | so is there actually an unsafe shared heap? |
03:47:52 | * | darkf joined #nim |
04:13:18 | reactormonk | jackv, only if you want it |
04:13:42 | charmander | Araq: ping |
04:13:53 | jackv | is there another way to easily share variables among threads? |
04:14:18 | jackv | I mean, the different threads would only be reading it |
04:27:41 | * | xtagon joined #nim |
04:28:58 | flaviu | jackv: If you're not allocating memory, just put it in a global var. |
04:29:09 | flaviu | or you can copy it into each thread |
04:29:28 | jackv | ok thanks! |
04:30:20 | * | Jesin quit (Quit: Leaving) |
04:35:46 | * | pregressive quit (Remote host closed the connection) |
04:37:51 | * | usandfriends joined #nim |
04:38:53 | * | usandfriends left #nim ("Client Quit") |
05:06:43 | * | fioco_ joined #nim |
05:16:36 | * | nande quit (Read error: Connection reset by peer) |
05:19:10 | * | xtagon quit (Read error: Connection reset by peer) |
05:34:02 | * | gsingh93 quit (Ping timeout: 272 seconds) |
05:35:16 | * | fioco_ quit (Ping timeout: 256 seconds) |
05:43:40 | * | vikaton quit (Quit: Connection closed for inactivity) |
06:00:11 | * | elbow joined #nim |
06:34:55 | * | vendethiel joined #nim |
06:35:03 | * | gokr_ joined #nim |
06:40:37 | * | onionhammer quit (Ping timeout: 264 seconds) |
06:44:36 | * | gokr_ quit (Remote host closed the connection) |
06:44:47 | * | gokr_ joined #nim |
06:47:03 | * | charmander is now known as dtscode |
06:53:44 | * | Ven joined #nim |
06:54:21 | * | dtscode is now known as squirtle |
06:56:56 | * | gokr joined #nim |
06:57:01 | * | Ven quit (Client Quit) |
06:59:03 | * | vendethiel quit (Ping timeout: 265 seconds) |
07:06:02 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:07:13 | * | datanoise quit (Ping timeout: 256 seconds) |
07:07:48 | * | Ven joined #nim |
07:14:35 | * | wb quit (Ping timeout: 258 seconds) |
07:19:08 | * | davidhq joined #nim |
07:22:54 | * | squirtle is now known as bulbasaur |
07:30:29 | * | BlaXpirit joined #nim |
07:38:23 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:46:49 | * | gokr quit (Quit: Leaving.) |
07:49:25 | * | yglukhov____ joined #nim |
07:50:37 | Araq | ping zahary |
07:51:46 | * | wb joined #nim |
08:05:27 | * | datanoise joined #nim |
08:07:14 | * | coffeepot joined #nim |
08:08:22 | * | gokr joined #nim |
08:09:16 | * | gokr quit (Read error: Connection reset by peer) |
08:13:57 | * | Trustable joined #nim |
08:14:10 | * | Arrrr joined #nim |
08:14:32 | Araq | hey Trustable. how's your widget toolkit going? |
08:20:27 | * | ingsoc joined #nim |
08:21:36 | Trustable | Hi Araq, I have not yet started to code, but have a concept in my mind. |
08:22:54 | Trustable | What would be the best name for a Nim GUI toolkit? claro, claroui, nui, nimui, clarone, ...? |
08:23:29 | Araq | hey, we did decide on some name for it. |
08:23:34 | Araq | but I don't remember. |
08:24:47 | bulbasaur | Araq: I know you find linux distasteful, but would you have any issue with me making + maintaining an ubuntu apt-get repo for nim/nimble |
08:26:49 | * | Trustable quit (Quit: Leaving) |
08:27:33 | Araq | bulbasaur: no, why would I? |
08:27:41 | * | bulbasaur shrugs |
08:27:46 | Xe | I have been wondering what the best idea is for packaging nim's compiler toolkit in RPM distros. |
08:27:59 | bulbasaur | I just didn't want to get in trouble for it later down the line |
08:28:26 | * | Trustable joined #nim |
08:28:55 | * | Trustable quit (Remote host closed the connection) |
08:29:10 | Araq | I accept lots of stuff for improving the Linux experience, including compiler patches that produce terminal escape sequences and stuff. |
08:29:38 | * | Trustable joined #nim |
08:29:43 | Araq | it's just that the price for accepting these PRs is that you have to read my rants. ;-) |
08:29:44 | bulbasaur | Awesome |
08:29:49 | * | datanoise quit (Ping timeout: 264 seconds) |
08:29:56 | bulbasaur | ;-; not more rants |
08:30:05 | Araq | ok, will try |
08:30:17 | bulbasaur | dom96 already rants enough |
08:30:30 | Araq | really? that's news to me |
08:30:44 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:33:36 | bulbasaur | Maybe I'm thinking of someone else |
08:35:48 | bulbasaur | shit. I accidentally logged out of my ssh shell |
08:42:06 | * | jaco60 joined #nim |
08:44:52 | * | banister joined #nim |
08:48:45 | * | Ven joined #nim |
08:57:33 | * | themagician_a quit (Ping timeout: 265 seconds) |
08:59:45 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:00:27 | ingsoc | Is it just that core devs have more experience with Windows or is there some technical reason why *nix isn't the preferred platform |
09:00:39 | ingsoc | just interested as a guy who moved from windows after years to linux |
09:01:37 | * | jh32 quit (Ping timeout: 264 seconds) |
09:01:45 | Araq | ingsoc: I pretty much moved from Linux back to Windows. After years of using Linux. |
09:02:37 | Araq | for plenty of technical reasons. |
09:02:44 | Araq | but nobody wants to hear about them. |
09:03:55 | * | themagician joined #nim |
09:04:09 | ingsoc | Araq: I am more from operations and enterprise background (not so much programming) and windows has a dominance in that arena (no choice but to use it), but I have found that *nix has more back doors or ways to figure out what the hell is happening with the system than windows. |
09:04:24 | ingsoc | you have more control |
09:04:39 | ingsoc | but then, i am not sure what linux v windows is like from a systems programming POV |
09:05:07 | ingsoc | I am interested in a short vent if you like |
09:05:18 | ingsoc | i have no allegiance to either platforms really |
09:05:22 | ingsoc | :D |
09:06:01 | * | Trustable quit (Remote host closed the connection) |
09:06:18 | Araq | well they are both quite horrible. it's just that Windows is slightly better these days in getting out of my way. |
09:06:19 | ingsoc | I have also found that most open source tooling is usually more supportive of *nix than windows which is partly why i switched |
09:06:42 | ingsoc | oh ok, you mean more from a user POV, like less hassle in a daily workflow |
09:06:54 | ingsoc | linux is deffo more hassle to get things working |
09:06:58 | ingsoc | and incompatibilities |
09:07:00 | ingsoc | deffo |
09:07:11 | ingsoc | *nix is better as a server platform though imho |
09:07:26 | Araq | windows: all the old shit, but at least my programs continue to run. |
09:07:37 | ingsoc | fair enough |
09:08:01 | * | Ven joined #nim |
09:10:00 | Araq | Linux: all the old shit and now sound doesn't work anymore. ;-) |
09:10:53 | Araq | ingsoc: windows as a server is still a joke, agreed. |
09:11:03 | * | OnO joined #nim |
09:12:31 | ingsoc | Araq: yeah, lets load a complex GUI and make sure we have as much shit as possible loaded to eat clock cycles and trigger a bug so we can then run our mission critical apps on it. Actually I think there is a way, or there were rumours at one time that there was a release of windows server coming out with no gui enabled |
09:12:57 | ingsoc | but yeah, even then it is still shit |
09:13:03 | ingsoc | scripting was a joke for years |
09:13:15 | ingsoc | not used powershell much but i guess that has improved things |
09:13:27 | Araq | dunno I consider scripting a joke everywhere. |
09:14:16 | Araq | "here is this language of the 70ies with weird quoting rules that does not type checking whatsoever and every command effects your hard-disk" |
09:15:27 | ingsoc | yeah. tbh I now tend to write sys admin scripts with python for a whole load of reasons |
09:18:53 | Araq | yeah and on windows, you can actually install the python version of your choice and are in full control which python version is used for what ;-) |
09:24:08 | * | themagician quit (Ping timeout: 265 seconds) |
09:28:06 | ingsoc | Araq: btw, I was talking about concurrency a while back, and well, I did a talk about concurrency and erlang a while back and created this image to show how it works with regard to multi-core. You might not care at all but just thought I would give you a heads up. |
09:28:06 | ingsoc | https://drive.google.com/file/d/0BwQ_KGjTrn-1RC1xNGtSalFGSWs/view?usp=sharing |
09:29:25 | * | themagician joined #nim |
09:30:20 | ingsoc | akka is a library for Java VM that has copied a lot of the erlang way of doing things for its concurrency model so it seems it is possible to add this as a library without core VM support like in erlang http://akka.io/ |
09:30:53 | ingsoc | dream would be a library like that for a easier systems programming language like nim, fast effecient low memory usage etc. |
09:30:54 | ingsoc | :) |
09:31:17 | ingsoc | prob a LOT of work though and i don;t have the skills |
09:32:27 | * | davidhq joined #nim |
09:32:32 | * | davidhq quit (Client Quit) |
09:33:34 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:38:19 | Araq | ingsoc: thanks, but I know that much already. |
09:39:29 | * | jh32 joined #nim |
09:41:17 | ingsoc | ok |
09:43:25 | Araq | these libraries often do bytecode rewritting to implement some continuation passing style |
09:43:44 | Araq | which is what our async does too |
09:50:28 | * | vendethiel joined #nim |
09:50:39 | coffeepot | some quick questions regarding style of accessing SQL params. Say you have a query "qry" and want to access the params. You need access by string or by int index. Possible options: a) qry.params[0] = value, qry.paramByName['myparam'] = value b) qry.param[0] = value, qry.params['myparam'] = value or c) not sure this is a good idea or even possible, |
09:50:39 | coffeepot | qry.params[0] = data, qry.params['myparam'] = data. Ultimately I want to have it do something similar to % in strutils for setting them up too, but that's kinda separate. |
09:51:00 | coffeepot | just wondering what people think would by nicer to use really |
09:51:20 | Araq | qry.fieldname via overloaded '.' access is also possible |
09:52:10 | coffeepot | Araq: hmm yes but that would interfere with other members of the qry object I think? |
09:52:23 | coffeepot | well, if your param name shadowed a propery |
09:52:28 | coffeepot | property |
09:53:52 | coffeepot | oh wait i think i see what you mean, like qry.params.myparamname ? |
09:55:14 | coffeepot | is it possible in nim to overload it so that you could do qry.params[int] and qry.params[string] ? Still not sure if it's sensible though |
09:55:59 | eldamar | a bit late to the game, but if you like to have multiple python enviroments on *nix there is always https://github.com/yyuu/pyenv, have worked out really good for me |
09:57:59 | * | themagician quit (Ping timeout: 276 seconds) |
09:58:38 | * | xet7 quit (Ping timeout: 276 seconds) |
09:58:46 | * | johnsoft quit (Ping timeout: 256 seconds) |
09:58:54 | * | boopisaway is now known as boop |
10:00:57 | Araq | eldamar: yeah but I really enjoy the fact that the base system doesn't depend on Python at all ;-) |
10:01:25 | Araq | in fact, I enjoy the proper distinction between OS and applications. |
10:13:01 | * | vendethiel quit (Ping timeout: 255 seconds) |
10:16:31 | * | dddddd joined #nim |
10:36:27 | * | gokr_ quit (Remote host closed the connection) |
10:36:41 | * | gokr_ joined #nim |
10:37:25 | OnO | Araq: so can we bring back +x to bootstrap.sh ? |
10:39:54 | Araq | OnO: yep. PRs welcome |
10:40:40 | * | JinShil joined #nim |
10:41:12 | OnO | btw. latest devel does no install anymore: lib/impure/zipfiles.nim(117, 9) Error: undeclared identifier: 'ZipFileStream' |
10:41:44 | Araq | there has been yet another renamefest |
10:41:51 | Araq | should be easy to fix. |
10:42:28 | OnO | b0469c11e334e96cebe53cbe804b6a877831c85a: Reverted TZipFileStream name change forgot revert in one place |
10:46:11 | * | JinShil quit (Quit: Konversation terminated!) |
10:46:22 | OnO | Araq: here's a quick fixup for that: https://github.com/Araq/Nim/pull/2873 |
10:51:09 | Araq | so OnO, haven't looked at how you implemented it, but ({.pragmas.}: foo) is fine |
10:52:34 | OnO | actually it is very trivial extension to parsePar https://github.com/nanoant/Nim/commit/b0db8126a52fd48352b0b2ce8c7d99e0c98083ef |
10:53:22 | OnO | FYI I am working on {.noRewrite: ident.}, I am adding noRewrite*: PIdent to TNode that has sons |
10:53:40 | Araq | nah, please don't |
10:53:51 | OnO | okay, so? |
10:53:54 | OnO | better way? |
10:54:11 | OnO | coz previous you didn't like nfNoRewrite flag |
10:54:18 | * | johnsoft joined #nim |
10:54:36 | Araq | well the AST has a really fixed structure |
10:54:46 | Araq | don't patch it, it's not required anyway |
10:55:26 | Araq | nkPragmaStmt( nkIdent("noRewrite"), nkIdent("ident")) is good enough, just add some accessors for it |
10:55:42 | Araq | well I guess it's nkPragmaStmt(nkPar( ... )) but whatever |
10:55:55 | Araq | er, nkExprColonExpr |
10:56:20 | Araq | also you should lookup the ident and produce a sym. |
10:56:41 | Araq | so that foo.rule1 does not affect bar.rule1 |
10:57:09 | Araq | and ... it might be all wrong ;-) |
10:57:15 | Araq | maybe instead we should have: |
10:57:44 | Araq | template rule{x= a}() {.nonrecursive.} |
10:58:28 | OnO | maybe, but then we would get back to square 1 requiring attaching used opts to the part of AST |
10:59:01 | OnO | moreover actually I need to block my other optimizations eg. block optRead from optWrite that used read expr too |
10:59:30 | Araq | .nonrecursive and implicitly produce {.noRewrite: currentRule.} |
10:59:35 | Araq | *can implicitly |
11:00:25 | Araq | it's just more convenient for TR macro writers, but a rarely used feature doesn't need all this sugar either so whatever |
11:00:41 | Araq | your last comment is interesting |
11:00:41 | OnO | yeah :) anywhere where currentRule is actually used in the template... anyways I don't think we need that |
11:01:29 | OnO | as for attaching symbol not ident to the noRewrite... what would be the syntax? |
11:02:14 | OnO | just bindsym followed by check if it is macro or proc? |
11:02:41 | Araq | I don't understand |
11:02:56 | Araq | you lookup the symbol when you process the pragma in pragmas.nim. |
11:04:10 | * | milosn_ joined #nim |
11:05:04 | * | milosn quit (Ping timeout: 256 seconds) |
11:05:37 | Araq | OnO: also from your description it looks like you want {.noRewrite: [foo, bar].} |
11:06:04 | OnO | Araq: yess.... probably |
11:06:20 | OnO | this is how it looks now: at the very bottom: https://github.com/nanoant/nim-orm/blob/master/orm.nim |
11:06:26 | * | milosn_ is now known as milosn |
11:07:11 | OnO | but since there are no two TR macros of mine that affect the same part actually I'd need: {.noRewrite: optWrite.}: ({.noRewrite: optRead.}: user.field) = value |
11:08:06 | Araq | also it will be fun to support that without template forwarding |
11:08:27 | Araq | I guess you need to defer the pragma checking somewhat until the symbols are known :P |
11:08:44 | OnO | still my problem is that as you suggest to keep these symbols in the pragma, but the stmt pragma are processed by sema into plain stmts is I understand correctly before TR pass |
11:09:14 | OnO | in semPragmaBlock in fact |
11:09:34 | Araq | there are pragmas which remain in the AST, like .emit |
11:09:55 | Araq | don't remember how it's done but it shouldn't be hard to keep them |
11:09:55 | * | gokr_ quit (Read error: Connection reset by peer) |
11:11:00 | OnO | oookay... but then since matches (patterns.nim) have a handle to the expr not the wrapping pragma this will bring severe complication |
11:12:18 | OnO | coz if I understand correctly nodes do not have pointers to their parents (surroundings) |
11:12:18 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:12:59 | Araq | I don't see why |
11:13:44 | Araq | instead of checking nfNoRewrite you have an nkPragmaExpr node that you need to look at |
11:15:28 | OnO | yeah, but I don't want noRewrite to be recursive, but such implementation would probably cause this |
11:15:42 | * | noobie joined #nim |
11:16:25 | OnO | I need to think on it, but my original idea would be to block rewrite of the AST part, but not its subparts |
11:17:12 | OnO | eg. norewrite: somecall(1, 2, 3, somecall(1, 2)), blocks only top rewrite |
11:17:18 | OnO | not the inner one |
11:17:50 | Araq | hrm. why? pattern matching is from outer to inner |
11:18:13 | Araq | if you prevent the outer from transforming, the inner is safe |
11:18:28 | * | banister joined #nim |
11:19:10 | Araq | that's why we have them, they need to work quite differently from ordinary macros |
11:19:27 | OnO | "safe" means it will rewrite or not? coz I want it to rewrite |
11:19:50 | Araq | "safe" means no rewrite |
11:20:04 | OnO | eg. TR: macro that rewrites call(x, y) -> call(1, y) |
11:20:17 | OnO | so it emits noRewrite: call(1, y) |
11:20:29 | * | xet7 joined #nim |
11:20:42 | OnO | now, let's say our code is call(0, call(0, 2)) |
11:20:56 | OnO | then inner call will be not rewritten |
11:21:05 | Araq | aye |
11:21:51 | OnO | but this is not expected, since we want our TR to match all possible opportunities, but just once |
11:22:11 | * | themagician joined #nim |
11:22:26 | Araq | then you need a better .noRewrite annotation :P |
11:24:01 | Araq | in fact, I'm not sure you need an annotation at all but simply more logic in the matching&rewriting process |
11:24:28 | Araq | so that the produced 'call' is marked red since it already comes from a TR macro |
11:24:45 | Araq | in fact, your nfNoRewrite node flag might come in handy for that |
11:25:41 | OnO | we probably do, given example I rewrite: (load) a.x (store) a.x = v |
11:25:58 | OnO | in store result I need to prevent a.x rewrite |
11:26:20 | OnO | I doubt this can be figured out automatically |
11:30:17 | * | Kingsquee quit (Quit: Konversation terminated!) |
11:38:25 | * | vikaton joined #nim |
11:38:49 | * | Nax joined #nim |
11:39:44 | * | gokr joined #nim |
11:43:40 | * | datanoise joined #nim |
11:49:03 | * | noobie quit (Quit: Page closed) |
11:49:45 | * | strcmp1 joined #nim |
11:50:50 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:52:16 | OnO | Araq: different Q: currently macros return false for: bindSym"SomeType" == bindSym"SomeType" |
11:52:24 | OnO | apperently comparing Sym nodes does not work |
11:52:30 | OnO | is it expected behavior? |
11:52:40 | Araq | hrm, no |
11:53:11 | OnO | opcEqNimrodNode just compared regA.node with regB.node |
11:53:27 | OnO | but I don't see any place that defines `==` for PNode |
11:53:58 | vikaton | Araq, does this look good to be added to the FAQ ? |
11:54:23 | vikaton | https://gist.github.com/Vikaton/126c07c00527cbcab545 |
11:55:21 | * | def- quit (Ping timeout: 265 seconds) |
11:55:53 | * | Nax quit (Quit: Page closed) |
11:56:01 | * | JinShil joined #nim |
11:59:07 | * | def- joined #nim |
12:01:38 | * | johnsoft quit (Ping timeout: 265 seconds) |
12:06:51 | * | gokr_ joined #nim |
12:12:44 | * | datanoise quit (Ping timeout: 245 seconds) |
12:18:19 | * | def- quit (Ping timeout: 256 seconds) |
12:21:30 | * | onionhammer joined #nim |
12:22:08 | * | def- joined #nim |
12:22:39 | coffeepot | I'm not araq vikaton but surely not nil should be the first item on your list? |
12:22:55 | coffeepot | as it's a language feature |
12:23:08 | vikaton | Ok sure |
12:23:12 | * | synthmeat left #nim ("WeeChat 1.3-dev") |
12:25:26 | vikaton | done |
12:27:19 | yglukhov____ | vikaton, imho it should be stated that pointers are hardly needed on day-to-day basis. They are mostly needed for interfacing with C*, and for hardcore optimizations. Otherwise nim's references should suffice. |
12:27:23 | * | TEttinger quit (Ping timeout: 246 seconds) |
12:28:27 | vikaton | you guys could fork it and stuff you think is best fit in it |
12:28:41 | * | def- quit (Ping timeout: 265 seconds) |
12:30:14 | * | Ven joined #nim |
12:32:53 | * | yglukhov_____ joined #nim |
12:33:38 | * | def- joined #nim |
12:37:14 | * | yglukhov____ quit (Ping timeout: 276 seconds) |
12:37:51 | * | Siecje joined #nim |
12:39:59 | Araq | OnO: it's likely the same opcode. it should do a deep comparison (there is a bug report about it) |
12:41:28 | vikaton | yglukhov_____: Well I dont think they need to be concerned about that then since they wouldnt use pointers |
12:41:32 | coffeepot | yeah I think a lot of the 'unsafe' stuff comes from two areas: one, that it compiles to C and people somehow think this means writing nim is anything like writing C, and two that post on HN where pcwalton mentions a code snippet that ends up dereferincing nil - however he declares a ref then uses [] which is IIUC a pointer deref anyway. Normal use |
12:41:32 | coffeepot | of refs I don't think cause UB |
12:42:23 | coffeepot | I think it's good that you're writing this, vikaton |
12:42:57 | vikaton | thanks |
12:43:19 | * | Pisuke quit (Read error: No route to host) |
12:44:06 | Araq | er ... ref vs ptr has nothing to do with the "unsafety" of Nim's "nil" value. |
12:44:38 | vikaton | well when we get NilError exception from a null pointer dereference being caught with --nilChecks, then its DB |
12:44:41 | * | Siecje left #nim (#nim) |
12:44:48 | vikaton | Araq, is that good enough to update the FAQ ? |
12:46:08 | coffeepot | Araq sure, but in the comment I'm referring to dereferencing a nil ref gives funky behaviour |
12:46:16 | coffeepot | in release mode |
12:46:48 | coffeepot | var k: ref int = nil; var l = k[]; echo($l) |
12:47:12 | coffeepot | of course, writing var l = k and echo ($l) gives a type error |
12:48:00 | Araq | every line of code that has never been run in debug mode is broken anyway, this holds for every systems programming language that I know of. |
12:48:15 | coffeepot | anyway, I don't know enough to really say much other than I haven't needed to [] on a reference yet, so not sure if that's something people do aside from sharing between threads |
12:48:41 | Araq | in fact, it's .NET and the JVM which tend to do much better by not stressing the debug vs release modes that much. |
12:50:34 | Araq | coffeepot: keep in mind that x.field is often short for x[].field, so it's much more common than you think it is. |
12:50:56 | Araq | also threading and safety is a completely different topic |
12:51:15 | vikaton | so I should take off the thread point? |
12:53:45 | coffeepot | Araq hmm, that's a good point regarding x[].field. So, would I be crazy to suggest that a not nil might be a better as a default for refs, so that you have to explicitly allow nils? Or is that gonna impact performance? |
12:53:56 | vikaton | I'm just gonna go and add the QA to the FAQ now |
12:54:01 | vikaton | unless someone objects |
12:54:21 | vikaton | coffeepot: not nil doesnt add overhead AFAIK |
12:54:36 | vikaton | oh wait nvm read that wrong |
12:54:37 | coffeepot | vikaton people can always expand on the page as they think of points to put in :) |
12:54:45 | vikaton | mhm |
12:55:12 | coffeepot | it is a question that gets asked often enough |
12:55:17 | vikaton | I just dont want to input false information I may have put in by mistake |
12:55:55 | coffeepot | understandable. I'm not exactly a nim pro tho so can't really comment :) |
12:56:24 | Araq | I'd answer this question completely differently: |
12:56:56 | notfowl | Make the article be called why isn't nim rust and just leave it empty |
12:57:05 | * | def- quit (Ping timeout: 250 seconds) |
12:57:05 | * | pregressive joined #nim |
12:57:15 | Araq | 1. It's not a problem in practice in the real world, where people have access to a very good debug mode that catches all sorts of things at compile-time and at run-time. |
12:57:33 | Araq | 2. It's not a problem with the right C compiler configurations. |
12:58:42 | Araq | 3. It's not hard to "fix" this issue anyway. Where "fixing" means "pretending Nim created Ansi C code in the first place" (which it doesn't). |
13:00:22 | Araq | 4. It's furthermore entirely deterministic in debug mode. It's nothing like a data race which you can never effectively test against. |
13:00:55 | vikaton | I can add all this stuff |
13:02:07 | Araq | these things are called "paper tigers". Looks bad on paper, has no connection to reality. |
13:02:11 | coffeepot | I agree of course, to be quite honest I think it's just something rustaceans mention because it's rust's USP, which is understandable. I think it's worth having a page to send people who feel it is a deal breaker though, explaining why it's actually not a big deal. Personally, I'm quite used to the create/free paradigm so ensuring not-nils is somet |
13:02:11 | coffeepot | hing I think is just part of normal programming. |
13:02:53 | Arrrr | This has happened before with higher order functions |
13:03:07 | coffeepot | Arrr it did? |
13:03:25 | Arrrr | Yes, "your pl is not functional enough" |
13:03:44 | coffeepot | lol |
13:04:06 | notfowl | We don't have to win over rust users, we don't have to win over anybody |
13:04:24 | notfowl | The cool kids don't try to be cool, they just are. |
13:04:28 | coffeepot | notfowl you are entirely right |
13:04:57 | Arrrr | i'd rather make sure nim has the right features before it grows in popularity |
13:05:12 | coffeepot | still though, 'paper tigers' can mean bad PR for no reason. As you say though it's not about convincing people. I think the proof is in projects that actually use nim |
13:05:25 | notfowl | Answering every troll who asks "y so unsafe???" Would keep you from getting any work done |
13:05:45 | * | yglukhov_____ quit (Read error: Connection reset by peer) |
13:05:46 | * | yglukhov______ joined #nim |
13:07:09 | * | def- joined #nim |
13:07:22 | Araq | now ... would 'not nil' be the better default. I don't think so. If it's a "not optional ref" it often isn't a 'ref' at all |
13:07:36 | Araq | Nim is not Java. |
13:08:05 | Arrrr | i'd like it to be optional, and always return optional when in doubt |
13:08:16 | Arrrr | *to be the default |
13:08:42 | coffeepot | tbh when i use a ref it's because a) I want to use reference semantics and b) that includes the possibility of not being defined |
13:09:21 | coffeepot | so I'm kinda against not-nil default anyway |
13:09:21 | Arrrr | At least, procs defined in the stdlib (or at least, most of them) should return optional before nil |
13:09:30 | Araq | and c) Nim already encourages you to give the type a name and then 'not nil' can be part of the type definition easily |
13:09:31 | * | datanoise joined #nim |
13:10:39 | dom96 | Arrrr: You mean Option[T]? |
13:10:52 | Arrrr | maybe true |
13:11:10 | Arrrr | (well, in nim, some true) |
13:11:35 | dom96 | I think we need to take a long look at the stdlib and see which parts make sense and which don't before 1.0. |
13:11:37 | * | yglukhov______ quit (Read error: Connection reset by peer) |
13:12:08 | * | yglukhov______ joined #nim |
13:12:19 | Arrrr | i'd move some stuff from strutils and sequtilts to system |
13:12:30 | * | bjz joined #nim |
13:12:54 | * | yglukhov______ quit (Remote host closed the connection) |
13:13:14 | dom96 | I think system is big enough. |
13:13:29 | * | yglukhov______ joined #nim |
13:13:49 | dom96 | perhaps it needs to be split into multiple modules. |
13:14:59 | vikaton | Araq, added to the bottom, https://gist.github.com/Vikaton/126c07c00527cbcab545 |
13:16:35 | Araq | Arrrr: why? cause you dunno about 'include prelude'? |
13:16:50 | * | dalarmmst quit (Ping timeout: 252 seconds) |
13:16:57 | Araq | not to mention the x command line switches for implicit imports |
13:18:45 | coffeepot | huh, well I didn't know about include prelude :) Things like this are nice when you have dead code elim |
13:21:14 | coffeepot | I keep forgetting how nice parseutils is :) |
13:21:39 | Araq | more important would be something like "if system is imported explicitly, don't import it implicitly" |
13:22:02 | Araq | so then "import system except `..<` " starts to work |
13:22:13 | * | def- quit (Ping timeout: 250 seconds) |
13:22:16 | Varriount_ | dom96: If nothing else, system should be split into multiple modules for documentation purposes. |
13:22:20 | * | Varriount_ is now known as Varriount |
13:22:34 | coffeepot | "import system except" why is that necessary with dead code elim? |
13:22:59 | dom96 | Varriount: precisely |
13:23:02 | Varriount | coffeepot: So that people can disable behavior found in system.nim |
13:23:17 | coffeepot | Varriount oh yes, of course! :) |
13:23:37 | Varriount | coffeepot: Say, if you wanted to re-implement the string types subscript operator. |
13:23:44 | Varriount | *type's |
13:24:42 | Araq | Varriount: that's more work than just having a version of 'system' that's only used for the docgen |
13:25:00 | * | fioco joined #nim |
13:27:16 | Varriount | Araq: But wouldn't a version of system.nim just for docgen require copying all of system.nim's contents? And then the copy would have to be continually updated to match system.nim |
13:29:38 | buttplug | why does it let shit be nil anyway |
13:29:56 | Varriount | buttplug: Huh? |
13:30:39 | * | def- joined #nim |
13:32:20 | * | fioco left #nim ("See") |
13:32:27 | * | yglukhov_______ joined #nim |
13:32:54 | Varriount | Araq: Just a status update on the MSDN crawler - It's working, and has (at last count) about 3000 pages left to crawl. |
13:33:08 | Araq | Varriount: multiple systems can include the same files |
13:33:32 | Varriount | Araq: Oh. I hadn't thought of that. |
13:35:21 | * | yglukhov______ quit (Ping timeout: 240 seconds) |
13:35:57 | * | datanoise quit (Ping timeout: 265 seconds) |
13:37:02 | * | BlaXpirit quit (Read error: Connection reset by peer) |
13:37:05 | * | BlaXpirit_ joined #nim |
13:37:05 | * | BlaXpirit_ is now known as BlaXpirit |
13:40:15 | coffeepot | buttplug are you asking why a ref *can* be nil? |
13:40:40 | buttplug | ya isn't that just like using c pointers |
13:41:01 | buttplug | why not jump to at least c++ references |
13:41:25 | coffeepot | I think a ref is pretty similar to C++ references |
13:41:30 | Araq | or like using C# objects. which weren't able to get rid of 'null' for pretty much the same reasons Nim weren't. |
13:42:16 | Araq | c++ references are 'var T' and cannot be 'nil' (except in corner cases, like in C++) |
13:45:04 | coffeepot | I think the simple answer to why a ref can be nil is that sometimes you want to represent data that is... well, empty, or not set up - for example with lazy initialisers |
13:45:50 | coffeepot | eg; trees. If a tree node has it's children as nil you know it's got no children |
13:46:15 | * | Siecje1 joined #nim |
13:46:17 | coffeepot | you couldn't have a recursive structure that doesn't allow a nil reference to it's type AFAIK |
13:46:41 | coffeepot | unless you defined it as using a separate object that represents 'empty' |
13:46:55 | notfowl | Yes nil (0) is a state pointers can be in |
13:47:27 | Araq | recursive structures are fine with 'not nil'. *cycles* however pretty much require 'nil' and imperative creation code. |
13:48:40 | coffeepot | I stand corrected :) I wouldn't want to give up the possibility of nil, personally |
13:49:00 | dom96 | Couldn't the compiler have a mode in which it scans your code and warns you about places where you are dereferencing a possibly nil ref? |
13:49:21 | dom96 | but then you may as well use 'not nil' I gues |
13:49:22 | dom96 | s |
13:49:23 | coffeepot | dom96 I thought that was what not-nil is? |
13:50:09 | coffeepot | ... or is it? :) |
13:51:16 | coffeepot | actually it'd be nice to be able to have a compiler flag that forces a not-nil check and emits a warning |
13:51:27 | coffeepot | but doesn't actually force not-nil |
13:51:38 | coffeepot | if that makes sense |
13:51:43 | dom96 | yeah, that's what I meant. |
13:51:56 | coffeepot | :) |
13:52:12 | Araq | that's what "not nil" does |
13:54:15 | coffeepot | dom96 I just realised I literally just repeated what you said haha |
13:54:29 | dom96 | lol |
13:57:06 | * | Gonzih quit (Remote host closed the connection) |
13:59:38 | * | sepisoad joined #nim |
14:00:19 | * | Siecje1 quit (Ping timeout: 256 seconds) |
14:04:21 | * | Gonzih joined #nim |
14:06:01 | OnO | stupid Q, why rst files are having .txt prefix not .rst? |
14:06:11 | OnO | I mean in doc/ |
14:06:29 | * | yglukhov_______ quit (Remote host closed the connection) |
14:06:30 | Araq | cause they are readable as .txt too |
14:06:32 | OnO | and .rst extension (not prefix - cmon my English is fun today) |
14:07:03 | * | yglukhov_______ joined #nim |
14:07:05 | OnO | Araq: yeah I know, but if you use some syntax highlight editor to edit these then you don't get RST features :( |
14:07:54 | Araq | yeah I guess we can change that. the idea was that people don't get strange ideas like "convert the .rst to txt please" |
14:09:35 | OnO | ah, okay, this isn't big deal, it can remain as it is now, I was just wondering what was the reason |
14:10:11 | * | johnsoft joined #nim |
14:11:29 | * | Siecje joined #nim |
14:13:19 | Araq | btw what "RST editing featues" are available? |
14:13:46 | * | gokr_ quit (Remote host closed the connection) |
14:15:18 | * | fioco joined #nim |
14:17:15 | * | yglukhov_______ quit (Ping timeout: 250 seconds) |
14:18:53 | dom96 | syntax highlighting probably |
14:19:11 | dom96 | live rendering too maybe |
14:22:32 | Araq | dom96: well I asked about real features, not about features what you can think of :P |
14:22:43 | Araq | *that |
14:25:29 | * | xet7 quit (Quit: Leaving) |
14:30:44 | r-ku | i see in-place conversion string(s).len does not create new object but uses original one (where s is type foo = distinct string). however let ns = string(s) makes a copy. any way to avoid making a copy? i basically want variable-like alias for calling parent type procs easily without making a copy of variable. |
14:31:22 | notfowl | Use shallowcopy() |
14:31:41 | Araq | let ns = string(s) doesn't create a copy if 'ns' is local. |
14:31:59 | Araq | (I think.) |
14:32:16 | r-ku | i tried it only in "root scope" in my test script, let me try it in proc |
14:33:15 | r-ku | you are right, thanks |
14:33:26 | r-ku | though this is weird. why would it make a copy if not in a proc? |
14:34:03 | * | fioco left #nim ("See") |
14:34:46 | OnO | cough... cough... shouldn't we also fix Nim project files line endings at some stage heading towards 1.0? |
14:35:35 | Araq | OnO: for me this is backwards. Git should be fixed instead to not be a dick about everything. ;-) |
14:36:19 | Araq | r-ku: for reasons that hrm ... are too complex to explain here :P |
14:36:59 | notfowl | r-ku: because global variables? String have value semantics |
14:37:18 | OnO | Araq: haven't you heard that Git is a "stupid content tracker" :P ? |
14:37:18 | * | datanoise joined #nim |
14:37:41 | OnO | it just does what you tell... you put CRLF you get CRLF |
14:38:11 | Araq | no, it has all sorts of "put cr in, get lf out" behaviour |
14:38:11 | * | BitPuffin joined #nim |
14:38:11 | OnO | obviously you can enable line endings canonization, but somebody who did the commits didn't |
14:38:32 | * | sepisoad quit (Read error: Connection reset by peer) |
14:38:38 | Araq | yeah cause git shouldn't mess with my data |
14:38:58 | * | sepisoad joined #nim |
14:39:08 | Araq | what if I have a test file that tests that CR-LF works on Linux too? |
14:40:34 | OnO | yes |
14:40:35 | notfowl | Haven't you heard? Every problem with git exists between your chair and keyboard |
14:40:43 | OnO | actually mostly tests/ are affected |
14:40:51 | * | banister joined #nim |
14:41:02 | notfowl | Hundreds of people are using it without any problems |
14:41:07 | OnO | but depending on editor it can show just some crap like ^M |
14:41:11 | OnO | on each line |
14:41:39 | * | sepisoad_ joined #nim |
14:41:52 | Araq | the only real problem is that "git diff" lacks a "user has a real life" switch that's enabled by default. so that trailing whitespace isn't shown. I mean I can enable that easily enough, but then "git log -p" doesn't know about it. |
14:42:11 | Araq | OnO: so fix your editor. |
14:42:11 | OnO | true |
14:43:22 | Araq | this "user has a real life" switch would be very useful for Linux too. |
14:43:53 | Araq | perhaps even for open source in general. |
14:44:07 | OnO | long story short I wouldn't blame Git but M$ for making their own shitty standards, just to "be incompatible" |
14:45:57 | def- | Araq: it would be much easier to fix the trailing whitespace and cr-lf issues in the nim repo instead of arguing to fix every other software out there |
14:48:29 | OnO | main code problems is compiler/canonicalizer.nim lib/system/channels.nim lib/windows/windows.nim lib/wrappers/claro.nim, rest are docs, tests and examples, which are more less irrelevant |
14:48:40 | r-ku | oh lol there should be entry about this switch on wikipedia. its worth quoting. although they would take it down for lack of credible references.. |
14:53:36 | * | banister quit (Ping timeout: 244 seconds) |
14:53:42 | * | joebo joined #nim |
14:55:41 | vikaton | added and edited the FAQ |
14:55:42 | vikaton | feel free to correct me |
14:57:23 | Arrrr | where can i see your additions |
14:58:18 | vikaton | Arrrr: https://github.com/Araq/Nim/wiki/Unofficial-FAQ/_history |
15:15:00 | * | JinShil quit (Quit: Konversation terminated!) |
15:18:10 | * | sepisoad_ quit (Quit: Leaving) |
15:18:39 | * | darkf quit (Quit: Leaving) |
15:21:37 | * | gsingh93 joined #nim |
15:36:22 | * | Siecje quit (Read error: Connection reset by peer) |
15:47:54 | * | gsingh93 quit (Ping timeout: 252 seconds) |
15:49:20 | reactormonk | dom96, can I just drag sexp.nim over into nimsuggest? |
15:49:46 | dom96 | reactormonk: do you want to keep in the stdlib? |
15:50:28 | reactormonk | dom96, I don't see why. sexp aren't used that often and I don't see why keep it in there. |
15:51:04 | dom96 | alright, remove it then |
15:51:28 | dom96 | might want to check using 'when defined(sexp)' anyway so that it works for people who happen to have sexp in their stdlib |
15:51:36 | dom96 | (or is it declared, can't remember). |
15:52:44 | * | kdsakd joined #nim |
15:58:09 | * | BitPuffin quit (Ping timeout: 245 seconds) |
15:58:15 | reactormonk | hm. |
15:58:18 | reactormonk | .nimble/pkgs/compiler-0.10.3/compiler/idents.nim(15, 21) Error: cannot open 'etcpriv' |
15:58:20 | reactormonk | FAILURE: Build failed for package: nimsuggest |
15:58:24 | reactormonk | dom96, can't build it anyway |
15:58:38 | * | kdsakd quit (Quit: Page closed) |
15:59:25 | dom96 | likely a linux issue |
15:59:29 | dom96 | try fixing it please |
15:59:46 | reactormonk | nah, compiler update did it |
16:00:55 | * | HOLYCOWBATMAN joined #nim |
16:00:58 | HOLYCOWBATMAN | Araq: its simple, set core.autocrlf to false |
16:01:18 | HOLYCOWBATMAN | that way you checkout and commit real lines endings |
16:01:21 | HOLYCOWBATMAN | nothing is changed |
16:01:28 | reactormonk | dom96, access to https://github.com/nim-lang/nimsuggest plz |
16:02:29 | dom96 | reactormonk: hrm, strange that you're not in that org yet. |
16:02:33 | dom96 | Well, I invited you. |
16:02:46 | dom96 | Don't disappoint me :P |
16:02:58 | reactormonk | git push --force |
16:03:13 | Xe | can the compiler sources package be updated for nim 0.11.2? |
16:03:52 | HOLYCOWBATMAN | Araq: you can use core.eol=lf too |
16:05:23 | reactormonk | http://pastie.org/private/vely8a6dkrg0lpmwcsyng ... wtf? |
16:05:51 | HOLYCOWBATMAN | git fetch first |
16:05:56 | reactormonk | ohh, wait |
16:06:07 | reactormonk | I have a different remote for pushing so I don't push to the main repo by mistake :D |
16:06:43 | HOLYCOWBATMAN | thats why you should always use explicit commands |
16:06:50 | HOLYCOWBATMAN | aka git push origin master |
16:06:52 | HOLYCOWBATMAN | or whatever |
16:07:24 | HOLYCOWBATMAN | aka git push origin somefeature:devel |
16:07:31 | * | sepisoad_ joined #nim |
16:08:49 | dom96 | Xe: you mean in the C sources repo? |
16:09:04 | * | Tennis quit (Quit: Leaving) |
16:09:23 | Xe | https://github.com/nim-lang/packages/blob/master/packages.json#L1113-L1121 |
16:09:31 | Xe | for some reason it reports as 0.10.x |
16:09:45 | dom96 | oh! |
16:10:21 | dom96 | done |
16:10:48 | Arrrr | How is the nim way to unit testing? |
16:11:03 | dom96 | Arrrr: Either the unittest module or doAssert() |
16:11:10 | * | sepisoad quit (Ping timeout: 272 seconds) |
16:11:19 | r-ku | hmm what is a correct way to have a var argument which does not get modified in parent scope and what is correct way to have "out" variable that gets modified in parent scope? atm var seems to cover second case but Araq insists var != out. and docs do not seem to cover this. |
16:11:22 | Arrrr | Do i have to compile with a special switch? |
16:11:55 | dom96 | Arrrr: nope |
16:12:01 | flaviu | Arrrr: The compiler doesn't know or care if you're doing unit testing |
16:12:17 | Arrrr | So, doAssert always works |
16:12:19 | flaviu | either your unit testing framework requires a switch, or you've explicltly specified a switch |
16:14:01 | Arrrr | I see. Thank you dom96 and flaviu |
16:18:48 | Araq | OnO: it was Unix which departed from the rest of the world. The world used CR+LF, Unix made it LF only. Get your facts right. |
16:19:46 | Araq | HOLYCOWBATMAN: but I don't have a problem with CRs to begin with. |
16:19:55 | HOLYCOWBATMAN | Araq: "core.autocrlf=false" and all your problems will be fixed |
16:20:00 | HOLYCOWBATMAN | git wont touch anything |
16:20:12 | HOLYCOWBATMAN | what you commit is what you will get out, and everyone else will too |
16:20:20 | Araq | my problems are purely social, not technical nature. |
16:20:25 | HOLYCOWBATMAN | o |
16:21:50 | HOLYCOWBATMAN | as long as everyone commits only LF or CR+LF consistantly theres no problem, mixing the 2 is a problem |
16:25:13 | OnO | Araq: http://en.wikipedia.org/wiki/Newline UNIX exists since 1969, where MSDOS 1981 and CP/M 1974 |
16:25:15 | HOLYCOWBATMAN | tbh its a good idea to enforce space only, i would do the same for LF or CR+LF |
16:25:33 | OnO | so what is "rest of the world" I don't get it? |
16:26:00 | Araq | def-: but your argument amounts to "fixing trailing whitespace and cr-lf issues everywhere" instead of fixing some Unix based software... |
16:27:26 | flaviu | Araq: Feel free to send a PR to all these software projects |
16:27:33 | flaviu | I mean, they're open source! |
16:27:43 | Araq | that we're even arguing about this bullshit is surreal |
16:28:25 | OnO | this is not really important, the only problem is that the damn line endings are non-uniform, and mixed bag |
16:28:53 | OnO | I don't care if you want LF CRLF or CR as long as you use single line end terminator across whole file |
16:29:00 | * | gsingh93 joined #nim |
16:29:07 | reactormonk | Araq, yeah, unix saved one byte per line. Your move :-P |
16:29:36 | HOLYCOWBATMAN | but http standard is CF+LF |
16:29:40 | Araq | "hey darling, today I made lots of progress. I made my projects clean. I removed trailing whitespace." - "Are you drunk?" |
16:29:42 | HOLYCOWBATMAN | CR+LF* |
16:30:47 | reactormonk | Araq, we could do that with some next release and break ALL the PRs |
16:31:42 | Araq | flaviu: why would I? it's OnO who has problems with his software. |
16:31:55 | OnO | heh... okay I feel sorry for raising that, nevermind, I just hate trailing sh... that make changes show when there were none |
16:32:06 | * | pregressive quit (Remote host closed the connection) |
16:32:39 | * | pregressive joined #nim |
16:32:49 | HOLYCOWBATMAN | there was a change |
16:32:56 | HOLYCOWBATMAN | changing line ending |
16:33:12 | HOLYCOWBATMAN | same as tab->space |
16:34:08 | HOLYCOWBATMAN | i dont have a problem with either, since i show line endings + space /tabs in my editor |
16:34:25 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:36:21 | OnO | Araq: if you feel this kind of diff is OK, then there is no sense to continue this discussion: https://www.dropbox.com/s/4yonkiwxstdujfi/Zrzut%20ekranu%202015-06-05%20o%2018.32.59.png?dl=1 |
16:36:43 | OnO | https://photos-3.dropbox.com/t/2/AACjdJ95zVoV8sVLIX-o5bp6kbZSC535YLsPxiutr1lKGA/12/64748870/png/32x32/1/_/1/2/Zrzut%20ekranu%202015-06-05%20o%2018.32.59.png/CMb67x4gASACIAMgBCAFIAYgBygBKAI/eDlLluoHe_6xQlESxXNc34LpzXOqW0y_bN7IlJl8Fn4?size=1280x960&size_mode=2 |
16:37:01 | * | OnO cannot paste images on IRC |
16:37:19 | * | pregressive quit (Ping timeout: 255 seconds) |
16:38:16 | Araq | OnO: I feel like you're the only guy left who sees diffs like that. |
16:38:42 | Araq | I never see a diff like that. Not on Linux, not on Windows. |
16:41:30 | Araq | OnO: but ok. let's make a deal. |
16:41:33 | * | sepisoad__ joined #nim |
16:41:48 | Araq | you create a PR that fixes all these things, I will apply it asap. |
16:41:59 | Araq | and you promise me to never bring up this topic again. |
16:42:11 | OnO | git show 263cabd1c27977aa32c849ffb334984e8d476b97 |
16:42:42 | Araq | OnO: deal? |
16:43:57 | HOLYCOWBATMAN | ono, whats the problem? its a new file |
16:44:35 | * | sepisoad_ quit (Ping timeout: 250 seconds) |
16:45:33 | OnO | I have no problem with that, really, I am just saying Git marks all inconsistent line endings and trailing whitespace, it does not bother me, I was just asking if we are going to address that |
16:45:41 | OnO | didn't want to make flame war, etc. etc. |
16:47:02 | HOLYCOWBATMAN | OnO, just keep them the same as before and you wont see any changes |
16:47:36 | HOLYCOWBATMAN | the commit you just pasted is a new file... so theres nothing to diff? |
16:48:19 | Araq | HOLYCOWBATMAN: let it be please. it's not important, we can discuss interesting things instead. |
16:48:34 | OnO | okay... so look at c40249cd43972079d92b513c8d1f0eb24220da6d |
16:49:01 | OnO | https://github.com/Araq/Nim/commit/c40249cd43972079d92b513c8d1f0eb24220da6d |
16:49:04 | HOLYCOWBATMAN | i dont see any change |
16:49:17 | HOLYCOWBATMAN | o wait |
16:49:20 | HOLYCOWBATMAN | i was only on first file |
16:49:33 | OnO | look at the commit above file compiler/canonicalizer.nim |
16:49:53 | OnO | only 2 lines actually changes, rest is change in trailing whitespace |
16:50:28 | HOLYCOWBATMAN | yes, thats not a good commit |
16:50:34 | HOLYCOWBATMAN | but thats the commiter fault |
16:50:47 | OnO | of course |
16:51:13 | OnO | for some reason he touched whitespace :) |
16:51:39 | dom96 | All I see is trailing whitespace changes |
16:51:48 | dom96 | are there line ending changes too? |
16:51:58 | OnO | not in this commit |
16:52:28 | OnO | but in the first one I show that there are line with inconsistent line endings |
16:52:42 | dom96 | link? |
16:52:48 | OnO | 263cabd1c27977aa32c849ffb334984e8d476b97 |
16:54:11 | OnO | there are many devs and some editors trim trailing whitespace or autocorrent inconsistent endings |
16:54:33 | HOLYCOWBATMAN | just diff before commiting, and revert those changes, or fix your editor :D |
16:54:36 | dom96 | git corrects it on Windows. |
16:55:35 | dom96 | afaik |
16:55:47 | HOLYCOWBATMAN | git has a autocrlf config |
16:56:13 | HOLYCOWBATMAN | if its enabled it auto change from lf to crlf on checkout |
16:56:16 | HOLYCOWBATMAN | and same on commit |
16:56:20 | HOLYCOWBATMAN | invert* |
16:56:20 | OnO | yes it does, but for some reason it was disabled for some commits |
16:57:30 | OnO | okay whatever, my wish is now to see commits with real changes stashed in numerous whitespace changes |
16:58:19 | HOLYCOWBATMAN | dont accept the pr if they have useless whitespace change |
16:58:29 | HOLYCOWBATMAN | make them fix it thats simple |
16:58:41 | OnO | yeah |
16:58:52 | dom96 | this doesn't show up on github though, does it? |
16:58:57 | HOLYCOWBATMAN | yes it does |
16:59:02 | OnO | unfortunatelly |
16:59:08 | HOLYCOWBATMAN | fortunatelly imo |
16:59:10 | HOLYCOWBATMAN | its a change |
16:59:52 | HOLYCOWBATMAN | can you imagine if tab -> space changes were shown? it would be completly crazy |
17:00:01 | HOLYCOWBATMAN | werent* |
17:00:34 | OnO | I can imagine it would be cool if Nim throw error on trailing whitespace :> |
17:00:45 | OnO | same as if it does on leading whitespace error |
17:02:03 | dom96 | I don't see anything out of the ordinary in the commit OnO linked |
17:03:13 | OnO | http://programmers.stackexchange.com/questions/121555/why-is-trailing-whitespace-a-big-deal |
17:03:53 | OnO | https://github.com/Araq/Nim/commit/c40249cd43972079d92b513c8d1f0eb24220da6d#diff-1b210aac2ef5782dc1a06a1dde44977f |
17:04:14 | OnO | ^-- take a look again, there are whitespace changes that don't change code at all there |
17:04:32 | OnO | now if I run git blame I got blame for commit that changed whitespace |
17:04:33 | dom96 | that looks like trailing whitespace to me |
17:06:39 | HOLYCOWBATMAN | you could probably write a git hook to auto reject those kind of changes |
17:06:48 | OnO | but then you are least see some indication of change, if you change line ending you will see none |
17:07:01 | OnO | like line changed into exactly the same line |
17:07:11 | OnO | this is really confusing |
17:09:59 | dom96 | yeah, that's what I mean. How are we meant to detect PRs which do that? |
17:11:21 | OnO | usually needs one or more iterations of git blame |
17:14:32 | OnO | dom96: another one 2d9a24f3f6af0f978a95bc833ccc76ca47054b3c |
17:15:00 | OnO | unfortunately it is yours, but I don't think it is your fault, your editor just cut all whitespace on files you modified |
17:16:14 | HOLYCOWBATMAN | not enough diffing before commiting :P |
17:21:32 | reactormonk | https://stackoverflow.com/questions/30671669/define-generic-function-type sounds like a bug? |
17:22:03 | dom96 | OnO: I'm confused. Are you saying that I removed trailing whitespace or changed the line endings? |
17:22:43 | dom96 | Removing trailing whitespace is fine. |
17:22:56 | dom96 | The repo is full of it and we need to remove it slowly. |
17:23:20 | pigmej | dom96: it would be damn easy to remove them automaticaly, isn't it? |
17:23:33 | dom96 | pigmej: It would be, but we don't want to do that. |
17:23:36 | dom96 | It will break all PRs |
17:23:43 | pigmej | reactormonk: hey, I will start hack around company today |
17:23:52 | reactormonk | pigmej, perfect. |
17:24:04 | reactormonk | pigmej, currently making some money :-) |
17:24:09 | pigmej | reactormonk: though I have no idea what I will be able to do :) let's check :) |
17:24:17 | pigmej | reactormonk: yeah, so did I :P |
17:24:41 | OnO | dom96: anything that alters the code just on whitespace basis in not fine |
17:24:45 | pigmej | but it's freaking hot today in PL |
17:24:52 | OnO | CRs are whitespace too in LF file |
17:25:18 | HOLYCOWBATMAN | tbh we could do it automatically, with automatic filtering on PRs |
17:25:24 | OnO | so the only sensible solution is stricly avoid commiting trailing whitespace to the repo |
17:25:36 | HOLYCOWBATMAN | it would be doable, might not be worth the effort |
17:25:46 | OnO | that was my point from the beginning |
17:26:05 | OnO | asking if Nim is going to address that |
17:26:21 | OnO | and NO is accepted answer too :) |
17:26:33 | Araq | so let me get this straight ... git and thus github made a strange decision ... to show whitespace ... and because of that "trailing whitespace is evil" and we MUST teach every upcoming programmer to be concerned about this nonsense for good? |
17:26:36 | dom96 | OnO: How do you know I am removing CRs and not just 0x20 ' ' ? |
17:26:41 | OnO | but then we need to live with all noise in diffs |
17:26:51 | * | kumul joined #nim |
17:27:22 | OnO | dom96: frankly I don't :) |
17:27:35 | Araq | so instead of fixing git, we blame everybody else instead. For good. |
17:27:39 | notfowl | You can add a param to hide whitespace changes |
17:27:52 | dom96 | OnO: ahh. Ok. It sounded like you did. |
17:27:58 | Araq | yeah, that sounds like a reasonable approach to software development in general. |
17:28:25 | OnO | not blaming anyone... just saying that whitespace causes noise in diffs |
17:28:38 | dom96 | OT: Sometimes I really wish we could see Linus and Araq argue, wouldn't that be entertaining? |
17:28:51 | OnO | and the reasonable solution is to make sure only commits that don't bring any trailing whitespace gets commited |
17:28:55 | OnO | that's it |
17:29:09 | profan | dom96: the shitstorm could power nations for decades |
17:29:21 | profan | (i mean that in the nicest possible way) :D |
17:29:27 | dom96 | profan: hah |
17:29:45 | OnO | and then we could use git blame, to blame ppl for real problems :) |
17:29:53 | dom96 | OnO: If noise is what concerns you then append ?w=1 to the github url. |
17:30:32 | * | cyraxjoe_ joined #nim |
17:30:57 | * | cyraxjoe quit (Ping timeout: 250 seconds) |
17:31:11 | OnO | dom96: this doesn't fix "git blame" |
17:31:59 | dom96 | OnO: In that case I agree with Araq |
17:32:05 | dom96 | It's git that needs to be fixed not the world. |
17:32:53 | OnO | haha... yeah, I do agree too |
17:33:04 | * | xtagon joined #nim |
17:33:43 | * | yglukhov________ joined #nim |
17:36:11 | OnO | Git is however "stupid" so it doesn't now much about your file and does not really make assumptions |
17:36:42 | OnO | eg. Markdown is trailing space sensitive, 3 and more trailing spaces mean hard line break |
17:37:41 | Araq | omg. tell me you are making this up. |
17:37:51 | Araq | trailing space sensitive?! |
17:38:45 | OnO | nope, this is not a joke http://daringfireball.net/projects/markdown/syntax "When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return." |
17:40:35 | Araq | markdown needs to be fixed. asap. |
17:40:39 | dom96 | Fuck it. Let's just rewrite Nim using Whitespace. |
17:40:42 | notfowl | It's still not tex |
17:40:54 | dom96 | Then people will care about it! |
17:41:03 | pigmej | dom96: too late, https://en.wikipedia.org/wiki/Whitespace_%28programming_language%29 |
17:41:20 | OnO | hahaha |
17:41:27 | notfowl | That's Wikipedia-notable |
17:41:49 | OnO | let's make hidden pragma that triggers on 2 or more trailing whitespaces :) |
17:41:53 | pigmej | notfowl: that's sad that such 'joke' is on wiki, while Nim has still troubles ;/ |
17:41:56 | dom96 | pigmej: That's precisely what I want us to rewrite the compiler in ;) |
17:42:06 | OnO | that will turn all additions into subtractions |
17:42:20 | pigmej | ah, I thought you wanted to write new lang ;D |
17:43:40 | * | vikaton quit (Quit: Connection closed for inactivity) |
17:45:31 | notfowl | Their references are Usenet postings and a blog |
17:45:32 | OnO | okay, changing subject, is nimble going to be part of Nim itself anytime soon? |
17:46:15 | notfowl | Nvm that's not even Usenet its the languages homepage |
17:46:25 | BlaXpirit | about 1000 times more people know about Whitespace programming language than Nim |
17:46:58 | notfowl | BlaXpirit: then why aren't they writing academic papers about it? |
17:47:31 | dom96 | OnO: Define "be part of Nim" |
17:47:31 | BlaXpirit | notfowl, maybe they are |
17:48:11 | OnO | dom96: I download nim sources, I run ./bootstrap.sh then ./install.sh I get /usr/local/nim/bin/nimble |
17:48:41 | OnO | dom96: I got to Nim docs I got nimble manual |
17:48:56 | dom96 | OnO: There should be a separate script which does everything for you. |
17:49:00 | dom96 | get-nim.sh |
17:49:08 | dom96 | I think Varriount wrote something close. |
17:49:24 | Arrrr | Most have listened to pop music but never to classical. |
17:49:33 | BlaXpirit | this is actually a bad thing -_- |
17:52:22 | * | brson joined #nim |
17:52:35 | * | onionhammer quit (Read error: Connection reset by peer) |
17:53:06 | * | onionhammer joined #nim |
17:55:00 | * | BitPuffin joined #nim |
18:01:48 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:15:51 | * | sepisoad__ quit (Ping timeout: 264 seconds) |
18:27:15 | * | Trustable joined #nim |
18:27:56 | * | banister joined #nim |
18:29:49 | * | onionhammer quit (Ping timeout: 264 seconds) |
18:32:56 | * | onionhammer joined #nim |
18:34:46 | * | fioco joined #nim |
18:43:35 | fioco | How can I set a proc to return a set [string] |
18:43:40 | fioco | ? |
18:46:11 | BlaXpirit | fioco, there is no such thing |
18:46:13 | Araq | fioco: import tables; proc foo(): HashSet[string] |
18:46:23 | BlaXpirit | yeah, use that instead.. |
18:46:36 | BlaXpirit | the "normal" set is only for ordinals |
18:46:37 | * | wan quit (Ping timeout: 264 seconds) |
18:47:26 | fioco | Thanks Araq |
18:49:40 | * | zero_coder quit (Quit: EliteBNC - http://www.elitebnc.net/) |
18:54:06 | * | pmbauer quit (Remote host closed the connection) |
18:54:07 | * | NhanH quit (Remote host closed the connection) |
18:54:07 | * | n1ftyn8 quit (Remote host closed the connection) |
18:54:07 | * | CARAM__ quit (Remote host closed the connection) |
18:54:08 | * | endou_________ quit (Remote host closed the connection) |
18:57:50 | * | zero_coder joined #nim |
18:59:15 | * | wan joined #nim |
18:59:54 | * | pregressive joined #nim |
19:00:55 | * | TEttinger joined #nim |
19:07:58 | * | sepisoad__ joined #nim |
19:13:54 | * | fioco left #nim ("See") |
19:14:53 | * | vikaton joined #nim |
19:16:43 | * | bulbasaur is now known as dtscode |
19:25:47 | * | xtagon quit (Read error: Connection reset by peer) |
19:28:15 | dtscode | <Arrrr> Most have listened to pop music but never to classical. |
19:28:19 | dtscode | Opposite here |
19:29:03 | Arrrr | that's cool, puccini |
19:30:05 | flaviu | also a little off-topic |
19:31:04 | dtscode | Yeah but we are discussing nim in the offtopic channel so idk what to do |
19:31:12 | dtscode | err nim adjacent things |
19:31:57 | Arrrr | we actually were discussing that whitespace lang was known among more people than nim |
19:32:15 | * | xet7 joined #nim |
19:41:16 | * | pregressive quit (Remote host closed the connection) |
19:47:02 | * | Mat4 joined #nim |
19:47:13 | * | kumul quit (Ping timeout: 255 seconds) |
19:55:58 | vikaton | Nim is whitespace ?! |
20:01:35 | pigmej | reactormonk: hmm, I think we have a problem |
20:01:41 | reactormonk | pigmej, go on |
20:02:05 | pigmej | nimsuggest is too slow for company |
20:02:52 | * | biscarch quit (Remote host closed the connection) |
20:02:54 | * | vikaton quit (Remote host closed the connection) |
20:02:54 | * | clone1018 quit (Write error: Broken pipe) |
20:02:54 | * | AckZ quit (Remote host closed the connection) |
20:03:03 | reactormonk | pigmej, really? It was rather quick |
20:03:08 | Mat4 | sorry, what does this mean: Nim is ' ' ? |
20:03:27 | pigmej | reactormonk: yeah but probably still too slow, at least that's what company says |
20:03:41 | reactormonk | pigmej, huh? |
20:03:43 | pigmej | Company: Back-end company-nim async timeout with args (candidates ) |
20:03:58 | reactormonk | try sync, maybe it's an async problem |
20:04:06 | pigmej | with sync whole emacs freezes;D |
20:04:46 | pigmej | maybe it's false message or something. |
20:05:05 | reactormonk | entirely possible. |
20:06:48 | reactormonk | You could add an echo to nimsuggest |
20:06:56 | pigmej | the good thing is |
20:07:02 | pigmej | that it responds with correct data ;-) |
20:07:18 | pigmej | and I see completions in messages :) |
20:07:37 | pigmej | but the major problem is I really *hate* elisp;P |
20:11:32 | reactormonk | You'll come to understand it after a while... like a retarded cousin. |
20:12:09 | pigmej | for now my brain refuses it ;-) |
20:12:24 | Araq | reactormonk: now now now ... shhhhtttt. Cousins could be offended |
20:12:30 | * | Senketsu joined #nim |
20:12:51 | pigmej | rotfl;D |
20:13:55 | reactormonk | Araq, pretty sure one's gonna come after me in 23 years after he read the IRC log |
20:15:25 | pigmej | reactormonk: irc log in next 23 years ? |
20:15:35 | pigmej | I don't think so .. |
20:20:42 | pigmej | Araq: where is the doc of nimsuggest ? |
20:20:46 | pigmej | (the return values) |
20:22:35 | Araq | hrm? it returns 1 on failure and 0 on success. |
20:25:43 | pigmej | Araq: I meant response then :) |
20:26:49 | pigmej | ("sug" "skTemplate" ("testability" "tests") "Nim/compiler/testability.nim" "proc (body: stmt): stmt" 1 9 "") |
20:27:11 | * | BitPuffin quit (Ping timeout: 276 seconds) |
20:27:23 | OnO | Araq: would it be feasible to map all messages generated by compiler to err, warns & hints, and then make single map which of these are enabled on which verbose level? |
20:27:54 | OnO | then we could first take into consideration verbose level then let the dev fiddle with :on :off for individual messages |
20:28:10 | pigmej | sug => ok, skTemplate => ok, (? ?), file, locations |
20:29:26 | OnO | eg. I could turn on printing surrounding code, but turn off printing GC stats |
20:29:43 | OnO | currently impossible |
20:31:28 | OnO | on other hand doing verbosity:0 with hintPath:on has no effect, reason that verbosity check if hardcoded |
20:32:15 | Araq | dunno, just make a --unix:on switch which uses stderr for everything, :line:col syntax, tries to use colors when it's a tty (but beware that this check seems to fail on macosx) and whatever else you think is a good idea. |
20:34:38 | * | kumul joined #nim |
20:36:09 | pigmej | reactormonk: any ideas what is definition of callback in company ? |
20:36:30 | reactormonk | pigmej, not really. Currently tinkering with org-mode |
20:37:01 | * | NhanH joined #nim |
20:37:37 | * | fioco joined #nim |
20:37:53 | * | fioco left #nim (#nim) |
20:38:22 | * | pmbauer joined #nim |
20:38:27 | Araq | yeah and make it less verbose too. In fact, please copy every single bit from clang's / gcc's behaviour. Cause changing and adapting things via scripts seems to be impossible in the land of Unix. |
20:41:14 | * | sepisoad__ quit (Ping timeout: 246 seconds) |
20:42:04 | * | n1ftyn8 joined #nim |
20:43:26 | * | AckZ joined #nim |
20:43:30 | * | endou_________ joined #nim |
20:49:12 | * | CARAM__ joined #nim |
20:52:24 | flaviu | Araq: I realize you're being sarcastic, but a --unix switch would be great! |
20:53:00 | Araq | no, I mean it. make a --unix switch, I don't care. |
20:54:35 | * | biscarch joined #nim |
20:55:52 | * | clone1018 joined #nim |
20:58:01 | Arrrr | we actually were discussing that whitespace lang was known among more people than nim |
20:58:04 | Arrrr | ups |
21:01:51 | Araq | maybe we can avoid to default to the 'a.out' name, but even that ... I just don't care anymore. "Unix system resources"/bin has an executable named "[", "true" and "false" and 6 different scripting languages, but windows sux because it comes with a UI out of the box. Whatever guys. |
21:04:14 | notfowl | I'd be down to have a gobolinux style package manager. We can create nimux :p |
21:05:06 | * | vikaton joined #nim |
21:12:35 | * | Kingsquee joined #nim |
21:18:06 | pigmej | Araq: false/ true are even useful |
21:18:51 | Araq | pigmej: iirc they are built into bash and kept around for compatibility with shells that don't have them builtin. |
21:19:04 | * | BlaXpirit quit (Quit: Quit Konversation) |
21:19:47 | pigmej | thats possible |
21:21:02 | * | doxavore joined #nim |
21:21:06 | Arrrr | Hello, is this a bug? http://pastebin.com/4RQL2GV9 |
21:21:47 | Araq | Arrrr: looks like a bug, yeah |
21:26:24 | Arrrr | Ok, then i suppose my question on so is a bug too. Anyway, good night. |
21:26:26 | * | Arrrr quit (Quit: WeeChat 1.2) |
21:32:42 | * | Siecje joined #nim |
21:32:46 | * | Jesin joined #nim |
21:33:27 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:34:27 | * | Jesin quit (Remote host closed the connection) |
21:34:28 | * | Mat4 left #nim (#nim) |
21:37:15 | * | saml quit (Quit: Leaving) |
21:38:25 | * | JinShil joined #nim |
21:46:04 | * | ozra joined #nim |
21:46:37 | * | ingsoc quit (Ping timeout: 264 seconds) |
21:46:53 | * | vikaton quit () |
21:47:58 | * | zz_gsingh93 joined #nim |
21:49:41 | * | fioco_ joined #nim |
21:51:41 | * | zz_gsingh93 quit (Client Quit) |
21:59:53 | * | vikaton joined #nim |
22:02:32 | * | ingsoc joined #nim |
22:07:00 | Varriount | Hey guys! |
22:07:47 | ozra | Hey Varriount! |
22:11:23 | * | bockmabe joined #nim |
22:15:33 | * | vikaton quit () |
22:15:55 | Araq | hey Varriount |
22:17:41 | * | zz_gsingh93 joined #nim |
22:21:45 | * | vikaton joined #nim |
22:22:44 | * | zz_gsingh93 quit (Quit: ZNC - http://znc.in) |
22:23:41 | * | kumul quit (Ping timeout: 265 seconds) |
22:27:46 | * | brson quit (Quit: leaving) |
22:29:45 | * | milosn quit (Ping timeout: 240 seconds) |
22:30:47 | Varriount | Araq: Any ideas on how the new Windows API wrapper should be structured? |
22:32:07 | * | gsingh93 quit (Quit: WeeChat 1.1.1) |
22:33:08 | dom96 | https://news.ycombinator.com/item?id=9667230 |
22:33:11 | dom96 | that was quick |
22:33:25 | Araq | Varriount: each header file makes a module perhaps? |
22:33:54 | Araq | good night |
22:34:00 | Varriount | Araq: Night. |
22:34:42 | Varriount | dom96: Do I want to read the actual link? |
22:35:16 | dom96 | Varriount: Sure. |
22:35:25 | * | Trustable quit (Remote host closed the connection) |
22:35:30 | dom96 | I don't get why you wouldn't want to read what everybody says about Nim. |
22:36:15 | Varriount | dom96: I take critisism rather personally. I also get irritated at uninformed criticism, and it tend to spoil my mood. |
22:36:53 | dom96 | Varriount: same. |
22:37:18 | dom96 | I still read it though. |
22:37:41 | dom96 | Because I want to improve Nim for the better. |
22:39:33 | Varriount | dom96: Funny thing though - we had someone come in here the other day who had one question (whether Nim had bounds checking) then left. |
22:40:00 | HOLYCOWBATMAN | why nim doesnt start with R and end with ust? |
22:40:12 | HOLYCOWBATMAN | it would be safer |
22:40:20 | Varriount | ;3 |
22:40:38 | buttplug | HOW DAARE U |
22:41:20 | dom96 | Someday someone will implement Rust's ownership model using Nim's macros and then everybody will shut up... oh wait, no they won't. |
22:41:36 | buttplug | I can say something positive about nim; its more intersting than D |
22:44:52 | * | Sembei joined #nim |
22:47:04 | * | vendethiel joined #nim |
22:47:25 | * | fioco_ left #nim ("See") |
22:47:28 | ozra | Rust has one thing I find perticularly interesting (one of those things probably thousands have imagined, or well, used shared/safeptr in C++ for), it's that of 'tying' a certain obj/vars lifespan to another. That's something that could be leveraged in the future, as a helpful thing for optimizing to let the gc clean out things with less checks. The mistake R*st makes, is to make bureaucracy mandatory. You need pi*the regular work force |
22:48:11 | * | doxavore quit (Quit: I said good day, sir.) |
22:48:12 | Varriount | ozra: pi*? |
22:48:24 | * | OnO quit (Ping timeout: 265 seconds) |
22:48:52 | buttplug | pi*the? |
22:49:01 | buttplug | da shit does that mean |
22:49:06 | ozra | pi * the-regular-work-force. three times as many employees to code the same thing, because it's so tedious to shoot yourself in the foot.. |
22:49:20 | ozra | Was a bit hard to read yes, haha |
22:49:29 | strcmp1 | rust seems like another and equally as complicated c++ to me. |
22:49:39 | flaviu | Why pi? I like ρ better :/ |
22:50:23 | buttplug | rust doesn't let u shoot urself, it just won't compile, and currently has slow compilation;0 |
22:50:56 | dom96 | strcmp1: I would say it's more complicated. |
22:51:20 | dom96 | I gave Rust a fair shot, and it just felt like I was fighting it every step of the way. |
22:51:29 | dom96 | Perhaps that feeling subsides after a while. |
22:51:30 | * | gsingh93 joined #nim |
22:51:30 | ozra | Yeah or ∞. But π is kind of standard for business calculations.. Tiem budget = 6 weeks? Then it's π * 6 weeks. (it always takes about three times as long as expected ;-) |
22:51:34 | dom96 | But meh. |
22:52:05 | ozra | buttplug: Well, that's the thing, you'll shot your self in the head before you've gotten a compiling program ;-) |
22:52:12 | strcmp1 | lol |
22:53:47 | strcmp1 | dom96, rust does have great docs though just because they can hire people to work on them full time |
22:53:55 | ozra | I admire the intentions behind it, and some concepts are useful, would the be optional, but all in all it's a language for organizations that don't have to think about the cost of development time. |
22:54:09 | strcmp1 | it kinda balances the complexity a little bit but yeah.. i dont think i will bother with rust. |
22:54:16 | dom96 | strcmp1: Not really. The book doesn't teach you much about ownership. |
22:54:41 | dom96 | For a language with this much money behind it I was expecting a bit more. |
22:55:19 | strcmp1 | hm yeah |
22:56:24 | ozra | dom96: That kind of money can also be a leash of perceived responsibility, they become fear struck of not producing the safest-almightiest-fuckin-thing-ever and 'fail', so that they just make all the wrong decisions out of some fear of not being PPC (programmatically politically correct) [patent pending] |
22:56:41 | * | NimBot joined #nim |
22:58:06 | buttplug | i think rust does most things right, that it can prevent data races is pretty important. I wouldn't use it right now since tooling is pretty shit, and compilation speed makes C++ look fast, but in a year or two, it might be a good C++ replacement/complement |
22:58:56 | ozra | buttplug: God damn. That slow? C++ compile times *kills* me. Glad I've only dabbled around with Rust then. |
22:59:23 | HOLYCOWBATMAN | lol oreilly, that 70s radio show |
22:59:32 | HOLYCOWBATMAN | in flash |
22:59:39 | HOLYCOWBATMAN | with 20 registrations |
22:59:42 | buttplug | ozra: they don't have incremental compilation yet, without that-- well shit is bad |
23:00:17 | * | letian joined #nim |
23:00:52 | letian | hi guys |
23:01:01 | letian | I have a question |
23:01:14 | ozra | buttplug: Nim is so fucking fast - I love it. Even while re-compiling everything from scratch. Huge bonus imo. If no-one else makes a complete incremental nim daemon I'll consider taking that on sometime in the not to distant future. Zaaap!! |
23:01:33 | letian | Is there an analogue to python map() function? Is it also named map? |
23:01:42 | HOLYCOWBATMAN | yes nim is fast, recompiling the whole compiler is like not even 30s |
23:01:42 | ozra | You got it. |
23:01:50 | HOLYCOWBATMAN | letian, sequtil |
23:01:57 | HOLYCOWBATMAN | sequtils* |
23:02:10 | letian | So, I want to apply a proc to every value in array, is is possible to do like map(myfun, array)? |
23:02:57 | ozra | letian: you might be interested in the 'future' module also, for shorthand lambdanotation: `(a: int) => a * a`... |
23:03:53 | ozra | letian: Oh and, http://nim-lang.org/docs/theindex.html and ctrl+f is a great help :-) |
23:04:07 | letian | aha, thanks. But can I use arrays as int container or should I use seq? |
23:05:02 | ozra | letian: seq, array, openarray etc. whichever you prefer, *I think*, let's see if one of the vetarans have an answer :) |
23:06:28 | gokr | Arrays are fixed length |
23:06:32 | HOLYCOWBATMAN | array = fixed compile time known size, seq = dynamic |
23:06:38 | gokr | Exact |
23:06:52 | gokr | And openarray is only a type you use for parameters of a proc/method. |
23:07:10 | gokr | It can't be used anywhere else - and it makes the proc/method accept either an array or a seq. |
23:07:24 | HOLYCOWBATMAN | openarray[T] will accept string too i think |
23:07:39 | * | bakeymemnet joined #nim |
23:07:45 | gokr | ehh |
23:07:46 | HOLYCOWBATMAN | im not sure if its been done, but there was talk about it |
23:08:06 | ozra | HOLYCOWBATMAN: If that PR is accepted already. It's in the queue anyway... |
23:08:15 | ozra | (str for openarray) |
23:09:14 | letian | so if I am to use an array in proc, I should use openarray, is that correct? Why can't I just use straight array? |
23:09:44 | gokr | If you use array for the param type - then you can't send in a seq. |
23:09:50 | gokr | If that's what you want, fine. |
23:09:57 | gokr | gnite |
23:10:10 | * | gokr quit (Quit: Leaving.) |
23:10:23 | letian | no, I understand that seq is dynamic, my array should be fixed. |
23:10:45 | HOLYCOWBATMAN | then you can use array in param if you dont want to accept seq |
23:10:54 | HOLYCOWBATMAN | openarray is just more general |
23:11:17 | letian | I see, thanks |
23:11:54 | ozra | letian: as said above, if you implement a more general function for functional coding, using openarray lets the user use it on arrays, sequences and strings - more generic. If you have a specific use case, stick with array or whatever.. |
23:12:21 | ozra | sorry. kind of repeated HOLYCOWBATMAN haha |
23:12:28 | * | gsingh93 quit (Quit: ZNC - http://znc.in) |
23:12:29 | HOLYCOWBATMAN | =) |
23:13:08 | * | gsingh93 joined #nim |
23:13:20 | HOLYCOWBATMAN | shame on you tab users! |
23:13:36 | HOLYCOWBATMAN | sinners! |
23:18:14 | * | yglukhov________ quit (Quit: Be back later ...) |
23:19:45 | * | jefus quit (Ping timeout: 240 seconds) |
23:19:47 | * | gsingh93 quit (Quit: ZNC - http://znc.in) |
23:20:21 | * | gsingh93 joined #nim |
23:21:39 | * | fioco_ joined #nim |
23:21:39 | * | fioco joined #nim |
23:21:53 | * | fioco_ quit (Client Quit) |
23:22:09 | Varriount | Too bad we don't have an openarray equivalent to maps. |
23:22:18 | * | fioco left #nim (#nim) |
23:22:42 | * | fioco_ joined #nim |
23:22:49 | * | fioco_ left #nim (#nim) |
23:27:29 | * | jefus joined #nim |
23:29:45 | pigmej | reactormonk: ping |
23:29:47 | Varriount | Araq: Is the `size` pragma for enums meant to be undocumented? |
23:29:55 | reactormonk | pigmej, pong |
23:29:55 | * | gsingh93 quit (Quit: ZNC - http://znc.in) |
23:30:07 | pigmej | reactormonk: something strange is going on with nimsuggest I suppose |
23:30:15 | reactormonk | pigmej, hm. |
23:30:38 | pigmej | http://wklej.to/0Rd4r/text |
23:31:02 | * | jbomo joined #nim |
23:31:06 | pigmej | position your cursor like discard getL<cursor_there> |
23:31:28 | pigmej | and nimsuggest somehow manages to return blah and blah2... |
23:31:34 | pigmej | but not getLocalTime etc |
23:31:36 | * | gsingh93 joined #nim |
23:32:08 | * | kumul joined #nim |
23:32:48 | reactormonk | pigmej, same result with stdin? |
23:33:39 | reactormonk | yup, same |
23:33:52 | pigmej | yeah same |
23:33:54 | pigmej | same in aporia |
23:35:22 | * | fioco joined #nim |
23:35:28 | reactormonk | sounds like a suggest.nim problem |
23:36:03 | fioco | How do I compare/convert a Future [string] with/to a strong |
23:36:07 | fioco | *string |
23:36:12 | pigmej | reactormonk: no idea at all tbh |
23:36:32 | reactormonk | pigmej, hm. does company work? |
23:36:35 | pigmej | yup |
23:36:39 | reactormonk | neat |
23:36:55 | reactormonk | for the suggest.nim part, what exactly do you expect as answer? nothing? |
23:37:08 | pigmej | that's a good question |
23:37:21 | pigmej | I would expect though getLocalTime |
23:37:48 | pigmej | which is from times module |
23:38:23 | * | fioco is now known as toad1359 |
23:38:56 | pigmej | but I would for sure not expect there 'blah' |
23:39:02 | * | toad1359 is now known as fioco |
23:39:15 | pigmej | but this one is easy fixable on emacs side if so |
23:39:51 | reactormonk | I assume it's an edge case because getL doesn't have a type yet |
23:39:55 | letian | emm, is it possible to declare and fill a seq? for example, var myseq = @[1..100]? |
23:40:43 | pigmej | I can reproduce it with pretty anything |
23:41:07 | letian | I can fill it with a loop, but is there a more terse way |
23:41:27 | pigmej | reactormonk: http://wklej.to/ueXHq/text same situation `echo a.vo<cursor_there>` |
23:41:46 | reactormonk | pigmej, a doesn't have a type |
23:42:19 | pigmej | yeah I know |
23:42:56 | pigmej | rotfl |
23:43:12 | pigmej | http://wklej.to/RUCEA/text |
23:43:23 | pigmej | one line before last |
23:43:39 | pigmej | nimsuggest returns age + name |
23:43:58 | pigmej | so that would still match your suggestion |
23:44:10 | pigmej | but, why vocalize is not present |
23:49:52 | * | bakeymemnet left #nim (#nim) |
23:50:33 | Varriount | letian: import sequtils; echo toSeq(1..100) |
23:54:02 | Varriount | pigmej: Bug? |
23:55:00 | pigmej | depends what are you asking about |
23:55:10 | pigmej | ;D |
23:55:16 | * | askatasuna joined #nim |
23:55:50 | letian | thanks! |
23:56:50 | * | NimBot joined #nim |
23:58:12 | * | gokr joined #nim |
23:58:24 | * | gokr quit (Remote host closed the connection) |
23:58:54 | letian | I am experiencing strange behavior of my script. I wrote a simple script that calculates the smallest common divisible. for example 2520 can be divided by 1-10 numbers without remainder |
23:59:08 | fioco | I'll ask again... |
23:59:09 | letian | If I increase the number from 1-20 my code runs much longer |
23:59:25 | fioco | How do I compare/convert a Future [string] with/to a string? Not spam, just curious. |
23:59:32 | fioco | Been a while since I first asked |
23:59:39 | letian | uncharacteristically longer |