<< 13-11-2019 >>

00:00:00*leorize quit (Ping timeout: 260 seconds)
00:03:57*krux02_ joined #nim
00:06:43*krux02 quit (Ping timeout: 250 seconds)
00:24:49*krux02_ quit (Remote host closed the connection)
00:51:25FromDiscord<exelotl> Kinda threw me that arr.len doesn't work for var arr: ptr array[5, int]
00:52:15FromDiscord<exelotl> I guess arr[].len would be ok
00:58:57*ng0 quit (Quit: Alexa, when is the end of world?)
01:11:46madpropsmade another thing https://github.com/madprops/lester
01:13:41disruptekmadprops: checkout the cligen package on github. i think you'll like it.
01:23:18skrylar[m]well most of glib is dealt with. couple edge cases but meh
01:29:42madpropsim trying to make the compiler know that all code is in /src
01:29:46madpropsim doing srcDir = "src"
01:29:51madpropsin the .nimble file
01:29:54madpropsbut that doesn't seem to work
01:30:40miprithat's what I do, and it finds code in src. why do you think it doesn't work?
01:31:19madpropsfor instance if i do: nim compile -d:release lester
01:31:26madpropsit expects to find lester.nim
01:31:45mipriit's 'nimble' that cares about your .nimble file, not nim.
01:32:21mipriif you also have `bin = @["lester"]`, then you can 'nimble build' to build it.
01:34:41madpropsis there an equivalent for nim compile --run with nimble?
01:34:47madpropsnimble run seems to make a package
01:35:19shashlicknimble c
01:36:12madpropsso im guessing it needs an argument
01:36:19FromGitter<kaushalmodi> madprops: yes, use config.nims
01:36:37madpropsso far i have srcDir and bin in there
01:36:51FromGitter<kaushalmodi> E.g.: https://github.com/kaushalmodi/elnim/blob/master/tests/config.nims
01:37:03miprinimble c doesn't respect srcDir settings annoyingly.
01:37:25mipriuse 'nimble run lester'
01:37:59FromGitter<kaushalmodi> I use nimble only to store the nimble package metadata
01:38:11FromGitter<kaushalmodi> Everything else goes in config.nims
01:39:30madpropshttp://i.imgur.com/Dti1dtt.png
01:39:45madpropshttp://i.imgur.com/yNhQ1Nd.png
01:40:31mipri'nimble c' takes flags, and since it doesn't respect your .nimble it isn't more useful than 'nim c' for this anyway.
01:40:41mipri'nimble run' does what you want. you just need to pass the name of the binary.
01:41:08miprithat's an unfortunate error message from nimble though.
01:41:23*abm quit (Quit: Leaving)
01:41:27madpropsbtw, is nimble build a release bin?
01:42:37madpropsor do i need -d:release
01:42:44mipriwith --debug nimble will print out the exact commands it's running.
01:43:01mipriyou need -d:release
01:43:30madpropscan't see a reason to not use just the compiler lol
01:43:39disrupteki'm with you, buddy.
01:44:40mipriyou mostly can. nimble gives you an alternative to makefiles for custom tasks, and it handles dependencies, and it has some reasonable tasks by default, like 'nimble test'
01:45:18*endragor joined #nim
01:45:44*endragor quit (Remote host closed the connection)
01:46:22*endragor joined #nim
01:46:53FromGitter<kaushalmodi> mipri: config.nims serves as more general purpose Makefile replacement
01:47:10FromGitter<kaushalmodi> nimble test doesn't run the tests in runnableExamples, for example
01:48:09FromGitter<kaushalmodi> config.nims also has the advantage that you define your favorite tasks once in your global config.nims, and then reuse them in all your projects
01:48:30disruptekyer blowin' my mind right now.
01:48:47miprithat sounds like an annoyance rather than an advantage. how do other people get your favorite tasks?
01:48:52FromGitter<kaushalmodi> disruptek: serious or sarcastic?
01:49:14disruptekthere's an only directory where you can trade tasks.
01:49:19disrupteks/only/online/
01:49:49FromGitter<kaushalmodi> mipri: I git clone my config on my Travis CIs
01:50:26disruptekmipri: he really does have a 300 line config.nims.
01:50:54FromGitter<kaushalmodi> disruptek: most of those is for the musl build support
01:51:17disruptekdisbot: you awake, buddy?
01:51:18disbotyep. 😊
01:51:20FromGitter<kaushalmodi> but at least now "nim musl foo.nim" just works for any of my projects ;)
01:56:48*endragor_ joined #nim
01:57:41disrupteki admit, that sounds like the right way to impl that.
01:58:36*endragor quit (Read error: Connection reset by peer)
01:58:39*endragor_ quit (Remote host closed the connection)
02:05:46*uu91 quit (Read error: Connection reset by peer)
02:06:04*uu91 joined #nim
02:12:59madpropshow can i compile --run but create the binary somewhere specific?
02:13:08madpropsor maybe i should just use nimble
02:14:45miprijust combine the flags
02:14:59miprinim -c -o:wat -r src/lester.nim
02:15:08mipriwithout the first -
02:16:06madpropsnice ty
02:17:21madpropsis there a way to change the context of --run ?
02:17:28mipriwhat do you mean by 'context'?
02:17:36madpropsi put it in bin/lester but i think it's running it from the root dir
02:18:09madpropsnim c -o:bin/lester -r src/lester.nim
02:18:41madpropsif i go to bin/ and run it, it works fine
02:19:31madpropsi guess i could cd somewhere first
02:20:03miprithat's what I'd do, if the current directory matters to the command.
02:20:20mipri( cd bin; nim c -r ../src/lester.nim )
02:21:27madpropsinterestingly. if i omit -o lester it places it in src
02:22:15*Kevin5 joined #nim
02:22:33*Jjp137 quit (Ping timeout: 268 seconds)
02:23:46madpropsnow i have to figure out to do the same but with -d:release
02:24:15madpropsit expects a filename. but a path doesn't work
02:30:58disruptek--outdir="somedirectory" sets the location to output binaries.
02:31:48madpropsworked
02:34:00*ponyrider quit (Quit: WeeChat 2.6)
02:34:19*Jesin joined #nim
02:37:32*Kevin5 quit (Remote host closed the connection)
02:43:52madpropsi want to make the working dir as the binary's dir
02:43:55madpropsim doing setCurrentDir(newDir=".")
02:43:58madpropsbut that didn't work
02:44:51disruptekyou need to operate on the path of the app.
02:45:09madpropsthing is sometimes i call it as bin/lester
02:45:14madpropsinstead of going to bin first
02:45:19madpropsit should work in both cases
02:45:32disrupteksetCurrentDir(getAppDir())
02:45:56madpropsace
02:49:47*leorize joined #nim
02:50:18*lritter quit (Ping timeout: 245 seconds)
02:51:12*lritter joined #nim
02:51:42madpropsthis is so weird
02:51:56madpropsdoes echo auto inserts a newline before it starts?
02:52:01madpropssomehow the start of the program is printing a newline
02:52:13disrupteknah.
02:53:18madpropsoops :)
02:53:36madpropshad a sneaky debugging echo
03:06:22*ponyrider joined #nim
03:06:38*rockcavera quit (Remote host closed the connection)
03:09:36*Jjp137 joined #nim
03:15:51*uu91 quit (Read error: Connection reset by peer)
03:16:08*uu91 joined #nim
03:38:24*Kevin5 joined #nim
03:39:25*endragor joined #nim
03:51:42*uu91 quit (Read error: Connection reset by peer)
03:51:58*uu91 joined #nim
04:03:09*bacterio quit (Read error: Connection reset by peer)
04:10:02*theelous3 quit (Ping timeout: 240 seconds)
04:12:25*uu91 quit (Read error: Connection reset by peer)
04:12:38*uu91 joined #nim
04:14:26*ponyrider quit (Quit: WeeChat 2.6)
04:15:06*Kevin5 quit (Remote host closed the connection)
04:16:19*theelous3_ joined #nim
04:24:01*ponyrider joined #nim
04:45:47*chemist69 quit (Ping timeout: 250 seconds)
04:47:39*chemist69 joined #nim
04:50:28*nsf joined #nim
05:17:55FromGitter<Vindaar> @deech: there's a package for clojure persistent vectors by PMunch here https://github.com/PMunch/nim-persistent-vector ⏎ I use it and its working fine for me.
05:57:09*ltriant quit (Quit: leaving)
06:19:48*uu91 quit (Read error: Connection reset by peer)
06:20:09*uu91 joined #nim
06:25:19*narimiran joined #nim
06:27:57*onionhammer quit (Ping timeout: 240 seconds)
06:28:20*onionhammer joined #nim
06:33:08*dddddd quit (Remote host closed the connection)
06:34:23*solitudesf joined #nim
06:36:25Araqhttps://arxiv.org/pdf/1902.05178.pdf
06:58:37*lritter quit (Ping timeout: 240 seconds)
07:08:38madpropsso putting globals in their own module and importing the module works. wondering if it's possible to expose globals defined in the main file to other modules
07:10:21Araqit doesn't
07:27:39*PMunch joined #nim
07:30:31*Kevin5 joined #nim
07:32:04Mister_Magisterhow can i specify compiler binary with --cpu:arm --os:linux
07:34:30PMunchJust came up with a topic for a FOSDEM talk that someone might want to do: Functional benefits in an imperative language
07:36:08PMunchOn how Nim can track side-effects, has a distinction between `proc` and `func`, and how things like zero-functional works
07:37:28*kevin joined #nim
07:37:51*kevin is now known as Guest11723
07:37:53*Kevin4 joined #nim
07:42:56*tane_ joined #nim
07:46:07Mister_Magisterwell i got that but now i'm getting stdlib_assertions.nim.c:10:10: fatal error: sys/types.h: No such file or directory
07:46:46*filcuc joined #nim
07:47:24PMunch--gcc.exe?
07:47:45PMunchAnd you possibly also want to set --gcc.linkerexe
07:48:36PMunchFor reference, this is how I cross-compile to Windows from Linux: nim c --os:windows --gcc.exe:x86_64-w64-mingw32-gcc --gcc.linkerexe:x86_64-w64-mingw32-gcc
07:48:59Mister_MagisterPMunch thanks but i alrady got that now i have he problem above
07:49:13Mister_Magisterwell to be more exact
07:49:25Mister_Magister--arm.linux.gcc.exe:arm-suse-linux-gnueabi-gcc --arm.linux.gcc.linker:arm-suse-linux-gnueabi-gcc
07:51:13PMunchMight need to set a gcc.path?
07:52:50Mister_MagisterPMunch but it's /usr/bin not anything connected with /usr/include
07:53:09PMunchYeah I'm just guessing here..
07:53:24PMunchNot really sure where it tries to find sys/types.h when cross compiling..
07:54:08PMunchMight be a separate package from the one that ships arm-suse-linux-gnueabi-gcc
07:54:15PMunchWhich distro are you running?
07:55:13Mister_Magisteropensuse
07:55:33Mister_Magisterbtw if i compile for arm does that mean int64 is not available?
07:56:53PMunchI think int64 would be available, but possibly being rewritten by the compiler to something less efficient
07:57:29Mister_Magistermy program parses json to int64 and i'm getting error about out of range…
07:58:20Mister_MagisterError: unhandled exception: Parsed integer outside of valid range
07:58:31PMunchThe default `int` might be int32
07:59:15Mister_Magisteryeah but i think it's using int64
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:17Mister_Magistermaybe i will try building whole nim on arm and then compiling
08:00:31PMunchHmm, which package did you install to get the cross compiler?
08:00:52PMunchSlight "warning", building Nim on an arm processor might take a little while
08:01:33Mister_Magisteryeah i know but ubuntu doesn't have newer packages
08:01:44Mister_Magisteri've updated nim on opensuse and made it available on arm but well
08:04:27*gmpreussner joined #nim
08:14:38Kevin4👑️
08:17:53*livcd quit (Quit: Lost terminal)
08:20:15*livcd joined #nim
08:30:17*venk joined #nim
08:30:39FromDiscord<itmuckel> Hey guys! https://github.com/itmuckel/nimtellij <-- I started a repository for an intellij plugin. The only thing it supports right now is syntax highlighting and code completion, but it might be something to build upon.
08:30:40FromDiscord<itmuckel>
08:30:40FromDiscord<itmuckel> Someone in this chat was interested in building an intellij plugin, but I can't remember who it was. Just letting you know, if someone wants to dig into the IntelliJ plugin framework to make this plugin useable, just do it. 🙂
08:31:08Mister_Magister@itmuckel OH GOD THANKS LORD TO YOU
08:31:33Mister_Magisterjesus that's what i've been waiting for. some sane IDE for nim
08:31:42FromDiscord<itmuckel> 😄
08:32:22Kevin4thanks ! very helpful
08:32:29*Kevin5 quit (Remote host closed the connection)
08:32:59FromDiscord<itmuckel> I'll comment out the code a bit more to make it easier to get into it
08:33:50Mister_Magisterdo you plan on doing prebuilds?
08:34:20FromDiscord<itmuckel> Oh, yeah, wait, I'll build a current version and upload it
08:35:28FromDiscord<itmuckel> But you still need nimlsp in your path like written in the README
08:36:04FromDiscord<itmuckel> So in fact this plugin doesn't do much on it's own. It connects intellij to the nimlsp and even for that it uses a library. 😄
08:36:48Mister_Magisterthat's plenty already
08:37:04Mister_Magisterand you can make nim buildtarget without plugin even i believe
08:42:03*venk quit (Quit: ERC (IRC client for Emacs 27.0.50))
08:42:54FromDiscord<itmuckel> https://github.com/itmuckel/nimtellij/releases/tag/0.1 Okay, here you go.
08:43:16Mister_Magisterthanks!
08:43:26FromDiscord<itmuckel> There's still much to do and I wanted to actually program a bit in nim, before writing IDE support for it, but maybe I find people who also want to work on it.
08:44:41FromGitter<zacharycarter> vscode is still probably better
08:45:04FromGitter<zacharycarter> but cool either way
08:45:08Mister_Magister@zacharycarter let's not go into that :)
08:45:22Mister_Magistereveryone has their preferences and that's fine
08:45:29FromGitter<zacharycarter> no it's not about preferences
08:45:38FromGitter<zacharycarter> what makes IntellIiJ at all decent is its refactoring capabilities
08:45:42Mister_Magisteroh here we go again
08:46:07Mister_MagisterPMunch it wasn't that long lol
08:46:24FromGitter<zacharycarter> it's not even arguable it's fact - it's like how Visual Studio is shit without resharper and resharper is what makes Rider at all decent
08:46:54FromGitter<zacharycarter> unless the runtime / tooling supports those features any IDE will be not so great
08:47:31FromGitter<zacharycarter> and an editor will be just as good if not better - and I'm saying VSCode is probably still better because the Nim plugin supports more than syntax highlighting and auto complete
08:47:39FromGitter<zacharycarter> I think you're misunderstanding what I'm saying
08:48:05FromGitter<zacharycarter> you can replace the name IntelliJ with any IDE that offers Nim support - and the facts will be the same
08:48:23FromDiscord<itmuckel> Yeah, without all the refactoring stuff, IntelliJ is just a big text editor with syntax highlighting.
08:48:28FromGitter<zacharycarter> exactly
08:48:54PMunchMister_Magister, I was about to start it earlier :P
08:49:08PMunchYour statement "jesus that's what i've been waiting for. some sane IDE for nim" kinda invited it :P
08:49:59FromGitter<zacharycarter> in fact IntelliJ without that tooling is arguably worse than VSCode
08:50:04FromGitter<zacharycarter> all that mouse clicking to set up build configurations etc
08:50:06PMunchPersonally I've been programming in Vim without anything but syntax highlighting for a long time
08:50:19FromGitter<zacharycarter> same but VSCode
08:50:23PMunchNow I use nimlsp mostly for it's LspDefinition feature
08:50:26FromGitter<zacharycarter> I guess I have click through
08:50:33FromGitter<zacharycarter> but that's about all I use
08:50:58Mister_MagisterPMunch yeah kinda :P
08:51:35FromDiscord<itmuckel> @PMunch @zacharycarter
08:51:36FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/644097013578727424/7b2.png
08:52:05FromGitter<zacharycarter> well - program in Nim for long enough and you won't really need them
08:52:07Mister_Magisterlet's all use vim
08:52:14FromGitter<zacharycarter> vim is fine
08:52:31FromGitter<zacharycarter> modal editors are popular for good reason
08:52:54FromDiscord<itmuckel> I use ideavim in IntelliJ
08:53:32FromGitter<zacharycarter> I have to use IntelliJ at work because Java, but if I wasn't using Java I'd uninstall it immediately
08:54:37FromDiscord<itmuckel> Really? Why?
08:55:27FromDiscord<itmuckel> At work we use it too for angular/typescript/js and everything else and it's really awesome.
08:55:54FromGitter<zacharycarter> well at home I mostly use C/C++ and Nim
08:56:03FromGitter<zacharycarter> so it's of limited use there
08:56:17FromGitter<zacharycarter> and at work for any web stuff I use VSCode
08:56:46FromDiscord<itmuckel> What do you use for C/C++?
08:57:02FromGitter<zacharycarter> I don't like using an IDE when an editor will suffice - they tend to involve a lot more mouse clicking and project setup and large runtime memory footprints
08:57:21PMunchzacharycarter, totally agree
08:57:32tane_vscode works really well for most stuff actually
08:57:40FromGitter<zacharycarter> VSCode if I'm on linux and if I'm on windows sometimes Visual Studio. If on Mac then XCode
08:57:44tane_despite being an electron app :)
08:57:44FromGitter<zacharycarter> agreed
08:57:51FromGitter<zacharycarter> it's a pretty efficient electron app
08:57:58FromGitter<zacharycarter> they've done well with it in that regard
08:58:08PMunchI use Vim for everything. Keeping my tools separated, an editor for editing, build tools for project setup, git for version control, and the terminal to tie them all together
08:58:18tane_PMunch, do you have nim completion in vim?
08:58:30PMunchI have Nim completion in my head
08:58:44PMunchBut yes, my Vim does have nimlsp, so I can trigger completions
08:59:04tane_ok
08:59:29tane_I have neovim + CoC, but it does not work out of the box at the moment, not sure if not too lazy to set that up :)
09:00:19PMunchCoC?
09:00:31tane_https://github.com/neoclide/coc.nvim
09:00:33FromDiscord<itmuckel> I can't remember the standard library and which package has what methods and the docs for anything. So I like my IDE to tell me.^^
09:01:20FromGitter<zacharycarter> I needed it at first but eventually it got annoying, especially in VSCode
09:01:28FromGitter<zacharycarter> where the suggestions would appear over where you were trying to type
09:01:48FromGitter<zacharycarter> and there was something else funky like, you had to manually click out of the auto suggestion box, in all it was just terrible
09:02:16FromDiscord<itmuckel> Yeah, that's the current state of it.^^
09:03:24FromGitter<zacharycarter> I'm going to be doing a lot of Nim programming this week / weekend. Starting to get motivated now that my network code is written and my map parsing code is coming along
09:03:30FromGitter<zacharycarter> networked rts incoming
09:04:09PMunchWoop woop!
09:04:11FromGitter<zacharycarter> https://assetstore.unity.com/packages/3d/characters/humanoids/toon-rts-units-67948 - going to use these units as placeholder art
09:05:02FromGitter<zacharycarter> which I guess will kind of suck because I can't release them FOSS - right now my games github repo is private
09:05:34FromGitter<zacharycarter> eventually I'll try to recruit a 3d artist from work to make me some
09:05:53FromGitter<zacharycarter> that or I'll spend a few weeks making some really bad programmer art
09:10:52PMunchThat is ultimately what have slowed my game design to a crawl, the constant struggle for assets
09:11:06*ng0 joined #nim
09:11:34FromGitter<zacharycarter> yeah - it's mostly why I switched to 3d, I feel like 3d assets are way easier to come by
09:11:48FromGitter<zacharycarter> especially isometric 2d art
09:11:58FromGitter<zacharycarter> unless you want to make your own from 3d art which is a chore in of itself
09:12:43FromGitter<zacharycarter> at least with 3d I can buy decent looking stuff from the asset store / find open source art on blendswap and then release a game with it
09:12:52FromGitter<zacharycarter> but it is a major pain / struggle
09:13:10FromGitter<zacharycarter> why does art have to be so hard? :P
09:16:49PMunchI just normally do 2D, because at least then I can change stuff if I need to
09:17:20PMunchSo I typically end up finding a spritesheet and then just changing some colours around to create more characters :P
09:19:26FromGitter<zacharycarter> yeah - unless you have the source files for 3d that's painful
09:19:39FromGitter<zacharycarter> but thankfully when you buy assets off the asset stores they usually come with them
09:20:38PMunchHmm, I should really clean up my browser session. It's starting to chug pretty heavily now..
09:21:10PMunchWell that would mean doing 3D model work, which I find way harder than 2D art
09:22:31PMunch320+ tabs doesn't seem to be a supported scenario in Vivaldi
09:23:12FromGitter<zacharycarter> :D
09:28:15PMunchThere, down to 20 tabs :P
09:28:40FromGitter<zacharycarter> this is probably a noob question - but is there any way to serialize a browser session and send it via email or something?
09:28:50FromGitter<zacharycarter> so I can just click a link and have chrome open with all of the same tabs?
09:29:29PMunchHmm, I don't think so
09:29:35PMunchNot in a cross-browser way at least
09:29:45FromGitter<zacharycarter> would be sweet
09:30:46PMunchYeah I really want to have a more session based browsing experience
09:30:53PMunchWith less focus on clicking everywhere..
09:37:47Zevvtridactyl!
09:37:49Zevvon firefox
09:44:53lqdev[m]gosh, how can you even have >10 tabs open at a time
09:45:11Zevvalways makes me wonder
09:45:33Zevvmy wife does that - I can't stand to even look in the general direction of her desktop
09:45:39lqdev[m]I'd go crazy if I had any more than that
09:45:47FromGitter<Vindaar> imo because bookmarks in browser suck
09:45:54lqdev[m]it'd trigger my natural garbage collection cycle ;)
09:47:20PMunchYeah I don't use bookmarks
09:47:27PMunchI just leave tabs I might want to check out later open
09:47:35FromGitter<Vindaar> yep
09:47:49PMunchAnd then use the search across open tabs feature to find what I need
09:48:05Zevv"search across oven tabs" - does that even exist, wow
09:48:15Zevvs/opebn
09:48:28Zevvraaagh, nevermind
09:48:54PMunchWell kinda
09:49:18PMunchIt's a "Quick panel" that searches history, open tabs, or falls through to Google
09:51:05PMunchIt's pretty dumb though, doesn't default to highlighting open tabs, so I have to use the arrows keys to get to the open tabs instead of searching google..
10:07:39*solitudesf quit (Remote host closed the connection)
10:08:08*solitudesf joined #nim
10:28:57*theelous3_ quit (Ping timeout: 240 seconds)
10:38:17FromDiscord<Kurolox> Hello!
10:39:50FromDiscord<Kurolox> So I'm picking Nim. It's a language that I find fascinating, but I have some questions about it
10:40:18FromDiscord<Rika> hi, ask away
10:41:10FromDiscord<Kurolox> I'm following `Nim by Example` since I already have some experience programming, and it says that some data types have to be initialized beforehand (like floats) or the compiler won't work
10:41:22FromDiscord<Kurolox> so you can't do something like `var a = float`
10:41:43FromDiscord<Kurolox> right?
10:41:47FromDiscord<Rika> its more of `var a: float`
10:41:57FromDiscord<Rika> !eval var a: float; a = 2.0
10:42:00NimBot<no output>
10:42:05FromDiscord<Rika> it compiles
10:42:10FromDiscord<Kurolox> hm
10:42:17FromDiscord<Rika> you can do `var a: float` then set it in the future
10:43:03FromDiscord<Rika> `(const/var/let) {identifier}[: {type name}][= {value}]`
10:43:19FromDiscord<Kurolox> Oh, I see what was my issue. It was using `let` instead of `var` in the example, so since it wasn't mutable the compiler was complaining
10:43:28FromDiscord<Kurolox> I'm quite dumb, I'm sorry
10:43:39FromDiscord<Rika> also you put `var a = float` instead of `var a: float`
10:43:40FromDiscord<Rika> it's fine
10:43:47FromDiscord<Rika> it's different to most languages
10:43:57PMunchNim will also auto-initialise all values to binary 0
10:44:08PMunch!eval var x: float; echo x
10:44:11NimBot0.0
10:44:18FromDiscord<Rika> C-likes use `{type} {ident}` so like `float a` instead of what nim does
10:44:22PMunchSo even if it isn't given a value it will be 0.0
10:44:39FromDiscord<Kurolox> That's really neat
10:44:47PMunchStrings will be empty strings, sequences empty sequences, and I believe Tables are now also treated as empty tables.
10:44:53FromDiscord<Rika> wish `nil` goes away in the future 😛
10:45:10PMunchRika, it's already mostly gone if you don't work with C interop
10:45:20FromDiscord<Rika> i mean, i guess haha
10:45:21FromDiscord<Kurolox> I'm also quite fascinated by how procedures work in nim, I haven't seen anything like that before but it makes a lot of sense
10:45:39FromDiscord<Rika> procedures are just what most people call functions, but named properly
10:45:50FromDiscord<Rika> what's amazing?
10:45:53FromDiscord<Rika> im not sure i see it
10:46:07FromDiscord<Kurolox> the fact that they have an implied `result` variable already declared that's returned automatically
10:46:42PMunchOh right, yeah that is borrowed from Pascal I believe
10:46:44FromDiscord<Rika> i think that exists in golang too 😛
10:47:01FromDiscord<Kurolox> I'm not familiar with golang unfortunately, most of my experience comes from Python, JS and Java
10:47:03PMunchIf you want more implicit return goodness: https://peterme.net/tips-and-tricks-with-implicit-return-in-nim.html
10:47:19PMunchOh well, off to lunch
10:47:30FromDiscord<Rika> also, last expression returns if its "not used" and matches type
10:47:53FromDiscord<Rika> oooh python, do you know python's type hints
10:47:57AraqRika: there is an RFC and a prototype implementation for getting rid of 'nil'
10:48:01FromDiscord<Rika> it's the same syntax in nim
10:48:03*solitudesf quit (Ping timeout: 250 seconds)
10:48:17FromDiscord<Rika> nice
10:48:46FromDiscord<Kurolox> yeah, I know them. They're somewhat useful, but I'm sad that you have to use some really speficic linters that "enforce" them
10:49:02*crem joined #nim
10:49:09FromDiscord<Rika> well yeah its the same syntax in nim, just with var before the varname
10:49:16FromDiscord<Rika> or let
10:49:36FromDiscord<Kurolox> I guess this isn't a nim specific thing, but more of a general programming question
10:49:46FromDiscord<Rika> ~~also the enforcing issue is why i moved to nim lmaooo~~
10:49:51FromDiscord<Kurolox> what's the difference between an inmutable data type and a constant?
10:49:58FromDiscord<Kurolox> both appear to be functionally the same
10:50:07FromDiscord<Rika> which, let vs const>
10:50:09FromDiscord<Rika> ?*
10:50:11FromDiscord<Kurolox> yes
10:50:22FromDiscord<Rika> let is runtime, const is compiletime
10:51:10FromDiscord<Rika> if the variable is a `ref`, you can change its contents if it's in a `let` because the reference is made immutable, not the referenced data
10:51:14FromDiscord<Rika> (i think)
10:52:22FromDiscord<Rika> `const`s are evaluated in compiletime, then its result replaces all references to the variable (i think x2)
10:53:07FromDiscord<Rika> so `const a = 20; a * a` becomes `20 * 20` if my mind is performing correctly
10:53:25FromDiscord<Rika> whilst `let a = 20; a * a` doesnt change
10:53:38FromDiscord<Rika> there are better examples out there...
10:54:00FromDiscord<Rika> ooh ooh heres one more
10:54:20FromDiscord<Rika> `const` has to be computable at compilation, so no variables defined in runtime
10:54:45FromDiscord<Kurolox> I see. Thanks for the help!
10:55:11FromDiscord<Kurolox> Another thing I've never seen are nested multiline comments
10:57:00FromDiscord<Rika> well since the multiline begin and multiline end tokens look different, its possible to do
10:57:07FromDiscord<Rika> though i dont see the reason to do so haha
10:58:15FromDiscord<Kurolox> I mean, technically the same can be said for Java, but nested multiline comments won't work
10:58:26FromDiscord<Rika> hm? why not?
10:58:30FromDiscord<Kurolox> ```java
10:58:31FromDiscord<Kurolox> /* /* test */ */``` will fail
10:58:37FromDiscord<Rika> oh i see
10:58:41FromDiscord<Rika> now i see the reason to do so
10:58:56FromDiscord<Kurolox> hm, now I wonder
10:59:04FromDiscord<Kurolox> ```nim
10:59:04FromDiscord<Kurolox> proc getAlphabet(): string =
10:59:04FromDiscord<Kurolox> for letter in 'a'..'z':
10:59:05FromDiscord<Kurolox> result.add(letter)```
10:59:16FromDiscord<Kurolox> there's syntax highlighting support for nim, that's neat
10:59:24FromDiscord<Rika> RIP IRC people
10:59:29FromDiscord<Kurolox> oh, sorry
10:59:31*letto quit (Quit: Konversation terminated!)
10:59:38FromDiscord<Rika> its recommended not to do multiline code inserts
10:59:52FromDiscord<Rika> at least, not here
10:59:53FromDiscord<Kurolox> Yeah, I just wanted to see if there was highlighting support for nim
11:00:06FromDiscord<kodkuce> i head to sorry for posting code from discord like 20times, alwes froget
11:00:09FromDiscord<Kurolox> should've done it outside of here, I guess
11:00:14FromDiscord<Rika> there's #discord-only
11:00:15FromDiscord<Rika> haha
11:00:51FromDiscord<Kurolox> Well, I want to end up making something in Nim
11:01:07FromDiscord<Kurolox> probably an API REST, I'll try to get comfortable with the language first
11:01:12FromDiscord<Rika> i've made a (pretty inefficient) image dithering program in Nim haha
11:01:14*letto joined #nim
11:01:15narimiran@Kurolox for questions like "what's the difference between an inmutable data type and a constant?" i recommend you https://narimiran.github.io/nim-basics/
11:01:39narimirane.g. see the answer here: https://narimiran.github.io/nim-basics/#_immutable_assignment
11:02:08FromDiscord<Rika> narimiran book when 😛
11:03:19narimiran@Rika so you want to pay me for the stuff that you can read now freely? ok, no problem, i can send you an invoice
11:03:32FromDiscord<Rika> ;; no i was joking ;;
11:03:35FromDiscord<Kurolox> I mean, I'd pay for a physical release
11:04:02FromDiscord<Kurolox> I'll grab a copy of Nim in Action in the future
11:04:14narimiran@Kurolox there's a pdf and epub version, if that'll suit you better than .html?
11:04:34narimiran(note to self: make epub version more visible)
11:04:50FromDiscord<Kurolox> It's more about supporting the author and having a physical book to get in my shelves rather than the book content itself
11:05:02FromDiscord<Kurolox> do you have any donation address?
11:05:13narimirani don't
11:05:31FromDiscord<kodkuce> nice work narimiran , it looks nice and easyer then default turtorial at least for me at first glance, hope you fill it more
11:05:46narimiranand i'm too much of an ecologist to go for a physical book :)
11:05:57FromDiscord<kodkuce> buy clearink 2020
11:06:01FromDiscord<Kurolox> that's fair
11:06:18FromDiscord<Kurolox> if you end up being open for donations let me know, I always try to support this kind of stuff
11:06:26narimiran@kodkuce: more content would probably go into an "intermediate nim" tutorial, which is my long-term goal with no clear deadlines
11:06:31FromDiscord<Kurolox> In fact I just set up the bountysource for nim like an hour ago
11:07:02FromDiscord<Kurolox> and ordered some nim stickers too because my laptop needs it
11:07:46FromDiscord<Rika> whats bountysource
11:07:56FromDiscord<Rika> ratger
11:07:58FromDiscord<Rika> whats it for
11:08:13FromDiscord<Rika> whats the money gonna go into
11:08:25FromDiscord<kodkuce> lol i thinked first this real github link, thinked you self hosting gitea or something
11:09:04*Guest11723 quit (Quit: Leaving)
11:09:04*Kevin4 quit (Quit: Leaving)
11:11:20FromDiscord<Kurolox> well, as far as I understand the money goes to dom96 and Araq, and they use the money to pay for hosting for the nim website, and to place bounties on Nim priority bugs to incentive people to fix them
11:11:38narimirandom doesn't work for Nim anymore
11:11:56FromDiscord<Kurolox> oh well, he's still listed in the bountysource page
11:12:02FromDiscord<Kurolox> maybe that should be fixed then
11:12:20narimiranhe's still involved with nim, make no mistake
11:12:59FromDiscord<Kurolox> Dom96 is dominik, right?
11:13:07narimiranyep
11:13:22FromDiscord<Kurolox> I'm fine with it then. I hope I can grab his book soon
11:13:29FromDiscord<Kurolox> it looks like an interesting read
11:15:07*krux02 joined #nim
11:15:31FromDiscord<kodkuce> does anyone officaly work for Nim?
11:15:39narimiranyes, me :)
11:15:40FromDiscord<kodkuce> like a payed job?
11:15:52FromDiscord<Rika> a fulltime?
11:16:10FromDiscord<kodkuce> dident even know Nim head some sponsoring
11:16:20FromDiscord<Rika> nim is sponsored???
11:16:35FromDiscord<kodkuce> i know only Signal i think gived some money
11:16:54narimiranstatus, not signal: https://nim-lang.org/blog/2018/08/07/nim-partners-with-status.html
11:17:04FromDiscord<kodkuce> ye my bad
11:17:18FromDiscord<kodkuce> yep there is on https://nim-lang.org/ on bot page 2 psonsore allready
11:17:41FromGitter<mratsim> @Kurolox, AFAIK hosting is kindly offered by Digital Ocean
11:20:46FromGitter<mratsim> Oh, I totally forgot but the sponsoring has been going on for more than a year now, you should definitely prepare a blog post on how being 3 instead of 1 core compiler developer helped ;)
11:21:14*tim17d joined #nim
11:23:28FromDiscord<Kurolox> Can anyone tell me why this code snippet isn't working?
11:23:39FromDiscord<Kurolox> https://ghostbin.co/paste/yox4u
11:24:10FromDiscord<Kurolox> it should be straightforward and it's even copied from Nim by Example, but it's giving me a "SIGSEGV: Illegal storage access" error
11:25:50FromDiscord<Rika> https://play.nim-lang.org/#ix=1Uh3 it works here
11:25:59narimiran@Kurolox are you sure you're on a recent version of nim?
11:26:00FromDiscord<Rika> are you sure its this proc thats the issue
11:26:12narimiranwhat does `nim -v` print for you?
11:26:13lqdev[m]pre-0.19
11:26:13lqdev[m]@Kurolox you probably have an old version of Nim
11:27:15FromDiscord<Kurolox> Nim Compiler Version 0.18.0 [Linux: amd64] Copyright (c) 2006-2018 by Andreas Rumpf
11:27:16*solitudesf joined #nim
11:27:18narimiranwild guess: are you on Arch Linux and have used pacman to install Nim?
11:27:25FromDiscord<Kurolox> Spot on
11:27:35narimiranarch "bleeding edge" linux
11:27:53lqdev[m]use choosenim to install Nim
11:28:01narimiranv0.18 was released on 1st March 2018
11:28:11FromDiscord<Kurolox> that doesn't sound right
11:28:24FromDiscord<Kurolox> as in, I can't really believe it hasn't been updated since then
11:28:31narimiranwhat doesn't sound right? that arch has severely outdated package?
11:28:45narimirani try to notify them, but they either ignored me or ridiculed me
11:28:45*Hideki_ joined #nim
11:28:50lqdev[m]as narimiran said, arch "bleeding edge" linux
11:28:53FromDiscord<Kurolox> yeah, but I'm not aware of how main repository package management works
11:29:02narimiranwe had 3 big releases since them, but they just don't care
11:29:07lqdev[m]narimiran: ridiculed?
11:29:09narimiranbtw, manjaro has the latest nim
11:29:17FromDiscord<Kurolox> man, that sucks
11:29:23narimiranbut MANJARO IS NOT ARCH!1!!!1111!!1
11:29:51federico3https://repology.org/project/nim/versions
11:30:04FromDiscord<Kurolox> installing choosenim then
11:30:07narimiranlqdev[m]: yeah, so i decided to not care anymore about arch and their teenage users
11:30:09lqdev[m]^ lol
11:30:27lqdev[m]damn
11:30:45Araqso hard to resist...
11:30:50narimiran:D :D
11:31:07FromDiscord<Kurolox> I'm sorry about that, it's true that part of the arch community is like that
11:31:44lqdev[m]anyways, @Kurolox choosenim is the official way of installing Nim. try that. you can find it in the download section on nim-lang.org
11:31:53lqdev[m]or install, I don't remember
11:32:03narimiranbut hey, you can use AUR, right? there you go, nim 0.19.4, fresh from february
11:32:26FromDiscord<Kurolox> pretty much
11:32:44FromDiscord<Kurolox> choosenim from the AUR doesn't even work, so I'm just installing it manually
11:33:39FromDiscord<Kurolox> this may be a good oportunity to learn about AUR packages, though. I may try to create the nim and choosenim packages later and try to keep them updated myself
11:34:22federico3*sigh*
11:38:55narimiranAraq: https://i.imgflip.com/3g6z16.jpg :)
11:40:39FromDiscord<Kurolox> heh
11:41:09FromDiscord<Kurolox> Anyways, updating did fix the issue. I wonder if it was a bug or I was using a non-implemented feature
11:41:36narimiranthe latter
11:43:14narimiran@Kurolox once again, Nim Basics to the rescue: https://narimiran.github.io/nim-basics/#_result_variable (see the big orange ! triangle)
11:44:42FromDiscord<Kurolox> Oh, I see. so it was `nil` rather than an empty string, so trying to append to said string would error out
11:45:41narimiranyeah
11:47:37FromDiscord<Kurolox> Now the error message makes way more sense than before
11:49:53*tklohna quit (Ping timeout: 268 seconds)
11:50:45FromDiscord<++x;> 😊 😊 👍 👍 💦 💦
11:51:41FromDiscord<demotomohiro> Gentoo linux provides latest Nim.
11:51:41FromDiscord<demotomohiro> https://packages.gentoo.org/packages/dev-lang/nim
11:51:48FromDiscord<++x;> Are the discord users in this server becoming more active?
11:52:06federico3demotomohiro: I already shared the link to repology
11:52:09Araqnarimiran, lol
11:53:30FromDiscord<Kurolox> I've been asking in the arch linux IRC about this
11:53:48FromDiscord<Kurolox> the TL;DR is: "Blame the maintainer, and just don't use the repository"
11:53:53*tim17d left #nim (#nim)
11:54:42Zevvfair enough :)
11:54:59narimiran"we have the latest packages, in under an hour after they're released, and we're very proud of that"
11:55:15narimiran"what about this 1.5 year old outdated one? lalalalalalala, don't hear you"
11:56:37FromDiscord<Kurolox> to be honest the system sounds terribly made
11:56:53FromDiscord<Kurolox> as far as I understand, someone can flag the package out of date, and the maintainer gets a notification in his mail
11:57:17FromDiscord<Kurolox> but a package can only be flagged once, and if the maintainer misses that mail then nobody can report the package out of date again ever
11:57:22Zevvnarimiran: joking aside, have you contacted the maintainer?
11:57:31narimiranZevv: yep, that too
11:58:01narimirani didn't raise the issue publicly until i waited for more than one month for his reply. (which i never got)
11:58:08*rockcavera joined #nim
11:59:56FromDiscord<Kurolox> to be honest that maintainer looks busy
12:00:01FromDiscord<Kurolox> as in, he's maintaining about 800 packages
12:00:14FromDiscord<Kurolox> I've sent him a mail too, maybe he'll answer
12:00:28narimiranmaybe, just maybe, he might give part of those 800 to somebody else
12:01:49FromDiscord<Kurolox> Okay, it seems like someone in the IRC got direct contact with the maintainer and it's asking him about this directly
12:03:37*vsantana joined #nim
12:06:54*nc-x joined #nim
12:07:24nc-xFound this in the rust subreddit. haven't watched/read it yet: https://aardappel.github.io/lobster/memory_management.html https://www.youtube.com/watch?v=WUkYIdv9B8c
12:07:58*nc-x quit (Remote host closed the connection)
12:10:10FromDiscord<Kurolox> quick question
12:10:20FromDiscord<Kurolox> is csources still used in the latest versions?
12:10:40FromDiscord<Kurolox> since it has been archived and the package seemed to need it to build
12:10:56narimiranyes, it is archived so no new stuff will be pushed into it
12:11:11narimiranbut it is used
12:11:25narimiran"This repository is archived because it's frozen, HEAD of csources can build Nim version 1 and any later version."
12:13:35tane_is there a way to get a sequence like view into an array such that one can apply openArray[T] functions to a subrange of an array?
12:14:01*Hideki_ quit (Remote host closed the connection)
12:14:14narimirantane_: `toOpenArray`?
12:14:51*NimBot joined #nim
12:14:56tane_narimiran, looks promising, thanks
12:15:26tane_perfect :)
12:15:47*Hideki_ joined #nim
12:17:42narimirantane_: yep, i've just created a dumb example https://play.nim-lang.org/#ix=1UhR
12:19:53*Hideki_ quit (Ping timeout: 245 seconds)
12:20:36tane_narimiran, yeah, nice
12:26:11*Hideki_ joined #nim
12:27:26*Hideki_ quit (Remote host closed the connection)
12:27:41FromDiscord<Kurolox> I wanted to learn nim and I've ended up learning to make PKGBUILDs and package repositories, huh
12:28:25*Hideki_ joined #nim
12:28:28*Hideki_ quit (Remote host closed the connection)
12:28:45*Hideki_ joined #nim
12:36:01FromDiscord<Kurolox> by the way, does anyone know if there's a lot of outdated stuff in the "nim in action" book?
12:36:15FromDiscord<Kurolox> since it was released two years ago, I'm not sure how much the language could've changed since then
12:39:08narimiranNiA is continuously tested with the latest nim versions, so it is not outdated. it is still worth the read
12:39:44narimiranbut maybe we can push dom96 to release a second edition :)
12:41:56FromDiscord<Kurolox> call it Nim in Reaction
12:41:59FromDiscord<Kurolox> I'd buy it
12:43:12Zevvnah I'm not giving my money to dom again, he's spending it all on booze I heard
12:44:13Zevvkurolox: I believe the examples from doms book are part of the nim test suite to make sure the stuff from the book is kept in workig order
12:44:39Zevvso the book might not tell the latest stories, but what's in there is still relevant
12:45:17FromDiscord<Kurolox> that feels weird though, doesn't that mean that maybe there are some breaking changes you won't be able to make in the future due to keeping the book compatible?
12:45:24FromDiscord<Kurolox> that feels weird though, doesn't that mean that maybe there will be some breaking changes you won't be able to make in the future due to keeping the book compatible?
12:46:10Zevvat some time that promise will probably be broken, but I believe that at least for 1.0 the goal was to keep it relevant
12:48:52Araqwell...
12:48:53solitudesfthere were breaking changes, but they were introduced with compiler flags that allow for backwards compatibility
12:49:39Araqyeah and devel broke more examples by removing the unary < operator
12:49:54Araqwe updated the tests :P
12:53:25FromGitter<Willyboar> @Kurolox there is a guy tracking and fixes errors in the book
12:54:19FromGitter<Willyboar> https://deepakg.github.io/nim/2019/09/28/nim-in-action-errata.html
12:56:50Zevvoh there is more in there then I expected, but it isnt too bad :)
12:57:26FromGitter<Willyboar> actually is very helpfull
12:58:00FromDiscord<Kurolox> I love the nim community
12:58:06FromDiscord<Kurolox> so many helpful resources coming from everywhere
12:59:11narimiran"future is deprecated" :)
12:59:28Zevvthe future is overrated
12:59:52FromDiscord<kodkuce> the future is none
13:02:31*GordonBGood_ joined #nim
13:02:32*GordonBGood quit (Read error: Connection reset by peer)
13:03:28FromDiscord<Kurolox> the future is `nil`
13:07:51dom96That article is amazing. Massive thanks to the person that compiled it.
13:07:51dom96That article is amazing. Massive thanks to the person that compiled it.
13:08:16FromDiscord<mratsim> @Kurolox actually there is Nim 0.19 in Arch community-testing
13:08:29FromDiscord<mratsim> but this was also flagged out-of-date, only 1 year old though
13:08:32dom96Note that all examples will compile, the only problems you might run into are deprecations warnings, which IMO aren't all that problematic when learning since Nim will tell you what to use instead
13:08:53dom96And indeed from what I can see that article only lists deprecation warnings :D
13:11:00*endragor quit (Remote host closed the connection)
13:12:45dom96(one exception is that `nil` is no longer possible for strings, but that only breaks one example and you get a pretty clear error message)
13:13:19dom96So thank you to Araq et al. for not breaking my book (too much) :)
13:13:45*tklohna joined #nim
13:16:01narimirandom96: `.. <` will also break in the latest nim ;)
13:16:16narimiranbut it is written in that article how to fix it
13:16:20FromGitter<mratsim> that broke since a year or more though
13:16:20livcdthat broke even when I bought the book almost a year ago
13:16:37narimiranlivcd: then was deprecated, now is broken
13:16:40livcdsee lots of unhappy customers
13:17:13dom96narimiran you mean in 2.0?
13:17:38narimirani mean in nim 1.1.1 (devel), so it will break in 1.2 when that becomes new stable
13:17:56dom96But that's a breaking change, how can it be a part of 1.x :P
13:18:13narimirandom96: it's the only way we can make you release 2nd edition :P
13:18:43dom96Okay, it was deprecated so it's probably fair enough. But we need to get together and specify clearly that deprecated things are not covered under the promise not to break things.
13:19:01narimiranimagine all those people not buying NiA currently because they think it is outdated. $$$
13:19:07FromGitter<mratsim> not to break things is for 1.0.X
13:19:17dom96No it isn't
13:19:20FromGitter<mratsim> 1) 1.0 can change
13:19:24*narimiran grabs popcorn
13:19:31*Hideki_ quit (Remote host closed the connection)
13:19:32dom96Are we really going to have this discussion again?
13:19:57FromGitter<mratsim> "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Saint Exupéry
13:20:08dom96I'm going to write a post to outline what the expectations are. Read up on semver please.
13:20:09narimiranremoving long-deprecated stuff is not breakage.
13:20:15*Hideki_ joined #nim
13:20:26livcdI only care if important libs break
13:20:29FromGitter<mratsim> I don't care about semver, I care about having a good language and a good standard library
13:20:39FromGitter<mratsim> and obviously good transitions
13:21:03*clyybber joined #nim
13:21:09FromGitter<mratsim> we have a lot of API debts in Nim
13:21:10narimiran@mratsim speaking of which: can we remove the outdated inplace `sequtils.map` or does arraymancer still depend on it? :P
13:21:13FromGitter<mratsim> we need to pay it
13:21:40FromGitter<mratsim> I never depended on it
13:21:51FromGitter<mratsim> all my maps are multithreaded
13:22:00FromGitter<mratsim> except for strings
13:22:06dom96I'm fine with removing deprecated APIs
13:22:07dom96I'm not fine with breaking the language or existing APIs in 1.x
13:22:07narimiraneeerrrrm, i remember re-introducing it because arraymancer was broken without it
13:22:08dom96Why am I not fine? Because that's what we promised in our release article.
13:22:14Araqdom96, actually I'm considering to add back unary '<' for 1.2
13:22:30dom96And why's that?
13:22:38Araqbecause it's special
13:22:47narimiran@mratsim i'll make a PR with that `map` removed, maybe something changed in the mean time. if not, i'll ping you
13:22:55AraqI removed a bunch of deprecated stuff, '<' was among it
13:23:06FromGitter<mratsim> no problem @narimiran
13:23:10Araqbut it turned out only '<' was still widely used
13:23:20Araqso we might add it back for a little longer
13:23:45narimiran(oh, btw, it was `mapIt`, not `map`)
13:24:07Araqping clyybber
13:24:17FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/R4AE/j3ea2qy3h8521.jpg.webp)
13:24:19dom96cool. So there was no need to scare potential Nim in Action customers, as there? :)
13:24:23dom96*was
13:24:29*uu91 quit (Ping timeout: 276 seconds)
13:24:38FromGitter<Willyboar> *Willyboar grabs narimiran popcorn
13:24:51*Hideki_ quit (Ping timeout: 268 seconds)
13:25:20clyybberpong Araq
13:25:58Araqwhy is it that nkClosure is *not* processed at all by injectdestructors.nim?
13:26:12Araqany ideas? it's frustrating
13:27:07clyybberAraq: Hmm, I have no idea, but I didn't change it during my refactoring. I saw you fixed it in your PR?
13:27:13clyybberOr is your fix not working?
13:27:21Araqnot working
13:27:28Araqbut at least conceptually clean now :P
13:27:54AraqI feel like we are 3 bugs away from --gc:arc working on async code
13:28:21Araqwill reduce sleep now and won't eat until it's done
13:28:38clyybbergood idea
13:29:04*tklohna quit (Ping timeout: 252 seconds)
13:29:17Araqalso I still wonder whether what we do is sound
13:29:35clyybber<insert mratsims pic here>
13:29:50*Hideki_ joined #nim
13:30:06clyybberDoesn't really fit here, though, since we cut a lot of debt
13:30:11FromGitter<Vindaar> good thing to hear you guys have the same problems I do, just on more complicated stuff :P
13:30:38FromGitter<mratsim> Well that's because you are doing a PhD :p
13:30:55clyybberAraq: Are there no closures at all that go through p/pArg ?
13:31:16clyybberVindaar: What are you doing an PhD on?
13:31:17FromGitter<mratsim> professional bump your head against the wall "why am I alone doing this"
13:31:32AraqI've only seen nkClosure(..., nkNilLit)
13:31:34FromGitter<mratsim> Nim is the same: no stack overflow with hundreds of people that had the same issue before
13:32:08Araqwhich are exactly the closures that we don't care about
13:32:22Araqall the important closures are not even processed... so weird
13:32:36clyybberHuh, that is indeed... weird
13:33:38Araqah but the nkObjConstrs are looked at
13:33:59*tane_ quit (Remote host closed the connection)
13:34:09FromGitter<Vindaar> @mratsim well my comment wasn't mainly about my PhD though, because hey, my PhD is complicated too :D ⏎ @clybber doing a PhD in physics. search for axions (dark matter candidates) with CAST, a small experiment at CERN (sitting there right now)
13:34:17*tane joined #nim
13:36:30clyybberAraq: Why wouldn't they be looked at?
13:36:46clyybberOr are they related to closures in some way I am not aware of?
13:37:00*couven92 quit (Quit: Client disconnecting)
13:37:35*uu91 joined #nim
13:37:39Araqlooks like some nkHiddenSubConv bullshit
13:38:33FromGitter<Vindaar> I always miss that second 'y' clyybber :P
13:39:14clyybberVindaar: Oh, yeah, didin't notice you tagged me :D
13:41:10clyybberVindaar: Oh, nice in CERN. So are you working with the accelerator?
13:41:42clyybberoh, well. I can't read apparently (don't mind me :D)
13:42:46taneclyybber, are you a phd student too? :)
13:43:08clyybbernope
13:43:50clyybberstarted doing a CS bachelor
13:44:37tane\o/, CS is great :P
13:45:13FromGitter<Vindaar> @clyybber: nope, nothing to do with the LHC (fortunately imo) except using a prototype dipole magnet of the LHC: https://en.wikipedia.org/wiki/CERN_Axion_Solar_Telescope
13:45:26narimiranclyybber: wait, how old are you?
13:45:52clyybber19
13:46:08narimiransweet jesus!! i though you were some 40+ guy :D
13:46:12clyybberhahaha
13:46:32clyybberwell, I acquired some music taste from my parents I guess
13:46:51taneclyybber, for instance? :)
13:47:10disruptekmom, dad, y'know, the usual...
13:47:16narimiranhahahahahaha
13:47:36narimirandisruptek: congrats, you are today's winner
13:47:58tanewell, good music doesn't get old
13:48:32disruptekneither does clyybber, apparently.
13:50:32*xet7 quit (Remote host closed the connection)
13:50:41clyybbertane: I know for example that my dad listened to a lot of prodigy while I was still a fetus
13:51:12Araqclyybber, looks like a phase ordering problem
13:51:26Araqit's still a nkLambda when injectdestructors sees it
13:51:36*couven92 joined #nim
13:51:51*xet7 joined #nim
13:52:02clyybberAraq: Hmm, the closure stuff happens in lambdalifting, right?
13:52:36taneclyybber, yeah, good choice
13:52:50clyybberdisruptek: I sleep(-1) regularily.
13:53:23Araqright
13:53:37Araqtime for a break, see you later
13:53:40clyybberbb
13:55:02clyybberAraq: But lambdalifting is done from transf right? And AFAICT transf is done before injectdestr.
13:55:12clyybbernarimiran: Do you know BOC?
13:55:38narimiranblue oyster cult?
13:55:56clyybberyeah
13:56:02narimirani've never listened them
13:56:14narimiranbut i'm into progressive rock
13:56:31clyybberhttps://www.youtube.com/watch?v=ClQcUyhoxTg
13:57:29narimiranclyybber: yeah, everybody knows that one. and the version with will ferrell, of course
13:57:43*narimiran needs more cowbell
13:57:52clyybberneeds more cowble
13:57:56clyybberbell
13:57:58clyybberhaha
13:58:33narimirans/ferrell/walken
13:58:49clyybbernarimiran: https://www.youtube.com/watch?v=ayCcCD_OrNM <- not sure if thats progressive rock, but damn I love it
13:58:52narimiranno wait, ferrell is there too
13:59:32narimiranclyybber: here's something for you to both listen and watch: https://www.youtube.com/watch?v=UM-yGcpaY_4
13:59:51narimiranyep, they decide to completely switch their instruments in the middle of a song
14:00:43narimiran(and i'll be listening to your link)
14:00:57clyybberright at the beginning, from the first synth sound I was expecting oxygene
14:02:40Zevvoooh gentle giant
14:02:48Zevvthat will brighten my afternoon!
14:03:25narimiranZevv: i'm glad to hear that :)
14:03:59*Zevv puts on his bell bottoms
14:04:29clyybberhow many keyboards is that, lol
14:04:31ZevvI heard these are coming back, so I'm wearing them provocatively these days so I can later say that was because of me
14:04:51clyybberamazing, 3 guitars and even mroe keyboards
14:06:19narimiranclyybber: wait until they bring out their violins, flutes, double bass, xylophone, etc. :D
14:06:52FromGitter<Lecale> Wow, I think I just gave Nim a really bad rep by opening an issue on stb_image https://github.com/nothings/stb/issues/833
14:10:41clyybberLecale: But it turned out to be a stb_image issue?
14:11:49FromGitter<Lecale> general shrug like activity
14:12:27FromGitter<brentp> fwiw, here's a manuscript for a tool written in nim: https://www.biorxiv.org/content/10.1101/839944v1 . it's already pretty widely used.
14:12:29*tklohna joined #nim
14:12:52FromGitter<Lecale> Should be the easiest thing in the world, doesn't work when i do it. Well, I had the same problem with nuclear fusion as well.
14:18:52FromGitter<Lecale> I don't like that you wrote "These data are used", but otherwise that looks totally great Brent. Hope the paper gets published.
14:19:50FromGitter<Vindaar> @Lecale I love it when people are immediately hostile for no reason. Don't worry about it. ⏎ @brentp nice!
14:21:58FromGitter<brentp> heh. I can take it. You have problems with the grammar? easily fixed, I suppose.
14:23:13taneI hope the source is reviewed too, before too much research depends on it :)
14:25:33FromGitter<brentp> link to source is in the abstract. happy to get your code review. it is tested on thousands of families for which we have known relationships to ensure they are correctly recovered.
14:27:00tanenice, I have no domain knowledge so I won't review anything :)
14:27:05FromDiscord<Rika> Lecale, wow that dev is aggressive
14:27:28*nsf quit (Quit: WeeChat 2.6)
14:28:54clyybberbrentp: Amazing
14:29:38taneis there a way to reserve on a sequence (apart from newSeqOfCap)?
14:29:56clyybberyou mean on an existing one?
14:30:04taneyes
14:30:25clyybbersetLen
14:30:50*adeohluwa joined #nim
14:30:53tanethat changes the size of the sequence
14:31:02taneI'm looking for a way to change the capacity
14:31:02clyybberYeah, there is no setCap
14:31:27clyybberWhy would you need it anyways?
14:31:50FromGitter<zetashift> @brentp wow great work!!
14:32:00tanesometimes you know an upper bound on the insertions you will perform
14:32:15*adeohluwa quit (Remote host closed the connection)
14:32:17clyybberThen it makes sense to use newSeqOfCap
14:32:28clyybberI meant, "why do you need another way"
14:32:30disruptekyou'd have to copy it anyway in order to move it in memory.
14:32:48clyybberoh and that
14:33:04tanebut this is hidden from me in case that I just .add stuff
14:33:16disruptekuse a linked list instead.
14:33:23tanelol, no
14:34:04taneanyway, the existence of a setCap would have the same reason as the existence of a newSeqOfCap
14:34:17disrupteknot really.
14:34:30clyybbertane: But it wouldn't prove more valuable
14:34:42tanedisruptek, how so?
14:34:48clyybberSince setting the capacity would just do a newSeqOfCap internally
14:34:56taneclyybber, it might
14:35:18disruptekyou can write it yourself and it will perform identically.
14:35:20*Hideki_ quit (Remote host closed the connection)
14:35:28disruptekmaybe in writing it, you will discover the problem.
14:35:48tanedisruptek, so you will not answer it? :)
14:36:17disrupteknewSeqOfCap allocates sufficient memory for the sequence at instantiation, without regard to the size of the sequence.
14:36:24*Hideki_ joined #nim
14:36:41tanedisruptek, ok, and?
14:36:41disruptekthis allows subsequent additions to not demand a resize of the sequence.
14:36:59disrupteka resize of the sequence involves a new alloc and a copy of the contents to the new location.
14:37:05disruptekthis is what you are proposing in setCap.
14:37:17tanewell, setCap maybe, but not necessarily reserve
14:37:21tanemy error
14:37:29tanelet's call it ensureCap
14:37:58disruptekso implement it.
14:38:06taneyes, it will perform better
14:38:19disruptekhow do you figure?
14:39:43taneassume a function that takes a sequence (possibly non-empty) and knows it will add N elements, then calling ensureCap(len+N) **might** allocate, depending on the capacity, while constructing a new sequence with newSeqOfCap(len + N) will definitely allocate
14:40:25clyybbertane: Hmm, sounds reasonable. There is an RFC for it https://github.com/nim-lang/RFCs/issues/97
14:40:29tanethen one might say: it's up to the user to ensure enough space if he wants to avoid allocations, but often that's not the approach you'd like
14:40:48disruptekyou don't need to perform the alloc yourself, though; you can simply let the sequence grow automatically.
14:40:51*Hideki_ quit (Ping timeout: 246 seconds)
14:41:15tanedisruptek, this requires knowledge about the allocation pattern
14:41:26taneif I add 10000 items, I want it to reallocate once, not an arbitrary number
14:41:48tanebut I don't want to reallocate, when the capacity is already large enough
14:41:58taneand that's the whole point of "ensureCap", or "reserve" in C++
14:42:26disruptekit won't realloc, but you're right that you cannot control the number of allocs.
14:42:47disrupteki think this is yak shaving, but take a look at the impl and see if it needs enhancing.
14:42:49taneexactly, and this is the reason an ensureCap function is desirable
14:44:35taneI mean, the RFC is obviously in place, so something along this line will probably be added at some point
14:46:47taneall languages I know have this in their growable list/seq/vector APIs, because it makes sense from a perf POV
14:46:54clyybberit should be pretty easy to implement
14:47:12clyybberI'll try :)
14:47:16disruptekof course; it has to do this anyway.
14:47:36Zevvnarimiran: the dude can xylophone
14:49:11clyybberoh hell yeah
14:49:28clyybberhes giving the drummer a break :p
14:50:03FromGitter<alehander92> mypy
14:50:08FromGitter<alehander92> gets better
14:50:14FromGitter<alehander92> it seems it can model most of my nim types now
14:50:40FromGitter<alehander92> trying to annotate my python code again
14:50:55FromGitter<alehander92> i wonder if i should directly generate some annotations from my nim types
14:51:03FromGitter<alehander92> one day, not now
14:51:13clyybberthen again, you can convert the code to nim while you're at it :)
14:51:45narimiranZevv: crazy dudes, all of them
14:57:44FromGitter<alehander92> clyybber
14:57:45FromGitter<alehander92> i cant
14:57:50FromGitter<alehander92> its for gdb plugins
14:57:53clyybberah
14:58:28FromGitter<alehander92> and its just a lot of code, no time for it now
14:58:40FromGitter<alehander92> but i was getting some embarrasing mistakes
14:59:03FromGitter<alehander92> like unknown variable and stuff and i just realized i have sloppy code there
14:59:06FromGitter<alehander92> and i need a type checker
14:59:40FromGitter<alehander92> the experience is kinda similar to the javascript backend, type some stubs for your third party, slowly annotate the other stuff
15:06:23*Hideki_ joined #nim
15:07:22*PMunch quit (Quit: Leaving)
15:12:29narimiran@mratsim: removing the deprecated `mapIt` seems to cause no trouble this time. merged into devel.
15:12:55FromGitter<mratsim> how do you test arraymancer?
15:13:25FromGitter<mratsim> because last time I look it only compiled arraymancer.nim, but since all procs are generic, none are instantiated
15:13:36narimirannim c -r src/arraymancer.nim
15:14:02FromGitter<mratsim> but generic procs and templates cannot be tested like that even for just semcheck
15:14:53narimiranany other command we could run, which would test arraymancer better? (and won't take too much time)
15:15:08FromGitter<mratsim> you can try compiling this file: https://github.com/mratsim/Arraymancer/blob/master/tests/tests_cpu.nim . It shouldn't reach Travis 3GB limit anymore
15:15:13FromGitter<mratsim> try on your machine
15:15:18narimiranbtw, that `mapIt` was deprecated since..... wait for it.... nim 0.12
15:15:56FromGitter<mratsim> just compile, don't run.
15:16:07FromGitter<mratsim> unlike stint I don't rely on bit shifting ;)
15:16:18narimiran:)
15:18:00narimiran`nimble install` doesn't install test folder?!
15:18:28narimiranoh well, `git clone` it is
15:18:50*GordonBGood_ quit (Ping timeout: 240 seconds)
15:19:53narimiran@mratsim that test passes on my machine
15:20:10FromGitter<mratsim> check the memory it uses
15:20:34FromGitter<mratsim> I know I had to split it when complex were added because it reached Travis 3GB memory limit
15:20:48FromGitter<mratsim> but when I checked a month ago, I wasn't anymore (on Nim 1x)
15:21:36FromGitter<mratsim> see: https://github.com/mratsim/Arraymancer/issues/359#issuecomment-546595679
15:22:20narimiranoperation successful (191134 lines compiled; 15.216 sec total; 629.297MiB peakmem; Debug Build)
15:22:27FromGitter<mratsim> cool
15:22:36FromGitter<mratsim> before it was 4GB :P
15:22:37narimirani have just sliiiiiightly slower machine than you :P
15:22:50FromGitter<mratsim> no that report was just a single test files
15:22:56FromGitter<mratsim> you ran 20 or so
15:23:51narimiranshould i then put `nim c tests/tests_cpu.nim` in our important_packages.nim as a better way to test AM?
15:24:26FromGitter<mratsim> yep
15:24:44FromGitter<mratsim> that will instantiate Tensors of strings, floats, ints
15:24:50*jxy quit (Quit: leaving)
15:24:52FromGitter<mratsim> will avoid regression in generics especially
15:25:36*dddddd joined #nim
15:26:10narimirandone
15:27:48*Hideki_ quit (Remote host closed the connection)
15:28:35*Hideki_ joined #nim
15:33:07*Hideki_ quit (Ping timeout: 268 seconds)
15:34:24*letto quit (Quit: Konversation terminated!)
15:35:52*letto joined #nim
15:39:21*jxy joined #nim
15:44:05dom96narimiran: FYI if you want to run tests in a package then you should be using `nimble develop` ;)
15:45:13narimirandom96: i've heard recommendations for `nimble develop` so yesterday i wanted to use it, and — all i got was "Error: Cannot develop packages that are binaries only." yay
15:45:51narimiranso today i decided i won't be using it no more
15:46:06dom96heh, fair enough.
15:46:07narimirans/using/trying to use
15:46:13dom96That's a bit harsh. This is something that we should fix.
15:46:52dom96I was conservative when implementing this because I didn't have time to test how well `develop` worked for binary packages.
15:47:08narimiranwhile you're here: i'm trying to bring nimforum to 2019 by using the latest nim
15:47:49narimiran`nimble develop` didn't do the trick, so i manually fixed the dependencies
15:48:15narimiranand i've also fixed some outdated stuff in nimforum itself
15:48:50narimirannow when i run manually some of the tasks in nimforum.nimble on my machine — it seems to work fine
15:49:35narimiranbut CI is red and i don't understand what went wrong
15:49:54narimiranError: unhandled exception: FAILED: nimble c -y src/forum.nim
15:50:06narimiranThe command "nimble -y test" exited with 1.
15:53:17*theelous3 joined #nim
15:55:40*tklohna quit (Quit: Leaving)
15:55:57*tklohna joined #nim
15:57:08FromGitter<zacharycarter> hrmmm I guess if I'm writing and reading from streams using MemMapFileStream sequences aren't going to work
15:58:09Araqclyybber, found one issue
15:58:24*tklohna quit (Client Quit)
15:58:36Araqit always bothered me, now I understand it :P
15:58:53Araqsubconsciousness is great.
15:59:30FromGitter<zacharycarter> would it be possible to use unchecked arrays instead?
16:00:52*Hideki_ joined #nim
16:01:31*tklohna joined #nim
16:02:11dom96narimiran: any other errors apart from that?
16:02:47FromGitter<zacharycarter> or is it possible to get the size of the data held in the sequence? I figured if I just read the number of bytes of the object stored in the sequence * the number of sequence elements it would work
16:02:50FromGitter<zacharycarter> but this seems not to be the case
16:05:05narimirandom96: i've pushed a fix just now, i'll see tonight if the error is still there....
16:05:21dom96narimiran: have you tried running the same command locally?
16:05:21FromGitter<zacharycarter> oh nevermind I was doing something stupid
16:06:20narimirandom96: yep, and now i figured i introduced one ambiguity with my previous quickfix
16:10:29dom96narimiran what does your .nimble file look like?
16:11:26FromGitter<zacharycarter> could someone please help me to understand why this fails? https://play.nim-lang.org/#ix=1UUj
16:11:45FromGitter<zacharycarter> oh
16:12:07FromGitter<zacharycarter> nevermind I still don't know
16:12:50*Hideki_ quit (Ping timeout: 276 seconds)
16:13:14FromGitter<zacharycarter> ah this works
16:13:32FromGitter<zacharycarter> https://play.nim-lang.org/#ix=1UVj
16:13:32Mister_Magister@zacharycarter genious xd
16:13:56FromGitter<zacharycarter> what is genius?
16:15:27FromGitter<zacharycarter> something is wonky - it works in my test but the same code does not work in my app
16:21:02clyybberAraq: Oh, tell me about it
16:22:25*narimiran quit (Ping timeout: 265 seconds)
16:25:54*ng0 quit (Remote host closed the connection)
16:27:22*ng0 joined #nim
16:30:56Araq internalNew_43643(:env_143824)
16:30:56Araq `=_142637`(:env_143824.dep1_-142029, [1, 2, 3])
16:30:57Araq `=sink_143567`(x_143535, LazyList_142003(c_142008: (:anonymous_142030, :env_143824)))
16:31:16Araqfor some reason wasMoved(:env) is missing so we get a nice double free bug
16:40:47clyybberhuh
16:40:51clyybbernice?
16:41:56FromDiscord<Rika> buy one take one
16:43:04Araq elif arg.kind in {nkBracket, nkObjConstr, nkTupleConstr, nkClosure} + nkLiterals:
16:43:04Araq # object construction to sink parameter: nothing to do
16:43:04Araq result = arg
16:43:20Araq^ nope, wrong. you must still process 'arg' recursively anyway
16:43:48Araqso that 'destructiveMoveVar' is a thing for e.g. (a, 2) # a is moved
16:45:30*Vladar joined #nim
16:51:04clyybberAraq: Ah, that makes sense.
16:51:23clyybbergood job in finding that
16:53:18*Hideki_ joined #nim
16:57:37*Hideki_ quit (Ping timeout: 240 seconds)
16:57:53Araqand... it makes some tests red, as usual
17:02:23FromGitter<zacharycarter> I know how to debug the compiler when no stack trace is printed, but what about a runtime crash with no stacktrace?
17:03:49FromDiscord<mratsim> gdb 😛
17:04:09FromDiscord<mratsim> unless you mean a runtime crash of the compiler?
17:04:23FromDiscord<mratsim> Are you embedding the compiler as a library?
17:04:42*nsf joined #nim
17:04:48FromGitter<zacharycarter> I'm using vcc as my compieler though :/
17:04:56FromGitter<zacharycarter> I meant a runtime crash of my program
17:05:02FromDiscord<mratsim> Ah I'm sorry for you
17:05:08FromDiscord<mratsim> 😛
17:05:22FromGitter<zacharycarter> well - I can at least isolate the problem code and get that to compile with gdb support
17:05:39FromDiscord<mratsim> GDB cannot trace programs compiled with msvc?
17:06:00FromDiscord<mratsim> otherwise it should have a debugger as well
17:06:28FromGitter<alehander92> @zacharycarter the microsoft debugger should probably work?
17:06:39FromGitter<alehander92> if its compiled with debug info
17:06:40FromGitter<zacharycarter> err I meant use gcc to compile the example code
17:07:04FromGitter<alehander92> but i am not sure why would gdb not work with vcc
17:07:07FromGitter<zacharycarter> it's not too helpful anyway - ``` ⏎ Thread ⏎ 1 received signal SIGSEGV, Segmentation fault. ⏎ 0x0000000000000000 in ?? () ⏎ ... [https://gitter.im/nim-lang/Nim?at=5dcc383a35889012b1005f3d]
17:07:26*tklohna quit (Ping timeout: 276 seconds)
17:07:38FromGitter<alehander92> yeah, debug info?
17:08:34FromGitter<zacharycarter> I compiled with `--debugger:native`
17:08:36FromGitter<zacharycarter> https://gist.github.com/zacharycarter/a924a2c2ec0a3170cf20c2c63e503e09
17:08:47FromGitter<zacharycarter> maybe someone can spot something stupid I'm doing
17:09:40FromGitter<alehander92> add --stacktrace:on --linetrace:on
17:09:46FromGitter<alehander92> they seem not implied
17:10:04FromGitter<zacharycarter> ah okay
17:11:11FromGitter<zacharycarter> same result :/
17:12:51Araqaddr materials
17:12:54Araq--->
17:12:57Araqaddr materials[0]
17:13:24FromGitter<zacharycarter> yeah - that was what I had at first but that causes run_first.nim to throw up
17:13:25Araq(probably should get some linting support, such a common mistake, apparently)
17:14:29FromGitter<zacharycarter> when trying to echo the seq
17:15:20lqdev[m]Araq: isn't it `materials[0].unsafeAddr`?
17:15:25clyybberAraq: Which tests?
17:15:35FromGitter<alehander92> huh i didnt realize we have memfiles
17:15:37FromGitter<alehander92> or i forgot
17:16:48FromGitter<zacharycarter> well - if I don't echo `materials` in `map.nim` things work but as soon as I echo I get a crash
17:17:00Araqtnewruntime_misc.nim(103, 17) Error: '=' is not available for type <tuple of (string, owned ref int)>; requires a copy because it's not the last read of '("a", new(int))'; routine: tnewruntime_misc
17:17:13Araq(silly, it IS the last read)
17:17:22Araqtmove_objconstr.nim(192, 19) Error: internal error: '=' operator not found for type tuple of (string, MySeqNonCopyable)
17:17:29Araq(same, no need to copy here)
17:17:41FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dcc3ab5fd6fe41fc07a47e6]
17:18:21FromGitter<zacharycarter> `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`
17:23:20FromGitter<zacharycarter> hmm I guess if I can avoid using sequences that'd be best
17:23:25FromGitter<zacharycarter> some fuckery is going on here
17:24:17FromGitter<alehander92> something is nil in the copied data
17:32:29donpdonpis it possible to specify a nimble "require '../otherpkg'" aka another local package in development
17:32:30FromGitter<zacharycarter> oh - Araq as always is right
17:32:43FromGitter<zacharycarter> it's in the write to the stream in run_first.nim
17:33:02FromGitter<zacharycarter> needs to be ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dcc3e4dfd6fe41fc07a6291]
17:34:12FromGitter<zacharycarter> or maybe not, ugh going to take a break from this shaiba
17:46:11FromGitter<nixfreakz_twitter> Does anyone have detailed documentation for jester ?
17:49:27clyybberAraq: dfa bug?
17:52:19FromDiscord<spook> ello
17:54:11donpdonpis there a supertype of the nim types for string, float, etc. to make a seq[T] that can hold any primative?
17:56:29clyybberdonpdonp: A seq can only hold elements of the same type
17:56:38clyybberMaybe what your are looking for is tuples?
17:57:41FromGitter<nixfreakz_twitter> Are there any other web frameworks for nim?
17:57:51clyybberThough tuples have a fixed size
18:02:47donpdonpclyybber: exactly. im wrapping a c-json lib and the return value is an arbitrary list of string/int
18:03:17*nsf quit (Quit: WeeChat 2.6)
18:04:34*donpdonp looks at the std json.nim for inspiration
18:07:13clyybberdonpdonp: How can that be? Surely it has to store it somewhere what it is?
18:07:37clyybberIf its a string or an int
18:09:11donpdonpwell im prob not describing it very well. the 'object variant' setup in json.nim i think is leading me down the right path.
18:10:03clyybberok, good luck :)
18:10:31FromGitter<zacharycarter> well - I tried writing the strings individually to the stream and still end up with the same problem
18:10:32FromGitter<zacharycarter> ugh
18:10:52disruptek197 aws apis now supported. 🎉
18:11:03FromGitter<zacharycarter> I guess I'll just use file streams and not a mem mapped stream
18:11:49*Hideki_ joined #nim
18:12:29FromGitter<zacharycarter> this is going to bother me though
18:15:20clyybberdisruptek: You generate those wrappers?
18:16:10*Hideki_ quit (Ping timeout: 252 seconds)
18:16:21disruptekyeah.
18:16:35clyybberis the generator in your repo too?
18:17:55disrupteknah, i don't wanna support it.
18:20:13clyybberunderstandable
18:20:50disruptekit doesn't run with raising the vm limits.
18:20:52clyybberI also don't want to bother people with my unholy entanglement of sed awk and a broken c2nim (but hey it generates distinct cints)
18:20:57disrupteks/with/without/
18:21:28clyybberdisruptek: https://github.com/disruptek/cutelog/blob/master/cutelog.nim explain yourself!?
18:21:51disrupteki find it easier to read.
18:23:23clyybberI too 🔍 it easier to 📖
18:23:50clyybberkidding
18:27:37*jjido joined #nim
18:29:57lqdev[m]I looking glass it easier to book as well.
18:31:57*uu91 quit (Ping timeout: 268 seconds)
18:32:17*uu91 joined #nim
18:35:11*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:35:58clyybberexactly
18:37:39dom96Araq shashlick: you guys still up for the meeting in around 1.5 hours?
18:38:29Araqyup
18:38:40shashlickditto - what's the medium
18:41:23Araqclyybber, why do we need p, pArg and moveOrCopy ?
18:41:38Araqthe code duplication is still a pita even with the templates
18:42:16dom96shashlick appear.in I guess
18:44:40Araqnever mind, clyybber, it's fine
18:45:15Araqthis test suite is a pita
18:45:45mipriTwitLogger: lvlError: "nobody:\n\nyour program:", lvlWarn: "this ain't it, chief:", lvlNotice: "yikes: ", lvlInfo: "this just happened:", lvlDebug: "@jack: "
18:46:39clyybberAraq: Cool, its as tight and non duplicated as I could get it :)
18:52:03Araqthis was hard... tests are green again with my patch
18:53:05clyybberNice, can I see it?
18:53:31Araqone sec
18:55:26Araqlook at my araq-arc branch
18:55:35*jjido joined #nim
18:57:40clyybberAraq: Nice.
18:57:43clyybberNow...
18:57:47clyybberdoes async run?
18:59:11AraqI think the phase ordering bug still exists
18:59:31Araqit receives an nkLambda which must be an nkClosure instead
18:59:52*jjido quit (Client Quit)
18:59:53Araqthere is also a transf caching bug and exception handling leaks memory
18:59:59clyybberah
19:00:12Araqshould probably keep a TODO somewhere
19:00:26Araqbut IMO we need =trace
19:00:53Araqit's not only for cycle detection, it can also be used to mark all refs as 'shared' and only after that the RC ops must be atomic
19:01:24Araqor we can use it to check for deep uniqueness and require that for thread interop
19:01:34Araqso many possibilities when we can trace...
19:04:06clyybberhmm, that does indeed seem useful.
19:04:29clyybberI just wonder what signature =trace should have
19:10:17*rockcavera quit (Ping timeout: 240 seconds)
19:11:28Araqproc =trace(x: var T; env: pointer)
19:11:39*nsf joined #nim
19:16:13clyybberAnd env is? The proc thats called?
19:16:24Araqsomething
19:16:39Araqnot of your business :P
19:17:00Araqyou pass it along
19:17:37clyybberAh, and trace also doesn't return anything?
19:17:47Araqyeah
19:18:00*Hideki_ joined #nim
19:18:03clyybberSo how do I use it to, lets say =destroy all fields of a special object?
19:18:09Araqbut you're right, it's a bit unclear how the =trace atom for 'ref T' would look like
19:18:27Araqwell destruction stays as =destroy
19:18:38clyybberAraq: Yeah, I mean for cycles for example
19:18:49*narimiran joined #nim
19:19:03*seni joined #nim
19:20:51clyybberOk, cycles are a dumb example.
19:21:11AraqI don't know, we'll figure it out
19:21:19clyybberBut in general, some other code would use =trace to do something on the things it traces through, right?
19:21:44clyybberSo =trace will need to take a closure
19:21:58Araqseems like it
19:22:31*Hideki_ quit (Ping timeout: 268 seconds)
19:26:38Araqer
19:26:51Araqtransf imports lambdalifting with imports transf ...
19:27:16Araqno wonder we have phase ordering problems...
19:27:31Araqgah this is terrible
19:29:12clyybberOof
19:41:32*ng0 quit (Remote host closed the connection)
19:42:43*ng0 joined #nim
19:45:05*filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
19:48:36*clyybber quit (Quit: WeeChat 2.6)
19:48:46*clyybber joined #nim
19:58:47*nsf quit (Quit: WeeChat 2.6)
19:59:51dom96shashlick: Araq: so, we doing this?
20:00:01*lritter joined #nim
20:01:11shashlickJust getting out of a meeting
20:03:10clyybberHey, lritter, I was wondering how you do "closures as zero-cost abstractions"?
20:04:18*vsantana quit (Remote host closed the connection)
20:04:52*ng0 quit (Remote host closed the connection)
20:05:20*ng0_ joined #nim
20:05:22*ng0_ is now known as ng0
20:06:43madpropsis there a quicker way to create an object, i mean not having to specify each key Cat(name, color) based on the variable names
20:07:41madpropsinstead of Cat(name:name, color:color)
20:08:25*jjido joined #nim
20:08:56narimiranmadprops: you can make your own `initCat` proc to simplify things a bit
20:09:28disrupteki just use a 0 value for everything.
20:09:44lritterclyybber, they're compile time closures. all our functions are templates. when the function is first referenced, we capture its environment, and when it is typed, its environment is applied.
20:10:25lritterclyybber, unfortunately C-style functions don't allow accessing anything but globals outside the function scope, so we have two kinds of functions:
20:11:01lritterclyybber, the classic `fn`, which describes a C function with hard boundaries, which can only access constants defined in a parent function
20:11:14*Jesin quit (Quit: Leaving)
20:11:36FromDiscord<krab4t> madprops, just remember `isNil` is a user defined error.
20:12:34lritterclyybber, and `inline`, which uses the same syntax and describes an inline (as in "the inline"), which is a function that is inlined into the currently active C function. inlines can access variables in parent scopes and generate new inlines and C functions, but all accessed variables have to reside within the same C function boundaries.
20:12:46FromDiscord<krab4t> disruptek, and then 0 can't be a real value 👺
20:12:50lrittereffectively, an inline is a fancy kind of hygienic macro.
20:13:25lritterclyybber, hope that answers your question.
20:13:41*rockcavera joined #nim
20:14:13lritterin an earlier version, `fn` was used for both cases, and a heuristic found out when to inline a function, but it turned out to be difficult to control so i changed the design.
20:15:08*livcd quit (Quit: Lost terminal)
20:15:52*nif quit (Quit: ...)
20:15:53clyybberlritter: Yeah, thanks. Thats about what I expected.
20:16:01*nif joined #nim
20:19:30*Jesin joined #nim
20:20:14*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:23:32FromDiscord<Lantos> hey @shashlick the nimgraphql is just the ast parser right? Does macros/templates, graphqli need to be made to implement a graphql nim server ?
20:38:01*vsantana joined #nim
20:47:13FromDiscord<Lantos> ahh yes, its just a parser could you rename nimgraphql to nimgraphql-parser? or are there plans to implement it also?
20:51:04*filcuc joined #nim
20:54:42*tiorock joined #nim
20:54:42*tiorock quit (Changing host)
20:54:42*tiorock joined #nim
20:54:42*rockcavera is now known as Guest14892
20:54:43*Guest14892 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
20:54:43*tiorock is now known as rockcavera
20:55:45*tiorock joined #nim
20:55:45*tiorock quit (Changing host)
20:55:45*tiorock joined #nim
20:55:45*rockcavera quit (Killed (wolfe.freenode.net (Nickname regained by services)))
20:55:45*tiorock is now known as rockcavera
20:59:52*clyybber quit (Quit: WeeChat 2.6)
21:02:27*jjido joined #nim
21:07:16madpropswondering if argops has a way to expose argument flags
21:07:23madpropslike for --help
21:07:30madpropsparseopts*
21:09:51madpropsgonna try https://github.com/iffy/nim-argparse
21:10:44*ltriant joined #nim
21:15:03*clyybber joined #nim
21:30:08*clyybber quit (Quit: WeeChat 2.6)
21:31:42madpropshmm wondering how i can make an argument optional with it
21:33:09FromGitter<mratsim> I use cligen for CLI arguments
21:33:56*uu91 quit (Ping timeout: 276 seconds)
21:34:36*uu91 joined #nim
21:40:36Araqhmm this phase ordering problem seems to be a non-issue after a little refactoring
21:40:55Araqbut I should sleep now, good night
21:44:47*narimiran quit (Quit: Leaving)
21:44:51*azed joined #nim
21:48:16*sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in)
21:49:16*Vladar quit (Quit: Leaving)
21:49:48*sacredfrog joined #nim
21:50:05madpropsmratsim do you have an example of cligen in action?
21:50:17madpropsthe documentation is very confusing
21:50:55*azed quit (Quit: WeeChat 2.6)
21:52:27*filcuc quit (Ping timeout: 240 seconds)
21:56:32solitudesfyou can look at its tests, there are plenty of examples. what exactly is confusing?
21:57:19madpropsim starting to understand it a bit
22:00:39madpropsim calling get_config in the config module, from the main file
22:00:46madpropsdispatch(get_config)
22:00:56madpropsit just prints a bunch of gibberish
22:01:35madpropsalso im trying to make the function return an object
22:01:45madpropssince it seems i have to do all the processing inside of it
22:02:48*solitudesf quit (Ping timeout: 245 seconds)
22:02:57*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:08:41madpropsis the c++ backend better in some ways?
22:09:34disruptekit can produce faster crashes if you're into that sort of thing.
22:12:55*jjido joined #nim
22:15:25FromDiscord<mratsim> lol
22:15:34madpropsnot sure what backend means here
22:15:39FromDiscord<mratsim> they take less space in the binary because they use native C++ exceptions
22:15:41madpropsare there different implementations of the compiler?
22:16:04*ng0 quit (Ping timeout: 260 seconds)
22:16:04FromDiscord<mratsim> Exceptions in C are handwritten, while in C++ they map to native compiler support
22:16:18madpropsis there a widely preferred backend?
22:16:40FromDiscord<mratsim> That uses cligen: https://github.com/status-im/nimbus-launch/blob/master/src/nimbus_launch.nim#L136
22:17:11disruptekthe c backend gets the most testing.
22:17:16FromDiscord<mratsim> I prefer C personally.
22:17:44FromDiscord<mratsim> I do use C++ when I have to.
22:18:17FromDiscord<mratsim> Now for FFI, C++ is a bit of a pain due to the potential destructors that people add to their types which means you can't put them in Nim sequences
22:18:28FromDiscord<mratsim> but for pure Nim code, C or C++ doesn't really matter
22:18:49FromDiscord<mratsim> oh, sometimes you can get mysterious x2 to x5 performance by switching backend
22:19:12FromDiscord<mratsim> See: https://github.com/drujensen/fib#natively-compiled-statically-typed
22:19:44FromDiscord<mratsim> and I think @Vindaar had an example where C was 2x faster than C++ for the same code ...
22:21:56madpropshow can i dispatch a function from another module and get a result?
22:22:04madpropsor at least within the same module
22:22:10madpropswith cligen i mean
22:22:47FromDiscord<mratsim> what do you mean by result?
22:23:37FromDiscord<mratsim> dispatch will make it that when calling your program from th CLI, every input will be passed to that function
22:24:37madpropsbut i need to pass a Config object somewhere, which i create inside the dispatched function
22:25:09madpropsor is dispatch the new main function now?
22:25:22FromDiscord<mratsim> dispatch creates a main function for you
22:25:54madpropsso i can't simply have arguments processed in their own module and then returned to main
22:26:18madpropsi've been getting args in config.nim and sending a Config object to the main func
22:27:13FromDiscord<mratsim> the dispatch function can call other functions or access globals
22:27:18FromDiscord<mratsim> dispatched*
22:30:31*ltriant_ joined #nim
22:31:15*ltriant quit (Ping timeout: 240 seconds)
22:44:24*ng0 joined #nim
22:46:15*tane quit (Quit: Leaving)
22:48:20*abm joined #nim
22:51:13*sealmove joined #nim
22:55:08sealmoveso what's new in 1.1.1?
22:57:55Araqsealmove: I'm working on https://github.com/nim-lang/RFCs/issues/177 but soon need to work on bugfixes again
22:59:57*nisstyre quit (Quit: WeeChat 2.5)
23:01:19*nisstyre joined #nim
23:04:02sealmoveintresting
23:11:18FromGitter<alehander92> https://archiveprogram.github.com/
23:11:39FromGitter<alehander92> this is kinda weird imo
23:12:13FromGitter<alehander92> but our code is going to svalbard
23:12:29nisstyreis this any good? https://github.com/BitR/ycm-nimsuggest I'm looking for something similar to clang / dcd in vim where it can, e.g. autocomplete field names of objects for me
23:12:43nisstyreI've already got ycm installed
23:13:49FromGitter<zetashift> @nisstyre this should take care of your nim needs in vim: https://github.com/alaviss/nim.nvim
23:14:07nisstyrehmm I'm not using nvim but I think there might be a compatibility thing
23:14:28FromGitter<zetashift> yea I'm not sure you can use it with ycm
23:14:39nisstyreI'll try it out though thanks
23:15:36FromGitter<zetashift> leorize(the wonderful maker of that great plugin) is AFK I think, you could ask and I think you'll get an answer ASAP
23:28:36*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:29:18madpropssays this is deprecated: ref object {. inheritable .}
23:29:24madpropswhat's the proper way?
23:31:03*norm joined #nim
23:31:26*norm is now known as Guest72127
23:32:03*Guest72127 quit (Client Quit)
23:32:06madpropsnvm got it
23:32:27*norm_ joined #nim
23:32:42madpropsnot sure if what im doing is correct http://i.imgur.com/26HcAa3.png
23:33:56FromGitter<zetashift> @madprops you might be better of with an object variant: https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
23:34:15FromGitter<zetashift> Also https://play.nim-lang.org/ for all your nim related code sharing goodiness
23:36:36*krux02 quit (Remote host closed the connection)
23:45:49FromGitter<zetashift> off*
23:54:40madpropscan table be accessed through.dot notation? or what should i be looking for?
23:54:54madpropsobj.name instead of obj["name"]
23:55:30FromDiscord<treeform> has any one setup the new github workflow for their nim library?
23:58:38*vsantana quit (Remote host closed the connection)