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:01 | vegai_ | 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:14 | alexander92 | #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:29 | alexander92 | ops wrong chat |
07:27:41 | alexander92 | i am really bad with irc indeed :P |
07:28:01 | * | Lea-kitty joined #nim |
07:28:06 | Zevv | it's just like mammoth hunting and making fire |
07:28:10 | Lea-kitty | Hello everybody :) |
07:28:31 | * | nolanv quit (Read error: Connection reset by peer) |
07:28:37 | alexander92 | 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:34 | alexander92 | oh man irc is tragically hard for me |
07:36:26 | * | dwdv joined #nim |
07:41:06 | tjmac | Hi Lea-kitty |
07:41:46 | tjmac | alexander92, the magic is in the interface; if this one doesn't work for you try another |
07:43:37 | Lea-kitty | :) |
07:52:00 | * | vlad1777d__ quit (Ping timeout: 248 seconds) |
07:56:32 | alexander92 | sounds reasonable, or just write another one yourself :P |
07:56:47 | alexander92 | then decide you want a better protocol, and write your own chat protocol |
07:57:27 | alexander92 | and finally write your own network stack :P |
07:57:47 | livcd | Write your own IRC client..sounds like a fun project :) |
07:57:59 | * | Vladar joined #nim |
07:58:43 | alexander92 | i think dom96 was writing one before |
07:58:52 | alexander92 | it seems as a popular hobby |
08:00:40 | livcd | There is this little irc client in Go that uses winapi for gui. It's kinda cute |
08:03:26 | PMunch | Yeah IRC is fairly simple, so writing your own client isn't rocket science :) |
08:03:50 | PMunch | Which means you have the possibility to do only the fun parts of creating your own thing :) |
08:04:29 | livcd | https://github.com/dayvonjersen/chopsuey |
08:05:11 | FromGitter | <rokups> there seems to be just about anything written in go or rust. i dont understand it |
08:05:47 | FromGitter | <mratsim> Are there GUI toolkit in go or Rust? |
08:06:25 | livcd | yeah |
08:06:25 | tjmac | What I'd love to see is a proper xmpp client written in nim; maybe I'll tackle it myself some day |
08:06:37 | leorize[m] | go and rust are the popular langs atm, so not too surprised that there're a lot of stuff for them |
08:07:04 | livcd | there are just not anything really usable or mature that is cross platform |
08:15:52 | alexander92 | yeah i often |
08:21:18 | FromGitter | <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:48 | FromGitter | <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:02 | FromGitter | <rokups> Qt wrapper would be a killer feature |
08:30:50 | livcd | there's already a Qt wrapper is not there ? |
08:31:29 | FromGitter | <rokups> a while back someone was working on "QML wrapper" which sounded like something very incomplete |
08:31:42 | FromGitter | <rokups> no idea where that went or if there is anything else available |
08:32:07 | FromGitter | <mratsim> Matrix core devs actually know about Nim |
08:33:04 | * | floppydh joined #nim |
08:36:14 | FromGitter | <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:20 | FromGitter | <rokups> i only wish they found out about native software. electron chat client for desktop is a sad story |
08:39:26 | FromGitter | <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:51 | tjmac | rokups, indeed |
08:40:13 | FromGitter | <mratsim> Finding designers familiar with HTML/CSS is easy for example, they can have the same people on mobile and desktop |
08:40:44 | FromGitter | <mratsim> If they want extensions, it's much easier than using DLLs as well |
08:40:45 | FromGitter | <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:55 | FromGitter | <rokups> riot is one of terrible ones |
08:41:25 | FromGitter | <mratsim> yes but many plain GTK/QT apps are actually worse |
08:41:33 | FromGitter | <rokups> riot iOS, riot android and riot desktop are totally different codebases by the way |
08:41:40 | leorize[m] | use the weechat client |
08:41:44 | FromGitter | <rokups> idk plain Qt is awesome |
08:42:30 | FromGitter | <rokups> look at telegram. their client is pretty damn good. its Qt |
08:43:22 | FromGitter | <mratsim> WHat I'm saying is that it's harder to find designers familiar in QT/GTK compared to HTML/CSS |
08:43:38 | leorize[m] | there are people who write native Qt? |
08:43:59 | leorize[m] | I heard that the API is terrible compared to QML |
08:44:13 | FromGitter | <mratsim> QML is quite recent though |
08:44:27 | FromGitter | <mratsim> plenty of codebase have a lot of legacy code |
08:45:12 | FromGitter | <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:36 | FromGitter | <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:46 | FromGitter | <mratsim> oh ok |
08:46:13 | FromGitter | <mratsim> @rokups, when people are expecting your software in 3 months, it's very relevant |
08:46:47 | FromGitter | <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:04 | FromGitter | <rokups> yeah they get 💩 in 3 months. software development is not hole digging |
08:47:36 | FromGitter | <rokups> no ofc not. but if result is bad then naturally people start questioning both skills and frameworks |
08:52:07 | Araq | all 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:14 | FromDiscord_ | <djazz> Qt is nice, but sometimes looks terrible with bad theming heh |
08:52:50 | Araq | both Qt and GTK can be themed though so it doesn't really apply |
08:53:04 | FromDiscord_ | <djazz> wxWidgets seems like a nice cross platform ui toolkit, which use native gui of each platform |
08:53:23 | FromDiscord_ | <djazz> Win32, Cocoa, GTK3 |
08:53:23 | Araq | ^ that's also a downside. |
08:53:50 | FromGitter | <mratsim> we're still waiting for PMunch genui :P |
08:54:09 | FromGitter | <rokups> Araq "it uses native widgets" basically means "its snappy and there are no incomplete frames" |
08:54:24 | FromGitter | <rokups> is it so much to ask in year 2019 |
08:54:51 | FromGitter | <rokups> vscode does a fair job pretending it is not a browser. but that is an exception, not a rule unfortunately |
08:55:05 | Araq | but "native widgets" also means "you are not in control". |
08:55:17 | FromDiscord_ | <djazz> I have worked with Electron. Its cool, but I dont like how heavy it is |
08:55:26 | FromDiscord_ | <djazz> I am a web dev |
08:55:28 | Araq | can't theme it, can't make it behave identical across OSes |
08:55:56 | Araq | plus the "native" APIs keep changing |
08:56:21 | Araq | it's like the native offerings do not want to be used :P |
08:56:30 | * | tribly quit (Remote host closed the connection) |
08:56:37 | FromDiscord_ | <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:05 | FromGitter | <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:10 | FromDiscord_ | <djazz> Playnite is open src, but I havent looked into it much |
08:57:27 | * | tribly joined #nim |
08:57:28 | PMunch | mratsim, yeah, I have some plans for that still.. |
08:57:34 | PMunch | Just need to find the time to do it |
08:59:10 | FromGitter | <mratsim> Interesting RFC in pony on removing traits from the language: https://github.com/ponylang/rfcs/pull/138 |
08:59:27 | FromGitter | <mratsim> (but they have interfaces) |
09:01:39 | * | fredrik92 is now known as couven92 |
09:11:22 | dwdv | Their 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:58 | livcd | rokups: that's WPF is not it ? |
09:39:39 | livcd | rokups: sorry meant djazz |
09:44:17 | FromDiscord_ | <djazz> idk WPF |
09:44:53 | FromDiscord_ | <djazz> would be nice if something like that was crossplatform |
09:47:49 | Araq | Windows Forms was superior |
09:55:14 | * | floppydh joined #nim |
10:02:50 | * | dwdv quit (Quit: quit) |
10:08:32 | * | dddddd joined #nim |
10:13:05 | dom96 | Windows Forms are the best |
10:26:19 | * | Lea-kitty quit (Ping timeout: 260 seconds) |
10:31:28 | FromDiscord_ | <djazz> just crosscompiled a little program with -d:mingw, works great 😄 |
10:31:39 | FromDiscord_ | <djazz> it's linking in a dll i also built with mingw |
10:31:55 | FromDiscord_ | <djazz> only tried it in wine, but should work in windows too |
10:33:41 | PMunch | djazz, I was surprised the first time I cross-compiled with Nim, how easy it was |
10:34:04 | FromDiscord_ | <djazz> the mingw define only sets the gcc/ld exes but it just works! |
10:37:59 | FromDiscord_ | <djazz> woo, managed to statically link the dll.a |
10:38:00 | FromDiscord_ | <djazz> neat |
10:38:04 | * | gmpreussner quit (Ping timeout: 244 seconds) |
10:38:58 | * | gmpreussner joined #nim |
10:39:09 | FromDiscord_ | <djazz> `{.passL: "-Wl,-Bstatic -l" & libname & " -lole32".}` |
10:39:14 | * | shashlick_ joined #nim |
10:39:37 | * | shashlick quit (Ping timeout: 244 seconds) |
10:39:44 | FromDiscord_ | <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:57 | Calinou | that'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:55 | FromDiscord_ | <djazz> That looks almost exactly what -d:mingw does |
11:57:53 | FromGitter | <rokups> lol https://christine.website/blog/v-vaporware-2019-06-23 |
12:07:06 | Calinou | is -d:mingw built into Nim? |
12:07:20 | Calinou | if so, I guess I can drop my own -d:crosswin then :P |
12:08:59 | FromGitter | <rokups> probably not (based on `grep -i mingw` results) |
12:10:05 | FromDiscord_ | <djazz> It is |
12:10:45 | FromDiscord_ | <djazz> https://github.com/nim-lang/Nim/blob/721534119000c2bd53cc72b531726a6104381222/config/nim.cfg#L85 |
12:11:29 | Calinou | yeah, as of https://github.com/nim-lang/Nim/pull/9485 |
12:11:30 | Calinou | nice :) |
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:44 | FromDiscord_ | <djazz> to set the rpath, `\\` is required to escape $ORIGIN. `{.passL: "-Wl,-rpath,\\$ORIGIN/lib".}` |
12:22:08 | FromDiscord_ | <djazz> it works with both `-lsomelib` and `dynlib: "somelib.so"` |
12:22:34 | FromDiscord_ | <djazz> on windows, the dlls have to be in PATH |
12:22:45 | FromDiscord_ | <djazz> on windows, the dlls have to be in current dir or in PATH |
12:24:10 | FromDiscord_ | <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:11 | Calinou | my compiled binaries still rely on libpcre and OpenSSL dynamically, not sure what would be the easiest way to build them statically |
12:28:35 | Calinou | (libpcre is due to using the docopt library, cligen doesn't require it, so I could switch to that one) |
12:30:19 | FromDiscord_ | <djazz> for windows? |
12:30:50 | FromGitter | <rokups> hah nice (and my bad) |
12:31:41 | vegai_ | I was wondering how a multithreaded DB pool might work on nim |
12:32:24 | vegai_ | each thread having its own heap makes a traditional design of "shared stuff in heap protected by locks" impossible, no? |
12:32:48 | FromGitter | <mratsim> you can still use pointer to shared memory |
12:32:53 | Calinou | @djazz It does so on all platforms, but linking statically is most important on Windows here |
12:32:56 | FromGitter | <mratsim> just allocate the memory with allocShared |
12:33:06 | vegai_ | mratsim: ah, okay, thanks. I'll check that out |
12:33:28 | vegai_ | mratsim: I guess it's not my mistake when I didn't find this in the manual? :) |
12:33:46 | FromGitter | <mratsim> also if you look into the code source of the SharedTable module you will see examples using locks |
12:34:04 | FromGitter | <mratsim> allocShared is in system.nim documentation |
12:34:26 | FromGitter | <mratsim> and the manual has a couple of locks example |
12:34:27 | FromGitter | <mratsim> https://nim-lang.org/docs/sharedtables.html |
12:34:39 | vegai_ | right |
12:34:40 | * | Snircle joined #nim |
12:34:45 | vegai_ | I was looking under the Threading chapter |
12:35:10 | FromGitter | <mratsim> see for example: https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/sharedtables.nim#L206-L208 |
12:35:48 | FromDiscord_ | <djazz> how to set RUNPATH instead of RPATH: `{.passL: "-Wl,-rpath=\\$ORIGIN/lib,--enable-new-dtags".}` |
12:36:01 | FromDiscord_ | <djazz> RUNPATH can be overridden by LD_LIBRARY_PATH |
12:36:06 | FromDiscord_ | <djazz> while RPATH can't |
12:38:23 | * | fredrik92 is now known as couven92 |
12:41:37 | FromDiscord_ | <djazz> it's neat during development, no need to install 3rd party libs globally |
12:41:55 | FromDiscord_ | <djazz> and when bundling exe + libs together |
12:46:11 | Cadey | what c compiler flag is it? |
12:47:14 | * | solitudesf quit (Ping timeout: 244 seconds) |
12:48:21 | * | hoijui joined #nim |
12:49:52 | FromDiscord_ | <djazz> to build 32-bit on 64-bit machine: `-t:-m32 -l:-m32 --cpu:i386` |
12:50:13 | Cadey | no i mean to set RUNPATH |
12:50:24 | FromDiscord_ | <djazz> a 32 bit vm/container is probably recommended |
12:54:57 | Calinou | in 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:04 | Calinou | (systemd-nspawn can do it if you don't want Docker) |
12:56:06 | * | clyybber joined #nim |
12:57:12 | Araq | lol |
12:59:38 | Calinou | #JustLinuxThings :P |
13:00:12 | clyybber | meanwhile canonical "helps |
13:00:40 | clyybber | " by just deprecating 32bit libraries |
13:02:14 | * | natrys joined #nim |
13:02:59 | FromGitter | <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:19 | clyybber | yeah |
13:12:32 | * | hoijui quit (Quit: Leaving) |
13:13:29 | Calinou | that's how you make open source games popular again, I guess :P |
13:13:30 | * | Calinou hides |
13:14:34 | FromGitter | <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:35 | clyybber | rokups: CDDA would like to have a word with you |
13:16:17 | FromGitter | <mratsim> Yeti sports was good :p |
13:16:34 | FromGitter | <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:42 | FromGitter | <rokups> if it was so great it would be well-known |
13:17:07 | FromGitter | <mratsim> Yeti sports? It was probably the top flash games 15 years ago |
13:17:13 | FromGitter | <rokups> CDDA :p |
13:17:13 | FromGitter | <mratsim> and number 1 time waster |
13:17:15 | FromGitter | <mratsim> oh |
13:17:35 | lqdev[m] | rokups: Mindustry is an amazing open-source game |
13:18:51 | FromGitter | <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:29 | FromGitter | <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:57 | FromGitter | <rokups> no amount of opensource games will make up for battlefield not running on our beloved penguin :| |
13:20:13 | Calinou | heh, I could never really stand Battlefield and similar games |
13:20:16 | FromGitter | <mratsim> Lutris and all the DirectX to Vulkan stuff + FAudio are very good at the moment |
13:22:42 | FromGitter | <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:35 | Calinou | it works pretty well here, but I don't play the latest hip games, which helps |
13:24:43 | FromGitter | <rokups> exactly. but we are a special kind. that wont fly that well for average home user |
13:26:51 | Calinou | there's no such thing as an average user :) |
13:30:46 | clyybber | rokups: Popularity doesn't always correlate to quality/fun |
13:31:21 | clyybber | It's just that those AAA studios have big marketing campaigns, while nearly all open source games dont do any marketing at all |
13:31:54 | clyybber | "hidden gems" |
13:32:05 | FromGitter | <rokups> also opensource games look like crap simply because of amount of money that went into visuals |
13:32:49 | FromGitter | <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:57 | clyybber | rokups: 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:44 | FromGitter | <rokups> AAA titles will boost linux, not retro games :p |
13:34:11 | clyybber | at what point does a game count as a retro game? |
13:35:20 | clyybber | CDDA is (insanely) actively developed; look at those stats: https://github.com/CleverRaven/Cataclysm-DDA/pulse/monthly |
13:37:22 | FromGitter | <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:40 | FromGitter | <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:10 | clyybber | I 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:58 | Araq | =move? |
13:44:00 | clyybber | to me many modern AAA fps feel like a one-armed-bandit hiding in beauty |
13:44:04 | clyybber | Araq: Just rebased |
13:44:19 | Araq | did you see my "const seq" fix? |
13:44:22 | clyybber | Araq: Yep |
13:44:27 | Araq | that's how it should be done IMO. |
13:45:17 | Calinou | a lot of people play only or mostly niche games |
13:45:37 | Calinou | I remember when I almost exclusively played Minecraft in 2011 :P |
13:46:03 | clyybber | "niche game" |
13:46:34 | Calinou | nowadays, it might be considered a niche game by some |
13:46:57 | clyybber | yeah, all the kiddies now play fortnite |
13:48:18 | clyybber | which I think was a majority of minecrafts player base |
13:51:36 | lqdev[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:41 | lqdev[m] | the only exception in the AAA world is Nintendo, they always provide colorful, original experiences |
13:54:44 | FromDiscord_ | <djazz> Yeah DXVK and Steam's Proton is quite awesome. |
13:55:00 | * | djazz quit (Quit: djazz) |
13:55:35 | FromDiscord_ | <djazz> and Lutris makes it easy for non-Steam games |
13:56:06 | FromGitter | <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:14 | FromGitter | <rokups> for same reasons i listed already |
13:57:24 | Calinou | most AAAs I play are 15-20 years old if not more :p |
13:57:53 | FromDiscord_ | <djazz> I'm a Linux gamer, so I play what I can. |
13:57:56 | lqdev[m] | yeah older AAA games are also good, see Portal and Portal 2 |
13:58:05 | Calinou | I mean, I started Half-Life 2 Episode One last week |
13:58:28 | Calinou | https://www.xkcd.com/606/ factor 3 :P |
13:58:49 | lqdev[m] | djazz: I'm a Linux gamer too, but because I mostly play indies I don't find that being a problem |
13:59:05 | FromDiscord_ | <djazz> yeah |
13:59:17 | Calinou | for 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:30 | FromDiscord_ | <djazz> Valve is pushing Linux gaming hard rn, I'm happy about that. Just check ProtonDB |
13:59:43 | FromDiscord_ | <djazz> same here. |
13:59:57 | FromDiscord_ | <djazz> I only got Steam cuz they launched TF2 beta for Linux |
14:01:14 | FromDiscord_ | <djazz> @Calinou hah, spotted you x) https://github.com/AppImage/AppImageKit/issues/963#issuecomment-495794805 |
14:01:42 | Calinou | :) |
14:02:07 | FromDiscord_ | <djazz> Looking through exodus' inner working rn, it's pretty interesting. |
14:02:22 | FromDiscord_ | <djazz> I might steal some of it for my scan_libs.py script |
14:02:28 | Calinou | it's a really nice tool for the intended use case (moving binaries from your PC to a server with a different distro) |
14:02:32 | Calinou | (or vice versa, sometimes) |
14:02:47 | FromDiscord_ | <djazz> it's bundling ld-linux.so entirely heh |
14:02:59 | FromDiscord_ | <djazz> I didnt know that was supported |
14:03:14 | FromDiscord_ | <djazz> i wonder how well something dynamic like sdl2 works with it |
14:03:18 | * | kapilp left #nim (#nim) |
14:03:38 | FromDiscord_ | <djazz> it loads most things dynamically |
14:05:02 | clyybber | rokups: Btw 0ad doesn't look bad and is open source |
14:05:17 | clyybber | also depending on your definition of open source |
14:05:25 | clyybber | every unity game is open source |
14:05:35 | FromDiscord_ | <djazz> heh |
14:05:36 | Calinou | many open source games look pretty decent, though expecting modern AAA visuals is kind of unrealistic |
14:05:39 | FromDiscord_ | <djazz> Xonotic is pretty fun open source game |
14:05:46 | clyybber | djazz: Oh yeah |
14:05:54 | Calinou | I 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:02 | FromGitter | <rokups> oh indeed it looks quite nice |
14:06:04 | FromDiscord_ | <djazz> back in the day i played Tremolous, Urban Terror and OpenArena |
14:06:10 | Calinou | if you configure open source games right (because many of them have very poor defaults…), you can get roughly similar visuals |
14:06:45 | clyybber | every unity game is open source in the sense that ILSpy gives you nearly the exact original code. |
14:06:47 | FromDiscord_ | <djazz> the game im "porting" (rather recreating) to nim is open source (UltraStar Deluxe), karaoke game |
14:07:03 | FromDiscord_ | <djazz> clyybber: works on monogame/FNA games too? |
14:07:10 | Calinou | that's not open source per the Open Source Definition |
14:07:14 | clyybber | Didn't try it |
14:07:21 | clyybber | Calinou: Yeah |
14:07:23 | Calinou | obfuscation can hinder this too anyway |
14:09:23 | clyybber | Yeah, but surprisingly I haven't found a unity game yet that obfuscated its source code. |
14:09:23 | FromDiscord_ | <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:30 | lqdev[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:42 | Calinou | as for SDL2, you should only redraw when required |
14:09:53 | lqdev[m] | more precisely, I was curious about its debug mode and its features |
14:09:56 | FromDiscord_ | <djazz> yeah I was thinking of Celeste actually. Great game. I managed to extract the texture atlases heh |
14:09:59 | Calinou | if you redraw constantly, no wonder why it's going to use lots of resources :) |
14:10:14 | FromDiscord_ | <djazz> yeah |
14:10:34 | * | AndChat|624225 quit (Read error: Connection reset by peer) |
14:10:44 | lqdev[m] | also, for GUIs you can use the `ui` package |
14:10:47 | FromDiscord_ | <djazz> i dont want to implement my own button, text input handing, file picker though |
14:11:05 | lqdev[m] | it has almost everything you need |
14:11:09 | FromDiscord_ | <djazz> is it cross platform? |
14:11:19 | lqdev[m] | yes |
14:11:25 | * | juanim joined #nim |
14:11:29 | lqdev[m] | it's a wrapper around libui |
14:11:34 | FromDiscord_ | <djazz> I'll have a look thanks |
14:11:49 | * | envoyt joined #nim |
14:12:05 | lqdev[m] | if you want a pure Nim solution, there's also NiGui but I haven't used it much |
14:12:19 | Calinou | libui isn't really stated to be production-ready though |
14:12:31 | Calinou | it may be sufficient for a minimal launcher still |
14:12:39 | * | juanim quit (Client Quit) |
14:12:49 | FromDiscord_ | <djazz> hm, can it render basic html? |
14:13:02 | FromDiscord_ | <djazz> need it to show a changelog |
14:13:03 | lqdev[m] | afaik no |
14:13:28 | Calinou | from a quick search, no |
14:13:37 | Calinou | that's pretty difficult without bundling a WebView anyway |
14:13:56 | Calinou | if 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:38 | FromDiscord_ | <djazz> hmm, guess I can try wxWidgets then |
14:15:13 | Calinou | you could use Godot to create a launcher :P |
14:15:15 | * | Calinou hides |
14:15:21 | FromDiscord_ | <djazz> ~~unity3d~~ |
14:15:24 | Calinou | we do have a RichTextLabel to display BBcode after all |
14:15:35 | FromDiscord_ | <djazz> (: |
14:15:51 | FromDiscord_ | <djazz> This is a launcher not a game |
14:16:04 | Calinou | many people have released apps using Godot, like Wonderdraft |
14:16:08 | Calinou | https://www.wonderdraft.net/ |
14:16:10 | * | envoyt quit (Ping timeout: 258 seconds) |
14:17:09 | FromDiscord_ | <djazz> ah cool |
14:17:22 | FromDiscord_ | <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:55 | shashlick_ | @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:53 | FromDiscord_ | <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:53 | FromDiscord_ | <djazz> https://cdn.discordapp.com/attachments/371759389889003532/592726085431590933/Screenshot_2019-06-24_16-40-55.png |
14:42:11 | FromDiscord_ | <djazz> idk how embeds appear on irc, im guessing a discord link? |
14:42:24 | Calinou | yeah |
14:42:53 | FromDiscord_ | <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:03 | FromGitter | <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:44 | FromGitter | <brentp> how can I track down where this case error is occuring (@genotrance) ? |
16:51:58 | FromGitter | <brentp> I can get that error with simly: `nimble install -y --verbose https://github.com/brentp/duktape-nim@#dev` |
16:52:29 | leorize | @brentp: try installing the latest commit of c2nim |
16:52:39 | FromGitter | <daniel-j> try `--debug` instead of `--verbose` also |
16:53:17 | FromGitter | <daniel-j> yeah, c2nim likes to be at #head |
16:53:22 | leorize | only 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:53 | FromDiscord_ | <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:53 | FromGitter | <brentp> trying these now. thanks @daniel-j and @leorize |
16:55:27 | FromDiscord_ | <djazz> is it possible to get rid of those from the final exe? |
16:55:46 | leorize | @djazz can you make a reproducible sample? |
16:56:45 | FromDiscord_ | <djazz> `echo "hello world"` is enough |
16:56:55 | FromDiscord_ | <djazz> `nim c -d:release --listFullPaths:off --excessiveStackTrace:off --opt:size test.nim` |
16:57:12 | FromDiscord_ | <djazz> only included fatal.io path tho |
16:57:47 | FromDiscord_ | <djazz> i am testing with `strings test | less` |
16:57:58 | leorize | yea, I saw that |
16:58:07 | leorize | alright, I think I know where |
16:58:31 | FromDiscord_ | <djazz> 😃 |
16:58:49 | FromDiscord_ | <djazz> fatal.nim * |
16:58:56 | shashlick_ | Nimgen doesn't like c2nim head since it breaks enums or something |
16:59:24 | FromDiscord_ | <djazz> give nimterop a try |
16:59:34 | FromDiscord_ | <djazz> it parses C much better! |
17:00:02 | * | nsf joined #nim |
17:00:34 | shashlick_ | https://github.com/nim-lang/c2nim/commit/be3e8b9ab81c25cc0cb10b1ae117da57f71560e3 |
17:02:02 | FromGitter | <brentp> @shashlick, I think that's a different problem |
17:02:41 | shashlick_ | Yes but that's why nimgen hard codes the c2nim dependency |
17:03:03 | shashlick_ | 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:10 | leorize | @djazz: I found the line that produced that path :p |
17:04:14 | FromGitter | <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:26 | FromDiscord_ | <djazz> @leorize: yay |
17:04:29 | * | envoyt joined #nim |
17:04:31 | leorize | looks 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:17 | FromDiscord_ | <djazz> @leorize: what line? i can include it in the issue |
17:12:01 | leorize | https://github.com/nim-lang/Nim/blob/436f57065197bee86c9539b75de3a73e5bda3f10/lib/system/fatal.nim#L39 |
17:12:29 | leorize | you can track it by adding --linedir:on --nimcache:cache to your compile flags |
17:13:03 | leorize | then go to the cache folder and grep for that path |
17:13:15 | FromDiscord_ | <djazz> aha |
17:15:53 | * | envoyt quit (Ping timeout: 245 seconds) |
17:16:14 | * | envoyt joined #nim |
17:20:01 | FromDiscord_ | <djazz> my first bug report ^^ https://github.com/nim-lang/Nim/issues/11572 @leorize |
17:21:20 | leorize | https://irclogs.nim-lang.org/24-06-2019.html#17:04:10 |
17:21:23 | leorize | link the log :p |
17:22:16 | FromDiscord_ | <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:19 | FromGitter | <alehander42> is c2nim |
17:44:22 | FromGitter | <alehander42> using its own c parser |
17:45:09 | FromGitter | <alehander42> i mean it generates ast |
17:45:12 | FromGitter | <alehander42> but its nim ast |
17:45:20 | FromGitter | <alehander42> so i am not sure if it is a repr of the c AST |
17:45:32 | FromGitter | <alehander42> or directly the translated nim-ish version of the logic |
17:49:23 | * | junland joined #nim |
17:50:12 | leorize | Araq: 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:14 | Araq | uh hmm |
17:52:28 | Araq | --excessiveStackTrace |
17:53:35 | leorize | lol instantiationInfo's fullPaths param depends on both that param & --listFullPaths... |
17:54:44 | leorize | https://github.com/nim-lang/Nim/blob/436f57065197bee86c9539b75de3a73e5bda3f10/compiler/semmagic.nim#L91 |
17:54:53 | leorize | https://github.com/nim-lang/Nim/blob/436f57065197bee86c9539b75de3a73e5bda3f10/compiler/msgs.nim#L162 |
17:55:32 | FromGitter | <alehander42> Araq btw how is a[0] = if f(a): a[0] else: a[1] |
17:55:41 | FromGitter | <alehander42> working with the new runtime |
17:56:08 | FromGitter | <alehander42> is more special logic needed to deal with seq elements potentially changed/moved by a function |
17:57:33 | leorize | https://github.com/nim-lang/Nim/pull/9766 |
17:57:44 | leorize | this was a hack-ish way to fix things... |
17:58:59 | FromDiscord_ | <djazz> ah, issue #11545 seems same as mine |
17:59:17 | FromDiscord_ | <djazz> well |
17:59:24 | leorize | no, it's not :p |
17:59:27 | FromDiscord_ | <djazz> similar. I dont see the path in_my_ C code |
17:59:33 | FromDiscord_ | <djazz> similar. I dont see the path in _my_ C code |
18:00:07 | Araq | alehander42: read the spec, array indexing is not covered, it creates copies |
18:01:40 | FromGitter | <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:38 | leorize | Araq: what do you think about disabling excessiveStackTrace in release builds? |
18:04:56 | leorize | I think we should disable that so as not to expose too many information from the build machine |
18:05:56 | FromGitter | <alehander42> can't we automatically replace the home part with `$HOME` |
18:06:09 | FromGitter | <alehander42> but this would still expose some structure |
18:06:12 | FromGitter | <alehander42> nvm |
18:06:41 | leorize | we can split it by package, like |
18:06:51 | leorize | stdlib/system.nim |
18:06:55 | leorize | etc. |
18:10:49 | Araq | alehander42: yeah you can optimize it but it becomes quite hard without interprocedural optimizations |
18:10:52 | shashlick_ | @alehander42 - c2nim parses c/c++ and creates a Nim ast. It then uses Nim compiler renderer to generate Nim |
18:11:21 | Araq | leorize: sounds like a good idea |
18:12:33 | * | Senketsu joined #nim |
18:12:42 | leorize | which one? :p |
18:13:02 | Araq | disabling excessiveStackTrace in release builds |
18:14:38 | * | envoyt quit (Ping timeout: 245 seconds) |
18:14:59 | * | envoyt joined #nim |
18:21:44 | leorize | looks like you'd need --listFullPaths:off and --excessiveStackTrace:off to get rid of full paths |
18:23:31 | Araq | --listFullPaths is supposed to be used in the compiler's error messages only |
18:25:17 | FromDiscord_ | <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:31 | leorize | Araq: not anymore https://github.com/nim-lang/Nim/pull/9766 |
18:25:44 | leorize | I'll try to re-fix this |
18:27:01 | FromDiscord_ | <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:26 | FromDiscord_ | <djazz> i set `result = 1` at the top of it and `return 0` at the bottom |
18:27:35 | leorize | yea, or you can use the programResult global |
18:27:36 | FromDiscord_ | <djazz> seems to work nicely |
18:27:41 | FromDiscord_ | <djazz> ah |
18:27:54 | leorize | not sure if that global should be used |
18:27:58 | FromDiscord_ | <djazz> yeah cuz i dont want to break something with quit() |
18:28:10 | FromDiscord_ | <djazz> for a regular exit |
18:28:40 | leorize | programResult was once deprecated during 0.20 dev, but then got un-deprecated at the end of the cycle |
18:29:59 | FromDiscord_ | <djazz> i guess this is better: let exitcode = main() |
18:29:59 | FromDiscord_ | <djazz> if exitcode != 0: quit(exitcode) |
18:30:15 | leorize | quit main() is fine enough |
18:30:26 | leorize | don't bikeshed too much |
18:33:27 | Araq | +1 for 'quit main()' |
18:33:45 | FromDiscord_ | <djazz> 😄 |
18:38:03 | FromGitter | <alehander42> Araq can nim have inter optimizations |
18:38:11 | FromGitter | <alehander42> for some superrelease mode |
18:38:15 | FromGitter | <alehander42> in the future |
18:38:36 | FromGitter | <alehander42> shashlick but do i get a pure c tree |
18:39:03 | FromGitter | <alehander42> like, in the process of parsing, doesn't c2nim change the idioms etc |
18:39:17 | FromGitter | <alehander42> or does it alwayd generate nodes literally equivalent to the C parse tree |
18:39:59 | FromDiscord_ | <djazz> How can i check if a C pointer is NULL? |
18:40:08 | * | laaron quit (Remote host closed the connection) |
18:40:14 | leorize | == NULL? :p |
18:40:24 | FromGitter | <alehander42> .isNil ? |
18:40:27 | * | PMunch_ joined #nim |
18:40:27 | FromGitter | <alehander42> (not sure) |
18:40:28 | leorize | if in Nim then isNil or == nil |
18:40:46 | * | laaron joined #nim |
18:41:08 | FromDiscord_ | <djazz> thanks |
18:41:24 | FromDiscord_ | <djazz> i guess both works, no compilation error atleast |
18:41:41 | FromDiscord_ | <djazz> i tried "is nil" first heh |
18:42:43 | * | ZombieByte quit (Ping timeout: 246 seconds) |
18:47:12 | Araq | alehander42: yeah but it's not planned to do that in the coming years ;-) |
18:47:18 | FromDiscord_ | <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:32 | FromDiscord_ | <djazz> hit a snag: `double_*: cdouble` |
19:04:32 | FromDiscord_ | <djazz> `Error: invalid token: trailing underscore` |
19:04:56 | FromDiscord_ | <djazz> the C header uses `double_` as identifier, but nim doesnt like it |
19:07:24 | FromDiscord_ | <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:32 | shashlick_ | @djazz - did you use nimterop for libsoundio? |
19:10:45 | FromDiscord_ | <djazz> yeah, and modified it later |
19:11:09 | FromDiscord_ | <djazz> same what im doing with libmpv atm |
19:11:30 | FromDiscord_ | <djazz> nimteropo didnt get union in struct, had to copy that from c2nim output |
19:11:58 | shashlick_ | yes nested structs - i need to figure that out |
19:12:05 | shashlick_ | am in vacation mode, family visiting, travel, etc. |
19:12:16 | FromDiscord_ | <djazz> ah, you're the author of nimterop/nimgen? |
19:12:26 | shashlick_ | yep |
19:12:29 | FromDiscord_ | <djazz> &* |
19:12:31 | FromDiscord_ | <djazz> nice |
19:12:51 | FromDiscord_ | <djazz> i like how nimterop keeps (most) comments |
19:13:15 | FromDiscord_ | <djazz> not a huge fan of the enum macro though |
19:13:21 | FromDiscord_ | <djazz> enjoy your vac! |
19:13:43 | FromDiscord_ | <djazz> (i dont want my nim file to depend on nimterop/types) |
19:14:25 | shashlick_ | 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:33 | FromDiscord_ | <djazz> ah right |
19:15:01 | FromDiscord_ | <djazz> is there a way to skip both header: and dynlib: ? |
19:15:09 | FromDiscord_ | <djazz> im using only toast cli btw |
19:17:04 | shashlick_ | i've tried to keep them equal but the wrapper method is more powerful than toast by itself |
19:18:31 | shashlick_ | https://github.com/nimterop/nimterop/issues/125 on nimterop/types |
19:19:04 | FromDiscord_ | <djazz> 👍 |
19:20:24 | * | tjmac joined #nim |
19:20:53 | shashlick_ | right now header and dynlib are either or |
19:21:06 | shashlick_ | https://github.com/nimterop/nimterop/blob/master/nimterop/getters.nim#L344 |
19:21:42 | shashlick_ | why wouldn't you #include the header |
19:23:09 | FromDiscord_ | <djazz> the nim module is the header |
19:23:20 | FromDiscord_ | <djazz> i just link in the symbols with `-lsomelib` |
19:23:52 | FromDiscord_ | <djazz> inspired by this, uses dynlib tho https://github.com/ul/soundio/blob/master/src/soundio.nim |
19:23:58 | shashlick_ | well but the structs you importc will be defined in the header |
19:25:04 | * | theelous3_ quit (Ping timeout: 246 seconds) |
19:27:14 | FromDiscord_ | <djazz> woo, it compiles |
19:31:56 | FromDiscord_ | <djazz> hmm, how do i make a C array of cstrings? |
19:32:08 | FromDiscord_ | <djazz> `const char *cmd[] = {"loadfile", argv[1], NULL};` in nim |
19:33:40 | shashlick_ | https://nim-lang.org/docs/system.html#UncheckedArray |
19:35:11 | Araq | toCstringArray |
19:36:23 | FromDiscord_ | <djazz> toCStringArray doesnt seem to exist? |
19:37:55 | Calinou | -d:mingw is working in my project by the way :) (also with --cpu:i386 for 32-bit builds) |
19:38:29 | FromDiscord_ | <djazz> 😄 |
19:43:44 | Araq | my bad, it's allocCStringArray |
19:44:13 | Araq | apparently I don't wrap C code anymore |
19:44:56 | FromDiscord_ | <djazz> expected: `proc mpv_command(ctx: ptr mpv_handle; args: ptr cstring): cint` |
19:44:56 | FromDiscord_ | <djazz> but i got: `Error: type mismatch: got <ptr mpv_handle, cstringArray>` |
19:45:18 | FromDiscord_ | <djazz> it expects a ptr cstring |
19:47:08 | FromDiscord_ | <djazz> should i use cmd[0].addr or smth? |
19:49:08 | * | PMunch_ quit (Remote host closed the connection) |
19:49:29 | Araq | mpv_command(ctx: ptr ...; args: cstringArray) |
19:49:38 | Araq | is the better solution |
19:51:24 | Araq | speaking of wrapping C ... can we please have a translation of https://github.com/microsoft/mimalloc/tree/master/src to Nim? |
19:53:17 | FromDiscord_ | <eagle> oot |
19:53:27 | FromDiscord_ | <djazz> WOO I GOT VIDEO PLAYING |
19:53:31 | FromDiscord_ | <djazz> thanks Araq |
19:54:00 | shashlick_ | @Araq - do you mean a wrapper or reimplementing it in nim? |
19:54:33 | Araq | a reimplementation so that it can support our GCs |
19:56:38 | FromDiscord_ | <djazz> can I make this prettier? |
19:56:38 | FromDiscord_ | <djazz> ```nim |
19:56:38 | FromDiscord_ | <djazz> let cmd = allocCStringArray(["loadfile", "somefile.mp4"]) |
19:56:38 | FromDiscord_ | <djazz> mpv_check_error(mpv.mpv_command(ctx, cmd)) |
19:56:39 | FromDiscord_ | <djazz> deallocCStringArray(cmd) |
19:56:39 | FromDiscord_ | <djazz> ``` |
19:59:42 | Calinou | is 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:35 | FromDiscord_ | <djazz> hm i guess i can do `defer: deallocCStringArray(cmd)` for extra safety 😎 |
20:04:51 | * | Xe joined #nim |
20:05:09 | Araq | Calinou: I don't know |
20:05:24 | * | Xe is now known as Cadey |
20:05:37 | * | jjido joined #nim |
20:11:26 | FromDiscord_ | <djazz> if anyone wanna try mpv video player https://gist.github.com/daniel-j/6a928e6e8c782cb2054bf1e2455c23be |
20:11:53 | FromDiscord_ | <djazz> install mpv with your package manager and add nimterop to your nimble file |
20:12:11 | FromDiscord_ | <djazz> install mpv with your package manager and install nimterop |
20:13:05 | FromGitter | <Varriount> , |
20:14:18 | FromDiscord_ | <djazz> oh and it requires youtube-dl as it will play a youtube video |
20:14:54 | FromDiscord_ | <djazz> play is to render this to an opengl texture instead in the main window |
20:14:58 | FromDiscord_ | <djazz> plan is* |
20:17:29 | FromDiscord_ | <djazz> afaik there is no video player nim module yet |
20:17:45 | FromDiscord_ | <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:03 | FromDiscord_ | <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:03 | FromDiscord_ | <Bub_Lite_63_Jr> |
21:14:03 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
21:14:03 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ nim compile --run hello.nim |
21:14:03 | FromDiscord_ | <Bub_Lite_63_Jr> -bash: nim: command not found |
21:14:04 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ source ~/.bash_profile |
21:14:06 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ source ~/.profile |
21:14:08 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ nim compile --run hello.nim |
21:14:10 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: used config file '/Users/josephlyons/.choosenim/toolchains/nim-0.20.0/config/nim.cfg' [Conf] |
21:14:12 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: system [Processing] |
21:14:13 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: widestrs [Processing] |
21:14:15 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: io [Processing] |
21:14:16 | solitudesf | oh no, here it comes |
21:14:16 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: hello [Processing] |
21:14:18 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: strformat [Processing] |
21:14:20 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: macros [Processing] |
21:14:21 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: parseutils [Processing] |
21:14:23 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: unicode [Processing] |
21:14:24 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: strutils [Processing] |
21:14:26 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: math [Processing] |
21:14:27 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: bitops [Processing] |
21:14:29 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: algorithm [Processing] |
21:14:30 | FromDiscord_ | <Bub_Lite_63_Jr> CC: hello.nim |
21:14:32 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: [Link] |
21:14:34 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: operation successful (28016 lines compiled; 0.731 sec total; 37.789MiB peakmem; Debug Build) [SuccessX] |
21:14:36 | FromDiscord_ | <Bub_Lite_63_Jr> Hint: /Users/josephlyons/Desktop/nim_folder/hello [Exec] |
21:14:38 | FromDiscord_ | <Bub_Lite_63_Jr> John is 45 years old |
21:14:39 | FromDiscord_ | <Bub_Lite_63_Jr> Kate is 30 years old |
21:14:41 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ |
21:14:42 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
21:14:44 | FromDiscord_ | <Bub_Lite_63_Jr> |
21:14:46 | FromDiscord_ | <Bub_Lite_63_Jr> I'm not worried about my name being posted here <message clipped> |
21:16:52 | FromGitter | <kayabaNerve> ... why did that send line by line? |
21:17:02 | FromGitter | <kayabaNerve> Is that how FromDiscord works? |
21:17:05 | FromGitter | <kayabaNerve> I'm scarred. |
21:22:16 | FromDiscord_ | <djazz> @Bub_Lite_63_Jr how did you install nim? |
21:23:19 | FromDiscord_ | <Bub_Lite_63_Jr> I used the curl command via the install page on the site |
21:23:37 | FromDiscord_ | <djazz> Did you had the thing to your .bashrc? |
21:23:44 | FromDiscord_ | <djazz> add* |
21:24:07 | FromDiscord_ | <Bub_Lite_63_Jr> Yes |
21:24:25 | FromDiscord_ | <Bub_Lite_63_Jr> Both the profile and bashrc file |
21:25:05 | FromDiscord_ | <djazz> What does `echo $PATH` say? |
21:27:09 | FromDiscord_ | <Bub_Lite_63_Jr> I get a blank line |
21:27:09 | FromDiscord_ | <Bub_Lite_63_Jr> |
21:27:09 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
21:27:09 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ echo $path |
21:27:09 | FromDiscord_ | <Bub_Lite_63_Jr> |
21:27:10 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ |
21:27:10 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
21:27:18 | FromDiscord_ | <djazz> Uppercase PATH |
21:27:43 | FromDiscord_ | <Bub_Lite_63_Jr> Sorry, |
21:27:43 | FromDiscord_ | <Bub_Lite_63_Jr> |
21:27:43 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
21:27:43 | FromDiscord_ | <Bub_Lite_63_Jr> Josephs-MacBook-Pro-15:nim_folder josephlyons$ echo $PATH |
21:27:48 | FromDiscord_ | <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:48 | FromDiscord_ | <Bub_Lite_63_Jr> ``` |
21:28:19 | FromDiscord_ | <djazz> PM me your .bashrc |
21:30:09 | FromDiscord_ | <Bub_Lite_63_Jr> Ok, I'll grab that real quick |
21:30:11 | FromDiscord_ | <Bub_Lite_63_Jr> one min |
21:30:22 | FromDiscord_ | <djazz> i noticed you sourced .bash_profile instead of .bashrc |
21:30:59 | FromDiscord_ | <djazz> and .profile |
21:31:50 | FromDiscord_ | <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:18 | FromDiscord_ | <djazz> .bash_profile should contain a line that sources .bashrc. atleast it does on my linux machine |
21:32:27 | FromDiscord_ | <djazz> dunno about .profile |
21:33:03 | FromDiscord_ | <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:50 | FromDiscord_ | <djazz> what it? |
21:34:11 | solitudesf | its shouldnt, unless your env setup is fucked up |
21:34:26 | solitudesf | *shouldnt contain |
21:35:59 | FromDiscord_ | <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:05 | FromDiscord_ | <Bub_Lite_63_Jr> Do you still want to see the bashrc file? |
21:36:08 | FromDiscord_ | <Bub_Lite_63_Jr> There isn't much in int |
21:36:10 | FromDiscord_ | <Bub_Lite_63_Jr> There isn't much in it |
21:36:10 | FromDiscord_ | <djazz> yeah |
21:36:25 | dom96 | Bub_Lite_63_Jr: please use a pastebin next time |
21:36:27 | FromDiscord_ | <djazz> does it contain any export PATH thingys? |
21:36:51 | FromDiscord_ | <djazz> i have `export PATH=/home/djazz/.nimble/bin:$PATH` in mine |
21:40:12 | FromDiscord_ | <djazz> (solved in pm) |
21:51:34 | * | envoyt quit (Ping timeout: 258 seconds) |
21:56:37 | FromDiscord_ | <djazz> Is it possible to make a cstringArray from cstrings without dynamic alloc? |
21:56:59 | * | tjmac quit (Quit: -bye) |
21:59:06 | FromDiscord_ | <djazz> i need a fixed length cstringArray where I can change the values |
21:59:16 | FromDiscord_ | <djazz> i think it's just an array of pointers right? |
22:00:41 | Araq | it's a pointer to an array of pointers ;-) |
22:01:04 | FromDiscord_ | <djazz> can it be made on stack? i just need to update the pointers (i guess) |
22:01:21 | FromDiscord_ | <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:28 | Araq | array[N, cstring] |
22:16:17 | FromDiscord_ | <djazz> `openArray[cstring]` as input argument type, actually works |
22:17:09 | FromDiscord_ | <djazz> thanks! |
22:18:48 | FromDiscord_ | <djazz> `proc mpv_command*(ctx: ptr mpv_handle, args: openArray[cstring]): cint {.impclientC.}` |
22:18:48 | FromDiscord_ | <djazz> `let cmd2 = [cstring "loadfile", "https://www.youtube.com/watch?v=ywjyeaMUibM"]; mpv_check_error(mpv.mpv_command(ctx, cmd2))` |
22:19:42 | FromDiscord_ | <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:50 | Araq | yup |
22:22:45 | FromDiscord_ | <djazz> i get SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
22:22:57 | * | fredrik92 joined #nim |
22:23:49 | Araq | well don't forget the 'nil' terminator |
22:24:32 | Araq | also: strictly speaking you cannot use 'openArray' but I know of no architecture where it doesn't work |
22:25:10 | FromDiscord_ | <djazz> o, adding nil works! 😄 |
22:26:50 | * | freddy92 quit (Ping timeout: 252 seconds) |
22:27:33 | Araq | you 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:12 | FromDiscord_ | <djazz> using a seq works fine too |
22:29:51 | FromDiscord_ | <djazz> `var cmd = newSeq[cstring](); cmd.add("loadfile"); cmd.add("somefile.mp4")` |
22:30:19 | * | abm quit (Client Quit) |
22:31:19 | FromDiscord_ | <djazz> or just `var cmd:seq[cstring]` |
22:33:39 | Araq | I know *why* it works. do you? |
22:33:52 | FromDiscord_ | <djazz> I can check the C code |
22:34:06 | Araq | that's not an answer :P |
22:34:44 | FromDiscord_ | <djazz> well, i guess the internal representation matches what the C lib expects? |
22:37:06 | FromDiscord_ | <djazz> I've only used Nim for like 4 days 😅 |
22:37:14 | FromDiscord_ | <djazz> it's really cool! |
22:39:34 | Araq | are you aware that Nim passes the length of the array as a third argument to mpv_command? |
22:39:40 | FromDiscord_ | <djazz> yeah |
22:39:52 | FromDiscord_ | <djazz> `T5_ = mpv_command(ctx, cmd->data, (cmd ? cmd->Sup.len : 0));` |
22:40:14 | * | natrys quit (Quit: natrys) |
22:40:18 | FromDiscord_ | <djazz> but in the C header its `int mpv_command(mpv_handle *ctx, const char **args);` |
22:40:40 | Araq | and that it only happens to work because ABIs have been designed to cope with C's quirky varargs/missing prototype legacy "feature"? |
22:41:03 | FromDiscord_ | <djazz> cool! |
22:41:11 | FromDiscord_ | <djazz> I did not know that |
22:41:34 | FromDiscord_ | <djazz> I know almost nothing about C heh |
22:58:31 | FromDiscord_ | <djazz> even this works: `args: varargs[cstring]` argument with input `mpv_command(ctx, cstring "loadfile", cstring videoFile)` |
22:58:54 | FromDiscord_ | <djazz> 😊 |
23:00:55 | FromDiscord_ | <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:58 | FromDiscord_ | <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:43 | FromDiscord_ | <djazz> delete? sequtils |
23:21:08 | FromDiscord_ | <Skaruts> delete doesn't return the item though |
23:21:46 | FromDiscord_ | <Skaruts> pop removes and returns the last item, I was looking for something like that for the first item |
23:21:58 | FromDiscord_ | <Skaruts> just to keep code simpler |
23:23:39 | rayman22201 | not in the stdlib afaik. If it really bothers you, you can make a template for it though lol. |
23:24:13 | FromDiscord_ | <Skaruts> I'm not so versed in that kind of thing though 😃 |
23:24:40 | Araq | let x = a[0]; delete(a, 0) |
23:25:05 | Araq | maybe... I don't use 'delete' |
23:25:15 | * | Araq doesn't use anything. |
23:25:35 | FromDiscord_ | <Skaruts> I was gonna ask... 😃 |
23:26:36 | FromDiscord_ | <Skaruts> gotta take a look at how pop was implemented |
23:27:14 | FromDiscord_ | <Skaruts> would this work: |
23:27:18 | FromDiscord_ | <Skaruts> proc pop_back*[T](a:var seq[T]):T = |
23:27:18 | FromDiscord_ | <Skaruts> var i = a[0] |
23:27:19 | FromDiscord_ | <Skaruts> a.delete(0) |
23:27:19 | FromDiscord_ | <Skaruts> return i |
23:27:50 | FromDiscord_ | <Skaruts> seems to work |
23:28:19 | Araq | result = move a[0] |
23:28:22 | Araq | a.delete 0 |
23:28:30 | FromDiscord_ | <Skaruts> ah, indeed |
23:29:56 | FromDiscord_ | <Skaruts> thanks |
23:30:18 | FromGitter | <juancarlospaco> Hi |
23:30:33 | Araq | oh no! you are here to remind me |
23:30:36 | Araq | right? |
23:30:45 | Araq | but I'm not here. I'm sleeping |
23:31:53 | FromDiscord_ | <Skaruts> lol |
23:32:21 | FromDiscord_ | <Skaruts> btw I can't connect through irc (from the website) |
23:32:39 | rayman22201 | Araq is on irc through his dreams lol |
23:33:25 | Araq | I'm like that girl from Ecstatica |
23:36:59 | FromDiscord_ | <Skaruts> is it possible to create an alias for a variable? |
23:38:15 | FromDiscord_ | <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:27 | FromDiscord_ | <Skaruts> so echo x or echo x1 would be the same thing |
23:52:25 | Araq | template x1(): untyped = x |
23:56:10 | rayman22201 | @Pmunch, the playground is 502ing :-( |
23:57:15 | rayman22201 | !eval echo("am I alive?") |
23:57:16 | NimBot | Compile failed: <no output> |
23:57:26 | rayman22201 | :-( |
23:59:57 | rayman22201 | @PMunch even (idk if irc is case sensitive for pings) |