<< 15-01-2018 >>

00:09:01*Serenitor quit (Quit: Leaving)
00:26:07*arnetheduck quit (Ping timeout: 248 seconds)
00:26:28*MJCaley joined #nim
00:46:16*yglukhov joined #nim
00:51:06*yglukhov quit (Ping timeout: 268 seconds)
01:22:57*MJCaley quit (Quit: MJCaley)
01:23:54*MJCaley joined #nim
01:34:12*PMunch quit (Quit: leaving)
01:36:34*dddddd quit (Remote host closed the connection)
02:05:05*chemist69 quit (Ping timeout: 255 seconds)
02:11:02*vlad1777d quit (Ping timeout: 276 seconds)
02:18:43*chemist69 joined #nim
02:19:14*MJCaley quit (Quit: MJCaley)
02:37:28*Kingsquee joined #nim
02:49:05*arecaceae quit (Remote host closed the connection)
02:52:23*arecaceae joined #nim
03:03:08*chemist69 quit (Ping timeout: 255 seconds)
03:07:59*endragor joined #nim
03:08:20*endragor quit (Remote host closed the connection)
03:10:53*endragor joined #nim
03:16:45*chemist69 joined #nim
03:21:49*endragor quit (Remote host closed the connection)
03:22:16*endragor joined #nim
03:35:58*sz0 quit (Quit: Connection closed for inactivity)
04:24:53FromGitter<data-man> I have the brilliant idea (as always): to reopen my old PR #6630 and to add everything that is fixed in devel to the issue template . :-)
04:29:10FromGitter<gogolxdong> How to span a long string over multi-lines?
04:29:27FromGitter<Quelklef> """ ⏎ mutliline ⏎ string ⏎ """ [https://gitter.im/nim-lang/Nim?at=5a5c2e275ade18be3977d493]
04:30:22FromGitter<gogolxdong> Is it continuous?
04:30:26FromGitter<Quelklef> ?
04:30:37FromGitter<Quelklef> that becomes "\nmultiline\nstring\n"
04:31:30FromGitter<gogolxdong> a very long string ,like `http://ecs.aliyuncs.com/?AccessKeyId=TMP.AQG3fHzS2bwnu1i-jxjYHWPqowQ8MXt_rNy75zFzLPrSwt7IiaqLSy2Kg7jPADAtAhQ-fIECC99A0CTTEG087Xs2KKJfoAIVAJud_i-8rBS7TWWLwtX81x0_E7MT&Action=DescribeInstances&Format=JSON&RegionId=cn-shenzhen&SecureTransport=true&SignatureMethod=HMAC-SHA1&SignatureNonce=1efbd9761c6577e6165d66ae3e05e267&SignatureVersion=1.0&SourceIp=14.215
04:31:30FromGitter... .128.135&Timestamp=2018-01-15T04%3A23%3A43Z&Version=2014-05-26&Signature=o8HEu2Dou62KtHbNW5DbQC6eF34%3D`
04:34:11FromGitter<gogolxdong> post in vscode makes scrolling.
04:34:24FromGitter<Quelklef> ahhhhhh i see
04:34:29FromGitter<Quelklef> lemme try somth
04:34:48FromGitter<Quelklef> Wait, just do """ ⏎ http:// .... ⏎ more stuff ⏎ more stuff ⏎ """.join("\n") [https://gitter.im/nim-lang/Nim?at=5a5c2f685a9ebe4f7589681f]
04:35:54FromGitter<Quelklef> er, .split("\n").join("")
04:36:01FromGitter<Quelklef> w/ sequtils
04:58:56*darithorn quit (Quit: Leaving)
05:15:46FromGitter<gogolxdong> Does it work?
05:15:58FromGitter<Quelklef> try it my man
05:16:13FromGitter<gogolxdong> seems not.
05:16:23FromGitter<Quelklef> Hm. On what input?
05:16:45FromGitter<gogolxdong> `expression: join(split("""http://ecs.aliyuncs.com/?AccessKeyId= ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a5c393c5a9ebe4f75898b6c]
05:18:59FromGitter<Quelklef> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a5c39c21dcb91f1774f4c9e]
05:19:21FromGitter<Quelklef> I dunno what "\x0A" is but seems sus tbh
05:19:53FromGitter<Quelklef> Wait, what? We're doing different things. Just try what I put
05:28:33FromGitter<Quelklef> Oh, you know, '\r' is carriage return and '\l' is linefeed iirc. You don't have to use escaped hex codes
05:29:58FromGitter<data-man> @gogolxdong: Maybe you need to use the maxsplit parameter?
05:30:43FromGitter<Quelklef> The code he sent isn't even multilined
05:40:07FromGitter<data-man> let s = "http://ecs.aliyuncs.com/?AccessKeyId=TMP.AQG3fHzS2bwnu1i-jxjYHWPqowQ8MXt_rNy75zFzLPrSwt7IiaqLSy2Kg7jPADAtAhQ-fIECC99A0CTTEG087Xs2KKJfoAIVAJud_i-8rBS7TWWLwtX81x0_E7MT&Action=DescribeInstances&Format=JSON&RegionId=cn-shenzhen&SecureTransport=true&SignatureMethod=HMAC-SHA1&SignatureNonce=1efbd9761c6577e6165d66ae3e05e267&SignatureVersion=1.0&SourceIp=14.215.128.135&Timestamp=
05:40:07FromGitter... 2018-01-15T04%3A23%3A43Z&Version=2014-05-26&Signature=o8HEu2Dou62KtHbNW5DbQC6eF34%3D" ⏎ echo wordWrap(s, 25)
05:40:51FromGitter<Quelklef> oh, was he wanting to *display* a long line split by linebreaks? mb
05:43:26FromGitter<data-man> I understood exactly so :-)
06:14:19*nsf joined #nim
06:21:22*def-pri-pub left #nim (#nim)
06:47:14*yglukhov joined #nim
06:51:43*yglukhov quit (Ping timeout: 248 seconds)
06:52:46livcduh what is ref object or when do I use it instead of plain object ? :O
07:05:29*endragor quit (Remote host closed the connection)
07:07:52*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
07:10:41*chemist69 quit (Ping timeout: 276 seconds)
07:14:35*stevenfx joined #nim
07:23:14*earenndil quit (Quit: ZNC 1.6.3+deb1 - http://znc.in)
07:24:19*chemist69 joined #nim
07:25:16*earenndil joined #nim
07:30:46*endragor joined #nim
07:36:08*endragor quit (Ping timeout: 276 seconds)
07:40:19*benoliver999 quit (Quit: ZNC - http://znc.in)
07:42:17*SenasOzys joined #nim
07:44:04*pwntus joined #nim
07:44:40*miran joined #nim
07:46:00*endragor joined #nim
07:46:06*pwntus quit (Changing host)
07:46:06*pwntus joined #nim
07:46:32*benoliver999 joined #nim
07:47:19FromGitter<mratsim> You use plain object except when you need a reference (senantics, inheritance, expensive copy, ...)
07:47:29*benoliver999 quit (Client Quit)
07:48:52*couven92 joined #nim
07:49:04miranlivcd: see if this PMunch's post helps: https://www.reddit.com/r/nim/comments/7dm3le/tutorial_for_types_having_a_hard_time/
07:49:38FromGitter<mratsim> A ref object is similar to objects in Python/Java/Ruby (garbage collected)
07:49:54FromGitter<mratsim> An plain object is similar to struct in C
07:51:50miranmratsim: what would be preferred to use generally? or: when to use which type?
07:53:40*benoliver999 joined #nim
07:54:49*benoliver999 quit (Excess Flood)
07:55:54livcdi'll check it out in a minute or two :)
08:09:41*benoliver999 joined #nim
08:17:03FromGitter<alehander42> @mratsim why do you have to explain it to french people :D does array mean something bad in french
08:24:03*PMunch joined #nim
08:24:19*couven92 quit (Quit: Client Disconnecting)
08:27:51*Serenitor joined #nim
08:27:55*Vladar joined #nim
08:28:07FromGitter<mratsim> too hard to pronounce/retain
08:28:22FromGitter<alehander42> I like how in the lang distribution graph in github, Nim has " Prolog 0.1% " :D wrongly matcher perl file ?
08:28:29FromGitter<alehander42> matched*
08:29:00FromGitter<alehander42> ah, interesting
08:48:52*Yardanico joined #nim
08:49:28*zahary joined #nim
08:50:24FromGitter<survivorm> @alehander42 Care to share a link? As collection page on github doesn't show distribution, and githut doesn't count nim at all as it's not in top 30 by repo activity
08:52:18FromGitter<survivorm> And it's outdated, as latest data at githut is 14Q4
08:54:27*floppydh joined #nim
08:55:03FromGitter<alehander42> nah, I mean https://i.imgur.com/2hxLGfq.png
08:55:27FromGitter<survivorm> ah, ok
08:56:16FromGitter<alehander42> ah I see, I thought it's updated often, there was a time when trending repo-s seemed old tho
08:56:24*Yardanico quit (Read error: Connection reset by peer)
09:08:42*yglukhov joined #nim
09:13:22*yglukhov quit (Ping timeout: 265 seconds)
09:13:25*yglukhov_ joined #nim
09:14:30*yglukhov_ quit (Remote host closed the connection)
09:14:45*yglukhov joined #nim
09:33:07PMunchHow would one interface Nim with C#? Has anyone done it?
09:34:20PMunchI want to create a DLL to be loaded by existing C# code that I can't edit
09:39:59FromGitter<data-man> @mratsim: Are you still interested in viewing a images in a console?
09:41:49FromGitter<data-man> I found https://github.com/orangeduck/imgcurses Maybe helpful. :-)
09:42:14PMunchI also made a png loader for drawille :)
09:47:27FromGitter<data-man> @PMunch: I guess that drawille has more grain. :-)
09:49:47*PMunch_ joined #nim
09:50:14PMunch_Well yeah, but colours are still in a 2x4 grid since it can only be applied per character
09:51:27*SenasOzys quit (Remote host closed the connection)
09:52:29PMunch_https://i.imgur.com/Iw3kdJ9.png
09:52:49PMunch_That's the house from the thing you sent
09:53:08PMunch_It might look better with a slightly lighter background though
09:56:11*endragor quit (Remote host closed the connection)
09:58:43*endragor joined #nim
09:59:49FromGitter<data-man> When (and if) my truecolored PR will be merged, maybe will look better. :)
10:02:26PMunch_Well, truecolor might help a bit
10:02:48PMunch_But the real problem is that only every 2x4 grid can be coloured..
10:04:27FromGitter<data-man> Maybe to mix a drawille and imgcurses?
10:04:42PMunch_You can make it look a bit better though by pre-processing it to remove some of the details that get's removed anyways: https://i.imgur.com/ieVcf3q.png
10:04:53PMunch_That's with GIMPs "cartoon" filter
10:04:58PMunch_Which enhances edges
10:05:32PMunch_Yeah it seems like imgcurses does something like that pre-processing
10:05:36FromGitter<survivorm> much better, but still bad :)
10:06:01FromGitter<survivorm> If you're not offended by a side opinion
10:06:37livcdhow can i print an object's type ? https://glot.io/snippets/exdpqinlsc
10:07:46FromGitter<survivorm> make a proc, maybe?
10:11:08FromGitter<data-man> echo $name(type(a))
10:14:30FromGitter<survivorm> @data-man You know, why it doesn't work as dot syntax? type() isn't a function?
10:14:58FromGitter<data-man> No :)
10:15:05FromGitter<survivorm> because this is not UCS-lika :)
10:16:46livcdthanks!
10:17:33FromGitter<survivorm> Is there a way to do similar in dot notation? Just curious
10:17:47*stevenfx quit (Read error: Connection reset by peer)
10:18:06*stevenfx joined #nim
10:20:48FromGitter<data-man> proc `.name`T (a: auto) = name(type(a))
10:21:21*yglukhov quit (Ping timeout: 248 seconds)
10:21:46livcdwhat is this object proc field ? https://glot.io/snippets/exdq5geczc
10:22:02FromGitter<data-man> ```proc `.name`(a: auto) = name(type(a))```
10:22:24cremSo, there will be no breaking changes before 1.0 because of book, and no breaking changes after 1.0 because it's 1.0? :-( I like when it breaks.
10:22:54*Serenit0r joined #nim
10:23:04FromGitter<survivorm> Is it really necessary?
10:23:14FromGitter<survivorm> To break, i mean
10:24:20FromGitter<survivorm> You may still wait for improvements, new functional and even new paradigms.
10:24:31*Serenitor quit (Ping timeout: 248 seconds)
10:24:58FromGitter<survivorm> AND be shure that programm You written 2(3-4-5...) years ago still works
10:25:14FromGitter<survivorm> That's a bonus, i think
10:26:37FromGitter<survivorm> BTW, @data-man, you shadowed object's name attr :)
10:28:20FromGitter<survivorm> @livcd It's ability to pass to object a proc with no parameters, if that's what you there asking
10:28:41FromGitter<survivorm> as an attribute, of cource
10:33:38*yglukhov joined #nim
10:34:23livcdsurvivorm: i guess. Could not find it in documentation
10:34:23dom96crem: no, there will be no breaking changes to things documented in the book before 1.0
10:34:27livcdsaw it in the code somewhere
10:34:30*arnetheduck joined #nim
10:35:17cremToo bad finalizer parameter for new() was documented there. :)
10:35:29dom96was it?
10:35:38dom96I don't think so
10:36:16cremMaybe it wasn't, then it's ok. :) I don't really remember, read that book in August.
10:36:38FromGitter<survivorm> @livcd As i understand it, it's like forward declaration, like: I would like to pass proc with such params to this object, and work with it (in future)
10:37:00livcdsurvivorm: not sure i understand though...how do i pass it to the object ?
10:37:42FromGitter<survivorm> A minute. I'll compose example
10:42:50dom96It's a field that stores a reference to a procedure
10:43:30dom96PMunch: C# can load C DLLs, so just look up how to interface with C from C#
10:48:13FromGitter<survivorm> @livcd https://glot.io/snippets/exdqvrbxhh
10:48:25FromGitter<survivorm> something like this
10:48:48FromGitter<survivorm> and usage like a.calc(...)
10:50:08dom96btw please use https://play.nim-lang.org instead of glot.io :)
10:52:48*couven92 joined #nim
10:58:36FromGitter<survivorm> @dom96 ok :)
11:00:03FromGitter<survivorm> @alehander42 Did you try py2nim on something real? Like jinja2 for example? (I think it's clone/port will be very velcome under nim :) )
11:01:18FromGitter<survivorm> And i'm not telling it should be ready out-of-box. But how much needs fixing in reality?
11:01:52*Serenitor joined #nim
11:04:17*Serenit0r quit (Ping timeout: 256 seconds)
11:08:19FromGitter<andreaferretti> @survivorm
11:08:24FromGitter<andreaferretti> DO you know about https://nim-lang.org/docs/filters.html ?
11:08:34FromGitter<andreaferretti> Not quite jinja
11:08:43FromGitter<andreaferretti> But nicely integrated into nim and works at compile time
11:13:20dom96yeah, filters are great, definitely could use some improvements to make them even better though
11:18:56Araqcan't be improved, they are in your book :-)
11:19:11dom96They can
11:19:57dom96we can easily make a better version behind a different shebang
11:23:34FromGitter<alehander42> I admire the goal to not break anything in the book, but isn't that why books have second, third edition etc? technologies inevitably change a bit
11:24:46Araqthe book is about Nim v1. so we better release v1.
11:25:10Araqonce that is done, we can change things in a hopefully civilized manner
11:26:41FromGitter<alehander42> @survivorm I've applied py2nim for some ethereum py libs, and some modules of the ethereum virtual machine only. I hope eventually it would be useful for stuff like jinja2 but it all depends on the particular codebase etc. as a whole I think it would shine mostly to speed up porting smaller libraries implementing all kinds of api wrappers/parser/config stuff/algorithms/protocols etc
11:28:11FromGitter<alehander42> bigger projects often need architectural changes in your port and some of them are deeply based on very dynamic stuff(metaclasses etc) which would be recreated in a better way from scratch with Nim-ish tools (macros etc)
11:29:08FromGitter<alehander42> @Araq I agree, so 2018 is v1 year, right : )
11:31:52*Yardanico joined #nim
11:34:35mirani've read some articles from 2014 claiming 2014 is v1 year :D
11:35:01miran...and some comments from 2015, 2016, .... :D
11:35:02*yglukhov quit (Read error: Connection reset by peer)
11:35:15arnetheduckthat means there's still a chance to get rid of the weird platform-dependent/indeterministic newlines
11:35:26*yglukhov joined #nim
11:36:36Araqmiran, yeah that's how professional software development looks like. 4 years too late already but v1 will be awesome ... with all the features we already had, but now with fewer or different bugs
11:37:47FromGitter<alehander42> @miran Nim is langdev's Liverpool
11:38:39miranalehander: nim is linux? :)
11:38:57livcdsurvivorm: thanks. Ill check it out
11:39:08miranAraq: 4 years too late IF it comes out this year :D
11:40:06mirani guess it should either come out soon, or we should add a section to FAQ about it, because that is definitely the most asked question about nim
11:41:00FromGitter<survivorm> I think it scares some people away
11:41:12FromGitter<survivorm> Newbies, mostly
11:42:09FromGitter<survivorm> They think: "Ah, the project is not yet v 1.x, probably it is lacking most basic things"
11:42:13mirani would say those are experienced people who don't want to get into something until they think it is here to stay
11:42:30FromGitter<survivorm> But it doesn't
11:42:38miranv1.0 has some psychological impact, you cannot deny it
11:42:51miranbtw, you know the story about python 2?
11:43:03FromGitter<survivorm> Which one?
11:43:16*Yardanico quit (Read error: Connection reset by peer)
11:43:57FromGitter<survivorm> @alehander42 imagine porting sqlalchemy to nim :)))
11:44:04miranthey decided to release python 2, because seeing number 2 there felt like a more professional (and older) language than 1.x
11:44:11dom96I'm expecting to see hordes of people suddenly using Nim when we release v1
11:44:16dom96Immediately, otherwise I'll be disappointed :P
11:44:35livcddom96: convince FB to invest 500m$
11:44:37livcd:D
11:44:48mirandom96: yup, all those "i will wait until v1.0 is out" people will suddenly start to use nim
11:45:10FromGitter<survivorm> Dom, looks like you're a bit in illusion :)
11:45:14dom96arnetheduck: you mean \n?
11:45:17cremYou should have started from 1.0. :)
11:45:26mirandom96: but i really do feel it will make nim more attractive to (some of) those people
11:45:32FromGitter<survivorm> "That doesn't work that way " (C)
11:46:30dom96IMO the fact that Nim has been active for so long should be enough to convince people of its viability
11:46:46dom96Many languages came and went during Nim's lifetime :)
11:47:26FromGitter<survivorm> But the fact is, nim SHOUD get v 1.0 ASAP. I'll say then everyday code is stable, but it's more of the @Araq 's knowlege
11:47:29miranif there are no more big/breaking stuff coming before v1.0, then let's fix those high priority bugs and let's enjoy the millions of new users coming because of v1.0
11:48:26FromGitter<survivorm> @dom96 The fact is - people are lazy. Many even wouldn't look if they se version below 1.0
11:48:28miransurvivorm: there is some stuff introduced in 0.17.3 which is buggy, this should be fixed before releasing v1.0
11:48:52miranbut generally, i agree with you
11:48:59cremIs there 17.3?
11:49:03FromGitter<survivorm> I'm not telling to say "Now we are v.1"
11:49:07dom96After v1 we'll have people coming in, finding things that they dislike which can no longer be changed and leaving because "well, you guys should have fixed it before v1"
11:49:11dom96that's my main worry
11:49:30dom96crem: all odd minor releases refer to 'devel'
11:49:40FromGitter<survivorm> But too early is as bad as too late
11:49:41mirandom96: this will happen even if we wait for 20 more years
11:49:41cremah
11:49:51dom96miran: true
11:49:57dom96In any case, we've waited long enough
11:50:12mirandom96: those things can be fixed in v1.1 if they're minor, or in v2.0
11:50:12dom96But I'm not making any promises (yet) :P
11:50:20*dddddd joined #nim
11:50:53mirandom96: because of all the promises made in 2017, 2016, ....? :P
11:50:58FromGitter<survivorm> So i agree about the bugs. Fix major, release, then fix minor
11:50:59cremThere are indeed some things I don't like which I hope to be fixed (pre or post 1.0). Namely, the destructors. Other things (like missing constructors) I can live with.
11:51:05dom96miran: hrm? By whom? and where?
11:51:29FromGitter<krux02> What about the features that are not documented and forgotten but still there
11:51:29*Kingsquee quit (Ping timeout: 276 seconds)
11:51:40FromGitter<krux02> will they also be frozen with Version 1.0
11:51:46mirandom96: sorry i don't keep the archive ready, but i know i've read a lot of "coming soon" comments on reddit and HN
11:51:47FromGitter<survivorm> Why?
11:51:56dom96krux02: yes
11:51:57*gokr joined #nim
11:52:07dom96miran: Did I ever say "v1 is coming this year?" :P
11:52:16miran:D
11:52:27dom96You can't hold "coming soon" against me
11:52:40dom96But of course, v1 is coming soon :P
11:52:44miran:D :D
11:52:49miranthis year?
11:52:49FromGitter<survivorm> @dom96 Why? Why save the outdated stuff? Or are you talfing about deprecated only?
11:52:52dom96Much sooner than it was the last time I said this
11:53:09dom96survivorm: not sure what you mean
11:53:44FromGitter<survivorm> Your answer to krux02 if I understood it correctly
11:54:00mirandom96: so, now that fmt/% story is over, you and Araq are concentrated on high priority bugs and that's it? :)
11:54:13*stevenfx quit (Read error: Connection reset by peer)
11:54:24*stevenfx joined #nim
11:54:34livcdI think poeple want to see shiny things that can be done in Nim. I think few similar projects and videos about building something like Reel Valley would raise Nim's popularity
11:54:43dom96survivorm: no, I'm talking about features which are not documented
11:54:58FromGitter<survivorm> Ah
11:54:59dom96There is plenty of stuff used every day which isn't documented, for example: except Exception as err:
11:55:22miranlivcd: agreed. unfortunately, i'm not experienced enough to make shiny stuff.... :(
11:55:26dom96miran: Right now I'm concentrated on FOSDEM
11:55:46FromGitter<survivorm> Yeah, some stuff in nim is pretty badly documented :)
11:55:51FromGitter<mratsim> So Php will be in v1? @data-man thanks for imgcurses!
11:55:53miran...where you will release v1.0? :D
11:56:34miransurvivorm: write it better and submit a PR?
11:57:00livcdmiran: so gotta start with something simple...flappy bird ? :)
11:57:17FromGitter<survivorm> @miran If i'm using it and not lazy enough - shure
11:57:52miranlivcd: well, i managed to solve two years of 'advent of code' in nim, but that's probably not shiny enough
11:57:53FromGitter<survivorm> And if I'm able to understand the code, of cource
11:58:48arnetheduckdom96, yes.
11:59:13Araqmratsim: Php backend is not part of Nim.
11:59:14FromGitter<alehander42> @survivorm I think exactly libs like sqlalchemy are best used only as inspiration for Nim libraries: in Nim you'll build your whole DSL in a different (maybe more powerful) way, a lof of stuff will happend and will be checked in compile time and just translating a dynamic lang lib would miss a lot of the power of a well designed Nim lib
11:59:28dom96arnetheduck: That's documented in my book I'm afraid
11:59:31Araqsee Ormin :-)
11:59:45arnetheduckbooks can have errata
12:00:31dom96Why do you want this changed?
12:04:08Araqarnetheduck, book version X corresponds to Nim version 1.x is still a nice thing to have
12:04:10arnetheduckbecause it changes a well-established meaning of an escape to random sequence that the person writing the code has no control over, leading to less reliable software. it's a solved problem, go with the flow and move on instead of introducing a useless unique snowflake solution that was only began to be remotely reasonable in a dated world where applications ran on a single platform without internet access
12:04:36Araq?
12:04:44Araqthat came out of nowhere
12:04:55Araqwhat do you mean? version 1 is for suckers?
12:04:58arnetheduckhaha, it's been bugging me since day 1 with nim ;)
12:05:52arnetheduckimagine the amounts of useless code people have had to write because some smartass thought \ is so much better that / for path separators - this is the same thing
12:06:02Araqno idea what you mean.
12:06:11livcdprobably windows unc paths
12:06:56arnetheduckI mean that when I write \n, I want a newline, and not a carriage return+linefeed sometimes
12:07:31livcdyes!
12:08:39PMunch_arnetheduck, so use \l?
12:08:41arnetheduck(and by newline, I mean a single line feed which all apps except notepad handle in 2018)
12:09:02Araqoh so it's about \n, I don't care
12:09:10PMunch_Which in Nim produces a linefeed
12:09:18euantorI find `\n` extremely useful personally
12:09:31arnetheduckPMunch_, I don't want to have to remember that for one language in the world, only
12:09:59PMunch_arnetheduck, it's not that hard to remember :P Linefeed -> \l
12:10:05PMunch_Newline -> \n
12:10:24PMunch_Carriage return -> \c
12:12:03Araqprotocols are full of \c\l, *shrug*, it's not only a Windows/Nim problem
12:12:29Araqok, if you never care about "internet access" ... oh wait
12:13:10arnetheduckevery protocol spec out there will use \r\n, as will every example of any kind of escaped string that I'm reading and copypasting from.
12:14:07arnetheduckexcept nim, that is. why not do \N for non-deterministic newlines and leave the rest as is, in c?
12:14:43Araqok, copy&paste is broken, too bad, what else can you copy&paste from a protocol spec? nothing whatsoever?
12:15:47cremI'm not really fond of nim's \n either. It would be better that if something useful like that is introduced, some new sequence (like \l) would be assigned to it.
12:16:07cremDifferent meaning of \n will surprise people a lot!
12:16:18cremBut it's fine, I can live with that.
12:16:26FromGitter<krux02> how is "\n" in Nim different?
12:16:36Araqthere were good reasons for why \n is the way it is.
12:16:46FromGitter<krux02> I just use it in strings for echo and it works in that context as expected
12:16:47AraqI agree we should change it.
12:17:10Araqbut it's not an evil conspiracy by Araq.
12:20:25dom96I understand the opposition but I don't think it's that difficult to learn what \n means in Nim
12:20:55livcdand what does it mean ? I did not get to that section in your book :D
12:21:00arnetheduckkrux02, in nim, \n gives you either one or two byte depending on the compiler options that the person compiling your code is using. it's quite a surprise when you work with many kinds of cross-platform code, and you won't notice it until it's too late and your app is out there.
12:21:40PMunch_Yeah, I'd argue that for those this will cause a problem for it's better to have \n be platform specific. People who implement protocols and the like will quickly learn that they have to use \l
12:21:56PMunch_It's one of the first thing I remember learning about Nim :P
12:23:16cremThe problem will be for people who develop on linux (for example), and use '\n' everywhere they should have used \l, and then when they compile on windows, they have bugs.
12:23:24*PMunch quit (Disconnected by services)
12:23:28*PMunch_ is now known as PMunch
12:23:42*PMunch_ joined #nim
12:23:46Araqwell hardly since they cannot compare to '\n'
12:23:48arnetheduckthere's surprising unity on what the escapes mean (more so than anything else) - can't think of any language that does this differently - and it looks like it works when your on mac/osx, only to have weird failures on win
12:24:24Araqyou can only compare to "\n" and that should have made people suspicious
12:25:10FromGitter<alehander42> @dom96 "I don't think it's that difficult to learn what \n means in Nim" many users wouldn't even suspect that they have to "learn" something like that
12:25:34Araqfwiw I want to change \n because it's "too correct". I write programs that generate Nim source code and the source code has CRLF endings on Windows and then 'git diff' fucks around
12:25:42cremHm, let me check if I used \n in my code..
12:25:59arnetheduckI'm not saying that it's impossible or even hard to learn. it's just a source of useless bugs that could be avoided..
12:26:34cremHm, I don't have it in bitbucket, will check at home.
12:26:37arnetheduckAraq, I actually agree with that ;) but there's a strong pragmatic argument at play
12:27:59arnetheduckalehander42 +1
12:28:35Araqarnetheduck, that's not true either though \u00ff are hardly handled the same across languages
12:29:36*Serenit0r joined #nim
12:30:01cremBtw if there were agreement that that meaning of "\n" has to be changed, would it be better to do pre-v1.0 or post-v1.0? Just hypothetical question to understand the breaking changes introduction strategy.
12:30:37arnetheduckunicode indeed - those came after - but the dozen or so regularly used ascii codes before whitespace - yes (\n,\t,\r, a few more that are practically unused these days)
12:31:57Araqcrem, post-v1.0 since it's in the book :-)
12:32:05cremok :)
12:32:09*Serenitor quit (Ping timeout: 264 seconds)
12:32:23Araqwe can give you switch --saneNewlines earlier than that though
12:32:57arnetheduckthought of introducing source headers a la haskell btw?
12:33:21cremI personally didn't have any inconveniences because of that.
12:34:45dom96This is mentioned in my book, but AFAICS none of the examples depend on this definition of '\n'
12:34:55Araqarnetheduck, not sure how Haskell does it but I thought about {.nimversion: "1.0".}
12:35:02dom96In fact, one of them might be broken because of this behaviour :P
12:38:23arnetheduckno shit, the books gets it wrong?
12:40:32dom96oh, no, it doesn't
12:40:33arnetheduckAraq, haskell does something like, but has granularity for individual features instead.. something like {.saneNewLines, experimentalConcepts.}.. then the "default" feature set you get depends I think on the haskell version you supply to the compiler
12:40:57dom96thankfully I use splitLines instead of split("\n")
12:41:21FromGitter<andreaferretti> ugh... this is probably the major source of complaint against Haskell
12:41:25FromGitter<andreaferretti> let's not copy from that
12:41:27dom96yeah
12:41:34dom96that's a horrible thing to take from Haskell
12:41:51*dom96 has flashbacks of the 50 million different string options Haskell offers
12:43:45Araqdom96, I like the idea
12:45:05Araqoh come on. non deterministic thread IDs?
12:45:20dom96I like the idea of an ``epoch`` that Rust is using http://words.steveklabnik.com/looking-back-at-rust-in-2018
12:45:26Araqdo I have to count everything on my own here...
12:46:13*Snircle joined #nim
12:49:20Araqwhat does "epoch" do? same as std=C99 ?
12:51:24dom96read the post
12:51:31AraqI did.
12:52:31dom96well that's the extent of my knowledge on it
13:04:57*gokr left #nim (#nim)
13:24:54*PMunch_ quit (Quit: Leaving)
13:25:04*craigger quit (Quit: bye)
13:26:07*zahary quit (Quit: Leaving.)
13:27:19*craigger joined #nim
13:28:26*zahary joined #nim
13:32:00*wastedone_ joined #nim
13:40:26*zahary quit (Quit: Leaving.)
13:46:22*craigger quit (Quit: bye)
13:47:24*zahary joined #nim
13:48:27*craigger joined #nim
14:02:34dom96but the general idea I think is that we shouldn't have so much granularity with new features
14:02:44dom96or with breaking changes
14:02:57dom96because people will never adopt all of them
14:03:19Araqso like nim-2018, nim-2020?
14:03:49dom96yeah
14:03:53FromGitter<survivorm> Yes. But if people think some functional is... not good, why not change it?
14:04:14cremBecause of the book!
14:04:26FromGitter<survivorm> The example with "\n" is one of them
14:04:47FromGitter<survivorm> I'm not talking about v.1.0
14:05:03FromGitter<survivorm> the idea is "in general"
14:05:16dom96in general we will change it
14:05:24dom96and if there is something wrong tell us
14:05:33dom96this "\n" feature has been in the language for a long time
14:05:43dom96telling us now is better than after v1
14:05:50Araqit also did bite people for a long time
14:05:52dom96but would have been better two years ago
14:05:59Araqhowever not in catastrophic ways
14:06:07Araqas '\n' doesn't even compile
14:06:19FromGitter<survivorm> but i doubt many people stumble on it
14:06:44FromGitter<survivorm> but if they do, they get confused
14:07:02FromGitter<survivorm> and upset, i think
14:07:34Araqit's better to change it but let's also not overblow its importance
14:07:36cremhttps://forum.nim-lang.org/t/2666 that seems to be one example :)
14:07:51FromGitter<survivorm> It's complication, a unneded one, even if "the right thing"
14:07:57cremYeah, \n thing is not that severe.
14:08:09FromGitter<survivorm> Just an example
14:08:21FromGitter<survivorm> A strategy to deal with things
14:08:41cremWhat worries me is that it'll be harder to make "courageous" changes in the language.
14:08:59FromGitter<survivorm> Language is not set in stone, i hope
14:09:01dom96Araq: I guess your {.nimversion.} idea is similar
14:09:21FromGitter<survivorm> @crem I doubt
14:09:23Araqwell we have a strategy, the problem is that I'm not gonna change things immediately, I collect feedback and then eventually change my mind :P
14:09:40Araqand then you can say "2 years too late" :P
14:10:12FromGitter<andreaferretti> I think the only issue when working with Nim is that too many new ideas are tried before the previous ones are settled
14:10:19FromGitter<survivorm> The idea is not about not doing, more like - tried, f@cked, changed
14:10:24*stevenfx quit (Ping timeout: 256 seconds)
14:10:40Araqbut we cannot nillywilly change the language just because somebody somewhere had a bug, that's true for everything
14:10:52FromGitter<survivorm> yeah
14:10:54FromGitter<survivorm> sure
14:11:05FromGitter<andreaferretti> for instance when I started static[T] and concepts where deemed unstable
14:11:32FromGitter<andreaferretti> but since then other things were attempted, like destructors or region based memory management
14:11:34Araqand now they are ... ?
14:11:48FromGitter<andreaferretti> while static[T] and concepts still have issues
14:11:48FromGitter<survivorm> more like we'd better say some syntax is experimental
14:12:03FromGitter<survivorm> and may be changed in future
14:12:03cremdestructors? Are they still planned?
14:12:14*stevenfx joined #nim
14:12:17FromGitter<survivorm> as it is now (afaik)
14:12:22*alexday quit (Quit: ZNC 1.6.5 - http://znc.in)
14:12:26Araqandreaferretti: well that's more the split of work than anything else
14:12:36FromGitter<andreaferretti> Yeah I understand
14:12:48FromGitter<andreaferretti> I am still here after all :-)
14:13:08FromGitter<andreaferretti> but I fear this may hurt Nim popularity
14:13:30FromGitter<andreaferretti> people are afraid to try some features because they kind of work until they don't
14:13:52Araqyeah no idea how to introduce new features :-)
14:14:12FromGitter<andreaferretti> ideally, one at a time :-D
14:14:52Araqok but then it's not used in the wild so it lacks feedback
14:14:55FromGitter<andreaferretti> otherwise there is a split between basic Nim (guaranteed to work) and the rest (use at your own risk)
14:15:05FromGitter<andreaferretti> that's true as well
14:15:19FromGitter<andreaferretti> I don't claim to have a solution
14:15:25*Zevv left #nim (#nim)
14:15:29miran"it's better to change it but let's also not overblow its importance" --> so it is ok if this is changed and the book is slightly wrong on this one?
14:15:43Araqcrem, destructors are like Game of thrones dragons
14:15:57Araqmiran, that's dom96's decision, I'm fine with either solution
14:16:16Araqcrem, "they are coming" and then eventually they come and blow everything away
14:17:01cremActually, development multiple features and then releasing as a bundle is not nice in terms of keeping feature developer's enthusiasm. Having constant feedback for small features is more motivating.
14:17:27cremWaiting for destructors, then. :)
14:18:23miranAraq: well, dom96 said "This is mentioned in my book, but AFAICS none of the examples depend on this definition of '\n'" --> sounds to me like this could be changed/corrected for v1.0
14:18:38Araqagreed.
14:19:15dom96IMO we should ask for more people's opinion i.e. someone create an issue for this
14:20:33miranarnetheduck: you started this, you open the issue :)
14:21:00dom96also, I'm not sure whether this qualifies as an 'errata' entry for my book
14:21:06FromGitter<survivorm> Personally, i vote for the \n - as in other langs.
14:21:16dom96if we do decide to change it that is
14:21:17*stevenfx quit (Ping timeout: 256 seconds)
14:21:59FromGitter<survivorm> Much the same thing, as almost everythere people count 1kb = 1000 bytes.
14:22:17miransurvivorm: +1, do it as in other languages, don't surprise user where (s)he least expects it!
14:22:43dom96well
14:22:53FromGitter<survivorm> yeah, @miran, the surprise is the most horrible point
14:22:58dom96there is a lot of features of Nim that are surprising
14:23:06FromGitter<survivorm> no-no
14:23:06dom96Does that mean we should change them as well?
14:23:15FromGitter<survivorm> they are EXPECTED
14:23:24FromGitter<survivorm> suprises, yeah
14:23:37FromGitter<survivorm> but you're avare of them
14:23:42mirandom96: there is something called nice surprise, and something called $^!$*!)(*$)!(*( is this sh*!?
14:23:45FromGitter<survivorm> and \n is not
14:23:47dom96if we change all the surprise then we'll end up with an existing language :)
14:23:58dom96*surprises
14:24:13FromGitter<survivorm> dom, don't be a troll
14:24:29FromGitter<survivorm> You understand the case and the meaning
14:24:31FromGitter<andreaferretti> maybe it would be worth to add a `newline` template or something to use in string interpolation like `\n` is used today
14:25:03FromGitter<andreaferretti> defined with `when defined(windows): "\c\l" else: "\l"`
14:25:14FromGitter<andreaferretti> or whatever `\n` is today
14:25:27dom96yes, this feature is still nice, we should have a different escape character for it
14:25:30*couven92 quit (Read error: Connection reset by peer)
14:25:38FromGitter<survivorm> @andreaferretti more like carretReturn and linebreak
14:26:04FromGitter<survivorm> let the \n be expected :)
14:27:04miranwhatever the method of fixing this is - let the end result be what 99.9% people would expect it to be
14:27:29Araq\o OS specific newline?
14:27:40PMuncho/
14:27:42FromGitter<survivorm> btw, nim have much pleasant and expected surprises, some pleasant and unexpected (friendly community :) ) and only a few bad ones. And let's hope the situation will only get better
14:27:52Araq\m # like 'n', but better since m<n ?
14:27:57*gokr joined #nim
14:28:20Araq\p platform specific newline?
14:28:22miranu/ --> just like upside down \n
14:28:40Araqno idea what's already taken...
14:28:48miran(ok ok, it is u\)
14:29:06FromGitter<survivorm> no, miran, THAT's not that i'd expect
14:29:10FromGitter<survivorm> :)
14:29:31Araqomp seem ok
14:29:37miranu\ for going up
14:30:16Araq\pABC\pDEF
14:30:23Araq\oABC\oDEF
14:30:34Araq\p seems to be slightly more readable
14:30:37dom96create an issue
14:30:42dom96there will be plenty bikeshedding room there
14:31:16FromGitter<survivorm> let's settle with \n = \r\b, and the \r an \b respectively
14:31:18FromGitter<krux02> is there in issue that sums up the problem with \n
14:32:05dom96krux02: it's platform-dependent.
14:32:26FromGitter<krux02> yea but isn't that known that line endings are two bytes on windows?
14:32:53dom96yes, but that's not how it works in all other programming languages
14:32:57dom96\n is line feed everywhere else
14:33:00cremIt's two bytes in files. But for example if I want to keep text in memory, I don't necessary want it to be \r\n
14:33:07cremeven on windows.
14:33:58dom96btw the errata for my book is strangely empty, if you've found an issue in the book please let me know: https://forums.manning.com/posts/list/41366.page
14:34:30cremI told one about confusing UTF-8 with Unicode. :)
14:34:58FromGitter<krux02> create an issue to Microsoft and tell them that newlines are accidentially encoded with two byets and that this conflicts with everything else in the world and that they should fix it.
14:35:24dom96crem: Could you write about it in that forum thread?
14:35:33cremSure, will do.
14:36:12Araqkrux02: that's not how it works, I get the blame for everything that $SHITTY_OS does ;-)
14:36:20Araq"Nim does not detect OOM reliably"
14:36:34Araq"Nim's open happily opens directories"
14:36:54euantor> create an issue to Microsoft and tell them that newlines are accidentially encoded with two byets and that this conflicts with everything else in the world and that they should fix it.
14:37:09cremnim's open opens directories? Everywhere, or only on weird freeBSD and alike?
14:37:15euantoras if. There's so much shitty software that would break in spectacular ways if MS changed such a thing
14:37:53FromGitter<krux02> yea of course it would
14:38:00Araqcrem, on Poonix, where else?
14:38:23Araqthe OS known as "we don't need APIs we can copy bytes around instead"
14:38:35cremMaybe it was indeed on macos.
14:38:45FromGitter<krux02> but breaking things from the past is something Microsoft does all the time. And not just microsoft.
14:38:46cremSome of "other" UNIXes surely do.
14:38:53cremAIX or whatever.
14:39:09Araqit was on Linux and I'm pretty sure C's fopen still has the same bug.
14:41:44FromGitter<krux02> "General Data Protection Regulation" also breaks a lot of companies. But that doesn't mean it shouldn't be done.
14:44:28euantorTry telling enterprise customers that their software doesn't work anymore because MS have decided to change the new line character. it won't go down well, and they'll simply never "upgrade" to the new version that broke their stuff
14:48:29miranthe time to change stuff like that? before v1.0 is out. (not just nim, generally)
14:50:02*kivyion quit (Read error: Connection reset by peer)
14:57:53FromGitter<krux02> euantor: Well yea Microsoft can simply sneak in upgrades when the user is inactive for a certain about of time (maybe because he started a rendering process and went home). Then the system is upgraded and can't be downgreaded. In case the user deconnects from the internet and tries to escape the inevitable update, they have to live without internet. Or chango to another operationg system where they have to support single
14:57:53FromGitter... byte line endings anyway.
14:58:25FromGitter<krux02> euantor: In other words Mircosoft could simply change that. Piss off a lot of people, but nobody could really do anything about it.
14:59:00arnetheduckfunny, the nim manual doesn't even describe this behavior: https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals
14:59:09arnetheduckit just says "newline"
14:59:42livcdcan't wait to try nim on AIX :)
15:00:06Araqread on
15:00:07Araq"Character literals are enclosed in single quotes '' and can contain the same escape sequences as strings - with one exception: newline (\n) is not allowed as it may be wider than one character (often it is the pair CR/LF for example)."
15:00:48livcdi bet nim is the only one from the newer languages that will actually work on things like aix/hpux/solaris etc
15:02:03Araqor QNX? that one is a hard realtime OS
15:03:09livcdwell do not see QNX anywhere here
15:03:26livcdwe have 30k solaris instances, 15k aix instances and about 8k hpux instances
15:03:49Araqreally? where is that?
15:04:21livcdlarge telco
15:04:43*Snircle_ joined #nim
15:05:01livcdif nim crashes this t5-8 super cluster i'll blame Araq from the internet
15:05:11Araqwhy not replace it with Linux? :P
15:05:11*Snircle quit (Ping timeout: 276 seconds)
15:05:38livcdthey do
15:05:49livcd50k linux instances
15:05:59livcdmixed openstack (ubuntu) with rhel+sles
15:06:35FromGitter<alehander42> reading the manual "--warning[NAME]:on|off " I tried 500 things until I see that [] does not mean a placeholder: you actually need to write '[' and ']' :D
15:07:13livcdeverything is wired together with perl scripts
15:07:17livcdperl ain't going anywhere
15:08:38Araqit's Unix, C and Perl which make me believe in progress.
15:09:32livcdbut it's really amazing that nim might probably work on aix :O
15:10:24cremnim working in aix is less surprising than nim working in dos.
15:10:36*Yardanico joined #nim
15:11:46arnetheduckok, to set the record straight, C does not actually require \n to be a line feed specifically - it just has to be a single character
15:14:53PMuncharnetheduck, yeah but in C everything is just a recommendation :P
15:16:51cremIn C++ standard, \n is said to be new-line.
15:17:27crem"conditionally-supported, with implementation-defined semantics. An escape sequence specifies a single character."
15:19:47*endragor quit (Remote host closed the connection)
15:24:25Araqhere is a story to tell your children
15:25:01Araqhttps://github.com/nim-lang/Nim/blob/devel/lib/system/gc.nim#L315
15:25:26AraqinitGC is called for every thread local heap ... so every GC thinks it's the main thread :-(
15:25:49Araqtook me hours to figure this one out, I'm such an idiot
15:26:22Araqridiculous, I shouldn't be allowed to write GCs ...
15:26:25Yardanicowhat did this affect?
15:26:49Araqnothing I think.
15:26:56Yardanicowell ok :)
15:27:59Araqand yeah, that one fixed it
15:28:14Araqnow global root tracking is clean
15:31:48Yardanico12 thousand commits coming :)
15:33:15arnetheduckhttps://github.com/nim-lang/Nim/issues/7089
15:34:21Araqaww, not \p ?
15:34:55AraqI think these are not case sensitive so \N should do what \n does
15:35:07*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
15:35:23*Snircle joined #nim
15:35:58cremI like \N more. They are not case sensitive? I think in C they are.
15:36:02cremOr maybe they are not..
15:36:05cremHmmmm.
15:36:40crem\X surely is not, then why \x wouldn't be..
15:38:07arnetheduck\U and \u are case sensitive in C++ at least, to denote different utf sizes
15:38:13*endragor joined #nim
15:38:14cremMy quotation from the standard was wrong. "conditionally-supported, with implementation-defined semantics." was about non-standard escape sequences.
15:38:42crem\U and \u are not listed in standard (as of C++11)
15:38:50Calinouhi, what's the de-facto library for downloading files via HTTP in Nim? I see a libcurl binding, but it requires libcurl to be linked dynamically (may be a problem for Windows in my case)
15:39:13arnetheduckand .. x86-64 gcc 7.1 #1] warning: unknown escape sequence: '\X'
15:39:36arnetheduckhttp://en.cppreference.com/w/cpp/language/escape
15:39:39*UxerUospr joined #nim
15:39:47cremYeah, it seems they are not case sensitive.
15:39:54crem\N is nice then.
15:39:57euantorCalinou: the httpclient should be able to do it: https://nim-lang.org/docs/httpclient.html
15:40:04cremBut nim is case-insensitive language!
15:40:08arnetheduckhttps://godbolt.org/g/dygkwR
15:40:14euantorSpecifically `downloadFile`
15:40:23Calinoueuantor: thanks :) I'll still need libssl on Windows
15:40:25Araqer, if they are *not* case sensitive, then surely \N is Not fine?
15:40:28Calinounot sure if it can be linked statically
15:40:49cremAh! I meant they are case sensitive.
15:41:20*Jesin joined #nim
15:41:59arnetheduckhttps://play.nim-lang.org?gist=b8b9dea06a02196595642e1bf446d700
15:42:32Calinou(I could bundle libraries in a ZIP anyway, it's not a huge problem)
15:42:44arnetheducknim accepts \N but the code highlighter on play does not ;)
15:42:51YardanicoCalinou, you can get openssl dlls from nim website
15:42:57Calinouyeah
15:43:32*endragor quit (Ping timeout: 276 seconds)
15:49:41*Jesin quit (Quit: Leaving)
15:50:00Araqok, the GC just a tiny bit faster
15:51:01*zahary quit (Quit: Leaving.)
15:51:22cremWhy would "hello\nworld" break on windows? On windows, the \n -> \n\r replacement is usually done in file output library. Does nim bypass standard library and goes directly to system calls?
15:51:49Araqkind of, we open every file as "binary" file
15:51:57*miran_ joined #nim
15:52:07Araqand we will replace the C IO libraries by native Nim ones eventually.
15:52:38Araqthat Nim's IO doesn't distinguish between "text" and "binary" is a good feature, ymmv.
15:53:16Araqat least it's a feature that avoids bloat...
15:58:53*stevenfx joined #nim
16:10:27*Stevenfx_ joined #nim
16:11:58dom96Please not \N
16:14:09FromGitter<krux02> \p for paragraph
16:14:49*stevenfx quit (Ping timeout: 256 seconds)
16:15:16*miran_ quit (Remote host closed the connection)
16:16:17YardanicoAraq, I like that it doesn't
16:16:40*miran_ joined #nim
16:20:44*miran_ quit (Client Quit)
16:24:14FromGitter<krux02> Araq: Is it bad that every GC thread thinks it is the main thread?
16:24:57FromGitter<krux02> Araq: Ok I think I was off in the chat, ignore it. It doesn't really matter
16:28:43*zahary joined #nim
16:30:32*gokr left #nim (#nim)
16:32:01PMunchHmm, is there a way to get the strutils tokenizer to not combine the separators?
16:34:44*vivus joined #nim
16:39:59vivusDoes this channel use a bot that bridges chat between IRC, gitter, discord and telegram?
16:40:32cremSeveral bots, I guess, but yes.
16:41:14FromGitter<data-man> @PMunch: Try pegs.split :-)
16:41:28vivuswho is hosting these bots?
16:43:26cremProbably dom96.
16:43:57dom96Nope
16:44:02FromGitter<Varriount> The bots host other bots
16:44:03dom96FromGitter is hosted by oprypin
16:44:12dom96GitDisc by Yardanico
16:44:24FromGitter<Varriount> Which in turn are hosted by more bots.
16:44:49FromGitter<Varriount> It's bots all the way down. :p
16:46:04*miran_ joined #nim
16:47:03PMunchVarriount, damn it you beat me to it :P
16:47:38miran_hey PMunch, you're using manjaro iirc?
16:52:37Yardanicovivus, FromGitter (bot written in crystal) for gitter, GitDisc (bot written in Go - matterbridge), FromTwitch (used on #nim-offtopic when dom96 or araq streams - written in nim (it's very simple though))
16:52:38FromGitterYardanico, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
16:52:45YardanicoI know that :P
16:52:51PMunchmiran_, yup .)
16:53:17Yardanicomiran_, I'm on arch if you need that (I was using antegros and manjaro before)
16:53:19miran_any chance you're on 4.14 kernel and using nvidia drivers? :)
16:53:35vivusand the telegram bot?
16:54:14Yardanicovivus, there's none that I know of
16:54:17miran_the newest nvidia driver and vscode are producing some ugly crashes! (and i deleted the previous version)
16:54:19Yardanicobut matterbridge supports telegram
16:54:22Yardanicoso I can just add that
16:55:08Yardanicoin fact matterbridge supports almost every major chat platform
16:55:11*zahary quit (Quit: Leaving.)
16:55:28dom96Let's not get crazy
16:55:34Yardanico:P
16:55:48Yardanicobut having 3 bots for 3 chat platforms is not very good, is it ? :)
16:56:37Yardanicomiran_, I am
16:56:43PMunchmiran_, sorry.. I don't have an Nvidia card
16:56:51Yardanicomiran_, 4.14.13 kernel and gtx 750
16:56:55dom96Also Telegram isn't really built for large chat rooms AFAIK
16:58:21Yardanicodom96, 50 thousand people maximum
16:58:48miran_PMunch, Yardanico: i just managed to find some outdated repo with the previous version of the drivers. lets hope this will work....
16:58:55dom96okay, but traditionally it's not used for chat rooms like Slack/Gitter/Discord
16:59:20FromGitter<alehander42> is `with` removed or something :?
16:59:22Yardanicomiran_, are you sure that's nvidia driver fault?
16:59:22*zahary joined #nim
16:59:28Yardanicoalehander42: what "with" ?
16:59:39Yardanicoah, you mean keyword
16:59:49Yardanicoyeah, it was removed because it hasn't been used
16:59:55FromGitter<alehander42> yeah I think it worked like A* = distinct int with +, -
16:59:57FromGitter<alehander42> ahhhhh
17:00:05FromGitter<alehander42> it seemed very useful for some cases
17:00:10Yardanicoah, this usage
17:00:11miran_Yardanico: i'm not the only one experiencing the same symptoms
17:00:15YardanicoIDK about this one, maybe it works
17:00:21miran_and it started since last update
17:00:34Yardanicomiran_, that's unfortunate :/
17:00:46*azur_kind joined #nim
17:00:56dom96miran_: #archlinux? :)
17:00:59Yardanicodom96, no
17:01:21Yardanicoyou can't ask for help if you don't use archlinux, so even if you use arch-based distro - that doesn't count
17:01:36Yardanicoother arch-based distros have some differences (manjaro has its own repos for example)
17:01:38miran_Yardanico: the unfortunate thing is that i deleted previous version without realizing
17:01:54miran_dom96: no, manjaro - user friendly arch :)
17:02:10Yardanicomiran_, btw, I've used manjaro/antergos/and then installed arch linux
17:02:10dom96miran_: #manjaro then?
17:02:21Yardanicosince after installation there's almost no difference
17:02:29Yardanico(i mean there's none at all)
17:02:40miran_dom96: that's quite dead. but i asked on manjaro forum....
17:03:00miran_and it seems this will be even more complicated than i thought....
17:03:22dom96miran_: they surely have a more active IRC channel on some other network or something
17:03:38Yardanicodom96, nothing more popular than manjaro forum
17:04:00Yardanicomiran_, yes, downgrading packages is always harder with rolling distros
17:04:14Yardanicobut the strange thing is that I don't have any problems here on arch (which should be more unstable than manjaro lol)
17:04:23miran_Yardanico: the bonus problem here it that nvidia is dependand on kernel
17:04:47Yardanicomiran_, not really
17:04:52Yardanicoyou can use dkms version
17:04:56Yardanicoso it will build for your kernel
17:05:23FromGitter<mratsim> I’ve been using Arch for 8~9 years and it’s been really solid (except systemd, pulseaudio, and the removal of /var/run iirc)
17:05:31miran_i didn't have any problems until now. i guess i won't use vs code until this gets patched in some future version.... :(
17:05:36*zahary quit (Quit: Leaving.)
17:05:44Yardanicomratsim: what's bad with systemd? it's easy to use for me
17:05:48Yardanicoenable/start/stop services
17:06:09FromGitter<mratsim> the transition was difficult
17:06:11Yardanicoah
17:06:26*PMunch quit (Quit: Leaving)
17:06:39FromGitter<mratsim> I mean, instead of pacman -Su I add to do stuff manually
17:06:57FromGitter<mratsim> And I think at one point I had to but from a USB key because it dodn’t start
17:07:02FromGitter<mratsim> boot*
17:07:13Yardanicothe only thing - I tried to use i3, but it feels very weird after using typical desktop environments and windows for all my life
17:07:32Yardanicomaybe fullhd screen is too small for it? :P
17:10:37*floppydh quit (Quit: WeeChat 2.0.1)
17:12:10FromGitter<mratsim> Wow I need to build a website to showcase my portfolio but the web world is moving so fast. Right now I’m looking into Gatsby (static website compiler) + Contentful (Headless CMS) + Netlify (Hosting + Continuous Deployment)
17:12:11miran_i'll try open source drivers. hopefully they won't resolve this issue while creating 3 others :D
17:12:27Yardanicomiran_, they're much slower though
17:12:35Yardanico(especially for new graphic cards)
17:12:41miran_gtx 660
17:13:39FromGitter<mratsim> Nouveau should be fine, but you can probably find your old driver in mirrors that went out of sync. And I remember there is a Archlinux archive mirror that keeps older version of packages
17:13:46FromGitter<data-man> Arch Linux, GTX 1050. I win! :-)
17:14:01FromGitter<mratsim> Arch Linux GTX 1070, I win ;)
17:14:12FromGitter<data-man> lol
17:14:19YardanicoArch Linux GTX 750, I lose ;)
17:14:36miran_mratsim - i found it in out of sync mirrors, but even still downgrading wasn't working
17:14:48YardanicoI actually want to try nouveau, but I have GTX 750 with GM206 chip (the same as in GTX 950)
17:14:58YardanicoI don't know if nouveau will provide comparable performance to nvidia driver
17:15:01miran_i'll rather put open source drivers and move on, than spend more time oh this
17:15:16miran_my nerves are already thin from all these crashes
17:15:33FromGitter<mratsim> issue with nvidia is usually there is a custom libgl + mesa and xorg must be rollbacked and a bunch of other stuff
17:15:57miran_i don't need any extra performance - just a desktop use (browsing, using vscode) + waching movies
17:16:58miran_two hd screens
17:22:03Yardanicohmm, I'll try nouveau then
17:23:05*miran_ quit (Quit: Konversation terminated!)
17:23:21shashlickwhat's the state of the nim repl? I see there's 3 options (4 if you count the playground)
17:23:31*Trustable joined #nim
17:25:04shashlicknim secret, nrpl and tnim - is this a solved problem? https://github.com/nim-lang/Nim/wiki/GSoC-2016-Ideas
17:25:16*miran_ joined #nim
17:26:37*miran_ quit (Client Quit)
17:27:10FromGitter<mratsim> limbo state
17:27:25FromGitter<mratsim> aka “Here be dragons"
17:27:59dom96Nope. The state hasn't changed
17:29:08shashlickI somehow feel a repl is overrated, it's fine to do super simple things but might as well have a mini-editor text box + compiler backend that makes it super simple to test code
17:29:25vivusdom96: telegram is used for large chatrooms. all the shitcoin crypto companies use it
17:30:38dom96shashlick: It is in some ways. But having a proper REPL certainly wouldn't hurt adoption.
17:30:59dom96It's pretty annoying that I still have to use Aporia for my quick experiments
17:32:01shashlickbut quick experiments for an experienced nim dev. will definitely be 5-10+ lines of code - reproducing bugs, etc.
17:32:24shashlickusing a repl isn't really that useful
17:32:27*Yardanico quit (Remote host closed the connection)
17:32:28FromGitter<data-man> telegram still collecting a phone numbers?
17:33:02*yglukhov quit (Remote host closed the connection)
17:33:59shashlickso what is lacking in tnim (more recent) or nrpl (3+ years old)
17:35:14Araqa REPL is very useful
17:35:46Araqif done properly
17:39:16shashlickin all my time using Python, I only used the repl to check if a module was installed, to get help on a module / function, typing out few lines to verify a few lines of code are correct. I rarely ever typed out a full function and called it
17:39:40shashlickso i'm kind of missing the use cases being considered as valuable
17:40:02Araqyeah but that's because of "who wants to program in the terminal?"
17:40:10*yglukhov joined #nim
17:40:49Araqimagine to develop the game and never having to restart the level you're designing
17:41:23Araqa REPL done right enables live coding
17:41:35shashlickokay so that is purely in the Nim VM territory
17:42:00Araqwell it's more about hot code reloading I guess
17:42:46*Stevenfx_ quit (Remote host closed the connection)
17:42:47Araqwhich can be done with DLLs
17:43:00Araqhttps://github.com/nim-lang/Nim/issues/6886
17:43:04Araqhttps://github.com/nim-lang/Nim/issues/6887
17:43:19Araqthese are blocking hot code reloading afaik
17:43:23*Stevenfx_ joined #nim
17:43:27shashlickcause even if we take the Python REPL, it's not really hot code reloading friendly - the interface itself is a pain as you mentioned
17:43:44dom96that'd be nice for web frameworks too
17:44:07dom96I have a slightly crazy and hacky idea of how one might get FFI support in the VM
17:44:12dom96Might play around with that
17:44:31*yglukhov quit (Ping timeout: 248 seconds)
17:45:16*Yardanico joined #nim
17:45:37shashlickso I totally appreciate the hot reloading capability but I fail to see the link with a REPL as it is traditionally defined
17:52:14FromGitter<data-man> REPL is simple with embedded TinyCC. Left "a little bit" to finish.
17:58:36*gokr joined #nim
17:59:14*azur_kind quit (Remote host closed the connection)
17:59:15shashlickthat's why I'm asking what nim secret, nrpl or tnim are missing to check it off from the todo list
17:59:44shashlicki'm asking what's the definition of REPL that we want to achieve, what what remains to be achieved from these efforts
18:00:59dom96nim secret with fast FFI support
18:10:50FromGitter<mratsim> no REPL means no go for data science research. Data scientists have been spoiled by Matlab, R studio and Jupyter
18:11:34FromGitter<alehander42> i think a jupiter kernel might for nim would be very cool too for data scientists
18:11:58dom96a jupyter kernel already exists for NIm
18:12:26FromGitter<mratsim> heh, how come I didn’t hear about that :O
18:12:27FromGitter<alehander42> very cool, I should play with it
18:12:32FromGitter<alehander42> this one https://github.com/stisa/INim ?
18:12:57*yglukhov joined #nim
18:13:14Yardanicothere's two of them
18:13:42Yardanicohttps://github.com/stisa/INim and https://github.com/stisa/jupyter-nim-kernel
18:13:56Yardanicobut "NOTE: Context is NOT shared between blocks!! I'll try working on it when I have time."
18:14:32Yardanicowell it's ok in INim thought
18:14:35Yardanicothough*
18:16:51*Yardanico quit (Remote host closed the connection)
18:17:35*Stevenfx_ quit (Ping timeout: 248 seconds)
18:17:45*yglukhov quit (Ping timeout: 264 seconds)
18:18:04*Yardanico joined #nim
18:28:36FromGitter<alehander42> is there a good way to convert between seq[byte] and cstring
18:28:50FromGitter<alehander42> or just using seq[byte] is preferable in those cases
18:41:28AraqI know of no good way
18:44:47dom96how did you end up with seq[byte]?
18:52:21*Yardanico quit (Remote host closed the connection)
18:56:34*chemist69 quit (Ping timeout: 256 seconds)
19:01:45FromGitter<Quelklef> How can I convert Table[A, B] to TableRef[A, B] ?
19:03:38FromGitter<Quelklef> Wait, does that even make sense? I'm not 100% with ref types
19:07:11FromGitter<Quelklef> Apparently ⏎ ⏎ ```var tr: TableRef[A, B] ⏎ new(tr) ⏎ tr[] = table``` ⏎ ⏎ does it. I think I need to read up on ref... [https://gitter.im/nim-lang/Nim?at=5a5cfbdf5a9ebe4f758de2db]
19:10:25*chemist69 joined #nim
19:13:34*Yardanico joined #nim
19:18:10dom96Just create a TableRef in the first place
19:18:14dom96Why do you need to convert it?
19:18:25FromGitter<Quelklef> I was refactoring something that I needed to be mutable
19:18:33FromGitter<Quelklef> so the constructors were of type Table
19:18:47FromGitter<Quelklef> turns out, that particular constructor was never used, so I was fine :P
19:22:36*yglukhov joined #nim
19:23:38*yglukhov quit (Read error: Connection reset by peer)
19:24:10*yglukhov joined #nim
19:36:57*PMunch joined #nim
19:42:24*Yardanico quit (Remote host closed the connection)
19:42:43*Yardanico joined #nim
19:55:01*MJCaley joined #nim
19:59:59*Trustable quit (Remote host closed the connection)
20:01:12PMunchIs there a shortcut to initialise a 2D seq in Nim?
20:01:47FromGitter<Quelklef> var s: seq[seq[A]] = @[] ...?
20:02:17PMunchWell I need to initialize the inner ones as well
20:02:40PMunchSo currently I have http://ix.io/EaY
20:02:52FromGitter<Quelklef> ah
20:03:01FromGitter<Quelklef> I think there's newSeqWith or somth
20:03:21FromGitter<Quelklef> yeah try https://nim-lang.org/docs/sequtils.html#newSeqWith.t,int,untyped
20:03:29PMunchI'm porting a Java thing and it just does int[][] td = new int[i+1][j+1]
20:04:05PMunchOoh nice
20:04:09PMunchIs that new?
20:04:27FromGitter<Quelklef> it's been there ever since I started Nim
20:04:38FromGitter<Quelklef> which, I'll admit, was not that long ago
20:04:44FromGitter<Quelklef> point being idk
20:05:46PMunchHuh, apparently added 2 years ago
20:11:48PMunchNot quite as clean as the new int[i+1][j+1] thing but better than nothing :)
20:12:13FromGitter<Quelklef> /shrug oh well
20:13:46PMunchHow long have you been using Nim by the way? Haven't seen your nick around before
20:17:08FromGitter<Quelklef> not long
20:17:12*zahary joined #nim
20:17:14FromGitter<Quelklef> since probably around dec 15
20:17:22FromGitter<Quelklef> because my nim project was started on dec 23
20:17:42PMunchAh right, how do you like it so far :)
20:17:51FromGitter<Quelklef> It's f***ing amazing
20:18:24FromGitter<Quelklef> Coming from Python/Java, I love how it's not as verbose as Java and how it's not incredibly unsafe like Python
20:18:47FromGitter<Quelklef> also I've always been interested in metaprogramming and, bam, templates! macros! screw your boilerplate!
20:18:55*zahary left #nim (#nim)
20:19:26FromGitter<Quelklef> Also user-defined operators are A+
20:20:17PMunchI think you just listed all the things I like about Nim :P
20:20:21FromGitter<Quelklef> I think my favorite thing, though, is the type system
20:20:36PMunchBut I come from a Java/C/Python background so I guess it makes sense
20:20:39*endragor joined #nim
20:20:44FromGitter<Quelklef> yeah
20:20:47FromGitter<Quelklef> we're being enlightened
20:20:54PMunchHaha
20:21:11PMunchBut yeah, the type system is great as well
20:21:27FromGitter<Quelklef> I found out about Nim's algebraic data types and I just
20:21:30FromGitter<Quelklef> god bless
20:22:00FromGitter<Quelklef> the typeclasses are a little underpowered for how I'd like to use them but that's probably because I want to use them like interfaces
20:23:01PMunchYeah, Nim is missing interfaces which I sometimes miss
20:23:07PMunchThat and do..while loops..
20:23:29FromGitter<Quelklef> macros tho
20:23:34FromGitter<Quelklef> can prolly write something that will allow
20:23:59PMunchOh yeah, I have my trusty http://ix.io/Eb1
20:25:20*endragor quit (Ping timeout: 255 seconds)
20:25:38FromGitter<Quelklef> yeah so it's kinda whatever
20:25:58FromGitter<Quelklef> alternatively, fork + pr the nim repo ;)
20:29:19*MJCaley quit (Quit: MJCaley)
20:30:47PMunchI don't think they want it in the repo :(
20:32:03FromGitter<Quelklef> it'd probably make parsing a royal pain because `do:` is already syntax
20:32:33FromGitter<Quelklef> could ask if a `dow:`/`while:` loop is ok to implement!
20:33:00*Ven`` joined #nim
20:42:10*yglukhov quit (Remote host closed the connection)
20:44:11*Yardanico quit (Quit: Leaving)
20:49:18*darithorn joined #nim
20:50:38*darithorn quit (Client Quit)
21:00:29PMunchHmm, seems it's been a bit too long since I've used Java
21:00:49PMunchCan't for the life of me figure out how to build and run this: https://github.com/ijkilchenko/ZhangShasha
21:03:08PMunchAh, never mind
21:03:11PMunchFigured it out
21:07:04FromGitter<Quelklef> good work
21:12:57*xkapastel joined #nim
21:14:17PMunchNice, now I've got Zhang-Shasha tree edit distance in Nim :)
21:15:39FromGitter<Quelklef> but why
21:15:48PMunchNot really sure tbh
21:15:58FromGitter<Quelklef> lol
21:16:10FromGitter<Quelklef> well, maybe someone will make use of it
21:17:18PMunchI was thinking about writing a mod for Kerbal Space Program that added a "design cost" based on how dissimilar the current ship was to anything you had previously built. And it stores all crafts as a graph internally, so that's how I started looking at tree edit distance algorithms.
21:18:08PMunchThen I realized that there are very few implementations of these algorithms out there, so I decided to create one for Nim.
21:18:24PMunchNow I've got to do it over again in C# though if I want to create the mod :P
21:18:39livcd~that sounds interesting
21:18:39PMunchOr find a way to get KSP to load a DLL written in Nim..
21:18:52PMunchWhich part? :P
21:18:56livcdall of it
21:19:00PMunchHaha
21:19:18livcdthough i lack the brain capacity to even look at the algorithm implementation
21:19:19livcdzzz
21:20:14PMunchHaha, tbh I just copied it over from the Java implementation. I only have a slight idea on what it actually does
21:20:45PMunchSomething about splitting the tree into subtrees and then calculating some matrices for these subtrees and finding the shortest path through those matrices
21:23:07FromGitter<Quelklef> "matrix magic"
21:23:08Calinouwhich data file format would you recommend in Nim (the one with the best implementation), JSON, YAML or TOML?
21:23:11FromGitter<Quelklef> it's how the world runs
21:23:18Calinou(any of these should work for my use case)
21:23:58PMunchWell the JSON implementation is pretty great. Haven't really tried any of the others though. But it really depends on your use-case
21:24:17PMunchIf you want more easily written config files I'd say definitely go with TOML
21:24:28Calinouit's not a configuration file here, it's more of a manifest file
21:24:31Calinou(for updating stuff)
21:24:35Calinouso JSON is fine for this :)
21:24:44Calinouis JSON built-in, or do I need to install a Nimble package?
21:24:56PMunchBuilt in I think
21:25:34CalinouO_o DuckDuckGo returns instant answers about Nimble packages
21:25:35Calinouwow :P
21:25:42Calinou(I searched "nim json" and it did that automatically)
21:26:57*gokr quit (Quit: Leaving.)
21:27:55flyxCalinou: NimYAML can deserialise a YAML file automatically to native Nim types. if that'd help you, it may be preferable to JSON.
21:31:39dom96json can do that too now
21:33:03flyxah, did I miss some new features?
21:33:28Araqany ideas why travis is mocking me?
21:33:40dom96possibly https://nim-lang.org/docs/json.html#to.m,JsonNode,typedesc
21:33:43Araqsince yesterday the builds are failing, appveyor is green though
21:34:43Araqoh it's my GC test under Boehm
21:34:45Araqhmmm
21:35:40*nsf quit (Quit: WeeChat 2.0.1)
21:47:19*UxerUospr quit (Quit: Lost terminal)
21:47:44*arthurz joined #nim
21:48:25*arthurz quit (Client Quit)
21:57:23Calinouflyx: it doesn't compile here :( (I'm on self-compiled Nim master branch) should I create an issue with the log?
22:01:01PMunchAre tags in nimble single-word?
22:03:48Calinouflyx: log is here: https://paste.ee/p/MbaeI
22:04:06PMunchhttps://github.com/nim-lang/packages/pull/643
22:04:08CalinouNim commit: git hash: bba6d624205fbfe695b146fb63c00a2854199ee8
22:04:35PMunchWoop woop, now anyone can use the tree edit distance algorithm in Nim :)
22:04:49PMunchMaybe someone else can actually find a use for it :P
22:05:20*PMunch quit (Quit: leaving)
22:18:33*Vladar quit (Quit: Leaving)
22:24:06*Ven`` quit (Ping timeout: 265 seconds)
22:26:41*Ven`` joined #nim
22:32:38*sz0 joined #nim
22:38:45*Ven`` quit (Ping timeout: 264 seconds)
22:39:09*Ven`` joined #nim
22:42:44*yglukhov joined #nim
22:45:21*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:47:31*yglukhov quit (Ping timeout: 256 seconds)
22:49:00*marenz__ joined #nim
23:04:02FromGitter<honewatson> Hi Nim folks
23:05:18*vlad1777d joined #nim
23:05:25FromGitter<honewatson> @mratsim I just wanted to say I think Arraymancer is such a great name
23:16:14FromGitter<mratsim> Hi honewatson, thanks!
23:17:35FromGitter<mratsim> Still too hard for French though and since I will have to showcase my projects to find freelance work, I need a marketable name here :/
23:21:17Araqarraymanceur?
23:21:28FromGitter<mratsim> lol
23:21:51FromGitter<mratsim> nice try ;)
23:22:33AraqJe parle aussi français
23:28:58FromGitter<mratsim> Ich spreche auch Deutsch ;)
23:30:16*arnetheduck quit (Ping timeout: 256 seconds)
23:30:22FromGitter<mratsim> aber es war viele Jahre seit ich gelernt habe. Es ist schwierig um Deutsch zu erinnern
23:36:43*wastedone_ quit (Quit: wastedone_)
23:39:15*CcxWrk quit (Ping timeout: 260 seconds)
23:40:12FromGitter<Quelklef> @Varriount NimLine is giving me lots of "not GC-Safe" warnings, but the command line Nim compiler isn't. Is this a problem on my end, or yours?
23:43:27*CcxWrk joined #nim