<< 21-05-2017 >>

00:16:20*bjz joined #nim
00:17:24*bjz_ quit (Ping timeout: 260 seconds)
00:38:57*chemist69 joined #nim
00:40:59SusWombatwhy is editorconfig "unix crap"?
00:40:59SusWombathttps://github.com/nim-lang/Nim/pull/5840
00:41:33couven92SusWombat, yeah, I wondered the same thing... But Araq remained relentless... :P
00:42:16couven92SusWombat, https://irclogs.nim-lang.org/18-05-2017.html#14:14:18
00:44:07SusWombatcouven92, thats a stupid explanation but well i can see why someone might not want to add additional files
00:45:29couven92yeah, I don't agree either, but well... Not my call, I just leave the .editorconfig in my local copy anyways, I did the PR to share my idea of proper editorconfig'ing in case somebody else would care
00:48:42*Trioxin joined #nim
00:54:38demi-tbh i've never heard of editorconfig before, do any major editors use it?
00:54:52SusWombatdemi-, it is a plugin you install you self
00:55:01SusWombatand yeah its aviable for the major browsers
00:55:24SusWombateditors*
00:55:26couven92demi-, http://editorconfig.org/ sroll to the bottom
00:55:44SusWombatoh im actually wrong ...
00:55:52SusWombatthere are some that have it natively
00:55:59couven92quite a lot of the major editors support it, quite a lot of them actually in box!
00:56:05couven92SusWombat, yeah...
00:56:21SusWombati wouldnt say "quite a lot" tho
00:56:39couven92I find it EXTREMELY useful for languages like Python, where correct indentation actually matters
00:56:44demi-oh, hmmm; why would you use this for formatting and not a linter?
00:56:55*libman joined #nim
00:57:41couven92demi-, technically, four spaces (my personal default for non-nim devel) is legal in Nim, right? it just mean two indent levels
00:57:42SusWombatdemi-, cause it isnt checking for mistakes you made and it doesnt "reformat" your code. It sets basic settings like indent size and so on
00:58:44demi-ok i guess i don't understand why the editor wouldn't have basic support for this if it supports a specific language (not saying it is bad/wrong, just that i don't understand it)
00:59:04*krux02 quit (Remote host closed the connection)
00:59:23SusWombatdemi-, it does and thats the point. The plugin parses the configfile and tells your editor what settings to set.
00:59:53SusWombatThat way i can have different "style" settings on a per project base
01:00:24*BennyElg joined #nim
01:00:25*BennyElg_ quit (Ping timeout: 246 seconds)
01:00:29couven92SusWombat, and you can define the *correct* style for your team
01:01:01demi-yeah, which goes back to my point of why isn't that enforced by a linter? like, you should be coding in a way that works best for you then using a linter to apply the formatting that your team desires.
01:01:13couven92For C#, we actually have quite a lot of extended properties, that define stuff for the C# linter as well
01:02:29SusWombatdemi-, a linter doeswnt format or atleast not usually
01:05:04SusWombatActually im not sure if most editors allow you per language settings. I just kinda assumed that
01:05:41*Guest81488 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:07:14couven92and editorconfig doesn't actually change the contents of the file, it configures the editor for the changes you are making... i.e. it's not a formatting rule, it's just common settings in a unified format that is undertood by many different editors
01:07:40*yglukhov joined #nim
01:07:52SusWombatyeah kinda what i tried to said but yours might be worded better
01:07:56SusWombatsay*
01:08:13demi-if it does some stuff for you well then that is neat and i'm glad; tho i cannot say i have ever had that as a problem i needed solving
01:08:46libmanWhen you say "most editors", you mean weighed by use, right? Because there are thousands of text editors out there, most very simple obscure ones.
01:09:05couven92demi-, it's more that I often opened Nim in a editor that didn't support Nim just for small quick edits
01:09:10*Ven joined #nim
01:09:23libmanBut if you do weigh by usage, the vast majority of programmers do use an editor that supports per-language settings - https://insights.stackoverflow.com/survey/2017#technology-most-popular-developer-environments-by-occupation
01:09:35*Ven is now known as Guest89037
01:11:58*yglukhov quit (Ping timeout: 246 seconds)
01:12:03couven92libman, Visual Studio actually has Textmate support for syntax highlighting for Nim. But otherwise Visual Studio does not understand anything about Nim. I do a lot of C# and therefore always have VS open. For very small quickfixes I am often too lazy to change over to Code
01:12:53couven92which means, all my tabs get mixed up when I do some small fixing in Visual Studio
01:13:47libmanI use vscode but it's a guilty pleasure for me (no BSD support). There are some new vim-like editors I'd consider switching to (ex. kakoune.org), but no Nim support yet.
01:14:59couven92libman, point is: editorconfig would help to code in editors that have no Nim support, but you use anyways (because it's what you open at that point)
01:16:25couven92Yes, I have VSCode installed, and yes, when I do serious Nim stuff, I use that one (best support for Nim/nimsuggest on Windows), but I wouldn't dream of leaving Visual Studio for C# development, so I'll always also use VS on occasion
01:17:02SusWombatcouven92, id say it has the best support for nim on linux aswell
01:17:32couven92SusWombat, I wouldn't know... I don't do Linux! :P :P
01:17:36libmanI was just pedantically nitpicking SusWombat's use of the term "most editors".
01:17:48SusWombatcouven92, yeah i know that "Unix crap" :D
01:17:58*Guest89037 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:18:38couven92I guess I should be crucified for actually loving the good ols Windows Command Prompt, and preferring that over bash! ;)
01:19:21libmanNo one should be crucified. Windows has some strengths and makes perfect sense for some situations.
01:19:32SusWombatyeah for gaming :)
01:19:51*libman hasn't played a game since the 90s.
01:19:56SusWombatbtu besides that? (genuinely intrested)
01:19:59SusWombatbut*
01:20:01SusWombatoh waitz
01:20:04couven92printing!
01:20:11SusWombatnvm forgot professional art and music stuff
01:20:43libmanWindows is good because that's what got people who are not specialist geeks to use computers.
01:20:50couven92I have never managed to get sth printed exeactly as I wanted on a Linux machine, whereas I usually have no problems whatsoever on Windows... :P
01:21:09SusWombatthat "you have to be a geek to use linux" thing is just a meme imo
01:21:48couven92But okay... I have to admit, I (almost) never have any problems in Windows, whereas I can never get anything done on Linux... so might be unflexible me :O
01:21:50libmanIt is now, but getting Linux working on a desktop / laptop wasn't trivial for the first 20 years of its existence.
01:22:23SusWombatwasnt a seasy installing windows 20 years ago as it is today aswell
01:22:27SusWombatas easy*
01:22:28*BennyElg quit (Ping timeout: 240 seconds)
01:23:37libmanThe point is that Microsoft gave businesses and sub-genius PC users what they wanted and they were willing to pay for. So I'm not a Microsoft hater. Plenty of other things to hate.
01:23:38SusWombatbut yeah windows was and maybe is still a little bit asier
01:23:47couven92Okay... I actually wanted to set up a server running Windows XP, since dom96 and Araq wanted an XP testing machine for Nim... But installing RAID drivers in BIOS-like Windows XP setup turned out be a real pain in the a**! :(
01:24:45*BennyElg joined #nim
01:25:07*libman has a growning collection of qemu images (because Bhyve doesn't support as many platforms and can't do suspend / resume as well). I'll eventually automate Nim binary compilation on them.
01:27:08couven92libman, yeah... I am actually a bit shocked to realize that I can recite the commands to build Nim from scratch an both Windows, Linux and Android! :P
01:28:26SusWombat"yaourt -S nim-git" :)
01:28:45couven92and Windows of course using the more complicated variant with the VCC compiler backend. And well Android... that one is really quite tricky, but I have done it so often now...
01:28:53couven92SusWombat, no, that's cheating! :P
01:29:07libmanMy idea of a perfect Nim install / update process: select some drop-down boxes on the Web-site and run: `curl X | tar xpvf -C /opt/nim` for platform independent stuff and then `curl Y | tar xpvf -C /opt/nim/bin` for platform specific bins.
01:30:11libmanI think you can avoid csources if you can install an older nim pkg / bin for bootstrap.
01:30:47couven92libman, yeah... I was actually considering doing that... that's how you can install pip standalone for example... or how you can install dotnet core and so on... I really like the idea of self-bootstrapping installer scripts that are invoked with curl
01:30:59couven92(or Invoke-WebRequest on Windows)
01:32:15*BennyElg_ joined #nim
01:32:17*BennyElg quit (Ping timeout: 268 seconds)
01:32:17*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:32:33SusWombatcouven92, look what i found lol https://github.com/nim-lang/Nim/pull/4407
01:32:53couven92ooohh... ups... :P
01:33:37couven92libman, and BTW: curl is not guaranteed to be installed... I remember that wget is actually more common to be on a fresh vanilla Linux distro? (please prove me wrong)
01:34:07SusWombatarch for a long time didnt have wget but curl iirc
01:34:23SusWombati know for sure it did not ha<ve wget for a while but not sure about curl
01:35:39couven92ah, okay... might be I got those reversed then...
01:35:50SusWombatnah i think you are still right
01:35:55libmanThe Web-site would have you select the OS / version / etc (auto-detectable with JS to some degree) and tell you what commands to paste, including using the right bundled download tool for the OS (curl, fetch, ftp, etc).
01:36:16jackvSusWombat: arch still doesn't have wget in a default install
01:36:17couven92SusWombat, regarding the other editorconfig PR: Araq really hates .dotfiles, right? :D
01:36:26SusWombatjackv, im pretty sure it does
01:36:39SusWombatcouven92, seems so :/
01:36:59jackvI just did a fresh install last week and I had to install it manually
01:37:16jackvI remember because it surprised me
01:37:16*vlad1777d__ quit (Remote host closed the connection)
01:37:23couven92probably because he's on Windows, and therefore has to stare at them in the explorer (them not being auto-hidden as in Linux)
01:37:44SusWombatI mean my editor doesnt hide them aswell
01:38:08SusWombatI just like the way it tells me hey im a config file
01:38:13*chemist69 quit (Ping timeout: 246 seconds)
01:38:46couven92yeah me too... First I do at every computer (both Linux and Windows) is to get the file explorer to show all files
01:38:47SusWombatjackv, werid i did mistake that then.
01:38:50SusWombatweird*
01:40:03couven92and my default command to list files in the shell: `ls -lah` really annoying on Android, as the busybox there does not support all the flags usual `ls` does
01:40:11*libman hides in shame for mistakenly including -f to tar when piping to it.
01:40:31couven92libman, -f-?
01:40:52SusWombatjackv, may it be that the iso has wget aviable?
01:41:31SusWombatcause thats the only time i use wget maybe i did mistake it because of that
01:41:43jackvSusWombat: probably, yeah. The iso has tons of stuff
01:42:01couven92libman, how are we on opening files for reading in C? using "r" or "rb"? "w" or "wb"?
01:42:15libman`curl X | tar x...` shouldn't contain an 'f' tar argument.
01:43:13couven92libman, no it shouldn't... but curl X | tar -xf - actually works, as - suggests stdin as the value for -f
01:43:25SusWombattar -xvf :D
01:43:28*BennyElg_ quit (Ping timeout: 240 seconds)
01:43:33*BennyElg joined #nim
01:43:51SusWombatIm not even sure anymore what the flags mean (did look it up back then) but it works :)
01:44:16couven92x extract, v verbose, f use file as input
01:44:18jackvhttps://xkcd.com/1168/
01:44:36couven92also z use gzip compression, J use bzip2 compression
01:44:51couven92that's all I know by heart...
01:45:03couven92ah, c create, and a for add?
01:45:48libmanI know, I know, my point was about providing Nim binary builds for more platforms. I'm tinkering with some shell scripts and qemu for automating that.
01:46:04jackvJ is actually xz, j is bz2
01:46:06SusWombatisnt that what choosenim is for?
01:46:16SusWombati actually want to try choosenim sometimes
01:46:28couven92jackv, Oh!!! My bad... explains a lot of my recent taring troubles! :O
01:46:29libmanchoosenim compiles the sources and only on a few platforms.
01:47:02SusWombatah right
01:48:05SusWombataweomse site for that kind of stuff btw (linux command flags) https://explainshell.com/
01:48:11libmanPPM is the best compression for text / code, BTW - http://www.freshports.org/archivers/ppmd/
01:48:34couven92SusWombat, I like the name... it can be slightly ambigouous! :P
01:50:00*BennyElg_ joined #nim
01:50:15couven92btw, my favorite curl flags: `curl -sSL URL` and no, ironically `sSL` has nothing to do with security! :P
01:50:35*BennyElg quit (Ping timeout: 240 seconds)
01:50:42couven92but because of that easy ro remember! :D
01:52:07*chemist69 joined #nim
01:56:26SusWombatDoes anyone know of a nim library to create texture-atlases or perform bin packing?
02:02:00FromGitter<zacharycarter> SusWombat yes
02:02:12FromGitter<zacharycarter> I have written a tool to do such a thing
02:02:17SusWombatDam you gitter!
02:02:18FromGitter<zacharycarter> for frag
02:02:32SusWombati actually wanted to ask you first lol :D but thought you arent here
02:02:39FromGitter<zacharycarter> :P
02:02:43FromGitter<zacharycarter> one second
02:03:17FromGitter<zacharycarter> https://github.com/fragworks/frag/blob/master/tools/texture_packer/tinydeflate/tinydeflate.nim
02:04:06FromGitter<zacharycarter> basically put textures in a folder and change that code
02:04:11FromGitter<zacharycarter> and it will produce a texture atlas
02:04:36FromGitter<zacharycarter> I haven't gotten around to writing a GUI for it yet
02:04:59FromGitter<zacharycarter> @yglukhov are you around by any chance? I have another question about the sound library
02:05:15SusWombatyou have to hardcode the images to load?
02:05:29FromGitter<zacharycarter> @SusWombat I haven't spent much time on it yet
02:05:34FromGitter<zacharycarter> it's more just a POC
02:05:57SusWombati see
02:06:14FromGitter<zacharycarter> it will produce an atlas file
02:06:15SusWombatmaybe i spend some time learning about bin packing finally and try to do my own small lib
02:06:44FromGitter<zacharycarter> well... up to you but this does it for you
02:06:51FromGitter<zacharycarter> it'd just need a proper interface
02:07:02FromGitter<zacharycarter> a cli or a gui
02:08:27FromGitter<zacharycarter> no matter what you have to provide a texture packing application some input - like how to refer to the images inside the atlas file and of course the URIs for the images themselves
02:08:51SusWombatyeah sure
02:10:25*bjz joined #nim
02:10:33FromGitter<zacharycarter> okay so i have three frag examples working on the html5 backend now
02:10:40SusWombatnice
02:10:45FromGitter<zacharycarter> thanks
02:10:59FromGitter<zacharycarter> this is going to make prototyping things much easier
02:11:05*couven92 quit (Quit: Client Disconnecting)
02:11:16FromGitter<zacharycarter> also sharing ideas with people
02:12:07SusWombatdoes your html backend use webgl or canvas?
02:12:38FromGitter<zacharycarter> webgl
02:12:43SusWombatah cool
02:35:07*BennyElg joined #nim
02:35:33*BennyElg_ quit (Ping timeout: 260 seconds)
02:49:32*BennyElg quit (Read error: Connection reset by peer)
02:50:01*BennyElg joined #nim
02:51:45*dddddd quit (Read error: Connection reset by peer)
03:00:16*BennyElg_ joined #nim
03:00:43*BennyElg quit (Ping timeout: 260 seconds)
03:17:07*pilne quit (Quit: Quitting!)
03:28:40*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:33:24*BennyElg joined #nim
03:33:28*BennyElg_ quit (Ping timeout: 240 seconds)
03:40:17FromGitter<Varriount> @zacharycarter is quite the expert in OpenGL
03:41:31FromGitter<zacharycarter> I don't know if I'd call myself that, but I sure do wish I could get a job doing it :P
03:42:46FromGitter<Varriount> Meanwhile, I'm trying to wrap AWS C++ SDK with C2Nim
03:42:51FromGitter<zacharycarter> ooooo
03:43:00FromGitter<Varriount> And having to wrestle things.
03:43:10FromGitter<zacharycarter> like what?
03:43:14FromGitter<Varriount> The SDK is somewhat overengineered
03:43:19FromGitter<zacharycarter> ah okay
03:44:35FromGitter<Varriount> They use a custom memory manager though, which means I might be able to get away with using Nim's allocator
03:44:37FromGitter<Varriount> Maybe
03:44:42FromGitter<Varriount> :/
03:56:47*bjz joined #nim
04:03:22*BennyElg_ joined #nim
04:04:13*BennyElg quit (Ping timeout: 260 seconds)
04:06:05*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:07:01*bjz joined #nim
04:07:23*bjz quit (Client Quit)
04:08:34*bjz joined #nim
04:08:40*bjz quit (Client Quit)
04:21:36*BennyElg joined #nim
04:21:43*BennyElg_ quit (Ping timeout: 260 seconds)
04:24:36*BennyElg quit (Remote host closed the connection)
04:27:25*Trioxin quit (Ping timeout: 268 seconds)
04:58:20SusWombathow much knowledge does it require to do a wrapper for a c library?
04:58:24SusWombati mean on nim and c side?
05:31:50*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:33:39FromGitter<maiermic> I registered yesterday as user *nimbus* at forum.nim-lang.org ⏎ However, I can not activate my account with the link in the mail. ⏎ I always get: Account activation failed
05:35:18FromGitter<maiermic> I can login and already wrote a post, but it is not visible to the public.
05:37:33FromGitter<JHonaker> (https://files.gitter.im/nim-lang/Nim/Yc7x/wireworld-nim.gif)
05:37:48SusWombatnice :D
05:37:50FromGitter<JHonaker> Just finished all the basics for a Wireworld cellular automata
05:38:07FromGitter<JHonaker> That was a lot of fun to build
05:45:51*libman quit (Quit: Connection closed for inactivity)
06:15:20*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
06:17:07jackvSusWombat: honestly it doesn't take a whole lot of knowledge of either to do a wrapper
06:17:30jackvjust follow the blog post
06:19:15SusWombatjackv, which one?
06:34:46*BennyElg joined #nim
06:37:43FromGitter<maiermic> can anyone see my post in https://forum.nim-lang.org/t/1951 ⏎ if you go to https://forum.nim-lang.org/ the activity says (even if I'm not logged in): nimbus replied 9 hours ago ⏎ However, I can only see my post, if I'm logged in
06:38:30jackvSusWombat: http://goran.krampe.se/2014/10/16/nim-wrapping-c/
06:38:49SusWombatmaiermic same for me
06:38:53SusWombatjackv, thanks
06:38:56jackvDisclaimer: I haven't done a wrapper in a couple years now, so YMMV, but I think the process should be the same
06:40:41FromGitter<maiermic> SusWombat: thanks for checking. By "same for me" do you mean, you can see my post if you are logged in, but not if you are logged out?
06:43:18SusWombatno i cant see the post at all
06:43:25SusWombati just see the activity thing
06:43:46SusWombatmaiermic
06:47:23FromGitter<maiermic> thanks
06:47:32FromGitter<maiermic> who is admin of the forum? how can I contact him directly?
06:47:48SusWombatdom96, or Araq i guess
06:53:52*BennyElg quit (Remote host closed the connection)
06:54:11*BennyElg joined #nim
07:08:29FromGitter<mratsim> Are inline and closure iterator still non-recursive? https://github.com/nim-lang/Nim/issues/555. Zah suggested an iterator to traverse arbitrarily nested openarray of open array, but I’m at a loss on how to do that without recursion: https://github.com/nim-lang/Nim/issues/5708 ⏎ ⏎ For reference this is my current code, but I can’t flatten openarray due to: ⏎ https://github.com/nim-lang/Nim/issues/2652
07:08:29FromGitter... ... [https://gitter.im/nim-lang/Nim?at=59213ced05e3326c67f2b895]
07:23:39*Trioxin joined #nim
07:32:51*chrisheller quit (Remote host closed the connection)
07:38:28FromGitter<Varriount> @maiermic Did you just register? If so, your post might need approval first
07:42:42*Tiberium joined #nim
07:46:22*BennyElg quit (Remote host closed the connection)
07:48:52*chrisheller joined #nim
07:49:06*chrisheller quit (Read error: Connection reset by peer)
07:49:32*chrisheller joined #nim
07:54:16*chrisheller quit (Ping timeout: 260 seconds)
07:57:11*Kingsquee joined #nim
08:02:46m712can i "link" with another nim package? how?
08:03:09m712i want to have 2 separate folders for 2 separate packages, and i want package 1 to import package 2
08:03:38m712in C, i'd include headers from package 2 and link during compile time, what's the nim equalivent?
08:04:23m712and what if I wanted a generic function prototype to link against?
08:04:32m712(this is a second question)
08:04:51noethicshttps://nim-lang.org/docs/manual.html#modules
08:07:13m712thank you
08:07:14FromGitter<mratsim> You can use import or include (include is basically inserting the source at the call site)
08:07:17m712what about the second question?
08:07:47m712i want to have an arch_init function which is linked at compile time by the linker based on the architecture the user chose
08:10:49SusWombatAnyone a idea for a cool project for a nim noob?
08:17:08*BennyElg joined #nim
08:20:02m712how can i create a function prototype without actually writing the function and then linking it at compile time?
08:20:09m712link it at*
08:21:32m712also how can i import a module from a parent directory? import ../module_something?
08:21:41SusWombatyes
08:22:53m712okay
08:33:33*Arrrr joined #nim
08:36:03FromGitter<ephja> m712: is this relevant to you? https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement
08:39:33FromGitter<ephja> https://nim-lang.org/docs/system.html#hostOS
08:41:58FromGitter<Varriount> Suswombat: Documentation examples? That would get you familiarized with the standard library
08:42:28FromGitter<mratsim> @m712 Here is an example of when(windows): elif(macos) https://github.com/unicredit/nimblas/blob/master/nimblas/private/common.nim
08:42:35FromGitter<Varriount> Or you could try writing a calculator
08:45:27SusWombathm
08:45:29FromGitter<mratsim> if all you want is learning the syntax, Nim is very suitable for project euler (mathematics oriented small contained problem) https://projecteuler.net/. That’s how I started. Otherwise I like the calculator idea from @Varriount, or try porting something useful, it’s easier sometimes to have a reference implementation and you will know “how to do something in Nim”. (If you port something object oriented, Nim is
08:45:29FromGitter... really different though)
08:45:46FromGitter<mratsim> useful for you*
08:45:46SusWombatNah i meant more like a complete project
08:45:58SusWombatbut euler is actually a cool idea aswell
08:46:14FromGitter<mratsim> The thing is, do something you like because it’s a marathon, and you need motivation =)
08:46:25noethicsm712, some of these may interest you https://nim-lang.org/docs/manual.html#implementation-specific-pragmas
08:46:33FromGitter<ephja> I forgot about the OS defines. I assume they are equivalent, just less verbose
08:47:45FromGitter<mratsim> For example, I saw someone port a FLAC decoder library in Nim to learn about Nim, another one ported a NES emulator to Nim (https://hookrace.net/nimes/), some ported OpenGL tools
08:49:26FromGitter<mratsim> Personally I am writing a multidimensional array library and a deep learning framework from scratch in Nim to learn about it. I will probably also do a Go playing bot because that’s what I’m interested in
08:50:01m712noethics: i can't see anything that helps me unfortunately
08:50:38m712also, how can i do unions in nim?
08:50:41noethicsm712, so you want to have headers for an object file?
08:52:12FromGitter<mratsim> m712, Union like unions types?
08:52:27m712FromGitter: an union of two structs
08:52:27FromGitterm712, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
08:52:44m712i'm trying to convert https://gitlab.com/sortix/sortix/blob/master/kernel/multiboot.h#L160-164 to nim
08:53:57FromGitter<mratsim> you can use c2nim to convert c source code in Nim, did you try it?
08:54:01m712no
08:55:06FromGitter<mratsim> Otherwise you can use an object (which is the approach of c2nim according to doc)
08:55:59FromGitter<mratsim> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
09:04:05Tiberiumok, will try now to compile Nim on Fuchsia OS itself :) (building gcc for fuchsia, at least there's docs on how to do this)
09:04:55m712what's the equalivent of __attribute__((packed)) in Nim
09:04:57m712?
09:11:28FromGitter<ephja> m712: this I think https://nim-lang.org/docs/manual.html#foreign-function-interface-packed-pragma
09:12:57m712thanks
09:13:02m712can i apply that to tuples?
09:18:26*couven92 joined #nim
09:20:06FromGitter<ephja> m712: it appears to compile but it doesn't do anything. I would not use a tuple for such purposes in any case
09:21:24m712but isn't tuple the equalivent of structs in C? did I get that wrong?
09:21:33m712should i use objects instead?
09:21:41m712i need to be able to use them with 0 GC
09:23:46*bjz joined #nim
09:23:51*yglukhov joined #nim
09:23:53FromGitter<ephja> what you could do is create a converter that implicitly turns a tuple of a certain signature into an instance of the object type in question, but converters should be used sparingly
09:24:05FromGitter<ephja> tuples are, and so are plain objects
09:25:58FromGitter<ephja> tuple construction is more concise, but tuples can't be packed, have unexported (private) fields etc
09:28:13*yglukhov quit (Ping timeout: 258 seconds)
09:35:15FromGitter<ephja> if T is an object type (type T = object) then var t: T implies stack allocation, "var t: ptr T" implies an untraced reference (* in C) and "var t: ref T" implies a traced reference (points to an object of a garbage collected heap). the same applies to tuples as well
09:36:02*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:38:29FromGitter<ephja> btw, is the 'pure' pragma not necessary when interfacing with C anymore? it's only applied to a few object types in sdl2.nim for example
09:38:55*bjz joined #nim
09:39:42*planhths joined #nim
09:42:05FromGitter<Varriount> @ephja I don't think so
09:43:42FromGitter<Varriount> m712: Object types are always located on the stack (except when they are a member of a reference type)
09:46:29*vlad1777d joined #nim
09:50:09*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:51:02*chrisheller joined #nim
09:53:36*nsf joined #nim
09:56:32*chrisheller quit (Ping timeout: 260 seconds)
10:02:29*yglukhov joined #nim
10:05:51m712thanks for all the replies
10:08:17*yglukhov quit (Read error: Connection reset by peer)
10:08:49*yglukhov joined #nim
10:16:26*bjz joined #nim
10:20:37*bjz quit (Client Quit)
10:21:25*yglukhov quit (Remote host closed the connection)
10:26:07*Ven joined #nim
10:26:31*Ven is now known as Guest38231
10:28:40*bjz joined #nim
10:43:52*yglukhov joined #nim
10:46:14*yglukhov quit (Remote host closed the connection)
10:46:55*Guest38231 quit (Ping timeout: 260 seconds)
10:48:19*Ven_ joined #nim
10:48:52*Ven_ quit (Client Quit)
10:53:01*chrisheller joined #nim
10:57:40*chrisheller quit (Ping timeout: 260 seconds)
10:58:08FromGitter<Varriount> @mratsim I'm currently looking over your arraymancer code. I love the amount of comments you've written
10:58:16couven92most efficient way to clean your repo from intermediate files: `git clean -fdx` that one is especially nice when you haven't added your new files to the index yet... Boom! A whole days worth work gone with the wind! Yaih! :/
10:58:26FromGitter<mratsim> @Varriount =)
10:58:57FromGitter<mratsim> Be sure to check the Slice and Dice branch with the slicing and slicing mutations
11:01:17*yglukhov joined #nim
11:03:20*Snircle joined #nim
11:03:47FromGitter<mratsim> The Design doc is outdated too, I do not use pointers anymore
11:11:54Tiberiumcouven92, you can restore that
11:12:03Tiberiumgoogle "linux ext4 restore files"
11:12:21TiberiumI did that successfully, but you need to reboot ASAP and boot from livecd
11:14:17*Vladar joined #nim
11:15:24FromGitter<Varriount> I will always wonder why Linux never adopted trash/recycle bin concept
11:15:35FromGitter<Varriount> Windows and Mac both have
11:15:38Tiberiumit is there
11:16:08Tiberiumbut not by default :)
11:16:19Tiberiumand shift+delete and trash will not help you even on windows
11:16:30FromGitter<Varriount> Can rm use it?
11:17:22Tiberiumyou can use "rmtrash" command as an alias to "rm"
11:17:29Tiberiumbut setting this system-wide is bad I think
11:17:45Tiberiumbut anyway, this git behaviour is weird
11:18:37*yglukhov quit (Remote host closed the connection)
11:18:44couven92Tiberium, on Windows... and well... my own fault... I have to get used to adding files to the index if I need them :P
11:19:29*yglukhov joined #nim
11:19:54Tiberiumcouven92, why not restore files then?
11:20:06Tiberiumif it's a second HDD or SSD, you can unmount it without rebooting
11:20:29couven92Tiberium, not that important in this case... was just a fun project.... :P
11:21:18FromGitter<Varriount> Recuva
11:21:56Tiberiumcouven92, btw, many IDE's help with that git stuff :)
11:22:18couven92Tiberium, yeah... that's why I usually do that in the IDE! :D
11:22:19Tiberium(adding files to index automatically, easier to solve merges etc)
11:22:26Tiberiumcouven92, what IDE do you use for Nim?
11:23:52*yglukhov quit (Remote host closed the connection)
11:24:04*yglukhov joined #nim
11:24:43couven92Tiberium, usually VS Code... But I use the three-way merger in Visual Studio to resolve conflicts (mainly out of lazyness, since I always have VS open anyways)
11:25:06Tiberiumcouven92, what is it's name? and do you use any additional plugins in vscode for nim or git?
11:26:02couven92I use the Nim plugin in VS Code and nothing else
11:29:00couven92and the merging in Visual Studio is built-in in Vanilla VS... and with VS 2017 FINALLY being able to open a folder (with having to create solution and project files) really helps
11:30:39*yglukhov quit (Remote host closed the connection)
11:35:56*gmpreussner_ quit (Read error: Connection reset by peer)
11:39:03*gmpreussner joined #nim
11:42:03*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
11:43:52*abruanese quit (Read error: Connection reset by peer)
11:44:37*dddddd joined #nim
11:53:49*chrisheller joined #nim
11:58:20*chrisheller quit (Ping timeout: 260 seconds)
12:01:01*yglukhov joined #nim
12:07:08Trioxinthe 4th example here won't compile: https://nim-lang.org/docs/httpclient.html
12:07:35Trioxin(8, 12) Error: type mismatch: got (Response)
12:13:32*yglukhov quit (Read error: Connection reset by peer)
12:14:06*yglukhov joined #nim
12:15:39Tiberiumah, because there's no $ for Response
12:15:43Tiberiumstrange
12:16:01TiberiumTrioxin, you can report that on github issues
12:17:16FromGitter<AjBreidenbach> hey, can anyone tell me if there's a way to get the value of an enumerated type, or if their values are purely for ordering?
12:17:16Trioxink
12:17:42*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:18:41*bjz joined #nim
12:19:28TiberiumAjBreidenbach: you can cast it to int
12:19:50TiberiumAjBreidenbach: cast[int](valueofenumtype)
12:20:03FromGitter<AjBreidenbach> @Tiberium ok great thanks :)
12:28:31FromGitter<zacharycarter> @SusWombat I can help guide you with wrapping C libraries if you'd like
12:28:43FromGitter<zacharycarter> I also have an article I started which walks you through wrapping one on a linux machine
12:28:46FromGitter<zacharycarter> sorry a mac
12:29:00SusWombatok
12:29:20SusWombatbut im not sure yet
12:29:23SusWombatthanks tho!
12:29:43*adeohluwa joined #nim
12:29:50FromGitter<zacharycarter> np! just lmk
12:29:52FromGitter<zacharycarter> it's not difficult
12:30:01TrioxinTiberium, how can I get the post to work in that case?
12:31:27*bjz_ joined #nim
12:33:25*bjz quit (Ping timeout: 246 seconds)
12:34:23TiberiumTrioxin, do you need to pass headers?
12:34:43TiberiumTrioxin, if not, use postContent - https://nim-lang.org/docs/httpclient.html#postContent,HttpClient,string,string,MultipartData
12:34:54Tiberiumand even with 4'th example
12:35:07Tiberiumyou just need to assing response to a variable instead of outputting it
12:35:08Tiberiumlike
12:35:30Tiberiumlet resp = client.request(...)
12:35:34Tiberiumecho resp.body
12:35:45Tiberiumthis is response type - https://nim-lang.org/docs/httpclient.html#Responsehttps://nim-lang.org/docs/httpclient.html#Response
12:35:48Tiberiumhttps://nim-lang.org/docs/httpclient.html#Response
12:36:02Trioxink
12:36:34Tiberiumeverything is in the docs :)
12:38:41*dddddd_ joined #nim
12:38:45*dddddd quit (Read error: Connection reset by peer)
12:39:47*dddddd_ is now known as dddddd
12:43:25*planhths quit (Quit: Konversation terminated!)
13:02:36*yglukhov quit (Remote host closed the connection)
13:11:26*yglukhov joined #nim
13:17:05*bjz_ quit (Ping timeout: 240 seconds)
13:17:18*bjz joined #nim
13:20:22*sz0 joined #nim
13:26:52*Trioxin quit (Ping timeout: 272 seconds)
13:47:16*skrylar joined #nim
13:53:59skrylaryou know what nim needs
13:54:02skrylaran implementation of 9p
13:55:01*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:55:23*chrisheller joined #nim
13:56:42Tiberiumskrylar, 9p?
13:58:34*libman joined #nim
13:59:59skrylarTiberium, eeh. just me being weird.
14:00:05skrylarplan9 had some cool stuff in it
14:00:08*chrisheller quit (Ping timeout: 260 seconds)
14:00:29skrylarone of them was that they decided to just do things through a filesystem (like unix) but they realized this was better when you just made a generic filesystem interface
14:01:05skrylarso they did.
14:01:09*bjz joined #nim
14:01:14Tiberiumskrylar, do you mean use nim in 9p or implement 9p in nim?
14:01:28skrylari was looking at how hard it would be to made a 9p module in nim for fun
14:01:35skrylarwell i mean. it's a good debugging tool too.
14:01:48*couven92 quit (Ping timeout: 240 seconds)
14:02:08Tiberiumskrylar, at least you certainly can do that, but I don't know how :) but look, you can even write Nim for arduino board (but with no GC for small ones)
14:02:11skrylaralso 9p and plumber is way nicer than D-Bus. but alas
14:02:13Tiberium*boards
14:04:05skrylarTiberium, it's not hard really. just like, a REALLY basic tcp protocol
14:04:56skrylarkinda like gopher really. heh
14:05:23*pilne joined #nim
14:08:37*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:14:58FromGitter<maiermic> @Varriount yes, I did just register. I'm not sure if activation was successful though. I always got "Account activation failed" when I opened the link of the email. Maybe it was successful anyway and you are tight that my post only needs approval.
14:26:50*dddddd quit (Ping timeout: 255 seconds)
14:28:18*skrylar 's jimmies are rustled by the lack of a checked union
14:31:16*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:33:52*xikuukawaii joined #nim
14:34:31*BennyElg quit (Remote host closed the connection)
14:36:27*yglukhov quit (Remote host closed the connection)
14:37:00*yglukhov joined #nim
14:39:53*dddddd joined #nim
14:41:05*yglukhov quit (Ping timeout: 240 seconds)
14:43:40*yglukhov joined #nim
14:51:09*adeohluwa quit (Quit: Connection closed for inactivity)
14:55:16xikuukawaiiHow do I generate random ints?
14:56:07Tiberiumxikuukawaii, use "random" module?
14:56:09Tiberium:)
14:56:19Tiberiumxikuukawaii, import random; echo random(1337)
14:56:29xikuukawaiiTiberium: Thanks mate!
14:58:11xikuukawaiiTiberium: That number will never change though correct? So from the time I compile the code to everytime after when I run it, it will be the same number?
14:59:31skrylaryou have to seed random number generators if you want different outputs
14:59:57xikuukawaiiskrylar: What is seeding?
15:00:00Tiberiumxikuukawaii, easiest one - use "randomize()"
15:00:06Tiberiumbefore using random functions
15:00:14*nsf quit (Quit: WeeChat 1.7.1)
15:00:20Tiberiumjust "randomize()" at the start of your program (or after last import)
15:01:28xikuukawaiiTiberium: THANK YOU! ^_^
15:02:30skrylarseeding is the technical term for starting a random number generator with some inital 'thing' that it uses to make the numbers from
15:02:40skrylarif you give them the same seed you always get the same order of numbers
15:02:49skrylarthis is useful for scientific sims and not as helpful for games
15:03:10xikuukawaiiOhhhh
15:03:34skrylargames typically just take the current system time as their seed
15:04:04skrylarsecurity stuff will ask the OS for some entropy and use that (/dev/u?random)
15:04:21xikuukawaiiskrylar: I see...
15:07:32*yglukhov quit (Remote host closed the connection)
15:08:33*xikuukawaii quit (Quit: WeeChat 1.7.1)
15:10:50*yglukhov joined #nim
15:18:14*yglukhov quit (Remote host closed the connection)
15:31:21FromGitter<Varriount> skrylar: Checked union?
15:32:57skrylar@varriount its an old pascal thing. you declare a union type from an enum and it has a field that says what set of fields are in the union. then you can do a switch on that, and the compiler knows which fields you meant.
15:33:31FromGitter<Varriount> skrylar: You mean Nim's object variants?
15:33:37skrylarit has those now?
15:33:46FromGitter<Varriount> It's had them since I can remember
15:33:59FromGitter<Varriount> https://nim-lang.org/docs/manual.html#types-object-variants
15:34:03skrylarthat would probably work then
15:36:01*nsf joined #nim
15:50:48*dddddd quit (Ping timeout: 240 seconds)
15:57:01*chrisheller joined #nim
15:59:32*Ven joined #nim
15:59:55*Ven is now known as Guest30747
16:01:28*chrisheller quit (Ping timeout: 260 seconds)
16:01:48*nsf quit (Quit: WeeChat 1.7.1)
16:01:59libmanRandom thought: could there be a "Simple Nim" - a dumbed-down simplified subset kinda like https://en.wikipedia.org/wiki/Basic_English ?
16:02:55FromGitter<zacharycarter> http://imgur.com/a/3io4i
16:02:59FromGitter<zacharycarter> playing around with spine and frag
16:03:05FromGitter<zacharycarter> and chipmunk
16:03:15FromGitter<zacharycarter> not sure what the weird bouncing around is due to, something with physics obviously
16:03:39*dddddd joined #nim
16:03:56Tiberiumlibman, just don't use complicated features - and you have simple nim
16:04:10Tiberiumlibman, basic english does the same thing - it uses only simple common words
16:04:22Tiberiumah no
16:04:25libmanYup, that's the idea, but it would be beneficial to have some collaborative effort on where the line is, and perhaps even different modes.
16:04:40Tiberiumlibman, but really I don't see why is that useful
16:04:47Tiberiumthere's no simple C++
16:04:49Tiberiumor cimple C
16:04:51Tiberium*simple
16:04:54Tiberiumor simple java
16:05:29libmanSeems like, coming from Python and with a basic understanding of types, you can do a lot with just 20% of Nim. The other 80% of the complexity may be familiar for people coming from C++ / Java / Ada / ML / etc, but scare away the n00bs (like me, sorta - I'm a regressed burnout).
16:05:31FromGitter<zacharycarter> just cut out metaprogramming / manual memory allocation and I think you have simple nim
16:05:51FromGitter<zacharycarter> also any kind of concurrency / multithreading / async
16:06:09FromGitter<zacharycarter> but really these are advanced programming concepts anyway not language specific
16:06:10Tiberiumlibman, I came from Python, but I was amazed by meta-programming and learned a bit of it :)
16:06:15Tiberiummacros are very cool
16:06:18Tiberiumand templates too
16:06:20FromGitter<zacharycarter> I agree with Tiberium I don't see much of a benefit to formalizing this stuff
16:06:47libmanSome async isn't that difficult. I'd even cut less than Go did: it gets very ugly without exception handling and operator overloading (which Python has).
16:06:57Tiberiumyeah, async too
16:07:09Tiberiumasync in nim almost is the same as in python too :)
16:07:10FromGitter<zacharycarter> In general people just know if something is too advanced for them after reading it, I guess it couldn't hurt to slap a label on features and say ADVANCED or BEGINNER or something but it's just extra work and how much benefit
16:07:25Tiberiumawait is the same, but instead of "async def" I just use {.async.} pragma
16:07:31libmanThe benefit is: here's two days worth of learning after which you can go create useful programs with Nim.
16:08:01FromGitter<zacharycarter> I think that's what something like Nim in Action is supposed to be
16:08:41*libman is just pondering how to make Nim more popular. I'm also trying to figure out my own programming impotence as of late - maybe I'm a Python-level programmer scared off by the C++ stuff that I can live without for now.
16:08:50FromGitter<mratsim> This works: ⏎ ⏎ ```static.nim(1, 53) Error: type expected``` [https://gitter.im/nim-lang/Nim?at=5921bb92fa63ba2f766563bf]
16:08:58FromGitter<Varriount> libman: Get Nim sponsored by a major company.
16:09:05*dddddd quit (Remote host closed the connection)
16:09:12FromGitter<zacharycarter> @Varriount that AWS sdk will go a long way :P
16:09:57FromGitter<Varriount> Actually, I'm working on translating http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
16:10:13FromGitter<zacharycarter> :D
16:10:21FromGitter<Varriount> And it's going very well! There's hmac and sha256 libs on Nimble, so no implementing of those.
16:11:01FromGitter<Varriount> Nim has httpclient, and while it's not as automatic as Python's requests library, it looks like it will get the job done.
16:11:50FromGitter<Varriount> @zacharycarter I figure I'll start small, and hopefully something will form (like an oyster forming a pearl)
16:11:55libmanThe sponsorship idea is worthwhile but not mutually exclusive with the "Simple Nim" idea. (Wanna avoid the term "Basic Nim" because someone might think it's BASIC.)
16:12:17FromGitter<Varriount> libman: Documentation improvements would also help.
16:12:44FromGitter<Varriount> Technically the standard library is documented, but sites like MDN and Python.org blow us out of the water
16:13:13FromGitter<Varriount> I'd be willing to be many people are turned off by the rather terse documentation
16:13:43libmanJust brainstorming ideas for boosting popularity. Some are obvious: moar docs, moar libs, moar speeed, etc. But some ideas are less obvious, and some would bring greater return (more users and contributors) on investment (dev time now).
16:14:15*Sembei quit (Read error: No route to host)
16:14:18libmanRegarding documentation: one thing that PHP did right was have like a forum thread for each function, where people provided examples and answers.
16:15:44*Sembei joined #nim
16:17:26enthus1astnim needs ipython
16:20:15skrylarlike a similar notebook interface or literally ipython
16:22:19enthus1astyou think of a jupyter kernel right?
16:23:03FromGitter<JHonaker> Nim needs an interpreter is what it needs
16:23:10FromGitter<JHonaker> REPLs are so hard to leave now
16:23:36skrylari remember when they were doing something about nimscript asking about it
16:23:42skrylarbut at the time it was just for compile time expressions
16:24:07Tiberiumit's another thing
16:24:13Tiberiumand REPL is hard to do since nim is compiled
16:24:24FromGitter<JHonaker> I mean, we already have the parser and suuuper easy access to the AST
16:24:41enthus1ast hey im'm just storming
16:24:46Tiberiumthis doesn't mean that repl is easy :(
16:25:00skrylaridunno.
16:25:12FromGitter<JHonaker> Yes I know :/ Maybe when Crafting Interpreters gets finished, I'll give it a shot
16:25:17FromGitter<JHonaker> Or even just the first hald
16:25:28skrylarthe C++ nerds are just going to say "Oh yeah we have that, you just need C++0xBEEF!"
16:26:07FromGitter<JHonaker> I've already completed it up to where it is now. But that's only to parsing/lexing, and evaluation of arithmetic expressions (no symbol lookups or class defs yet)
16:26:34skrylarif you want to be really very silly, you can use the javascript backend on top of duktape
16:26:35Tiberiumclass defs?
16:26:44Tiberiumthere are no classes in nim :)
16:26:59Tiberiumah I mean there's
16:27:01FromGitter<JHonaker> yea I know I meant in the language that you implement in CI book
16:27:08Tiberiumah
16:27:20Tiberiumanyway, I think this approach is very hard
16:27:28Tiberiumthere's already a half-working repl btw
16:27:28libmanWhat advantages does a REPL have over IDE integration with "execute current line" / "execute highlighted code" / "execute file" functionality?
16:27:34Tiberium"nim repl"
16:27:44Tiberiumlibman, quickly open it in console and test something
16:27:52libman`nim secret`
16:27:56Tiberiumah yes
16:28:05Tiberiumlibman, and there's no "execute current line" or "execute highlighted code" for nim :(
16:28:07Tiberiumin vscode
16:28:14skrylarlivecoding, they help in debugging too
16:28:28Tiberiumskrylar, then you can't do it with repl
16:28:30FromGitter<JHonaker> libman: you just described a REPL
16:28:32libmanShould be simple to create just by dumping selection to temp file.
16:28:37nivis it possible to chain "do" statements to give multiple procs as arguments?
16:28:49FromGitter<JHonaker> if you save state between the executions
16:30:01FromGitter<JHonaker> niv: why not just write funcname(proc (args): rettype, proc (args2): rettype2, etc)?
16:30:27nivi know i can do that. im asking just out of stylistic curiosity.
16:30:28Tiberiumbecause you can :)
16:31:14FromGitter<JHonaker> you could also use the {.procvar.} pragma on procs defined in the code
16:32:03FromGitter<JHonaker> and just do func(definedproc, definedproc2) or variable.func(defproc1, defproc2)
16:32:44nivyep, that's possible too i suppose. it was just a question about the parser to see if it's supported
16:32:48FromGitter<JHonaker> which if you have functions taking multiple functions as parameters, I would have to say would be way easier to read than trying to inline multiple definitions
16:32:57*Guest30747 quit (Ping timeout: 240 seconds)
16:33:20FromGitter<JHonaker> To answer that question, I don't know. :D Try it
16:33:23FromGitter<JHonaker> I doubt it
16:39:44*arnetheduck_ quit (Ping timeout: 260 seconds)
16:43:19*Sentreen quit (Ping timeout: 246 seconds)
16:47:05*Ven joined #nim
16:47:29*Ven is now known as Guest69624
16:50:26*chrisheller joined #nim
16:56:10*Sembei quit (Quit: WeeChat 1.6-dev)
16:56:23*Sentreen joined #nim
16:59:41*EastByte quit (Ping timeout: 272 seconds)
17:02:32*yglukhov joined #nim
17:03:04*Guest69624 quit (Ping timeout: 255 seconds)
17:07:04*Ven_ joined #nim
17:09:50*yglukhov quit (Remote host closed the connection)
17:10:30*EastByte joined #nim
17:10:32*yglukhov joined #nim
17:19:35*Ven_ quit (Ping timeout: 240 seconds)
17:24:22*Ven_ joined #nim
17:25:11*vlad1777d quit (Quit: Leaving)
17:34:08*Ven_ quit (Ping timeout: 240 seconds)
17:37:26*Ven_ joined #nim
17:41:05*couven92 joined #nim
17:42:44*Ven_ quit (Ping timeout: 272 seconds)
17:50:32*yglukhov quit (Remote host closed the connection)
17:57:45*vlad1777d joined #nim
17:58:53*noethics quit (Remote host closed the connection)
17:59:35*Sentreen quit (Ping timeout: 240 seconds)
18:06:12*yglukhov joined #nim
18:10:14*Matthias247 joined #nim
18:12:31*Sentreen joined #nim
18:21:00*noethics joined #nim
18:23:11dom96hey guys
18:25:03*yglukhov quit (Remote host closed the connection)
18:26:11*yglukhov joined #nim
18:29:39Tiberiumdom96, hi!
18:30:03Tiberiumdom96, there are new nim users with after new nim release :)
18:30:12Tiberiummaybe you should do releases every month? :D
18:30:45skrylaryou know you are in trouble when you're using m4 to generate c code x.x
18:31:27dom96Would love to, but we don't really have enough time to do that.
18:31:55Tiberiumwow, nice thing from reddit - https://mixnose.com/nimhub/
18:35:58*yglukhov quit (Remote host closed the connection)
18:37:09*Tiberium quit (Remote host closed the connection)
18:40:16*Sentreen quit (Ping timeout: 268 seconds)
18:43:59*yglukhov joined #nim
18:51:22*yglukhov quit (Remote host closed the connection)
18:53:25*Sentreen joined #nim
19:19:35*Sentreen quit (Ping timeout: 240 seconds)
19:25:25*enthus1ast quit (Remote host closed the connection)
19:25:56*Arrrr quit (Read error: Connection reset by peer)
19:26:08FromGitter<GULPF> what's the intended difference between methods named `newXXX` and `initXXX`in the standard library? it looks inconsistent
19:27:49*adeohluwa joined #nim
19:30:45subsetparkone is values, the other is references to values
19:31:38subsetparkeg newTable makes a ref table, inittable makes a normal table
19:32:17subsetparkunfortunately i think newSeq is a violation of this principle
19:32:25*Sentreen joined #nim
19:32:38*nsf joined #nim
19:34:04FromGitter<GULPF> there's more violations, which makes it confusing. e.g the lists module uses both newXXX and initXXX, both returning refs
19:35:00FromGitter<GULPF> in system there's also newString, returning non-ref
19:37:02FromGitter<GULPF> and it gets worse because there doesn't seem to be a consensus on how to name ref types. e.g in the tables module the format `Type` and `TypeRef` is used, but in the lists module `Type` and `TypeObj`is used
19:37:52FromGitter<ephja> it's part of a convention that states that the primary type should not have a suffix
19:40:56FromGitter<GULPF> hmm, I guess that makes sense. It mostly becomes a problem for modules like tables, where both ref and non-ref is useful
19:45:07FromGitter<stisa> there's this https://nim-lang.org/docs/nep1.html that has some guidelines, also I think strings and seqs are ref types, so `newT` is correct
19:48:09FromGitter<GULPF> they are? but they copy-on-assign? maybe I don't understand the difference between ref/non-ref
19:48:17*coopernurse joined #nim
19:50:49FromGitter<GULPF> thanks for the link :) the difference between init/new should be added to that as well
19:50:58*Sentreen quit (Ping timeout: 260 seconds)
19:50:59FromGitter<stisa> they are ref types with value semantics, if I remember correctly. Ref types are the ones managed by the gc
19:56:50FromGitter<GULPF> I feel like even if strings/seqs are refs, but it isn't visible to the user (because they have value semantics), then the method names becomes confusing anyway :/ I'll probably get used to it though
20:00:59gokrdom96: Something weird happened with this thread: https://forum.nim-lang.org/t/2959/2
20:01:24gokrI can't seem to click to the third page in the thread, I don't think there is a 3rd page either.
20:02:28*Sentreen joined #nim
20:02:40*enthus1ast joined #nim
20:08:28*PMunch joined #nim
20:10:35*abruanese joined #nim
20:10:55PMunchhttps://www.reddit.com/r/nim/comments/6bsmdo/version_0170_released/
20:11:11PMunchAny comments to bruce?
20:12:08PMunchI'm guessing "Not sure but we're getting there?"
20:13:02*Trioxin joined #nim
20:23:49*Sentreen quit (Ping timeout: 246 seconds)
20:24:01*noethics quit (Remote host closed the connection)
20:25:11FromGitter<Varriount> @gokr If I had to guess, I'd say that someone made a post that made it onto the third page, but deleted it.
20:26:05gokrMmm, I made my post but... right when I hit publish, I got the 403 page or whatever it was. So I thought I had failed posting, but I hadn't.
20:29:27*noethics joined #nim
20:35:21*BennyElg joined #nim
20:36:47*Sentreen joined #nim
20:46:12*nightmared quit (Ping timeout: 245 seconds)
20:47:51PMunchHmm, on the nim-lang install page it says "sh build.sh" on a normal Linux install it would be "sh ./build.sh"
20:49:49*nightmared joined #nim
20:50:31dom96PMunch: pretty sure both will work
20:50:41PMunchNope
20:50:43dom96gokr: one of the users was moderated, should be fixed now.
20:50:47PMunchNot on a regular setup
20:50:58dom96what's a regular setup?
20:51:15PMunchYou could customise it to add . to your path but without it (like most, if not all Linux distros) it won't work
20:54:32dom96I'm pretty sure that `sh` will expand filenames automatically.
20:55:02PMunchHuh, apparently it does
20:55:05PMunchThat's weird
20:58:49couven92PMunch, not really that weird is it? `sh filename` tells the OS to run sh (wherever in the PATH that might be) and pass filename as an argument to it... it's the up to `sh` to figure out what to do with filename
20:59:32couven92that's the same reason why running `sh filename` even works when filename is not marked as executable (I think)
20:59:48PMunchYeah I get that.
20:59:55couven92sh and the OS ELF are not the same thing
21:00:08couven92s/ELF/ELF loader
21:02:38*bjz joined #nim
21:07:59PMunchHmm, when using the mysql module. What's the best way to keep the connection open?
21:11:03*Trustable joined #nim
21:12:02demi-PMunch: it should work, i guess it depends on what your `sh` is and how it resolves file paths
21:12:14PMunchYeah, I realised I was wrong :P
21:13:48*Vladar quit (Quit: Leaving)
21:15:40*Sentreen quit (Ping timeout: 268 seconds)
21:16:11demi-what you said wasn't wrong
21:16:40demi-it just depends on what `sh` is, sometimes it is bash, sometimes it is dash
21:19:14PMunchFair point
21:19:20PMunchBut I did say for most Linux distros
21:19:25PMunchWhich is probably false
21:28:43*Sentreen joined #nim
21:33:28FromGitter<zacharycarter> fixed all the flying around randomly issues : http://imgur.com/a/cPh6E
21:50:53*Neomex joined #nim
21:51:11Neomexdid anyone use nim for game engine dev?
21:51:12*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:51:58*Neomex quit (Quit: Leaving)
21:52:38*Neomex joined #nim
21:53:07PMunchYes
21:53:14PMunchNeomex, have you seen frag?
21:53:22Neomexnop, link pls?
21:53:31PMunchIt's on the nim-lang front page :P
21:53:44Neomexright... riiiight, one sec then :)
21:54:02PMunchhttp://fragworks.io/
21:54:39PMunchThere's also Unreal Engine 4 integration for Nim
21:54:43PMunchhttps://github.com/pragmagic/nimue4
21:55:27PMunchI've also created a game library: https://github.com/PMunch/SDLGamelib
21:56:01PMunchIt's not meant to be a framework but rather a set of loose modules you could drop into your game or even create a game from scratch with
21:56:50Neomexhow come nim is fast with gc?
21:57:01PMunchWhat do you mean?
21:57:06*Trustable quit (Remote host closed the connection)
21:57:24Neomexgarbage collection
21:57:51couven92Neomex, GC does not necessarily mean slowness! :P
21:57:52PMunchI know what GC is short for..
21:58:09libmanhttps://www.reddit.com/r/programming/comments/6cja23/real_world_nim_adventures_medium_blog_platform/
21:58:21Neomexit did mean that with every lang so far
21:58:22Neomex:s
21:59:07PMunchNeomex, another benefit with the Nim GC is that it's controllable
21:59:55libmanI don't see why GC can't eventually become 100% concurrent and delay-free.
22:00:01couven92Neomex, evrything is relaitive... You can do high-performance stuff in languages like C# nad Java, too... and they're not far behind optimized C/C++ implementations
22:00:16PMunchAnd you can turn it off if you want to
22:00:49couven92For that matter, you can do high-perf stuff in Python or Node.js too if you know what you're doing...
22:01:06PMunchYou can also set it to 60FPS and then spend the rest of the time of the "frame" doing GC
22:01:17PMunchSo you don't get "hiccups" like in eg. Java
22:01:30Neomexwell, im looking for a language for 3d game engine dev other than c++
22:01:33PMunchcouven92, high-perfish
22:01:40Neomexcurrently im stuck between rust and nim
22:01:48*couven92 does NOT know what he is doing and couldn't do high-perf stuff if it was staring me right in the face :P
22:01:57libmanYou should be stuck between Nim and Dlang. ;)
22:02:13Neomexi have PTSD from D's compilers
22:02:31Neomexit might have changed by now though
22:02:38couven92Neomex, you should be stuck on Nim, period! :P It's a really beautiful language! :D
22:03:08*dddddd joined #nim
22:03:15couven92(just kidding) ;)
22:04:05couven92BTW. PMunch we have to conjure up a Nim presentation for UiT! Looking really forward to it! :)
22:04:15libmanNim is the Metric System of programming languages.
22:04:23PMunchYeah, but didn't they push it until after summer?
22:04:45couven92libman, does that mean we exclude the british and Americans?
22:04:45PMunchWhen using "nim doc" is there a way to generate for all files in a folder?
22:05:01couven92PMunch, `nim doc2 --project`
22:05:12PMunchThey aren't imported into one file
22:05:21couven92and create a bundling project file that includes everything
22:05:49libmancouven92: I meant that in 250 years everyone will be using it. :P
22:05:51couven92PMunch, like this f.ex.: https://github.com/couven92/nim-windowssdk/blob/master/src/windowssdk.nim
22:06:09Neomexbtw, are there vulkan bindings?
22:06:19libmanhttps://en.wikipedia.org/wiki/History_of_the_metric_system
22:06:20couven92libman, horray for SI standards! :D
22:06:32PMunchcouven92, it means that they exclude themselves..
22:06:46PMunchhttps://github.com/nimious/vulkan
22:07:10couven92PMunch, then you probably need to run it multiple times... create a nakefile
22:07:23couven92isn't that a thing? nake?
22:07:30PMunchYeah, that's a thing :P
22:07:41Neomexim not sure if im not getting into something stupid again
22:07:57Neomexi should just stick with c++ and shoot heroin whenever i see header file
22:08:32couven92PMunch, if you look in the .vscode folder, you see my nimble task for documenting everything... It quite nice actually... even deals with recursive sub-directories
22:09:00couven92PMunch, like here: https://github.com/couven92/nim-windowssdk/blob/master/.vscode/tasks.json#L58
22:09:29couven92PMunch, ah sry, here I mean: https://github.com/couven92/nim-windowssdk/blob/master/windowssdk.nimble#L26
22:09:33PMunchNeomex, I think you'll like it here :)
22:10:15PMunchcouven92, I'll just do "for X in *; do nim doc $X ; done" for now
22:10:26Neomexhow using C/C++ libs looks like in nim?
22:10:44couven92Neomex, importc pragma...
22:11:07couven92quite simple really... you can use c2nim tool to convert C code and headers to nim
22:11:34couven92start with a simple C file you have lying around and try it... :)
22:12:18libmanI had an old `nimdoc` shell script - https://github.com/lbmn/crap/blob/master/sh/nimdoc.sh
22:13:02couven92libman, what do you think about my task? https://github.com/couven92/nim-windowssdk/blob/master/windowssdk.nimble#L26
22:13:19libmanNow I'm debating if I should use Nim-style camel casing for shell commands, like `nimDoc`.
22:30:19Trioxinwhich module is await in?
22:31:53Trioxinor maybe I'm just doing it wrong? var ret1 = await client.postContent(
22:37:14dom96Trioxin: 'await' is only available in async procs
22:37:19*adeohluwa quit (Quit: Connection closed for inactivity)
22:40:28Trioxindom96, this doesn't work either: discard await client.getContent("http://speedtest-ams2.digitalocean.com/100mb.test")
22:40:35Trioxinundeclared identifier: 'await
22:40:42Trioxinanother mistake in httpclient docs?
22:42:07dom96Like I said, it needs to be in an async procedure.
22:42:55Neomexhow do you see nim longevity and why it isnt mentioned anywhere?
22:43:07dom96not all examples can just be copy pasted into a file and compiled.
22:43:26dom96of course a note about this wouldn't hurt (and a better error message when 'await' is used outside an async proc)
22:44:04dom96Neomex: Nim has been around for a while and this should prove its longevity.
22:45:28Trioxinso you can't use getContent or postContent with async?
22:46:35dom96Trioxin: proc main() {.async.} = <insert_code_here>
22:46:57dom96You can, it just needs to be wrapped in an async procedure.
22:47:01*brson joined #nim
22:47:07Trioxino
22:53:38libmanNim namedrop of the day: nerdfight between BSD nerds who hate Rust vs those who hate ZFS licensing more - https://www.reddit.com/r/BSD/comments/6cioka/any_interest_in_porting_tfs_the_new_zfs_clone_in/
22:53:40*Nobabs27 joined #nim
22:53:43libman(mentioned here mostly for Schadenfreude and comic relief)
22:54:59Trioxinwhat to put a callback on to return content?
22:58:37Trioxinthese docs drive me crazy
23:03:38*brson quit (Quit: leaving)
23:11:05*gokr quit (Ping timeout: 255 seconds)
23:14:15*vlad1777d quit (Remote host closed the connection)
23:20:51*Matthias247 quit (Read error: Connection reset by peer)
23:26:16*ftsf_ joined #nim
23:41:47*nsf quit (Quit: WeeChat 1.7.1)
23:43:03*arnetheduck_ joined #nim