<< 02-03-2018 >>

00:00:03FromGitter<zacharycarter> compiles
00:00:48FromGitter<zacharycarter> dom96: I took the liberty
00:01:11dom96Well... that's not how you should have done it
00:01:11arnetheduckwhat's the difference?
00:02:43FromGitter<zacharycarter> I did it a few minutes ago - I was also writing a much longer reply to a question, so I didn't provide much explanation
00:02:51FromGitter<zacharycarter> you're right - I should have elaborated
00:03:23dom96You might be able to edit your comment
00:04:15FromGitter<zacharycarter> Okay I will
00:07:01dom96your other comment is great though
00:09:48FromGitter<zacharycarter> dom96- ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a98964c8f1c77ef3a70ae21]
00:09:50FromGitter<zacharycarter> okay?
00:13:51*athenot quit (Ping timeout: 252 seconds)
00:14:09dom96yeah, sounds good
00:14:23FromGitter<zacharycarter> 👍
00:14:32*athenot joined #nim
00:19:25*couven92 joined #nim
00:21:44GitDisc<Hel> am i doing something wrong, for some reason the nim compiler can't find the windows library ever since i moved to the new version
00:21:57GitDisc<Hel> it's part of the oldwinapi that i have installed but it still can't find it
00:23:06*vlad1777d joined #nim
00:25:23GitDisc<treeform> Congratulations on the 0.18.0!
00:25:29dom96'import oldwinapi/windows'
00:26:24shodan45eep, why was "&" used for string formatting when it was already string concat? that seems like it would cause confusion
00:27:41shodan45oh, maybe because you typically wouldn't use both of them at the same time?
00:28:01dom96check out the docs for strformat
00:28:50GitDisc<Hel> `import oldwinapi/windows` gives windows.nim(22905, 10) Error: type mismatch: got <int> but expected 'int32'
00:29:04GitDisc<Hel> `import oldwinapi/windows` gives `windows.nim(22905, 10) Error: type mismatch: got <int> but expected 'int32'`
00:30:26GitDisc<Hel> and winim gives a similar error
00:30:30GitDisc<Hel> just importing it
00:36:20GitDisc<spaceghost> Can I make a nimble project temporarily build using local clones of a couple dependencies? I forked https://github.com/oskca/webview to add some webgl support, and want to test it locally.
00:36:29*MJCaley quit (Quit: MJCaley)
00:36:46GitDisc<spaceghost> I've got a nim app I'm working on that I'd like to use my local checkout of webview with.
00:38:03*MJCaley joined #nim
00:38:17*dddddd joined #nim
00:45:39dom96Hel: looks like it needs a fix for latest Nim
00:46:32dom96let me see if I can fix it
00:48:30ldlework"It is now possible to forward declare object types so that mutually recursive types can be created across module boundaries."
00:48:32ldleworkneat
00:50:19dom96Hel: try `nimble install oldwinapi` and try it again
00:50:54GitDisc<Hel> okay
00:53:08GitDisc<Hel> it compiled correctly, thanks
00:53:27*couven92 quit (Ping timeout: 252 seconds)
00:54:51FromGitter<zetashift> Not liking how the HN thread is devolving into a transpiling/compiling argument instead of feedback for Nim, but cant do much about it hehe
00:57:08FromGitter<zacharycarter> I guess that's my bad :/
01:02:38*MJCaley quit (Quit: MJCaley)
01:03:57*MJCaley joined #nim
01:04:48FromGitter<zacharycarter> spaceghost - best way would be to clone your dependency and nimble install
01:05:00FromGitter<zacharycarter> and then reference your nimble projects name
01:05:12FromGitter<zacharycarter> as a dependency
01:18:01FromGitter<zetashift> Meh, it's somewhat unavoidable
01:19:32FromGitter<zetashift> Shit, rust also released a minor update we need to get more imaginary internet points than them
01:21:07FromGitter<zetashift> Also if someone can share it too on: https://lobste.rs/
01:25:42*ipjk quit (Read error: Connection reset by peer)
01:27:22GitDisc<spaceghost> zacharycarter: When you say clone the dependency, where do I clone it to? I'm a little unsure of how this works, sorry.
01:28:10GitDisc<spaceghost> Do I just clone it, make changes, nimble install, then cd to my project directory and use the project?
01:28:39GitDisc<spaceghost> Oh now I see!
01:35:23GitDisc<spaceghost> Right now I'm adding webgl support to the webview nimble project and the upstream header project.
01:38:52FromGitter<ZarsBranchkin> Is there any way to get something like `{.importcpp: "#.some_method(@)".}` but for importing C code?
01:39:43GitDisc<spaceghost> Like importc?
01:39:45FromGitter<ZarsBranchkin> This struct has really got me stuck. It's C code, but has `variable->some_function(variable)` call convention
01:40:00FromGitter<ZarsBranchkin> Yeah, but importc will leave it as`some_function(variable);`
01:40:11GitDisc<spaceghost> oh, idk sorry
01:41:44FromGitter<dom96> Spaceghost: you can use nimble develop
01:42:27FromGitter<dom96> Inside the package you want to "link"
01:42:43FromGitter<dom96> See the nimble readme for details.
01:42:58FromGitter<dom96> It's a useful feature for all Nim users
01:43:15FromGitter<dom96> So take note too @zacharycarter
01:52:34*endragor joined #nim
02:11:01*Tanger joined #nim
02:12:32TangerYay, v0.18 was released!
02:12:56*endragor quit (Remote host closed the connection)
02:13:29*S1tiSchu joined #nim
02:14:08*smt joined #nim
02:15:03*d10n-work quit (Quit: Connection closed for inactivity)
02:17:05*SitiSchu quit (Ping timeout: 240 seconds)
02:21:28*lotzz quit (Quit: Page closed)
02:21:51GitDisc<spaceghost> exciting.
02:22:18GitDisc<spaceghost> dom96, thanks, I didn't even consider that when I was perusing source on github. I'll give that a go.
02:25:39FromGitter<zetashift> @dom96 how do I let choosenim update to 0.18?
02:29:15*MJCaley quit (Quit: MJCaley)
02:59:58FromGitter<fedkanaut> Is there any way I could associate an int with a type? I have an array of pointers to other arrays which each contain an array for a different type, trying to kludge this together into something the compiler and I can both live with.
03:03:20*bigeast joined #nim
03:04:38Tangerfedknaut: https://nim-lang.org/blog/2018/03/01/version-0180-released.html#installing-0180
03:04:58Tangertl;dr choosenim update stable
03:12:40Tangerfedkanaut* ^^
03:20:00FromGitter<zetashift> D'oh!
03:20:09FromGitter<zetashift> thanks @Tanger
03:32:50*endragor joined #nim
03:33:56*bigeast quit (Quit: leaving)
03:36:55*vlad1777d quit (Ping timeout: 256 seconds)
03:46:46*yglukhov joined #nim
03:51:05*yglukhov quit (Ping timeout: 256 seconds)
04:10:49*msmorgan quit (Ping timeout: 256 seconds)
04:10:53*dashed quit (Ping timeout: 240 seconds)
04:11:09*r4vi quit (Read error: Connection reset by peer)
04:11:10*enigmeta quit (Ping timeout: 240 seconds)
04:11:11*euantor quit (Read error: Connection reset by peer)
04:11:15*Syneh__ quit (Read error: Connection reset by peer)
04:11:15*zielmicha_ quit (Read error: Connection reset by peer)
04:11:21*surma quit (Read error: Connection reset by peer)
04:11:27*odc quit (Read error: Connection reset by peer)
04:11:27*mgdelacroix quit (Read error: Connection reset by peer)
04:11:27*LyndsySimon quit (Write error: Connection reset by peer)
04:11:27*xkapastel quit (Ping timeout: 252 seconds)
04:12:45*euantor joined #nim
04:12:56*zielmicha_ joined #nim
04:13:31*dashed joined #nim
04:15:30*r4vi joined #nim
04:16:10*LyndsySimon joined #nim
04:16:18*surma joined #nim
04:17:32*xkapastel joined #nim
04:29:12*enigmeta joined #nim
04:29:14*odc joined #nim
04:39:45*msmorgan joined #nim
04:50:17*Syneh__ joined #nim
04:50:26*mgdelacroix joined #nim
05:04:00*smt` joined #nim
05:07:45*smt quit (Ping timeout: 248 seconds)
05:14:59*jxy joined #nim
05:25:49*r3d9u11 joined #nim
05:44:37*dddddd quit (Remote host closed the connection)
05:51:38*nsf joined #nim
05:58:36*r3d9u11 quit (Remote host closed the connection)
06:34:30*r3d9u11 joined #nim
06:35:11*athenot quit (Ping timeout: 265 seconds)
06:38:58*yunfan is now known as bruceutvt
06:40:23FromGitter<raydf> hey guys
06:40:25FromGitter<raydf> hello
06:40:56FromGitter<raydf> does anyone knows how to use a watcher for on code change to build with nim?
06:41:18FromGitter<raydf> i tried fswatch but nims looks like doesn't return the lock for the std out
06:41:46FromGitter<raydf> it keeps waiting for some input (ctrl-c)
06:47:39FromGitter<cabhishek> @raydf VS code has tasks feature and it works great with the Nim plugin.
06:49:14*bruceutvt is now known as OrginCode
06:51:16FromGitter<raydf> ohhh thanks @cabhishek, do you have an example of a working task file?
07:13:51*OrginCode is now known as yinFling
07:23:51*yglukhov joined #nim
07:35:54FromGitter<alehander42> @krux02 I am not sure if I follow, mismatch in this case still doesn't make sense to me neither for the c, nor for js backend
07:38:43FromGitter<alehander42> nice, in /r/programming the nim release beats the rust one hahaha
07:46:33*donotturnoff joined #nim
07:53:24*Trustable joined #nim
07:56:05*natrys joined #nim
07:58:25*Vladar joined #nim
08:00:26FromGitter<tim-st> When I update the `entityToUtf8`from `htmlparser`, should this complete list be supported? https://dev.w3.org/html5/html-author/charref
08:03:17*donotturnoff quit (Ping timeout: 260 seconds)
08:10:54Araqtim-st: I'm afraid yes. :-(
08:11:14FromGitter<tim-st> that's not a problem, I'd like it ;)
08:11:26Araqseems they based their standard on unicode and then forgot about unicode...
08:11:31*endragor quit (Read error: Connection reset by peer)
08:11:59Araqthe W3C bloat is out of control IMO.
08:12:27*endragor joined #nim
08:13:27*yinFling is now known as yunfan
08:14:40FromGitter<alehander42> `a*: seq[(proc: void)]`
08:14:46*rokups joined #nim
08:15:07FromGitter<alehander42> @Araq is this possible at all? Nim expects `{.closure.}` for those procs
08:15:20*donotturnoff joined #nim
08:15:35FromGitter<alehander42> but if I just have a field with a proc type, it happily accepts a normal top level proc
08:16:01Araq(proc: void)(myproc)
08:16:14Araqit is possilbe
08:16:53FromGitter<alehander42> hmm, that works indeed (and it's enough to just do it for the first element of the seq)
08:17:01FromGitter<alehander42> thanks
08:19:00*endragor quit (Ping timeout: 256 seconds)
08:19:06Araqdoes it port to the newest karax?
08:19:15Araqhad to change the interface to make routine reliable
08:19:32Araqthe renderer without parameter is deprecated
08:19:42Araq*routing
08:20:34*vlad1777d joined #nim
08:21:36FromGitter<alehander42> I don't really use karax's routing as I target Electron currently
08:23:05FromGitter<alehander42> I had some errors popping up because `clientPostRenderCallback is nil` (because it tries to call a function which has default value of nil in setRenderer), but that's easily fixed
08:24:04*Arrrr joined #nim
08:25:17*endragor joined #nim
08:25:54FromGitter<alehander42> ha, I see kstring for the first time in those new examples
08:26:05FromGitter<alehander42> I had something similar in some modules, "defaultstring"
08:27:29*cspar joined #nim
08:28:00*PMunch joined #nim
08:28:59FromGitter<alehander42> I even had `when not defined(js) .. JsAssoc = Table` once, for a type that I used in both backends
08:30:16FromGitter<alehander42> which was dirty, but it works well for compatible definitions haha
08:31:15Arrrrhttps://www.reddit.com/r/programming/comments/819fiw/nim_0180_released/dv2414n/
08:32:59*endragor quit (Read error: Connection reset by peer)
08:33:20*endragor joined #nim
08:38:42*endragor quit (Ping timeout: 256 seconds)
08:41:48FromGitter<tim-st> The 1.0 windows version of nim definetly needs a setup.exe with add to path and shipped mingw like codeblocks does it, to work out of the box
08:43:27Araqfinish.exe does that for you
08:43:56Araqwe had NSIS and INNO setup based installers which worked worse.
08:44:32Araqcomplex to maintain, do not support spaces in paths, optional downloads hard to do and fragile etc etc, no thanks.
08:44:43FromGitter<tim-st> ok
08:45:34Araqwe can give finish.nim a UI though or something
08:45:58Araqbut it's a programming language, if you cannot unzip and double click
08:46:08Araqhow are you able to program then?
08:48:25FromGitter<tim-st> I think it's just much easier to click on install and than everything is installed also compiler etc, also most other languages I know work this way
08:48:56FromGitter<tim-st> btw a first look on 0.18 shows strutils is like before with `\0` should I open an issue about it?
08:49:21Araqthere already is an issue about it
08:49:28FromGitter<tim-st> ok
08:49:32ArrrrWill NimScript become a scripting language in the future? I see some projects that allows it up to a certain extent.
08:49:45*Trustable quit (Remote host closed the connection)
08:49:51*endragor joined #nim
08:51:20AraqArrrr, NimScript's future is an API you can import more easily into your program
08:51:39Araqcomparable to Lua. an "embeddable" language.
08:52:06ArrrrThat would be fun
08:56:29*natrys quit (Ping timeout: 260 seconds)
08:56:39FromGitter<narimiran> just seen that 0.18 is out - congrats to all involved!!
08:57:35*donotturnoff quit (Ping timeout: 276 seconds)
08:59:49planetis[m]congrats on the release! job well done!
09:00:17FromGitter<mratsim> @Arrrr I’ve replied to the post
09:01:58Araqthanks
09:04:49FromGitter<mratsim> Nim is 2nd place in /r/programming, Rust is 3rd :P
09:05:00FromGitter<dom96> So that's annoying. Our hn post was on the front page for less than 3 hours
09:05:12FromGitter<dom96> Rust's is still there after 9 hours...
09:05:35FromGitter<dom96> And it's a patch release!
09:05:49FromGitter<mratsim> Either HN doesn’t like me or it doesn’t like nim-lang.
09:06:08planetis[m]Also Fred should loose some weight
09:06:08FromGitter<dom96> I'm going to email them and ask what happened
09:06:12Arrrrparseopt2 is already deprecated right?
09:06:50*xkapastel quit (Quit: Connection closed for inactivity)
09:07:29FromGitter<mratsim> Actually when I look at HN second page, I’m wondering about all the 200 points posts that are lingering there
09:08:01ArrrrAnd about incremental builds, i think araq said something recently, cannot remember if it was here or in the forum
09:09:49FromGitter<mratsim> Btw I think this might be important for 1.0: https://github.com/nim-lang/Nim/issues/5753
09:09:51FromGitter<andreaferretti> congralutions for the new release!
09:13:28ArrrrdoAssert $(@["23", "12"]) == "@[\"23\", \"12\"]"
09:13:29Arrrrmmm
09:14:55*Amun_Ra quit (Quit: WeeChat 1.6)
09:15:13FromGitter<narimiran> @mratsim rust post currently has 200 points, nim post has 90 points.
09:16:13FromGitter<narimiran> i guess that's the reason for the current positions on HN
09:17:22livcdI gave it +1 just now
09:17:45FromGitter<mratsim> Actually I’m also surprised by the couple of post with 200 and 300 points on HN second page even though they are not evel half a day old
09:17:55*Amun_Ra joined #nim
09:19:33FromGitter<narimiran> how many comments do they have? i guess the position is function of freshness, upvotes, and comments (maybe views too)?
09:20:16PMunchdom96, testable documentation examples?? https://i.imgur.com/WrKPhfd.gif
09:21:21livcdtiming is critical
09:25:18*couven92 joined #nim
09:27:58FromGitter<narimiran> just reposted 0.18 announcement to /r/python, they might be interested too....
09:29:42FromGitter<mratsim> I think there is a need for a “Nim promises to the Python programmer"
09:30:36Arrrr"Rewrite python in nim"
09:30:56FromGitter<Vindaar> @narimiran good idea to link to your AoC Github
09:30:58livcdi think reddit and hn aree US centric and it's better to do these postings when the US working hours start
09:31:41FromGitter<narimiran> @arrr that is *exactly* how i started with nim
09:32:32FromGitter<narimiran> @livcd i had some success posting at this hour, europeans upvote it, and when americans wake up, it is on the front page :D
09:37:40FromGitter<alehander42> @mratsim well "water on an exoplanet" is obviously a more popular headline
09:37:57FromGitter<alehander42> now, "intro to pen plotters" is puzzling
09:37:58jaco60is there something special about the sha1 module ?
09:38:10jaco60import sha1 fails
09:39:18PMunchHmm, dom96 shouldn't the newline change be in 0.18 gotchas?
09:40:01Araqjaco60, import std / sha1
09:40:17Araqnew stdlib modules are in 'std'
09:40:48jaco60ok, but why it's not the case for, eg, md5 ?
09:41:07Araqbecause md5 is old, not new
09:41:09Araqbut
09:41:15Araqimport std / md5 works too
09:41:26jaco60ok, thanks
09:41:30Araqimport std [md5, strutils, sha1]
09:41:35Araqimport std / [md5, strutils, sha1]
09:41:49Araqif you want consistency, 'std' should always work
09:41:56FromGitter<andreaferretti> is this new style the "preferred one" now?
09:43:27Araqwe don't know, the RFC is pending
09:43:29Araq:-)
09:44:39AraqI like it though, it makes things clean
09:44:45Araqimport std / [...]
09:44:52Araqimport karax / [...]
09:44:59ZevvHi, I still have some warnings compling nim libs, like this: lib/nim/pure/collections/tables.nim(286, 10) Warning: Cannot prove that 'n' is initialized. This will become a compile time error in the future. [ProveInit]
09:45:07ZevvIs that caused by something I do?
09:45:15FromGitter<mratsim> not nil?
09:45:16Araqyes I think so
09:45:27jaco60I've just read it in the "Language additions" :)
09:46:05jaco60the "can" is ambiguous, then
09:47:09ZevvAraq: what should I look for? I'm not quite sure what the warning tries to tell me
09:51:21FromGitter<dom96> @narimiran no, the rust post has so many opvotes because it's been on the front page for so long. HN has demoted our post, it was either a moderator that did it or some HN algorithm
09:51:33FromGitter<dom96> *upvotes
09:52:56*SenasOzys joined #nim
09:52:57FromGitter<andreaferretti> most likely it was posted in a bad moment
09:53:30FromGitter<andreaferretti> it was night in europe
09:53:35FromGitter<dom96> No. That only affects whether it gets into the front page.
09:53:35ArrrrMore like rust has a bigger community and will receive more upboats from the start
09:53:37FromGitter<andreaferretti> and late afternoon in USA
09:54:06ehmrymozilla probably makes sure that rust gets upvotes
09:54:10FromGitter<dom96> I have a screenshot that shows another thread with the same number of upvotes added at the same time higher on the front page.
09:54:27FromGitter<andreaferretti> it also depends on page views
09:54:33FromGitter<andreaferretti> votes on comments
09:54:38FromGitter<andreaferretti> maybe something else
09:54:55FromGitter<andreaferretti> no need to think of a conspiracy :-)
09:55:35FromGitter<narimiran> @dom96 well, i guess we should retry our luck with 0.18.1 in near future :D
09:55:42*madmalik joined #nim
09:56:17FromGitter<narimiran> it is a shame because from my experience, you get much bigger exposure from HN than from reddit
09:56:32FromGitter<andreaferretti> (experimentally I think about this time is pretty good - a post can get some points in europe and make it to front page by the time usa wakes up)
09:56:34*couven92 quit (Ping timeout: 260 seconds)
09:56:43FromGitter<Varriount> @Araq @dom96 Congrats on the release!
09:57:09ZevvYeah, I just noticed: congratulations!
09:58:35*smt` is now known as smt
10:00:41dom96http://hnrankings.info/16497142/
10:01:48dom96Now compared to the Rust post: http://hnrankings.info/16497142,16497701/
10:01:52FromGitter<andreaferretti> defintely bad timing :-)
10:02:01dom96how?
10:03:18def-dom96: Many points, few comments stays up MUCH longer on frontpage
10:03:52def-dom96: also if the same group of people vote on similar posts, vote ring will be detected
10:03:56dom96It seems obvious to me that the post was suddenly demoted
10:04:08def-I think the cutoff is rather sharp
10:04:10dom96And yes, possibly because of the vote ring algorithm
10:04:23def-My posts often go from 1 to 20 or off frontpage immediately
10:04:31def-I don't think there's an anti-nim conspiracy ;)
10:05:06dom96I'm not saying that there definitely is, I'm just annoyed at the algorithm for demoting us (or possibly a moderator)
10:05:37def-http://hnrankings.info/16205776/ lots of comments here
10:05:46def-same here: http://hnrankings.info/16420271/
10:05:57*sendell joined #nim
10:06:53def-old ones don't seem to be on hnrankings, but few comments here and stayed on top forever: https://news.ycombinator.com/item?id=14996715
10:06:53dom96we need more articles about Nim
10:07:19dom96That's interesting though, I thought comments improved the ranking
10:07:26def-No, anti-flamewar
10:07:36planetis[m]what makes you think that they don't select which posts go to the front page?
10:07:56def-planetis[m]: sometimes they do, but then I got messages from the HN mods
10:08:12dom96yeah, moderators can definitely affect the HN front page
10:08:26dom96Which is why I am always a little skeptical when a post on the front page drops down a ton
10:10:55FromGitter<alehander42> most of my frontpage hn posts are at night european time indeed
10:11:08FromGitter<alehander42> the sudden drop seems very illogical indeed
10:31:41livcddom96: i have an idea about an article "How to extend ruby with Nim". Please someone write it :)
10:36:35FromGitter<k0pernicus> Congrats all for the new release :-)
10:44:34PMunchdom96, did you see my previous comment?
10:47:19jaco60there's no nim-lang account on Mastodon ?
10:48:26PMunchHuh, never heard of Mastodon. Looks interesting
10:48:51jaco60PMunch it is :)
10:49:32ehmryI'm still waiting for someone to make a mastodon nim library for me
10:52:50FromGitter<k0pernicus> @ehmry Why don't you do it yourself? :-)
10:53:09ehmrybecause I would have to learn some webshit
10:53:56ehmryI am willfully ignorant about how this stuff works
10:54:10FromGitter<k0pernicus> Always time to learn
10:55:48FromGitter<Vindaar> @ehmry what do you want out of a mastodon nim library?
10:56:57ehmryhmm, a process that watches feeds and lets me set callbacks on tags?
11:04:03FromGitter<Vindaar> So a nice Nim interface to the API https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md ? Sounds like a fun project for you to undertake ;)
11:05:30*couven92 joined #nim
11:05:43*Sembei joined #nim
11:05:59*Pisuke quit (Ping timeout: 260 seconds)
11:09:10*Ven`` joined #nim
11:10:14*Ven` joined #nim
11:10:14*Ven`` quit (Read error: Connection reset by peer)
11:11:04ehmryfine, its on the todo now :)
11:11:21FromGitter<Vindaar> haha, nice
11:12:41*r3d9u11 quit (Ping timeout: 276 seconds)
11:15:55PMunchdom96, any possibility for a jsondoc2?
11:17:07PMunchOh, wait. That already exists?
11:17:27PMunchMaybe that should be mentioned here: https://nim-lang.org/docs/docgen.html#document-types-json ?
11:21:42FromGitter<Vindaar> So I gave a rehearsal talk about my work including the data analysis I'm currently working on this morning. Had to include a couple of slides about Nim in that... Of course, main criticism was along the lines of "but you're not talking in a programming etc. session, are you?" "Well, no. But it's what I'm working on mostly lately..." Thinking to myself *but I need to advertise Nim!!!*
11:23:03FromGitter<Vindaar> But since @dom96 mentioned more Nim articles. It did inspire me to think about writing a few posts about "the voyage of a physicist using Nim, instead of C++ / Python"
11:27:54PMunchThat would be very interesting to read
11:31:49*r3d9u11 joined #nim
11:33:22*natrys joined #nim
11:35:34FromGitter<narimiran> @Vindaar do you have anything particular in mind?
11:36:03FromGitter<narimiran> i am planning to do some comparison between nim and python (numpy, numba) for numerical integration problems
11:39:51FromGitter<nc-x> @dom96 links for `Nim Backend Integration`, `Internal Documentation`, `Tools Documentation` broken at https://nim-lang.org/documentation.html
11:53:04FromGitter<tim-st> What would be the prefered way to have a static k:v lookup table in stdlib with more than 1000 entries (for html)? Should I use a case or a list of tuples and hope it gets optimized to a case, or should I use a Table? Should I write the table in a seperate file and include this somehow?
11:56:03FromGitter<tim-st> (I want to update the current implementation with a complete one without destroying the readability of the source code)
11:56:20*vlad1777d quit (Ping timeout: 276 seconds)
11:58:16PMunchdom96, Araq: Simple documentation update to mention jsondoc2 https://github.com/nim-lang/Nim/pull/7279
12:00:59YardanicoCongratulations on nim 0.18.0 everyone! :)
12:01:32FromGitter<data-man> Oh, I've overslept everything. :) ⏎ Congrats on the new release!
12:03:08Yardanicowell, I was sleeping and then school, I missed it too :D
12:04:06FromGitter<data-man> Many changes are not included to the changelog. :(
12:04:51Yardanicofor example?
12:05:27Yardanicobut really changelog only contains changes which are big or which break backwards compatibility
12:05:45Yardanicowell, sorry, not only big ones
12:06:39FromGitter<data-man> Especially in library additions
12:07:08Yardanicowell you missed the opportunity to add these changes to changelog :P
12:07:22FromGitter<mratsim> @tim-st a `case` with 1000 entries is bad style (except if you’re a game dev) ;)
12:07:43Araqa case with 1000 entries is optimized to a hash table
12:08:31Araqbut might be code bloat anyway
12:09:06Araqtry the case statment and the array of tuple[key, value: string] and see what produces smaller binaries
12:11:31FromGitter<tim-st> @araq ok, thanks! I already implemented support for the numeric entites now only the lookup is missing
12:11:59FromGitter<data-man> @Araq: You wrote me about February. February is over. ⏎ So...?
12:15:40*natrys quit (Quit: natrys)
12:19:43*tongir quit (Remote host closed the connection)
12:24:00*natrys joined #nim
12:28:00*Vladar quit (Remote host closed the connection)
12:34:01FromGitter<data-man> @mratsim @Yardanico As Arch-users, please advise me the fastest way to transfer a large number of files from disk to disk. :)
12:34:20FromGitter<mratsim> @data-man dd or dd_rescue
12:34:31FromGitter<mratsim> ah files, —> rsync
12:34:53Yardanicorsync, yeah :)
12:36:05FromGitter<data-man> Thanks! Will the file timestamps be preserved?
12:36:22FromGitter<mratsim> rsync —help or man rsync, there is that option ;)
12:36:28FromGitter<mratsim> I think it’s rsync -A
12:37:29FromGitter<mratsim> or I’m confusing with cp but there is the options to preserve timestamps and even ownerships
12:37:38dom96why not just 'cp'?
12:38:09FromGitter<mratsim> It’s like asking in a Nim channel, why not just C ;)
12:38:48FromGitter<mratsim> you can do a mock transfer in rsync, with -N I think, and you can have a progress bar.
12:40:49FromGitter<data-man> I'm using the Midnight Commander. But maybe it will be faster to archive a files, and then unpack to another disk. ZPAQ very fast.
12:52:16dom96Still no updates on Nim's wikipedia page
12:52:21Yardanicodom96, update it :P
12:53:40*r3d9u11 quit (Ping timeout: 240 seconds)
12:54:03*yglukhov quit (Remote host closed the connection)
12:54:53*yglukhov joined #nim
12:55:55*yglukhov quit (Remote host closed the connection)
12:56:21*yglukhov joined #nim
13:04:12FromGitter<Vindaar> @narimiran Nothing specific yet. I guess simply writing about the experience of switching to Nim. Highlighting the problems I encountered etc. I need to think about it :). Your idea sounds very interesting! Would be very interesting to read about numerical integration in Nim!
13:06:40*r3d9u11 joined #nim
13:07:30FromGitter<narimiran> @Vindaar i did some basic comparison (numpy vs nim) and i expected nim to be slightly faster, but this was miles ahead!! now i'm trying to set-up some meaningful example where i could compare speedups with numba vs rewritten in nim
13:08:46federico3data-man: rsync -avP
13:09:08FromGitter<survivorm> Congrats on the new release!
13:09:25FromGitter<narimiran> neo library by @andreaferretti was very nice to use (but i found some ofen-used things like 'slice assignment' missing)
13:09:27federico3data-man: however, rsync can't speed up a trasfer if you don't alrealdy have part of the files on the target host
13:09:42PMunchdom96, updated wikipedia. Strangely someone had changed the URL to point to the 0.18.0 release, but not the version number or date
13:10:16federico3PMunch: looks up to date
13:10:33PMunchfederico3, yeah I just updated it :P
13:10:44FromGitter<data-man> @: federico3: Big thanks!
13:14:17*r3d9u11 quit (Remote host closed the connection)
13:15:18*r3d9u11 joined #nim
13:22:02FromGitter<RedBeard0531> Congrats on 0.18!
13:32:16*SenasOzys quit (Ping timeout: 245 seconds)
13:34:55FromGitter<HonzsSedlomn> Hello, is there any key:value type? I know, there is Table, but i need to put there different types
13:35:08PMunchA tuple?
13:35:48FromGitter<HonzsSedlomn> Can tuple has a string keys?
13:35:56PMunchhttps://nim-lang.org/docs/tut1.html#advanced-types-tuples
13:35:58PMunchSure .)
13:36:11FromGitter<HonzsSedlomn> Great, thanks! :)
13:36:12PMunchOh, string keys..
13:36:13PMunchHmm
13:36:16FromGitter<HonzsSedlomn> Ah
13:36:19PMunchDon't think so
13:36:22YardanicoPMunch, well probably Honsz means dynamic container for different key:value types
13:36:44YardanicoHonzsSedlomn: generally in compiled languages you can't do that, only with a predefined type
13:36:53FromGitter<HonzsSedlomn> Something like {"key1": 1, "key2": "hello"}
13:37:05PMunchWell, there are two solutions
13:37:13PMunchYou could use a JSON object from the JSON module
13:37:17PMunchIf that fits your needs
13:37:20FromGitter<RedBeard0531> @HonzsSedlomn https://nim-lang.org/docs/json.html
13:37:32FromGitter<HonzsSedlomn> I'll give it a try. Thanks
13:38:21YardanicoPMunch, ah, yes
13:38:24Yardanicoforgot about it
13:38:31FromGitter<RedBeard0531> Its not too hard to roll your own if you need a different set of types: https://github.com/nim-lang/Nim/blob/master/lib/pure/json.nim#L595-L622
13:38:37*SenasOzys joined #nim
13:39:01Yardanicowe need a nimble package for that :P
13:39:58*Arrrr quit (Read error: Connection reset by peer)
13:43:06PMunchYardanico, HonzsSedlomn, this is of course also an option: https://play.nim-lang.org/?gist=c19a70148feba7869d4c737bce18a230
13:43:40FromGitter<narimiran> @HonzsSedlomn first you asked about key:value type, and as others have said - tuples are a way to go
13:43:45YardanicoPMunch, yeah, hmm, let me experiment with that :P
13:45:24PMunchOr if you want to make it even more transparent: https://play.nim-lang.org/?gist=953885be48351381d61ffa078fb2651b
13:45:46PMunchnarimiran, he wanted string keys though
13:45:52PMunchWhich doesn't work with tuples
13:46:20PMunch@HonzsSedlomn https://play.nim-lang.org/?gist=953885be48351381d61ffa078fb2651b
13:47:25YardanicoPMunch, I wanted to do the same, but you did it first
13:47:29FromGitter<andreaferretti> Usually in compiled languages it is more convenient to have a uniform map, and use a variant type for the value
13:47:36*madmalik quit (Quit: Connection closed for inactivity)
13:47:48YardanicoI'll try to do it without converters though, just curious if I can do that
13:48:15PMunchYardanica, well you could overload the [] for a Table[string, myType]
13:48:20*Vladar joined #nim
13:48:26YardanicoPMunch, yeah, probably this is the way
13:49:05PMunchCreate three overloaded versions that all wrap their types properly
13:49:45FromGitter<survivorm> One shuld be careful with auto type conversions and operators overload. Or else that leads to cpp-like debugging hell
13:50:03*r3d9u11 quit (Remote host closed the connection)
13:50:28*r3d9u11 joined #nim
13:53:18PMunchUhm, what is happening here: https://play.nim-lang.org/?gist=9481703f5ce2ce4e76a446fff84208e9
13:53:28PMunchCompilation log is green, but contains an error
13:53:41PMunchAnd the program creates output, but just stops before the last line..
13:54:33PMunchOh, that's what runtime errors look like in the playground?
13:54:44PMunchWell that's confusing :P
13:57:35PMunchHonzsSedlomn, you can also do this: https://play.nim-lang.org/?gist=3e60491b1607dd848d23c1a70ca04aa7
13:57:44PMunchBut that's really not recommended
13:57:57PMunchIt turns the nice compile-time type checks into runtime checks
13:58:18PMunchSo if you change any of the string, int, or bool values in the last step it will create a runtime error
13:58:48FromGitter<tim-st> @araq the version with [(k, v)] is nearly 200kb smaller than the case version. Should I compare runtime too or just use the smaller one?
13:59:29Araqwell the smaller one should transfrom the pairs into a Table at runtime for fast access
13:59:38Araqdoes it do that?
13:59:52Araqalso ensure you compare the sizes of -d:release builds
14:00:21FromGitter<tim-st> I only compiled release versions. I have the guess the case would have had better runtime but I can check this too
14:00:44Araqwell the runtime is irrelevant
14:00:54FromGitter<tim-st> ok
14:01:04Araqthe number of &foo; occurances in the typical HTML file is low
14:01:13FromGitter<tim-st> yes, I thought this too
14:02:07FromGitter<data-man> For a string keys also there is CritBitTree in critbits module.
14:02:49FromGitter<tim-st> this would probably have bigger size than case and table
14:06:08*athenot joined #nim
14:19:29*xet7 quit (Quit: Leaving)
14:19:35*Ven` quit (Ping timeout: 240 seconds)
14:22:26*xet7 joined #nim
14:22:41*Ven`` joined #nim
14:25:44*endragor quit (Remote host closed the connection)
14:26:15*endragor joined #nim
14:30:53*endragor quit (Ping timeout: 255 seconds)
14:31:16jaco60Grrr, i don't find the answer in the docs... Is it possible to pass a Range to an OpenArray or to initialise a Sequence from a Range ? For example, i want something like func badfact(n: int): int = product(1..n) (where product is imported from algorithm)
14:34:00*dddddd joined #nim
14:36:24*Ven`` quit (Ping timeout: 256 seconds)
14:37:08jaco60(forget about the product of algorithm... I misunderstood its behaviour... But my question is still pending
14:39:32*Ven`` joined #nim
14:52:27FromGitter<stisa> jaco60: since `..` is also an iterator you can use `toSeq(1..n)` from `sequtils`, I don't know if there's anything for Range->Seq
14:53:10*demi- joined #nim
14:53:29*demi- quit (Client Quit)
14:54:04jaco60Perfect...
15:02:30nivhello. congratulations on releasing 0.18.0! who can i nag about getting the docker image updated?
15:04:27FromGitter<RedBeard0531> Is https://play.nim-lang.org/ still running 0.17.2?
15:04:39*PMunch quit (Quit: Leaving)
15:05:28*Ven`` quit (Ping timeout: 276 seconds)
15:07:18FromGitter<zacharycarter> yes
15:07:26FromGitter<zacharycarter> I have to manually update it
15:07:41FromGitter<zacharycarter> actually I'm pretty sure it's 0.17.3 - but it could be .2
15:07:43FromGitter<zacharycarter> I'll update it now
15:07:54FromGitter<tim-st> 👍
15:09:02*Ven`` joined #nim
15:09:33FromGitter<data-man> !eval echo NimVersion
15:09:36NimBot0.17.2
15:10:07FromGitter<zacharycarter> well there you go!
15:15:53*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:17:40FromGitter<zacharycarter> !eval echo NimVersion
15:17:43NimBot0.17.2
15:19:29FromGitter<zacharycarter> https://hub.docker.com/r/nimlang/nim/tags/ - appears to be the problem...
15:22:37FromGitter<zacharycarter> dom96: do you know who usually updates ^
15:22:52nivi found this: https://github.com/moigagoo/nimage
15:22:58nivthat appears to be the person building the docker iamges
15:24:50FromGitter<zacharycarter> hrm :/
15:25:39nivi always thought the docker images were official ones, so i'm not sure what to expect here :)
15:26:25FromGitter<zacharycarter> I guess I make a PR and hope for the best? :P
15:26:58nivor maybe offer to help from the official nim maintainer side to keep them updated?
15:28:54FromGitter<data-man> @zacharycarter : Can you add Release mode and an additional command line parameters to Nim Playground?
15:29:34FromGitter<tim-st> I think my code is finished, can someone have a look at it before I will make a pr or should I just add one? (I'm new to this^^)
15:29:40FromGitter<zacharycarter> @data-man if you file issues on the github repo I can try to get to some of the requests for the playground in a soon(ish) manner
15:30:38FromGitter<brentp> @bluenote10 thanks for nim-heap module, working perfectly and easy to use!
15:34:23FromGitter<data-man> @zacharycarter: File issue on nim-playground or on nim-playground-frontend?
15:34:38FromGitter<zacharycarter> nim-playground please
15:37:54YardanicoAraq, lol, from reddit (nim's weaknesses): "Araq as the BDFL. He's clearly a smart man, but he rubs me (and a lot of the newer community members) the wrong way. On the other hand Andrew and Walton are fantastic."
15:38:15Yardanico"Andrew and Walton" seem to be D core devs
15:38:22Yardanicohttps://www.reddit.com/r/programming/comments/819fiw/nim_0180_released/dv29app/
15:38:28FromGitter<zetashift> Andrei and Walter?
15:38:44YardanicoIDK, he said that
15:39:37FromGitter<data-man> @zacharycarter: Done https://github.com/zacharycarter/nim-playground/issues/3
15:40:00euantor> I personally think the STL needs serious work.
15:40:15euantorInteresting, would be nice if people expanded on points like this
15:40:21AraqYardanico, not sure what it means
15:40:24FromGitter<zetashift> Well these kind of remarks are to be expected
15:40:30FromGitter<alehander42> maybe he thought Araq is Iraq(the country)
15:40:41Araq"I rub the wrong way"
15:40:58FromGitter<zacharycarter> @data-man thank you
15:41:16euantorpeople ask dumb questions and you give answers they don't want to hear
15:41:30FromGitter<andreaferretti> no, people ask questions
15:41:37Yardanicoeuantor, heh, someone even created a troll account just to make a bad comment about nim
15:41:42Yardanicohttps://www.reddit.com/user/comprehensivecheetah/comments/
15:41:57YardanicoThat's a good sign
15:42:01FromGitter<andreaferretti> sometimes questions do not make sense
15:42:06euantorthey were similar accounts on hacker News named things like `throwaway123`
15:42:23FromGitter<andreaferretti> the sign of a welcoming community is showing how and why they do not make sense without being harsh or judgemental
15:42:38euantorsometimes the quesitons are dumb because they could have been easily answered with 1 minute of reading documentation ;)
15:42:54FromGitter<andreaferretti> if so, there are two options
15:42:58FromGitter<andreaferretti> 1 not reply
15:43:12FromGitter<andreaferretti> 2 reply kindly, pointing to the relevant documentation
15:43:18euantorthen people complain that the community isn't active, or that they get ignored
15:43:42euantoroption 2 is clearly best, but people don't always have the time to hand hold
15:43:48FromGitter<alehander42> we need a "please read the <keyword> docs" bot :D
15:43:55FromGitter<andreaferretti> this is why option1 exists :-)
15:43:57FromGitter<alehander42> with auto links
15:45:39*miran joined #nim
15:49:44Araqwell sorry, but "I'm getting linker errors hinting at permission problems after I went to through some hoops to make Nim run in an admin shell" triggered my troll detector.
15:51:01Araqespecially since we had a troll who spends half of his life to come up with ways to troll #nim
15:51:13FromGitter<data-man> @Araq: I think that "Unofficial packages" must be moved from "Nim Standard Library" page to new place.
15:52:32Araqeverybody is welcome here and newbie questions are welcomed too.
15:52:56Araqeven the questions that are asked because we reply faster than Google.
15:53:19ldleworkReally proud of you guys.
15:53:21YardanicoAraq, yeah, that's true
15:53:32Yardanicowhen I was learning Nim I was spamming here :D
15:53:35FromGitter<krux02> yes this chat is great I got a lot of great help, too
15:54:48FromGitter<ZarsBranchkin> By the way, I managed to compile Nim library, that can be loaded by emacs. Still cleaning up the wrapped C structs and functions
15:55:01ldleworkwhat
15:55:19FromGitter<ZarsBranchkin> I wanted to try and see if I can extend emacs using Nim
15:55:20ldleworkZars can you elaborate?!
15:55:45ldleworkThat's really cool. What can you do with it?
15:56:15FromGitter<krux02> ldlework, I guess your main configuration is still elisp
15:56:17FromGitter<ZarsBranchkin> Interact with the emacs lisp interpreter, thus write regular functions that can be called from Nim
15:56:27FromGitter<ZarsBranchkin> *emacs
15:56:31FromGitter<ZarsBranchkin> called from emacs
15:56:43ldleworkkrux02, yes my emacs configuration is elisp
15:56:44FromGitter<krux02> I wonder if the code completion could become better/faster/less-blocking
15:56:49FromGitter<ZarsBranchkin> https://www.gnu.org/software/emacs/manual/html_node/elisp/Dynamic-Modules.html
15:57:04ldleworkZars, have you written anything on setting up emacs for Nim support?
15:57:20ldleworkIn the general sense of like autocompletion and stuff
15:57:36FromGitter<ZarsBranchkin> I tried contributing to nim-mode, was trying to find why company-mode autocompletion is so damn slow right now
15:57:41*skelett quit (Quit: WeeChat 2.0.1)
15:57:46FromGitter<krux02> ldlework: I have a magic line in elisp that does some magic, I already gave it to zars
15:57:47ldleworkI don't remember my experience working out last time I tried
15:58:09FromGitter<ZarsBranchkin> Yeah, it used to work fine, but few months ago it got real slow
15:58:22FromGitter<ZarsBranchkin> Every character requested all completions from nimsuggest
15:58:23ldleworkI have actually been on a year long journey to finally learn elisp and dominate emacs as an application platform rather than just an editor with some ide features.
15:58:31FromGitter<krux02> http://ix.io/Rpn
15:59:01FromGitter<ZarsBranchkin> Oh, I haven't really made any serious emacs packages, but I hack around with some existing functions etc
15:59:10FromGitter<mratsim> @narimiran for your benchmarks of Nim vs Numpy/Numba: don’t forget to check some of what was started in arraymancer-demos: https://github.com/edubart/arraymancer-demos
15:59:18ldleworkZars have you discovered Hydra yet?
15:59:23ldleworkIt changed my emacs life.
16:00:12FromGitter<ZarsBranchkin> oh, pretty interesting. I'm using emacs with evil though, so idk how compatible it would be
16:00:13FromGitter<mratsim> Also don’t benchmark Arraymancer OpenCL backend, I still did not implement autodetection so it defaults to CPU
16:00:52FromGitter<ZarsBranchkin> I stuck to spacemacs configuration, really love how it's managed and how well it integrates vim keybindings
16:01:24FromGitter<krux02> yes spacemacs is cool, but I don't use it
16:01:29ldleworkoh.. evil mode
16:01:44FromGitter<krux02> not just evil mode
16:01:47FromGitter<ZarsBranchkin> Heh, I have contributed to spacemacs slightly, pretty fun
16:01:55FromGitter<krux02> spacemacs really gets some problems of emacs fixed
16:02:23ldleworkI don't really like modal editing, so hydra is a nice comprimise for "non-navigation / core editing" features
16:02:38ldleworkYou can make little contextual (even nested) popup interfaces to self-advertise some irregularly used features
16:02:48ldleworkI have like ~20 distinct hydras now for doing various things
16:03:15FromGitter<krux02> really editing is not the bottleneck.
16:03:44*endragor joined #nim
16:03:45FromGitter<krux02> nim is a very expressive language, and when something becomes too verbose I compress it with macros and so on.
16:04:21FromGitter<krux02> I do understand that you want all that stuff for markup like xml or latex
16:05:09*endragor quit (Remote host closed the connection)
16:05:31*couven92 quit (Quit: Client disconnecting)
16:05:45FromGitter<krux02> but what does help is fuzzy matching on files in the project or lines in the files when you need to find usages of identifiers.
16:06:39FromGitter<krux02> emacs just has way too many keyboard bindings
16:06:44FromGitter<krux02> and horrible ones
16:07:33FromGitter<data-man> There are many things that I do not like in Nim and which I would like to correct. ⏎ But I think that Andreas will be against them. :-)
16:08:06FromGitter<krux02> just as an example of default emacs key bindings of very useful features "C-c ! l"
16:08:14FromGitter<mratsim> Just open a RFC @data-man ;)
16:08:41FromGitter<krux02> @data-man what don't you like?
16:09:48FromGitter<krux02> Most of the things that I don't like get addressed. Except the inclusive upper bounds thing.
16:10:30mirankrux02: heh, ..< to the rescue, but i agree, i would rather have that by default
16:10:50FromGitter<krux02> yes ..< does help
16:10:58Araqyou need to iterate more over enums to see the point
16:11:05FromGitter<krux02> but the range object still has the (b) that is one off
16:11:23FromGitter<data-man> int64/uint64 must be ordinal types ⏎ I want to add builtin int128/uint128 type ⏎ D has wstring and dstring types. wstring especially useful for Windows and for compatibility with C++ std::wstring
16:11:40FromGitter<krux02> Araq: you need to iterate more over non discrete ranges to see the point
16:12:02Araqthere is no such thing as "non discrete" in programming :P
16:12:05FromGitter<krux02> Araq: how wide is 0.1 .. 0.2?
16:12:18ldleworkI actually think emacs bindings are pretty great. And in learning them you get them in anything that supports readline, nearly globally in OSX. Of course, given that they were designed when keyboards were arranged differently, you need to do a bit of keyboard remapping on any modern system just to get going. But its a small price to pay.
16:12:30ldleworkOn my emacs "C-c ! l" is undefined.
16:12:32FromGitter<krux02> I know floating is discrete but you think non-discrete with lossy representation
16:12:53ldleworkAnd its offhanded functionality like that which makes for a great application of Hydra.
16:13:02ldleworkWhatever C-c ! l is supposed to do..
16:13:17AraqI'll say it again. Exclusive upper bounds only work when you have a sentinel value that you don't want to iterate over.
16:13:22FromGitter<krux02> ldlework: it is flycheck-list-errors
16:13:35Araqit's simply the less expressive variant.
16:13:40ldleworkAh I would definitely use a hydra for flycheck operations!
16:14:14FromGitter<krux02> you don't use flycheck?
16:14:20Araqand ..< is sexy anyway so I don't see the need for complaints.
16:14:41FromGitter<krux02> yea, I know it won't get changed.
16:14:42ldleworkkrux02, I do, but I just turn it on and use next and previous errors
16:15:03ldleworkBut I've just added a TODO in my org-mode file to create a flycheck hydra
16:15:13*ipjk joined #nim
16:15:29ldleworkorg-capture, https://i.imgur.com/lbKs8tL.gif
16:16:24FromGitter<ZarsBranchkin> I should use org-capture more
16:16:25ldleworkHere's an example of how I use hydra, https://i.imgur.com/UFsQvh5.mp4
16:16:37FromGitter<ZarsBranchkin> I love org-mode, but I forget about some features sometimes
16:16:45ipjkldlework: that's badger-theme, right?
16:16:49ldleworkyes
16:16:58ipjkKnew I recognised it
16:17:07ldleworkI use org-babel to call applescript blocks from elisp, and then I hook those up to nested hydra interfaces to create little automation UI's for myself
16:17:13FromGitter<zetashift> @Idlework off-topic but is the Workiva map related to: https://github.com/Workiva ?
16:17:19ldleworkyeah
16:17:35ldleworkIn this case, the applescript is automating chrome using our single signon website to login to various AWS accounts
16:17:36FromGitter<zetashift> ah cool, I was just checking their over_react lib then I saw this screenshot haha
16:18:24FromGitter<krux02> I wrote a shell script that did the same as org capture, just it was before my emacs age and it was called log
16:18:33ldleworkorg-capture is amazing
16:18:38FromGitter<krux02> and it put the stuff in my log.md
16:18:40ldleworkI have tons more templates since that video was taken
16:19:04ldleworkI can remember books, movies, make notes about irc people, capture jira tickets, remember software packages, and many other things
16:19:17ldleworkand each thing gets filed away into the correct place in the correct format
16:19:38ldleworksome just remember the time like in the video, some create TODO's, some fetch some data from like Amazon to get book information like author and ISBN and so on
16:19:50ldleworkorg is one of the most valuable software packages ever made imo
16:20:20ldleworkIts why I'm glad evil mode exists, even though I don't like modal editing
16:20:29ldleworkBecause it is a path for vim people to the glory of org-mode
16:20:54ipjkMy top reason for using emacs, is it's super in-editor help
16:21:25ipjkI doubt I have any use for org.
16:21:37ldleworkIf you like to remember things, org is for you
16:22:16FromGitter<zetashift> there is a (probably subpar) org-mode for vscode too
16:22:17FromGitter<ZarsBranchkin> I mostly use org-mode for writing school papers and export to latex
16:22:25ipjkSuch things are usually on the fly, where I write such down on the phone.
16:22:25FromGitter<data-man> @krux02: http://glad.dav1d.de supports Nim. Have you tried the generated OpenGL code from there?
16:22:43ldleworkzetashift, most people conceptualize org-mode as a thing that lets you do tree-like documents, todos, and maybe tables
16:22:46FromGitter<zetashift> there is an org-mode for android too :P
16:22:48ldleworkIts far far more than that.
16:22:52ldleworkIts an aggregation engine.
16:23:12ldleworkthe org-tools for android I think are really just minor clients. Orgzly is nice to have.
16:23:23FromGitter<zetashift> I'm a basic spacemacs user, I don't have time to enjoy the glory of org-mode yet :(
16:23:35FromGitter<ZarsBranchkin> Yeah, orgzly is pretty useful
16:23:43ldleworkYeah I've had to put concerted efforts to adopt it
16:23:46ipjkspacemacs is the preconfigured with evil, right?
16:23:48ldleworkAnd its been a several months now.
16:23:50FromGitter<ZarsBranchkin> Heh yeah, emacs is too overwhelming with all the cool things it has
16:23:50ldleworkYeah.
16:24:04FromGitter<krux02> @data-man no I did not know that. that really sounds very interesting
16:24:06FromGitter<ZarsBranchkin> Spacemacs has emacs and hybrid bindings too
16:24:10FromGitter<krux02> I will have to try it
16:24:19ldleworkIts easier to conceptualize emacs as an TUI application platform, rather than a text editor with too many other things.
16:24:38ldleworkIt has windows, which view buffers of text, each of which has an active major mode which maps keyboard input to arbitrary elisp functions.
16:24:59ldleworkFrom that you can build a text editor sure, but also feed readers, mail clients, irc clients, finance tracking tools and so on
16:25:30ldleworkyou can even build vim on that framework :)
16:25:44FromGitter<krux02> ipjk: you can choose to have evil. But when you first start it asks you if you want evil or not
16:25:49Araqwell yes Emacs is a great OS with a mediocre editor
16:25:57*r3d9u11 quit (Remote host closed the connection)
16:26:02Araqbut this should be in #nim-offtopic ;-)
16:26:23ldleworkAraq but it has vim now! ;)
16:26:24ldleworkSorry!
16:27:31FromGitter<krux02> there is still #emacs
16:27:44FromGitter<krux02> you can talk all day there about emacs
16:27:46FromGitter<krux02> but I have to go
16:54:26*ipjk quit (Quit: Leaving)
16:55:47*sendell quit (Remote host closed the connection)
17:02:15GitDisc<spaceghost> I can write an article on Ruby extensions with Nim. It's really easy with the nim and ruby FFIs, so there's space for more than just how to call nim from ruby and vice versa.
17:03:52GitDisc<spaceghost> I'm working on a fork of muon that doesn't include nodejs as well.
17:05:13Araqoh
17:05:30Araqwe didn't mention that 0.18 also has better error messages ...
17:07:54YardanicoAraq, :D
17:08:02GitDisc<spaceghost> Changelogs are for chumps.
17:10:21*endragor joined #nim
17:10:38*endragor quit (Remote host closed the connection)
17:12:58GaveUp:q
17:13:04GaveUpoops
17:17:13jaco60Another newbie question: what is the point of openArray ? Why not using a seq instead ?
17:18:27miranjaco60: openarrays can be arrays too
17:18:39jaco60so ?
17:22:12dom96openarrays can be arrays of any size or a seq
17:22:31GitDisc<sion> Hmm, I can see the runnableExamples in the doc output, but they don't seem to run for me.
17:22:38jaco60yes, i've read that... but i still don't see the point...
17:23:15GitDisc<sion> I didn't see anything in docgen.nim that would run them, but I may be missing something.
17:23:34dom96jaco60: it is a bit of a relic of Nim's past
17:23:57dom96Still useful if you want to create a generic procedure taking either an array or a seq thoug
17:23:58dom96h
17:24:14dom96sion: what's your code?
17:24:44dom96the examples are compiled and ran when you executed ``nim doc yourfile.nim`
17:24:58FromGitter<tim-st> When I try to compile (test) my changes in stdlib file `htmlparser.nim` I get this: `Error: module names need to be unique per Nimble package; module clashes with sameFolder\strutils.nim` how can I prevent this?
17:28:41FromGitter<data-man> nim ctags also missed. I need more feedback. If this feature is not needed by anyone, then it is better to remove it.
17:32:39*d10n-work joined #nim
17:32:40GitDisc<sion> Ahh. I tried a simpler example and it worked. I'll open a bug once I narrow it down a bit.
17:33:40*Snircle_ joined #nim
17:34:56GitDisc<sion> Just making the function generic did it.
17:37:29*Snircle quit (Ping timeout: 276 seconds)
17:39:03FromGitter<tim-st> I could solve the problem. When I used another shell it worked without problems
17:42:50*SenasOzys quit (Ping timeout: 256 seconds)
18:17:19*r3d9u11 joined #nim
18:27:52*r3d9u11 quit (Ping timeout: 240 seconds)
18:27:56FromGitter<mratsim> @jaco60, arrays are allocated on the stack, seq on the heap. Heap allocation is slower than the stack
18:29:06*r3d9u11 joined #nim
18:29:55*max3 joined #nim
18:30:04max3how does compilation to webasm work if nim has GC?
18:31:03max3also the site seems to be down: https://nim-lang.org/docs/backends.html
18:31:47FromGitter<mratsim> You can choose not to use the GC by avoiding seq and strings
18:32:38FromGitter<mratsim> or since Nim GC is written in Nim, it can also be compiled to wasm
18:33:20FromGitter<mratsim> THose projects compiles to wasm or asm.js via emscripten: https://github.com/zacharycarter/zengine and https://github.com/def-/nimes
18:33:56max3mratsim: is that really the only place GC is used?
18:35:37*xkapastel joined #nim
18:37:26FromGitter<mratsim> ref objects, seq and strings use GC, anything else don't
18:37:46FromGitter<mratsim> object, array, int, tuple, ptr, etc do not use the GC
18:38:44FromGitter<mratsim> Also you can control it, see here: https://nim-lang.org/docs/gc.html
18:38:56miranwow, had no idea about that!
18:39:14Araqmax3, most common is the solution that compiles Nim plus its GC to emscripten/asm.js
18:39:28FromGitter<mratsim> or change the implementation use with —gc:none, —gc:stack (the stack is your GC), —gc:boehm, —gc:markandsweep (java-like)
18:39:47max3Araq: i guess my concern is how performant that is?
18:39:50jaco60@mratsim: thanks... I have yet to figure how to pass a seq to an openArray, then...
18:40:04FromGitter<mratsim> @jaco60, normally it’s transparent
18:40:15*SenasOzys joined #nim
18:40:18max3jaco60: does an @ here dm on gitter?
18:40:51max3Araq: especially since i'm compiling to asm.js rather than webasm (yes i know they're close but still)
18:40:51Araqmax3, haven't benchmarked it but the overhead of asm.js is a factor of 2 for native code afaik
18:40:57jaco60@max3 sorry?
18:41:30Araqthe GC is not special here, it's "native" code that is affected by the general asm.js slowdowns
18:41:36max3jaco60: you're on IRC, mratsim is on gitter. did you @ him becaus the bridge bot notifies mratsim on gitter
18:42:14jaco60@max3: i've just tried to thank him :)
18:42:17FromGitter<mratsim> @jaco60: https://play.nim-lang.org/?gist=5ee04c2c7cec240d1c2b25ab33f0cd35
18:42:54dom96max3: It's fast enough for Reel Valley: https://apps.facebook.com/reelvalley
18:44:22max3dom96: is this entire thing written in nim...?
18:44:27dom96yep
18:44:30jaco60@mratsim : i wrote that... Replacing seq by openArray in permutations arguments doesn't work well :) https://play.nim-lang.org/?gist=5ee04c2c7cec240d1c2b25ab33f0cd35
18:44:49dom96yglukhov can give more details
18:44:53dom96not sure if he's around though
18:45:12max3also how the hell do i now remove permission from this game
18:46:31yglukhovhey guys whats up
18:46:39max3yglukhov: how much of reel valley is written in nim?
18:46:59FromGitter<mratsim> Yes he is around: https://yglukhov.github.io/Making-ReelValley-Overview/
18:47:07yglukhovmax3: almost all of it
18:47:21max3yglukhov: is there a nim game engine...?
18:47:35max3oh lol rod
18:47:36max3your engine
18:48:18yglukhovthere's about 600loc java code for android, and around the same js code for emscripten. but that could also be rewritten in nim ;)
18:49:01yglukhovthere's also sdl2 still...
18:49:08max3yglukhov: compiles to asm.js or webasm
18:49:10max3?
18:49:11yglukhovother than that its nim
18:49:57yglukhovboth. but we've found wasm crash reports pretty unfriendly, so wasm is not public currently
18:50:09miranyglukhov: you should edit/write your 'about' page :) (https://yglukhov.github.io/about/)
18:50:39yglukhovyeah, maybe... =)
18:52:28max3yglukhov: русский?
18:52:47yglukhovmax3: в том числе =)
18:54:04max3откуда?
18:54:11max3whoops yglukhov: откуда
18:54:51miranotkuda? where from? :)
18:55:06yglukhovmax3: Kyiv
19:00:10*r3d9u11 quit (Remote host closed the connection)
19:01:18*rokups quit (Quit: Connection closed for inactivity)
19:02:33max3круто. я из Кишинева. anyway cool project
19:03:45AraqЯ понимаю, что
19:03:46yglukhovmax3: Thanks, and nice to meet you. Please tend to use english though, or pm ;)
19:04:28max3no problem - i don't get much opportunity to stretch my tongue (live in the US).
19:04:37*Vladar quit (Remote host closed the connection)
19:24:19jaco60Hum, wrong url... I wrote that... If i replace seq with openArray in permutations signature, winter is coming... https://gist.github.com/anonymous/3e2fe1aa8f3f0cdccebbae2aa4ef12d7
19:29:56planetis[m]hackernews is bullshit.. Seriously "Burning Out: What Really Happens Inside a Crematorium" who wants to read this?
19:35:40*rockcavera quit (Remote host closed the connection)
19:39:29GitDisc<spaceghost> You mean you don't think of HN as free internet points for people who like that sort of thing?
19:41:09dom96planetis[m]: That sounds interesting to me :P
19:43:35*vegax87 quit (Remote host closed the connection)
19:45:07planetis[m]spaceghost: I don't mind what people like to do. But I think the way post appear in frontpage is biased and not following any aalgorithm
19:45:16planetis[m]same for imgur
19:46:00planetis[m]dom96: okay lol
19:58:15Araqdom96, we need to reset the changelog.md, right?
19:59:07dom96yes, just add a new version heading
19:59:10dom96and the same sub-sections
19:59:30Araqwell tell that to zahary, he touched the file in a PR
19:59:32dom96and make sure people put their changes in the right one, I don't want to go through them all again and sort them because they're all under "Changes affecting backwards compat"
19:59:55dom96we should do it after each release really
20:00:31dom96but yeah, I'll let him know
20:45:07*xkapastel quit (Quit: Connection closed for inactivity)
20:56:06FromGitter<stisa> jaco60: like this https://play.nim-lang.org/?gist=3f79967a22f983f7d4747c45287a6b12 ?
20:57:45*vegax87 joined #nim
20:58:27jaco60Yes, i've finally found that i had to use @ to convert the openArray to a vect :)
21:10:50*rockcavera joined #nim
21:19:05*MJCaley joined #nim
21:32:12*gmpreussner quit (Ping timeout: 256 seconds)
21:33:32*gmpreussner joined #nim
21:38:44*Trustable joined #nim
21:41:23*deech joined #nim
21:44:59deech Hi all, I really like Nim's GC over D's but I'm also a big fan of D's introspection capabilities (the Allocator API, for example, https://dlang.org/phobos/std_experimental_allocator.html). It isn't clear to me from the manual how Nim compares here. Is there an article or forum post you can refer me to?
21:45:46deechPlease note, I'm not asking about macros vs. mixins, just static introspection.
21:51:03deechI have already read the typetraits module (https://nim-lang.org/docs/typetraits.html).
21:54:03*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:54:43*miran quit (Quit: Konversation terminated!)
21:54:49*nsf quit (Quit: WeeChat 2.0.1)
21:57:43*deech` joined #nim
21:58:30*deech` left #nim (#nim)
22:07:10*yglukhov quit (Remote host closed the connection)
22:07:43*yglukhov joined #nim
22:11:00*jubalh joined #nim
22:11:10jubalhhi
22:12:05*yglukhov quit (Ping timeout: 240 seconds)
22:15:56Araqdeech, well it's hard to answer your question.
22:16:27dom96hey jubalh!
22:17:01Araqin general you can use macros to do introspection...
22:17:13Araqbut I got the feeling I shouldn't use the word "macro" :-)
22:17:59*vegax87 quit (Changing host)
22:17:59*vegax87 joined #nim
22:17:59*vegax87 quit (Changing host)
22:17:59*vegax87 joined #nim
22:20:18jubalhGuys, I could use some help
22:20:37jubalhTrying to update the spec file for nim. I get the following error when building: https://build.opensuse.org/package/live_build_log/home:jubalh:branches:devel:languages:misc/nim/openSUSE_Tumbleweed/x86_64
22:20:56jubalhspec file with instructions how it is built can be seen here: https://build.opensuse.org/package/view_file/home:jubalh:branches:devel:languages:misc/nim/nim.spec?expand=1
22:21:01jubalhmaybe you spot what is going from?
22:21:52jubalh'_code/2_2/stdlib_os.c:7:10: fatal error: nimbase.h: No such file or directory' but nimbase is in lib and c_code subfolders
22:22:15*natrys quit (Quit: natrys)
22:22:31deechAraq: Maybe a concrete example would help, in D there is a library that checking integer overflows that uses a kind of static hook design. How easy would that be to port to Nim?
22:24:00Araqjubalh, https://github.com/nim-lang/csources/blob/master/c_code/nimbase.h somehow this file needs to be picked up
22:24:12deechAraq: Forgot the link https://dlang.org/phobos/std_experimental_checkedint.html.
22:24:38jubalhAraq: sorry what do you mean by somehow picked?
22:24:51jubalhI downloaded the official tarball, and the file is in the c_code and lib subfolders
22:24:59jubalhso i am not sure why the build scripts dont work
22:25:13Araqhttps://github.com/nim-lang/csources/blob/master/build.sh#L206
22:25:26Araqnote the -Ic_code part
22:26:16jubalhit means to include the c_code subfolder, right?
22:26:25jubalhso i think all this _should_ work?
22:26:38Araqyeah...
22:26:55*MJCaley quit (Quit: MJCaley)
22:27:09jubalhso why doesnt it? :)
22:27:14Araqdeech, it's tough to directly translate these things, the idiomatic Nim solution looks quite different
22:27:26Araqfor example
22:27:35jubalhAraq: did you take a look at the spec file? I suppose you guys build it the same way
22:29:36jubalhoh build.sh is not run
22:29:38Araqchecked(RaiseOnOverflow):
22:29:43Araq echo a + b * c
22:29:43jubalhprobably this is new in 0.18.0
22:30:37Araqwell I don't really understand .spec files but
22:30:39Araqcc -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -c -o c_code/2_2/stdlib_math.o c_code/2_2/stdlib_math.c
22:31:08Araqis not something my compiler produces, my compiler includes -Ic_code so that nimbase.h can be found
22:31:22jubalhAraq: basically from the %build section onwards stuff should be more or less readable for you. there it can be seen what we run
22:31:42jubalhso we run make, is that needed?
22:31:57jubalhand after make we do: ./bin/nim c $NIMFLAGS koch
22:32:08jubalhonly then ./koch boot -d:release $NIMFLAGS \
22:32:09jubalh -d:useGnuReadline
22:32:15jubalhand then the tools
22:32:16AraqI never run make.
22:32:42Araqand I dunno what
22:32:43Araqexport NIMFLAGS="$(echo '%{optflags}' | sed 's/\([^[:space:]]\+\)/--passC:\1/g')"
22:32:43Araqexport NIMFLAGS="$NIMFLAGS %{?jobs:--parallelBuild:%{jobs}}"
22:32:54Araqdoes. nor do I want to know.
22:33:08jubalh:)
22:33:16jubalhok with adding of build.sh it now builds
22:33:21jubalhmaybe i should remove the make
22:33:26jubalhthanks
22:33:58*endragor joined #nim
22:34:45Araqjubalh, IMO you should start a new .spec file from scratch
22:35:03Araqand when your .spec file uses 'sed', restart
22:35:27*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:36:17Araqfor example
22:37:03Araqit calls 'koch install' which is deprecated for a while
22:37:17Araqit's now 'koch distrohelper'
22:37:42Araqand then it seems to ignore the output of koch and does
22:37:52jubalhcan i see somehwhere which koch calls changed from 0.17.2 to 0.18.0?
22:37:56Araqls ./bin | while read f; do
22:37:56Araq install -Dpm 0755 "./bin/$f" "%{buildroot}%{_libdir}/nim/bin/$f"
22:37:56Araq ln -s "%{_libdir}/nim/bin/$f" "%{buildroot}%{_bindir}/$f"
22:38:35Araqmaybe that is correct/better for Suse
22:38:58Araqbut it's undocumented and nobody knows if the author knows better than 'koch' or was drunk
22:39:05*endragor quit (Ping timeout: 276 seconds)
22:39:28jubalhhmm btw gentoo also uses koch install: https://github.com/gentoo/gentoo/commit/5f5b8085f0b8bdf8effa00e2f773fb1fa1e2377b
22:40:31Araqof "distrohelper": geninstall()
22:40:31Araq of "install": install(op.cmdLineRest)
22:40:46Araqwe have 'distrohelper' to help create Linux packages
22:41:19Araqso 'install' is not even an alias
22:41:44jubalhfunny that two distros i checked are not aware of that
22:43:13jubalhAraq: can you point me to the docu of these koch commands?
22:43:18jubalhso i can fix things up?
22:44:09Araqdon't have any, sorry. :-)
22:44:23Araq" distrohelper [bindir] helper for distro packagers"
22:44:41Araqjust run it, see the .sh files it produces
22:45:27jubalhhmm, so can you please list me the actual commands that one should use to build and install?
22:47:19Araq./koch distrohelper
22:47:26Araqproduces install.sh
22:48:54jubalhso: ./build.sh ./koch distrohelper ./install.sh
22:49:13Araqwell it depends. more like
22:49:18Araq./build.sh
22:49:26Araqbin/nim c koch
22:49:31Araq./koch distrohelper
22:49:35Araq./install.sh
22:50:00Araqbut this install.sh is only for you package creators
22:50:35jubalhbecause?
22:53:49Araqbecause we don't want people to manually sudo distribute crap into /usr/bin
22:54:20Araqthat's the job of the Linux package manager
22:57:22Araqiirc you run the install.sh in a virtual environment to extract the instructions for the package? not sure how this works
22:57:47GitDisc<spaceghost> You mean /usr/local/bin and they don't manage their $PATHs well and stuff?
22:58:37Araqno I mean, they have trouble to update nim and have old versions lying around
22:59:28Araqplus the deinstall.sh script needs to be written by the install script so it can deinstall but then nobody knows where to put it
23:19:10FromGitter<mratsim> All distros track files installed though, what would the deinstall.sh do beyond that? Some bash_profile/env variable?
23:25:06*Trustable quit (Remote host closed the connection)
23:26:36ZevvIt seems that the seach box in the online nim documentation is broken?
23:26:44ZevvThe 'nim manual' search works
23:27:02Zevvbut most other pages do not show results when typing in the search box
23:27:40Zevvjavascript errors like 'TypeError: value_28192 is undefined' instead
23:27:51Zevvdohack.js:1448
23:36:22AraqZevv, ouch :-(
23:37:55Araqmratsim: as I said, where to put the deinstall.sh script?
23:54:22*max3 quit (Quit: Connection closed for inactivity)