00:35:15 | * | kapil____ joined #nim |
00:42:29 | * | btbytes joined #nim |
00:43:18 | * | btbytes quit (Client Quit) |
00:43:31 | * | btbytes joined #nim |
00:44:37 | * | dddddd quit (Remote host closed the connection) |
00:58:31 | * | d10n-work quit (Quit: Connection closed for inactivity) |
01:11:01 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:11:46 | * | nif joined #nim |
01:12:01 | * | gmpreussner_ joined #nim |
01:12:19 | * | jonafato- joined #nim |
01:12:38 | * | nif_ quit (Quit: ...) |
01:12:39 | * | gmpreussner quit (Quit: kthxbye) |
01:12:41 | * | jonafato quit (Quit: ZNC - http://znc.in) |
01:12:42 | * | banc quit (Ping timeout: 245 seconds) |
01:15:20 | * | banc joined #nim |
01:38:13 | * | rnrwashere quit (Remote host closed the connection) |
01:40:44 | * | rnrwashere joined #nim |
01:41:20 | * | rnrwashere quit (Remote host closed the connection) |
01:56:41 | * | btbytes joined #nim |
02:06:43 | * | banc quit (Quit: Bye) |
02:28:34 | * | banc joined #nim |
02:28:56 | * | rnrwashere joined #nim |
02:34:52 | * | rnrwashere quit (Remote host closed the connection) |
03:15:53 | * | ryukoposting joined #nim |
03:44:05 | * | noeontheend_ joined #nim |
03:45:27 | * | noeontheend quit (Ping timeout: 240 seconds) |
03:48:08 | * | noeontheend_ quit (Ping timeout: 246 seconds) |
04:33:10 | * | nsf joined #nim |
04:37:23 | * | ryukoposting quit (Quit: WeeChat 1.6) |
04:51:05 | * | rnrwashere joined #nim |
05:01:38 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:03:51 | * | rnrwashere quit (Remote host closed the connection) |
05:18:11 | * | rnrwashere joined #nim |
05:19:07 | * | rnrwashere quit (Remote host closed the connection) |
05:25:24 | * | couven92 joined #nim |
05:27:17 | * | narimiran joined #nim |
05:46:52 | * | solitudesf joined #nim |
06:06:55 | * | PMunch joined #nim |
06:10:54 | * | krux02 joined #nim |
06:21:16 | PMunch | narimiran, since you didn't seem convinced the other day about our snow: https://uploads.peterme.net/IMG_20190402_194831.jpg |
06:21:31 | PMunch | That's taken yesterday after I was done shoveling |
06:22:02 | * | MightyJoe quit (Ping timeout: 250 seconds) |
06:22:16 | * | cyraxjoe joined #nim |
06:22:47 | narimiran | PMunch: the skeptic would still check EXIF and made sure if this isn't taken 3 months ago :P |
06:24:08 | PMunch | Huh, apparently I've got geotagging on as well |
06:24:15 | PMunch | So now you know where my house is.. |
06:24:30 | * | rnrwashere joined #nim |
06:24:41 | * | rnrwashere quit (Remote host closed the connection) |
06:24:55 | * | rnrwashere joined #nim |
06:27:54 | PMunch | There, scrubbed the geotags out |
06:31:44 | * | narimiran quit (Remote host closed the connection) |
06:32:17 | * | narimiran joined #nim |
06:33:56 | I_Right_I | PMunch: Where do you live Greenland? |
06:36:59 | PMunch | Haha, not quite. North of Norway |
06:38:37 | * | solitudesf quit (Ping timeout: 250 seconds) |
06:41:17 | Zevv | nort of norway. Are you santa? |
06:42:28 | PMunch | Nope, but I know a guy who knows a guy who knows him |
06:42:59 | Zevv | well, he knows me, I've been told |
06:43:23 | Zevv | nice and subtle response on the V post araq :) |
06:43:37 | PMunch | V post? |
06:43:59 | Zevv | https://forum.nim-lang.org/t/4758 |
06:44:41 | Zevv | "Yeah no shit, please go on since so far no convincing argument has been found." |
06:45:11 | * | I_Right_I quit (Remote host closed the connection) |
06:45:25 | Zevv | damn that *is* some snow |
06:45:56 | * | tdc joined #nim |
06:46:16 | Zevv | can you not lie, make free energy out of that, or something. a waste to let it all lie there and melt. make snow balls and ship them to italy, monetize! |
06:46:32 | Zevv | s/lie/like/ |
06:47:04 | PMunch | Yeah, that's even after I've given up on digging down to the actual ground. I have two steps down from my door and a staircase to get up to the road, currently it's a straight path over to the staircase (which I've now carved out of the snow instead of finding the actual steps). |
06:47:26 | PMunch | Well I guess you could set up a hydro-generator on the melting snow |
06:47:44 | PMunch | I guess that's how much of Norways hydro-power already works though :P |
06:48:01 | PMunch | Why would Italy want our dirty snow? |
06:48:10 | narimiran | to make gelatto |
06:48:15 | Zevv | exactly |
06:48:42 | Zevv | and some sand and grit is no issue when making straciatella |
06:50:51 | Zevv | back to nim: i have a macro that generates code with getAst on a template call. This template also calls templates. When I do a repr on the generated code at the end of the macro, the inner template calls are still there. Is there a way to "fully expand" all templates in a way? |
06:51:49 | narimiran | i haven't used it, but maybe https://nim-lang.github.io/Nim/macros.html#expandMacros.m%2Ctyped ? |
06:52:03 | Zevv | hmm missed that one, lemme see |
06:52:50 | Zevv | Problem is that the code calling the initial maco must have the inner templates in scope. I now need to export stuff that I'd rather hide |
07:00:00 | * | gmpreussner_ quit (Quit: kthxbye) |
07:01:10 | Zevv | hmm, almost but not quite. |
07:02:57 | Araq | why do the inner templates have to be expanded? |
07:04:29 | * | gmpreussner joined #nim |
07:14:34 | Zevv | because now I need to export those templates to the caller of the macro. |
07:15:22 | Zevv | main calls macro, macro uses getAst on templateA which calls templateB -> main needs to know about templateB |
07:42:22 | FromGitter | <mratsim> if it's template calling template, templateA can probably use mixin |
07:42:56 | FromGitter | <mratsim> or the module that defines template A should import the module that defines template B |
07:54:50 | Zevv | I'll put op a minimized example later today, thanks |
07:55:45 | Zevv | I must admit that I've never looked into mixin and bind, no clue what they do |
08:00:09 | * | kapil____ quit (Quit: Connection closed for inactivity) |
08:03:24 | * | rnrwashere quit (Remote host closed the connection) |
08:04:43 | * | ng0 joined #nim |
08:05:48 | * | floppydh joined #nim |
08:05:48 | * | btbytes quit (Read error: Connection reset by peer) |
08:07:22 | * | Vladar joined #nim |
08:15:34 | PMunch | I was originally skeptical of the nilseqs and nilstrings thing, but it's sooo much nicer when you get used to it :) |
08:15:44 | PMunch | And it's more consistent with the other types |
08:16:56 | FromGitter | <alehander42> The ability to not have nil |
08:16:58 | FromGitter | <alehander42> ? |
08:17:08 | PMunch | ? |
08:17:33 | FromGitter | <alehander42> Is that what you mean by |
08:17:39 | FromGitter | <alehander42> Nilstring |
08:18:19 | * | vlad1777d joined #nim |
08:29:39 | PMunch | Yeah |
08:30:24 | PMunch | The fact that "var myString: string" can now be used as a string and not a nil |
08:43:59 | Zevv | and next is to get `var myTable: Table[int, int]` to work without having to do initTable(). Where is this RFC, let us upvote! |
08:45:01 | narimiran | Zevv: here it is https://github.com/nim-lang/RFCs/issues/101 |
08:46:39 | narimiran | also this would be nice: https://github.com/nim-lang/RFCs/issues/48 |
08:50:40 | livcd | this is much better |
08:50:51 | livcd | shashlick: I attached cmder to putty and it works flawlessly |
08:52:15 | Zevv | narimiran: So, what do I do to get a lobby going for this? |
08:54:56 | narimiran | Zevv: spread the word and hope the pressure will be too high to ignore :) |
09:02:53 | Zevv | spread! Spread! SPREAD! |
09:20:10 | FromGitter | <gogolxdong> How to convert ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ca47acaf851ee043d53d8a4] |
09:22:09 | * | JustASlacker joined #nim |
09:25:32 | FromGitter | <alehander42> Yep |
09:25:36 | FromGitter | <alehander42> Very good |
09:28:16 | * | MightyJoe joined #nim |
09:28:22 | * | cyraxjoe quit (Ping timeout: 245 seconds) |
09:29:29 | * | Vladar quit (Remote host closed the connection) |
09:29:57 | * | Vladar joined #nim |
09:34:54 | FromGitter | <gogolxdong> trying to concatenate two NimNodes into a json field accessing : ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ca47e3e93fb4a7dc2c77fde] |
09:36:27 | * | Xe quit (Ping timeout: 240 seconds) |
09:37:23 | * | snowolf quit (Ping timeout: 268 seconds) |
09:41:54 | * | snowolf joined #nim |
10:04:00 | * | Xe joined #nim |
10:05:46 | * | couven92 quit (Ping timeout: 250 seconds) |
11:04:02 | * | couven92 joined #nim |
11:05:58 | * | Snircle joined #nim |
11:17:47 | * | abm joined #nim |
11:17:54 | Zevv | Ha, I outgolfed your set narimiran |
11:18:11 | narimiran | Zevv: no you didn't :D |
11:18:12 | Zevv | I'm an expert in sets these day |
11:18:20 | narimiran | because that's not a HashSet anymore ;) |
11:18:33 | * | NimBot joined #nim |
11:18:55 | Zevv | *delete post* |
11:19:07 | narimiran | Zevv: don't worry, even Araq got that one wrong :P |
11:19:17 | Zevv | ghehe |
11:19:56 | Zevv | "you can not delete this post", well that's nice |
11:20:18 | narimiran | yep, even i can't do that, and i'm a moderator |
11:20:58 | Zevv | so, this will be my heritage, a wrong answer on a forum on the internet. How utterly embarrising |
11:21:18 | narimiran | Zevv: oh c'mon, you know the workaround around this |
11:21:31 | Zevv | yeah, just act as if it never happened |
11:21:35 | narimiran | nope |
11:21:52 | Zevv | you know I'm not going to admit I'm wrong |
11:22:19 | narimiran | well, you can "delete" the *contents* of your post ;) |
11:22:32 | Zevv | haha |
11:23:10 | Zevv | Damn now I already admitted I was wrong |
11:23:29 | narimiran | April fools, whole month long! |
11:23:53 | Zevv | so. much. fun. |
11:27:26 | * | lritter joined #nim |
11:39:03 | FromGitter | <gogolxdong> How about ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ca49b5793fb4a7dc2c85ba7] |
11:39:48 | FromGitter | <gogolxdong> then we can get the date 1 year ago. ` echo getDateStr(now()-1.years)` |
11:52:59 | Zevv | I forgot, what's that abbreviation of nim's way of calling things? c.foo() or foo(c) |
11:53:45 | * | Snircle quit (Ping timeout: 268 seconds) |
11:54:32 | planetis[m] | there is an empty node after the first statement in StmtListExpr ``dumpTree: if (x.inc; x) > 0`` is this a parser bug? |
11:55:49 | FromGitter | <zetashift> UFCS? |
11:56:14 | Zevv | ah yes, thanks |
11:57:00 | Zevv | narimiran: about my problem this morning: https://forum.nim-lang.org/t/4762 |
11:58:47 | FromGitter | <zetashift> @Zevv I don't know much about templates but might this be the reason? https://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax |
12:02:55 | PMunch | What was that new tool to help with wrappin C libraries? |
12:03:11 | FromGitter | <zetashift> nimterop? |
12:03:18 | PMunch | Ah, that's the one |
12:03:27 | FromGitter | <zetashift> man I'm on fire |
12:03:29 | Zevv | nimterop++! |
12:03:45 | Zevv | oh nimbot doesnt know about ++ :) |
12:04:56 | * | PMunch quit (Remote host closed the connection) |
12:05:20 | * | PMunch joined #nim |
12:06:28 | FromGitter | <zetashift> I don't know about vlang it sounds nice and all that but that developer keeps pushing his 'open source release' date |
12:07:24 | * | Snircle joined #nim |
12:07:37 | Zevv | "V for Vaporware" |
12:08:58 | planetis[m] | is until a keyword!? |
12:10:26 | FromGitter | <zetashift> according to the manual it isn't |
12:11:00 | planetis[m] | then why?? |
12:11:19 | PMunch | Hmm, Volt, the program he created V for looks more interesting than the language :P |
12:11:34 | planetis[m] | pf, I'm getting `Error: undeclared identifier: 'until'` |
12:11:59 | planetis[m] | all the time, sorry it took me 5 min to figure it out |
12:12:23 | planetis[m] | then i changed it to smth else and worked |
12:13:15 | PMunch | That sounds strange |
12:13:45 | FromGitter | <zetashift> yeah |
12:14:00 | shashlick | I tried volt on windows and it immediately got quarantined by my anti virus |
12:14:21 | FromGitter | <zetashift> I mean some antivirus also pick up on Nim |
12:14:25 | planetis[m] | i will post a nim file |
12:15:00 | * | arecacea1 quit (Remote host closed the connection) |
12:15:08 | PMunch | zetashift, ah it wasn't actually nimterop I was thinking of, but nimgen |
12:15:17 | PMunch | Nimterop looks really interesting though |
12:15:18 | * | arecacea1 joined #nim |
12:16:09 | FromGitter | <zetashift> yea nimgen is more of a helper tho isn't it? |
12:16:25 | FromGitter | <zetashift> anybody got feud working on Windows getting a weird SSL error |
12:16:42 | FromGitter | <zetashift> feud being this: https://github.com/genotrance/feud |
12:16:58 | planetis[m] | oh no, it was because I made a repeat macro and the symbol clases with strutils repeat |
12:17:14 | planetis[m] | what do I do? |
12:17:19 | PMunch | "Fed Ep with UDitors" :P |
12:18:29 | PMunch | planetis[m], "import strutils except repeat"? |
12:18:54 | planetis[m] | yeah but I planning making a lib package... |
12:18:59 | planetis[m] | *am |
12:19:34 | PMunch | qualify your repeat macro? mymodule.repeat? |
12:19:45 | PMunch | Without code it's kinda hard to understand what you're trying to do |
12:20:26 | PMunch | Hmm, feud looks interesting |
12:20:29 | PMunch | Windows only though.. |
12:20:42 | planetis[m] | a repeat until statement here: https://gist.github.com/b3liever/98f5e1b079637814ba2828f564d4439f |
12:20:52 | planetis[m] | thanks for the help by the way |
12:21:55 | planetis[m] | i will finish it later |
12:22:40 | FromGitter | <zetashift> for now PMunch (tm) |
12:23:18 | PMunch | Well, if you had it as a library then I guess people would have to either not use repeat from strutils, or qualify your macro.. |
12:23:34 | shashlick | zetashift: what error are you seeing with feud |
12:24:19 | planetis[m] | I should pbl allow endless loop |
12:25:41 | PMunch | Hmm strange, qualifying didn't help either.. |
12:26:57 | FromGitter | <zetashift> @shashlick https://pastebin.com/1e2FzHEe |
12:28:31 | PMunch | planetis[m], this works: http://ix.io/1FdH/Nim |
12:28:36 | PMunch | But it's not optimal |
12:29:33 | planetis[m] | sure, I will just write a note in the readme, can't be bothered now |
12:33:00 | Zevv | zetashift, thanks, that seems to be my problem |
12:33:35 | * | dddddd joined #nim |
12:34:57 | * | salewski joined #nim |
12:36:17 | shashlick | zetashift do you have an older build of nimterop installed? |
12:37:05 | salewski | Do we have something like max_by() from Ruby in Nim already? |
12:37:09 | salewski | https://ruby-doc.org/core-2.6.2/Enumerable.html#method-i-max_by |
12:37:32 | salewski | Example use: fing longest string in a seq of strings. |
12:37:46 | narimiran | you can define your own `cmp`? |
12:38:00 | shashlick | zetashift is an issue with tls1.2, update nimterop and it should work |
12:38:32 | salewski | Ah yes, defining own cmp seems to be the Nim solution... |
12:40:16 | FromGitter | <zetashift> ah thanks I will |
12:41:05 | salewski | Unfortunately, when we type "find" keyword in search entry in page |
12:41:08 | salewski | https://nim-lang.github.io/Nim/lib.html |
12:41:27 | salewski | we get unly results for strings still. Bad for newcomers. |
12:44:41 | PMunch | Hmm, nimterop doesn't seem to work: http://ix.io/1FdM/Nim |
12:44:47 | PMunch | Or I might be doing something wrong |
12:45:38 | shashlick | This is latest? Yay crash :) |
12:46:05 | PMunch | shashlick, yeah, just downloaded |
12:46:34 | FromGitter | <zetashift> I actually can't install nimterop due some cligen bug |
12:46:40 | FromGitter | <zetashift> or cligen error* |
12:47:05 | shashlick | PMunch can you try with debug build |
12:47:10 | shashlick | Get some trace |
12:48:23 | PMunch | How? |
12:48:24 | shashlick | Zetashift paste? What's version of Nim |
12:48:56 | FromGitter | <zetashift> Using nim devel: ... C:\Users\rskar\.nimble\pkgs\cligen-0.9.19\cligen\argcvt.nim(8, 24) Error: undeclared identifier: '$' |
12:50:56 | FromGitter | <zetashift> gonna try with stable |
12:54:22 | shashlick | zetashift that should be fixed, do you have latest devel |
12:54:33 | shashlick | And latest cligen |
12:54:46 | FromGitter | <zetashift> I don't have latest devel but I do have latest cligen |
12:54:50 | FromGitter | <zetashift> I'll update devel then |
12:55:26 | shashlick | PMunch I'll try in a bit - what does your wrapper look like |
12:55:39 | shashlick | Are there any #defines you need to be set |
12:55:58 | PMunch | No idea :P |
12:56:15 | salewski | I still have not found an easy way to get index of longest string of @["aa", "ccc", "d"] :-( |
12:56:26 | PMunch | But I found that there is a ODBC wrapper already |
12:57:01 | narimiran | salewski: (length, index) tuple? |
12:59:40 | FromGitter | <arnetheduck> why is `mixin` needed? what prevents the compiler from lazily finding those names later? |
13:00:56 | shashlick | Ok I'll take a look in 30 minutes |
13:01:54 | * | cgfuh joined #nim |
13:02:04 | shashlick | Can you share your testodbc.nim file |
13:07:47 | Araq | arnetheduck: nothing but we found out empirically that it's better if the compiler does some pre-instantiation checking for generics |
13:08:21 | FromGitter | <arnetheduck> as in.. fewer surprises? |
13:09:04 | * | Cthalupa quit (Ping timeout: 250 seconds) |
13:09:41 | Araq | yes |
13:10:53 | PMunch | salewski, what's wrong with something like: http://ix.io/1FdZ/Nim |
13:11:39 | * | Cthalupa joined #nim |
13:13:05 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
13:14:17 | salewski | PMunch, thanks. I just assumed that something like max_by exists already, |
13:14:53 | salewski | as for sort() we have sortedByIt or sort with custom cmp proc. Seems not for min/max. |
13:15:05 | salewski | OK, will write it myself, thanks. |
13:17:28 | PMunch | salewski, well x.sortedByIt(len(it)) works fine. But if you needed the index it's a bit more complicated |
13:18:51 | * | Cthalupa quit (Ping timeout: 268 seconds) |
13:19:37 | * | Cthalupa joined #nim |
13:19:51 | salewski | Yes I know, no problem. Bye. |
13:19:57 | * | salewski quit (Quit: WeeChat 2.3) |
13:22:10 | * | stefanos82 joined #nim |
13:23:02 | PMunch | I mean this would also work: http://ix.io/1Fe2/Nim |
13:23:21 | * | Vladar quit (Remote host closed the connection) |
13:26:37 | * | Vladar joined #nim |
13:34:52 | shashlick | PMunch - you just needed to set the include path |
13:35:13 | PMunch | shashlick, I tried that, but it didn't appear to work |
13:35:15 | shashlick | but that assertion error is too opaque, will look into that |
13:36:23 | shashlick | this works: toast --pnim --preprocess -I . sql.h |
13:36:32 | shashlick | so you need a cInclude() |
13:37:40 | PMunch | Didn't seem to like that either: http://ix.io/1Fe7/ |
13:38:23 | shashlick | that's some other toast 😄 |
13:38:46 | PMunch | Ah :P |
13:39:00 | shashlick | try ~/.nimble/bin/toast |
13:40:06 | * | matthias__ joined #nim |
13:40:16 | shashlick | you will also need recurse |
13:40:37 | shashlick | otherwise the #include symbols are not pulled in, the resulting wrapper won't compile |
13:41:20 | * | matthias__ quit (Client Quit) |
13:41:28 | PMunch | Hmm, http://ix.io/1Fe7/ |
13:41:36 | PMunch | Still doesn't appear to like it |
13:42:05 | * | matthias__ joined #nim |
13:42:19 | * | matthias__ quit (Client Quit) |
13:42:55 | shashlick | that's the same snippet |
13:43:57 | PMunch | Oops, my bad http://ix.io/1Fe9/ |
13:44:55 | shashlick | need the full path to sql.h |
13:45:52 | PMunch | Aha, that seemed to work |
13:49:56 | PMunch | Hmm, now I get an undefined error |
13:50:12 | PMunch | ../../.choosenim/toolchains/nim-0.19.0/lib/core/macros.nim(749, 42) Error: undeclared identifier: 'SQLHENV' |
13:51:38 | shashlick | yep, i'm a few steps ahead - will share my results as soon as it compiles |
13:52:37 | * | matthiaswh joined #nim |
13:57:13 | shashlick | PMunch - here's what I have that compiles - http://ix.io/1Feb/nim |
13:57:29 | shashlick | some symbols conflict so needed editing |
13:58:39 | shashlick | here's what the wrapper looks like - //ix.io/1Fec |
13:58:45 | shashlick | http://ix.io/1Fec |
14:03:28 | livcd | coffeepot's odbc library does not work anymore? |
14:05:28 | * | vlad1777d quit (Ping timeout: 245 seconds) |
14:07:45 | PMunch | livcd, I got a connection now |
14:07:55 | * | PMunch quit (Remote host closed the connection) |
14:13:20 | planetis[m] | Hey what do you think: https://github.com/b3liever/looper |
14:16:07 | Araq | planetis[m], it's neat. I wouldn't use it in production though, |
14:16:23 | Araq | macros need to pull in their weight |
14:16:46 | * | JustASlacker quit (Remote host closed the connection) |
14:16:57 | Araq | and afaik you don't have to use macros for this, 2 templates would do |
14:17:09 | Araq | template repeat(body: untyped) = while true: body |
14:17:22 | Araq | template until(cond: bool) = if not cond: break |
14:18:06 | Araq | template until(cond: bool) = if cond: break # lol |
14:18:18 | Araq | I always get true and false wrong. |
14:19:47 | Araq | Oberon calls it 'loop' iirc which wouldn't clash with strutils.repeat |
14:23:22 | planetis[m] | yes, after i released it, realised that it can't work with a break before until |
14:23:33 | planetis[m] | it was fun though |
14:23:37 | livcd | and you did not get it before ? |
14:23:39 | livcd | oh he left |
14:26:44 | * | solitudesf joined #nim |
14:38:33 | * | metadave joined #nim |
14:50:29 | * | WilhelmVonWeiner joined #nim |
14:51:05 | WilhelmVonWeiner | how would I use a string in an if statement? |
14:51:20 | WilhelmVonWeiner | like `if string: echo string` |
14:52:24 | narimiran | if string.len > 0 |
14:53:46 | WilhelmVonWeiner | fair enough |
14:54:34 | FromGitter | <liquid600pgm> I always used `if str != ""`, but using `len` makes more sense in terms of performance |
15:35:01 | FromGitter | <alehander42> i am not sure if this is slower |
15:35:08 | FromGitter | <alehander42> if it is, we should optimize it |
15:35:34 | FromGitter | <alehander42> there was this idea of a geneirc isEmpty |
15:35:37 | FromGitter | <alehander42> or something like that |
15:35:39 | FromGitter | <alehander42> what happened |
15:36:43 | FromGitter | <alehander42> Araq, are owned refs based only on the gel paper |
15:37:49 | * | nsf quit (Quit: WeeChat 2.4) |
16:10:30 | * | abm quit (Ping timeout: 250 seconds) |
16:11:41 | * | rnrwashere joined #nim |
16:14:40 | * | Trustable joined #nim |
16:17:38 | * | rnrwashere quit (Remote host closed the connection) |
16:19:12 | * | CcxWrk quit (Ping timeout: 255 seconds) |
16:20:07 | * | CcxWrk joined #nim |
16:23:26 | federico3 | gel? |
16:24:44 | * | rnrwashere joined #nim |
16:25:05 | * | CcxWrk quit (Ping timeout: 268 seconds) |
16:28:12 | * | CcxWrk joined #nim |
16:36:37 | Zevv | https://www.yumpu.com/en/document/view/38020191/ownership-you-can-count-on-a-hybrid-approach-researcher-ibm |
16:38:58 | * | I_Right_I joined #nim |
16:46:46 | * | rnrwashere quit (Remote host closed the connection) |
16:50:52 | * | cgfuh quit (Ping timeout: 245 seconds) |
16:57:05 | * | floppydh quit (Quit: WeeChat 2.4) |
17:09:17 | Araq | alehander42: yeah, pretty much. I've tinkered with similar stuff before I found Gel |
17:09:40 | Araq | and when I read it was like reading something that I already knew, deep inside :P |
17:10:05 | Araq | which is why I'm so sold on the idea. |
17:27:12 | * | rnrwashere joined #nim |
17:32:13 | * | rnrwashere quit (Ping timeout: 268 seconds) |
17:39:44 | * | ng0 joined #nim |
17:47:45 | federico3 | Zevv: thanks. This looks better in case someone want it https://researcher.watson.ibm.com/researcher/files/us-bacon/Dingle07Ownership.pdf |
17:59:12 | * | Trustable quit (Remote host closed the connection) |
18:00:05 | * | abm joined #nim |
18:09:25 | Zevv | yeah that was a pretty bad link, sorry for that - was on mobile |
18:09:46 | * | theelous3_ joined #nim |
18:24:10 | * | rnrwashere joined #nim |
18:28:23 | rayman22201 | What are the other core team opinions on owned refs? narimiran and krux02? |
18:28:57 | krux02 | well I want owned refs. |
18:29:00 | narimiran | i don't know enough about the topic to give my opinion |
18:29:11 | rayman22201 | lol. fair enough |
18:29:19 | Zevv | two out of three ain't bad :) |
18:29:24 | krux02 | well I did not test them out in practice yet. |
18:29:33 | krux02 | But I really like to break the dependency to the GC |
18:29:37 | * | rnrwashere quit (Remote host closed the connection) |
18:29:57 | krux02 | and the owned refs are a concept that promise to do exactly that |
18:30:14 | krux02 | and I didn't see any reason why they would not work |
18:30:49 | rayman22201 | two out of three ain't bad at all :-P |
18:31:18 | krux02 | what do you think about it? |
18:31:40 | krux02 | rayman22201: ^ |
18:33:08 | rayman22201 | I'm a big fan. I like it. |
18:34:48 | rayman22201 | same reasons. I don't like the GC, and the logic of the proposal is actually very intuitive for me. |
18:40:21 | CcxWrk | I don't buy the determinism claims. The heap allocation/deallocation algorithm is not really deterministic by itself so you won't have anything deterministic building on top. |
18:41:47 | rayman22201 | read the paper... They do a pretty convincing job of proving that it is deterministic |
18:44:01 | rayman22201 | "Unlike garbage-collected languages, memory management in Gel is deterministic: objects are freed as soon as they are no longer needed." |
18:45:25 | CcxWrk | I've seen that. That doesn't prove a thing. The best you can hope with scheme like this is some bounded behaviour with specialized allocator. Which is definitely not what you'll get if you defer to libc. Have you seen the code to implement free()? |
18:47:55 | Zevv | How much effort and time would it take the core team (or solo Araq) to actually get this up and running up to a level that it is ready to be tested by others? There's a lot of discussion about wether or not this is a good idea; will this take a considerable share of resources which would otherwise be spent on other important tasks? |
18:48:44 | rayman22201 | Araq already has a prototype that is "almost" finished, and should be merged into devel soonish iirc. |
18:48:52 | Zevv | otherwise, why not just say: 'Go for it' to see where this is going |
18:49:08 | Zevv | well, that's pretty nice indeed. |
18:50:49 | rayman22201 | arguing about determinism and libc() free is silly. That's an implementation detail. I'm pretty sure everybody considers C to have deterministic memory management. |
18:50:58 | Araq | CcxWrk: we have an O(1) allocator, pretty deterministic |
18:51:21 | CcxWrk | What about deallocation? What about fragmentation? |
18:51:35 | Araq | read the paper about TLSF, that's what Nim implements |
18:51:55 | Araq | spoiler: deallocation is also O(1) |
18:56:11 | Araq | but most allocators are all pretty good these days, most claims about them are based on ignorance. People use the word "free list" like it implies traversing this list. This is not what happens, it's a simple linked list add/removal |
18:59:51 | CcxWrk | Interesting. How well does it handle reallocation? |
19:00:35 | Araq | that has not much to do with the underlying allocator's algorithms, either you can special case the alloc©Mem&dealloc dance or you can't |
19:00:52 | Araq | Nim's doesn't special case it but we could. |
19:01:57 | CcxWrk | Well, you preallocate extra size on string growth, so I guess that mitigates that. |
19:03:37 | Araq | yup |
19:04:10 | * | nsf joined #nim |
19:04:44 | CcxWrk | Reading the TLSF paper makes me want to design a language again. :P But I know better. |
19:04:53 | Araq | Zevv, it definitely takes up resources but most of the effort also makes destructors rock solid |
19:05:28 | Araq | so if it turns out to be a failure, not everything is lost |
19:06:10 | CcxWrk | The alias counting is a kind of design-by-contract thing as I see it. It provides runtime checking of program conforming to correctness constraints. |
19:06:36 | CcxWrk | So that's a good thing even if the implementation doesn't end up being faster or more predictable. |
19:11:06 | Araq | for me it's C++'s smart pointers done right. |
19:11:57 | Araq | a brilliant variation of its unique/shared/weak pointers |
19:50:21 | * | rnrwashere joined #nim |
19:52:06 | * | rnrwashere quit (Remote host closed the connection) |
19:53:46 | * | rnrwashere joined #nim |
19:55:22 | I_Right_I | I am willing to bet this would simply a lot of things when it comes to Threads, Threads Pools and maybe a few other things in the stdlib. |
19:58:05 | * | rnrwashere quit (Ping timeout: 258 seconds) |
19:58:36 | Araq | I_Right_I, as I said, it addresses the core pain points of Nim |
20:01:06 | Araq | and I've also figured out how the interop with a GC could look like but first we need this prototype and we need it yesterday |
20:10:07 | * | noeontheend joined #nim |
20:10:28 | * | nsf quit (Quit: WeeChat 2.4) |
20:14:54 | * | abm quit (Ping timeout: 250 seconds) |
20:14:55 | disruptek | i really don't understand why everyone has such an issue with this. the way i see it, if it's a 75% solution, that's 98% of what is practically needed. even if after building the thing, a major design flaw is uncovered, the mere fact that the compiler is refactored to support the concept and the language extended to enable its use is going to put everyone in a better position to try something else. |
20:15:01 | disruptek | plus, it's free language research for the rest of the world. what gives? why the hate? it's not like Araq is asking us to pay for it. :-P |
20:16:11 | * | narimiran quit (Ping timeout: 244 seconds) |
20:20:33 | * | Vladar quit (Remote host closed the connection) |
20:24:12 | * | rnrwashere joined #nim |
20:26:14 | I_Right_I | Well if you are a programmer that comes from GC only languages, ever book you read tells you about how the GC is a big hug that protects you from writing code that will destroy all hardware that code touches. |
20:27:18 | * | rnrwashere quit (Remote host closed the connection) |
20:27:25 | * | rnrwashere joined #nim |
20:29:58 | FromGitter | <alehander42> Please don't assume so much |
20:30:11 | FromGitter | <alehander42> There are great reasons to support a gc |
20:30:16 | FromGitter | <alehander42> No need to fud |
20:31:57 | disruptek | this may let the compiler make determinations about when the GC might be omitted. that could be a huge win/win right there. hugs don't have to go bye-bye. |
20:32:48 | * | noeontheend quit (Ping timeout: 250 seconds) |
20:33:05 | I_Right_I | alehander42: Oh, I don't mean to sound like anti GC activist. I agree with you. |
20:37:08 | I_Right_I | I was just pointing out the Idea of not having a GC could be scary to some. |
20:37:33 | disruptek | well, it really says something that we're still using boehm after 30 years. |
20:40:13 | FromGitter | <alehander42> Yeah no |
20:40:17 | FromGitter | <alehander42> No* |
20:40:21 | FromGitter | <alehander42> No prob |
20:40:55 | FromGitter | <alehander42> But still I think a lot of software works fine with gc and is writtrn in a better way with one |
20:41:23 | FromGitter | <alehander42> Because of less special nonlogic related code |
20:41:55 | FromGitter | <alehander42> Maybe even concurrency |
20:41:59 | disruptek | agree. and sometimes it's preferable to let a service leak memory or suffer a logic bug versus crashing. |
20:42:21 | FromGitter | <alehander42> I'd say most software works great hat way and doesn't need the little performamce boost |
20:42:37 | disruptek | it would be awesome to use GC as an auditor in debug and then take the training wheels off in release. |
20:42:43 | FromGitter | <alehander42> Of course there is some stuff that really requires it and the deterministic |
20:42:57 | FromGitter | <alehander42> Yeah you're right |
20:43:05 | FromGitter | <alehander42> But.i still feel wry catious |
20:43:11 | FromGitter | <alehander42> About a debug mode |
20:43:31 | FromGitter | <alehander42> You have to have excellent fuzzing and tests |
20:44:41 | FromGitter | <alehander42> The service point is true ye |
20:44:42 | disruptek | yes, good code is valuable. perhaps more-so when it's as dangerous as this. but that's where the language can add value (and good code) to the user's binary. |
20:45:48 | I_Right_I | alehander42: are you saying you think GC makes concurrency easier or harder |
20:46:30 | FromGitter | <alehander42> I think it can make it easier sometimes and that it can make expressing an algorithm easier |
20:46:47 | I_Right_I | ah, okay |
20:51:28 | I_Right_I | As far as the newruntime I don't really think it will take much of an adjustment. I think you will be able to write most algorithms with the same expressiveness and ease. |
20:55:20 | FromGitter | <alehander42> I hope so |
20:55:40 | FromGitter | <alehander42> My xp is a little bit with rust where I feel the mental overhead |
20:56:08 | FromGitter | <alehander42> Is unwarranted except if you need very low level or very fast code |
20:56:24 | FromGitter | <alehander42> But that's subjective |
20:57:53 | I_Right_I | oh I completely agree with you there. |
20:58:10 | disruptek | the whole idea is to dramatically reduce that without giving up any ease of writing naive code. |
20:58:24 | * | vlad1777d joined #nim |
21:03:33 | FromGitter | <Varriount> > _> |
21:06:04 | I_Right_I | yeah I am really excited about nim, after a couple days I was able to write(in the eye of the beholder) useful code. And I have never used a language with python like syntax. |
21:10:17 | * | thomasross_ joined #nim |
21:10:17 | * | thomasross quit (Killed (hitchcock.freenode.net (Nickname regained by services))) |
21:10:17 | * | thomasross_ is now known as thomasross |
21:11:42 | * | solitudesf quit (Ping timeout: 255 seconds) |
21:21:00 | * | rnrwashere quit (Remote host closed the connection) |
21:26:55 | rayman22201 | Varriount still does not believe lol |
21:28:22 | FromGitter | <alehander42> this is a very valid viewpoint |
21:29:59 | rayman22201 | what? skepticism? of course. I mean no disrespect to Varriount! |
21:33:20 | * | ptdel joined #nim |
21:35:35 | ptdel | is there a stdlib proc to sort a table? or should i do something like convert the table to a list of tuples and attempt to compare in some other way? |
21:37:50 | rayman22201 | use an OrderedTable: https://nim-lang.github.io/Nim/tables.html#sort%2COrderedTable%5BA%2CB%5D%2Cproc%28%2C%29 |
21:39:22 | ptdel | rayman22201: correct me if I'm wrong, but the ordered table only remembers insertion order, or does it actually sort things? example: it will alphabetically sort keys |
21:39:58 | rayman22201 | The sort function I linked you modifies the internal ordering to be sorted instead of insertion order |
21:40:55 | ptdel | oh I see what you are saying. If I initially create things as ordered tables rather than standard tables, I am able to sort on them |
21:40:59 | ptdel | thank you rayman22201 |
21:41:19 | rayman22201 | 👍 np |
21:41:57 | * | ptdel quit (Remote host closed the connection) |
21:48:16 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
21:48:45 | FromGitter | <zetashift> I also like the GC since I don't do anything bare-metal at all and current GC performs well. However in Araq's blog he did make good points |
21:48:53 | FromGitter | <zetashift> One which stood out for me was this one: ``` I have spent far more time now in fixing GC related bugs or optimizing the GC than I ever spent in hunting down memory leaks or corruptions. ``` |
21:57:11 | rayman22201 | It's not just bare-metal. Do you do anything with threads and shared memory, how about making a shared library? All of those things are painful in current Nim. |
21:57:54 | * | rnrwashere joined #nim |
21:58:08 | * | rnrwashere quit (Remote host closed the connection) |
21:58:33 | FromGitter | <zetashift> yea he mentions those in the blogpost, I also don't do much with that :P |
21:58:35 | * | rnrwashere joined #nim |
21:58:57 | rayman22201 | lol. Fair enough |
21:59:28 | FromGitter | <zetashift> it's a tricky thing and if it's gonna be a big part of the language I just hope it gets documentated well. |
22:02:43 | * | rnrwashere quit (Ping timeout: 246 seconds) |
22:02:49 | * | vlad1777d quit (Remote host closed the connection) |
22:03:03 | rayman22201 | It will definitely make the run-time and stdlib more deterministic and arguably more efficient (arguably less buggy too). The question is how much will it affect application code / end users. I don't think it will affect end user code that much, but we won't know until we try. It's definitely an experiment. |
22:03:09 | * | druonysus joined #nim |
22:03:09 | * | druonysus quit (Changing host) |
22:03:09 | * | druonysus joined #nim |
22:03:52 | * | stefanos82 quit (Remote host closed the connection) |
22:04:31 | * | abm joined #nim |
22:05:24 | * | vlad1777d joined #nim |
22:05:28 | FromGitter | <zetashift> It's gonna be a fun ride, especially for Araq |
22:06:12 | rayman22201 | He is already getting a mountain of crap for it. I don't envy him lol. Luckily he is not easily offended :-P |
22:08:37 | FromDiscord | <PusiteGA> i am newb but i think too for shared memory its better whitout GC |
22:10:52 | * | vlad1777d quit (Ping timeout: 245 seconds) |
22:10:57 | * | krux02 quit (Remote host closed the connection) |
22:13:47 | * | vlad1777d joined #nim |
22:15:12 | rayman22201 | yay. another +1 :-) |
22:18:00 | * | rnrwashere joined #nim |
22:22:06 | * | rnrwashere quit (Remote host closed the connection) |
22:22:12 | * | rnrwashere joined #nim |
22:43:20 | * | rnrwashere quit (Remote host closed the connection) |
22:44:14 | * | rnrwashere joined #nim |
22:44:54 | * | yglukhov[m] quit (Ping timeout: 264 seconds) |
22:45:03 | * | yglukhov[m] joined #nim |
22:47:53 | * | luis_ joined #nim |
22:58:24 | * | lritter quit (Quit: Leaving) |
23:03:29 | * | rnrwashere quit (Remote host closed the connection) |
23:05:39 | * | rnrwashere joined #nim |
23:06:49 | * | ikan-keli_ quit (Quit: ZNC 1.8.x-git-125-e415d9f5 - https://znc.in) |
23:07:36 | * | ikan-keli_ joined #nim |
23:15:03 | * | theelous3_ quit (Ping timeout: 245 seconds) |
23:17:38 | * | rnrwashere quit (Remote host closed the connection) |
23:17:49 | * | rnrwashere joined #nim |
23:17:58 | * | luis_ quit (Ping timeout: 246 seconds) |
23:34:51 | * | arecacea1 quit (Remote host closed the connection) |
23:35:10 | * | arecacea1 joined #nim |
23:40:29 | * | rnrwashere quit (Remote host closed the connection) |
23:45:21 | * | rnrwashere joined #nim |
23:47:52 | * | abm quit (Quit: Leaving) |
23:49:34 | * | rnrwashere quit (Ping timeout: 244 seconds) |
23:52:07 | * | rnrwashere joined #nim |
23:56:18 | * | rnrwashere quit (Ping timeout: 245 seconds) |
23:58:03 | * | rnrwashere joined #nim |