00:02:57 | shashlick | It runs and doesn't crash now? That's a start |
00:03:19 | shashlick | Opening Nim recursively will open too many files but worth a try |
00:04:00 | shashlick | Try open -r c:\nim\*.nim |
00:04:20 | shashlick | -r does nothing for directories since you'd open every single file |
00:04:44 | shashlick | Recursive works for file name and wildcards |
00:04:55 | shashlick | It will search recursively and find a match |
00:06:07 | shashlick | Araq: I'll try again but using loadLib I wasn't able to get a stack trace even with those flags |
00:06:14 | * | dddddd quit (Ping timeout: 246 seconds) |
00:06:31 | FromGitter | <gogolxdong> got it, will try, is there plan to add jump to definition? |
00:09:03 | FromGitter | <gogolxdong> BTW,I pulled scintilla and nng manually. |
00:11:14 | * | dddddd joined #nim |
00:13:54 | shashlick | Did the posted build work? |
00:14:07 | shashlick | Plan is to add nimlsp and all sorts of things |
00:14:25 | shashlick | Sky is the limit since Nim makes it so easy |
00:14:42 | shashlick | There isn't even find yet |
00:17:39 | * | noeontheend quit (Ping timeout: 252 seconds) |
00:24:15 | * | kapil____ quit (Quit: Connection closed for inactivity) |
00:24:24 | FromGitter | <gogolxdong> yes,it's rolling with highlight. |
00:37:48 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
00:38:55 | * | rnrwashere joined #nim |
01:04:38 | * | rnrwashere quit (Remote host closed the connection) |
01:05:59 | * | rnrwashere joined #nim |
01:06:34 | * | sz0 quit (Quit: Connection closed for inactivity) |
01:14:59 | shashlick | @gogolxdong: any other basic feedback? |
01:16:16 | * | smitop quit (Quit: Connection closed for inactivity) |
01:20:00 | * | neceve quit (Remote host closed the connection) |
01:26:08 | * | rnrwashere quit (Remote host closed the connection) |
01:28:25 | * | rnrwashere joined #nim |
01:29:06 | * | noeontheend joined #nim |
01:36:47 | * | rnrwashere quit (Remote host closed the connection) |
01:37:22 | * | rnrwashere joined #nim |
01:53:03 | * | Jesin quit (Quit: Leaving) |
01:56:22 | * | rnrwashere quit (Remote host closed the connection) |
01:58:31 | * | Jesin joined #nim |
02:17:06 | * | cgfuh quit (Quit: WeeChat 2.3) |
02:27:03 | * | dddddd quit (Remote host closed the connection) |
02:48:28 | * | chimez joined #nim |
03:02:41 | * | banc quit (Quit: Bye) |
03:04:18 | * | noeontheend quit (Ping timeout: 252 seconds) |
03:09:38 | * | chimez quit (Quit: chimez) |
03:15:45 | * | chimez joined #nim |
03:23:46 | * | banc joined #nim |
03:53:35 | FromGitter | <gogolxdong> hotkey works |
04:02:08 | * | noeontheend joined #nim |
04:08:44 | * | rnrwashere joined #nim |
04:26:47 | * | chemist69 quit (Ping timeout: 240 seconds) |
04:28:55 | * | chemist69 joined #nim |
04:38:54 | * | noeontheend quit (Ping timeout: 252 seconds) |
05:02:58 | * | chimez quit (Quit: chimez) |
05:30:52 | * | rnrwashere quit (Remote host closed the connection) |
05:45:31 | * | narimiran joined #nim |
05:50:43 | * | chimez joined #nim |
06:06:30 | * | rnrwashere joined #nim |
06:10:30 | FromGitter | <gogolxdong> open -r c:/Nim/*.nim works |
06:10:45 | * | rnrwashere quit (Ping timeout: 252 seconds) |
06:15:00 | FromGitter | <gogolxdong> after opening C:/Nim/*.nim and closing two .yml files, it stuck. |
06:30:03 | * | Jesin quit (Ping timeout: 252 seconds) |
06:37:01 | * | Jesin joined #nim |
06:45:35 | * | Yardanico quit (Quit: No Ping reply in 180 seconds.) |
06:46:54 | * | Yardanico joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:33 | * | gmpreussner joined #nim |
07:05:14 | * | jjido joined #nim |
07:05:37 | * | ftsf quit (Read error: Connection reset by peer) |
07:06:11 | FromGitter | <gogolxdong> Can I peek data from a stream? |
07:07:45 | FromGitter | <gogolxdong> Nim/lib/system/io.nim(119) raiseEIO ⏎ Error: unhandled exception: cannot retrieve file position [IOError] |
07:08:00 | * | CcxWrk quit (Remote host closed the connection) |
07:08:54 | * | jjido quit (Client Quit) |
07:10:07 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c88accfd1e7281f091e71da] |
07:11:14 | FromGitter | <gogolxdong> trying to catch the first line of ping command in websocket. |
07:11:31 | * | sealmove joined #nim |
07:13:08 | * | jjido joined #nim |
07:14:38 | FromGitter | <gogolxdong> host which cannot ping returns the whole response after a while. |
07:21:31 | * | PMunch joined #nim |
07:24:40 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:32:44 | Araq | you cannot "peek" this stream |
07:36:34 | * | CcxWrk joined #nim |
07:41:09 | * | Vladar joined #nim |
07:53:55 | * | jjido joined #nim |
08:41:51 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:56:24 | * | neceve joined #nim |
09:01:54 | * | nsf joined #nim |
09:03:15 | * | sealmove quit (Quit: WeeChat 2.4) |
09:04:22 | * | floppydh joined #nim |
09:07:04 | * | abm joined #nim |
09:29:37 | FromGitter | <alehander42> Zetashift pls open issue |
10:14:06 | * | ng0 joined #nim |
10:17:07 | * | stefanos82 joined #nim |
10:18:32 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
10:26:34 | * | floppydh quit (Ping timeout: 246 seconds) |
10:28:59 | * | floppydh joined #nim |
10:33:15 | * | sealmove joined #nim |
10:34:45 | sealmove | Uhh, after trying to make a nim shell, I appreciated bash. Not really useful to merge context-sensitive syntax in a language like Nim... |
10:43:40 | Araq | https://github.com/ocornut/imgui this has grown quite a bit, nice to see immediate mode UIs taking off |
10:43:55 | Araq | sealmove: "context sensitive syntax"? |
10:44:52 | * | floppydh quit (Ping timeout: 255 seconds) |
10:44:57 | sealmove | ohh imgui looks nice |
10:45:53 | sealmove | @Araq: bash and other shell-languages use context-sensitive grammars, while languages like Nim, Python, C don't |
10:46:23 | sealmove | for shells it means you don't have to typed "" or () when it can be inferred from context |
10:46:55 | sealmove | xonsh tries to solve this problem, but introduces a new one... modes :D |
10:47:14 | * | floppydh joined #nim |
10:47:43 | Araq | I told you how to solve this weeks ago :P |
10:47:59 | sealmove | in xonsh you have python-mode and subcommand-mode, and you have to constantly keep in mind where you are (just like vim), and there is still some context-sensitive syntax |
10:48:03 | Araq | if it contains '/' it's a path and should be wrapped in "" |
10:48:33 | sealmove | well, I could do some little tricks like that, but it won't get me far... |
10:49:03 | sealmove | after this project I think it's just a bad idea... languages like Nim aren't useful as a shell |
10:49:14 | Araq | you don't want to get "far", you have as few rules as possible so that it remains easy to understand |
10:49:32 | sealmove | hmm |
10:49:48 | sealmove | I think it will still be verbose in most cases, thus unuseful |
10:50:19 | Araq | maybe. Also look at TCL that also tried to solve this problem |
10:51:31 | sealmove | never studied it yet, thanks for the motivation :D |
10:55:16 | sealmove | will also try-out fish. I know the cleverest thing to do is stick to bash, but I find the subject fascinating! |
10:56:42 | * | dddddd joined #nim |
10:58:48 | FromGitter | <gogolxdong> Is there a list of stream which can be peeked? |
11:03:13 | sealmove | Araq: just curious, what is your background with Python? Have you used it extensively in the past? |
11:04:42 | * | Vladar quit (Remote host closed the connection) |
11:11:15 | * | iaudfhds joined #nim |
11:11:31 | iaudfhds | hello |
11:11:50 | * | iaudfhds left #nim (#nim) |
11:12:41 | * | solitudesf quit (Remote host closed the connection) |
11:21:48 | * | solitudesf joined #nim |
11:31:07 | Araq | sealmove: I used Python quite a bit, yes. why do you ask? |
11:32:23 | sealmove | just curious |
11:35:09 | Araq | used matplotlib too, worst lib ever. Mysterious undocumented parameters. in the end I plotted my stuff with SDL and putPixel, took one day. |
11:35:49 | narimiran | ...and that's why everything in nim is well-documented :D :D |
11:36:31 | sealmove | @Araq: I've been there.. |
11:36:55 | Araq | narimiran: at least the parameters are *typed* :P |
11:37:07 | narimiran | true that :) |
11:39:50 | Araq | gogolxdong: instead of peeking, read from it until you arrive at the required data |
11:43:58 | * | solitudesf quit (Remote host closed the connection) |
11:52:16 | * | sealmove quit (Quit: WeeChat 2.4) |
11:53:35 | FromGitter | <gogolxdong> readLine returns the whole response if the peer cannot ping through. |
11:54:20 | * | solitudesf joined #nim |
11:56:23 | Calinou | many modern Python libraries are typed too |
11:56:41 | Calinou | https://github.com/python/mypy + https://github.com/python/typeshed |
11:56:43 | FromGitter | <gogolxdong> the first line is expected to show up. |
11:57:06 | Calinou | interesting, I stumbled upon https://pyre-check.org/ too |
11:57:09 | narimiran | Calinou: many "modern" python stuff is still 2.7 |
11:57:43 | narimiran | expecting them to embrace mypy while they're still on 2.7 - i don't think so |
11:58:04 | Calinou | a lot of projects are Python 3-only by now |
11:58:06 | Calinou | it's not 2013 anymore :) |
11:58:28 | narimiran | i wish it isn't :D |
11:59:11 | narimiran | i'm the most surprised that there are *new* projects starting in 2018/2019 using py2! wtf dudes! |
11:59:39 | shashlick | @gogolxdong I'll try to reproduce, there are some close bugs |
12:03:48 | * | couven92 joined #nim |
12:08:10 | * | esbraff joined #nim |
12:10:22 | * | catgirl quit (Ping timeout: 272 seconds) |
12:11:19 | * | Snircle joined #nim |
12:23:45 | * | rockcavera quit (Remote host closed the connection) |
12:32:30 | * | rockcavera joined #nim |
12:33:42 | * | NimBot joined #nim |
12:46:38 | * | PMunch quit (Remote host closed the connection) |
12:48:10 | * | PMunch joined #nim |
12:57:33 | * | lritter joined #nim |
13:01:07 | * | waleee joined #nim |
13:23:28 | * | xaxisx joined #nim |
13:25:49 | FromGitter | <gogolxdong> How to construct Regex in Karax? |
13:29:38 | Araq | jstrutils uses some regexes under the hood, have a look |
13:39:57 | * | solitudesf quit (Quit: ZNC - https://znc.in) |
13:40:26 | * | solitudesf joined #nim |
13:41:12 | * | cgfuh joined #nim |
13:42:37 | FromGitter | <gogolxdong> proc newRegexp(express: cstring): JsObject {.importcpp:"new RegExp(#)".} ⏎ var reg = newRegexp("""/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/""") |
13:43:40 | FromGitter | <gogolxdong> seems cannot construct as the https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions |
13:45:43 | FromGitter | <gogolxdong> have no idea of constructing a regular expression string literal. |
13:54:41 | * | nsf quit (Quit: WeeChat 2.4) |
13:54:53 | FromGitter | <gogolxdong> or cstring to replace the triple quote, but result is not the same with chrome console output. |
13:55:01 | FromGitter | <gogolxdong> proc test*(reg:JsObject, value:cstring):bool{.importcpp:"#.test(#)".} ⏎ proc match*(value:cstring, reg:JsObject):cstring{.importcpp:"#.match(#)".} |
14:02:27 | * | esbraff quit () |
14:03:35 | FromGitter | <mratsim> @narimiran, Numpy and Pandas are removing Py2 support at the end of the year, I would be surprised if scientific libraries are still using py2 in the OSS world |
14:04:22 | narimiran | i know they do. it was about time |
14:04:59 | narimiran | it's not like they're ahead of time ;) https://pythonclock.org/ |
14:08:37 | * | Vladar joined #nim |
14:17:59 | Araq | proc newRegexp(express: cstring): JsObject {.importcpp: "new RegExp(#)".} |
14:18:22 | Araq | is fine but don't use the // inside your string literal |
14:21:54 | * | noeontheend joined #nim |
14:28:11 | * | solitudesf quit (Ping timeout: 252 seconds) |
14:29:31 | * | lf-araujo joined #nim |
14:30:07 | * | lf-araujo quit (Client Quit) |
14:30:19 | * | lf-araujo joined #nim |
14:33:36 | * | lf-araujo quit (Remote host closed the connection) |
14:38:51 | * | solitudesf joined #nim |
14:43:45 | * | stefanos82 quit (Remote host closed the connection) |
14:57:15 | * | nsf joined #nim |
15:01:15 | * | Snircle quit (Read error: Connection reset by peer) |
15:02:08 | * | Snircle joined #nim |
15:02:32 | * | PMunch quit (Remote host closed the connection) |
15:08:35 | * | Jesin quit (Quit: Leaving) |
15:09:07 | * | solitudesf- joined #nim |
15:09:26 | * | solitudesf- quit (Client Quit) |
15:10:57 | * | solitudesf quit (Quit: ZNC - https://znc.in) |
15:11:57 | * | Jesin joined #nim |
15:12:20 | * | solitudesf joined #nim |
15:13:44 | * | rnrwashere joined #nim |
15:17:22 | * | floppydh quit (Quit: WeeChat 2.4) |
15:17:54 | * | rnrwashere quit (Remote host closed the connection) |
15:18:22 | * | rnrwashere joined #nim |
15:34:18 | * | waleee quit (Quit: WeeChat 2.4) |
16:01:04 | * | kapil____ joined #nim |
16:03:28 | * | chimez quit (Quit: chimez) |
16:04:23 | * | waleee joined #nim |
16:37:22 | * | couven92 quit (Quit: Client disconnecting) |
16:44:27 | * | rnrwashere quit (Remote host closed the connection) |
16:45:08 | * | Egon-ml joined #nim |
16:48:02 | * | rnrwashere joined #nim |
17:06:09 | * | stefanos82 joined #nim |
17:10:11 | * | rnrwashere quit (Remote host closed the connection) |
17:12:44 | * | rnrwashere joined #nim |
17:15:09 | * | dom96_w joined #nim |
17:15:09 | * | Egon-ml quit (Quit: Page closed) |
17:15:42 | * | solitudesf quit (Quit: Leaving) |
17:17:34 | * | rnrwashere quit (Remote host closed the connection) |
17:25:29 | * | Jesin quit (Quit: Leaving) |
17:30:45 | * | Trustable joined #nim |
17:31:15 | * | Jesin joined #nim |
17:32:31 | * | solitudesf joined #nim |
17:41:31 | * | solitudesf quit (Remote host closed the connection) |
17:42:39 | * | rnrwashere joined #nim |
17:50:42 | * | rayman22201 joined #nim |
17:53:00 | * | jjido joined #nim |
17:53:18 | * | rnrwashere quit (Remote host closed the connection) |
17:53:58 | * | sealmove joined #nim |
17:56:36 | * | sealmove quit (Client Quit) |
17:56:55 | * | rnrwashere joined #nim |
17:59:55 | * | Vladar quit (Remote host closed the connection) |
18:00:55 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:01:42 | * | rnrwashere quit (Remote host closed the connection) |
18:03:45 | FromGitter | <liquid600pgm> https://github.com/liquid600pgm/rod/commit/873229a68b149083d496dd0e0db8025777144c6f I can't believe I made such a stupid mistake in my parser |
18:04:26 | FromGitter | <liquid600pgm> it's good I fixed it, it would certainly be annoying to run into that bug in production |
18:07:43 | * | rnrwashere joined #nim |
18:07:57 | * | noeontheend quit (Ping timeout: 252 seconds) |
18:10:10 | Zevv | stupid mistakes in my parser, my day was full of it :) |
18:10:38 | Zevv | nah, not really true. I'm quite happy with the progress. |
18:11:13 | Zevv | liquid600pgm: If you have time and feel like giving some feedback - I could use some |
18:11:59 | FromGitter | <liquid600pgm> sure, can you give me a link to your repo? |
18:12:07 | Zevv | https://github.com/zevv/npeg |
18:12:10 | FromGitter | <liquid600pgm> thanks |
18:13:36 | Zevv | The basics are now there: the PEG syntax is pretty sweet I think; it gets compiled into an intermediate format which allows inspection and optimization, and then it gets compiled to a nim proc that does the parsing. I can now parse 20Mb of json in approx 200msec with the parser in the README |
18:13:56 | FromGitter | <liquid600pgm> great! |
18:14:00 | Zevv | passing all of the JSONlint test suites |
18:14:06 | FromGitter | <liquid600pgm> I just found a little inconsistency in the readme |
18:14:11 | Zevv | tell me |
18:14:33 | FromGitter | <liquid600pgm> the atoms section says `[]` is used for the sets, but then you use `{}` in the examples |
18:14:45 | Zevv | ah, examples are old, fixing right away |
18:15:50 | Zevv | fixed |
18:16:28 | Zevv | Anyway, I'm not at the point where I'm implementing captures. I can add C(..) in the rules, and everthing in brackets will be captured. Can be nested as well. |
18:16:58 | Zevv | The captures now end up in a seq[string] which is not yet exposed; I'm looking a (or multiple) good API for getting the capture data out. |
18:17:47 | Zevv | I want at least be able to create nested captures on the fly: a capture will be a string or an array of captures. |
18:17:54 | FromGitter | <liquid600pgm> this https://github.com/zevv/npeg/blob/master/src/npeg.nim#L432 feels pretty unreadable and isn't cross-platform (it won't work on older versions of Windows), I'd change it to use the `terminal` module |
18:18:20 | Zevv | oh I'm taking that out, thats debugging code, thanks |
18:18:21 | FromGitter | <liquid600pgm> oh wait |
18:18:36 | FromGitter | <liquid600pgm> there was a commit that changed the line number |
18:18:42 | FromGitter | <liquid600pgm> it's 440 now |
18:18:57 | FromGitter | <liquid600pgm> the code feels pretty clean overall, I like it |
18:19:00 | Zevv | hehe |
18:19:06 | * | noeontheend joined #nim |
18:19:41 | Zevv | thanks. So now I'm wondering: what performance would be reasonable? |
18:20:43 | FromGitter | <liquid600pgm> try comparing pegs written in your lib against manual recursive descent parsers |
18:20:54 | Zevv | I always lose |
18:21:07 | Zevv | I guess |
18:21:52 | Zevv | I'll strip the Nim json module to do only parsing without creating AST, that would be a nice test |
18:22:04 | FromGitter | <liquid600pgm> well, you can always optimize the heck out of your generated code so it gets faster and faster |
18:22:17 | * | solitudesf joined #nim |
18:22:49 | FromGitter | <liquid600pgm> from what I know one optimization is to use `var` parameters instead of return values |
18:23:36 | Zevv | The generated code ends up basically call-less |
18:23:41 | FromGitter | <liquid600pgm> manually written parsers tend to not do this because it makes the code pretty unreadable, but with a generated parser everything happens under the hood |
18:24:31 | FromGitter | <liquid600pgm> I guess parsing rod would be faster with NPegs than with the built-in parser xD |
18:24:34 | Zevv | There is this 'skel' template at line 281 and down. That gets extended with a switch which expands the doXxxxFn() templates |
18:24:43 | Zevv | hehe |
18:24:56 | Zevv | I wonder if Nim is regular enough to parse with a PEG :) |
18:25:34 | FromGitter | <liquid600pgm> probably not, from my experience indentation-based grammars are very difficult to parse with PEGs |
18:25:46 | * | nsf quit (Quit: WeeChat 2.4) |
18:25:49 | Zevv | yeah, probably. |
18:26:09 | FromGitter | <liquid600pgm> especially when indentation is stored in tokens |
18:26:27 | Zevv | And how is Rod coming along then? |
18:26:59 | Zevv | you have basic control flow running I see? |
18:27:06 | FromGitter | <liquid600pgm> well, I finished `if`, `loop` and `while` already |
18:27:11 | FromGitter | <liquid600pgm> I'm working on `for` now |
18:27:12 | * | noeontheend quit (Ping timeout: 252 seconds) |
18:27:27 | * | sealmove joined #nim |
18:27:34 | Zevv | what kind of for is it? Just basic numeral looping, or iterators? |
18:27:40 | FromGitter | <liquid600pgm> iterators |
18:27:44 | Zevv | \o/ |
18:28:00 | FromGitter | <liquid600pgm> `loop`'s an optimization over `while true`, because it doesn't evaluate any conditions (it just adds a basic jump) |
18:29:02 | FromGitter | <liquid600pgm> I don't plan on making an optimizer for rod's bytecode, because a) implementation simplicity b) a lot of checking and stuff is deffered to runtime |
18:29:58 | FromGitter | <liquid600pgm> eg. I can't make `2 + 2` optimize to `4` rn because `+` is treated as a method on the `Num` class |
18:31:11 | FromGitter | <danielecook> What does illegal capture mean? |
18:31:19 | FromGitter | <danielecook> `Error: illegal capture 'sep' of type <var string> which is declared here: csv.nim(36, 31)` |
18:31:27 | * | xet7 quit (Ping timeout: 240 seconds) |
18:32:01 | FromGitter | <liquid600pgm> my first guess would be that you're violating memory safety with closures? but no idea |
18:32:17 | Zevv | drop the code somewhere? |
18:32:44 | FromGitter | <danielecook> I am using list comprehensions: ` lc[x.strip(chars = {'\"', '\''}) | (x <- line.split(sep)), string]` |
18:33:08 | FromGitter | <danielecook> https://gist.github.com/danielecook/5d5f9a2cd32ff06ab05feb04f6418a28 |
18:33:20 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:35:02 | Zevv | funny, I don't see it. I got that error once when doing async stuff, but that's not the case here |
18:35:44 | FromGitter | <liquid600pgm> myself too, I got that error when doing stuff with closures and upvalues |
18:36:42 | FromGitter | <danielecook> could it be the list comprehension? |
18:37:20 | FromGitter | <liquid600pgm> no idea, but I think the solution would be to create a temporary `let` constant to use in the comprehension |
18:37:48 | FromGitter | <liquid600pgm> you can also use an `if` expression, and replace the `var` with `let` then |
18:37:56 | FromGitter | <danielecook> that fixed it |
18:38:22 | leorize | danielecook: use of list comprehension in Nim is discouraged afaik |
18:38:28 | FromGitter | <liquid600pgm> generally, try to use `let` whenever you don't need `var`, it reduces bugs with memory safety and stuff |
18:38:37 | FromGitter | <danielecook> so - just for my clarity...if I define a proc where the args are like `sep: var string` that is passsing in by reference correct? |
18:38:45 | FromGitter | <liquid600pgm> yes |
18:39:34 | FromGitter | <danielecook> thanks! ok then regarding the code (cause this is one of my first!)... prob. should change these: ⏎ ⏎ ``` var ⏎ stack_header: seq[string] ⏎ match_col: int``` ⏎ ⏎ to `let`? [https://gitter.im/nim-lang/Nim?at=5c894e662f2fb54c37e54f8c] |
18:39:43 | FromGitter | <danielecook> Why are comprehensions discouraged? |
18:39:57 | leorize | it's buggy iirc |
18:40:02 | * | rnrwashere quit (Remote host closed the connection) |
18:40:13 | FromGitter | <liquid600pgm> @danielecook use `let` when you don't need mutation |
18:40:34 | FromGitter | <danielecook> ah ok |
18:40:35 | FromGitter | <danielecook> thx |
18:40:50 | FromGitter | <liquid600pgm> when you need to fill up an empty list, you can't use `let` because it'll be a compile time error (`let` cannot be reassigned) |
18:41:12 | FromGitter | <danielecook> So this is really cool - I whipped this up in less than an hour, and it can be used to stack csvs with a combined header |
18:41:25 | FromGitter | <danielecook> similar functionality as csv-kit stack |
18:41:35 | FromGitter | <danielecook> really impressed with how quickly I was able to throw it together and how fast it is |
18:41:43 | leorize | http://nim-lang.github.io/Nim/sugar#[].m%2CListComprehension%2Cuntyped%2Cuntyped |
18:41:56 | leorize | ^ lc is deprecated in the next version of Nim |
18:42:19 | FromGitter | <danielecook> ah ok |
18:42:24 | FromGitter | <danielecook> so I can just use a for loo[ |
18:42:41 | FromGitter | <liquid600pgm> pretty much |
18:43:22 | FromGitter | <danielecook> Good to know |
18:43:36 | FromGitter | <liquid600pgm> myself, I never used the `sugar` module, it wasn't neccessary in my code (I'm not used to FP concepts) |
18:44:06 | FromGitter | <danielecook> Just out of curiosity what types of stuff are you working on? |
18:44:21 | * | xet7 joined #nim |
18:44:34 | FromGitter | <danielecook> The only reason I was drawn to nim was because of the hts-nim lib |
18:44:40 | FromGitter | <liquid600pgm> I'm working on a scripting language for Nim: https://github.com/liquid600pgm/rod |
18:44:56 | Zevv | Ha |
18:45:02 | Zevv | I parse JSON faster then the json module! |
18:45:10 | * | rnrwashere joined #nim |
18:45:14 | FromGitter | <liquid600pgm> GG! |
18:45:46 | sealmove | OMG amp editor is so great |
18:46:13 | leorize | Zevv: can you parse it faster than packedjson? :P |
18:46:20 | FromGitter | <danielecook> as far as JSON is concerned - I am planning on writing a utility to convert a genetic data format (VCF) to JSON |
18:46:25 | FromGitter | <danielecook> However, the fields tend to be heterogeneous |
18:46:36 | Zevv | leorize: what's that? |
18:46:39 | FromGitter | <danielecook> and it seems like nim (and go) have all this marshalling, unmarshalling, object business |
18:46:46 | FromGitter | <danielecook> 'Variant Call Format' |
18:46:53 | leorize | Zevv: https://github.com/Araq/packedjson |
18:47:04 | Zevv | Yeah, that has Araq in the name, forget it |
18:47:14 | Araq | hey |
18:47:18 | FromGitter | <danielecook> cool i'll take a look at that |
18:47:21 | Araq | that's offensive. |
18:48:31 | FromGitter | <liquid600pgm> I wouldn't say it's offensive, it's more of a compliment (that your stuff cannot be beaten in terms of speed) |
18:48:42 | FromGitter | <danielecook> One other question for you all |
18:49:02 | FromGitter | <danielecook> Relatively new to compiled lang. Nim compiles very fast; I use a utility called `entr` to recompile on every save |
18:49:13 | * | waleee quit (Quit: WeeChat 2.4) |
18:49:19 | FromGitter | <danielecook> Seems like no one every told me about this and I had to figure it out myself |
18:49:34 | FromGitter | <danielecook> Saves a lot of time switching between terminals |
18:49:45 | * | rnrwashere quit (Remote host closed the connection) |
18:49:45 | shashlick | way to wake up the sleeping giant |
18:49:49 | FromGitter | <danielecook> But...if you use an alt. what is it and how did you find out about it |
18:50:26 | Araq | it's not hard to beat me, I don't micro-optimize. all I do is to avoid "slow" operations. |
18:50:31 | Zevv | 20MB of json. stripped packedjson: 235msec. NPeg 241msec. Not bad :) |
18:50:49 | Zevv | With a plain PEG generated json parser |
18:51:32 | leorize | danielcook: I use `nim c -r`, which basically just compile the code when I get to run it :P |
18:52:27 | FromGitter | <coocheenin> @danielecook As alternative `sentry` |
18:53:23 | FromGitter | <danielecook> not familiar with sentry |
18:53:38 | FromGitter | <coocheenin> @danielecook https://github.com/samueleaton/sentry |
18:54:14 | FromGitter | <danielecook> oh thats pretty similar I think |
18:55:21 | FromGitter | <coocheenin> Of sure. Not C-written, but in Crystal. |
18:57:54 | FromGitter | <coocheenin> We don't have a nim-equivalent at all. |
19:00:25 | Araq | danielecook: we will have something better than 'lc' |
19:00:41 | FromGitter | <danielecook> looking forward to it! |
19:00:51 | * | rnrwashere joined #nim |
19:01:12 | FromGitter | <danielecook> Seems like a great language for the sciences - lots of room for growth there. |
19:04:31 | FromGitter | <alehander42> You can try alehander42/comprehension it's an experiment in list comps |
19:04:31 | FromGitter | <alehander42> Based on araq idea and with a maybe better b3liever pr |
19:05:11 | Araq | alehander42: can we move yours to sugar.nim? is it ready? |
19:05:13 | * | jonafato quit (Quit: ZNC - http://znc.in) |
19:05:24 | * | jonafato joined #nim |
19:06:53 | FromGitter | <alehander42> Well I have to look at it again, I think it should be almost ready |
19:07:09 | FromGitter | <alehander42> But I think the b3liever PR had a better implementation |
19:20:32 | * | sealmove quit (Quit: WeeChat 2.4) |
19:23:04 | * | theelous3_ joined #nim |
19:23:12 | * | kapil____ quit (Quit: Connection closed for inactivity) |
19:25:04 | * | rockcavera quit (Read error: Connection reset by peer) |
19:40:23 | * | rnrwashere quit (Remote host closed the connection) |
19:42:16 | * | rnrwashere joined #nim |
19:42:27 | * | rnrwashere quit (Remote host closed the connection) |
19:43:09 | * | rnrwashere joined #nim |
19:44:06 | FromGitter | <danielecook> Is there any diff between echo and stdout.write_line? |
19:45:21 | solitudesf | echo autostringifies every argument, so you dont need to prefix them with `$` |
19:47:30 | * | rnrwashere quit (Ping timeout: 252 seconds) |
19:50:07 | * | xet7 quit (Ping timeout: 240 seconds) |
19:51:09 | * | noeontheend joined #nim |
19:52:05 | FromGitter | <zah> I've stumbled on a very weird problem. I had an error pragma inside a generic function and the compiler was happy to ignore it: ⏎ I noticed the spec says the following: ⏎ ⏎ > The error pragma is used to make the compiler output an error message with the given content. *Compilation does not necessarily abort after an error though.* ⏎ ... [https://gitter.im/nim-lang/Nim?at=5c895f653162ec7bc7692fae] |
19:54:17 | Araq | did you instantiate the generic? |
19:55:26 | FromGitter | <zah> yes |
19:55:43 | FromGitter | <zah> so, it's a bug? |
19:55:50 | leorize | solitudesf: same goes to writeLine |
19:56:34 | FromGitter | <zah> This sentence is referring to collecting more errors in `nim check` context, or is it about something else? |
19:57:05 | leorize | danielecook: echo has a special semantic of printing to console, so it's could be implemented in javascript, while writeLine can't |
19:57:17 | FromGitter | <danielecook> ok thanks |
19:57:19 | Araq | yes, it's about "nim check" |
19:57:40 | FromGitter | <danielecook> one other question - would it be unwise to parallelize with processes that echo? |
20:02:51 | * | xet7 joined #nim |
20:03:36 | * | rockcavera joined #nim |
20:16:16 | * | rnrwashere joined #nim |
20:17:17 | * | rnrwashere quit (Read error: Connection reset by peer) |
20:17:22 | * | rnrwashe_ joined #nim |
20:21:27 | * | rnrwashe_ quit (Ping timeout: 240 seconds) |
20:23:28 | * | Sembei joined #nim |
20:25:33 | * | rnrwashere joined #nim |
20:29:36 | * | noeontheend quit (Read error: Connection reset by peer) |
20:29:38 | * | rnrwashere quit (Ping timeout: 244 seconds) |
20:56:40 | * | narimiran quit (Ping timeout: 272 seconds) |
20:59:01 | * | abm quit (Read error: Connection reset by peer) |
20:59:13 | * | cgfuh quit (Ping timeout: 245 seconds) |
21:01:14 | FromGitter | <deech> If anyone's looking for a benchmark on `{.experimental "parallel" .}` this one eats up about 6GB of memory and finally dies with an `Illegal storage ...` error. Remove the parallelism constructs and it finishes but still uses about 700MB RAM. https://gist.github.com/deech/8f585df50dbd662bb5fb5f48a7e159e9 |
21:02:23 | FromGitter | <deech> @Araq: How important is this feature in the near future? |
21:03:53 | FromGitter | <deech> BTW this is an attempt at the language benchmarks benchmark: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/binarytrees.html. |
21:10:35 | * | jjido joined #nim |
21:18:03 | FromGitter | <Varriount> @deech What does that pragma do (and is there documentation on it)? |
21:20:47 | FromGitter | <dawkot> What am I supposed to do to make c2nim happy? ⏎ ⏎ > .../include/SDL_gpu.h(681, 50) Error: token expected: ; ⏎ The line content: ⏎ > static SDL_version SDLCALL GPU_GetCompiledVersion(void) ... [https://gitter.im/nim-lang/Nim?at=5c89742fe527821f0a53084a] |
21:23:21 | FromGitter | <genotrance> I'd run it thru the preprocessor first |
21:24:08 | FromGitter | <dawkot> What do you mean? I've never used C for real. |
21:26:11 | FromGitter | <genotrance> See how nimterop does it |
21:27:49 | FromGitter | <deech> @Varriount https://nim-lang.org/docs/manual.html#parallel-amp-spawn-parallel-statement |
21:28:01 | FromGitter | <genotrance> https://github.com/nimterop/nimterop/blob/master/nimterop/getters.nim#L200 |
21:39:22 | * | abm joined #nim |
21:41:54 | FromGitter | <Varriount> Eh heh heh... https://blogs.dust3d.org/2019/03/13/why-i-rewrote-the-mesh-generator-of-dust3d-from-rust-to-cplusplus/ |
21:43:59 | * | sealmove joined #nim |
21:44:03 | dom96 | :o |
21:46:37 | * | gangstacat quit (Ping timeout: 244 seconds) |
21:49:18 | * | Trustable quit (Remote host closed the connection) |
21:56:18 | * | gangstacat joined #nim |
21:57:57 | dom96 | So I implemented some awesome Prometheus logging for the Nim GC to investigate a leak... andddd the leak disappeared |
21:59:42 | Calinou | Prometheus sounds cool, but I don't manage a large enough service to benefit from it :'( |
22:02:51 | * | bobby quit (Ping timeout: 252 seconds) |
22:04:43 | * | bobby joined #nim |
22:08:39 | federico3 | Netdata is an option |
22:12:49 | * | rnrwashere joined #nim |
22:15:40 | * | rnrwashe_ joined #nim |
22:17:25 | * | rnrwashere quit (Ping timeout: 255 seconds) |
22:20:05 | * | rnrwashe_ quit (Ping timeout: 252 seconds) |
22:20:32 | Calinou | that's what I use on my VPS |
22:20:39 | Calinou | it's pretty decent indeed |
22:31:55 | * | rockcavera quit (Remote host closed the connection) |
22:39:04 | * | rockcavera joined #nim |
22:46:14 | * | solitudesf quit (Ping timeout: 272 seconds) |
22:59:27 | * | xet7 quit (Ping timeout: 240 seconds) |
23:02:54 | jjido | Varriount: Rust safeness is "distracting".... How is the nim compiler in that regard? |
23:04:59 | shashlick | not that I've used rust before but nim doesn't distract me |
23:06:51 | shashlick | the thing that does distract me is trying to do crazy dynamic things in a compiled language knowing very well that I can pull it off in Nim |
23:08:07 | * | zyklon quit (Ping timeout: 252 seconds) |
23:12:08 | * | xet7 joined #nim |
23:13:31 | dom96 | Nim doesn't distract, it empowers |
23:15:23 | FromGitter | <arnetheduck> learning rust makes sense for any serious developer, if only to become better at your preferred language.. for example, if you've only programmed gc'd languages, your resource management (memory, file handles etc) skills will be weak (and indeed the language facilities and libraries in the language itself), while rust will teach you sound thinking around it as they build from sound principles around these |
23:15:23 | FromGitter | ... particular issues - the things that rust requires of you to write safe code are valid for other languages as well, the difference being that they point it out to you at compile time, while in other languages you learn about them from bug reports. |
23:15:56 | FromGitter | <arnetheduck> same applies to learning a functional language of choice etc. |
23:16:30 | * | a_b_m joined #nim |
23:17:37 | Araq | all true, unfortunately every static analysis has to be pessimistic and so in the end you can be less productive, objectively. |
23:18:25 | Araq | a compiler that always says "your program is wrong" catches 100% of your bugs. |
23:19:05 | FromGitter | <arnetheduck> well, you know.. like taxes.. 100% don't work and 0% don't work. what the sweet spot is seems to be up for debate :) |
23:20:02 | FromGitter | <arnetheduck> each has it's niche I'd say is a more accurate description. when the cost of a bug is high, your total productivity function is different than when it's low. |
23:20:03 | * | abm quit (Ping timeout: 245 seconds) |
23:21:50 | FromGitter | <arnetheduck> point is,once you've learned these new skills, you can transfer them and enjoy the relaxed and streamlined environment of nim, for example - inevitably, your nim code will be better for it |
23:22:21 | Araq | NimZ3 is coming. *cough* |
23:22:31 | FromDiscord | <exelotl> I think INTERCAL was onto something with the "PLEASE" modifier |
23:23:16 | Araq | it's time to use theorem provers and stop messing around with primitive type and effect systems. |
23:25:06 | FromGitter | <arnetheduck> haha, I could use that actually.. we've been debating the issue in circles forever in eth2, and the outcome has been decidedly inelegant (brute-forcing underflow safety by using uint64 and starting all relevant counting at 2^32) |
23:25:22 | * | a_b_m quit (Ping timeout: 255 seconds) |
23:26:08 | Araq | meh that's intractable so use sticky saturated arithmetic instead. Integers are begging for +-Inf values |
23:26:45 | Araq | at least my integers do. |
23:27:34 | FromGitter | <arnetheduck> yes saturated came up (actually rust folks suggested it because they have std support for it :)), but it didn't gain traction |
23:28:17 | FromGitter | <arnetheduck> so we're left with a *compromise* |
23:28:47 | Araq | a good compromise is achieved when every party is equally unhappy with it. |
23:29:18 | FromGitter | <arnetheduck> in case of eth2 it's actually kind of tractable, if you establish some bounds within which the system is supposed to function |
23:39:15 | * | sealmove quit (Quit: WeeChat 2.4) |
23:41:35 | shashlick | yay finally got through a big refactor |
23:42:40 | shashlick | @arnetheduck - --debuginfo made the difference in debugging the dlls, just --debugger:native wasn't enough |
23:42:46 | * | rnrwashere joined #nim |
23:42:52 | shashlick | need to combine these varied flags into one |
23:43:30 | shashlick | stackTrace, lineTrace |
23:45:41 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:47:01 | * | rnrwashere quit (Ping timeout: 246 seconds) |
23:52:29 | * | banc quit (Ping timeout: 246 seconds) |
23:57:32 | * | banc joined #nim |