<< 24-06-2019 >>

00:08:24*laaron quit (Remote host closed the connection)
00:10:21*laaron joined #nim
00:55:59*laaron quit (Remote host closed the connection)
00:58:27*laaron joined #nim
01:07:43*dddddd quit (Read error: Connection reset by peer)
04:14:30*Tanger joined #nim
04:18:27*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:25:01vegai_isn't that like telling people never to reference null pointers
04:31:52*nsf joined #nim
04:51:18*theelous3 quit (Ping timeout: 245 seconds)
04:55:45*theelous3_ joined #nim
05:13:58*leorize quit (Quit: WeeChat 2.3)
05:17:50*narimiran joined #nim
05:56:22*neceve joined #nim
05:57:02*leorize joined #nim
06:00:28*neceve quit (Client Quit)
06:00:55*neceve joined #nim
06:07:27*PMunch joined #nim
06:08:31*deansher_ joined #nim
06:08:55*d10n-work_ joined #nim
06:09:43*federico3_ joined #nim
06:11:40*golechwi1 joined #nim
06:14:18*MasterdonY joined #nim
06:14:30*vqrs_ joined #nim
06:15:30*leorize quit (*.net *.split)
06:15:30*laaron quit (*.net *.split)
06:15:51*d10n-work quit (*.net *.split)
06:15:53*macsek1911[m] quit (*.net *.split)
06:16:07*Demos[m] quit (*.net *.split)
06:16:07*GitterIntegrati4 quit (*.net *.split)
06:16:07*deansher quit (*.net *.split)
06:16:07*golechwi quit (*.net *.split)
06:16:07*vqrs quit (*.net *.split)
06:16:07*masterdonx quit (*.net *.split)
06:16:07*federico3 quit (*.net *.split)
06:16:07*d10n-work_ is now known as d10n-work
06:16:07*deansher_ is now known as deansher
06:18:46*envoyt quit (Ping timeout: 272 seconds)
06:20:34*solitudesf joined #nim
06:22:41*GitterIntegrati4 joined #nim
06:24:30*macsek1911[m] joined #nim
06:25:03*Demos[m] joined #nim
06:29:22*ZombieByte joined #nim
06:30:15*envoyt joined #nim
06:49:12*envoyt quit (Ping timeout: 245 seconds)
06:50:33*envoyt joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:37*gmpreussner joined #nim
07:06:14*Trustable joined #nim
07:15:44*krux02 joined #nim
07:19:56*Mister_Magister quit (Quit: bye)
07:20:57*alexander92 joined #nim
07:24:25*tjmac joined #nim
07:24:25*Mister_Magister joined #nim
07:27:14alexander92#red back then if there are still available part-time nim positions/projects, i guess probably not, but i wanted to make sure before assigning myself to other part-time gigs
07:27:29alexander92ops wrong chat
07:27:41alexander92i am really bad with irc indeed :P
07:28:01*Lea-kitty joined #nim
07:28:06Zevvit's just like mammoth hunting and making fire
07:28:10Lea-kittyHello everybody :)
07:28:31*nolanv quit (Read error: Connection reset by peer)
07:28:37alexander92 I wondered back then if there are still available part-time nim positions/projects, i guess probably not, but i wanted to make sure before assigning myself to other part-time gigs
07:33:47*nolanv joined #nim
07:34:34alexander92oh man irc is tragically hard for me
07:36:26*dwdv joined #nim
07:41:06tjmacHi Lea-kitty
07:41:46tjmacalexander92, the magic is in the interface; if this one doesn't work for you try another
07:43:37Lea-kitty:)
07:52:00*vlad1777d__ quit (Ping timeout: 248 seconds)
07:56:32alexander92sounds reasonable, or just write another one yourself :P
07:56:47alexander92then decide you want a better protocol, and write your own chat protocol
07:57:27alexander92and finally write your own network stack :P
07:57:47livcdWrite your own IRC client..sounds like a fun project :)
07:57:59*Vladar joined #nim
07:58:43alexander92i think dom96 was writing one before
07:58:52alexander92it seems as a popular hobby
08:00:40livcdThere is this little irc client in Go that uses winapi for gui. It's kinda cute
08:03:26PMunchYeah IRC is fairly simple, so writing your own client isn't rocket science :)
08:03:50PMunchWhich means you have the possibility to do only the fun parts of creating your own thing :)
08:04:29livcdhttps://github.com/dayvonjersen/chopsuey
08:05:11FromGitter<rokups> there seems to be just about anything written in go or rust. i dont understand it
08:05:47FromGitter<mratsim> Are there GUI toolkit in go or Rust?
08:06:25livcdyeah
08:06:25tjmacWhat I'd love to see is a proper xmpp client written in nim; maybe I'll tackle it myself some day
08:06:37leorize[m]go and rust are the popular langs atm, so not too surprised that there're a lot of stuff for them
08:07:04livcdthere are just not anything really usable or mature that is cross platform
08:15:52alexander92yeah i often
08:21:18FromGitter<arnetheduck> I guess creating a gui toolkit is hard because at the other end, you have lots of normal humans to deal with, not just yourself and your fellow likeminded devs ;)
08:25:35*alexander92 quit (Quit: WeeChat 2.4)
08:28:58*envoyt quit (Ping timeout: 268 seconds)
08:29:48FromGitter<rokups> xmpp did not get up to date with times. i would rather see matrix happen. but then again c version can be wrapped instead
08:29:59*envoyt joined #nim
08:30:02FromGitter<rokups> Qt wrapper would be a killer feature
08:30:50livcdthere's already a Qt wrapper is not there ?
08:31:29FromGitter<rokups> a while back someone was working on "QML wrapper" which sounded like something very incomplete
08:31:42FromGitter<rokups> no idea where that went or if there is anything else available
08:32:07FromGitter<mratsim> Matrix core devs actually know about Nim
08:33:04*floppydh joined #nim
08:36:14FromGitter<mratsim> @arnetheduck so the not nil annotation I started to use for example here https://github.com/mratsim/hydra/blob/master/hydra/ilp/presburger_map.nim#L119-L120 will be removed by your PR #11570?
08:38:20FromGitter<rokups> i only wish they found out about native software. electron chat client for desktop is a sad story
08:39:26FromGitter<mratsim> Well I don't really like electron with regards to resource consumption but from a time-to-market point of view it makes sense
08:39:51tjmacrokups, indeed
08:40:13FromGitter<mratsim> Finding designers familiar with HTML/CSS is easy for example, they can have the same people on mobile and desktop
08:40:44FromGitter<mratsim> If they want extensions, it's much easier than using DLLs as well
08:40:45FromGitter<rokups> UX of all those electron apps is terrible as well. you can always feel that you care browsing a damn webpage. some are better than others, but most are terrible
08:40:55FromGitter<rokups> riot is one of terrible ones
08:41:25FromGitter<mratsim> yes but many plain GTK/QT apps are actually worse
08:41:33FromGitter<rokups> riot iOS, riot android and riot desktop are totally different codebases by the way
08:41:40leorize[m]use the weechat client
08:41:44FromGitter<rokups> idk plain Qt is awesome
08:42:30FromGitter<rokups> look at telegram. their client is pretty damn good. its Qt
08:43:22FromGitter<mratsim> WHat I'm saying is that it's harder to find designers familiar in QT/GTK compared to HTML/CSS
08:43:38leorize[m]there are people who write native Qt?
08:43:59leorize[m]I heard that the API is terrible compared to QML
08:44:13FromGitter<mratsim> QML is quite recent though
08:44:27FromGitter<mratsim> plenty of codebase have a lot of legacy code
08:45:12FromGitter<rokups> what you are saying its harder to find decent engineers than mediocre to bad ones. but that is a very bad argument to go with subpar decisions for your software
08:45:36FromGitter<arnetheduck> @mratsim no, `not nil` at compile time is not removed.. all that's removed is the partial runtime detection of nil dereference
08:45:46FromGitter<mratsim> oh ok
08:46:13FromGitter<mratsim> @rokups, when people are expecting your software in 3 months, it's very relevant
08:46:47FromGitter<mratsim> and just because you choose to develop your skills in [insert framework] doesn't mean you're bad
08:46:48*abm joined #nim
08:47:04FromGitter<rokups> yeah they get 💩 in 3 months. software development is not hole digging
08:47:36FromGitter<rokups> no ofc not. but if result is bad then naturally people start questioning both skills and frameworks
08:52:07Araqall that I can contribute to this is the following thought: "it uses native widgets" is a programmer way of thinking. For far more applications it's important to look "different and shiny"
08:52:14FromDiscord_<djazz> Qt is nice, but sometimes looks terrible with bad theming heh
08:52:50Araqboth Qt and GTK can be themed though so it doesn't really apply
08:53:04FromDiscord_<djazz> wxWidgets seems like a nice cross platform ui toolkit, which use native gui of each platform
08:53:23FromDiscord_<djazz> Win32, Cocoa, GTK3
08:53:23Araq^ that's also a downside.
08:53:50FromGitter<mratsim> we're still waiting for PMunch genui :P
08:54:09FromGitter<rokups> Araq "it uses native widgets" basically means "its snappy and there are no incomplete frames"
08:54:24FromGitter<rokups> is it so much to ask in year 2019
08:54:51FromGitter<rokups> vscode does a fair job pretending it is not a browser. but that is an exception, not a rule unfortunately
08:55:05Araqbut "native widgets" also means "you are not in control".
08:55:17FromDiscord_<djazz> I have worked with Electron. Its cool, but I dont like how heavy it is
08:55:26FromDiscord_<djazz> I am a web dev
08:55:28Araqcan't theme it, can't make it behave identical across OSes
08:55:56Araqplus the "native" APIs keep changing
08:56:21Araqit's like the native offerings do not want to be used :P
08:56:30*tribly quit (Remote host closed the connection)
08:56:37FromDiscord_<djazz> I want to know how the gui of Playnite was made (made with C#) is it native windows ui? https://playnite.link/screen3.jpg
08:57:05FromGitter<rokups> what do you mean not in control? i guess it is fair to say that nobody gives a rat's ass about platform-native widgets. but everyone wants speed of native code whatever toolkit is used. and toolkits usually provide more than enough means to write custom widgets if need arises
08:57:10FromDiscord_<djazz> Playnite is open src, but I havent looked into it much
08:57:27*tribly joined #nim
08:57:28PMunchmratsim, yeah, I have some plans for that still..
08:57:34PMunchJust need to find the time to do it
08:59:10FromGitter<mratsim> Interesting RFC in pony on removing traits from the language: https://github.com/ponylang/rfcs/pull/138
08:59:27FromGitter<mratsim> (but they have interfaces)
09:01:39*fredrik92 is now known as couven92
09:11:22dwdvTheir interfaces are essentially traits. Check the comments below, they want to keep the name.
09:33:43*floppydh quit (Quit: WeeChat 2.5)
09:38:58livcdrokups: that's WPF is not it ?
09:39:39livcdrokups: sorry meant djazz
09:44:17FromDiscord_<djazz> idk WPF
09:44:53FromDiscord_<djazz> would be nice if something like that was crossplatform
09:47:49AraqWindows Forms was superior
09:55:14*floppydh joined #nim
10:02:50*dwdv quit (Quit: quit)
10:08:32*dddddd joined #nim
10:13:05dom96Windows Forms are the best
10:26:19*Lea-kitty quit (Ping timeout: 260 seconds)
10:31:28FromDiscord_<djazz> just crosscompiled a little program with -d:mingw, works great 😄
10:31:39FromDiscord_<djazz> it's linking in a dll i also built with mingw
10:31:55FromDiscord_<djazz> only tried it in wine, but should work in windows too
10:33:41PMunchdjazz, I was surprised the first time I cross-compiled with Nim, how easy it was
10:34:04FromDiscord_<djazz> the mingw define only sets the gcc/ld exes but it just works!
10:37:59FromDiscord_<djazz> woo, managed to statically link the dll.a
10:38:00FromDiscord_<djazz> neat
10:38:04*gmpreussner quit (Ping timeout: 244 seconds)
10:38:58*gmpreussner joined #nim
10:39:09FromDiscord_<djazz> `{.passL: "-Wl,-Bstatic -l" & libname & " -lole32".}`
10:39:14*shashlick_ joined #nim
10:39:37*shashlick quit (Ping timeout: 244 seconds)
10:39:44FromDiscord_<djazz> ole32 was required by the library
10:41:10*Jesin quit (Ping timeout: 244 seconds)
10:45:25*Jesin joined #nim
10:54:25*federico3_ is now known as federico3
10:56:07*stefanos82 joined #nim
11:24:43*vlad1777d__ joined #nim
11:27:39*Trustable quit (Remote host closed the connection)
11:36:24*AndChat|624225 joined #nim
11:37:57*envoyt quit (Ping timeout: 245 seconds)
11:46:57Calinouthat's what I did to cross-compile a binary here, not sure if it can be simplified: https://github.com/Calinou/clr/blob/master/src/clr.nims
11:48:55FromDiscord_<djazz> That looks almost exactly what -d:mingw does
11:57:53FromGitter<rokups> lol https://christine.website/blog/v-vaporware-2019-06-23
12:07:06Calinouis -d:mingw built into Nim?
12:07:20Calinouif so, I guess I can drop my own -d:crosswin then :P
12:08:59FromGitter<rokups> probably not (based on `grep -i mingw` results)
12:10:05FromDiscord_<djazz> It is
12:10:45FromDiscord_<djazz> https://github.com/nim-lang/Nim/blob/721534119000c2bd53cc72b531726a6104381222/config/nim.cfg#L85
12:11:29Calinouyeah, as of https://github.com/nim-lang/Nim/pull/9485
12:11:30Calinounice :)
12:12:52*stefanos82 quit (Quit: Quitting for now...)
12:14:37*fredrik92 joined #nim
12:14:52*couven92 quit (Disconnected by services)
12:14:56*fredrik92 is now known as couven92
12:20:44FromDiscord_<djazz> to set the rpath, `\\` is required to escape $ORIGIN. `{.passL: "-Wl,-rpath,\\$ORIGIN/lib".}`
12:22:08FromDiscord_<djazz> it works with both `-lsomelib` and `dynlib: "somelib.so"`
12:22:34FromDiscord_<djazz> on windows, the dlls have to be in PATH
12:22:45FromDiscord_<djazz> on windows, the dlls have to be in current dir or in PATH
12:24:10FromDiscord_<djazz> it works with both `-lsomelib` and `dynlib: "libsomelib.so"`
12:24:14*fredrik92 joined #nim
12:24:19*coffeeturtle joined #nim
12:26:30*coffeeturtle quit (Remote host closed the connection)
12:27:58*couven92 quit (Ping timeout: 245 seconds)
12:28:11Calinoumy compiled binaries still rely on libpcre and OpenSSL dynamically, not sure what would be the easiest way to build them statically
12:28:35Calinou(libpcre is due to using the docopt library, cligen doesn't require it, so I could switch to that one)
12:30:19FromDiscord_<djazz> for windows?
12:30:50FromGitter<rokups> hah nice (and my bad)
12:31:41vegai_I was wondering how a multithreaded DB pool might work on nim
12:32:24vegai_each thread having its own heap makes a traditional design of "shared stuff in heap protected by locks" impossible, no?
12:32:48FromGitter<mratsim> you can still use pointer to shared memory
12:32:53Calinou@djazz It does so on all platforms, but linking statically is most important on Windows here
12:32:56FromGitter<mratsim> just allocate the memory with allocShared
12:33:06vegai_mratsim: ah, okay, thanks. I'll check that out
12:33:28vegai_mratsim: I guess it's not my mistake when I didn't find this in the manual? :)
12:33:46FromGitter<mratsim> also if you look into the code source of the SharedTable module you will see examples using locks
12:34:04FromGitter<mratsim> allocShared is in system.nim documentation
12:34:26FromGitter<mratsim> and the manual has a couple of locks example
12:34:27FromGitter<mratsim> https://nim-lang.org/docs/sharedtables.html
12:34:39vegai_right
12:34:40*Snircle joined #nim
12:34:45vegai_I was looking under the Threading chapter
12:35:10FromGitter<mratsim> see for example: https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/sharedtables.nim#L206-L208
12:35:48FromDiscord_<djazz> how to set RUNPATH instead of RPATH: `{.passL: "-Wl,-rpath=\\$ORIGIN/lib,--enable-new-dtags".}`
12:36:01FromDiscord_<djazz> RUNPATH can be overridden by LD_LIBRARY_PATH
12:36:06FromDiscord_<djazz> while RPATH can't
12:38:23*fredrik92 is now known as couven92
12:41:37FromDiscord_<djazz> it's neat during development, no need to install 3rd party libs globally
12:41:55FromDiscord_<djazz> and when bundling exe + libs together
12:46:11Cadeywhat c compiler flag is it?
12:47:14*solitudesf quit (Ping timeout: 244 seconds)
12:48:21*hoijui joined #nim
12:49:52FromDiscord_<djazz> to build 32-bit on 64-bit machine: `-t:-m32 -l:-m32 --cpu:i386`
12:50:13Cadeyno i mean to set RUNPATH
12:50:24FromDiscord_<djazz> a 32 bit vm/container is probably recommended
12:54:57Calinouin my experience, building 32-bit Windows from 64-bit Linux is easy peasy, but 32-bit Linux from 64-bit Linux is much more difficult without a VM/container
12:55:04Calinou(systemd-nspawn can do it if you don't want Docker)
12:56:06*clyybber joined #nim
12:57:12Araqlol
12:59:38Calinou#JustLinuxThings :P
13:00:12clyybbermeanwhile canonical "helps
13:00:40clyybber" by just deprecating 32bit libraries
13:02:14*natrys joined #nim
13:02:59FromGitter<rokups> they backpedaled a bit, claiming that now they will stop releasing updates for 32bit libs, freezing them at version that was in 18.04. which is even crazier than dropping them altogether. they smoke a good shit there
13:03:19clyybberyeah
13:12:32*hoijui quit (Quit: Leaving)
13:13:29Calinouthat's how you make open source games popular again, I guess :P
13:13:30*Calinou hides
13:14:34FromGitter<rokups> better luck finding a yeti rather than a great opensource game
13:14:52*sagax quit (Ping timeout: 272 seconds)
13:15:20*sagax joined #nim
13:15:35clyybberrokups: CDDA would like to have a word with you
13:16:17FromGitter<mratsim> Yeti sports was good :p
13:16:34FromGitter<rokups> whats that? im into games very much, but since i asked you this question it kind of proves how great that game is
13:16:42FromGitter<rokups> if it was so great it would be well-known
13:17:07FromGitter<mratsim> Yeti sports? It was probably the top flash games 15 years ago
13:17:13FromGitter<rokups> CDDA :p
13:17:13FromGitter<mratsim> and number 1 time waster
13:17:15FromGitter<mratsim> oh
13:17:35lqdev[m]rokups: Mindustry is an amazing open-source game
13:18:51FromGitter<rokups> i dont mean to claim that opensource games arent enjoyable. some people definitely enjoy them. but i havent seen an opensource game that would be widely popular. no wonder, because developing a game is long, hard and expensive process
13:19:29FromGitter<rokups> but thats besides the point.... people dont want "some game". people want "that game", and if "that game" does not run on linux then in eyes of people linux sucks
13:19:57FromGitter<rokups> no amount of opensource games will make up for battlefield not running on our beloved penguin :|
13:20:13Calinouheh, I could never really stand Battlefield and similar games
13:20:16FromGitter<mratsim> Lutris and all the DirectX to Vulkan stuff + FAudio are very good at the moment
13:22:42FromGitter<rokups> wine is very hit and miss. and very much miss when it comes to titles with anticheats or titles that are tied into crazy launchers and what not..
13:23:35Calinouit works pretty well here, but I don't play the latest hip games, which helps
13:24:43FromGitter<rokups> exactly. but we are a special kind. that wont fly that well for average home user
13:26:51Calinouthere's no such thing as an average user :)
13:30:46clyybberrokups: Popularity doesn't always correlate to quality/fun
13:31:21clyybberIt's just that those AAA studios have big marketing campaigns, while nearly all open source games dont do any marketing at all
13:31:54clyybber"hidden gems"
13:32:05FromGitter<rokups> also opensource games look like crap simply because of amount of money that went into visuals
13:32:49FromGitter<rokups> and quite often they look like crap because of lack of consistent visual style and polish, all because this stuff takes time and people are not paid to spend many hours on it
13:32:57clyybberrokups: well, can't fight you on this one, but CDDA for example has a pretty cool (and consistent!) look with the retrodays tileset
13:33:44FromGitter<rokups> AAA titles will boost linux, not retro games :p
13:34:11clyybberat what point does a game count as a retro game?
13:35:20clyybberCDDA is (insanely) actively developed; look at those stats: https://github.com/CleverRaven/Cataclysm-DDA/pulse/monthly
13:37:22FromGitter<rokups> pixel art is a huge give-away. im yet to see a screenshot of CDDA. they arent to be found on game's website. that does not give a good first impression
13:38:40FromGitter<rokups> this seems to be a VERY niche game. nothing wrong with that, but you should not be surprised when people wave it away :]
13:41:05*djazz joined #nim
13:41:10clyybberI am not surprised when people wave it away, it certainly isn't for everyone, but as you can see battlefield isn't for everyone either
13:43:58Araq=move?
13:44:00clyybberto me many modern AAA fps feel like a one-armed-bandit hiding in beauty
13:44:04clyybberAraq: Just rebased
13:44:19Araqdid you see my "const seq" fix?
13:44:22clyybberAraq: Yep
13:44:27Araqthat's how it should be done IMO.
13:45:17Calinoua lot of people play only or mostly niche games
13:45:37CalinouI remember when I almost exclusively played Minecraft in 2011 :P
13:46:03clyybber"niche game"
13:46:34Calinounowadays, it might be considered a niche game by some
13:46:57clyybberyeah, all the kiddies now play fortnite
13:48:18clyybberwhich I think was a majority of minecrafts player base
13:51:36lqdev[m]I play indie games because I find modern AAA titles very repetitive. every AAA has to have an open world, lots of violence, and super realistic graphics that run well only on high-end hardware. almost no AAA focuses on revolutionary gameplay and mechanics. meanwhile, indie games offer tons of variety in terms of art style and gameplay, and that's what I love about them :)
13:54:41lqdev[m]the only exception in the AAA world is Nintendo, they always provide colorful, original experiences
13:54:44FromDiscord_<djazz> Yeah DXVK and Steam's Proton is quite awesome.
13:55:00*djazz quit (Quit: djazz)
13:55:35FromDiscord_<djazz> and Lutris makes it easy for non-Steam games
13:56:06FromGitter<rokups> you arent wrong about AAA stuff. ok lets look at indies. Subnautica is fantastic. we will also never see anything like that opensource
13:56:14FromGitter<rokups> for same reasons i listed already
13:57:24Calinoumost AAAs I play are 15-20 years old if not more :p
13:57:53FromDiscord_<djazz> I'm a Linux gamer, so I play what I can.
13:57:56lqdev[m]yeah older AAA games are also good, see Portal and Portal 2
13:58:05CalinouI mean, I started Half-Life 2 Episode One last week
13:58:28Calinouhttps://www.xkcd.com/606/ factor 3 :P
13:58:49lqdev[m]djazz: I'm a Linux gamer too, but because I mostly play indies I don't find that being a problem
13:59:05FromDiscord_<djazz> yeah
13:59:17Calinoufor what it's worth, I was gaming on Linux before Steam was a thing
13:59:17*nsf quit (Quit: WeeChat 2.4)
13:59:30FromDiscord_<djazz> Valve is pushing Linux gaming hard rn, I'm happy about that. Just check ProtonDB
13:59:43FromDiscord_<djazz> same here.
13:59:57FromDiscord_<djazz> I only got Steam cuz they launched TF2 beta for Linux
14:01:14FromDiscord_<djazz> @Calinou hah, spotted you x) https://github.com/AppImage/AppImageKit/issues/963#issuecomment-495794805
14:01:42Calinou:)
14:02:07FromDiscord_<djazz> Looking through exodus' inner working rn, it's pretty interesting.
14:02:22FromDiscord_<djazz> I might steal some of it for my scan_libs.py script
14:02:28Calinouit's a really nice tool for the intended use case (moving binaries from your PC to a server with a different distro)
14:02:32Calinou(or vice versa, sometimes)
14:02:47FromDiscord_<djazz> it's bundling ld-linux.so entirely heh
14:02:59FromDiscord_<djazz> I didnt know that was supported
14:03:14FromDiscord_<djazz> i wonder how well something dynamic like sdl2 works with it
14:03:18*kapilp left #nim (#nim)
14:03:38FromDiscord_<djazz> it loads most things dynamically
14:05:02clyybberrokups: Btw 0ad doesn't look bad and is open source
14:05:17clyybberalso depending on your definition of open source
14:05:25clyybberevery unity game is open source
14:05:35FromDiscord_<djazz> heh
14:05:36Calinoumany open source games look pretty decent, though expecting modern AAA visuals is kind of unrealistic
14:05:39FromDiscord_<djazz> Xonotic is pretty fun open source game
14:05:46clyybberdjazz: Oh yeah
14:05:54CalinouI have low standards when it comes to graphics personally, I consider CS:GO's latest maps to be pretty good-looking for instance
14:06:02FromGitter<rokups> oh indeed it looks quite nice
14:06:04FromDiscord_<djazz> back in the day i played Tremolous, Urban Terror and OpenArena
14:06:10Calinouif you configure open source games right (because many of them have very poor defaults…), you can get roughly similar visuals
14:06:45clyybberevery unity game is open source in the sense that ILSpy gives you nearly the exact original code.
14:06:47FromDiscord_<djazz> the game im "porting" (rather recreating) to nim is open source (UltraStar Deluxe), karaoke game
14:07:03FromDiscord_<djazz> clyybber: works on monogame/FNA games too?
14:07:10Calinouthat's not open source per the Open Source Definition
14:07:14clyybberDidn't try it
14:07:21clyybberCalinou: Yeah
14:07:23Calinouobfuscation can hinder this too anyway
14:09:23clyybberYeah, but surprisingly I haven't found a unity game yet that obfuscated its source code.
14:09:23FromDiscord_<djazz> I need to make some sort of installer/updater/launcher for a game that's gui. With Nim, what would be some "good enough" gui package? My current version is built with _electron_ and i did try sdl2, although that eats some resources while running
14:09:30lqdev[m]djazz: it definitely works on Celeste, I was able to decompile it and lurk in its source code (but that was on Windows and it uses XNA here)
14:09:42Calinouas for SDL2, you should only redraw when required
14:09:53lqdev[m]more precisely, I was curious about its debug mode and its features
14:09:56FromDiscord_<djazz> yeah I was thinking of Celeste actually. Great game. I managed to extract the texture atlases heh
14:09:59Calinouif you redraw constantly, no wonder why it's going to use lots of resources :)
14:10:14FromDiscord_<djazz> yeah
14:10:34*AndChat|624225 quit (Read error: Connection reset by peer)
14:10:44lqdev[m]also, for GUIs you can use the `ui` package
14:10:47FromDiscord_<djazz> i dont want to implement my own button, text input handing, file picker though
14:11:05lqdev[m]it has almost everything you need
14:11:09FromDiscord_<djazz> is it cross platform?
14:11:19lqdev[m]yes
14:11:25*juanim joined #nim
14:11:29lqdev[m]it's a wrapper around libui
14:11:34FromDiscord_<djazz> I'll have a look thanks
14:11:49*envoyt joined #nim
14:12:05lqdev[m]if you want a pure Nim solution, there's also NiGui but I haven't used it much
14:12:19Calinoulibui isn't really stated to be production-ready though
14:12:31Calinouit may be sufficient for a minimal launcher still
14:12:39*juanim quit (Client Quit)
14:12:49FromDiscord_<djazz> hm, can it render basic html?
14:13:02FromDiscord_<djazz> need it to show a changelog
14:13:03lqdev[m]afaik no
14:13:28Calinoufrom a quick search, no
14:13:37Calinouthat's pretty difficult without bundling a WebView anyway
14:13:56Calinouif you need to show a formatted changelog, you'll need to convert it to a bespoke syntax (Markdown, BBcode…) then format it yourself
14:14:38FromDiscord_<djazz> hmm, guess I can try wxWidgets then
14:15:13Calinouyou could use Godot to create a launcher :P
14:15:15*Calinou hides
14:15:21FromDiscord_<djazz> ~~unity3d~~
14:15:24Calinouwe do have a RichTextLabel to display BBcode after all
14:15:35FromDiscord_<djazz> (:
14:15:51FromDiscord_<djazz> This is a launcher not a game
14:16:04Calinoumany people have released apps using Godot, like Wonderdraft
14:16:08Calinouhttps://www.wonderdraft.net/
14:16:10*envoyt quit (Ping timeout: 258 seconds)
14:17:09FromDiscord_<djazz> ah cool
14:17:22FromDiscord_<djazz> well, it's more graphical than what I need atm
14:17:29*clyybber quit (Quit: WeeChat 2.5)
14:19:06*envoyt joined #nim
14:20:27*ikan-keli_ quit (Ping timeout: 245 seconds)
14:21:01*ikan-keli_ joined #nim
14:22:34*clyybber joined #nim
14:23:49*laaron joined #nim
14:26:55shashlick_@Calinou: see nimpcre
14:27:53*clyybber quit (Quit: WeeChat 2.5)
14:27:57*envoyt quit (Ping timeout: 245 seconds)
14:28:18*envoyt joined #nim
14:28:26*narimiran quit (Ping timeout: 258 seconds)
14:28:29*clyybber joined #nim
14:35:48*stefanos82 joined #nim
14:41:53FromDiscord_<djazz> Calinou: here is what my scan_libs.py script outputs. I just ran this on my Arch machine, but this should be run on something with older glibc. Will try exodus for reals later though 😄
14:41:53FromDiscord_<djazz> https://cdn.discordapp.com/attachments/371759389889003532/592726085431590933/Screenshot_2019-06-24_16-40-55.png
14:42:11FromDiscord_<djazz> idk how embeds appear on irc, im guessing a discord link?
14:42:24Calinouyeah
14:42:53FromDiscord_<djazz> (system libs from libc etc are completely skipped)
15:08:00*PMunch quit (Remote host closed the connection)
16:00:20*laaron quit (Remote host closed the connection)
16:08:23*envoyt quit (Ping timeout: 268 seconds)
16:08:52*leorize joined #nim
16:09:58*neceve quit (Read error: Connection reset by peer)
16:12:40*solitudesf joined #nim
16:16:43*floppydh quit (Quit: WeeChat 2.5)
16:25:16*envoyt joined #nim
16:36:32*tjmac quit (Quit: -bye)
16:50:03FromGitter<brentp> with this docker file: https://github.com/brentp/slivar/blob/master/docker/Dockerfile#L25..L44 ⏎ and this nimgen setup: https://github.com/brentp/duktape-nim/blob/dev/duktape.cfg ⏎ ⏎ I am getting: ⏎ ... [https://gitter.im/nim-lang/Nim?at=5d10ff3bae76db56e03b89de]
16:50:18*laaron joined #nim
16:50:44FromGitter<brentp> how can I track down where this case error is occuring (@genotrance) ?
16:51:58FromGitter<brentp> I can get that error with simly: `nimble install -y --verbose https://github.com/brentp/duktape-nim@#dev`
16:52:29leorize@brentp: try installing the latest commit of c2nim
16:52:39FromGitter<daniel-j> try `--debug` instead of `--verbose` also
16:53:17FromGitter<daniel-j> yeah, c2nim likes to be at #head
16:53:22leorizeonly the latest commit of c2nim is compatible with nim 0.20 atm
16:54:12*envoyt quit (Ping timeout: 245 seconds)
16:54:34*envoyt joined #nim
16:54:53FromDiscord_<djazz> even though I compile my program with `-d:release --listFullPaths:off --excessiveStackTrace:off` I still see some references to `/home/djazz/.choosenim/toolchains/nim-0.20.0/lib/system/io.nim` etc..
16:54:53FromGitter<brentp> trying these now. thanks @daniel-j and @leorize
16:55:27FromDiscord_<djazz> is it possible to get rid of those from the final exe?
16:55:46leorize@djazz can you make a reproducible sample?
16:56:45FromDiscord_<djazz> `echo "hello world"` is enough
16:56:55FromDiscord_<djazz> `nim c -d:release --listFullPaths:off --excessiveStackTrace:off --opt:size test.nim`
16:57:12FromDiscord_<djazz> only included fatal.io path tho
16:57:47FromDiscord_<djazz> i am testing with `strings test | less`
16:57:58leorizeyea, I saw that
16:58:07leorizealright, I think I know where
16:58:31FromDiscord_<djazz> 😃
16:58:49FromDiscord_<djazz> fatal.nim *
16:58:56shashlick_Nimgen doesn't like c2nim head since it breaks enums or something
16:59:24FromDiscord_<djazz> give nimterop a try
16:59:34FromDiscord_<djazz> it parses C much better!
17:00:02*nsf joined #nim
17:00:34shashlick_https://github.com/nim-lang/c2nim/commit/be3e8b9ab81c25cc0cb10b1ae117da57f71560e3
17:02:02FromGitter<brentp> @shashlick, I think that's a different problem
17:02:41shashlick_Yes but that's why nimgen hard codes the c2nim dependency
17:03:03shashlick_So your best bet is to install nimgen on an older Nim so that you get an older c2nim
17:04:08*envoyt quit (Ping timeout: 272 seconds)
17:04:10leorize@djazz: I found the line that produced that path :p
17:04:14FromGitter<brentp> it's weird as my laptop has (AFAICT) all the same versions of nim,nimgen,c2nim but it has no problem. but the docker container does not like the same versions.
17:04:26FromDiscord_<djazz> @leorize: yay
17:04:29*envoyt joined #nim
17:04:31leorizelooks like it's a compiler bug, please file a bug report :p
17:07:35*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:11:17FromDiscord_<djazz> @leorize: what line? i can include it in the issue
17:12:01leorizehttps://github.com/nim-lang/Nim/blob/436f57065197bee86c9539b75de3a73e5bda3f10/lib/system/fatal.nim#L39
17:12:29leorizeyou can track it by adding --linedir:on --nimcache:cache to your compile flags
17:13:03leorizethen go to the cache folder and grep for that path
17:13:15FromDiscord_<djazz> aha
17:15:53*envoyt quit (Ping timeout: 245 seconds)
17:16:14*envoyt joined #nim
17:20:01FromDiscord_<djazz> my first bug report ^^ https://github.com/nim-lang/Nim/issues/11572 @leorize
17:21:20leorizehttps://irclogs.nim-lang.org/24-06-2019.html#17:04:10
17:21:23leorizelink the log :p
17:22:16FromDiscord_<djazz> ✅
17:28:08*Vladar quit (Remote host closed the connection)
17:37:04*Senketsu quit (Ping timeout: 272 seconds)
17:40:58*Jesin quit (Quit: Leaving)
17:44:19FromGitter<alehander42> is c2nim
17:44:22FromGitter<alehander42> using its own c parser
17:45:09FromGitter<alehander42> i mean it generates ast
17:45:12FromGitter<alehander42> but its nim ast
17:45:20FromGitter<alehander42> so i am not sure if it is a repr of the c AST
17:45:32FromGitter<alehander42> or directly the translated nim-ish version of the logic
17:49:23*junland joined #nim
17:50:12leorizeAraq: for https://github.com/nim-lang/Nim/issues/11545, should I make assert follow --listFullPaths or --excessiveStackTrace?
17:52:02*Jesin joined #nim
17:52:14Araquh hmm
17:52:28Araq --excessiveStackTrace
17:53:35leorizelol instantiationInfo's fullPaths param depends on both that param & --listFullPaths...
17:54:44leorizehttps://github.com/nim-lang/Nim/blob/436f57065197bee86c9539b75de3a73e5bda3f10/compiler/semmagic.nim#L91
17:54:53leorizehttps://github.com/nim-lang/Nim/blob/436f57065197bee86c9539b75de3a73e5bda3f10/compiler/msgs.nim#L162
17:55:32FromGitter<alehander42> Araq btw how is a[0] = if f(a): a[0] else: a[1]
17:55:41FromGitter<alehander42> working with the new runtime
17:56:08FromGitter<alehander42> is more special logic needed to deal with seq elements potentially changed/moved by a function
17:57:33leorizehttps://github.com/nim-lang/Nim/pull/9766
17:57:44leorizethis was a hack-ish way to fix things...
17:58:59FromDiscord_<djazz> ah, issue #11545 seems same as mine
17:59:17FromDiscord_<djazz> well
17:59:24leorizeno, it's not :p
17:59:27FromDiscord_<djazz> similar. I dont see the path in_my_ C code
17:59:33FromDiscord_<djazz> similar. I dont see the path in _my_ C code
18:00:07Araqalehander42: read the spec, array indexing is not covered, it creates copies
18:01:40FromGitter<alehander42> ok, i see, but are there cases where it can be optimized out, or is this considered impractical
18:03:27*krux02 quit (Remote host closed the connection)
18:03:38leorizeAraq: what do you think about disabling excessiveStackTrace in release builds?
18:04:56leorizeI think we should disable that so as not to expose too many information from the build machine
18:05:56FromGitter<alehander42> can't we automatically replace the home part with `$HOME`
18:06:09FromGitter<alehander42> but this would still expose some structure
18:06:12FromGitter<alehander42> nvm
18:06:41leorizewe can split it by package, like
18:06:51leorizestdlib/system.nim
18:06:55leorizeetc.
18:10:49Araqalehander42: yeah you can optimize it but it becomes quite hard without interprocedural optimizations
18:10:52shashlick_@alehander42 - c2nim parses c/c++ and creates a Nim ast. It then uses Nim compiler renderer to generate Nim
18:11:21Araqleorize: sounds like a good idea
18:12:33*Senketsu joined #nim
18:12:42leorizewhich one? :p
18:13:02Araqdisabling excessiveStackTrace in release builds
18:14:38*envoyt quit (Ping timeout: 245 seconds)
18:14:59*envoyt joined #nim
18:21:44leorizelooks like you'd need --listFullPaths:off and --excessiveStackTrace:off to get rid of full paths
18:23:31Araq--listFullPaths is supposed to be used in the compiler's error messages only
18:25:17FromDiscord_<djazz> in hello_r/stdlib_io.c I see: `raiseExceptionEx((Exception*)e, "IOError", "raiseEIO", "../../../../home/djazz/.choosenim/toolchains/nim-0.20.0/lib/system/io.nim", 119);` for example
18:25:31leorizeAraq: not anymore https://github.com/nim-lang/Nim/pull/9766
18:25:44leorizeI'll try to re-fix this
18:27:01FromDiscord_<djazz> If I want to have a main function similar to C that returns an error code, is this the way to its invocation? `quit(main())`
18:27:26FromDiscord_<djazz> i set `result = 1` at the top of it and `return 0` at the bottom
18:27:35leorizeyea, or you can use the programResult global
18:27:36FromDiscord_<djazz> seems to work nicely
18:27:41FromDiscord_<djazz> ah
18:27:54leorizenot sure if that global should be used
18:27:58FromDiscord_<djazz> yeah cuz i dont want to break something with quit()
18:28:10FromDiscord_<djazz> for a regular exit
18:28:40leorizeprogramResult was once deprecated during 0.20 dev, but then got un-deprecated at the end of the cycle
18:29:59FromDiscord_<djazz> i guess this is better: let exitcode = main()
18:29:59FromDiscord_<djazz> if exitcode != 0: quit(exitcode)
18:30:15leorizequit main() is fine enough
18:30:26leorizedon't bikeshed too much
18:33:27Araq+1 for 'quit main()'
18:33:45FromDiscord_<djazz> 😄
18:38:03FromGitter<alehander42> Araq can nim have inter optimizations
18:38:11FromGitter<alehander42> for some superrelease mode
18:38:15FromGitter<alehander42> in the future
18:38:36FromGitter<alehander42> shashlick but do i get a pure c tree
18:39:03FromGitter<alehander42> like, in the process of parsing, doesn't c2nim change the idioms etc
18:39:17FromGitter<alehander42> or does it alwayd generate nodes literally equivalent to the C parse tree
18:39:59FromDiscord_<djazz> How can i check if a C pointer is NULL?
18:40:08*laaron quit (Remote host closed the connection)
18:40:14leorize== NULL? :p
18:40:24FromGitter<alehander42> .isNil ?
18:40:27*PMunch_ joined #nim
18:40:27FromGitter<alehander42> (not sure)
18:40:28leorizeif in Nim then isNil or == nil
18:40:46*laaron joined #nim
18:41:08FromDiscord_<djazz> thanks
18:41:24FromDiscord_<djazz> i guess both works, no compilation error atleast
18:41:41FromDiscord_<djazz> i tried "is nil" first heh
18:42:43*ZombieByte quit (Ping timeout: 246 seconds)
18:47:12Araqalehander42: yeah but it's not planned to do that in the coming years ;-)
18:47:18FromDiscord_<djazz> alright, I got libsoundio bindings working nicely now. Let's attempt libmpv! For some hardware accelerated video playback 😃
18:52:48*vlad1777d__ quit (Ping timeout: 248 seconds)
19:01:29*macsek1911[m] quit (*.net *.split)
19:02:02*macsek1911[m] joined #nim
19:04:32FromDiscord_<djazz> hit a snag: `double_*: cdouble`
19:04:32FromDiscord_<djazz> `Error: invalid token: trailing underscore`
19:04:56FromDiscord_<djazz> the C header uses `double_` as identifier, but nim doesnt like it
19:07:24FromDiscord_<djazz> i guess changing it to whatever is fine, it's still same type (maps C memory)
19:07:56*theelous3 joined #nim
19:10:32shashlick_@djazz - did you use nimterop for libsoundio?
19:10:45FromDiscord_<djazz> yeah, and modified it later
19:11:09FromDiscord_<djazz> same what im doing with libmpv atm
19:11:30FromDiscord_<djazz> nimteropo didnt get union in struct, had to copy that from c2nim output
19:11:58shashlick_yes nested structs - i need to figure that out
19:12:05shashlick_am in vacation mode, family visiting, travel, etc.
19:12:16FromDiscord_<djazz> ah, you're the author of nimterop/nimgen?
19:12:26shashlick_yep
19:12:29FromDiscord_<djazz> &*
19:12:31FromDiscord_<djazz> nice
19:12:51FromDiscord_<djazz> i like how nimterop keeps (most) comments
19:13:15FromDiscord_<djazz> not a huge fan of the enum macro though
19:13:21FromDiscord_<djazz> enjoy your vac!
19:13:43FromDiscord_<djazz> (i dont want my nim file to depend on nimterop/types)
19:14:25shashlick_yep that's a request as well - main reason is to support all kinds of C/C++ enums which can be out of order and with holes
19:14:33FromDiscord_<djazz> ah right
19:15:01FromDiscord_<djazz> is there a way to skip both header: and dynlib: ?
19:15:09FromDiscord_<djazz> im using only toast cli btw
19:17:04shashlick_i've tried to keep them equal but the wrapper method is more powerful than toast by itself
19:18:31shashlick_https://github.com/nimterop/nimterop/issues/125 on nimterop/types
19:19:04FromDiscord_<djazz> 👍
19:20:24*tjmac joined #nim
19:20:53shashlick_right now header and dynlib are either or
19:21:06shashlick_https://github.com/nimterop/nimterop/blob/master/nimterop/getters.nim#L344
19:21:42shashlick_why wouldn't you #include the header
19:23:09FromDiscord_<djazz> the nim module is the header
19:23:20FromDiscord_<djazz> i just link in the symbols with `-lsomelib`
19:23:52FromDiscord_<djazz> inspired by this, uses dynlib tho https://github.com/ul/soundio/blob/master/src/soundio.nim
19:23:58shashlick_well but the structs you importc will be defined in the header
19:25:04*theelous3_ quit (Ping timeout: 246 seconds)
19:27:14FromDiscord_<djazz> woo, it compiles
19:31:56FromDiscord_<djazz> hmm, how do i make a C array of cstrings?
19:32:08FromDiscord_<djazz> `const char *cmd[] = {"loadfile", argv[1], NULL};` in nim
19:33:40shashlick_https://nim-lang.org/docs/system.html#UncheckedArray
19:35:11AraqtoCstringArray
19:36:23FromDiscord_<djazz> toCStringArray doesnt seem to exist?
19:37:55Calinou-d:mingw is working in my project by the way :) (also with --cpu:i386 for 32-bit builds)
19:38:29FromDiscord_<djazz> 😄
19:43:44Araqmy bad, it's allocCStringArray
19:44:13Araqapparently I don't wrap C code anymore
19:44:56FromDiscord_<djazz> expected: `proc mpv_command(ctx: ptr mpv_handle; args: ptr cstring): cint`
19:44:56FromDiscord_<djazz> but i got: `Error: type mismatch: got <ptr mpv_handle, cstringArray>`
19:45:18FromDiscord_<djazz> it expects a ptr cstring
19:47:08FromDiscord_<djazz> should i use cmd[0].addr or smth?
19:49:08*PMunch_ quit (Remote host closed the connection)
19:49:29Araqmpv_command(ctx: ptr ...; args: cstringArray)
19:49:38Araqis the better solution
19:51:24Araqspeaking of wrapping C ... can we please have a translation of https://github.com/microsoft/mimalloc/tree/master/src to Nim?
19:53:17FromDiscord_<eagle> oot
19:53:27FromDiscord_<djazz> WOO I GOT VIDEO PLAYING
19:53:31FromDiscord_<djazz> thanks Araq
19:54:00shashlick_@Araq - do you mean a wrapper or reimplementing it in nim?
19:54:33Araqa reimplementation so that it can support our GCs
19:56:38FromDiscord_<djazz> can I make this prettier?
19:56:38FromDiscord_<djazz> ```nim
19:56:38FromDiscord_<djazz> let cmd = allocCStringArray(["loadfile", "somefile.mp4"])
19:56:38FromDiscord_<djazz> mpv_check_error(mpv.mpv_command(ctx, cmd))
19:56:39FromDiscord_<djazz> deallocCStringArray(cmd)
19:56:39FromDiscord_<djazz> ```
19:59:42Calinouis it useful to cache the nimcache/ directory for faster builds in CI?
20:03:01*krux02 joined #nim
20:04:05*Cadey quit (Quit: WeeChat 1.9.1)
20:04:35FromDiscord_<djazz> hm i guess i can do `defer: deallocCStringArray(cmd)` for extra safety 😎
20:04:51*Xe joined #nim
20:05:09AraqCalinou: I don't know
20:05:24*Xe is now known as Cadey
20:05:37*jjido joined #nim
20:11:26FromDiscord_<djazz> if anyone wanna try mpv video player https://gist.github.com/daniel-j/6a928e6e8c782cb2054bf1e2455c23be
20:11:53FromDiscord_<djazz> install mpv with your package manager and add nimterop to your nimble file
20:12:11FromDiscord_<djazz> install mpv with your package manager and install nimterop
20:13:05FromGitter<Varriount> ,
20:14:18FromDiscord_<djazz> oh and it requires youtube-dl as it will play a youtube video
20:14:54FromDiscord_<djazz> play is to render this to an opengl texture instead in the main window
20:14:58FromDiscord_<djazz> plan is*
20:17:29FromDiscord_<djazz> afaik there is no video player nim module yet
20:17:45FromDiscord_<djazz> i will keep working on this
20:18:25*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:18:33*nsf quit (Quit: WeeChat 2.4)
20:18:55*laaron joined #nim
20:37:39*clyybber quit (Quit: WeeChat 2.5)
20:44:43*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:14:03FromDiscord_<Bub_Lite_63_Jr> I checked in a few days ago to discuss an issue I'm having with installing Nim that I thought I fixed. I can't seem to get Mac to find the Nim commands. I have to manually reload the .bashrc and .profile files, which only works until I open and close Terminal:
21:14:03FromDiscord_<Bub_Lite_63_Jr>
21:14:03FromDiscord_<Bub_Lite_63_Jr> ```
21:14:03FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ nim compile --run hello.nim
21:14:03FromDiscord_<Bub_Lite_63_Jr> -bash: nim: command not found
21:14:04FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ source ~/.bash_profile
21:14:06FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ source ~/.profile
21:14:08FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ nim compile --run hello.nim
21:14:10FromDiscord_<Bub_Lite_63_Jr> Hint: used config file '/Users/josephlyons/.choosenim/toolchains/nim-0.20.0/config/nim.cfg' [Conf]
21:14:12FromDiscord_<Bub_Lite_63_Jr> Hint: system [Processing]
21:14:13FromDiscord_<Bub_Lite_63_Jr> Hint: widestrs [Processing]
21:14:15FromDiscord_<Bub_Lite_63_Jr> Hint: io [Processing]
21:14:16solitudesfoh no, here it comes
21:14:16FromDiscord_<Bub_Lite_63_Jr> Hint: hello [Processing]
21:14:18FromDiscord_<Bub_Lite_63_Jr> Hint: strformat [Processing]
21:14:20FromDiscord_<Bub_Lite_63_Jr> Hint: macros [Processing]
21:14:21FromDiscord_<Bub_Lite_63_Jr> Hint: parseutils [Processing]
21:14:23FromDiscord_<Bub_Lite_63_Jr> Hint: unicode [Processing]
21:14:24FromDiscord_<Bub_Lite_63_Jr> Hint: strutils [Processing]
21:14:26FromDiscord_<Bub_Lite_63_Jr> Hint: math [Processing]
21:14:27FromDiscord_<Bub_Lite_63_Jr> Hint: bitops [Processing]
21:14:29FromDiscord_<Bub_Lite_63_Jr> Hint: algorithm [Processing]
21:14:30FromDiscord_<Bub_Lite_63_Jr> CC: hello.nim
21:14:32FromDiscord_<Bub_Lite_63_Jr> Hint: [Link]
21:14:34FromDiscord_<Bub_Lite_63_Jr> Hint: operation successful (28016 lines compiled; 0.731 sec total; 37.789MiB peakmem; Debug Build) [SuccessX]
21:14:36FromDiscord_<Bub_Lite_63_Jr> Hint: /Users/josephlyons/Desktop/nim_folder/hello [Exec]
21:14:38FromDiscord_<Bub_Lite_63_Jr> John is 45 years old
21:14:39FromDiscord_<Bub_Lite_63_Jr> Kate is 30 years old
21:14:41FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$
21:14:42FromDiscord_<Bub_Lite_63_Jr> ```
21:14:44FromDiscord_<Bub_Lite_63_Jr>
21:14:46FromDiscord_<Bub_Lite_63_Jr> I'm not worried about my name being posted here <message clipped>
21:16:52FromGitter<kayabaNerve> ... why did that send line by line?
21:17:02FromGitter<kayabaNerve> Is that how FromDiscord works?
21:17:05FromGitter<kayabaNerve> I'm scarred.
21:22:16FromDiscord_<djazz> @Bub_Lite_63_Jr how did you install nim?
21:23:19FromDiscord_<Bub_Lite_63_Jr> I used the curl command via the install page on the site
21:23:37FromDiscord_<djazz> Did you had the thing to your .bashrc?
21:23:44FromDiscord_<djazz> add*
21:24:07FromDiscord_<Bub_Lite_63_Jr> Yes
21:24:25FromDiscord_<Bub_Lite_63_Jr> Both the profile and bashrc file
21:25:05FromDiscord_<djazz> What does `echo $PATH` say?
21:27:09FromDiscord_<Bub_Lite_63_Jr> I get a blank line
21:27:09FromDiscord_<Bub_Lite_63_Jr>
21:27:09FromDiscord_<Bub_Lite_63_Jr> ```
21:27:09FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ echo $path
21:27:09FromDiscord_<Bub_Lite_63_Jr>
21:27:10FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$
21:27:10FromDiscord_<Bub_Lite_63_Jr> ```
21:27:18FromDiscord_<djazz> Uppercase PATH
21:27:43FromDiscord_<Bub_Lite_63_Jr> Sorry,
21:27:43FromDiscord_<Bub_Lite_63_Jr>
21:27:43FromDiscord_<Bub_Lite_63_Jr> ```
21:27:43FromDiscord_<Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ echo $PATH
21:27:48FromDiscord_<Bub_Lite_63_Jr> /Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/josephlyons/.cargo/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/josephlyons/Programming/Libraries/flutter/bin
21:27:48FromDiscord_<Bub_Lite_63_Jr> ```
21:28:19FromDiscord_<djazz> PM me your .bashrc
21:30:09FromDiscord_<Bub_Lite_63_Jr> Ok, I'll grab that real quick
21:30:11FromDiscord_<Bub_Lite_63_Jr> one min
21:30:22FromDiscord_<djazz> i noticed you sourced .bash_profile instead of .bashrc
21:30:59FromDiscord_<djazz> and .profile
21:31:50FromDiscord_<Bub_Lite_63_Jr> Hmm, you're right. This is the second time I've actually ran the source command and I dont recall if I did it with bashrc or bash_profile the first time, either way, I'll try it real quick with bashrc and see if it persists
21:32:18FromDiscord_<djazz> .bash_profile should contain a line that sources .bashrc. atleast it does on my linux machine
21:32:27FromDiscord_<djazz> dunno about .profile
21:33:03FromDiscord_<Bub_Lite_63_Jr> It didn't persist, it found the command for the duration of the terminal instance, then after exiting and opening terminal, it could no longer find it
21:33:50FromDiscord_<djazz> what it?
21:34:11solitudesfits shouldnt, unless your env setup is fucked up
21:34:26solitudesf*shouldnt contain
21:35:59FromDiscord_<Bub_Lite_63_Jr> I'm not great with these files, so theres a good chance I've screwed up something in the past with another language
21:36:05FromDiscord_<Bub_Lite_63_Jr> Do you still want to see the bashrc file?
21:36:08FromDiscord_<Bub_Lite_63_Jr> There isn't much in int
21:36:10FromDiscord_<Bub_Lite_63_Jr> There isn't much in it
21:36:10FromDiscord_<djazz> yeah
21:36:25dom96Bub_Lite_63_Jr: please use a pastebin next time
21:36:27FromDiscord_<djazz> does it contain any export PATH thingys?
21:36:51FromDiscord_<djazz> i have `export PATH=/home/djazz/.nimble/bin:$PATH` in mine
21:40:12FromDiscord_<djazz> (solved in pm)
21:51:34*envoyt quit (Ping timeout: 258 seconds)
21:56:37FromDiscord_<djazz> Is it possible to make a cstringArray from cstrings without dynamic alloc?
21:56:59*tjmac quit (Quit: -bye)
21:59:06FromDiscord_<djazz> i need a fixed length cstringArray where I can change the values
21:59:16FromDiscord_<djazz> i think it's just an array of pointers right?
22:00:41Araqit's a pointer to an array of pointers ;-)
22:01:04FromDiscord_<djazz> can it be made on stack? i just need to update the pointers (i guess)
22:01:21FromDiscord_<djazz> no reason, im just learning what's possible 😃
22:05:52*fredrik92 joined #nim
22:09:11*freddy92 joined #nim
22:11:30*fredrik92 quit (Ping timeout: 258 seconds)
22:13:28Araqarray[N, cstring]
22:16:17FromDiscord_<djazz> `openArray[cstring]` as input argument type, actually works
22:17:09FromDiscord_<djazz> thanks!
22:18:48FromDiscord_<djazz> `proc mpv_command*(ctx: ptr mpv_handle, args: openArray[cstring]): cint {.impclientC.}`
22:18:48FromDiscord_<djazz> `let cmd2 = [cstring "loadfile", "https://www.youtube.com/watch?v=ywjyeaMUibM"]; mpv_check_error(mpv.mpv_command(ctx, cmd2))`
22:19:42FromDiscord_<djazz> is it possible to skip the variable? doing something like `mpv_command(ctx, [cstring "loadfile", ....])`?
22:21:46*solitudesf quit (Ping timeout: 244 seconds)
22:21:50Araqyup
22:22:45FromDiscord_<djazz> i get SIGSEGV: Illegal storage access. (Attempt to read from nil?)
22:22:57*fredrik92 joined #nim
22:23:49Araqwell don't forget the 'nil' terminator
22:24:32Araqalso: strictly speaking you cannot use 'openArray' but I know of no architecture where it doesn't work
22:25:10FromDiscord_<djazz> o, adding nil works! 😄
22:26:50*freddy92 quit (Ping timeout: 252 seconds)
22:27:33Araqyou know you program for too long when you can debug other people's code without seeing it :P
22:28:14*abm quit (Remote host closed the connection)
22:28:39*abm joined #nim
22:29:12FromDiscord_<djazz> using a seq works fine too
22:29:51FromDiscord_<djazz> `var cmd = newSeq[cstring](); cmd.add("loadfile"); cmd.add("somefile.mp4")`
22:30:19*abm quit (Client Quit)
22:31:19FromDiscord_<djazz> or just `var cmd:seq[cstring]`
22:33:39AraqI know *why* it works. do you?
22:33:52FromDiscord_<djazz> I can check the C code
22:34:06Araqthat's not an answer :P
22:34:44FromDiscord_<djazz> well, i guess the internal representation matches what the C lib expects?
22:37:06FromDiscord_<djazz> I've only used Nim for like 4 days 😅
22:37:14FromDiscord_<djazz> it's really cool!
22:39:34Araqare you aware that Nim passes the length of the array as a third argument to mpv_command?
22:39:40FromDiscord_<djazz> yeah
22:39:52FromDiscord_<djazz> `T5_ = mpv_command(ctx, cmd->data, (cmd ? cmd->Sup.len : 0));`
22:40:14*natrys quit (Quit: natrys)
22:40:18FromDiscord_<djazz> but in the C header its `int mpv_command(mpv_handle *ctx, const char **args);`
22:40:40Araqand that it only happens to work because ABIs have been designed to cope with C's quirky varargs/missing prototype legacy "feature"?
22:41:03FromDiscord_<djazz> cool!
22:41:11FromDiscord_<djazz> I did not know that
22:41:34FromDiscord_<djazz> I know almost nothing about C heh
22:58:31FromDiscord_<djazz> even this works: `args: varargs[cstring]` argument with input `mpv_command(ctx, cstring "loadfile", cstring videoFile)`
22:58:54FromDiscord_<djazz> 😊
23:00:55FromDiscord_<djazz> and with `varargs[cstring, cstring]`, the calling cstring wrappers can be removed! so clean. Araq, Nim is the best! 😄
23:06:38*krux02 quit (Remote host closed the connection)
23:10:58FromDiscord_<Skaruts> is there an equivalent to seq.pop() to get and remove the first element of a sequence?
23:15:01*fredrik92 quit (Quit: Client Disconnecting)
23:18:43FromDiscord_<djazz> delete? sequtils
23:21:08FromDiscord_<Skaruts> delete doesn't return the item though
23:21:46FromDiscord_<Skaruts> pop removes and returns the last item, I was looking for something like that for the first item
23:21:58FromDiscord_<Skaruts> just to keep code simpler
23:23:39rayman22201not in the stdlib afaik. If it really bothers you, you can make a template for it though lol.
23:24:13FromDiscord_<Skaruts> I'm not so versed in that kind of thing though 😃
23:24:40Araqlet x = a[0]; delete(a, 0)
23:25:05Araqmaybe... I don't use 'delete'
23:25:15*Araq doesn't use anything.
23:25:35FromDiscord_<Skaruts> I was gonna ask... 😃
23:26:36FromDiscord_<Skaruts> gotta take a look at how pop was implemented
23:27:14FromDiscord_<Skaruts> would this work:
23:27:18FromDiscord_<Skaruts> proc pop_back*[T](a:var seq[T]):T =
23:27:18FromDiscord_<Skaruts> var i = a[0]
23:27:19FromDiscord_<Skaruts> a.delete(0)
23:27:19FromDiscord_<Skaruts> return i
23:27:50FromDiscord_<Skaruts> seems to work
23:28:19Araq result = move a[0]
23:28:22Araq a.delete 0
23:28:30FromDiscord_<Skaruts> ah, indeed
23:29:56FromDiscord_<Skaruts> thanks
23:30:18FromGitter<juancarlospaco> Hi
23:30:33Araqoh no! you are here to remind me
23:30:36Araqright?
23:30:45Araqbut I'm not here. I'm sleeping
23:31:53FromDiscord_<Skaruts> lol
23:32:21FromDiscord_<Skaruts> btw I can't connect through irc (from the website)
23:32:39rayman22201Araq is on irc through his dreams lol
23:33:25AraqI'm like that girl from Ecstatica
23:36:59FromDiscord_<Skaruts> is it possible to create an alias for a variable?
23:38:15FromDiscord_<Skaruts> so that if I have an alias for x called x1, and I do x = 10, x1 automatically gets set as 10
23:38:27FromDiscord_<Skaruts> so echo x or echo x1 would be the same thing
23:52:25Araqtemplate x1(): untyped = x
23:56:10rayman22201@Pmunch, the playground is 502ing :-(
23:57:15rayman22201!eval echo("am I alive?")
23:57:16NimBotCompile failed: <no output>
23:57:26rayman22201:-(
23:59:57rayman22201@PMunch even (idk if irc is case sensitive for pings)